content
stringlengths 3
20.5k
| original_id
null | file_path
stringlengths 27
155
| url
stringlengths 54
193
| embeddings
listlengths 384
384
| score
float64 -0.21
0.65
|
|---|---|---|---|---|---|
information about the Pod, including events: ```shell kubectl describe pod memory-demo-3 --namespace=mem-example ``` The output shows that the Container cannot be scheduled because of insufficient memory on the Nodes: ``` Events: ... Reason Message ------ ------- ... FailedScheduling No nodes are available that match all of the following predicates:: Insufficient memory (3). ``` ## Memory units The memory resource is measured in bytes. You can express memory as a plain integer or a fixed-point integer with one of these suffixes: E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent approximately the same value: ``` 128974848, 129e6, 129M, 123Mi ``` Delete your Pod: ```shell kubectl delete pod memory-demo-3 --namespace=mem-example ``` ## If you do not specify a memory limit If you do not specify a memory limit for a Container, one of the following situations applies: \* The Container has no upper bound on the amount of memory it uses. The Container could use all of the memory available on the Node where it is running which in turn could invoke the OOM Killer. Further, in case of an OOM Kill, a container with no resource limits will have a greater chance of being killed. \* The Container is running in a namespace that has a default memory limit, and the Container is automatically assigned the default limit. Cluster administrators can use a [LimitRange](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#limitrange-v1-core) to specify a default value for the memory limit. ## Motivation for memory requests and limits By configuring memory requests and limits for the Containers that run in your cluster, you can make efficient use of the memory resources available on your cluster's Nodes. By keeping a Pod's memory request low, you give the Pod a good chance of being scheduled. By having a memory limit that is greater than the memory request, you accomplish two things: \* The Pod can have bursts of activity where it makes use of memory that happens to be available. \* The amount of memory a Pod can use during a burst is limited to some reasonable amount. ## Clean up Delete your namespace. This deletes all the Pods that you created for this task: ```shell kubectl delete namespace mem-example ``` ## {{% heading "whatsnext" %}} ### For app developers \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) \* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) \* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/) \* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) \* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/) \* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/) \* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-memory-resource.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-memory-resource.md
|
[
0.08669505268335342,
0.04975615814328194,
-0.013052912428975105,
0.059885866940021515,
-0.016302350908517838,
-0.01968809962272644,
0.028004243969917297,
0.042270105332136154,
0.08723331987857819,
0.05187876895070076,
0.004909862298518419,
-0.06336245685815811,
0.013966088183224201,
-0.031773585826158524,
0.00858379527926445,
-0.03779513016343117,
0.03674270585179329,
-0.004242607858031988,
-0.06899192184209824,
-0.03508734330534935,
0.09158672392368317,
0.013633719645440578,
-0.022078756242990494,
0.027705566957592964,
-0.08276441693305969,
0.015570479445159435,
-0.03687329217791557,
-0.03498706966638565,
0.052726246416568756,
-0.05781690031290054,
-0.004996659699827433,
0.0510392040014267,
0.030784189701080322,
0.02174500562250614,
0.16232559084892273,
0.1395825296640396,
-0.08231242001056671,
-0.10191050916910172,
-0.04988599568605423,
-0.030926229432225227,
0.04117767512798309,
-0.025024278089404106,
-0.06410707533359528,
0.07293959707021713,
0.004420101176947355,
0.04171982780098915,
-0.05933932960033417,
-0.05657718703150749,
-0.04949064180254936,
-0.04160340130329132,
0.004636149387806654,
0.00888629537075758,
0.02394402213394642,
0.036913227289915085,
0.09334962069988251,
0.014746191911399364,
-0.03209950774908066,
0.016656236723065376,
0.03628147393465042,
0.00926200207322836,
-0.008772228844463825,
-0.056099552661180496,
0.021813539788126945,
-0.05829624831676483,
-0.023484129458665848,
-0.04708649963140488,
0.021355241537094116,
0.02400875650346279,
0.02064301073551178,
0.03655651956796646,
0.02872655540704727,
-0.010338617488741875,
-0.03868163749575615,
0.028421837836503983,
-0.041131842881441116,
0.016924627125263214,
-0.0091171870008111,
0.01182540226727724,
-0.04667104408144951,
0.009456400759518147,
-0.07409146428108215,
-0.03598378971219063,
0.03662111982703209,
-0.07826434075832367,
-0.03663972020149231,
0.06307719647884369,
0.028887873515486717,
0.03326724097132683,
0.02108902297914028,
0.014154557138681412,
-0.024581821635365486,
0.0038128269370645285,
0.005999993532896042,
-0.055154990404844284,
0.08962584286928177,
0.025371883064508438,
0.0030137759167701006,
-0.005065307952463627,
-0.01659042201936245,
0.011390364728868008,
0.08286318182945251,
0.09496840834617615,
-0.011487496085464954,
0.04466881975531578,
0.037532515823841095,
-0.04815248027443886,
-0.10046052932739258,
-0.006337467581033707,
-0.025682218372821808,
0.057854536920785904,
0.0052842553704977036,
-0.02842986024916172,
0.007824715226888657,
0.03190332651138306,
0.06855397671461105,
0.02752898633480072,
-0.03814251348376274,
-0.012725606560707092,
0.022693293169140816,
0.060387033969163895,
0.040417689830064774,
-0.03583955019712448,
-0.018358435481786728,
0.0416887067258358,
-0.11138197034597397,
0.0020548957400023937,
0.007748140953481197,
2.057646841461758e-33,
-0.010418768040835857,
-0.10233528167009354,
-0.035160478204488754,
-0.040848035365343094,
0.04964660480618477,
-0.03300241380929947,
-0.07738034427165985,
0.020008957013487816,
-0.013993282802402973,
-0.0031496218871325254,
-0.05764460191130638,
-0.0272960402071476,
-0.020657142624258995,
-0.02922666072845459,
0.05405581742525101,
-0.03219280019402504,
-0.039417535066604614,
0.03792564943432808,
0.06442181766033173,
-0.0016223255079239607,
-0.0036899519618600607,
-0.026852784678339958,
-0.055367421358823776,
-0.0017581410938873887,
0.030645107850432396,
-0.007376120891422033,
0.039018090814352036,
-0.11387578397989273,
0.03200921416282654,
0.02733704075217247,
-0.03179790452122688,
-0.01776483841240406,
0.02248324081301689,
0.0027481785509735346,
-0.030371272936463356,
-0.051148563623428345,
-0.030989037826657295,
-0.002563904505223036,
-0.10817021131515503,
-0.08437778800725937,
0.008743664249777794,
0.006176254246383905,
0.013523796573281288,
-0.0744391456246376,
0.01221245527267456,
-0.09530144929885864,
0.12448737770318985,
-0.05232249200344086,
-0.03838188201189041,
0.02440529875457287,
0.03487802669405937,
-0.009754563681781292,
0.007867546752095222,
-0.05162633955478668,
0.05607232823967934,
-0.00033489696215838194,
0.11804946511983871,
0.0007738751592114568,
-0.016467614099383354,
0.11097200214862823,
-0.07000864297151566,
0.009882679209113121,
0.029696671292185783,
0.04163138195872307,
0.07523780316114426,
0.05386683717370033,
-0.04996069520711899,
0.0522911511361599,
0.014526518061757088,
0.08072686195373535,
-0.025154052302241325,
-0.0189606174826622,
0.022310571745038033,
0.048576470464468,
-0.042413439601659775,
-0.029617013409733772,
0.07551861554384232,
-0.012646320275962353,
-0.19617921113967896,
0.03828190267086029,
0.07421734184026718,
-0.03914583474397659,
0.010120772756636143,
0.047960929572582245,
-0.06385108828544617,
-0.05217672511935234,
0.028936874121427536,
0.039366818964481354,
-0.055783044546842575,
0.03727564960718155,
0.020537294447422028,
-0.013833529315888882,
-0.04797866940498352,
-0.008267225697636604,
-0.15510724484920502,
-3.7055850451779926e-33,
0.02104427106678486,
0.04027386009693146,
-0.02017873153090477,
0.0593704916536808,
0.00737932650372386,
-0.027465810999274254,
-0.0029342027846723795,
0.003891237545758486,
-0.03157424554228783,
-0.10574304312467575,
-0.09787845611572266,
-0.01902024820446968,
0.06002643704414368,
0.04360349103808403,
-0.0728624016046524,
-0.003011913038790226,
-0.05443963408470154,
-0.06480995565652847,
-0.030617814511060715,
0.05251063033938408,
-0.047949790954589844,
0.05546293780207634,
0.07311131805181503,
-0.01025660615414381,
-0.015377682633697987,
0.0369054414331913,
0.04285232722759247,
-0.012614739127457142,
-0.038942690938711166,
-0.028417343273758888,
0.01662011630833149,
-0.14165394008159637,
-0.03885101526975632,
0.0774189829826355,
0.02085963636636734,
-0.09064073860645294,
-0.003628861391916871,
0.05567708984017372,
-0.013450718484818935,
-0.03084377571940422,
0.10448179394006729,
0.050093766301870346,
-0.05584336072206497,
-0.025432122871279716,
-0.05990054830908775,
0.0012546638026833534,
-0.020503727719187737,
0.019784146919846535,
0.08187484741210938,
-0.06852379441261292,
-0.05386174097657204,
-0.037114400416612625,
-0.06988123059272766,
0.05938170850276947,
-0.006994663737714291,
-0.022027598693966866,
0.0025446631480008364,
0.02977183274924755,
0.007915332913398743,
-0.03188566863536835,
0.029356135055422783,
-0.09035207331180573,
0.0745435357093811,
-0.017358295619487762,
0.004126060754060745,
-0.048448596149683,
-0.003524152562022209,
-0.011674071662127972,
-0.04625242203474045,
0.03700140863656998,
0.13943076133728027,
0.07457432895898819,
-0.03693534433841705,
0.03127137944102287,
-0.03640226647257805,
0.002049247967079282,
-0.06019577383995056,
0.009613296017050743,
0.04857533052563667,
0.009910239838063717,
-0.06618661433458328,
0.13210360705852509,
-0.006777643691748381,
0.03356514871120453,
0.005500612780451775,
0.06404686719179153,
0.011597638949751854,
0.09074235707521439,
0.02624663896858692,
0.010572342202067375,
-0.0014669412048533559,
0.048371557146310806,
-0.04202023148536682,
0.11898325383663177,
-0.02619740553200245,
-5.4020116380115724e-8,
0.039352405816316605,
-0.03991567716002464,
0.021524302661418915,
0.037389807403087616,
0.09211007505655289,
-0.11979369819164276,
0.027153637260198593,
0.027057358995079994,
0.016145236790180206,
0.05377323552966118,
-0.0006459817523136735,
-0.012761374935507774,
-0.1235070526599884,
-0.006850420497357845,
0.06485885381698608,
-0.01225831639021635,
-0.01750064454972744,
0.05252648517489433,
0.020441805943846703,
-0.11002969741821289,
-0.035826876759529114,
-0.053902767598629,
0.003897512098774314,
-0.04499663785099983,
-0.007692268583923578,
-0.009789553470909595,
0.08608144521713257,
0.10898050665855408,
0.05223401263356209,
-0.039639201015233994,
0.007939663715660572,
-0.03378384932875633,
-0.024980904534459114,
-0.00926260557025671,
-0.02412186563014984,
-0.02053801715373993,
-0.10979622602462769,
0.03599652647972107,
0.02001492865383625,
0.027192315086722374,
-0.03683951497077942,
-0.04230990633368492,
0.001144592883065343,
0.04379032179713249,
-0.01558199618011713,
0.07461822777986526,
-0.046948861330747604,
0.03269205614924431,
-0.0069889803417027,
0.016750331968069077,
-0.014383980073034763,
0.0073150829412043095,
-0.018844807520508766,
0.05953247472643852,
0.0007538322824984789,
0.044511012732982635,
0.0020687300711870193,
-0.08503749966621399,
-0.021651195362210274,
-0.018826263025403023,
0.01899120956659317,
0.030807776376605034,
-0.05634939298033714,
-0.028580710291862488
] | 0.218229
|
This page shows how to attach handlers to Container lifecycle events. Kubernetes supports the postStart and preStop events. Kubernetes sends the postStart event immediately after a Container is started, and it sends the preStop event immediately before the Container is terminated. A Container may specify one handler per event. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Define postStart and preStop handlers In this exercise, you create a Pod that has one Container. The Container has handlers for the postStart and preStop events. Here is the configuration file for the Pod: {{% code\_sample file="pods/lifecycle-events.yaml" %}} In the configuration file, you can see that the postStart command writes a `message` file to the Container's `/usr/share` directory. The preStop command shuts down nginx gracefully. This is helpful if the Container is being terminated because of a failure. Create the Pod: kubectl apply -f https://k8s.io/examples/pods/lifecycle-events.yaml Verify that the Container in the Pod is running: kubectl get pod lifecycle-demo Get a shell into the Container running in your Pod: kubectl exec -it lifecycle-demo -- /bin/bash In your shell, verify that the `postStart` handler created the `message` file: root@lifecycle-demo:/# cat /usr/share/message The output shows the text written by the postStart handler: Hello from the postStart handler ## Discussion Kubernetes sends the postStart event immediately after the Container is created. There is no guarantee, however, that the postStart handler is called before the Container's entrypoint is called. The postStart handler runs asynchronously relative to the Container's code, but Kubernetes' management of the container blocks until the postStart handler completes. The Container's status is not set to RUNNING until the postStart handler completes. Kubernetes sends the preStop event immediately before the Container is terminated. Kubernetes' management of the Container blocks until the preStop handler completes, unless the Pod's grace period expires. For more details, see [Pod Lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/). {{< note >}} Kubernetes only sends the preStop event when a Pod or a container in the Pod is \*terminated\*. This means that the preStop hook is not invoked when the Pod is \*completed\*. About this limitation, please see [Container hooks](/docs/concepts/containers/container-lifecycle-hooks/#container-hooks) for the detail. {{< /note >}} ## {{% heading "whatsnext" %}} \* Learn more about [Container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/). \* Learn more about the [lifecycle of a Pod](/docs/concepts/workloads/pods/pod-lifecycle/). ### Reference \* [Lifecycle](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#lifecycle-v1-core) \* [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core) \* See `terminationGracePeriodSeconds` in [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/attach-handler-lifecycle-event.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/attach-handler-lifecycle-event.md
|
[
0.004820053465664387,
0.036700863391160965,
0.052587490528821945,
0.016232214868068695,
-0.006443624384701252,
0.015168777666985989,
-0.015218297950923443,
-0.04677460715174675,
0.038242846727371216,
0.0740223303437233,
-0.03312154859304428,
0.016752002760767937,
-0.06526726484298706,
0.026584774255752563,
0.013860385864973068,
-0.015414499677717686,
0.01294972375035286,
-0.02451411634683609,
-0.04167107492685318,
-0.010704302228987217,
-0.01577139087021351,
0.02853534370660782,
0.012742593884468079,
0.047203950583934784,
-0.06772328913211823,
-0.006530618295073509,
-0.07314416766166687,
-0.0654636025428772,
0.05462297424674034,
0.04437357932329178,
-0.006917119491845369,
-0.08686970919370651,
-0.03125215694308281,
0.006206371355801821,
0.023676620796322823,
0.14072519540786743,
0.016543345525860786,
-0.09729962050914764,
-0.06204891577363014,
0.0050177546218037605,
0.0790204182267189,
-0.039128582924604416,
-0.11159390211105347,
-0.0283652376383543,
0.019215337932109833,
-0.05865301564335823,
-0.04428104683756828,
-0.04837903380393982,
-0.006326096132397652,
-0.017798686400055885,
-0.009533697739243507,
-0.10385411232709885,
0.08864494413137436,
-0.013692195527255535,
0.06721294671297073,
0.025550518184900284,
-0.00221344456076622,
0.002912230556830764,
0.09348747879266739,
-0.022874534130096436,
-0.029348529875278473,
-0.0678594708442688,
-0.00505100330337882,
-0.06006757169961929,
0.05860015004873276,
-0.013450386002659798,
0.014167691580951214,
0.02314816601574421,
0.04817552492022514,
0.008010923862457275,
0.029300330206751823,
0.02383997105062008,
-0.015015271492302418,
0.014725646004080772,
-0.02932000532746315,
0.05924908444285393,
-0.05859224498271942,
0.06547153741121292,
-0.11565694212913513,
-0.019709641113877296,
0.034311797469854355,
0.03495294973254204,
0.0792473629117012,
-0.03267339617013931,
-0.0504724457859993,
0.0019987181294709444,
0.02107221633195877,
-0.023199280723929405,
0.07093194872140884,
-0.05534832179546356,
-0.05285762995481491,
-0.0066224196925759315,
-0.013409626670181751,
-0.043196190148591995,
0.026363622397184372,
0.027826687321066856,
-0.07999312877655029,
0.03785767778754234,
0.01817537099123001,
0.0029161821585148573,
0.07245901226997375,
-0.024783920496702194,
-0.019701650366187096,
0.06547906249761581,
0.09638598561286926,
-0.053240492939949036,
-0.11349525302648544,
-0.04728998988866806,
0.01447902899235487,
0.04136422276496887,
0.004484225995838642,
-0.025106927379965782,
0.05069650337100029,
0.013198965229094028,
-0.030104149132966995,
0.07568266987800598,
0.006615256424993277,
0.033728912472724915,
0.05429162457585335,
0.02343505248427391,
0.08352664858102798,
-0.04151875153183937,
0.0649147778749466,
0.02065543830394745,
0.01641950011253357,
-0.03244623914361,
-0.025118635967373848,
3.637268252244078e-33,
0.04863373935222626,
-0.10049062222242355,
0.01573091372847557,
0.02366223745048046,
0.03792507201433182,
-0.1073920950293541,
-0.047068849205970764,
-0.022190287709236145,
0.02860926277935505,
0.004137714393436909,
-0.06539199501276016,
0.027850961312651634,
-0.024216298013925552,
-0.04472198337316513,
0.015552420169115067,
-0.06506600975990295,
-0.08739814907312393,
-0.0022907594684511423,
0.11994614452123642,
0.006173015106469393,
0.010668390430510044,
-0.09771798551082611,
-0.09545338898897171,
0.04083201661705971,
0.10727138817310333,
-0.01001126877963543,
0.028755448758602142,
-0.07708336412906647,
-0.05665241926908493,
0.029537472873926163,
0.01427022647112608,
-0.026346692815423012,
0.0020535539370030165,
-0.056907083839178085,
-0.15997551381587982,
-0.04139485955238342,
-0.017197459936141968,
0.05631217360496521,
-0.0713181123137474,
-0.06431937217712402,
0.03324102237820625,
-0.01654636673629284,
-0.02940257266163826,
-0.019812915474176407,
-0.00679989717900753,
-0.101002037525177,
0.03545152768492699,
-0.04390467330813408,
0.11223164200782776,
-0.036505792289972305,
0.03516058996319771,
-0.11508450657129288,
0.04144089296460152,
-0.022708429023623466,
0.021456820890307426,
0.05884217843413353,
0.06799110770225525,
-0.027918722480535507,
-0.010414631105959415,
0.0035036252811551094,
-0.056589774787425995,
-0.04772282764315605,
-0.0308451596647501,
0.005368318874388933,
0.04512288421392441,
0.012882523238658905,
-0.010745038278400898,
0.007648940198123455,
0.03645520657300949,
-0.014300018548965454,
-0.06768912822008133,
0.02461131103336811,
-0.036144357174634933,
-0.023994045332074165,
0.016214292496442795,
0.007900293916463852,
0.028671251609921455,
0.04962242767214775,
-0.05220993235707283,
0.0453280471265316,
0.06053968891501427,
-0.08090359717607498,
-0.06388609111309052,
0.0713212862610817,
0.0023253662511706352,
-0.05329662933945656,
-0.005906436592340469,
-0.0217339638620615,
-0.06981316953897476,
0.012527807615697384,
-0.004749159328639507,
0.03453009948134422,
-0.006212987937033176,
0.05491960793733597,
-0.05138542875647545,
-5.235060785309196e-33,
0.09610629826784134,
-0.0003528350789565593,
-0.0668279230594635,
0.02886274829506874,
0.01771964691579342,
0.029369086027145386,
-0.007830576971173286,
0.0018214226001873612,
-0.05283500999212265,
-0.034269291907548904,
-0.08755522221326828,
-0.05514078959822655,
0.04924643039703369,
0.14432930946350098,
-0.13471244275569916,
-0.010237438604235649,
-0.033540427684783936,
-0.031160185113549232,
0.03962398320436478,
0.024653689935803413,
-0.0224326029419899,
0.023888403549790382,
0.03569236025214195,
0.04654650762677193,
-0.00824425183236599,
0.009240580722689629,
0.12263516336679459,
-0.004444113001227379,
-0.04626357555389404,
0.022387871518731117,
-0.025711722671985626,
-0.091758131980896,
0.04060516133904457,
0.04390143230557442,
-0.008432252332568169,
-0.052487317472696304,
-0.05999979004263878,
0.05115032196044922,
0.047989290207624435,
-0.05098489299416542,
0.15845529735088348,
0.044659484177827835,
-0.01030769944190979,
-0.021965641528367996,
-0.10191516578197479,
-0.01520250178873539,
0.06076812371611595,
-0.024854110553860664,
0.0009271017042919993,
-0.04075248911976814,
-0.07924946397542953,
0.020411834120750427,
-0.04563671350479126,
0.06985960900783539,
-0.03746017441153526,
-0.008895309641957283,
0.040295232087373734,
-0.007127510849386454,
-0.03903919458389282,
0.017947452142834663,
0.040835902094841,
-0.015341912396252155,
0.12552809715270996,
-0.0009485490154474974,
0.03414399176836014,
-0.05547133460640907,
-0.03670179843902588,
0.022864442318677902,
0.008895744569599628,
0.02894083969295025,
-0.015030775219202042,
0.05246661230921745,
0.003524346509948373,
0.017261987552046776,
-0.0010718334233388305,
0.0483129508793354,
-0.03076019138097763,
-0.06833339482545853,
0.08491373807191849,
-0.04946029186248779,
-0.08590535819530487,
0.03869643434882164,
-0.07206559181213379,
-0.0008077050442807376,
0.02432962693274021,
0.1369265764951706,
0.03764363005757332,
0.09370006620883942,
0.06481243669986725,
0.06330610066652298,
0.035033322870731354,
0.025451812893152237,
0.0032793423160910606,
0.06568193435668945,
-0.06429394334554672,
-5.630633381770167e-8,
0.03566446155309677,
0.05089500918984413,
-0.0015638789627701044,
0.061270929872989655,
0.04378417879343033,
-0.009916783310472965,
0.06271594762802124,
-0.009015399031341076,
-0.032900191843509674,
-0.010445881634950638,
-0.05889558792114258,
0.060124240815639496,
-0.031001240015029907,
0.001606827019713819,
0.010929466225206852,
-0.044319573789834976,
0.02289516292512417,
0.03083427995443344,
-0.018134793266654015,
-0.06522362679243088,
-0.033165112137794495,
-0.021122343838214874,
0.05135289207100868,
-0.0013246884336695075,
-0.01931530423462391,
0.03878377005457878,
0.07808228582143784,
0.06322209537029266,
0.0573246106505394,
-0.03883538022637367,
-0.010709269903600216,
-0.026957698166370392,
-0.10606028139591217,
0.0699092373251915,
-0.05518766865134239,
-0.010346561670303345,
-0.11462646722793579,
-0.009968210011720657,
0.0636843889951706,
0.005293009802699089,
-0.03605952858924866,
-0.015977628529071808,
-0.06974025070667267,
-0.048768412321805954,
-0.04269035533070564,
0.09399159997701645,
-0.03280048444867134,
0.0038322166074067354,
-0.01905483566224575,
0.03965235874056816,
-0.033068448305130005,
-0.05527251586318016,
-0.01693662442266941,
0.09271567314863205,
0.04724782705307007,
0.029354434460401535,
0.058912668377161026,
-0.032874949276447296,
0.03416911140084267,
-0.011172610335052013,
0.018337788060307503,
-0.007006019353866577,
0.02760886959731579,
0.026545733213424683
] | 0.101415
|
{{< feature-state feature\_gate\_name="ImageVolume" >}} This page shows how to configure a pod using image volumes. This allows you to mount content from OCI registries inside containers. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} - The container runtime needs to support the image volumes feature - You need to exec commands in the host - You need to be able to exec into pods - You need to enable the `ImageVolume` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) ## Run a Pod that uses an image volume {#create-pod} An image volume for a pod is enabled by setting the `volumes[\*].image` field of `.spec` to a valid reference and consuming it in the `volumeMounts` of the container. For example: {{% code\_sample file="pods/image-volumes.yaml" %}} 1. Create the pod on your cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml ``` 1. Attach to the container: ```shell kubectl exec image-volume -it -- bash ``` 1. Check the content of a file in the volume: ```shell cat /volume/dir/file ``` The output is similar to: ```none 1 ``` You can also check another file in a different path: ```shell cat /volume/file ``` The output is similar to: ```none 2 ``` ## Use `subPath` (or `subPathExpr`) It is possible to utilize [`subPath`](/docs/concepts/storage/volumes/#using-subpath) or [`subPathExpr`](/docs/concepts/storage/volumes/#using-subpath-expanded-environment) from Kubernetes v1.33 when using the image volume feature. {{% code\_sample file="pods/image-volumes-subpath.yaml" %}} 1. Create the pod on your cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/image-volumes-subpath.yaml ``` 1. Attach to the container: ```shell kubectl exec image-volume -it -- bash ``` 1. Check the content of the file from the `dir` sub path in the volume: ```shell cat /volume/file ``` The output is similar to: ```none 1 ``` ## Further reading - [`image` volumes](/docs/concepts/storage/volumes/#image)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/image-volumes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/image-volumes.md
|
[
0.0639309361577034,
-0.010270180180668831,
0.022075658664107323,
0.04335450381040573,
0.021931614726781845,
-0.07779058814048767,
-0.02323555387556553,
0.09513145685195923,
-0.03045758605003357,
0.0368335135281086,
-0.009086680598556995,
-0.07319872081279755,
-0.00350167672149837,
0.0578225739300251,
0.08669895678758621,
-0.013728507794439793,
0.02629495970904827,
0.01283183041960001,
0.029965730383992195,
-0.004965423606336117,
0.05315958708524704,
0.01668006367981434,
0.09231801331043243,
-0.004995016381144524,
-0.04156350716948509,
-0.027359435334801674,
-0.008090871386229992,
-0.024113085120916367,
0.01724899560213089,
-0.027447951957583427,
0.050408340990543365,
-0.002045921515673399,
0.058800023049116135,
-0.0011612472590059042,
0.1022665873169899,
0.11918002367019653,
0.08827914297580719,
-0.11822644621133804,
-0.06404238939285278,
-0.09643033891916275,
0.05612446367740631,
-0.03128465265035629,
-0.07863153517246246,
-0.04947153106331825,
-0.03787581995129585,
-0.028879571706056595,
0.024845289066433907,
-0.10329849272966385,
0.015392223373055458,
0.014236120507121086,
-0.0786760225892067,
-0.11753883957862854,
0.05605698376893997,
0.025730770081281662,
0.022704938426613808,
0.05654456838965416,
0.020992128178477287,
0.04551597312092781,
0.06157534942030907,
0.029691599309444427,
0.015523351728916168,
-0.05146107077598572,
-0.01248355582356453,
-0.054922815412282944,
0.017170453444123268,
0.00832655094563961,
-0.026496736332774162,
-0.00034008067450486124,
0.01709730364382267,
-0.0604984313249588,
0.0434548482298851,
0.012708944268524647,
0.056491512805223465,
-0.04590689018368721,
-0.006573488935828209,
0.02210102044045925,
0.018824616447091103,
0.04069364815950394,
0.012103667482733727,
-0.04418542608618736,
0.0076683699153363705,
0.03342592343688011,
0.02757333032786846,
-0.020794082432985306,
-0.02286551147699356,
0.00835411436855793,
-0.009266387671232224,
-0.011514280922710896,
-0.00002582644810900092,
-0.03768150135874748,
-0.0009685744880698621,
-0.1354532241821289,
-0.02980498969554901,
-0.09088102728128433,
0.11299515515565872,
-0.011960797943174839,
-0.040641844272613525,
-0.024641530588269234,
0.03415507823228836,
0.0193699449300766,
-0.03953929990530014,
-0.004669019486755133,
-0.014451969414949417,
0.026698587462306023,
0.09629897028207779,
0.010790253058075905,
-0.008506574667990208,
0.003197929123416543,
0.00018890008504968137,
0.08577583730220795,
0.025998808443546295,
0.01190906297415495,
-0.011270888149738312,
0.004277480766177177,
0.00853773858398199,
-0.018597545102238655,
-0.053215451538562775,
0.054756492376327515,
-0.029832161962985992,
0.005383423529565334,
0.09230294078588486,
-0.06067269295454025,
0.0008245633216574788,
0.001238108379766345,
0.003421393223106861,
-0.054143793880939484,
-0.07397439330816269,
1.4870854852951322e-33,
0.09086842834949493,
-0.0843939557671547,
0.04159310460090637,
0.03503170982003212,
0.05748146027326584,
-0.06969339400529861,
0.07105117291212082,
-0.004603240173310041,
-0.0580085925757885,
-0.0030117963906377554,
-0.04738003388047218,
0.06219065934419632,
-0.0502062663435936,
0.04560146480798721,
-0.04201610013842583,
-0.08965202420949936,
-0.10834778100252151,
0.055854201316833496,
0.1287497878074646,
-0.010633213445544243,
0.006264075171202421,
-0.05554628372192383,
-0.06729152053594589,
0.036679577082395554,
0.0184944998472929,
-0.01036251150071621,
0.03220764175057411,
-0.08996614813804626,
0.029273459687829018,
0.021290047094225883,
-0.04583614319562912,
-0.019036471843719482,
0.05902625620365143,
0.045269712805747986,
-0.07145033776760101,
-0.0544327050447464,
-0.027447650209069252,
0.04270447418093681,
-0.08221500366926193,
-0.006573831662535667,
0.09942971169948578,
-0.019409794360399246,
0.01621069200336933,
-0.01248456072062254,
-0.05544732138514519,
-0.007140246219933033,
0.029842626303434372,
-0.034316327422857285,
0.08221125602722168,
0.06806215643882751,
-0.03466767817735672,
-0.09446008503437042,
-0.04214320704340935,
-0.06298051029443741,
0.053494036197662354,
-0.05811009928584099,
-0.023336786776781082,
-0.010010256431996822,
0.033015407621860504,
-0.09874086081981659,
-0.050328124314546585,
0.09173717349767685,
-0.0037121784407645464,
0.03872743621468544,
-0.03282229229807854,
0.05148514732718468,
-0.014759842306375504,
-0.006904625799506903,
0.01984221488237381,
0.03510253503918648,
-0.0595562644302845,
0.07437294721603394,
-0.12383726984262466,
-0.04538920521736145,
-0.052758265286684036,
-0.04880450665950775,
0.06636150181293488,
0.007495048921555281,
-0.07287097722291946,
0.055400386452674866,
-0.011337933130562305,
0.024764204397797585,
-0.06488818675279617,
0.06765137612819672,
0.00729020731523633,
0.023725032806396484,
0.04682837054133415,
0.04278281703591347,
-0.05060998722910881,
-0.05180707573890686,
0.05715007707476616,
-0.026840604841709137,
-0.06017979234457016,
-0.01930978149175644,
-0.09896669536828995,
-1.0074089442302701e-33,
0.1553504914045334,
-0.0345563106238842,
0.030352815985679626,
0.0012892942177131772,
0.014808584935963154,
0.013149646110832691,
0.058672014623880386,
0.009920172393321991,
-0.025461537763476372,
-0.07461045682430267,
-0.09725377708673477,
-0.009206103160977364,
-0.031862325966358185,
-0.01847716048359871,
-0.0875961109995842,
0.000050202837883261964,
-0.09777993708848953,
-0.04632730782032013,
0.058252185583114624,
0.044480711221694946,
-0.07035768777132034,
0.0318310372531414,
0.08195479959249496,
0.06689811497926712,
-0.048551853746175766,
-0.0031901805195957422,
0.08041397482156754,
-0.01876436546444893,
-0.04541260004043579,
-0.03192473202943802,
0.003468480659648776,
-0.025269584730267525,
-0.02380068600177765,
-0.015889346599578857,
0.03924250602722168,
0.005841079633682966,
-0.0009819702245295048,
0.015998173505067825,
-0.05822127312421799,
0.009770214557647705,
0.042079295963048935,
-0.04008457437157631,
-0.06754100322723389,
-0.013725003227591515,
-0.07670645415782928,
0.0005974577507004142,
0.0916634127497673,
0.014108517207205296,
-0.014819403178989887,
-0.035440053790807724,
0.023624835535883904,
-0.049425236880779266,
-0.08046184480190277,
0.036386050283908844,
-0.02144206501543522,
-0.013041185215115547,
0.04168633371591568,
0.011445175856351852,
-0.006776685360819101,
-0.016843140125274658,
0.07327518612146378,
-0.09296760708093643,
0.06775607168674469,
-0.03322187811136246,
-0.03868294507265091,
-0.0379752479493618,
-0.055973637849092484,
0.035074383020401,
-0.053409937769174576,
0.0963025689125061,
-0.0272538959980011,
-0.012925741262733936,
0.09330940991640091,
0.027074526995420456,
0.06395814567804337,
-0.003458579070866108,
-0.06137460097670555,
-0.037939801812171936,
0.09038995951414108,
0.0064188591204583645,
-0.044562820345163345,
0.0828467383980751,
-0.05025218427181244,
0.027274122461676598,
0.08442426472902298,
0.033862657845020294,
0.08650445938110352,
0.08628135919570923,
0.033636558800935745,
0.04795834794640541,
-0.001793427742086351,
0.032014451920986176,
0.06044607236981392,
0.07362820953130722,
0.04530717805027962,
-5.0209333579687154e-8,
0.04384392499923706,
0.004476827569305897,
-0.0006110764807090163,
0.0644260123372078,
-0.013242615386843681,
-0.006846890319138765,
0.032789260149002075,
0.018571533262729645,
-0.0039006629958748817,
0.017170969396829605,
-0.010124607011675835,
0.019839730113744736,
-0.07282275706529617,
-0.005356212612241507,
-0.009962033480405807,
0.01824246533215046,
0.0202040858566761,
0.15189382433891296,
0.007556277792900801,
-0.08460654318332672,
-0.05851392447948456,
-0.045610666275024414,
0.06063301861286163,
-0.024950312450528145,
0.044533587992191315,
0.09668824821710587,
0.002895364770665765,
-0.00876192469149828,
0.019327472895383835,
-0.03925376012921333,
0.03233203664422035,
-0.020986706018447876,
-0.03872236609458923,
0.02743380330502987,
0.01833636499941349,
-0.02744368463754654,
-0.05223403871059418,
0.033045001327991486,
0.016610821709036827,
-0.011088483966886997,
-0.04828864708542824,
0.00795130617916584,
-0.05410962551832199,
-0.03438841179013252,
-0.030290476977825165,
0.055003054440021515,
-0.025415506213903427,
0.10589861124753952,
-0.07428500801324844,
0.06395182013511658,
-0.003424945753067732,
-0.06450557708740234,
-0.0011650589294731617,
0.10948067158460617,
-0.0011114771477878094,
0.013416944071650505,
0.046380870044231415,
-0.018954303115606308,
0.0056000384502112865,
0.05124523863196373,
0.03936181589961052,
0.04823145642876625,
0.030666401609778404,
-0.03750649839639664
] | 0.100793
|
{{< feature-state for\_k8s\_version="v1.26" state="stable" >}} Windows HostProcess containers enable you to run containerized workloads on a Windows host. These containers operate as normal processes but have access to the host network namespace, storage, and devices when given the appropriate user privileges. HostProcess containers can be used to deploy network plugins, storage configurations, device plugins, kube-proxy, and other components to Windows nodes without the need for dedicated proxies or the direct installation of host services. Administrative tasks such as installation of security patches, event log collection, and more can be performed without requiring cluster operators to log onto each Windows node. HostProcess containers can run as any user that is available on the host or is in the domain of the host machine, allowing administrators to restrict resource access through user permissions. While neither filesystem or process isolation are supported, a new volume is created on the host upon starting the container to give it a clean and consolidated workspace. HostProcess containers can also be built on top of existing Windows base images and do not inherit the same [compatibility requirements](https://docs.microsoft.com/virtualization/windowscontainers/deploy-containers/version-compatibility) as Windows server containers, meaning that the version of the base images does not need to match that of the host. It is, however, recommended that you use the same base image version as your Windows Server container workloads to ensure you do not have any unused images taking up space on the node. HostProcess containers also support [volume mounts](#volume-mounts) within the container volume. ### When should I use a Windows HostProcess container? - When you need to perform tasks which require the networking namespace of the host. HostProcess containers have access to the host's network interfaces and IP addresses. - You need access to resources on the host such as the filesystem, event logs, etc. - Installation of specific device drivers or Windows services. - Consolidation of administrative tasks and security policies. This reduces the degree of privileges needed by Windows nodes. ## {{% heading "prerequisites" %}} This task guide is specific to Kubernetes v{{< skew currentVersion >}}. If you are not running Kubernetes v{{< skew currentVersion >}}, check the documentation for that version of Kubernetes. In Kubernetes {{< skew currentVersion >}}, the HostProcess container feature is enabled by default. The kubelet will communicate with containerd directly by passing the hostprocess flag via CRI. You can use the latest version of containerd (v1.6+) to run HostProcess containers. [How to install containerd.](/docs/setup/production-environment/container-runtimes/#containerd) ## Limitations These limitations are relevant for Kubernetes v{{< skew currentVersion >}}: - HostProcess containers require containerd 1.6 or higher {{< glossary\_tooltip text="container runtime" term\_id="container-runtime" >}} and containerd 1.7 is recommended. - HostProcess pods can only contain HostProcess containers. This is a current limitation of the Windows OS; non-privileged Windows containers cannot share a vNIC with the host IP namespace. - HostProcess containers run as a process on the host and do not have any degree of isolation other than resource constraints imposed on the HostProcess user account. Neither filesystem or Hyper-V isolation are supported for HostProcess containers. - Volume mounts are supported and are mounted under the container volume. See [Volume Mounts](#volume-mounts) - A limited set of host user accounts are available for HostProcess containers by default. See [Choosing a User Account](#choosing-a-user-account). - Resource limits (disk, memory, cpu count) are supported in the same fashion as processes on the host. - Both Named pipe mounts and Unix domain sockets are \*\*not\*\* supported and should instead be accessed via their path on the host (e.g. \\\\.\\pipe\\\\*) ## HostProcess Pod configuration requirements Enabling a Windows HostProcess pod requires setting the right configurations in the pod security configuration. Of the
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
[
0.025256022810935974,
0.04624851793050766,
0.014535984955728054,
0.026208508759737015,
0.0017357239266857505,
0.0032838608603924513,
0.002501501701772213,
-0.03670573607087135,
0.0014903561677783728,
0.06678163260221481,
-0.08329793065786362,
-0.002558105392381549,
-0.000309377268422395,
0.023763863369822502,
0.004015766549855471,
-0.06326200067996979,
0.06750258803367615,
-0.007190949749201536,
-0.06243357062339783,
0.0057302201166749,
-0.04851258546113968,
-0.07697512209415436,
-0.0425633043050766,
-0.014443744905292988,
-0.07436687499284744,
0.030530203133821487,
-0.060019370168447495,
-0.04292197898030281,
0.03739142790436745,
0.021896125748753548,
-0.054308317601680756,
-0.05070016160607338,
-0.004045052453875542,
0.02481880784034729,
0.05343826860189438,
0.0563034825026989,
0.06340004503726959,
-0.021543161943554878,
-0.12648944556713104,
-0.0798301249742508,
0.08102373033761978,
-0.01907840371131897,
-0.11407140642404556,
-0.018590185791254044,
-0.05292339622974396,
-0.027685148641467094,
0.009923825971782207,
-0.05993342772126198,
-0.08600296080112457,
-0.026773829013109207,
0.012037537060678005,
-0.024737605825066566,
0.04786202311515808,
0.11833856254816055,
-0.023698164150118828,
-0.05052734911441803,
0.05130539834499359,
0.018900349736213684,
0.06602214276790619,
-0.0023398674093186855,
0.017891911789774895,
-0.07861457765102386,
0.015479710884392262,
-0.008982544764876366,
0.03858603537082672,
-0.019077248871326447,
-0.011944083496928215,
-0.003128121607005596,
0.032707907259464264,
-0.07429099828004837,
-0.07067868113517761,
0.033498384058475494,
-0.027554452419281006,
-0.011960839852690697,
0.000731710228137672,
0.0036377953365445137,
-0.02190489135682583,
0.008844522759318352,
0.026359641924500465,
-0.03451789915561676,
0.032446082681417465,
0.06269820034503937,
0.009708660654723644,
-0.03215211629867554,
-0.13071255385875702,
-0.014813398011028767,
-0.11083655804395676,
0.010751839727163315,
0.0687796026468277,
-0.025523770600557327,
-0.003246375359594822,
0.009873180650174618,
0.01231281366199255,
-0.06651761382818222,
0.10149068385362625,
-0.040276579558849335,
0.02137884683907032,
-0.015306475572288036,
0.043281376361846924,
-0.012264999561011791,
0.03150688484311104,
0.0005353701417334378,
0.05982663854956627,
-0.02822727896273136,
0.012042853981256485,
-0.0010762364836409688,
-0.05261027067899704,
-0.034868184477090836,
0.025004856288433075,
-0.028304144740104675,
-0.0568331703543663,
0.07485932856798172,
-0.05199645087122917,
-0.00975323561578989,
-0.028304191306233406,
-0.061464421451091766,
0.02749425172805786,
-0.018825504928827286,
0.0033334195613861084,
0.03506549075245857,
0.018512267619371414,
-0.11849391460418701,
0.03292231261730194,
-0.07748494297266006,
-0.0011773563455790281,
0.009853621944785118,
-0.09079034626483917,
7.19694946923007e-33,
0.02528925985097885,
-0.09851226955652237,
0.05362139269709587,
0.0466025210916996,
0.17116761207580566,
-0.0597483292222023,
-0.004763728007674217,
-0.07651765644550323,
-0.014180555008351803,
-0.07283206284046173,
-0.08258845657110214,
0.04727039858698845,
0.05936376377940178,
-0.05645089969038963,
0.12876509130001068,
-0.0018732371972873807,
-0.013714845292270184,
0.06827642023563385,
0.0973091721534729,
0.027047906070947647,
0.018598170951008797,
-0.05985641852021217,
-0.03425466641783714,
-0.005455760285258293,
0.07649653404951096,
-0.08626903593540192,
0.029413841664791107,
-0.058693431317806244,
0.05238797143101692,
-0.0045471410267055035,
-0.039207927882671356,
0.03355787321925163,
0.028202299028635025,
0.059428870677948,
-0.046333517879247665,
0.02864004485309124,
-0.03536267951130867,
-0.0106741301715374,
0.00786714069545269,
-0.052117135375738144,
-0.010936138220131397,
-0.029861770570278168,
0.0743456706404686,
-0.029467610642313957,
0.030611656606197357,
-0.0388588048517704,
0.023494036868214607,
-0.02736007794737816,
0.03810428828001022,
0.07949953526258469,
0.0610453300178051,
-0.023307887837290764,
0.01034710742533207,
-0.01413791161030531,
0.042871370911598206,
0.02407711185514927,
0.06879207491874695,
-0.06743597239255905,
-0.006096995435655117,
0.010733694769442081,
-0.05084647238254547,
-0.009273160248994827,
-0.0430656373500824,
0.055162522941827774,
-0.01581123284995556,
-0.03133288398385048,
0.035235606133937836,
0.07845494151115417,
-0.03914286568760872,
0.09357283264398575,
-0.05957922339439392,
0.06664606928825378,
-0.04053456708788872,
-0.004392771981656551,
-0.05293281748890877,
0.019256049767136574,
-0.002167445607483387,
-0.060541775077581406,
-0.0798308253288269,
0.07738569378852844,
-0.042375143617391586,
-0.0313134491443634,
-0.057493895292282104,
0.03596407547593117,
-0.0428185760974884,
-0.11323083192110062,
-0.07456927001476288,
0.055623337626457214,
0.051854345947504044,
-0.056477803736925125,
0.054487887769937515,
0.007385673932731152,
0.021398328244686127,
0.05731922388076782,
-0.10642330348491669,
-8.025758209900217e-33,
0.014897665940225124,
-0.006186461076140404,
-0.025508388876914978,
-0.02970041148364544,
-0.011138571426272392,
0.06893918663263321,
-0.008904160931706429,
-0.06911469250917435,
-0.05427649989724159,
-0.11035782098770142,
-0.06347814202308655,
-0.012572863139212132,
0.04819823056459427,
0.04459432139992714,
-0.10382780432701111,
0.02676151692867279,
0.017008794471621513,
-0.0008522749412804842,
0.03342670574784279,
0.04898271709680557,
-0.008127354085445404,
0.0174684077501297,
0.03580620884895325,
0.03389769420027733,
-0.050355564802885056,
-0.042796019464731216,
-0.034967973828315735,
-0.02085283026099205,
-0.043135542422533035,
-0.004766473080962896,
0.06080273166298866,
-0.08716609328985214,
0.015377933159470558,
-0.033400457352399826,
0.045860953629016876,
-0.0054227812215685844,
-0.022065332159399986,
-0.004597528371959925,
-0.026200508698821068,
-0.08730266988277435,
0.042167942970991135,
-0.03230927884578705,
-0.03473261371254921,
0.0361056886613369,
-0.011959172785282135,
0.05994170159101486,
-0.015225356444716454,
-0.04871482774615288,
-0.05191773176193237,
-0.006465819664299488,
-0.027400150895118713,
-0.05876414105296135,
-0.014662357047200203,
0.06337930262088776,
-0.047162413597106934,
0.022877003997564316,
-0.01233087107539177,
0.08480881154537201,
-0.03603852540254593,
0.04839763045310974,
0.17706364393234253,
-0.0890173614025116,
0.010034899227321148,
0.08275565505027771,
-0.08520171791315079,
0.057461366057395935,
0.02351190708577633,
0.05829611048102379,
-0.10106247663497925,
0.03147463873028755,
-0.027605915442109108,
-0.0469994880259037,
-0.010136798024177551,
0.05380814149975777,
-0.031011594459414482,
-0.026820659637451172,
0.08534615486860275,
-0.08493132889270782,
-0.023057464510202408,
0.04013083502650261,
-0.04367612302303314,
0.04147209972143173,
-0.06624331325292587,
-0.023147553205490112,
0.014241155236959457,
0.014690426178276539,
0.06239653006196022,
-0.03204029053449631,
0.025037558749318123,
-0.004250458441674709,
-0.03740667179226875,
-0.021630002185702324,
-0.09632011502981186,
0.11874730885028839,
0.03620586916804314,
-5.503924072058908e-8,
0.022046243771910667,
-0.007132364436984062,
-0.04616925120353699,
-0.04186301305890083,
-0.05067348852753639,
0.01799273118376732,
0.029458900913596153,
-0.005473438650369644,
-0.002961413934826851,
0.0453808456659317,
-0.004449827596545219,
-0.06193534657359123,
-0.023289892822504044,
-0.06769758462905884,
0.10019370168447495,
0.05623900517821312,
-0.009252505376935005,
0.0644015371799469,
0.009881016798317432,
-0.02629345841705799,
0.029151810333132744,
-0.010335498489439487,
0.060678932815790176,
0.08449497818946838,
-0.029393937438726425,
0.03027784824371338,
0.07054771482944489,
-0.03420097753405571,
0.024450428783893585,
0.03217141702771187,
0.02573615498840809,
0.020723851397633553,
-0.024991704151034355,
0.14389143884181976,
-0.013586534187197685,
0.06409882754087448,
-0.08273382484912872,
0.05200836807489395,
0.0399048812687397,
0.03127742558717728,
-0.006219548638910055,
-0.000017193149687955156,
0.017605828121304512,
-0.005626397207379341,
0.017082547768950462,
0.06570984423160553,
-0.05312686040997505,
0.06264820694923401,
-0.004512989893555641,
0.014862176962196827,
0.043544020503759384,
0.008908703923225403,
0.019684290513396263,
0.11804533004760742,
0.051740407943725586,
0.060006339102983475,
-0.009115811437368393,
-0.007880515418946743,
0.08591113239526749,
0.05005430057644844,
0.03235374018549919,
0.054553791880607605,
0.047220807522535324,
0.01628248766064644
] | 0.175726
|
on the host. - Both Named pipe mounts and Unix domain sockets are \*\*not\*\* supported and should instead be accessed via their path on the host (e.g. \\\\.\\pipe\\\\*) ## HostProcess Pod configuration requirements Enabling a Windows HostProcess pod requires setting the right configurations in the pod security configuration. Of the policies defined in the [Pod Security Standards](/docs/concepts/security/pod-security-standards) HostProcess pods are disallowed by the baseline and restricted policies. It is therefore recommended that HostProcess pods run in alignment with the privileged profile. When running under the privileged policy, here are the configurations which need to be set to enable the creation of a HostProcess pod: Privileged policy specification | Control | Policy | | --- | --- | | [securityContext.windowsOptions.hostProcess](/docs/concepts/security/pod-security-standards) | Windows pods offer the ability to run [HostProcess containers](/docs/tasks/configure-pod-container/create-hostprocess-pod) which enables privileged access to the Windows node. **Allowed Values** * `true` | | [hostNetwork](/docs/concepts/security/pod-security-standards) | Pods container HostProcess containers must use the host's network namespace. **Allowed Values** * `true` | | [securityContext.windowsOptions.runAsUserName](/docs/tasks/configure-pod-container/configure-runasusername/) | Specification of which user the HostProcess container should run as is required for the pod spec. **Allowed Values** * `NT AUTHORITY\SYSTEM` * `NT AUTHORITY\Local service` * `NT AUTHORITY\NetworkService` * Local usergroup names (see below) | | [runAsNonRoot](/docs/concepts/security/pod-security-standards) | Because HostProcess containers have privileged access to the host, the runAsNonRoot field cannot be set to true. **Allowed Values** * Undefined/Nil * `false` | ### Example manifest (excerpt) {#manifest-example} ```yaml spec: securityContext: windowsOptions: hostProcess: true runAsUserName: "NT AUTHORITY\\Local service" hostNetwork: true containers: - name: test image: image1:latest command: - ping - -t - 127.0.0.1 nodeSelector: "kubernetes.io/os": windows ``` ## Volume mounts HostProcess containers support the ability to mount volumes within the container volume space. Volume mount behavior differs depending on the version of containerd runtime used by on the node. ### Containerd v1.6 Applications running inside the container can access volume mounts directly via relative or absolute paths. An environment variable `$CONTAINER\_SANDBOX\_MOUNT\_POINT` is set upon container creation and provides the absolute host path to the container volume. Relative paths are based upon the `.spec.containers.volumeMounts.mountPath` configuration. To access service account tokens (for example) the following path structures are supported within the container: - `.\var\run\secrets\kubernetes.io\serviceaccount\` - `$CONTAINER\_SANDBOX\_MOUNT\_POINT\var\run\secrets\kubernetes.io\serviceaccount\` ### Containerd v1.7 (and greater) Applications running inside the container can access volume mounts directly via the volumeMount's specified `mountPath` (just like Linux and non-HostProcess Windows containers). For backwards compatibility volumes can also be accessed via using the same relative paths configured by containerd v1.6. As an example, to access service account tokens within the container you would use one of the following paths: - `c:\var\run\secrets\kubernetes.io\serviceaccount` - `/var/run/secrets/kubernetes.io/serviceaccount/` - `$CONTAINER\_SANDBOX\_MOUNT\_POINT\var\run\secrets\kubernetes.io\serviceaccount\` ## Resource limits Resource limits (disk, memory, cpu count) are applied to the job and are job wide. For example, with a limit of 10MB set, the memory allocated for any HostProcess job object will be capped at 10MB. This is the same behavior as other Windows container types. These limits would be specified the same way they are currently for whatever orchestrator or runtime is being used. The only difference is in the disk resource usage calculation used for resource tracking due to the difference in how HostProcess containers are bootstrapped. ## Choosing a user account ### System accounts By default, HostProcess containers support the ability to run as one of three supported Windows service accounts: - \*\*[LocalSystem](https://docs.microsoft.com/windows/win32/services/localsystem-account)\*\* - \*\*[LocalService](https://docs.microsoft.com/windows/win32/services/localservice-account)\*\* - \*\*[NetworkService](https://docs.microsoft.com/windows/win32/services/networkservice-account)\*\* You should select an appropriate Windows service account for each HostProcess container, aiming to limit the degree of privileges so as to avoid accidental (or even malicious) damage to the host. The LocalSystem service account has the highest level of privilege of the three and should be used only if absolutely
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
[
0.08135656267404556,
-0.011470288038253784,
-0.0013188617303967476,
-0.037031468003988266,
-0.044130317866802216,
-0.05442029982805252,
-0.03880912438035011,
0.05237282067537308,
0.030296528711915016,
0.07095713913440704,
-0.046826209872961044,
-0.0319814495742321,
-0.020079046487808228,
0.041799332946538925,
0.011595610529184341,
-0.04172130301594734,
0.05099213495850563,
0.018210655078291893,
0.031228942796587944,
0.0037024959456175566,
-0.03624210134148598,
0.01568302884697914,
0.055855643004179,
-0.0018224988598376513,
-0.05525707080960274,
0.0013159611262381077,
-0.024050753563642502,
-0.039541974663734436,
-0.022947300225496292,
0.08106487989425659,
-0.03641321510076523,
-0.06723006069660187,
0.006863448768854141,
0.01925065368413925,
0.07187098264694214,
0.0952797383069992,
0.10083211213350296,
-0.09557828307151794,
-0.13310927152633667,
0.009242124855518341,
0.10110528767108917,
-0.10241089761257172,
-0.07423105835914612,
0.0014392189914360642,
-0.06761029362678528,
0.015942713245749474,
0.017031444236636162,
-0.059128809720277786,
-0.028887609019875526,
0.03806265816092491,
-0.036205995827913284,
-0.009465600363910198,
0.11626778542995453,
0.09904260188341141,
0.017098447307944298,
-0.024289606139063835,
-0.006299658212810755,
0.05545887351036072,
0.12383826076984406,
-0.006257820874452591,
-0.0032081955578178167,
-0.07618329674005508,
-0.02864515595138073,
-0.036317624151706696,
-0.009815122932195663,
-0.019480502232909203,
-0.0360376201570034,
0.02222089096903801,
-0.030484560877084732,
0.02663847617805004,
0.007453126832842827,
0.04630349203944206,
-0.06811396032571793,
-0.022700302302837372,
0.010904595255851746,
0.08734705299139023,
-0.027606463059782982,
0.027465643361210823,
-0.05382438376545906,
-0.09567616134881973,
0.02633390948176384,
0.03182633966207504,
0.004644032102078199,
-0.0178587194532156,
-0.11014074832201004,
0.08596102148294449,
-0.055404819548130035,
-0.04829591140151024,
0.018336135894060135,
0.04480463266372681,
-0.002217070199549198,
-0.05283672735095024,
0.004901179112493992,
-0.062293440103530884,
0.07414907962083817,
-0.01624150760471821,
-0.02667839266359806,
-0.004242988768965006,
0.0039017831441015005,
-0.0038566982839256525,
-0.012903071008622646,
0.005392447113990784,
-0.03616133704781532,
-0.010780506767332554,
0.07833154499530792,
0.007500162348151207,
-0.05211135745048523,
-0.00037517520831897855,
0.02721366658806801,
-0.002506918041035533,
-0.008921876549720764,
0.01892746612429619,
0.019544916227459908,
0.020442111417651176,
-0.033916447311639786,
0.006040870677679777,
-0.06958669424057007,
0.03718538582324982,
-0.03378897160291672,
0.003773854812607169,
0.009790204465389252,
-0.06015356630086899,
0.020654290914535522,
0.002418691525235772,
-0.04621598497033119,
-0.018014119938015938,
-0.04462630674242973,
3.652366742496421e-33,
0.004159796983003616,
-0.08617966622114182,
0.03307813033461571,
-0.014037259854376316,
0.08445189893245697,
-0.05560703203082085,
0.027639904990792274,
0.016655419021844864,
-0.024966811761260033,
0.002144175348803401,
-0.056934475898742676,
0.013910978101193905,
0.038912463933229446,
-0.038045965135097504,
0.013551122508943081,
0.02816321700811386,
-0.04551020264625549,
0.03957277536392212,
0.11387194693088531,
0.044739674776792526,
-0.007812123745679855,
-0.00026572388014756143,
-0.03488577529788017,
-0.012622373178601265,
-0.03651067614555359,
-0.03304789960384369,
-0.006669714115560055,
-0.12945446372032166,
0.03350240737199783,
0.039957694709300995,
-0.07786733657121658,
0.025984294712543488,
0.10790669918060303,
-0.00956664513796568,
-0.07479837536811829,
-0.04978424683213234,
0.055711470544338226,
0.020410826429724693,
-0.08436853438615799,
-0.0457715205848217,
0.10346271097660065,
-0.09149929881095886,
0.006551363039761782,
0.03446798026561737,
0.04105772450566292,
-0.023002328351140022,
0.011028861626982689,
-0.061701707541942596,
0.008258072659373283,
0.06710353493690491,
0.049933552742004395,
-0.010426463559269905,
0.04488907754421234,
-0.0399390384554863,
0.09799633175134659,
-0.09171769767999649,
-0.007961542345583439,
0.02609134651720524,
-0.040512632578611374,
0.0009417181718163192,
-0.06385228037834167,
0.11530036479234695,
0.015562308952212334,
-0.009912540204823017,
0.007867703214287758,
0.04509798437356949,
0.0000819126216811128,
0.03271710127592087,
-0.008447036147117615,
0.1022617369890213,
-0.029177432879805565,
0.11588706821203232,
-0.11075291782617569,
0.039139240980148315,
-0.06885125488042831,
0.01032009907066822,
0.04903474822640419,
-0.019191984087228775,
-0.034254077821969986,
0.03755578771233559,
-0.05579061806201935,
0.023749301210045815,
-0.008179731667041779,
0.016421977430582047,
-0.0747135654091835,
-0.0018436749232932925,
0.002074170159175992,
0.0033487987238913774,
-0.06290920078754425,
-0.009212789125740528,
0.051446299999952316,
-0.0032353282440453768,
-0.0016414348501712084,
0.04959510266780853,
-0.0878073126077652,
-6.344243663091675e-33,
0.0775606706738472,
-0.02357017807662487,
-0.07831119000911713,
-0.011652814224362373,
-0.040630534291267395,
0.014651956036686897,
-0.007875424809753895,
-0.06442268937826157,
-0.04560296609997749,
-0.11289357393980026,
-0.049792464822530746,
-0.03877616301178932,
0.024602055549621582,
0.02828226611018181,
-0.008644488640129566,
-0.01766466535627842,
-0.05472514033317566,
-0.07680460065603256,
0.03152892738580704,
0.02880185842514038,
-0.032212261110544205,
0.0721156895160675,
0.07862120866775513,
0.10147522389888763,
-0.06681222468614578,
-0.01931042969226837,
0.020154276862740517,
-0.014784893952310085,
-0.06330804526805878,
-0.03503313660621643,
0.013372392393648624,
-0.052591197192668915,
-0.046121995896101,
-0.03426182642579079,
-0.022572500631213188,
0.04728558659553528,
-0.040590301156044006,
0.0002350823924643919,
0.055736243724823,
-0.06563366949558258,
0.029222166165709496,
-0.020240185782313347,
-0.05879213288426399,
0.017042923718690872,
-0.012092530727386475,
0.021006429567933083,
0.035360611975193024,
-0.016291072592139244,
-0.0039412882179021835,
-0.02638307400047779,
0.029480479657649994,
-0.015658767893910408,
0.0034150825813412666,
0.0907849371433258,
-0.008111857809126377,
0.04855144023895264,
0.037824805825948715,
0.005051040556281805,
-0.059765178710222244,
0.008010798133909702,
0.12173718959093094,
-0.053713731467723846,
-0.0272587351500988,
0.008936439640820026,
-0.03196663036942482,
0.0016035398002713919,
0.03844786435365677,
0.06850644946098328,
0.0175005029886961,
-0.03315866366028786,
0.04480881989002228,
-0.07666076719760895,
0.006803243886679411,
0.03295581042766571,
0.015580588020384312,
0.017328141257166862,
0.04382653906941414,
-0.036036860197782516,
-0.013694502413272858,
0.10176414996385574,
-0.10084695369005203,
0.1756490021944046,
-0.07795096188783646,
0.05302424728870392,
0.04042375832796097,
0.04777182638645172,
0.03669296205043793,
0.01945740357041359,
0.01036787312477827,
0.07268137484788895,
0.0396101251244545,
-0.02176995389163494,
-0.013487057760357857,
0.049206607043743134,
0.002299735089763999,
-4.568313372033117e-8,
0.09752364456653595,
0.0033782687969505787,
-0.09175796806812286,
0.04804472252726555,
-0.0104893883690238,
0.006415464449673891,
-0.04604382812976837,
-0.022125335410237312,
-0.0395071841776371,
0.03503649681806564,
-0.07262449711561203,
-0.031025756150484085,
-0.06404143571853638,
0.0026578144170343876,
0.08262878656387329,
-0.0210658460855484,
-0.021940764039754868,
0.06559266895055771,
-0.004564718343317509,
-0.12507352232933044,
-0.03524140268564224,
-0.06450655311346054,
-0.018814321607351303,
-0.019758302718400955,
-0.11941659450531006,
0.016981875523924828,
0.09047649800777435,
-0.09673428535461426,
-0.027626963332295418,
0.016361145302653313,
-0.04467608034610748,
-0.04336205869913101,
-0.056244079023599625,
0.06027435138821602,
0.026363831013441086,
-0.01230837032198906,
-0.09841656684875488,
0.027886593714356422,
0.011895518749952316,
-0.019095364958047867,
-0.04256964847445488,
-0.008965844288468361,
-0.0118305254727602,
-0.011626863852143288,
-0.09363754093647003,
0.08978254348039627,
0.008509472012519836,
0.13506075739860535,
-0.00005828298526466824,
0.0559181347489357,
-0.006446354556828737,
0.009587380103766918,
0.043413590639829636,
0.07818154990673065,
0.0438912957906723,
0.007916517555713654,
-0.00878408458083868,
-0.08279936760663986,
-0.056699737906455994,
0.016885941848158836,
0.002391538815572858,
0.0653689056634903,
0.022783834487199783,
0.009875168092548847
] | 0.084202
|
should select an appropriate Windows service account for each HostProcess container, aiming to limit the degree of privileges so as to avoid accidental (or even malicious) damage to the host. The LocalSystem service account has the highest level of privilege of the three and should be used only if absolutely necessary. Where possible, use the LocalService service account as it is the least privileged of the three options. ### Local accounts {#local-accounts} If configured, HostProcess containers can also run as local user accounts which allows for node operators to give fine-grained access to workloads. To run HostProcess containers as a local user; A local usergroup must first be created on the node and the name of that local usergroup must be specified in the `runAsUserName` field in the deployment. Prior to initializing the HostProcess container, a new \*\*ephemeral\*\* local user account to be created and joined to the specified usergroup, from which the container is run. This provides a number a benefits including eliminating the need to manage passwords for local user accounts. An initial HostProcess container running as a service account can be used to prepare the user groups for later HostProcess containers. {{< note >}} Running HostProcess containers as local user accounts requires containerd v1.7+ {{< /note >}} Example: 1. Create a local user group on the node (this can be done in another HostProcess container). ```cmd net localgroup hpc-localgroup /add ``` 1. Grant access to desired resources on the node to the local usergroup. This can be done with tools like [icacls](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/icacls). 1. Set `runAsUserName` to the name of the local usergroup for the pod or individual containers. ```yaml securityContext: windowsOptions: hostProcess: true runAsUserName: hpc-localgroup ``` 1. Schedule the pod! ## Base Image for HostProcess Containers HostProcess containers can be built from any of the existing [Windows Container base images](https://learn.microsoft.com/virtualization/windowscontainers/manage-containers/container-base-images). Additionally a new base mage has been created just for HostProcess containers! For more information please check out the [windows-host-process-containers-base-image github project](https://github.com/microsoft/windows-host-process-containers-base-image#overview). ## Troubleshooting HostProcess containers - HostProcess containers fail to start with `failed to create user process token: failed to logon user: Access is denied.: unknown` Ensure containerd is running as `LocalSystem` or `LocalService` service accounts. User accounts (even Administrator accounts) do not have permissions to create logon tokens for any of the supported [user accounts](#choosing-a-user-account).
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/create-hostprocess-pod.md
|
[
0.020526139065623283,
0.02051345445215702,
-0.033724140375852585,
-0.032643191516399384,
-0.0243076104670763,
0.0025416819844394922,
0.05035344511270523,
0.0049445233307778835,
0.0006161434575915337,
0.07630935311317444,
-0.07722381502389908,
-0.054804764688014984,
0.03488703817129135,
0.02258673869073391,
-0.004356310237199068,
0.004360676277428865,
0.07470706850290298,
0.04704371839761734,
-0.003493787720799446,
-0.016615405678749084,
-0.06219849735498428,
-0.09732817858457565,
-0.0011619189754128456,
0.025316888466477394,
-0.04661044105887413,
0.014284933917224407,
-0.08313632756471634,
-0.004828667268157005,
0.015390250831842422,
0.04402595013380051,
-0.020521631464362144,
-0.06352505832910538,
0.010553771629929543,
-0.012695775367319584,
0.06177327781915665,
0.12006738781929016,
0.02229720540344715,
-0.013174895197153091,
-0.1157931312918663,
-0.005281596910208464,
0.07622053474187851,
0.029029017314314842,
-0.10571739822626114,
-0.0066397651098668575,
-0.08162641525268555,
-0.02504287101328373,
0.017439261078834534,
-0.03082641400396824,
-0.035412393510341644,
0.006295741535723209,
0.07165711373090744,
0.0021292713936418295,
0.06411150842905045,
0.02633935958147049,
-0.07832468301057816,
-0.026575172320008278,
0.07739221304655075,
-0.0036172845866531134,
0.0695742592215538,
-0.016208764165639877,
-0.04629608243703842,
-0.027841825038194656,
0.0051033990457654,
-0.015856023877859116,
0.05353387072682381,
0.03086089715361595,
-0.06304347515106201,
-0.05927615985274315,
-0.011776686646044254,
-0.013868113048374653,
-0.05448973923921585,
0.06630370765924454,
-0.031675681471824646,
0.0172862745821476,
-0.01703016646206379,
0.019915008917450905,
-0.005618294235318899,
-0.023776020854711533,
-0.013132646679878235,
-0.03372443839907646,
0.06074894964694977,
0.058816034346818924,
-0.010731053538620472,
-0.06333525478839874,
-0.11074360460042953,
0.018597759306430817,
-0.055928561836481094,
-0.06317335367202759,
0.08167769014835358,
0.03593156114220619,
0.05483260378241539,
0.04783733934164047,
0.0025817889254540205,
-0.07827165722846985,
0.14424778521060944,
-0.017184793949127197,
-0.01760195568203926,
-0.03866281360387802,
0.012370049022138119,
-0.03412778675556183,
0.03325982764363289,
-0.060219649225473404,
0.06240666285157204,
0.048400599509477615,
0.07326124608516693,
0.009799743071198463,
-0.04077565670013428,
-0.004012754652649164,
0.007191170938313007,
-0.026276303455233574,
0.005549338646233082,
0.06759946048259735,
-0.054472606629133224,
0.030668430030345917,
-0.009001615457236767,
0.023694748058915138,
0.03034135513007641,
-0.049016039818525314,
-0.027779018506407738,
0.027646837756037712,
-0.03315812721848488,
-0.08185827732086182,
0.03789600357413292,
-0.0640110895037651,
0.0027848246973007917,
0.003413387108594179,
-0.1043504923582077,
5.120329230591079e-33,
-0.04197028651833534,
-0.0549747534096241,
0.046403396874666214,
0.08048802614212036,
0.16225609183311462,
-0.042537059634923935,
0.003542304504662752,
-0.08664193004369736,
-0.010963482782244682,
-0.0495183989405632,
-0.06841344386339188,
0.004386921413242817,
0.0679885596036911,
-0.052404314279556274,
0.07101380825042725,
0.03322982043027878,
0.011032529175281525,
0.03072977066040039,
0.060750316828489304,
0.062300097197294235,
-0.013916372321546078,
-0.05007876828312874,
-0.013678417541086674,
0.025801531970500946,
0.02080838568508625,
-0.11726167798042297,
0.011957874521613121,
-0.012431967072188854,
0.07698244601488113,
-0.007797727826982737,
0.03575599566102028,
-0.028103403747081757,
0.03729034587740898,
0.09262862056493759,
-0.02818363904953003,
0.03379295766353607,
0.04207559674978256,
0.00473063113167882,
-0.00003667430064524524,
-0.04771385341882706,
-0.015131470747292042,
-0.022553622722625732,
0.07694202661514282,
-0.014757940545678139,
-0.009853670373558998,
-0.06940644234418869,
0.002635069889947772,
0.007067485712468624,
0.010354885831475258,
0.10170390456914902,
0.04770695045590401,
-0.019595183432102203,
-0.018354980275034904,
-0.01780226081609726,
0.045437030494213104,
-0.013279395177960396,
0.05266677588224411,
-0.07517849653959274,
-0.006319002248346806,
-0.06969880312681198,
-0.04039764031767845,
-0.0061259143985807896,
-0.038801077753305435,
0.05436478555202484,
0.014049089513719082,
-0.101567342877388,
0.06260662525892258,
0.0470757856965065,
-0.0024511327501386404,
0.06616534292697906,
-0.050428036600351334,
0.059272706508636475,
-0.02088923193514347,
0.04967740178108215,
-0.06754302978515625,
0.04178014025092125,
0.04960517957806587,
-0.0225434061139822,
-0.040605317801237106,
0.06282465904951096,
0.0026598889380693436,
-0.0323241725564003,
-0.09080170840024948,
0.031494300812482834,
-0.0948784127831459,
-0.027524802833795547,
-0.05800740793347359,
-0.0012726509012281895,
0.053447045385837555,
-0.04152652621269226,
0.10574210435152054,
0.01082692015916109,
0.09097578376531601,
0.06140676885843277,
-0.14198246598243713,
-6.57816703890531e-33,
0.014272786676883698,
-0.05307864025235176,
-0.00014932815975043923,
-0.037013694643974304,
0.009856638498604298,
0.0526580773293972,
-0.000024515127734048292,
-0.09036722034215927,
-0.07225047051906586,
-0.06518134474754333,
-0.08890874683856964,
0.004100401885807514,
-0.01780131086707115,
0.0204024538397789,
-0.0198429673910141,
0.031347617506980896,
0.012771574780344963,
0.015359270386397839,
0.06914282590150833,
0.019477957859635353,
0.007830632850527763,
0.09153539687395096,
0.043525248765945435,
0.05719374492764473,
-0.05161755159497261,
-0.020608821883797646,
-0.041215647011995316,
-0.01567208394408226,
-0.06560313701629639,
-0.044102855026721954,
0.031890109181404114,
-0.06577038764953613,
0.047571681439876556,
-0.059874702244997025,
-0.051967818289995193,
-0.009376706555485725,
-0.011201098561286926,
0.051784440875053406,
-0.03703664243221283,
0.0029961809050291777,
0.034956492483615875,
-0.0722580999135971,
-0.023976793512701988,
-0.021194403991103172,
-0.02496700920164585,
0.03986743092536926,
-0.012136958539485931,
-0.04856514185667038,
-0.07357628643512726,
0.09532516449689865,
-0.08466643840074539,
-0.06175289303064346,
0.03983238711953163,
0.04775749519467354,
-0.050557591021060944,
-0.021622925996780396,
0.028606068342924118,
-0.017813963815569878,
0.05326644331216812,
-0.0067884065210819244,
0.15871520340442657,
-0.04477247968316078,
-0.011460455134510994,
0.11392761021852493,
-0.10927846282720566,
0.07243621349334717,
0.014374424703419209,
0.05123716592788696,
-0.09225352108478546,
0.03396182134747505,
-0.05382341146469116,
-0.05929587781429291,
-0.045367076992988586,
0.03230229765176773,
-0.06669208407402039,
-0.04892277717590332,
0.03133348003029823,
-0.07921391725540161,
-0.0021029033232480288,
0.02979356423020363,
-0.030261075124144554,
0.04708028584718704,
-0.056142255663871765,
-0.02187803015112877,
-0.04009499028325081,
-0.09258614480495453,
0.08716296404600143,
-0.0024346497375518084,
0.029542172327637672,
0.02273862063884735,
-0.019908703863620758,
-0.03887985646724701,
-0.06799096614122391,
0.015291149728000164,
0.024778814986348152,
-5.3850698122914764e-8,
0.010278605856001377,
0.03520895913243294,
-0.05985596776008606,
0.018289079889655113,
-0.10386931896209717,
0.008983349427580833,
-0.016947124153375626,
0.014568448066711426,
0.05668123438954353,
0.08075439184904099,
-0.02223152481019497,
-0.037689995020627975,
0.003549771849066019,
-0.10682419687509537,
0.057742487639188766,
0.03908903896808624,
-0.006435527931898832,
0.014681089669466019,
-0.00374507624655962,
-0.03669256344437599,
0.0013880229089409113,
0.04247535765171051,
0.05026906728744507,
0.03624284639954567,
-0.042094647884368896,
0.07439451664686203,
0.026875585317611694,
-0.04226234555244446,
-0.013934221118688583,
0.0410880483686924,
-0.032962772995233536,
0.014951396733522415,
-0.03082946501672268,
0.09605491161346436,
-0.06115857884287834,
0.028637554496526718,
-0.10830806940793991,
-0.001735311932861805,
0.006727186497300863,
0.011663799174129963,
-0.03739273175597191,
0.03586320951581001,
0.04429248720407486,
-0.0009908068459481,
-0.012336482293903828,
0.035329725593328476,
-0.019290529191493988,
0.05561620369553566,
0.04733461141586304,
0.05416504666209221,
0.013135978020727634,
-0.007815683260560036,
0.014598142355680466,
0.13665661215782166,
0.07548829913139343,
0.0391203910112381,
-0.0107216602191329,
0.01151360385119915,
0.06027577072381973,
0.04527396336197853,
-0.04422835260629654,
0.0925220251083374,
0.0035094136837869883,
-0.006797092966735363
] | 0.026579
|
Many applications rely on configuration which is used during either application initialization or runtime. Most times, there is a requirement to adjust values assigned to configuration parameters. ConfigMaps are a Kubernetes mechanism that let you inject configuration data into application {{< glossary\_tooltip text="pods" term\_id="pod" >}}. The ConfigMap concept allow you to decouple configuration artifacts from image content to keep containerized applications portable. For example, you can download and run the same {{< glossary\_tooltip text="container image" term\_id="image" >}} to spin up containers for the purposes of local development, system test, or running a live end-user workload. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You need to have the `wget` tool installed. If you have a different tool such as `curl`, and you do not have `wget`, you will need to adapt the step that downloads example data. ## Create a ConfigMap You can use either `kubectl create configmap` or a ConfigMap generator in `kustomization.yaml` to create a ConfigMap. ### Create a ConfigMap using `kubectl create configmap` Use the `kubectl create configmap` command to create ConfigMaps from [directories](#create-configmaps-from-directories), [files](#create-configmaps-from-files), or [literal values](#create-configmaps-from-literal-values): ```shell kubectl create configmap ``` where \ is the name you want to assign to the ConfigMap and \ is the directory, file, or literal value to draw the data from. The name of a ConfigMap object must be a valid [DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). When you are creating a ConfigMap based on a file, the key in the \ defaults to the basename of the file, and the value defaults to the file content. You can use [`kubectl describe`](/docs/reference/generated/kubectl/kubectl-commands/#describe) or [`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to retrieve information about a ConfigMap. #### Create a ConfigMap from a directory {#create-configmaps-from-directories} You can use `kubectl create configmap` to create a ConfigMap from multiple files in the same directory. When you are creating a ConfigMap based on a directory, kubectl identifies files whose filename is a valid key in the directory and packages each of those files into the new ConfigMap. Any directory entries except regular files are ignored (for example: subdirectories, symlinks, devices, pipes, and more). {{< note >}} Each filename being used for ConfigMap creation must consist of only acceptable characters, which are: letters (`A` to `Z` and `a` to `z`), digits (`0` to `9`), '-', '\_', or '.'. If you use `kubectl create configmap` with a directory where any of the file names contains an unacceptable character, the `kubectl` command may fail. The `kubectl` command does not print an error when it encounters an invalid filename. {{< /note >}} Create the local directory: ```shell mkdir -p configure-pod-container/configmap/ ``` Now, download the sample configuration and create the ConfigMap: ```shell # Download the sample files into `configure-pod-container/configmap/` directory wget https://kubernetes.io/examples/configmap/game.properties -O configure-pod-container/configmap/game.properties wget https://kubernetes.io/examples/configmap/ui.properties -O configure-pod-container/configmap/ui.properties # Create the ConfigMap kubectl create configmap game-config --from-file=configure-pod-container/configmap/ ``` The above command packages each file, in this case, `game.properties` and `ui.properties` in the `configure-pod-container/configmap/` directory into the game-config ConfigMap. You can display details of the ConfigMap using the following command: ```shell kubectl describe configmaps game-config ``` The output is similar to this: ``` Name: game-config Namespace: default Labels: Annotations: Data ==== game.properties: ---- enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ui.properties: ---- color.good=purple color.bad=yellow allow.textmode=true how.nice.to.look=fairlyNice ``` The `game.properties` and `ui.properties` files in the `configure-pod-container/configmap/` directory are represented in the `data` section of the ConfigMap. ```shell kubectl get configmaps game-config -o yaml ``` The output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2022-02-18T18:52:05Z name: game-config namespace: default resourceVersion: "516" uid: b4952dc3-d670-11e5-8cd0-68f728db1985
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
-0.012571363709867,
0.014030574820935726,
0.03283979743719101,
-0.017895247787237167,
-0.03743277117609978,
-0.05336456745862961,
0.044663023203611374,
0.027024317532777786,
0.009566377848386765,
0.02918383665382862,
-0.005043965298682451,
-0.031385116279125214,
0.024523884057998657,
-0.05055370554327965,
0.05199573561549187,
-0.003879867261275649,
0.0575886070728302,
0.004556741565465927,
-0.04481710121035576,
-0.03817029297351837,
0.009699787944555283,
0.018524043262004852,
-0.0020865127444267273,
-0.0032614986412227154,
-0.04799586161971092,
0.05979561060667038,
-0.038317445665597916,
-0.023792682215571404,
0.0420091487467289,
0.016803031787276268,
-0.02848152443766594,
0.04502899572253227,
-0.06996745616197586,
0.071100153028965,
0.0490572527050972,
0.10740295052528381,
0.016070576384663582,
-0.03698474541306496,
-0.0615072026848793,
-0.005532580427825451,
0.02666771598160267,
-0.020349837839603424,
-0.09334703534841537,
0.0034316659439355135,
-0.011227858252823353,
0.008644591085612774,
-0.007613135036081076,
-0.05916072800755501,
0.01917649805545807,
-0.02055998146533966,
-0.02488294616341591,
-0.10409098118543625,
0.04350091516971588,
0.01019363198429346,
0.057780321687459946,
0.03625987842679024,
-0.000587420305237174,
0.0701226070523262,
0.0962410718202591,
0.05689898133277893,
0.022501066327095032,
-0.029645131900906563,
-0.0012411053758114576,
0.012124747969210148,
0.050738535821437836,
0.009828395210206509,
0.02560151368379593,
0.010461822152137756,
0.07103412598371506,
-0.07837164402008057,
-0.014632263220846653,
-0.00782658439129591,
0.028508437797427177,
-0.06291774660348892,
-0.031918253749608994,
0.0171633530408144,
-0.06459913402795792,
0.029153523966670036,
-0.025754662230610847,
-0.08413168042898178,
0.06805884838104248,
0.09740298986434937,
0.08632733672857285,
0.061834875494241714,
-0.02641749195754528,
-0.048861581832170486,
0.01887465827167034,
-0.0407702811062336,
0.0713111013174057,
0.0019517772598192096,
0.010264601558446884,
-0.12706443667411804,
-0.016919231042265892,
-0.14310146868228912,
0.08872881531715393,
-0.00662188557907939,
0.016582723706960678,
-0.05864465981721878,
-0.010230423882603645,
-0.018266888335347176,
0.015750175341963768,
-0.05704323202371597,
0.0651918426156044,
-0.017275463789701462,
0.048700250685214996,
-0.10078584402799606,
-0.04165404289960861,
-0.04554742947220802,
-0.005308608524501324,
0.06703553348779678,
-0.05479609966278076,
0.02738308534026146,
0.03219500184059143,
-0.009745568037033081,
-0.010522108525037766,
-0.08514378219842911,
-0.012619701214134693,
-0.04273797199130058,
0.028501082211732864,
0.0621793195605278,
0.01920662447810173,
-0.07723575830459595,
0.014171948656439781,
-0.02467717044055462,
-0.01165511179715395,
0.057063110172748566,
-0.057274457067251205,
6.996087606717281e-33,
0.07544191181659698,
-0.09185033291578293,
0.009410225786268711,
0.03213943913578987,
0.0011655091075226665,
-0.09895630180835724,
-0.003879193915054202,
-0.03807666897773743,
-0.03513965383172035,
-0.014754625037312508,
-0.039887670427560806,
0.11665219068527222,
-0.0655648410320282,
0.053699880838394165,
0.029552321881055832,
-0.008666745387017727,
-0.09809510409832001,
0.13464851677417755,
0.06572967022657394,
-0.02629844844341278,
-0.009003368206322193,
-0.08186480402946472,
-0.026961674913764,
-0.051646582782268524,
0.07883897423744202,
-0.026709482073783875,
0.026618177071213722,
-0.06332767754793167,
-0.01918216422200203,
0.007341664284467697,
0.03048963099718094,
-0.042374640703201294,
0.008108225651085377,
0.04365203529596329,
-0.12252357602119446,
-0.029076820239424706,
-0.034201785922050476,
0.002886882284656167,
-0.026104463264346123,
0.008162486366927624,
0.03545026108622551,
-0.019468093290925026,
0.02158205211162567,
-0.03701417148113251,
0.008493521250784397,
0.010059171356260777,
0.059536661952733994,
-0.0804879441857338,
0.05423896759748459,
-0.026346702128648758,
0.03569553792476654,
-0.04671486094594002,
0.01752372644841671,
-0.003657254157587886,
0.025562698021531105,
0.02299436181783676,
0.09359458833932877,
-0.1281956136226654,
-0.049242228269577026,
-0.006850967183709145,
-0.13530659675598145,
0.011903381906449795,
-0.05964108556509018,
0.024825941771268845,
0.07658454030752182,
-0.021744154393672943,
0.008717959746718407,
0.055579617619514465,
-0.01372710894793272,
0.023213235661387444,
-0.06339845806360245,
-0.016569465398788452,
-0.05642499774694443,
0.007383876480162144,
0.017188992351293564,
-0.018424201756715775,
0.0013325960608199239,
0.04564855247735977,
-0.14820857346057892,
0.04030963405966759,
0.038175635039806366,
-0.013430002145469189,
-0.04191424325108528,
0.07435694336891174,
0.016078142449259758,
-0.03028509020805359,
0.03222445026040077,
-0.062349479645490646,
-0.07482098042964935,
0.014084511436522007,
-0.0015711140586063266,
0.007198541425168514,
-0.10911981761455536,
0.030387677252292633,
-0.11980199068784714,
-7.064581458487788e-33,
0.10102099925279617,
-0.06484463810920715,
-0.0014828413259238005,
0.06494802981615067,
0.04153573140501976,
0.08067221939563751,
0.0448266863822937,
0.03357885777950287,
-0.0035968804731965065,
-0.09763652086257935,
-0.06298945099115372,
-0.0028726134914904833,
0.0057537741959095,
0.07455068081617355,
-0.09653320163488388,
-0.00445177685469389,
-0.126812145113945,
-0.0023599467240273952,
0.00965892244130373,
-0.001925910240970552,
-0.0062934961169958115,
-0.02210555411875248,
0.04934749752283096,
0.02102312073111534,
-0.07146471738815308,
-0.04193476215004921,
0.04239370673894882,
-0.0008213957189582288,
-0.047791946679353714,
-0.008391994051635265,
-0.006938388105481863,
-0.03254949674010277,
-0.0009716371423564851,
-0.0044579352252185345,
-0.004648403264582157,
-0.04056725278496742,
-0.0063973902724683285,
0.03181644529104233,
-0.03569282591342926,
0.04566457122564316,
0.06445863842964172,
0.03902045264840126,
-0.06583456695079803,
-0.06764334440231323,
-0.04240436106920242,
0.0022438368760049343,
-0.04160076752305031,
-0.0634738877415657,
-0.028443090617656708,
-0.04625145345926285,
0.03152814880013466,
-0.0018754721386358142,
-0.05379747971892357,
-0.0012314276536926627,
-0.04585319012403488,
0.030176835134625435,
-0.009535180404782295,
0.008317963220179081,
-0.035330597311258316,
0.027509767562150955,
0.04584571346640587,
-0.08829469978809357,
0.050728730857372284,
-0.02925002947449684,
-0.03204717859625816,
0.017753949388861656,
-0.001443846384063363,
-0.006720403674989939,
-0.07833459973335266,
0.032920368015766144,
-0.010696114972233772,
-0.0952988713979721,
0.09008697420358658,
0.004189420025795698,
0.002987376181408763,
-0.0350530743598938,
0.06271716207265854,
-0.0536976233124733,
0.09267817437648773,
-0.054172731935977936,
0.01593226008117199,
0.06731745600700378,
-0.0318257212638855,
0.04862622916698456,
0.02600063942372799,
0.048708606511354446,
0.032298993319272995,
0.10347400605678558,
0.09539280086755753,
0.05326971039175987,
0.02294238843023777,
0.005507453344762325,
0.006556272506713867,
0.16598652303218842,
-0.01043801661580801,
-6.170102295754987e-8,
0.0203227736055851,
0.07738251239061356,
-0.002784124808385968,
0.07274486869573593,
-0.05856109410524368,
0.023395808413624763,
0.06613464653491974,
0.03182419762015343,
0.011701957322657108,
-0.007757794577628374,
-0.030838262289762497,
0.03346598520874977,
-0.10264486819505692,
0.06793806701898575,
0.012443182989954948,
0.03754017502069473,
0.001299635972827673,
0.04782398045063019,
0.0019181518582627177,
-0.07446661591529846,
-0.038348305970430374,
-0.003957994747906923,
0.0020500922109931707,
0.059192318469285965,
0.06181846186518669,
0.042680978775024414,
0.08290421962738037,
0.031052619218826294,
0.045470353215932846,
0.025994552299380302,
-0.01359960250556469,
0.0101984404027462,
-0.058402229100465775,
0.09436316788196564,
-0.054399289190769196,
0.013984901830554008,
-0.1392768770456314,
0.02988358959555626,
0.06976793706417084,
0.0026771773118525743,
-0.03919488564133644,
-0.0017130353953689337,
-0.05766303092241287,
-0.04801327362656593,
-0.028885332867503166,
0.08113373070955276,
0.002549127209931612,
0.0877225250005722,
-0.011940614320337772,
0.02210816740989685,
-0.018539750948548317,
-0.007203125860542059,
0.024646367877721786,
0.0972907617688179,
0.02507491037249565,
0.0050293439999222755,
0.0290533360093832,
-0.01958909071981907,
0.07408880442380905,
0.05867985263466835,
-0.03399776294827461,
0.00666129169985652,
0.004784850869327784,
0.03439624607563019
] | 0.133431
|
how.nice.to.look=fairlyNice ``` The `game.properties` and `ui.properties` files in the `configure-pod-container/configmap/` directory are represented in the `data` section of the ConfigMap. ```shell kubectl get configmaps game-config -o yaml ``` The output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2022-02-18T18:52:05Z name: game-config namespace: default resourceVersion: "516" uid: b4952dc3-d670-11e5-8cd0-68f728db1985 data: game.properties: | enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ui.properties: | color.good=purple color.bad=yellow allow.textmode=true how.nice.to.look=fairlyNice ``` #### Create ConfigMaps from files You can use `kubectl create configmap` to create a ConfigMap from an individual file, or from multiple files. For example, ```shell kubectl create configmap game-config-2 --from-file=configure-pod-container/configmap/game.properties ``` would produce the following ConfigMap: ```shell kubectl describe configmaps game-config-2 ``` where the output is similar to this: ``` Name: game-config-2 Namespace: default Labels: Annotations: Data ==== game.properties: ---- enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ``` You can pass in the `--from-file` argument multiple times to create a ConfigMap from multiple data sources. ```shell kubectl create configmap game-config-2 --from-file=configure-pod-container/configmap/game.properties --from-file=configure-pod-container/configmap/ui.properties ``` You can display details of the `game-config-2` ConfigMap using the following command: ```shell kubectl describe configmaps game-config-2 ``` The output is similar to this: ``` Name: game-config-2 Namespace: default Labels: Annotations: Data ==== game.properties: ---- enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ui.properties: ---- color.good=purple color.bad=yellow allow.textmode=true how.nice.to.look=fairlyNice ``` Use the option `--from-env-file` to create a ConfigMap from an env-file, for example: ```shell # Env-files contain a list of environment variables. # These syntax rules apply: # Each line in an env file has to be in VAR=VAL format. # Lines beginning with # (i.e. comments) are ignored. # Blank lines are ignored. # There is no special handling of quotation marks (i.e. they will be part of the ConfigMap value)). # Download the sample files into `configure-pod-container/configmap/` directory wget https://kubernetes.io/examples/configmap/game-env-file.properties -O configure-pod-container/configmap/game-env-file.properties wget https://kubernetes.io/examples/configmap/ui-env-file.properties -O configure-pod-container/configmap/ui-env-file.properties # The env-file `game-env-file.properties` looks like below cat configure-pod-container/configmap/game-env-file.properties enemies=aliens lives=3 allowed="true" # This comment and the empty line above it are ignored ``` ```shell kubectl create configmap game-config-env-file \ --from-env-file=configure-pod-container/configmap/game-env-file.properties ``` would produce a ConfigMap. View the ConfigMap: ```shell kubectl get configmap game-config-env-file -o yaml ``` the output is similar to: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2019-12-27T18:36:28Z name: game-config-env-file namespace: default resourceVersion: "809965" uid: d9d1ca5b-eb34-11e7-887b-42010a8002b8 data: allowed: '"true"' enemies: aliens lives: "3" ``` Starting with Kubernetes v1.23, `kubectl` supports the `--from-env-file` argument to be specified multiple times to create a ConfigMap from multiple data sources. ```shell kubectl create configmap config-multi-env-files \ --from-env-file=configure-pod-container/configmap/game-env-file.properties \ --from-env-file=configure-pod-container/configmap/ui-env-file.properties ``` would produce the following ConfigMap: ```shell kubectl get configmap config-multi-env-files -o yaml ``` where the output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2019-12-27T18:38:34Z name: config-multi-env-files namespace: default resourceVersion: "810136" uid: 252c4572-eb35-11e7-887b-42010a8002b8 data: allowed: '"true"' color: purple enemies: aliens how: fairlyNice lives: "3" textmode: "true" ``` #### Define the key to use when creating a ConfigMap from a file You can define a key other than the file name to use in the `data` section of your ConfigMap when using the `--from-file` argument: ```shell kubectl create configmap game-config-3 --from-file== ``` where `` is the key you want to use in the ConfigMap and `` is the location of the data source file you want the key to represent. For example: ```shell kubectl create configmap game-config-3 --from-file=game-special-key=configure-pod-container/configmap/game.properties ``` would produce the following ConfigMap: ``` kubectl get configmaps game-config-3 -o yaml ``` where the output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2022-02-18T18:54:22Z name: game-config-3 namespace: default resourceVersion: "530" uid: 05f8da22-d671-11e5-8cd0-68f728db1985 data: game-special-key: | enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ``` #### Create ConfigMaps from literal values You can use `kubectl create configmap` with the `--from-literal` argument
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.016000796109437943,
0.012462451122701168,
0.0029151784256100655,
-0.006929436698555946,
0.01467079110443592,
-0.03216342255473137,
0.004268633667379618,
-0.0017319292528554797,
0.0428430438041687,
0.06884600967168808,
0.026389867067337036,
-0.10936106741428375,
0.03356708958745003,
-0.05164654180407524,
0.06671296060085297,
0.03357937932014465,
-0.00947355106472969,
-0.002551341662183404,
-0.03610832616686821,
-0.08086684346199036,
0.03248749300837517,
0.05270155146718025,
0.05097193643450737,
-0.04643796384334564,
-0.04632657766342163,
0.024137822911143303,
-0.028086362406611443,
0.0617922842502594,
-0.029112132266163826,
-0.03407072648406029,
-0.04339602217078209,
0.06849977374076843,
0.04258562624454498,
0.028918620198965073,
0.07416938245296478,
0.07756249606609344,
0.020829467102885246,
-0.07606691867113113,
-0.05715230479836464,
0.013180402107536793,
-0.025815006345510483,
-0.0010076775215566158,
-0.05875084176659584,
-0.0033952402882277966,
-0.0789971649646759,
0.02414068393409252,
-0.06758283823728561,
-0.06911243498325348,
0.01923183910548687,
-0.03680237755179405,
-0.05061321705579758,
-0.04106573387980461,
0.010074549354612827,
-0.012073463760316372,
0.14498679339885712,
0.04815666377544403,
-0.06385228037834167,
0.09847479313611984,
0.1156371608376503,
0.020854851230978966,
0.034536249935626984,
-0.026745686307549477,
0.03610675409436226,
-0.06292411684989929,
-0.011162261478602886,
-0.046743590384721756,
-0.026734208688139915,
0.028203563764691353,
0.05401868373155594,
-0.05615059658885002,
0.00003080478563788347,
-0.03905505686998367,
0.011057918891310692,
-0.0599360391497612,
-0.013412375934422016,
0.014224719256162643,
-0.008571304380893707,
0.04215351119637489,
-0.01413146685808897,
-0.1340329945087433,
-0.031459443271160126,
0.04228464141488075,
0.07354475557804108,
0.06985878944396973,
-0.012224356643855572,
0.027629796415567398,
0.0030406040605157614,
-0.068727046251297,
0.055550284683704376,
0.07418753951787949,
-0.008079105988144875,
-0.07352961599826813,
-0.02258320525288582,
-0.09387211501598358,
0.05292949080467224,
0.026025690138339996,
-0.029004016891121864,
0.007533145137131214,
-0.05507027357816696,
0.03889772295951843,
0.01722165010869503,
-0.022236471995711327,
-0.008997318334877491,
-0.038515929132699966,
0.12165146321058273,
-0.022665631026029587,
0.012440772727131844,
-0.0018126934301108122,
-0.02173745445907116,
0.07406114041805267,
-0.05071374401450157,
0.04101826623082161,
-0.023626230657100677,
-0.015411480329930782,
0.028851786628365517,
0.013055297546088696,
0.013208490796387196,
0.030480852350592613,
0.0013453812571242452,
0.007049125153571367,
0.09657958894968033,
-0.07629508525133133,
-0.04500288516283035,
0.056483495980501175,
-0.07435661554336548,
0.0363314151763916,
-0.030510252341628075,
9.98063690672836e-33,
0.11981968581676483,
-0.03191405162215233,
0.007985369302332401,
0.026259897276759148,
-0.022381361573934555,
-0.10729183256626129,
-0.03713122382760048,
0.0357598178088665,
-0.08823348581790924,
0.03392188623547554,
-0.04055694118142128,
0.0503111407160759,
-0.1359485238790512,
0.009636212140321732,
0.01075440552085638,
-0.03781955689191818,
-0.07337582856416702,
0.03352707624435425,
-0.0111461216583848,
-0.01063179038465023,
0.0011701215989887714,
-0.038965657353401184,
-0.01955309323966503,
-0.05797351896762848,
0.02281728945672512,
0.011877903714776039,
0.02658597007393837,
-0.06197323650121689,
-0.003190526505932212,
0.00014780824130866677,
0.005918685346841812,
-0.039225395768880844,
0.015276946127414703,
0.01938939094543457,
-0.0942690446972847,
-0.05520870164036751,
-0.0030382166150957346,
0.030863579362630844,
-0.14441874623298645,
0.03357440233230591,
0.011379828676581383,
0.04221402853727341,
-0.03331148996949196,
-0.07035303115844727,
0.06226033717393875,
-0.013582148589193821,
0.04623845964670181,
-0.020724203437566757,
0.10420062392950058,
0.01592276245355606,
-0.03688126802444458,
0.003463425673544407,
0.036034904420375824,
-0.029009845107793808,
0.0028409038204699755,
-0.0308611448854208,
0.08719531446695328,
-0.010082527995109558,
-0.054056305438280106,
-0.005799165926873684,
-0.05464808642864227,
0.0043517970480024815,
0.009873469360172749,
-0.02997056394815445,
0.018404526636004448,
0.015618737787008286,
0.013928775675594807,
0.048209622502326965,
-0.02596958912909031,
0.028928639367222786,
-0.030995013192296028,
0.08186500519514084,
-0.09201115369796753,
0.012649303302168846,
-0.0115037951618433,
-0.10549934208393097,
0.0356411412358284,
0.02065541036427021,
-0.07118093222379684,
-0.04267294332385063,
0.01073205191642046,
0.011797391809523106,
-0.08188284188508987,
0.08437361568212509,
-0.027868129312992096,
-0.04078248515725136,
0.055931996554136276,
0.038784246891736984,
-0.054769497364759445,
0.01743646338582039,
-0.0472392812371254,
-0.05670114979147911,
-0.07336024194955826,
-0.02044922672212124,
-0.17021623253822327,
-9.852080436418619e-33,
0.05841126665472984,
-0.06631417572498322,
-0.011184711009263992,
0.020930256694555283,
-0.007641931530088186,
0.00391779700294137,
-0.024177171289920807,
0.09290570020675659,
0.029395056888461113,
0.010629619471728802,
0.021205520257353783,
-0.010111058130860329,
0.07919314503669739,
-0.05174066498875618,
0.013940051198005676,
0.012655646540224552,
-0.08540013432502747,
-0.014830679632723331,
-0.03613484278321266,
0.015052583999931812,
-0.02410442940890789,
0.0073952688835561275,
0.06970249116420746,
0.0007448272663168609,
-0.010299468412995338,
0.02102683298289776,
0.017674520611763,
0.05583251640200615,
-0.0840325802564621,
-0.05039059743285179,
0.04205610603094101,
-0.06836608052253723,
-0.1610434353351593,
0.005857852753251791,
-0.04147534444928169,
-0.09395048022270203,
-0.03318832442164421,
0.05131353810429573,
-0.07511023432016373,
-0.0016540952492505312,
-0.006958176381886005,
0.07373147457838058,
-0.09139949083328247,
0.05298769474029541,
-0.06438729912042618,
0.056359466165304184,
0.0952553078532219,
-0.03993993625044823,
0.003833913477137685,
-0.0961557924747467,
0.10676295310258865,
-0.03371775150299072,
-0.051551856100559235,
0.03491106256842613,
-0.08957801014184952,
0.06185118108987808,
-0.011875932104885578,
0.07238596677780151,
-0.005036752671003342,
0.00955977663397789,
0.02184685319662094,
-0.10288432240486145,
-0.06021283566951752,
0.05527643859386444,
0.004824637435376644,
-0.012584313750267029,
-0.011741249822080135,
0.060962382704019547,
-0.02622053027153015,
0.0043213749304413795,
-0.01072018127888441,
-0.10231740027666092,
-0.0008236587746068835,
-0.0028385543264448643,
0.009046148508787155,
-0.025993067771196365,
0.03909226506948471,
-0.00005315073940437287,
0.09819957613945007,
0.06854499876499176,
-0.00796201266348362,
0.04575088247656822,
-0.010334263555705547,
0.013920451514422894,
0.0598735436797142,
0.04744868725538254,
0.03776050731539726,
0.11799631267786026,
0.049485526978969574,
0.08716367185115814,
-0.02749847061932087,
0.04563681781291962,
-0.007740184664726257,
0.1481882482767105,
-0.03042261116206646,
-6.259251961182599e-8,
0.04931235685944557,
-0.009973736479878426,
-0.03470997512340546,
0.07659635692834854,
0.015521117486059666,
0.016487421467900276,
0.006584356538951397,
0.05480685085058212,
-0.04612402245402336,
0.0053256903775036335,
-0.0087968111038208,
0.08306525647640228,
-0.11843564361333847,
0.023922933265566826,
0.033506736159324646,
-0.051645196974277496,
-0.04940135031938553,
0.10283907502889633,
0.0068930694833397865,
-0.011263752356171608,
-0.051142022013664246,
-0.04012797772884369,
-0.021961040794849396,
-0.010159426368772984,
0.034701406955718994,
0.06290912628173828,
0.05019749328494072,
-0.004528452176600695,
0.06506547331809998,
0.04748891294002533,
0.02833486720919609,
-0.021393978968262672,
-0.0069497753866016865,
-0.017808958888053894,
-0.03786744549870491,
0.05945982038974762,
-0.10026942193508148,
0.04439787566661835,
0.036870747804641724,
0.03281203657388687,
-0.00039320916403084993,
-0.016022775322198868,
-0.0670376569032669,
-0.0061984495259821415,
-0.06468337029218674,
-0.018526818603277206,
0.05118156597018242,
0.028333837166428566,
0.013625342398881912,
-0.009762533940374851,
-0.03138941526412964,
-0.04490366578102112,
0.005831160582602024,
0.041021060198545456,
-0.047338105738162994,
-0.00618531322106719,
0.02269868180155754,
-0.026451626792550087,
0.038906365633010864,
-0.00926468800753355,
-0.008363714441657066,
0.021401459351181984,
-0.025630131363868713,
0.02766439877450466
] | 0.1559
|
where the output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2022-02-18T18:54:22Z name: game-config-3 namespace: default resourceVersion: "530" uid: 05f8da22-d671-11e5-8cd0-68f728db1985 data: game-special-key: | enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 ``` #### Create ConfigMaps from literal values You can use `kubectl create configmap` with the `--from-literal` argument to define a literal value from the command line: ```shell kubectl create configmap special-config --from-literal=special.how=very --from-literal=special.type=charm ``` You can pass in multiple key-value pairs. Each pair provided on the command line is represented as a separate entry in the `data` section of the ConfigMap. ```shell kubectl get configmaps special-config -o yaml ``` The output is similar to this: ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2022-02-18T19:14:38Z name: special-config namespace: default resourceVersion: "651" uid: dadce046-d673-11e5-8cd0-68f728db1985 data: special.how: very special.type: charm ``` ### Create a ConfigMap from generator You can also create a ConfigMap from generators and then apply it to create the object in the cluster's API server. You should specify the generators in a `kustomization.yaml` file within a directory. #### Generate ConfigMaps from files For example, to generate a ConfigMap from files `configure-pod-container/configmap/game.properties` ```shell # Create a kustomization.yaml file with ConfigMapGenerator cat <./kustomization.yaml configMapGenerator: - name: game-config-4 options: labels: game-config: config-4 files: - configure-pod-container/configmap/game.properties EOF ``` Apply the kustomization directory to create the ConfigMap object: ```shell kubectl apply -k . ``` ``` configmap/game-config-4-m9dm2f92bt created ``` You can check that the ConfigMap was created like this: ```shell kubectl get configmap ``` ``` NAME DATA AGE game-config-4-m9dm2f92bt 1 37s ``` and also: ```shell kubectl describe configmaps/game-config-4-m9dm2f92bt ``` ``` Name: game-config-4-m9dm2f92bt Namespace: default Labels: game-config=config-4 Annotations: kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"v1","data":{"game.properties":"enemies=aliens\nlives=3\nenemies.cheat=true\nenemies.cheat.level=noGoodRotten\nsecret.code.p... Data ==== game.properties: ---- enemies=aliens lives=3 enemies.cheat=true enemies.cheat.level=noGoodRotten secret.code.passphrase=UUDDLRLRBABAS secret.code.allowed=true secret.code.lives=30 Events: ``` Notice that the generated ConfigMap name has a suffix appended by hashing the contents. This ensures that a new ConfigMap is generated each time the content is modified. #### Define the key to use when generating a ConfigMap from a file You can define a key other than the file name to use in the ConfigMap generator. For example, to generate a ConfigMap from files `configure-pod-container/configmap/game.properties` with the key `game-special-key` ```shell # Create a kustomization.yaml file with ConfigMapGenerator cat <./kustomization.yaml configMapGenerator: - name: game-config-5 options: labels: game-config: config-5 files: - game-special-key=configure-pod-container/configmap/game.properties EOF ``` Apply the kustomization directory to create the ConfigMap object. ```shell kubectl apply -k . ``` ``` configmap/game-config-5-m67dt67794 created ``` #### Generate ConfigMaps from literals This example shows you how to create a `ConfigMap` from two literal key/value pairs: `special.type=charm` and `special.how=very`, using Kustomize and kubectl. To achieve this, you can specify the `ConfigMap` generator. Create (or replace) `kustomization.yaml` so that it has the following contents: ```yaml --- # kustomization.yaml contents for creating a ConfigMap from literals configMapGenerator: - name: special-config-2 literals: - special.how=very - special.type=charm ``` Apply the kustomization directory to create the ConfigMap object: ```shell kubectl apply -k . ``` ``` configmap/special-config-2-c92b5mmcf2 created ``` ## Interim cleanup Before proceeding, clean up some of the ConfigMaps you made: ```bash kubectl delete configmap special-config kubectl delete configmap env-config kubectl delete configmap -l 'game-config in (config-4,config-5)' ``` Now that you have learned to define ConfigMaps, you can move on to the next section, and learn how to use these objects with Pods. --- ## Define container environment variables using ConfigMap data ### Define a container environment variable with data from a single ConfigMap 1. Define an environment variable as a key-value pair in a ConfigMap: ```shell kubectl create configmap special-config --from-literal=special.how=very ``` 2. Assign the `special.how` value defined in the ConfigMap to the `SPECIAL\_LEVEL\_KEY` environment variable in the Pod specification. {{% code\_sample file="pods/pod-single-configmap-env-variable.yaml" %}} Create the Pod: ```shell kubectl create -f
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.033513665199279785,
0.029081610962748528,
-0.054162316024303436,
-0.029042867943644524,
-0.02090221829712391,
-0.017894765362143517,
-0.018921492621302605,
-0.006341860163956881,
0.05037030950188637,
0.048140112310647964,
0.04379797354340553,
-0.12951870262622833,
0.042049258947372437,
-0.09256863594055176,
0.06626153737306595,
0.06736965477466583,
-0.032068733125925064,
-0.0037552411668002605,
-0.049849748611450195,
-0.11766499280929565,
0.0817006528377533,
0.026789039373397827,
0.01429757196456194,
-0.020642543211579323,
-0.0439092181622982,
-0.03131597489118576,
-0.013965168036520481,
0.05626925826072693,
0.01098284125328064,
-0.03278889134526253,
0.013620752841234207,
0.02481921575963497,
0.010924814268946648,
0.06906130909919739,
0.06759880483150482,
0.10552214086055756,
-0.0011312951100990176,
-0.08535874634981155,
-0.02633575163781643,
0.019046342000365257,
0.0022312479559332132,
-0.005125935189425945,
-0.06608054041862488,
0.007820096798241138,
-0.07260102778673172,
-0.01457804162055254,
-0.12976744771003723,
-0.004964894149452448,
0.03532351180911064,
-0.021827327087521553,
-0.052749257534742355,
-0.05463748797774315,
0.002620996907353401,
-0.02287803404033184,
0.12353888154029846,
0.00027163969934917986,
-0.107879139482975,
0.06302713602781296,
0.05824470892548561,
-0.0009088177466765046,
0.03447064012289047,
0.011660025455057621,
0.05982130020856857,
-0.08265308290719986,
-0.04013366252183914,
-0.0015350200701504946,
-0.027138030156493187,
-0.0036239982582628727,
0.0817120224237442,
0.004719379357993603,
-0.04066815599799156,
-0.05029149726033211,
-0.038310252130031586,
-0.04972460865974426,
-0.012925234623253345,
0.043191950768232346,
-0.06386204063892365,
0.07740692049264908,
-0.033126093447208405,
-0.12771017849445343,
-0.026613878086209297,
0.02839651331305504,
0.024740416556596756,
0.060216158628463745,
-0.006387481931596994,
-0.02102699689567089,
0.012906322255730629,
-0.04245089739561081,
0.09168118238449097,
0.09694254398345947,
-0.05293290317058563,
-0.08663567155599594,
0.02922716923058033,
-0.07913334667682648,
0.05548340082168579,
0.05151360109448433,
-0.0002559256099630147,
-0.02241598069667816,
-0.019959600642323494,
0.01990993693470955,
-0.012418351136147976,
0.0064482721500098705,
-0.010590224526822567,
-0.04069489240646362,
0.08365953713655472,
-0.010729029774665833,
0.009242018684744835,
-0.0003038697468582541,
-0.03894864767789841,
0.05778701230883598,
-0.03901878371834755,
0.06805858761072159,
-0.014530821703374386,
-0.06918860226869583,
0.0479026734828949,
0.06561991572380066,
0.03997517377138138,
0.03213105350732803,
0.019174780696630478,
0.043554745614528656,
0.10099317133426666,
-0.05297207459807396,
-0.05465134233236313,
0.06326533108949661,
-0.07953907549381256,
0.0077938600443303585,
-0.004310457035899162,
1.0207427970568381e-32,
0.11008631438016891,
-0.05209255591034889,
0.025533009320497513,
0.002431288128718734,
-0.05616908147931099,
-0.03639779984951019,
-0.023346420377492905,
-0.022222287952899933,
-0.08816829323768616,
0.00801040232181549,
-0.08094148337841034,
-0.008973753079771996,
-0.06348514556884766,
-0.013287733308970928,
0.015507085248827934,
-0.01694737933576107,
-0.05683744326233864,
0.015303798951208591,
0.0537983737885952,
-0.012030260637402534,
0.057580459862947464,
-0.04577336087822914,
-0.04426863044500351,
-0.058869536966085434,
0.03859705477952957,
0.02404117025434971,
0.003396334359422326,
-0.06456232070922852,
0.0032986009027808905,
0.013997568748891354,
0.004210015758872032,
-0.054116055369377136,
-0.015075471252202988,
0.007002763915807009,
-0.07595326751470566,
-0.0214253980666399,
-0.024053607136011124,
0.024110984057188034,
-0.0947912186384201,
0.045502837747335434,
0.008825420401990414,
0.011367050930857658,
-0.03306014463305473,
-0.08063126355409622,
0.08570033311843872,
-0.00928113516420126,
0.030241021886467934,
0.02224547602236271,
0.09426317363977432,
-0.026402287185192108,
-0.024012478068470955,
0.04359529912471771,
0.03388386219739914,
-0.08452857285737991,
0.051003348082304,
-0.02149190939962864,
0.13973061740398407,
-0.004983028396964073,
-0.046551622450351715,
-0.023866824805736542,
-0.07953070104122162,
-0.002230870071798563,
-0.00566094508394599,
0.02826632373034954,
0.022416671738028526,
-0.004270641133189201,
0.008242420852184296,
0.016569646075367928,
-0.04039621353149414,
0.07384958863258362,
-0.05249926447868347,
0.04068484529852867,
-0.08739689737558365,
0.005952891428023577,
-0.05447949469089508,
-0.07215958833694458,
0.042451925575733185,
-0.01878219284117222,
-0.044907182455062866,
0.002834385260939598,
-0.014800133183598518,
0.024967459961771965,
-0.08657792955636978,
0.07828057557344437,
-0.016470152884721756,
0.01498897559940815,
0.04158584028482437,
0.018476704135537148,
-0.0679880678653717,
0.036078400909900665,
-0.05942482128739357,
-0.0604204498231411,
-0.06160002946853638,
-0.05874154716730118,
-0.145019069314003,
-1.0455932619119997e-32,
0.059398628771305084,
-0.01198840793222189,
0.010854535736143589,
0.00912430975586176,
0.029823418706655502,
0.014035671018064022,
0.021556638181209564,
0.1078641265630722,
-0.0271916501224041,
0.01699345000088215,
-0.026929913088679314,
-0.03355100005865097,
0.03179123252630234,
-0.049910999834537506,
0.05105452239513397,
0.0005657661240547895,
-0.1037105992436409,
0.035571929067373276,
-0.02278665453195572,
0.03837753087282181,
-0.04817335680127144,
0.0369562990963459,
0.060371726751327515,
0.022511184215545654,
0.013391764834523201,
0.01050660852342844,
0.045400332659482956,
0.10176733136177063,
-0.08175723999738693,
-0.030430329963564873,
0.014233446680009365,
-0.018744099885225296,
-0.11993690580129623,
0.03709013760089874,
-0.039738014340400696,
-0.08623672276735306,
-0.009629067964851856,
-0.008492742665112019,
-0.05827832967042923,
0.005389547441154718,
0.0013676134403795004,
0.05323060229420662,
-0.10714798420667648,
0.02057325281202793,
-0.06345610320568085,
0.06334896385669708,
0.06914696097373962,
-0.04641009867191315,
-0.021517815068364143,
-0.08126808702945709,
0.08279011398553848,
-0.02199680171906948,
-0.08883583545684814,
0.06676387786865234,
-0.07374769449234009,
0.036451563239097595,
-0.058906178921461105,
0.07255794107913971,
-0.013457637280225754,
-0.01412908360362053,
-0.004180664196610451,
-0.08794961124658585,
0.02480870485305786,
0.03788409009575844,
0.034184373915195465,
-0.0231619942933321,
0.016518613323569298,
0.036129020154476166,
-0.06327744573354721,
0.018896371126174927,
0.01751541532576084,
-0.08357840776443481,
-0.0017918056109920144,
0.01452759001404047,
0.029613075777888298,
-0.011180936358869076,
-0.06224715709686279,
0.0235047098249197,
0.049520280212163925,
0.09005250036716461,
-0.002783015137538314,
0.031585730612277985,
0.022485343739390373,
0.060062699019908905,
0.04720470309257507,
0.02291664108633995,
0.023189986124634743,
0.17036043107509613,
0.06092143431305885,
0.09938707202672958,
-0.020908251404762268,
0.03060518205165863,
-0.05389922857284546,
0.11093977093696594,
0.016902092844247818,
-6.361301529977936e-8,
0.025177285075187683,
-0.0025264606811106205,
-0.060742564499378204,
0.054219137877225876,
0.002914595417678356,
0.035373907536268234,
-0.04009480029344559,
-0.0248903576284647,
-0.05046868324279785,
0.007298113778233528,
0.03540831059217453,
0.058999668806791306,
-0.09354705363512039,
0.03155038505792618,
0.012720982544124126,
-0.01992211863398552,
-0.025311831384897232,
0.07675985991954803,
0.026849918067455292,
-0.05286693572998047,
-0.053570084273815155,
0.014013884589076042,
-0.014927979558706284,
-0.0581241138279438,
0.03594883158802986,
0.05362886190414429,
0.02436639554798603,
0.061862535774707794,
0.05283157154917717,
0.022249775007367134,
0.05485035479068756,
-0.06192483752965927,
0.0010572541505098343,
0.0043654371984303,
-0.05799654498696327,
0.016235144808888435,
-0.07926754653453827,
0.04893217608332634,
0.03809696435928345,
0.06778731197118759,
-0.005574414040893316,
-0.004213043488562107,
-0.1158578023314476,
0.02106604352593422,
-0.0619809553027153,
0.014358448795974255,
0.018928350880742073,
0.05856329947710037,
-0.01998133957386017,
0.03566276654601097,
-0.04165761172771454,
-0.07016830146312714,
0.012434464879333973,
0.061721451580524445,
-0.0574583075940609,
0.01767277717590332,
-0.002536862390115857,
-0.02890593372285366,
0.00650820042937994,
-0.01815221458673477,
0.018206138163805008,
0.016029901802539825,
0.010660351254045963,
0.023313341662287712
] | 0.106644
|
single ConfigMap 1. Define an environment variable as a key-value pair in a ConfigMap: ```shell kubectl create configmap special-config --from-literal=special.how=very ``` 2. Assign the `special.how` value defined in the ConfigMap to the `SPECIAL\_LEVEL\_KEY` environment variable in the Pod specification. {{% code\_sample file="pods/pod-single-configmap-env-variable.yaml" %}} Create the Pod: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-single-configmap-env-variable.yaml ``` Now, the Pod's output includes environment variable `SPECIAL\_LEVEL\_KEY=very`. ### Define container environment variables with data from multiple ConfigMaps As with the previous example, create the ConfigMaps first. Here is the manifest you will use: {{% code\_sample file="configmap/configmaps.yaml" %}} \* Create the ConfigMap: ```shell kubectl create -f https://kubernetes.io/examples/configmap/configmaps.yaml ``` \* Define the environment variables in the Pod specification. {{% code\_sample file="pods/pod-multiple-configmap-env-variable.yaml" %}} Create the Pod: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-multiple-configmap-env-variable.yaml ``` Now, the Pod's output includes environment variables `SPECIAL\_LEVEL\_KEY=very` and `LOG\_LEVEL=INFO`. Once you're happy to move on, delete that Pod and ConfigMap: ```shell kubectl delete pod dapi-test-pod --now kubectl delete configmap special-config kubectl delete configmap env-config ``` ## Configure all key-value pairs in a ConfigMap as container environment variables \* Create a ConfigMap containing multiple key-value pairs. {{% code\_sample file="configmap/configmap-multikeys.yaml" %}} Create the ConfigMap: ```shell kubectl create -f https://kubernetes.io/examples/configmap/configmap-multikeys.yaml ``` \* Use `envFrom` to define all of the ConfigMap's data as container environment variables. The key from the ConfigMap becomes the environment variable name in the Pod. {{% code\_sample file="pods/pod-configmap-envFrom.yaml" %}} Create the Pod: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-envFrom.yaml ``` Now, the Pod's output includes environment variables `SPECIAL\_LEVEL=very` and `SPECIAL\_TYPE=charm`. Once you're happy to move on, delete that Pod: ```shell kubectl delete pod dapi-test-pod --now ``` ## Use ConfigMap-defined environment variables in Pod commands You can use ConfigMap-defined environment variables in the `command` and `args` of a container using the `$(VAR\_NAME)` Kubernetes substitution syntax. For example, the following Pod manifest: {{% code\_sample file="pods/pod-configmap-env-var-valueFrom.yaml" %}} Create that Pod, by running: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-env-var-valueFrom.yaml ``` That pod produces the following output from the `test-container` container: ```shell kubectl logs dapi-test-pod ``` ``` very charm ``` Once you're happy to move on, delete that Pod: ```shell kubectl delete pod dapi-test-pod --now ``` ## Add ConfigMap data to a Volume As explained in [Create ConfigMaps from files](#create-configmaps-from-files), when you create a ConfigMap using `--from-file`, the filename becomes a key stored in the `data` section of the ConfigMap. The file contents become the key's value. The examples in this section refer to a ConfigMap named `special-config`: {{% code\_sample file="configmap/configmap-multikeys.yaml" %}} Create the ConfigMap: ```shell kubectl create -f https://kubernetes.io/examples/configmap/configmap-multikeys.yaml ``` ### Populate a Volume with data stored in a ConfigMap Add the ConfigMap name under the `volumes` section of the Pod specification. This adds the ConfigMap data to the directory specified as `volumeMounts.mountPath` (in this case, `/etc/config`). The `command` section lists directory files with names that match the keys in ConfigMap. {{% code\_sample file="pods/pod-configmap-volume.yaml" %}} Create the Pod: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-volume.yaml ``` When the pod runs, the command `ls /etc/config/` produces the output below: ``` SPECIAL\_LEVEL SPECIAL\_TYPE ``` Text data is exposed as files using the UTF-8 character encoding. To use some other character encoding, use `binaryData` (see [ConfigMap object](/docs/concepts/configuration/configmap/#configmap-object) for more details). {{< note >}} If there are any files in the `/etc/config` directory of that container image, the volume mount will make those files from the image inaccessible. {{< /note >}} Once you're happy to move on, delete that Pod: ```shell kubectl delete pod dapi-test-pod --now ``` ### Add ConfigMap data to a specific path in the Volume Use the `path` field to specify the desired file path for specific ConfigMap items. In this case, the `SPECIAL\_LEVEL` item will be mounted in the `config-volume` volume at `/etc/config/keys`. {{% code\_sample file="pods/pod-configmap-volume-specific-key.yaml"
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.0749678835272789,
0.016977310180664062,
0.04355578497052193,
0.023343274369835854,
-0.02789049595594406,
-0.050237007439136505,
0.023546127602458,
0.04257417470216751,
0.004322337917983532,
0.016115298494696617,
-0.015735339373350143,
-0.12699712812900543,
0.0398101881146431,
-0.05139847844839096,
0.10525176674127579,
0.037463366985321045,
-0.017658885568380356,
0.034247417002916336,
-0.048110075294971466,
-0.043768420815467834,
0.02667267620563507,
0.02538847178220749,
0.04455982521176338,
-0.010395433753728867,
-0.06818897277116776,
-0.061384521424770355,
-0.015350664034485817,
0.03095950372517109,
0.041104353964328766,
-0.007957936264574528,
-0.011497675441205502,
0.04206569120287895,
0.005146315321326256,
0.05103740096092224,
0.07413194328546524,
0.1602454036474228,
0.022234324365854263,
-0.05086991563439369,
-0.022661542519927025,
0.008869373239576817,
0.019076792523264885,
0.03669676184654236,
-0.10115310549736023,
-0.050650276243686676,
-0.018280329182744026,
-0.020166700705885887,
-0.05894172191619873,
-0.01742151938378811,
-0.026731913909316063,
-0.03713967278599739,
-0.0009844695450738072,
-0.03265414014458656,
0.007235310040414333,
-0.019719861447811127,
0.05748368799686432,
0.05753606930375099,
-0.05439668148756027,
0.05240671709179878,
0.0844971314072609,
-0.011156409047544003,
0.008380764164030552,
-0.017850570380687714,
0.021718738600611687,
-0.10592476278543472,
0.026701711118221283,
-0.01670953258872032,
-0.06528017669916153,
0.023380354046821594,
0.05562414973974228,
0.040733955800533295,
0.009849261492490768,
-0.03124663606286049,
0.04017428681254387,
-0.12596800923347473,
-0.0354960635304451,
0.006953834090381861,
-0.04001447558403015,
0.05733257159590721,
-0.04420726001262665,
-0.0122531708329916,
-0.013478743843734264,
0.02921098843216896,
0.006428486667573452,
-0.048396289348602295,
-0.02318153902888298,
-0.0018423688597977161,
0.006344003137201071,
-0.06269797682762146,
0.004446637816727161,
0.07854192703962326,
-0.015870725736021996,
-0.10786227881908417,
0.012934001162648201,
-0.10893230885267258,
0.11219761520624161,
0.036500539630651474,
-0.021827174350619316,
-0.0326632522046566,
0.06547492742538452,
0.002816005377098918,
0.0007672823849134147,
-0.05086282640695572,
0.03024500422179699,
-0.007053243927657604,
0.09741360694169998,
-0.03351910784840584,
-0.013979040086269379,
-0.04730529710650444,
-0.045959800481796265,
0.07038385421037674,
-0.009446138516068459,
0.031391553580760956,
0.050455037504434586,
-0.002429239684715867,
0.01567942649126053,
0.05655016750097275,
0.04024307802319527,
0.005348612554371357,
0.0524401031434536,
0.09064038097858429,
0.03244682028889656,
-0.11883047968149185,
0.007299831602722406,
0.058263055980205536,
-0.05339573696255684,
0.004725689999759197,
-0.00981670431792736,
4.083187258782713e-33,
0.06809738278388977,
-0.0991625115275383,
-0.007362137082964182,
-0.018839644268155098,
0.023610685020685196,
0.023169483989477158,
-0.0012303803814575076,
-0.018110167235136032,
-0.07203114032745361,
-0.013257796876132488,
-0.023317325860261917,
0.05042396858334541,
-0.05281414836645126,
-0.004282895941287279,
-0.03347979113459587,
-0.034590426832437515,
-0.08717899769544601,
0.053466491401195526,
0.026222098618745804,
-0.038820330053567886,
0.04637564718723297,
-0.02870744839310646,
-0.06790214776992798,
0.016171982511878014,
0.029704438522458076,
-0.021347247064113617,
0.033491939306259155,
-0.0940001979470253,
-0.03194218873977661,
0.010481429286301136,
0.01932293176651001,
-0.012863827869296074,
0.04186328127980232,
0.05212680622935295,
-0.09865673631429672,
-0.036510031670331955,
0.049812547862529755,
0.07156272232532501,
-0.09157034754753113,
-0.04307243600487709,
0.01768183521926403,
0.01717626489698887,
0.037053182721138,
-0.05405447632074356,
0.005550650414079428,
-0.04567280039191246,
0.07385045289993286,
0.042262859642505646,
0.023831577971577644,
-0.030130598694086075,
-0.01920480653643608,
0.00959191843867302,
-0.005532287992537022,
-0.11807982623577118,
0.044410865753889084,
-0.05742055922746658,
0.0811324492096901,
-0.04424472898244858,
-0.04319422319531441,
-0.01963336579501629,
-0.10789581388235092,
0.03407256305217743,
-0.011605575680732727,
0.004390289541333914,
0.061432383954524994,
0.023864945396780968,
0.027988817542791367,
0.04222380369901657,
-0.0037956039886921644,
0.04941144213080406,
-0.05931752547621727,
0.030017441138625145,
-0.10742174088954926,
-0.003979074768722057,
-0.07912848889827728,
-0.02455959841609001,
0.03654194995760918,
0.012988178059458733,
-0.041316524147987366,
-0.004332745913416147,
-0.03336896002292633,
0.12694542109966278,
-0.08528992533683777,
0.10037695616483688,
0.016260989010334015,
0.00542320916429162,
0.001927541452459991,
0.007893337868154049,
-0.05554482713341713,
-0.006816260516643524,
-0.027820251882076263,
-0.031064758077263832,
-0.06924779713153839,
-0.06050915643572807,
-0.12114296108484268,
-5.3679261770986696e-33,
0.08983839303255081,
-0.030000092461705208,
0.007009335793554783,
0.021200796589255333,
-0.02212241105735302,
0.020020535215735435,
0.03386293724179268,
-0.013019287958741188,
-0.007732659112662077,
-0.01718590408563614,
-0.07632698118686676,
-0.015265170484781265,
0.0806959941983223,
0.048274967819452286,
-0.04099876433610916,
0.0002198773727286607,
-0.16381394863128662,
0.013834231533110142,
0.046409353613853455,
-0.001622081152163446,
-0.020868375897407532,
0.02164289727807045,
0.052009403705596924,
0.10818265378475189,
-0.03695860877633095,
-0.025965197011828423,
-0.011969629675149918,
0.05810459703207016,
-0.04228535294532776,
-0.005981964524835348,
-0.03386285901069641,
-0.022759296000003815,
-0.04905251786112785,
0.07626286894083023,
-0.057330455631017685,
-0.10646915435791016,
-0.055650316178798676,
0.010690770111978054,
-0.014685421250760555,
0.05651770904660225,
0.021345684304833412,
0.04544180631637573,
-0.03887080401182175,
-0.017945483326911926,
-0.04823978617787361,
0.019680669531226158,
0.07178617268800735,
-0.041956450790166855,
-0.04850773513317108,
-0.1289551705121994,
0.023980168625712395,
-0.018787702545523643,
-0.11735593527555466,
0.05486086755990982,
-0.07292909175157547,
0.023888083174824715,
-0.0764232948422432,
0.0608355775475502,
-0.050881095230579376,
-0.01032224204391241,
0.059747595340013504,
-0.08816706389188766,
0.08716246485710144,
0.06678943336009979,
-0.00550462631508708,
-0.05523780360817909,
-0.0041987658478319645,
-0.028576934710144997,
-0.06425647437572479,
-0.02382235787808895,
0.05129746347665787,
-0.07811995595693588,
0.03526107966899872,
0.028976215049624443,
0.032058555632829666,
-0.027422459796071053,
-0.03353666141629219,
0.027595538645982742,
0.0947859138250351,
0.0596393421292305,
-0.05381746590137482,
0.07163892686367035,
-0.038567621260881424,
0.02764149382710457,
0.01803971454501152,
0.05799497663974762,
0.042229652404785156,
0.16916993260383606,
0.07521848380565643,
0.10918689519166946,
0.015866532921791077,
0.017726942896842957,
-0.04665638133883476,
0.036622434854507446,
-0.0021611277479678392,
-4.747858994846865e-8,
0.029402906075119972,
0.029404528439044952,
-0.039488282054662704,
0.06064687296748161,
-0.05320402607321739,
0.02564459666609764,
0.014375153928995132,
0.0059848506934940815,
-0.039409320801496506,
0.046389684081077576,
-0.03619111329317093,
0.014924408867955208,
-0.10015319287776947,
0.028975950554013252,
-0.003411759389564395,
0.014651789329946041,
0.0017804930685088038,
0.10060017555952072,
0.006583462003618479,
-0.02477862685918808,
-0.018238432705402374,
0.03165129944682121,
0.0036679692566394806,
0.006372073199599981,
0.04936400428414345,
0.05490565672516823,
0.029057007282972336,
0.021952714771032333,
0.04472070187330246,
-0.010512949898838997,
-0.0038001579232513905,
-0.04367109760642052,
-0.032942090183496475,
-0.006783649325370789,
-0.05757614225149155,
-0.0007751635857857764,
-0.0871782973408699,
0.05625582113862038,
-0.006900621112436056,
0.043619509786367416,
-0.012888001278042793,
-0.04894830286502838,
-0.08832316845655441,
0.0015342117985710502,
-0.09019520878791809,
0.03930182009935379,
0.027418648824095726,
0.08922930806875229,
0.016856905072927475,
0.08159694075584412,
-0.0352264940738678,
-0.0508284829556942,
0.046811092644929886,
0.04652378335595131,
-0.06177503243088722,
0.0070080324076116085,
0.005808766465634108,
0.010240387171506882,
0.02153337560594082,
-0.004004483576864004,
0.011314066126942635,
0.01884949393570423,
-0.04954862222075462,
-0.0024311370216310024
] | 0.07043
|
```shell kubectl delete pod dapi-test-pod --now ``` ### Add ConfigMap data to a specific path in the Volume Use the `path` field to specify the desired file path for specific ConfigMap items. In this case, the `SPECIAL\_LEVEL` item will be mounted in the `config-volume` volume at `/etc/config/keys`. {{% code\_sample file="pods/pod-configmap-volume-specific-key.yaml" %}} Create the Pod: ```shell kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-volume-specific-key.yaml ``` When the pod runs, the command `cat /etc/config/keys` produces the output below: ``` very ``` {{< caution >}} Like before, all previous files in the `/etc/config/` directory will be deleted. {{< /caution >}} Delete that Pod: ```shell kubectl delete pod dapi-test-pod --now ``` ### Project keys to specific paths and file permissions You can project keys to specific paths. Refer to the corresponding section in the [Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/#project-secret-keys-to-specific-file-paths) guide for the syntax. You can set POSIX permissions for keys. Refer to the corresponding section in the [Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/#set-posix-permissions-for-secret-keys) guide for the syntax. ### Optional references A ConfigMap reference may be marked \_optional\_. If the ConfigMap is non-existent, the mounted volume will be empty. If the ConfigMap exists, but the referenced key is non-existent, the path will be absent beneath the mount point. See [Optional ConfigMaps](#optional-configmaps) for more details. ### Mounted ConfigMaps are updated automatically When a mounted ConfigMap is updated, the projected content is eventually updated too. This applies in the case where an optionally referenced ConfigMap comes into existence after a pod has started. Kubelet checks whether the mounted ConfigMap is fresh on every periodic sync. However, it uses its local TTL-based cache for getting the current value of the ConfigMap. As a result, the total delay from the moment when the ConfigMap is updated to the moment when new keys are projected to the pod can be as long as kubelet sync period (1 minute by default) + TTL of ConfigMaps cache (1 minute by default) in kubelet. You can trigger an immediate refresh by updating one of the pod's annotations. {{< note >}} A container using a ConfigMap as a [subPath](/docs/concepts/storage/volumes/#using-subpath) volume will not receive ConfigMap updates. {{< /note >}} ## Understanding ConfigMaps and Pods The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to [Secrets](/docs/concepts/configuration/secret/), but provides a means of working with strings that don't contain sensitive information. Users and system components alike can store configuration data in ConfigMap. {{< note >}} ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux `/etc` directory and its contents. For example, if you create a [Kubernetes Volume](/docs/concepts/storage/volumes/) from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume. {{< /note >}} The ConfigMap's `data` field contains the configuration data. As shown in the example below, this can be simple (like individual properties defined using `--from-literal`) or complex (like configuration files or JSON blobs defined using `--from-file`). ```yaml apiVersion: v1 kind: ConfigMap metadata: creationTimestamp: 2016-02-18T19:14:38Z name: example-config namespace: default data: # example of a simple property defined using --from-literal example.property.1: hello example.property.2: world # example of a complex property defined using --from-file example.property.file: |- property.1=value-1 property.2=value-2 property.3=value-3 ``` When `kubectl` creates a ConfigMap from inputs that are not ASCII or UTF-8, the tool puts these into the `binaryData` field of the ConfigMap, and not in `data`. Both text and binary data sources can be combined in one ConfigMap. If you want to view the `binaryData` keys (and their values) in a ConfigMap, you can run `kubectl get configmap -o jsonpath='{.binaryData}' `. Pods can load
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.04919851943850517,
0.014500265009701252,
0.027910644188523293,
-0.011029208078980446,
0.012091416865587234,
-0.06043987721204758,
0.030700558796525,
0.04006559029221535,
0.05362015962600708,
0.0189411249011755,
0.018763234838843346,
-0.02323147840797901,
0.04541298747062683,
-0.03644176200032234,
0.029326677322387695,
-0.013793319463729858,
-0.05297373980283737,
0.04000018164515495,
-0.036622561514377594,
-0.031530726701021194,
0.04556441679596901,
0.08024819195270538,
0.07847274839878082,
-0.00378624489530921,
-0.033012643456459045,
-0.036640461534261703,
0.0032866792753338814,
-0.001979475375264883,
-0.03009219467639923,
-0.038308437913656235,
0.01753641851246357,
0.038883619010448456,
0.0410405695438385,
0.03038744442164898,
0.051635902374982834,
0.10656095296144485,
-0.017292669042944908,
-0.07750576734542847,
-0.0004052810254506767,
-0.003557310439646244,
0.04434386268258095,
0.02448584884405136,
-0.07723097503185272,
-0.024045033380389214,
-0.04599495232105255,
0.024128735065460205,
-0.09731104224920273,
-0.07172448188066483,
-0.015790387988090515,
-0.008253422565758228,
-0.044477738440036774,
-0.05552490055561066,
0.04253808781504631,
0.01415739394724369,
0.04771225526928902,
0.05422201752662659,
-0.018625207245349884,
0.07683655619621277,
0.05857307091355324,
-0.008092506788671017,
0.05700454115867615,
-0.014228841289877892,
-0.007750315126031637,
-0.0890544205904007,
0.012326612137258053,
0.015556077472865582,
-0.049662034958601,
0.002109718509018421,
0.04767114669084549,
0.053754035383462906,
0.0704192966222763,
0.010059994645416737,
0.03639249503612518,
-0.06721542775630951,
-0.01782824471592903,
0.02194805070757866,
-0.03337473049759865,
0.048692863434553146,
-0.07300122082233429,
-0.002175348810851574,
-0.008512902073562145,
0.03179337456822395,
0.05084381252527237,
-0.022660398855805397,
-0.05588788166642189,
0.03270668908953667,
-0.034823544323444366,
-0.07412248849868774,
-0.04006776213645935,
0.010391945019364357,
-0.0271346103399992,
-0.11480660736560822,
0.011796480044722557,
-0.0851086899638176,
0.07180574536323547,
0.008355115540325642,
-0.007783873938024044,
0.037540286779403687,
0.03934317082166672,
-0.0007563684484921396,
-0.008666951209306717,
-0.024831432849168777,
-0.0181095153093338,
0.029780009761452675,
0.07238946855068207,
-0.0555940717458725,
-0.018730303272604942,
-0.0353243313729763,
-0.05534246191382408,
0.10055804252624512,
0.00033455854281783104,
-0.002005696063861251,
0.02940463274717331,
0.015659069642424583,
0.001936306362040341,
0.08365762233734131,
-0.01427022647112608,
0.07852725684642792,
-0.03658633679151535,
0.09326215088367462,
0.03067391738295555,
-0.11528719961643219,
-0.01858869194984436,
0.04968075454235077,
-0.06838754564523697,
-0.011222015134990215,
-0.011435231193900108,
1.8493068144968236e-33,
0.05588873103260994,
-0.14345717430114746,
-0.017680054530501366,
-0.008165823295712471,
0.08148705214262009,
-0.028544064611196518,
0.006162199657410383,
0.01634088344871998,
-0.039525654166936874,
-0.01639927178621292,
-0.013691412284970284,
0.06079252436757088,
-0.08064481616020203,
-0.006993821822106838,
-0.056557830423116684,
-0.07882452756166458,
-0.05018139258027077,
0.06752661615610123,
0.008036606013774872,
-0.09402420371770859,
0.07907592505216599,
-0.029341882094740868,
-0.08497610688209534,
0.012204894796013832,
0.0008165634353645146,
-0.028158850967884064,
0.04618561267852783,
-0.0697052925825119,
-0.018490009009838104,
0.011502202600240707,
-0.05777004733681679,
0.006394817493855953,
0.036705490201711655,
0.035834331065416336,
-0.15083371102809906,
-0.02311074361205101,
-0.052035074681043625,
0.059988945722579956,
-0.15402278304100037,
-0.01881391555070877,
0.10836195200681686,
0.001062406925484538,
-0.00412708381190896,
-0.011222307570278645,
0.01314395759254694,
-0.032585516571998596,
0.04958335682749748,
-0.0033105367328971624,
0.031367234885692596,
0.01335690263658762,
-0.003481652121990919,
0.00861394964158535,
0.027794379740953445,
-0.07760069519281387,
0.017807278782129288,
-0.05695287510752678,
0.031036922708153725,
-0.07532606273889542,
-0.030161501839756966,
-0.07091429084539413,
-0.03364251181483269,
0.07299915701150894,
0.03425143286585808,
0.034824930131435394,
0.0015537154395133257,
0.015796376392245293,
0.010136126540601254,
0.015328849665820599,
0.04122401773929596,
0.022432779893279076,
-0.05905678868293762,
0.005174441263079643,
-0.07542429119348526,
-0.022773217409849167,
-0.0869458019733429,
-0.05390521138906479,
0.0363587886095047,
0.004513392224907875,
-0.035443034023046494,
-0.040294937789440155,
0.031995952129364014,
0.03506585955619812,
-0.07169903069734573,
0.07917224615812302,
0.0389898344874382,
-0.013011503964662552,
0.03285956382751465,
0.0006274182815104723,
-0.0557701401412487,
-0.02130112051963806,
-0.01796770468354225,
-0.026777764782309532,
-0.0725095272064209,
-0.06469812989234924,
-0.06864378601312637,
-3.1602023188284994e-33,
0.15303759276866913,
-0.022505315020680428,
0.035059571266174316,
0.027178768068552017,
0.006084652617573738,
0.05603722855448723,
0.03990377485752106,
0.05372357368469238,
-0.002092004520818591,
-0.03861067071557045,
-0.06188516691327095,
-0.01703084073960781,
0.08943359553813934,
-0.008367263711988926,
-0.05091419070959091,
0.027619384229183197,
-0.17225390672683716,
-0.023559166118502617,
-0.025934193283319473,
0.003249548375606537,
-0.03051196224987507,
0.011123639531433582,
0.0772780179977417,
0.09600113332271576,
-0.0672854408621788,
-0.05494854226708412,
-0.006146876607090235,
0.02567342109978199,
-0.08932606875896454,
-0.01306397095322609,
-0.0073624420911073685,
0.02785559929907322,
-0.054631028324365616,
0.005386382341384888,
-0.01025740522891283,
-0.08709321171045303,
-0.02923494018614292,
0.05298132449388504,
-0.028027590364217758,
0.011841895058751106,
0.002653457224369049,
0.03560512885451317,
-0.029496701434254646,
-0.029080189764499664,
-0.05898560211062431,
0.007994935847818851,
0.12649519741535187,
-0.03911953419446945,
0.007439954672008753,
-0.06380142271518707,
0.03889550268650055,
-0.021990228444337845,
-0.07219124585390091,
0.015856871381402016,
-0.01207391545176506,
0.10417188704013824,
-0.05815991759300232,
0.02953230030834675,
-0.03450220078229904,
-0.03003837540745735,
0.065269336104393,
-0.03562870994210243,
0.033993713557720184,
0.01102155540138483,
-0.02247943915426731,
-0.07548977434635162,
-0.0004404771898407489,
0.05484326556324959,
-0.04694640636444092,
0.0064980932511389256,
0.003928435035049915,
0.037798333913087845,
0.07762109488248825,
0.053655240684747696,
0.06303457915782928,
-0.05777454748749733,
-0.058753225952386856,
-0.013276530429720879,
0.07023975998163223,
0.047332488000392914,
-0.014704211615025997,
0.0793253630399704,
-0.07612386345863342,
0.0539383664727211,
0.017921747639775276,
0.05963777005672455,
0.018781296908855438,
0.11973124742507935,
0.014864935539662838,
0.1211177334189415,
0.002333978423848748,
0.003938296344131231,
0.032136037945747375,
0.04048927128314972,
-0.0025938020553439856,
-4.650355833746289e-8,
0.050211403518915176,
0.02008403092622757,
-0.05471310392022133,
0.08298414945602417,
-0.012716143392026424,
-0.048654623329639435,
0.02452787011861801,
0.10858041048049927,
-0.06350357085466385,
0.004549046512693167,
0.01004047878086567,
0.03928283601999283,
-0.15846718847751617,
0.023051580414175987,
-0.030978834256529808,
-0.04088232293725014,
0.011840629391372204,
0.12194444984197617,
0.01738869585096836,
-0.04132426530122757,
0.009469850920140743,
0.0055370451882481575,
0.03015344962477684,
0.02116422913968563,
0.09000198543071747,
0.09965673834085464,
0.05630188807845116,
0.009867947548627853,
0.023931952193379402,
0.00028250590548850596,
-0.012752264738082886,
-0.059091754257678986,
-0.011294170282781124,
0.0275771114975214,
-0.04773957282304764,
0.008058863691985607,
-0.05281383544206619,
0.06335178017616272,
-0.034438926726579666,
0.04867949336767197,
-0.02254418097436428,
-0.03392266854643822,
-0.052994683384895325,
0.00741553446277976,
-0.11900627613067627,
-0.020621592178940773,
0.036082953214645386,
0.12865805625915527,
-0.03281634673476219,
0.06422538310289383,
-0.06898940354585648,
-0.010377706959843636,
0.0012440246064215899,
0.057611897587776184,
-0.029335198923945427,
0.0336211659014225,
0.011547417379915714,
0.037568435072898865,
-0.04248496890068054,
0.037240833044052124,
0.04390598461031914,
0.029246129095554352,
-0.0040854900144040585,
-0.02111314982175827
] | 0.094072
|
these into the `binaryData` field of the ConfigMap, and not in `data`. Both text and binary data sources can be combined in one ConfigMap. If you want to view the `binaryData` keys (and their values) in a ConfigMap, you can run `kubectl get configmap -o jsonpath='{.binaryData}' `. Pods can load data from a ConfigMap that uses either `data` or `binaryData`. ## Optional ConfigMaps You can mark a reference to a ConfigMap as \_optional\_ in a Pod specification. If the ConfigMap doesn't exist, the configuration for which it provides data in the Pod (for example: environment variable, mounted volume) will be empty. If the ConfigMap exists, but the referenced key is non-existent the data is also empty. For example, the following Pod specification marks an environment variable from a ConfigMap as optional: ```yaml apiVersion: v1 kind: Pod metadata: name: dapi-test-pod spec: containers: - name: test-container image: gcr.io/google\_containers/busybox command: ["/bin/sh", "-c", "env"] env: - name: SPECIAL\_LEVEL\_KEY valueFrom: configMapKeyRef: name: a-config key: akey optional: true # mark the variable as optional restartPolicy: Never ``` If you run this pod, and there is no ConfigMap named `a-config`, the output is empty. If you run this pod, and there is a ConfigMap named `a-config` but that ConfigMap doesn't have a key named `akey`, the output is also empty. If you do set a value for `akey` in the `a-config` ConfigMap, this pod prints that value and then terminates. You can also mark the volumes and files provided by a ConfigMap as optional. Kubernetes always creates the mount paths for the volume, even if the referenced ConfigMap or key doesn't exist. For example, the following Pod specification marks a volume that references a ConfigMap as optional: ```yaml apiVersion: v1 kind: Pod metadata: name: dapi-test-pod spec: containers: - name: test-container image: gcr.io/google\_containers/busybox command: ["/bin/sh", "-c", "ls /etc/config"] volumeMounts: - name: config-volume mountPath: /etc/config volumes: - name: config-volume configMap: name: no-config optional: true # mark the source ConfigMap as optional restartPolicy: Never ``` ## Restrictions - You must create the `ConfigMap` object before you reference it in a Pod specification. Alternatively, mark the ConfigMap reference as `optional` in the Pod spec (see [Optional ConfigMaps](#optional-configmaps)). If you reference a ConfigMap that doesn't exist and you don't mark the reference as `optional`, the Pod won't start. Similarly, references to keys that don't exist in the ConfigMap will also prevent the Pod from starting, unless you mark the key references as `optional`. - If you use `envFrom` to define environment variables from ConfigMaps, keys that are considered invalid will be skipped. The pod will be allowed to start, but the invalid names will be recorded in the event log (`InvalidVariableNames`). The log message lists each skipped key. For example: ```shell kubectl get events ``` The output is similar to this: ``` LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE 0s 0s 1 dapi-test-pod Pod Warning InvalidEnvironmentVariableNames {kubelet, 127.0.0.1} Keys [1badkey, 2alsobad] from the EnvFrom configMap default/myconfig were skipped since they are considered invalid environment variable names. ``` - ConfigMaps reside in a specific {{< glossary\_tooltip term\_id="namespace" >}}. Pods can only refer to ConfigMaps that are in the same namespace as the Pod. - You can't use ConfigMaps for {{< glossary\_tooltip text="static pods" term\_id="static-pod" >}}, because the kubelet does not support this. ## {{% heading "cleanup" %}} Delete the ConfigMaps and Pods that you made: ```bash kubectl delete configmaps/game-config configmaps/game-config-2 configmaps/game-config-3 \ configmaps/game-config-env-file kubectl delete pod dapi-test-pod --now # You might already have removed the next set kubectl delete configmaps/special-config configmaps/env-config kubectl delete configmap -l 'game-config in (config-4,config-5)' ``` Remove the `kustomization.yaml` file that you used to generate the ConfigMap:
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.06163591146469116,
0.01591307669878006,
0.027368053793907166,
0.03302648663520813,
0.019210094586014748,
-0.05692703649401665,
0.014590401202440262,
0.0051959422416985035,
0.046431295573711395,
0.001967034302651882,
0.007081575691699982,
-0.142718106508255,
0.0026089439634233713,
-0.0483894944190979,
0.08549986034631729,
0.03215090185403824,
0.020621294155716896,
0.009362297132611275,
0.021800626069307327,
-0.027915693819522858,
0.03977023437619209,
0.06932836025953293,
-0.010548796504735947,
-0.005596581380814314,
-0.026194747537374496,
0.045926533639431,
-0.03742421418428421,
0.00890357419848442,
0.0017928016604855657,
0.015821844339370728,
-0.06151406466960907,
0.022356322035193443,
0.013298649340867996,
0.08845572173595428,
0.1061401441693306,
0.09656742960214615,
0.040553122758865356,
-0.07673003524541855,
-0.04096920043230057,
0.011471825651824474,
0.005527597386389971,
0.021274741739034653,
-0.1308055967092514,
0.025126997381448746,
-0.007808083202689886,
0.01293911412358284,
-0.025097975507378578,
-0.05616401880979538,
-0.029841763898730278,
-0.007992328144609928,
-0.02280280366539955,
-0.025597071275115013,
0.05381988361477852,
0.05095473304390907,
0.07961761951446533,
0.01695590279996395,
-0.06469795852899551,
0.06136884167790413,
0.0746031403541565,
0.06806794553995132,
0.02184142917394638,
-0.03076810948550701,
0.0019579646177589893,
-0.05386194586753845,
0.008355260826647282,
-0.030562158674001694,
-0.04351961985230446,
-0.0002253609272884205,
0.07021117955446243,
-0.033125974237918854,
0.05665259063243866,
-0.03949172422289848,
0.03627491369843483,
-0.07180831581354141,
-0.028853053227066994,
0.010572261177003384,
0.0006430773646570742,
0.04761750251054764,
-0.022791875526309013,
-0.06303669512271881,
-0.01737486943602562,
0.042791418731212616,
0.04459407925605774,
0.041555751115083694,
-0.041644442826509476,
0.002865504240617156,
-0.0065856808796525,
-0.002697615884244442,
-0.028666114434599876,
0.06126261502504349,
-0.033670444041490555,
-0.10629812628030777,
-0.03239521384239197,
-0.10915078967809677,
0.10058657079935074,
0.008886842057108879,
-0.026002030819654465,
-0.03335760533809662,
0.055829133838415146,
0.019482417032122612,
-0.008213202469050884,
-0.014991569332778454,
0.003024082398042083,
0.02577468380331993,
0.051375411450862885,
-0.0655408427119255,
-0.014865724369883537,
-0.048328548669815063,
-0.05928458273410797,
0.12474003434181213,
0.017233451828360558,
0.026734165847301483,
0.009117532521486282,
-0.026520872488617897,
-0.0026519049424678087,
-0.006782268173992634,
-0.03258289769291878,
-0.006159261800348759,
-0.010028681717813015,
0.06902942061424255,
0.006231723353266716,
-0.11822322756052017,
0.04439695179462433,
0.0727493166923523,
-0.06318355351686478,
0.016081877052783966,
-0.02698475494980812,
4.2526516671850386e-33,
0.0740538090467453,
-0.09847777336835861,
0.03282471001148224,
-0.05526599660515785,
-0.024509256705641747,
-0.03055511601269245,
0.008648477494716644,
0.0014289512764662504,
-0.019182225689291954,
-0.008566678501665592,
-0.06865069270133972,
0.10370362550020218,
-0.07537659257650375,
0.016238359734416008,
-0.03792506083846092,
-0.003142730798572302,
-0.0770535096526146,
0.0310000441968441,
0.016598500311374664,
-0.024333233013749123,
0.032805319875478745,
-0.00021188946266192943,
-0.03444807976484299,
0.032544128596782684,
0.03533133864402771,
-0.041682783514261246,
-0.0006692610331811011,
-0.10547630488872528,
-0.05825059488415718,
0.031635161489248276,
-0.03632364422082901,
-0.03623339161276817,
0.06900304555892944,
0.006242414936423302,
-0.11068258434534073,
-0.04709027335047722,
-0.028139425441622734,
0.03800635412335396,
-0.17673897743225098,
-0.008678099140524864,
0.08048995584249496,
0.02790907211601734,
0.02208714559674263,
-0.09195766597986221,
-0.022324535995721817,
-0.045617710798978806,
0.08396346122026443,
-0.02791770175099373,
0.023942982777953148,
-0.004137278068810701,
0.014852139167487621,
-0.005728943273425102,
0.001624586060643196,
-0.09940414875745773,
0.04043848067522049,
-0.02258412539958954,
0.0810331404209137,
-0.09013321250677109,
-0.04576756805181503,
-0.0005157257546670735,
-0.09170804917812347,
0.003886388149112463,
0.024793021380901337,
-0.008860131725668907,
0.04221179336309433,
0.0731455460190773,
-0.022932877764105797,
0.0027127377688884735,
-0.008688080124557018,
0.0364735871553421,
-0.06612492352724075,
0.04247784614562988,
-0.09408478438854218,
0.04063437879085541,
-0.019917745143175125,
-0.017351355403661728,
-0.0068500712513923645,
0.020768070593476295,
-0.07646419107913971,
0.03919334337115288,
0.050540901720523834,
0.0280318520963192,
-0.00822507869452238,
0.09513692557811737,
-0.04424609616398811,
0.02256420999765396,
0.03915078565478325,
-0.028512030839920044,
-0.07422581315040588,
0.018082398921251297,
-0.020166853442788124,
-0.007967776618897915,
-0.16946445405483246,
-0.04279795661568642,
-0.08549370616674423,
-5.352943032229501e-33,
0.07368671894073486,
-0.04737892001867294,
0.008063963614404202,
0.007264549843966961,
-0.053398169577121735,
0.05033562704920769,
0.03733626380562782,
0.033600326627492905,
0.046877890825271606,
-0.014944653958082199,
-0.00946918036788702,
-0.050524692982435226,
0.041091736406087875,
0.03512071073055267,
-0.056699592620134354,
0.027538180351257324,
-0.17509110271930695,
-0.05737829580903053,
0.024048393592238426,
0.04471314325928688,
-0.031610023230314255,
-0.003702145302668214,
0.08338087797164917,
0.011862486600875854,
-0.039456408470869064,
-0.011403115466237068,
0.03175126016139984,
0.008987979032099247,
-0.04868098348379135,
-0.04413020983338356,
0.018900005146861076,
-0.018495775759220123,
-0.05601128563284874,
-0.007007443346083164,
-0.06080916151404381,
-0.06597254425287247,
-0.022914186120033264,
0.037385281175374985,
-0.04872794449329376,
0.0423758365213871,
-0.008885323069989681,
0.0861128494143486,
-0.0607123076915741,
-0.0020397307816892862,
-0.05052963271737099,
-0.011488583870232105,
0.02733529359102249,
0.037184324115514755,
0.01547957118600607,
-0.10325030982494354,
0.05125277489423752,
0.015471206977963448,
-0.07599534094333649,
0.04689112305641174,
-0.05660908296704292,
0.04329564422369003,
-0.04766840115189552,
0.10241785645484924,
-0.009549833834171295,
-0.014691862277686596,
0.024880845099687576,
-0.11695599555969238,
0.02605382539331913,
0.03920648992061615,
-0.024608571082353592,
-0.05495525896549225,
0.04614802077412605,
-0.011256524361670017,
-0.05280674248933792,
0.004888719879090786,
0.040703658014535904,
-0.07307732850313187,
0.029401548206806183,
-0.004321991000324488,
0.05996376648545265,
0.013088904321193695,
-0.05138534680008888,
-0.0020254491828382015,
0.09537462890148163,
0.04482397064566612,
-0.003465749556198716,
0.09333398938179016,
-0.03967412933707237,
0.09442345052957535,
0.11504162102937698,
0.05322771519422531,
0.023202426731586456,
0.10011220723390579,
0.06608414649963379,
0.1118021085858345,
0.018177339807152748,
0.038424182683229446,
-0.07426204532384872,
0.06054452434182167,
-0.03364764526486397,
-4.5249624491816576e-8,
0.05840558931231499,
0.002569356234744191,
-0.04177451878786087,
0.06736379116773605,
-0.02582905814051628,
0.025793904438614845,
0.038321252912282944,
0.035051003098487854,
-0.024797573685646057,
0.01681024394929409,
0.01990591175854206,
0.05722832307219505,
-0.14374952018260956,
0.0012134741991758347,
0.000012889403478766326,
0.007457030937075615,
0.05454215034842491,
0.03463539853692055,
0.024950044229626656,
-0.012136854231357574,
-0.03779764845967293,
0.019647791981697083,
-0.046214692294597626,
-0.021516988053917885,
0.07315435260534286,
0.07705455273389816,
0.02749631553888321,
0.05084026977419853,
0.027016350999474525,
-0.027217425405979156,
0.031298063695430756,
-0.004345632623881102,
-0.038112446665763855,
-0.03269032761454582,
-0.06334804743528366,
0.013971075415611267,
-0.04578472673892975,
0.04863328859210014,
-0.02692972868680954,
0.03592069819569588,
-0.0003253743052482605,
-0.03254711627960205,
-0.08396337926387787,
-0.007345388177782297,
-0.07918792217969894,
0.08297664672136307,
0.007654672488570213,
0.09615730494260788,
-0.024560607969760895,
0.03254598006606102,
-0.021345073357224464,
-0.07439719885587692,
0.009397439658641815,
0.07103625684976578,
-0.06781827658414841,
-0.01841362752020359,
0.012956331484019756,
-0.028159597888588905,
-0.022454984486103058,
0.012814527377486229,
0.009109226986765862,
0.018440140411257744,
-0.002760488074272871,
-0.013158944435417652
] | 0.122846
|
and Pods that you made: ```bash kubectl delete configmaps/game-config configmaps/game-config-2 configmaps/game-config-3 \ configmaps/game-config-env-file kubectl delete pod dapi-test-pod --now # You might already have removed the next set kubectl delete configmaps/special-config configmaps/env-config kubectl delete configmap -l 'game-config in (config-4,config-5)' ``` Remove the `kustomization.yaml` file that you used to generate the ConfigMap: ```bash rm kustomization.yaml ``` If you created a directory `configure-pod-container` and no longer need it, you should remove that too, or move it into the trash can / deleted files location. ```bash rm -r configure-pod-container ``` ## {{% heading "whatsnext" %}} \* Follow a real world example of [Configuring Redis using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/). \* Follow an example of [Updating configuration via a ConfigMap](/docs/tutorials/configuration/updating-configuration-via-a-configmap/).
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
|
[
0.047178056091070175,
0.010523985140025616,
0.028271857649087906,
-0.05174343287944794,
0.044049616903066635,
-0.038625117391347885,
0.031584981828927994,
-0.04125277325510979,
0.03638952970504761,
0.0458764024078846,
0.025128383189439774,
-0.043470703065395355,
-0.01570710353553295,
-0.03671636804938316,
0.041489265859127045,
-0.0010043238289654255,
-0.0661916434764862,
0.034116216003894806,
-0.032517872750759125,
0.01889798417687416,
-0.06462208181619644,
0.014904143288731575,
-0.0008988177869468927,
0.005873830057680607,
0.0009766747243702412,
0.03331946209073067,
-0.026662254706025124,
-0.002932741539552808,
-0.0863829031586647,
-0.07379559427499771,
-0.02062288299202919,
0.06348425894975662,
0.047255225479602814,
-0.025943279266357422,
0.10741426050662994,
0.1157870814204216,
-0.0032617475371807814,
-0.07809115201234818,
-0.02602439932525158,
-0.014576015062630177,
-0.0022761125583201647,
0.03653851896524429,
-0.07464457303285599,
-0.02852398157119751,
-0.0080963633954525,
0.07308479398488998,
-0.1037396714091301,
-0.07836584001779556,
0.03242482244968414,
-0.06615789979696274,
-0.018436726182699203,
0.015025556087493896,
0.03563887998461723,
-0.014337575063109398,
0.09904421865940094,
0.0366579107940197,
-0.006342514883726835,
0.10080860555171967,
0.08208724111318588,
0.0500672347843647,
0.05766330286860466,
0.03203795850276947,
-0.005380220245569944,
-0.038243379443883896,
0.008072061464190483,
-0.034498654305934906,
-0.01645754836499691,
-0.008986426517367363,
0.07359738647937775,
0.056556109338998795,
0.027727020904421806,
0.024305187165737152,
0.03790336102247238,
-0.03123375028371811,
-0.01704881526529789,
0.010839687660336494,
-0.03185565769672394,
0.04021026939153671,
-0.05978067219257355,
0.0048624188639223576,
0.007978081703186035,
0.0351402573287487,
0.04961973428726196,
-0.03136608377099037,
-0.09885796904563904,
0.029852446168661118,
-0.014617730863392353,
-0.10008452832698822,
0.055072322487831116,
0.01472144853323698,
-0.01805162988603115,
-0.06561959534883499,
0.05547124892473221,
-0.08130238950252533,
0.07251659035682678,
-0.033748239278793335,
0.010128640569746494,
0.026872260496020317,
0.004326450172811747,
0.04106004908680916,
0.0027304459363222122,
0.011286892928183079,
0.020820900797843933,
0.018157143145799637,
0.032005902379751205,
-0.04865013435482979,
-0.04636768996715546,
-0.01802695170044899,
-0.02476518601179123,
0.06411542743444443,
-0.003787327790632844,
-0.019753772765398026,
-0.0016298018163070083,
0.06850801408290863,
0.006607294548302889,
0.07308337092399597,
0.0029014849569648504,
0.05659017711877823,
-0.014979604631662369,
0.09740376472473145,
0.015096734277904034,
-0.080497607588768,
0.01253974623978138,
0.05114172399044037,
-0.08475390821695328,
0.04170531406998634,
0.0143915805965662,
4.1077811719958075e-33,
0.043821562081575394,
-0.11629262566566467,
-0.0008012805483303964,
0.02676313742995262,
0.08777021616697311,
-0.035028617829084396,
-0.008219024166464806,
0.017437715083360672,
-0.04758893698453903,
0.0024846906308084726,
-0.014941468834877014,
0.06012912467122078,
-0.08721021562814713,
0.03872554004192352,
0.05613481253385544,
-0.058952949941158295,
-0.042284008115530014,
0.02206900529563427,
0.008013593032956123,
-0.07667423039674759,
0.10615834593772888,
0.008257969282567501,
-0.06330820173025131,
0.008019630797207355,
-0.002601409098133445,
0.02932143025100231,
0.049603138118982315,
-0.06595221906900406,
-0.02900092490017414,
0.012628447264432907,
-0.03173903003334999,
-0.00648470688611269,
0.010025398805737495,
0.06992556154727936,
-0.1395985186100006,
-0.017633572220802307,
-0.0123683987185359,
0.002751472406089306,
-0.1411014199256897,
0.044880978763103485,
0.05196835845708847,
0.029311733320355415,
-0.049738846719264984,
-0.03642319142818451,
0.08668815344572067,
-0.019208991900086403,
0.08389102667570114,
-0.02865784615278244,
0.016587743535637856,
0.03312511742115021,
-0.03150074928998947,
-0.026750806719064713,
0.0620255284011364,
-0.09789863973855972,
-0.014129593968391418,
-0.027744624763727188,
0.06625670939683914,
-0.09143682569265366,
-0.05843944847583771,
-0.06260919570922852,
-0.00997907668352127,
0.05404888466000557,
0.030143383890390396,
0.002464728895574808,
0.06574918329715729,
-0.010961119085550308,
-0.01855391077697277,
0.03300308808684349,
0.037197887897491455,
0.006213544402271509,
-0.05471918731927872,
-0.0020287453662604094,
-0.03640689328312874,
0.007391183637082577,
-0.05472564697265625,
-0.029401615262031555,
0.020266620442271233,
0.012757984921336174,
-0.12203602492809296,
0.000971559202298522,
0.06617578119039536,
0.029000967741012573,
-0.0674869492650032,
0.05652724206447601,
0.028240744024515152,
-0.05062282830476761,
0.07550965249538422,
0.006385641638189554,
-0.0626220777630806,
0.09006060659885406,
-0.03260589763522148,
0.01280158944427967,
-0.09652107208967209,
-0.0406678132712841,
-0.11095944792032242,
-5.3381534765862335e-33,
0.06939162313938141,
-0.0012454934185370803,
-0.01505865529179573,
-0.023687496781349182,
-0.014596031978726387,
0.03221641853451729,
-0.03235793858766556,
0.0577813945710659,
0.015685593709349632,
-0.06633465737104416,
-0.056446488946676254,
-0.008096246980130672,
0.10796390473842621,
0.01729150488972664,
-0.10163182765245438,
0.02606724016368389,
-0.08940392732620239,
-0.03287850320339203,
-0.09216062724590302,
0.017739711329340935,
-0.0020572650246322155,
0.022802114486694336,
0.08560125529766083,
0.04938269406557083,
-0.07434893399477005,
-0.028488662093877792,
0.038172848522663116,
0.028112411499023438,
-0.05540623888373375,
0.03931505233049393,
0.046083420515060425,
-0.01612411066889763,
-0.04186099395155907,
0.05516629293560982,
0.03037797473371029,
-0.08477538824081421,
-0.03589316084980965,
0.059992335736751556,
-0.07220114022493362,
-0.054051343351602554,
-0.016427649185061455,
0.05899263545870781,
-0.06885232031345367,
-0.03911563381552696,
-0.029589887708425522,
0.03314153850078583,
0.08710548281669617,
-0.031100114807486534,
0.008206352591514587,
-0.08583223819732666,
0.004051173571497202,
-0.04081442207098007,
-0.08782707154750824,
-0.0322052463889122,
-0.08381345123052597,
0.06246466934680939,
0.0031882240436971188,
0.042064256966114044,
-0.040000054985284805,
-0.02980528399348259,
0.04935499653220177,
-0.025726115331053734,
-0.04021488502621651,
0.03493981063365936,
0.03981785848736763,
-0.04100053384900093,
0.016908906400203705,
0.046050064265728,
-0.037416454404592514,
-0.040178488940000534,
-0.02500242181122303,
0.06226509436964989,
0.047098033130168915,
0.04872377589344978,
0.029944343492388725,
-0.027635369449853897,
-0.06129022315144539,
0.03340104594826698,
0.0925007313489914,
0.04060284420847893,
-0.009409327059984207,
0.03213341534137726,
-0.0632738471031189,
-0.01646450348198414,
0.0263491440564394,
0.06047952547669411,
-0.0013654673239216208,
0.08033324033021927,
0.040660981088876724,
0.08911508321762085,
0.03082994371652603,
0.004128959961235523,
0.02280663326382637,
0.08725819736719131,
-0.023465776816010475,
-4.1119324833971405e-8,
0.09719248116016388,
-0.01303490623831749,
-0.06961321085691452,
0.12399853765964508,
0.04447535052895546,
-0.020668944343924522,
0.016745803877711296,
0.10968474298715591,
-0.05034670606255531,
-0.04996876046061516,
-0.06321322172880173,
0.08794652670621872,
-0.15183109045028687,
0.069553442299366,
0.0013685452286154032,
-0.08848258852958679,
-0.024621497839689255,
0.08759598433971405,
0.011824988760054111,
-0.0388488844037056,
-0.06213516741991043,
-0.016628123819828033,
-0.02533244527876377,
0.008487142622470856,
0.041062187403440475,
0.07101431488990784,
0.09059187769889832,
0.0062124403193593025,
0.027450574561953545,
0.04502936825156212,
0.004701853264123201,
-0.03342703729867935,
-0.043956954032182693,
0.007369231898337603,
-0.041155874729156494,
-0.01039139088243246,
-0.06816879659891129,
0.05661168694496155,
-0.021877169609069824,
0.021668769419193268,
-0.07323668152093887,
0.018588300794363022,
-0.0248565636575222,
-0.006591597106307745,
-0.11345300078392029,
-0.03060557134449482,
0.05487799644470215,
0.08493979275226593,
-0.02321021631360054,
-0.010293806903064251,
-0.05397386848926544,
0.012418254278600216,
-0.04429839551448822,
0.06161307543516159,
-0.03873351588845253,
0.004325092304497957,
-0.015626775100827217,
-0.017627714201807976,
-0.0661933422088623,
0.01167083065956831,
-0.010419035330414772,
-0.005099854432046413,
-0.009957914240658283,
-0.008094551041722298
] | 0.110492
|
{{< feature-state feature\_gate\_name="InPlacePodVerticalScaling" >}} This page explains how to change the CPU and memory resource requests and limits assigned to a container \*without recreating the Pod\*. Traditionally, changing a Pod's resource requirements necessitated deleting the existing Pod and creating a replacement, often managed by a [workload controller](/docs/concepts/workloads/controllers/). In-place Pod Resize allows changing the CPU/memory allocation of container(s) within a running Pod while potentially avoiding application disruption. \*\*Key Concepts:\*\* \* \*\*Desired Resources:\*\* A container's `spec.containers[\*].resources` represent the \*desired\* resources for the container, and are mutable for CPU and memory. \* \*\*Actual Resources:\*\* The `status.containerStatuses[\*].resources` field reflects the resources \*currently configured\* for a running container. For containers that haven't started or were restarted, it reflects the resources allocated upon their next start. \* \*\*Triggering a Resize:\*\* You can request a resize by updating the desired `requests` and `limits` in the Pod's specification. This is typically done using `kubectl patch`, `kubectl apply`, or `kubectl edit` targeting the Pod's `resize` subresource. When the desired resources don't match the allocated resources, the Kubelet will attempt to resize the container. \* \*\*Allocated Resources (Advanced):\*\* The `status.containerStatuses[\*].allocatedResources` field tracks resource values confirmed by the Kubelet, primarily used for internal scheduling logic. For most monitoring and validation purposes, focus on `status.containerStatuses[\*].resources`. If a node has pods with a pending or incomplete resize (see [Pod Resize Status](#pod-resize-status) below), the {{< glossary\_tooltip text="scheduler" term\_id="kube-scheduler" >}} uses the \*maximum\* of a container's desired requests, allocated requests, and actual requests from the status when making scheduling decisions. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} The `InPlacePodVerticalScaling` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled for your control plane and for all nodes in your cluster. The `kubectl` client version must be at least v1.32 to use the `--subresource=resize` flag. ## Pod resize status The Kubelet updates the Pod's status conditions to indicate the state of a resize request: \* `type: PodResizePending`: The Kubelet cannot immediately grant the request. The `message` field provides an explanation of why. \* `reason: Infeasible`: The requested resize is impossible on the current node (for example, requesting more resources than the node has). \* `reason: Deferred`: The requested resize is currently not possible, but might become feasible later (for example if another pod is removed). The Kubelet will retry the resize. \* `type: PodResizeInProgress`: The Kubelet has accepted the resize and allocated resources, but the changes are still being applied. This is usually brief but might take longer depending on the resource type and runtime behavior. Any errors during actuation are reported in the `message` field (along with `reason: Error`). ### How kubelet retries Deferred resizes If the requested resize is \_Deferred\_, the kubelet will periodically re-attempt the resize, for example when another pod is removed or scaled down. If there are multiple deferred resizes, they are retried according to the following priority: \* Pods with a higher Priority (based on PriorityClass) will have their resize request retried first. \* If two pods have the same Priority, resize of guaranteed pods will be retried before the resize of burstable pods. \* If all else is the same, pods that have been in the Deferred state longer will be prioritized. A higher priority resize being marked as pending will not block the remaining pending resizes from being attempted; all remaining pending resizes will still be retried even if a higher-priority resize gets deferred again. ### Leveraging `observedGeneration` Fields {{< feature-state feature\_gate\_name="PodObservedGenerationTracking" >}} \* The top-level `status.observedGeneration` field shows the `metadata.generation` corresponding to the latest pod specification that the kubelet has acknowledged. You can use this to determine the most recent resize request the kubelet has processed. \*
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
[
0.0452926941215992,
0.06317973136901855,
-0.007111167069524527,
0.09697911143302917,
0.021997934207320213,
-0.052873264998197556,
0.04440360888838768,
0.029266858473420143,
-0.032308757305145264,
0.04340284690260887,
-0.023008646443486214,
0.02757536992430687,
-0.042298462241888046,
-0.04867430403828621,
0.005221400409936905,
-0.0011302568018436432,
0.08096511662006378,
0.05091813579201698,
-0.08630809187889099,
0.022810958325862885,
0.07657362520694733,
-0.02203432098031044,
-0.0005042539560236037,
0.015877505764365196,
-0.027428675442934036,
0.02321527525782585,
-0.10550238192081451,
-0.021365193650126457,
0.02137093059718609,
-0.040520016103982925,
-0.061996180564165115,
0.03472612053155899,
0.053679827600717545,
0.003001641249284148,
0.13905008137226105,
0.0811275988817215,
0.018397456035017967,
-0.1042739599943161,
-0.04576097056269646,
-0.0719350278377533,
-0.0073792170733213425,
-0.03621675819158554,
-0.07736004889011383,
0.02362324297428131,
-0.055046066641807556,
0.018697861582040787,
-0.031945135444402695,
-0.05657552555203438,
-0.024546241387724876,
-0.06059183180332184,
0.00041589527972973883,
-0.024203725159168243,
0.052163269370794296,
0.046256404370069504,
0.06361883133649826,
0.007153207436203957,
0.08059268444776535,
0.048761818557977676,
0.0286966972053051,
0.051070138812065125,
0.04766204580664635,
-0.034986045211553574,
0.03185895085334778,
0.007094539236277342,
0.049488238990306854,
-0.06791803240776062,
0.014461350627243519,
-0.007994173094630241,
0.02440112829208374,
-0.05197453126311302,
0.02176772616803646,
0.02780330181121826,
0.0017951520858332515,
-0.023107828572392464,
0.02070035971701145,
-0.024546805769205093,
-0.03901438042521477,
0.05467097461223602,
0.02927798591554165,
-0.012955758720636368,
0.016680147498846054,
0.04125113785266876,
0.04879540205001831,
-0.08386911451816559,
-0.018575776368379593,
0.02142283506691456,
0.003699515014886856,
-0.0520625039935112,
0.03007190115749836,
-0.011125588789582253,
0.013777163811028004,
-0.049131229519844055,
0.04550541192293167,
-0.040156230330467224,
0.057902999222278595,
-0.024124672636389732,
-0.07527779787778854,
-0.09287717938423157,
-0.01969536766409874,
0.017436090856790543,
0.08051350712776184,
0.04710860922932625,
0.07935070991516113,
0.01718129590153694,
0.056565407663583755,
-0.08069658279418945,
-0.04218467324972153,
0.04153374210000038,
-0.005073618143796921,
0.030657775700092316,
0.05761680752038956,
0.02500656247138977,
-0.002045708941295743,
0.02452383190393448,
0.008637659251689911,
-0.004349936731159687,
-0.030078653246164322,
-0.005632499698549509,
0.01234674733132124,
0.04953484609723091,
0.059103284031152725,
-0.0827314630150795,
-0.0004007410316262394,
-0.02921186201274395,
-0.030284622684121132,
0.04995334893465042,
-0.0857357308268547,
2.5666131201647612e-33,
-0.014971550554037094,
-0.09209407866001129,
-0.022325271740555763,
0.028041351586580276,
0.05939193442463875,
-0.024087050929665565,
0.011509211733937263,
0.05889119207859039,
-0.017110580578446388,
-0.014619830064475536,
-0.01569513976573944,
0.07738712430000305,
-0.022588899359107018,
0.03804764151573181,
-0.005972591694444418,
-0.1261126846075058,
-0.05563803017139435,
0.10596583038568497,
0.11656932532787323,
-0.02674955688416958,
0.01991088315844536,
0.013143089599907398,
-0.07967134565114975,
-0.013678306713700294,
0.057949043810367584,
-0.01987735740840435,
-0.041971608996391296,
-0.11747036874294281,
-0.06332620978355408,
0.03324512764811516,
0.01143824215978384,
-0.024718092754483223,
-0.026879535987973213,
0.0339164137840271,
-0.036414340138435364,
-0.05554545670747757,
0.019393179565668106,
-0.03004664182662964,
-0.06693718582391739,
-0.04541066661477089,
-0.011190270073711872,
0.005614674650132656,
-0.021287333220243454,
-0.048505816608667374,
-0.015588262118399143,
-0.06006313115358353,
0.06271857768297195,
-0.07629373669624329,
-0.026219429448246956,
0.018163088709115982,
0.0046827602200210094,
0.0015421193093061447,
0.01749742217361927,
-0.04302595555782318,
0.01971115916967392,
-0.07051513344049454,
0.03201601281762123,
0.008495223708450794,
0.04209892451763153,
0.014087699353694916,
-0.07739364355802536,
-0.02502909116446972,
-0.007219509221613407,
0.008522644639015198,
0.05281858518719673,
0.0760178416967392,
0.0204190444201231,
0.03245178610086441,
-0.01691894233226776,
0.08582919090986252,
-0.07968959212303162,
0.024114733561873436,
0.023524928838014603,
0.08090165257453918,
-0.10976933687925339,
-0.07753293216228485,
0.03499472141265869,
-0.0024720479268580675,
-0.21120111644268036,
-0.018369819968938828,
-0.005246189888566732,
0.06669721007347107,
-0.025866344571113586,
0.048344068229198456,
-0.08135312050580978,
-0.0983802080154419,
0.02366659604012966,
-0.004173733294010162,
0.005318620707839727,
-0.006211993284523487,
0.04686087369918823,
-0.0183322262018919,
-0.07290627807378769,
-0.022361600771546364,
-0.13010667264461517,
-3.6353646860797154e-33,
0.056278541684150696,
-0.022086424753069878,
-0.05861850455403328,
-0.01280161365866661,
-0.047658927738666534,
-0.02194991707801819,
0.030337901785969734,
0.042716722935438156,
-0.030104918405413628,
-0.1348402351140976,
-0.07141891121864319,
-0.04120662063360214,
0.006222985684871674,
0.003993479069322348,
-0.0988532230257988,
0.062434349209070206,
-0.10955868661403656,
-0.08795155584812164,
-0.012955883517861366,
0.0723639577627182,
-0.04920581728219986,
0.02516591176390648,
0.08671358972787857,
0.07960649579763412,
-0.02237732522189617,
-0.043457772582769394,
0.05171147361397743,
-0.04599358141422272,
0.00674841832369566,
-0.06831514090299606,
0.042799849063158035,
-0.09022840857505798,
-0.0459967777132988,
0.08517656475305557,
-0.02490103244781494,
-0.05530405789613724,
-0.03249584510922432,
0.04903429001569748,
-0.024681193754076958,
0.045251380652189255,
0.10467671602964401,
-0.016940884292125702,
-0.02733111009001732,
-0.005761384032666683,
-0.03780343383550644,
0.0018504403997212648,
0.0009062727331183851,
-0.015778185799717903,
0.004805442877113819,
-0.10630723834037781,
0.029235893860459328,
-0.05689673125743866,
-0.04181958734989166,
0.06083209812641144,
0.0055099958553910255,
0.021864330396056175,
0.049515094608068466,
0.03886013105511665,
-0.03615209832787514,
0.002155667170882225,
0.08839999884366989,
-0.06978834420442581,
-0.02384510450065136,
-0.0060882167890667915,
-0.008294749073684216,
-0.013653670437633991,
-0.003591180080547929,
-0.008833792060613632,
-0.07129839807748795,
0.007399780675768852,
0.051550962030887604,
-0.013218505308032036,
0.03775668144226074,
0.06584558635950089,
-0.06503323465585709,
-0.021161383017897606,
0.04989204928278923,
-0.07531248033046722,
0.04124767705798149,
0.03010542318224907,
-0.10319989174604416,
0.08347391337156296,
-0.0285969078540802,
-0.0018323214026167989,
0.02838243544101715,
0.04882938414812088,
0.017240900546312332,
0.09600237756967545,
-0.024963445961475372,
0.02101474069058895,
-0.049829717725515366,
0.0352480374276638,
-0.061453092843294144,
0.08998539298772812,
-0.0015977632720023394,
-4.9059046602906164e-8,
0.04507433995604515,
0.01133783906698227,
0.036955758929252625,
0.08017294108867645,
0.023646917194128036,
-0.03926270455121994,
0.0981517881155014,
0.06284322589635849,
-0.022347694262862206,
0.058958735316991806,
0.0050225271843373775,
0.02668364904820919,
-0.03463973477482796,
-0.021947890520095825,
0.07376260310411453,
0.014198211953043938,
-0.024901987984776497,
0.0657670721411705,
-0.006827339064329863,
-0.10212069004774094,
-0.03635942190885544,
-0.02626652456820011,
-0.00435289042070508,
0.018072787672281265,
0.04001615196466446,
0.039740413427352905,
0.07034003734588623,
0.06897641718387604,
0.04469810798764229,
-0.002911285264417529,
0.0022576393093913794,
0.008988155983388424,
-0.018406838178634644,
0.060646116733551025,
0.0067522660829126835,
0.04770218953490257,
-0.11918129026889801,
0.065329909324646,
-0.015641605481505394,
0.029881061986088753,
-0.03422549366950989,
-0.0333927758038044,
-0.022771049290895462,
0.014540000818669796,
0.004376485012471676,
0.03913165256381035,
-0.0787171721458435,
0.11578750610351562,
0.00610702158883214,
0.024280009791254997,
0.0200974028557539,
0.0024959451984614134,
0.010915977880358696,
0.11282177269458771,
0.0035749466624110937,
0.06567030400037766,
-0.03327876329421997,
0.0034798644483089447,
-0.017345912754535675,
0.044517964124679565,
0.028438858687877655,
0.07270284742116928,
-0.015957973897457123,
-0.011316625401377678
] | 0.241116
|
if a higher-priority resize gets deferred again. ### Leveraging `observedGeneration` Fields {{< feature-state feature\_gate\_name="PodObservedGenerationTracking" >}} \* The top-level `status.observedGeneration` field shows the `metadata.generation` corresponding to the latest pod specification that the kubelet has acknowledged. You can use this to determine the most recent resize request the kubelet has processed. \* In the `PodResizeInProgress` condition, the `conditions[].observedGeneration` field indicates the `metadata.generation` of the podSpec when the current in-progress resize was initiated. \* In the `PodResizePending` condition, the `conditions[].observedGeneration` field indicates the `metadata.generation` of the podSpec when the pending resize's allocation was last attempted. ## Container resize policies You can control whether a container should be restarted when resizing by setting `resizePolicy` in the container specification. This allows fine-grained control based on resource type (CPU or memory). ```yaml resizePolicy: - resourceName: cpu restartPolicy: NotRequired - resourceName: memory restartPolicy: RestartContainer ``` \* `NotRequired`: (Default) Apply the resource change to the running container without restarting it. \* `RestartContainer`: Restart the container to apply the new resource values. This is often necessary for memory changes because many applications and runtimes cannot adjust their memory allocation dynamically. If `resizePolicy[\*].restartPolicy` is not specified for a resource, it defaults to `NotRequired`. {{< note >}} If a Pod's overall `restartPolicy` is `Never`, then any container `resizePolicy` must be `NotRequired` for all resources. You cannot configure a resize policy that would require a restart in such Pods. {{< /note >}} \*\*Example Scenario:\*\* Consider a container configured with `restartPolicy: NotRequired` for CPU and `restartPolicy: RestartContainer` for memory. \* If only CPU resources are changed, the container is resized in-place. \* If only memory resources are changed, the container is restarted. \* If \*both\* CPU and memory resources are changed simultaneously, the container is restarted (due to the memory policy). ## Limitations For Kubernetes {{< skew currentVersion >}}, resizing pod resources in-place has the following limitations: \* \*\*Resource Types:\*\* Only CPU and memory resources can be resized. \* \*\*Memory Decrease:\*\* If the memory resize restart policy is `NotRequired` (or unspecified), the kubelet will make a best-effort attempt to prevent oom-kills when decreasing memory limits, but doesn't provide any guarantees. Before decreasing container memory limits, if memory usage exceeds the requested limit, the resize will be skipped and the status will remain in an "In Progress" state. This is considered best-effort because it is still subject to a race condition where memory usage may spike right after the check is performed. \* \*\*QoS Class:\*\* The Pod's original [Quality of Service (QoS) class](/docs/concepts/workloads/pods/pod-qos/) (Guaranteed, Burstable, or BestEffort) is determined at creation and \*\*cannot\*\* be changed by a resize. The resized resource values must still adhere to the rules of the original QoS class: \* \*Guaranteed\*: Requests must continue to equal limits for both CPU and memory after resizing. \* \*Burstable\*: Requests and limits cannot become equal for \*both\* CPU and memory simultaneously (as this would change it to Guaranteed). \* \*BestEffort\*: Resource requirements (`requests` or `limits`) cannot be added (as this would change it to Burstable or Guaranteed). \* \*\*Container Types:\*\* Non-restartable {{< glossary\_tooltip text="init containers" term\_id="init-container" >}} and {{< glossary\_tooltip text="ephemeral containers" term\_id="ephemeral-container" >}} cannot be resized. [Sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) can be resized. \* \*\*Resource Removal:\*\* Resource requests and limits cannot be entirely removed once set; they can only be changed to different values. \* \*\*Operating System:\*\* Windows pods do not support in-place resize. \* \*\*Node Policies:\*\* Pods managed by [static CPU or Memory manager policies](/docs/tasks/administer-cluster/cpu-management-policies/) cannot be resized in-place. \* \*\*Swap:\*\* Pods utilizing [swap memory](/docs/concepts/architecture/nodes/#swap-memory) cannot resize memory requests unless the `resizePolicy` for memory is `RestartContainer`. These restrictions might be relaxed in future Kubernetes versions. ## Example 1: Resizing CPU without restart First,
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
[
0.02685115672647953,
0.018133610486984253,
0.061506159603595734,
0.04231957718729973,
-0.021278658881783485,
-0.021922698244452477,
-0.026465991511940956,
0.025310123339295387,
0.007835214957594872,
0.0638868436217308,
-0.041097044944763184,
-0.0029032654128968716,
-0.054466649889945984,
-0.05224551633000374,
-0.05012848973274231,
-0.019924933090806007,
0.0161027479916811,
0.03451205790042877,
-0.12084008008241653,
-0.04113270714879036,
0.05284033343195915,
-0.06928663700819016,
0.02179664373397827,
0.017569463700056076,
0.0010564018739387393,
-0.02452089451253414,
-0.08482488244771957,
-0.004087204113602638,
0.055438246577978134,
-0.05534669756889343,
-0.05038134381175041,
0.06620731949806213,
0.03301708400249481,
0.016123022884130478,
0.10713266581296921,
0.07706121355295181,
-0.0046027773059904575,
-0.09327413886785507,
-0.019190706312656403,
-0.037796903401613235,
-0.01993102766573429,
-0.05122597515583038,
-0.1348164826631546,
0.028970228508114815,
0.00691958237439394,
0.02077961154282093,
-0.0464329868555069,
-0.01794564351439476,
-0.05722137168049812,
-0.043032705783843994,
0.0272827111184597,
-0.07589785754680634,
0.05621693655848503,
0.07426648586988449,
0.09271298348903656,
0.05005834251642227,
0.03592243418097496,
0.02781582996249199,
0.0928848460316658,
0.017654918134212494,
-0.03505543991923332,
-0.038722697645425797,
0.00782262533903122,
-0.010970336385071278,
-0.028403591364622116,
-0.021142829209566116,
0.026321811601519585,
-0.018563278019428253,
0.024828501045703888,
0.02655724063515663,
0.10390033572912216,
-0.009314531460404396,
-0.021982602775096893,
-0.03255525603890419,
0.038701605051755905,
-0.013496375642716885,
-0.021879903972148895,
0.049592357128858566,
-0.02553323097527027,
-0.05213264748454094,
0.014727341942489147,
0.029210586100816727,
0.04737420007586479,
-0.08261433243751526,
-0.0540899783372879,
-0.050707004964351654,
0.003926130943000317,
-0.018601112067699432,
0.045866403728723526,
0.013206666335463524,
0.03511183708906174,
0.009305327199399471,
-0.006536687258630991,
-0.039219826459884644,
-0.004796867724508047,
-0.01104689296334982,
-0.07040180265903473,
-0.05519869178533554,
-0.0034450190141797066,
0.001361659960821271,
0.05676973983645439,
0.036394018679857254,
0.03091263584792614,
0.02896122820675373,
0.1112414300441742,
-0.09714609384536743,
-0.031875576823949814,
0.020194802433252335,
-0.001967351185157895,
0.05319691076874733,
0.04097699746489525,
0.013422253541648388,
0.026071351021528244,
0.06877551972866058,
-0.011855234391987324,
0.06511960923671722,
-0.015742270275950432,
0.015930697321891785,
0.027931276708841324,
-0.03547343239188194,
0.08801223337650299,
-0.01356856431812048,
0.0410408116877079,
-0.031159458681941032,
-0.048108551651239395,
0.042680710554122925,
0.009700443595647812,
3.4416931755741124e-33,
0.004833901766687632,
-0.12260909378528595,
-0.0005840210942551494,
-0.028217820450663567,
-0.02540251612663269,
-0.06796687096357346,
0.0008037983789108694,
0.0032540534157305956,
-0.05541941523551941,
-0.07823648303747177,
-0.03386855497956276,
0.0591612346470356,
-0.06260116398334503,
-0.013104723766446114,
0.014410203322768211,
-0.0697217583656311,
-0.07760660350322723,
0.13824911415576935,
0.030137836933135986,
0.024212099611759186,
0.0663168728351593,
-0.0446687750518322,
-0.03805975988507271,
0.01167270727455616,
0.0787971168756485,
-0.033427007496356964,
0.027264373376965523,
-0.059532806277275085,
-0.08235296607017517,
0.0249661672860384,
-0.005746068898588419,
0.012731711380183697,
-0.014785364270210266,
0.014194363728165627,
-0.15900276601314545,
0.004191635642200708,
-0.01662195473909378,
0.015578548423945904,
-0.0552135668694973,
-0.039580367505550385,
0.008778907358646393,
0.013414041139185429,
-0.016499770805239677,
-0.10899742692708969,
0.013285675086081028,
-0.09772957861423492,
0.05038449168205261,
-0.03523147478699684,
-0.02353886514902115,
0.04118146747350693,
0.05125771835446358,
0.005580398719757795,
0.026629317551851273,
-0.025635400786995888,
0.007200389169156551,
-0.0009806277230381966,
0.10441701859235764,
-0.04324846714735031,
-0.026789920404553413,
0.017216017469763756,
-0.011181469075381756,
-0.05334977060556412,
0.0025901119224727154,
0.044432345777750015,
0.034311968833208084,
0.07223006337881088,
-0.029611442238092422,
0.04851185157895088,
-0.02675670012831688,
0.059389449656009674,
-0.054719723761081696,
0.019025450572371483,
0.0047429706901311874,
-0.000654143572319299,
-0.029004467651247978,
-0.07692798972129822,
0.024892687797546387,
0.024790197610855103,
-0.19170647859573364,
0.01852249726653099,
0.020916221663355827,
0.0051814718171954155,
-0.019408125430345535,
0.0432194247841835,
0.014544066973030567,
-0.08995983004570007,
0.021832291036844254,
0.044473472982645035,
-0.08160952478647232,
0.00611887825652957,
0.013958608731627464,
-0.023481043055653572,
-0.029742570593953133,
0.03876673802733421,
-0.08554389327764511,
-2.9761786782072703e-33,
0.09377932548522949,
-0.013295925222337246,
0.008601072244346142,
0.0346258170902729,
-0.029961245134472847,
-0.0031013318803161383,
-0.040496740490198135,
0.08065717667341232,
-0.05775536224246025,
-0.12098556011915207,
-0.0487767718732357,
-0.05691947788000107,
0.02310924232006073,
0.023587582632899284,
-0.11663500964641571,
0.037255167961120605,
-0.09661202132701874,
-0.07073845714330673,
-0.013222320936620235,
0.0719873309135437,
-0.006158680189400911,
-0.008209355175495148,
0.022971492260694504,
0.05852343142032623,
-0.026958348229527473,
-0.009060032665729523,
0.04579204320907593,
0.040566861629486084,
0.010824136435985565,
-0.06774915009737015,
0.046805765479803085,
-0.11115072667598724,
-0.07950177788734436,
0.07135484367609024,
0.05811593309044838,
-0.0659831240773201,
-0.001935842214152217,
0.049600474536418915,
-0.013567337766289711,
0.11218800395727158,
0.07122113555669785,
0.06829270720481873,
-0.08158822357654572,
-0.004821334965527058,
-0.019710324704647064,
0.01592995598912239,
0.04074167460203171,
-0.00691678561270237,
0.026366444304585457,
-0.1284233182668686,
0.02828146517276764,
0.005117951892316341,
0.00010149722220376134,
0.11355990916490555,
-0.035639867186546326,
0.04484600946307182,
0.025462470948696136,
0.04828571528196335,
-0.045529309660196304,
0.018105925992131233,
0.04302152991294861,
-0.09747940301895142,
0.08012676239013672,
-0.06813493371009827,
-0.0025850841775536537,
-0.0012486646883189678,
0.04176563024520874,
0.011301434598863125,
0.004777438007295132,
0.04986119270324707,
0.11561005562543869,
0.01955200918018818,
-0.006225773133337498,
0.06296268105506897,
-0.018028730526566505,
-0.0069506303407251835,
0.023593442514538765,
-0.046929795295000076,
0.10250043123960495,
0.000011253109732933808,
-0.059702083468437195,
0.07872311770915985,
-0.01577596738934517,
0.014618192799389362,
0.026702046394348145,
0.08417201042175293,
0.03291656821966171,
0.08931093662977219,
0.054120056331157684,
0.050200339406728745,
-0.01842360571026802,
-0.002761873649433255,
-0.048756036907434464,
0.07920932024717331,
-0.04289761185646057,
-4.4082813843715485e-8,
0.06352304667234421,
-0.02965063415467739,
-0.03251434490084648,
0.0940244123339653,
0.08711325377225876,
-0.055380407720804214,
0.0398888923227787,
0.02073935978114605,
-0.07152730971574783,
-0.04652269184589386,
0.012259431183338165,
0.06324084103107452,
-0.01951415091753006,
0.015471511520445347,
0.08246561139822006,
-0.0489930622279644,
0.003225398249924183,
0.03513767942786217,
-0.01716068759560585,
-0.09225642681121826,
-0.07995356619358063,
-0.02456427365541458,
0.03187422826886177,
-0.01677805185317993,
0.019088564440608025,
0.041064031422138214,
0.07039185613393784,
0.08311880379915237,
0.04666648432612419,
-0.0097481869161129,
-0.002663572784513235,
0.012615818530321121,
-0.017514441162347794,
0.00693356990814209,
0.019033335149288177,
0.04926455020904541,
-0.12579865753650665,
0.0422542579472065,
0.045365218073129654,
0.0022318146657198668,
0.009066343307495117,
-0.025613397359848022,
-0.05542966350913048,
0.008148466236889362,
-0.003671863814815879,
0.039659544825553894,
-0.056032370775938034,
0.05784809589385986,
0.012824988923966885,
0.010019347071647644,
0.004020819906145334,
-0.06767149269580841,
-0.0031292808707803488,
0.059996601194143295,
-0.0434516966342926,
0.06560859829187393,
-0.04066109284758568,
0.0041747684590518475,
0.004505333956331015,
0.0020596194081008434,
0.05781690776348114,
-0.019644947722554207,
-0.05702497065067291,
0.013757520355284214
] | 0.144105
|
\* \*\*Node Policies:\*\* Pods managed by [static CPU or Memory manager policies](/docs/tasks/administer-cluster/cpu-management-policies/) cannot be resized in-place. \* \*\*Swap:\*\* Pods utilizing [swap memory](/docs/concepts/architecture/nodes/#swap-memory) cannot resize memory requests unless the `resizePolicy` for memory is `RestartContainer`. These restrictions might be relaxed in future Kubernetes versions. ## Example 1: Resizing CPU without restart First, create a Pod designed for in-place CPU resize and restart-required memory resize. {{% code\_sample file="pods/resource/pod-resize.yaml" %}} Create the pod: ```shell kubectl create -f pod-resize.yaml ``` This pod starts in the Guaranteed QoS class. Verify its initial state: ```shell # Wait a moment for the pod to be running kubectl get pod resize-demo --output=yaml ``` Observe the `spec.containers[0].resources` and `status.containerStatuses[0].resources`. They should match the manifest (700m CPU, 200Mi memory). Note the `status.containerStatuses[0].restartCount` (should be 0). Now, increase the CPU request and limit to `800m`. You use `kubectl patch` with the `--subresource resize` command line argument. ```shell kubectl patch pod resize-demo --subresource resize --patch \ '{"spec":{"containers":[{"name":"pause", "resources":{"requests":{"cpu":"800m"}, "limits":{"cpu":"800m"}}}]}}' # Alternative methods: # kubectl -n qos-example edit pod resize-demo --subresource resize # kubectl -n qos-example apply -f --subresource resize --server-side ``` {{< note >}} The `--subresource resize` command line argument requires `kubectl` client version v1.32.0 or later. Older versions will report an `invalid subresource` error. {{< /note >}} Check the pod status again after patching: ```shell kubectl get pod resize-demo --output=yaml --namespace=qos-example ``` You should see: \* `spec.containers[0].resources` now shows `cpu: 800m`. \* `status.containerStatuses[0].resources` also shows `cpu: 800m`, indicating the resize was successful on the node. \* `status.containerStatuses[0].restartCount` remains `0`, because the CPU `resizePolicy` was `NotRequired`. ## Example 2: Resizing memory with restart Now, resize the memory for the \*same\* pod by increasing it to `300Mi`. Since the memory `resizePolicy` is `RestartContainer`, the container is expected to restart. ```shell kubectl patch pod resize-demo --subresource resize --patch \ '{"spec":{"containers":[{"name":"pause", "resources":{"requests":{"memory":"300Mi"}, "limits":{"memory":"300Mi"}}}]}}' ``` Check the pod status shortly after patching: ```shell kubectl get pod resize-demo --output=yaml ``` You should now observe: \* `spec.containers[0].resources` shows `memory: 300Mi`. \* `status.containerStatuses[0].resources` also shows `memory: 300Mi`. \* `status.containerStatuses[0].restartCount` has increased to `1` (or more, if restarts happened previously), indicating the container was restarted to apply the memory change. ## Troubleshooting: Infeasible resize request Next, try requesting an unreasonable amount of CPU, such as 1000 full cores (written as `"1000"` instead of `"1000m"` for millicores), which likely exceeds node capacity. ```shell # Attempt to patch with an excessively large CPU request kubectl patch pod resize-demo --subresource resize --patch \ '{"spec":{"containers":[{"name":"pause", "resources":{"requests":{"cpu":"1000"}, "limits":{"cpu":"1000"}}}]}}' ``` Query the Pod's details: ```shell kubectl get pod resize-demo --output=yaml ``` You'll see changes indicating the problem: \* The `spec.containers[0].resources` reflects the \*desired\* state (`cpu: "1000"`). \* A condition with `type: PodResizePending` and `reason: Infeasible` was added to the Pod. \* The condition's `message` will explain why (`Node didn't have enough capacity: cpu, requested: 800000, capacity: ...`) \* Crucially, `status.containerStatuses[0].resources` will \*still show the previous values\* (`cpu: 800m`, `memory: 300Mi`), because the infeasible resize was not applied by the Kubelet. \* The `restartCount` will not have changed due to this failed attempt. To fix this, you would need to patch the pod again with feasible resource values. ## Clean up Delete the pod: ```shell kubectl delete pod resize-demo ``` ## {{% heading "whatsnext" %}} ### For application developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) \* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
[
0.05041959136724472,
0.013321143575012684,
-0.0027608016971498728,
0.050758328288793564,
-0.05798646807670593,
0.02370517887175083,
-0.006713928654789925,
0.03866569325327873,
-0.0013590307207778096,
0.1030825674533844,
-0.01449601911008358,
0.042922910302877426,
-0.01604728028178215,
-0.019542274996638298,
0.009036214090883732,
0.05058418959379196,
0.005303432233631611,
0.1032918244600296,
-0.043787188827991486,
-0.03297143429517746,
0.045817676931619644,
-0.045627471059560776,
-0.00672956695780158,
0.03257441520690918,
-0.010980977676808834,
-0.01183321699500084,
-0.05847538635134697,
-0.00922128651291132,
-0.014056566171348095,
-0.04809055104851723,
-0.022305544465780258,
0.01699453964829445,
-0.0033148094080388546,
0.009061136282980442,
0.12926031649112701,
0.13462094962596893,
-0.07332850247621536,
-0.12658971548080444,
-0.06980413943529129,
-0.02324586920440197,
0.02050674520432949,
-0.009708505123853683,
-0.11261530220508575,
0.024342209100723267,
0.02244524471461773,
0.06954749673604965,
-0.0012506202328950167,
-0.005544872023165226,
-0.008936142548918724,
-0.08840133994817734,
0.0035036434419453144,
-0.043309301137924194,
0.0721040740609169,
0.04254952818155289,
0.04059993848204613,
0.031204411759972572,
0.03830069676041603,
-0.005429239012300968,
0.10016534477472305,
0.0323505662381649,
-0.0051940809935331345,
-0.04718286544084549,
0.054268863052129745,
-0.04146395996212959,
-0.04482046514749527,
-0.004558108747005463,
0.022622598335146904,
-0.012519488111138344,
-0.00717344181612134,
0.018399788066744804,
0.07583063095808029,
-0.0010810275562107563,
0.006906254217028618,
0.00017608758935239166,
-0.015591616742312908,
-0.024670496582984924,
-0.017801329493522644,
0.04204832762479782,
-0.03720487281680107,
-0.0016526886029168963,
0.0020787562243640423,
0.006920053623616695,
0.0693625956773758,
-0.07320408523082733,
-0.05538046360015869,
0.0303195733577013,
-0.029124395921826363,
-0.060024142265319824,
0.01107879914343357,
-0.04104924947023392,
0.012205825187265873,
0.029973464086651802,
0.0002866805880330503,
-0.11109704524278641,
0.06136230751872063,
-0.07000342756509781,
-0.050506941974163055,
-0.039865776896476746,
-0.005606325343251228,
-0.0186132974922657,
0.09829514473676682,
0.03543374314904213,
0.06069893017411232,
0.0498504564166069,
0.06663159281015396,
-0.03470056876540184,
-0.010359064675867558,
0.044380005449056625,
-0.015327045693993568,
0.023471985012292862,
0.056358009576797485,
0.06260847300291061,
0.02578507736325264,
0.06760101020336151,
0.02601705491542816,
0.0007937286864034832,
-0.016077663749456406,
-0.026757990941405296,
-0.021168338134884834,
0.07111840695142746,
0.05368974059820175,
-0.0198906809091568,
-0.020442968234419823,
-0.0029671085067093372,
-0.061423078179359436,
0.04602262005209923,
-0.0397670604288578,
4.030498663242981e-33,
-0.009447076357901096,
-0.0680270567536354,
0.011135241016745567,
-0.006568667944520712,
0.06969484686851501,
-0.05129653960466385,
-0.030172070488333702,
0.02237037569284439,
-0.06644751131534576,
-0.05512611195445061,
-0.01546979695558548,
0.007419120986014605,
-0.009733268991112709,
0.010951443575322628,
0.029507193714380264,
-0.05925985053181648,
-0.0735061913728714,
0.0932566449046135,
0.09608981758356094,
-0.04031853377819061,
0.03060157038271427,
-0.035306040197610855,
-0.030930636450648308,
0.04465808346867561,
-0.06009497493505478,
-0.040370237082242966,
0.035492826253175735,
-0.1075180172920227,
-0.01637870818376541,
-0.0005750319687649608,
-0.08245471864938736,
-0.012233693152666092,
0.01659369468688965,
0.010204412043094635,
-0.12445587664842606,
-0.01167319342494011,
-0.021626697853207588,
0.02082011103630066,
-0.1063200905919075,
-0.06193447858095169,
0.05172918736934662,
0.050526104867458344,
0.054375551640987396,
-0.11292898654937744,
0.03704389929771423,
-0.04655442759394646,
0.05983985587954521,
-0.03192015737295151,
0.012404614128172398,
0.012959879823029041,
0.03415556624531746,
-0.013318945653736591,
0.050844140350818634,
-0.057593028992414474,
0.08247552812099457,
-0.002476516179740429,
0.07802754640579224,
0.012077082879841328,
-0.018913794308900833,
0.026268618181347847,
-0.06998015195131302,
-0.006408686749637127,
-0.013297717086970806,
0.01842496357858181,
0.027557043358683586,
0.04590073600411415,
0.0007009500404819846,
0.07236660271883011,
-0.0466386154294014,
0.05945613980293274,
-0.028015153482556343,
0.04251858964562416,
0.03649134933948517,
0.08253409713506699,
-0.06433714181184769,
-0.05268040671944618,
0.04256664961576462,
0.006337044294923544,
-0.19289451837539673,
0.008272877894341946,
0.06633145362138748,
-0.02549346163868904,
0.0015503494068980217,
0.03979373723268509,
0.0013149111764505506,
-0.10249508917331696,
0.05961022526025772,
0.03721637651324272,
-0.023575015366077423,
0.060652248561382294,
0.052639495581388474,
-0.07630426436662674,
-0.0028702656272798777,
0.02497040294110775,
-0.130671426653862,
-4.07657767445323e-33,
0.07095683366060257,
-0.01382361724972725,
-0.02628248743712902,
0.019779421389102936,
-0.0048944284208118916,
-0.00875549390912056,
-0.006051291711628437,
0.054202158004045486,
-0.07824006676673889,
-0.1737087368965149,
-0.08707550168037415,
-0.08273326605558395,
0.05793878063559532,
0.006616536062210798,
-0.082815021276474,
-0.012590525671839714,
-0.11625738441944122,
-0.04142000526189804,
-0.010091196745634079,
0.06946350634098053,
-0.0226596612483263,
0.027961719781160355,
0.09096655249595642,
0.048240210860967636,
0.031208641827106476,
0.006154130212962627,
0.023192288354039192,
0.0534592941403389,
-0.0038055304903537035,
-0.009701184928417206,
0.004476071801036596,
-0.11638785153627396,
-0.05252332240343094,
0.07006284594535828,
0.03642313554883003,
-0.07829771190881729,
-0.04773015156388283,
0.025306565687060356,
0.05468184873461723,
0.06576140224933624,
0.07750540226697922,
0.013589998707175255,
-0.04073883220553398,
-0.05793233588337898,
0.000021718982679885812,
0.00663705263286829,
-0.01706669293344021,
-0.04684551805257797,
0.008600359782576561,
-0.09572066366672516,
-0.03198551386594772,
0.007326704449951649,
-0.08121278136968613,
0.07638174295425415,
-0.04086591675877571,
-0.012378280982375145,
0.0335228405892849,
0.06342559307813644,
-0.017883850261569023,
-0.026599707081913948,
0.0386044941842556,
-0.15326431393623352,
0.002880472457036376,
-0.06369483470916748,
0.00888677965849638,
-0.05728289112448692,
0.0015421479474753141,
0.01759955659508705,
-0.04965578764677048,
0.027684982866048813,
0.08059181272983551,
0.042917560786008835,
0.02207854390144348,
0.04542702063918114,
-0.029311930760741234,
-0.013451119884848595,
0.01730433478951454,
-0.022109810262918472,
0.08005180209875107,
0.011763503775000572,
-0.07953959703445435,
0.07034590095281601,
-0.042074061930179596,
0.05470676347613335,
0.02144000306725502,
0.057853709906339645,
0.025191329419612885,
0.08815237879753113,
0.0030699814669787884,
0.0213859211653471,
-0.02531260810792446,
-0.041070129722356796,
0.014827614650130272,
0.05321800708770752,
-0.0028809832874685526,
-4.441525902620924e-8,
0.08689755201339722,
-0.008937349542975426,
0.010446099564433098,
0.11575686186552048,
0.04950987175107002,
-0.08337360620498657,
0.03297510743141174,
0.021913811564445496,
-0.03153020516037941,
0.04429261386394501,
0.006196231115609407,
0.07406676560640335,
-0.042189691215753555,
0.004646823275834322,
0.04731433838605881,
-0.013498179614543915,
-0.04008312523365021,
0.0778898373246193,
0.04392893239855766,
-0.10059734433889389,
-0.06331001222133636,
-0.0107188131660223,
-0.007265727501362562,
0.021591737866401672,
0.007535201497375965,
0.028396600857377052,
0.08219590038061142,
0.03317476063966751,
0.006625569425523281,
-0.016880473122000694,
-0.03834720328450203,
-0.017704717814922333,
-0.014028389938175678,
0.03627189248800278,
-0.007887718267738819,
-0.021703680977225304,
-0.08653489500284195,
0.10372662544250488,
0.03040613979101181,
-0.05061483383178711,
-0.05292574316263199,
-0.011255224235355854,
-0.06972607225179672,
0.02206493355333805,
-0.021187348291277885,
0.023830533027648926,
-0.045132994651794434,
0.08901243656873703,
-0.0006966606597416103,
0.015857670456171036,
0.00503493519499898,
-0.0058598932810127735,
0.0321764200925827,
0.03684716299176216,
-0.013740434311330318,
0.04095662012696266,
-0.0022769318893551826,
0.003573382506147027,
-0.04827667400240898,
0.01878013275563717,
0.04484448581933975,
0.009526386857032776,
-0.04363055154681206,
-0.061787113547325134
] | 0.157271
|
CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-container-resources.md
|
[
0.03264067694544792,
0.002890476956963539,
-0.0903480052947998,
0.03779106214642525,
-0.023561302572488785,
-0.03873274847865105,
0.00399004528298974,
0.00962846539914608,
-0.037553779780864716,
0.03399010747671127,
0.009957761503756046,
-0.04259953647851944,
-0.03468238562345505,
-0.00588265573605895,
-0.010013253428041935,
0.00883484072983265,
0.044877346605062485,
0.0094741927459836,
-0.04116647318005562,
-0.033202435821294785,
0.15120573341846466,
-0.015665365383028984,
0.04312203824520111,
-0.007006361149251461,
-0.03867248073220253,
0.024215329438447952,
-0.09664883464574814,
-0.017668837681412697,
-0.010490434244275093,
-0.033078063279390335,
0.023734789341688156,
-0.023790577426552773,
0.07139942049980164,
0.01379617489874363,
0.14318327605724335,
0.11786490678787231,
0.043188080191612244,
-0.12774895131587982,
-0.03143217787146568,
-0.009205127134919167,
-0.01704682968556881,
0.02429446578025818,
-0.03664555773139,
0.023085765540599823,
-0.0766381025314331,
0.05461627617478371,
-0.058693237602710724,
-0.03954940661787987,
-0.03834526613354683,
-0.026875538751482964,
-0.03826460987329483,
-0.03765816241502762,
0.011050916276872158,
-0.000867943512275815,
0.03711382672190666,
0.05708533897995949,
-0.0027638005558401346,
0.017382171005010605,
0.043502405285835266,
0.011021053418517113,
0.007582903373986483,
-0.06817009299993515,
-0.021173687651753426,
-0.010443590581417084,
0.020687175914645195,
-0.025053756311535835,
0.002223481424152851,
0.005287456791847944,
0.006787577178329229,
0.02587377466261387,
-0.014118945226073265,
0.025433799251914024,
-0.09238401800394058,
-0.02863406576216221,
-0.049923934042453766,
0.006166994106024504,
-0.0336635522544384,
0.026409445330500603,
-0.039375558495521545,
-0.11349843442440033,
-0.030442962422966957,
0.02758287638425827,
0.02984304167330265,
-0.05398772284388542,
-0.03614398092031479,
0.06361103057861328,
0.020805658772587776,
-0.015219418331980705,
0.05882369354367256,
-0.01893032342195511,
0.022281426936388016,
-0.028547028079628944,
0.0070299250073730946,
-0.055166665464639664,
0.04513170197606087,
0.0450715646147728,
-0.07741659879684448,
-0.025470951572060585,
-0.00761333666741848,
0.01278272457420826,
0.005327416118234396,
-0.019236097112298012,
0.07068248093128204,
0.022729115560650826,
0.011326225474476814,
-0.01299798209220171,
-0.02192346192896366,
0.08406741172075272,
-0.028390977531671524,
0.05566234141588211,
0.01477783266454935,
0.060963355004787445,
0.005823825020343065,
0.006554244086146355,
0.02236209250986576,
0.018527766689658165,
0.05666615441441536,
-0.061691321432590485,
0.06678494065999985,
0.08879106491804123,
0.037341468036174774,
-0.06438305974006653,
0.01774735189974308,
-0.024720672518014908,
-0.06767634302377701,
-0.02731151320040226,
-0.11571694910526276,
2.3124681191101133e-33,
0.020780013874173164,
-0.07395857572555542,
0.020017333328723907,
0.020995760336518288,
0.02741762064397335,
-0.028577156364917755,
-0.029220152646303177,
0.06368916481733322,
-0.043746910989284515,
-0.003301368560642004,
0.027228819206357002,
0.0046300687827169895,
-0.030516723170876503,
-0.0334928035736084,
0.012400391511619091,
-0.07848832756280899,
0.03259655460715294,
0.08257854729890823,
0.09976803511381149,
-0.013273634016513824,
0.05269387736916542,
-0.006829570047557354,
-0.12017576396465302,
0.03675994649529457,
0.041995011270046234,
0.0506802462041378,
0.04622877761721611,
-0.12329579144716263,
0.003608339698985219,
0.012028074823319912,
0.02873924933373928,
-0.00785075780004263,
-0.016244325786828995,
0.021474406123161316,
-0.006349974311888218,
0.040109455585479736,
-0.0043350388295948505,
0.05886266380548477,
-0.09331103414297104,
-0.05069063976407051,
-0.025009771808981895,
0.02739502303302288,
0.010425802320241928,
-0.044152893126010895,
-0.014305061660706997,
-0.05492295324802399,
0.04033764451742172,
-0.08814852684736252,
0.02914460375905037,
0.040331047028303146,
0.01179603859782219,
-0.03766786307096481,
0.048788804560899734,
0.0350591205060482,
0.06132304668426514,
-0.02946360781788826,
-0.015931032598018646,
0.020216824486851692,
0.024980995804071426,
0.10341893881559372,
-0.04932408779859543,
-0.03685067594051361,
-0.01929851621389389,
0.005598245654255152,
0.05570517107844353,
0.04853484779596329,
-0.03577923774719238,
0.04163265600800514,
0.04337412491440773,
0.07579844444990158,
-0.06070007383823395,
-0.04536372423171997,
0.05616385117173195,
0.1072615310549736,
-0.06985393911600113,
-0.0188283808529377,
0.002898403210565448,
-0.020383302122354507,
-0.20393797755241394,
-0.019678352400660515,
-0.006433950271457434,
0.010211695916950703,
-0.005456632934510708,
0.023039773106575012,
-0.057253625243902206,
-0.09819015115499496,
0.023317918181419373,
0.03521808981895447,
-0.01405420247465372,
0.02777295745909214,
0.018069088459014893,
-0.016436779871582985,
-0.03392905369400978,
-0.03999483585357666,
-0.1322925090789795,
-3.318180310713368e-33,
0.05750725790858269,
-0.009426754899322987,
-0.03188897296786308,
0.02481239102780819,
0.015033304691314697,
0.0021591701079159975,
-0.0038572854828089476,
0.0145663321018219,
-0.004736547823995352,
-0.0344737209379673,
-0.06095733493566513,
-0.07259843498468399,
0.07314672321081161,
0.011374181136488914,
-0.07826502621173859,
0.02446172758936882,
-0.050012994557619095,
-0.06275658309459686,
0.04424034059047699,
0.03588861599564552,
-0.09289172291755676,
0.08100027590990067,
0.08059278130531311,
0.042111679911613464,
0.046134624630212784,
0.043201006948947906,
-0.04003654420375824,
0.003727820934727788,
0.0021906907204538584,
-0.011922663077712059,
-0.0342969186604023,
-0.06981929391622543,
-0.08378227055072784,
0.04324306920170784,
0.003841078607365489,
-0.06805740296840668,
-0.04532664641737938,
0.11093446612358093,
-0.009247908368706703,
0.04483947157859802,
0.14480306208133698,
-0.007687730249017477,
-0.04619702696800232,
-0.004910158459097147,
-0.020371058955788612,
-0.03130856156349182,
0.004736156668514013,
-0.06939392536878586,
-0.042316604405641556,
-0.08935976773500443,
-0.028783561661839485,
-0.10185246914625168,
-0.04723360389471054,
0.051867563277482986,
0.02925318293273449,
0.01298495102673769,
0.09375782310962677,
0.026266809552907944,
0.030754398554563522,
-0.027165096253156662,
0.0681353509426117,
-0.06074456870555878,
-0.07353326678276062,
0.051734354346990585,
0.0006225699908100069,
-0.10846877098083496,
-0.038114674389362335,
-0.005543204955756664,
-0.07117439061403275,
0.05049019306898117,
-0.023276863619685173,
0.053455885499715805,
0.08373171091079712,
0.06050586700439453,
-0.020075954496860504,
-0.01581387408077717,
0.06543807685375214,
-0.05254222825169563,
0.03404080867767334,
0.03312532231211662,
-0.0992952510714531,
0.10598433762788773,
-0.029882006347179413,
0.029605193063616753,
-0.022510875016450882,
0.056231532245874405,
0.04211191460490227,
0.05525486171245575,
-0.025036433711647987,
0.04798293486237526,
-0.05938403308391571,
-0.024201126769185066,
0.007599152158945799,
0.06841301918029785,
-0.03782181441783905,
-3.99016037988531e-8,
0.050116267055273056,
-0.05664772540330887,
0.02082127146422863,
0.031220942735671997,
0.07147182524204254,
-0.004509045742452145,
0.05087820440530777,
0.09256754070520401,
0.009648793376982212,
0.04840107262134552,
0.09605389833450317,
0.030607091262936592,
-0.04639533907175064,
0.018206190317869186,
-0.01663888432085514,
-0.01146196573972702,
0.005484314169734716,
0.07802633941173553,
-0.015797125175595284,
-0.0742083191871643,
-0.09627377241849899,
-0.019333429634571075,
-0.047296226024627686,
0.012392478063702583,
0.021473810076713562,
-0.01935202069580555,
0.11354604363441467,
0.07849296182394028,
-0.010625623166561127,
0.008104627951979637,
-0.06740061938762665,
0.04355039447546005,
-0.06881094723939896,
-0.06451141089200974,
-0.05221053957939148,
0.0018491693772375584,
-0.12894296646118164,
0.06281513720750809,
-0.0277089960873127,
0.04628843069076538,
-0.04393501579761505,
-0.006979607045650482,
-0.0010939164785668254,
0.023427996784448624,
0.06044180318713188,
0.07578343152999878,
-0.07919919490814209,
0.08364156633615494,
0.011770320124924183,
-0.005524026229977608,
-0.04993161931633949,
0.015486001968383789,
0.03028143383562565,
0.07775898277759552,
-0.043283190578222275,
0.03230121731758118,
0.027385301887989044,
-0.004492469131946564,
-0.02714398130774498,
-0.013808867894113064,
0.0740557312965393,
0.05521856248378754,
-0.013112686574459076,
-0.012135687284171581
] | 0.205946
|
This page shows how to assign a Kubernetes Pod to a particular node using Node Affinity in a Kubernetes cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Add a label to a node 1. List the nodes in your cluster, along with their labels: ```shell kubectl get nodes --show-labels ``` The output is similar to this: ```shell NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` 1. Choose one of your nodes, and add a label to it: ```shell kubectl label nodes disktype=ssd ``` where `` is the name of your chosen node. 1. Verify that your chosen node has a `disktype=ssd` label: ```shell kubectl get nodes --show-labels ``` The output is similar to this: ``` NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,disktype=ssd,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` In the preceding output, you can see that the `worker0` node has a `disktype=ssd` label. ## Schedule a Pod using required node affinity This manifest describes a Pod that has a `requiredDuringSchedulingIgnoredDuringExecution` node affinity,`disktype: ssd`. This means that the pod will get scheduled only on a node that has a `disktype=ssd` label. {{% code\_sample file="pods/pod-nginx-required-affinity.yaml" %}} 1. Apply the manifest to create a Pod that is scheduled onto your chosen node: ```shell kubectl apply -f https://k8s.io/examples/pods/pod-nginx-required-affinity.yaml ``` 1. Verify that the pod is running on your chosen node: ```shell kubectl get pods --output=wide ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 ``` ## Schedule a Pod using preferred node affinity This manifest describes a Pod that has a `preferredDuringSchedulingIgnoredDuringExecution` node affinity,`disktype: ssd`. This means that the pod will prefer a node that has a `disktype=ssd` label. {{% code\_sample file="pods/pod-nginx-preferred-affinity.yaml" %}} 1. Apply the manifest to create a Pod that is scheduled onto your chosen node: ```shell kubectl apply -f https://k8s.io/examples/pods/pod-nginx-preferred-affinity.yaml ``` 1. Verify that the pod is running on your chosen node: ```shell kubectl get pods --output=wide ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 ``` ## {{% heading "whatsnext" %}} Learn more about [Node Affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity).
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md
|
[
0.056491918861866,
0.035151079297065735,
-0.025756720453500748,
0.022684603929519653,
0.003722299123182893,
0.04564089700579643,
0.03855863958597183,
-0.04443516954779625,
-0.009918068535625935,
0.0019524676026776433,
0.005860417149960995,
-0.10490531474351883,
0.03319317102432251,
-0.03838781267404556,
0.016583498567342758,
-0.006365947425365448,
0.036278773099184036,
0.00037159628118388355,
0.06790727376937866,
-0.1190972775220871,
-0.02391805872321129,
0.028079673647880554,
0.02092408388853073,
0.00261389696970582,
-0.025600939989089966,
-0.01148171629756689,
-0.0706307664513588,
-0.006685062777251005,
0.010180852375924587,
0.019058052450418472,
0.012156259268522263,
0.049789875745773315,
0.018280496820807457,
0.09187004715204239,
0.04957455024123192,
0.12017616629600525,
-0.004366956185549498,
-0.017702870070934296,
-0.07804165780544281,
0.011073463596403599,
0.06799870729446411,
0.009836800396442413,
-0.05827121436595917,
-0.07811205834150314,
-0.03044535405933857,
-0.0007764928741380572,
-0.07047814130783081,
-0.018076937645673752,
-0.02849237620830536,
-0.01776815764605999,
-0.005487329792231321,
-0.13539551198482513,
0.04627946391701698,
0.013010464608669281,
0.021159902215003967,
0.09185749292373657,
0.027867037802934647,
0.011312604881823063,
0.036031197756528854,
0.030477702617645264,
0.02992948144674301,
-0.0703808069229126,
0.06507488340139389,
-0.06720322370529175,
0.017111409455537796,
-0.009285292588174343,
0.019635139033198357,
-0.017190152779221535,
-0.024351079016923904,
0.0020193615928292274,
0.0632467195391655,
0.000919721438549459,
0.035579510033130646,
-0.025340434163808823,
-0.04453812539577484,
0.028085846453905106,
0.008017970249056816,
0.06069456785917282,
-0.019083192571997643,
-0.07246707379817963,
-0.07072613388299942,
0.046020060777664185,
0.02303440310060978,
0.03073984943330288,
-0.07553000748157501,
0.053038980811834335,
-0.03322068229317665,
-0.05043676495552063,
0.008473435416817665,
0.013077355921268463,
-0.027250399813055992,
-0.02610941044986248,
-0.022044124081730843,
-0.11431568115949631,
0.0589197538793087,
0.026474006474018097,
-0.0378083810210228,
0.04929120093584061,
0.04140184819698334,
-0.0016340833390131593,
-0.00820943433791399,
-0.049330104142427444,
0.022668901830911636,
0.004515109118074179,
-0.02259392850100994,
-0.017108509317040443,
-0.08035668730735779,
-0.026262881234288216,
-0.020757853984832764,
0.017605533823370934,
0.016188470646739006,
0.08334821462631226,
-0.031694959849119186,
0.025471871718764305,
-0.030384333804249763,
-0.0114893252030015,
0.107386514544487,
-0.03730890899896622,
0.020016377791762352,
0.045583806931972504,
0.03878413140773773,
-0.07617741078138351,
-0.04656335338950157,
0.04208725318312645,
-0.06573613733053207,
-0.009247848764061928,
-0.05919838324189186,
4.93021652923259e-33,
0.10009390860795975,
-0.07407046854496002,
0.06836060434579849,
-0.05794387310743332,
0.011001383885741234,
-0.0678904727101326,
-0.050001949071884155,
-0.0671047642827034,
-0.03664207458496094,
-0.04032058268785477,
-0.04709441959857941,
0.026051515713334084,
0.03719336539506912,
-0.038453590124845505,
-0.06360699236392975,
-0.07326815277338028,
-0.04291365668177605,
0.0907864198088646,
0.05531929060816765,
-0.02591618523001671,
-0.027035776525735855,
-0.05922875553369522,
-0.09850557148456573,
-0.014932464808225632,
0.04986250028014183,
-0.04570862650871277,
-0.019054260104894638,
-0.11863093823194504,
0.016386959701776505,
-0.006683452520519495,
-0.02232806198298931,
-0.04107457399368286,
0.04788912087678909,
-0.005726386792957783,
-0.1384035050868988,
-0.014437775127589703,
0.035136450082063675,
0.049871206283569336,
-0.07141450047492981,
-0.08567095547914505,
0.06786341965198517,
0.03660200536251068,
0.0889233648777008,
-0.042483456432819366,
0.07047022134065628,
-0.04074323549866676,
-0.00943321269005537,
-0.009434531442821026,
0.06061887741088867,
0.02300809696316719,
0.00712511595338583,
-0.10121207684278488,
0.06861093640327454,
-0.06657424569129944,
0.00874288473278284,
0.07897195965051651,
0.07584887742996216,
0.03901367634534836,
-0.04780326783657074,
0.05284212529659271,
-0.05403127893805504,
-0.03538910299539566,
-0.036533426493406296,
0.000817514315713197,
0.09300489723682404,
0.041526153683662415,
0.023585114628076553,
0.04050762206315994,
0.007072476204484701,
0.0545666329562664,
-0.10319740325212479,
0.04172653704881668,
-0.01734917424619198,
0.04418430104851723,
-0.007300514727830887,
-0.04551747813820839,
-0.04560768976807594,
-0.019716864451766014,
-0.11590392887592316,
0.07469748705625534,
-0.03160622715950012,
-0.0033380286768078804,
-0.059423137456178665,
0.07621242851018906,
0.02862020954489708,
-0.04503844678401947,
-0.0033282821532338858,
-0.013239347375929356,
0.015015454031527042,
0.01116935908794403,
0.03801575303077698,
-0.035186517983675,
-0.028153441846370697,
0.03443033620715141,
-0.0725455954670906,
-5.898541755665958e-33,
0.010548229329288006,
0.02021479420363903,
0.02239341102540493,
-0.0026747866068035364,
0.07171854376792908,
-0.006496821995824575,
-0.004461003001779318,
0.014560651034116745,
-0.042011599987745285,
-0.020531293004751205,
-0.04256793111562729,
-0.08327046036720276,
-0.048726849257946014,
0.03093542903661728,
-0.10432141274213791,
0.041585978120565414,
-0.09158074110746384,
0.04152611270546913,
0.040882211178541183,
0.07594013214111328,
-0.03421780467033386,
0.03234347328543663,
0.0707506462931633,
0.012969627045094967,
0.0760810449719429,
-0.008754318580031395,
0.07824136316776276,
0.04313628375530243,
-0.05611791834235191,
-0.0325009748339653,
-0.03058961220085621,
-0.08866516500711441,
-0.02505970560014248,
0.026964079588651657,
0.03541161119937897,
-0.07291413098573685,
-0.07044399529695511,
-0.003859107382595539,
0.027061307802796364,
0.004896244499832392,
-0.0015879987040534616,
0.04966079071164131,
-0.09101267158985138,
-0.017899176105856895,
-0.05867652967572212,
0.006857872940599918,
0.10690302401781082,
0.024092553183436394,
-0.0552467480301857,
-0.07302217930555344,
-0.04616718366742134,
-0.022707486525177956,
-0.03924736753106117,
0.08653771132230759,
-0.058339618146419525,
-0.015152722597122192,
-0.003771349787712097,
0.07750044763088226,
-0.010894441977143288,
-0.04321828484535217,
0.04226363077759743,
-0.08279876410961151,
0.06868001073598862,
0.056939754635095596,
0.019770830869674683,
-0.1342468112707138,
-0.01211716327816248,
0.00828197319060564,
-0.09712179750204086,
0.009110826998949051,
0.014777330681681633,
0.035815950483083725,
0.04498244822025299,
0.04832257330417633,
-0.012276780791580677,
-0.06265798211097717,
-0.006688060704618692,
0.04238765314221382,
-0.009684336371719837,
0.052637286484241486,
-0.03545569255948067,
0.08273915946483612,
-0.06955631822347641,
0.05012282356619835,
0.04807298257946968,
0.09041773527860641,
0.09356085956096649,
0.13334909081459045,
0.03460986539721489,
0.034451354295015335,
-0.026233511045575142,
0.01785981096327305,
-0.01775943860411644,
0.09007726609706879,
-0.07980620115995407,
-5.513967238357509e-8,
0.051674239337444305,
0.009980606846511364,
-0.10073569416999817,
-0.0012534246779978275,
0.03375670313835144,
0.03640827536582947,
-0.011867737397551537,
-0.001793780829757452,
-0.07464788854122162,
0.04287197068333626,
-0.0012909879442304373,
-0.00046176608884707093,
-0.025550317019224167,
-0.051006875932216644,
0.05549197271466255,
-0.026286417618393898,
0.011010124348104,
0.055805936455726624,
0.027520880103111267,
-0.017760733142495155,
-0.004264339338988066,
-0.024509279057383537,
0.007196587510406971,
0.031122703105211258,
0.005000796634703875,
0.01869407668709755,
0.03422054275870323,
-0.0016289757331833243,
0.08466987311840057,
0.056093744933605194,
-0.04104235768318176,
-0.009135723114013672,
-0.06003321334719658,
0.034771375358104706,
0.03191721439361572,
0.01294985506683588,
-0.1315774917602539,
0.04886481538414955,
0.07277773320674896,
0.13942453265190125,
-0.043378639966249466,
0.06810415536165237,
-0.08759818226099014,
0.0032676474656909704,
0.04454503580927849,
0.04863477498292923,
0.013582894578576088,
0.042409129440784454,
0.018096819519996643,
-0.022813742980360985,
-0.04652044177055359,
-0.10462222993373871,
0.029981784522533417,
0.017034901306033134,
-0.05172060802578926,
0.03192013129591942,
-0.007969094440340996,
-0.04255155846476555,
0.04808034747838974,
0.009624406695365906,
0.017813637852668762,
0.027852827683091164,
0.020470963791012764,
0.021905291825532913
] | 0.137599
|
This page shows how to assign a CPU \*request\* and a CPU \*limit\* to a container. Containers cannot use more CPU than the configured limit. Provided the system has CPU time free, a container is guaranteed to be allocated as much CPU as it requests. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} Your cluster must have at least 1 CPU available for use to run the task examples. A few of the steps on this page require you to run the [metrics-server](https://github.com/kubernetes-sigs/metrics-server) service in your cluster. If you have the metrics-server running, you can skip those steps. If you are running {{< glossary\_tooltip term\_id="minikube" >}}, run the following command to enable metrics-server: ```shell minikube addons enable metrics-server ``` To see whether metrics-server (or another provider of the resource metrics API, `metrics.k8s.io`) is running, type the following command: ```shell kubectl get apiservices ``` If the resource metrics API is available, the output will include a reference to `metrics.k8s.io`. ``` NAME v1beta1.metrics.k8s.io ``` ## Create a namespace Create a {{< glossary\_tooltip term\_id="namespace" >}} so that the resources you create in this exercise are isolated from the rest of your cluster. ```shell kubectl create namespace cpu-example ``` ## Specify a CPU request and a CPU limit To specify a CPU request for a container, include the `resources:requests` field in the Container resource manifest. To specify a CPU limit, include `resources:limits`. In this exercise, you create a Pod that has one container. The container has a request of 0.5 CPU and a limit of 1 CPU. Here is the configuration file for the Pod: {{% code\_sample file="pods/resource/cpu-request-limit.yaml" %}} The `args` section of the configuration file provides arguments for the container when it starts. The `-cpus "2"` argument tells the Container to attempt to use 2 CPUs. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit.yaml --namespace=cpu-example ``` Verify that the Pod is running: ```shell kubectl get pod cpu-demo --namespace=cpu-example ``` View detailed information about the Pod: ```shell kubectl get pod cpu-demo --output=yaml --namespace=cpu-example ``` The output shows that the one container in the Pod has a CPU request of 500 milliCPU and a CPU limit of 1 CPU. ```yaml resources: limits: cpu: "1" requests: cpu: 500m ``` Use `kubectl top` to fetch the metrics for the Pod: ```shell kubectl top pod cpu-demo --namespace=cpu-example ``` This example output shows that the Pod is using 974 milliCPU, which is slightly less than the limit of 1 CPU specified in the Pod configuration. ``` NAME CPU(cores) MEMORY(bytes) cpu-demo 974m ``` Recall that by setting `-cpu "2"`, you configured the Container to attempt to use 2 CPUs, but the Container is only being allowed to use about 1 CPU. The container's CPU use is being throttled, because the container is attempting to use more CPU resources than its limit. {{< note >}} Another possible explanation for the CPU use being below 1.0 is that the Node might not have enough CPU resources available. Recall that the prerequisites for this exercise require your cluster to have at least 1 CPU available for use. If your Container runs on a Node that has only 1 CPU, the Container cannot use more than 1 CPU regardless of the CPU limit specified for the Container. {{< /note >}} ## CPU units The CPU resource is measured in \*CPU\* units. One CPU, in Kubernetes, is equivalent to: \* 1 AWS vCPU \* 1 GCP Core \* 1 Azure vCore \* 1 Hyperthread on a bare-metal Intel processor with Hyperthreading Fractional values are allowed. A Container that requests 0.5 CPU is guaranteed half as much CPU as a Container that
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
[
0.061705850064754486,
0.012451731599867344,
-0.005350555293262005,
0.007123603951185942,
-0.039862945675849915,
-0.045471105724573135,
-0.010939295403659344,
-0.04414081946015358,
0.03542545065283775,
0.05559781193733215,
-0.06538055092096329,
-0.1270311325788498,
-0.025276580825448036,
-0.018858876079320908,
-0.003728192299604416,
-0.04474186152219772,
0.1510753184556961,
-0.039342496544122696,
-0.05452033504843712,
-0.0775773674249649,
-0.0010406642686575651,
-0.00609185267239809,
0.043109577149152756,
0.022816471755504608,
-0.042085565626621246,
-0.022431522607803345,
-0.10883469879627228,
-0.03452041372656822,
0.036044616252183914,
0.003358016721904278,
-0.009346610866487026,
-0.04664921388030052,
-0.011519047431647778,
0.05216100439429283,
0.13676542043685913,
0.14599581062793732,
-0.016567988321185112,
-0.0701209083199501,
-0.08096593618392944,
0.004973568022251129,
0.025034597143530846,
-0.015958473086357117,
-0.0911877378821373,
-0.006084267515689135,
-0.0008581307483837008,
0.011136667802929878,
-0.06642851233482361,
-0.10674707591533661,
0.0034253192134201527,
-0.02672828547656536,
-0.02660580910742283,
-0.037598058581352234,
0.0317951999604702,
-0.0027671796269714832,
0.026580773293972015,
0.01695452257990837,
-0.013473980128765106,
0.02437479794025421,
0.07911738753318787,
-0.02158171497285366,
-0.039639707654714584,
-0.06664610654115677,
0.06437317281961441,
-0.07279623299837112,
0.03237738087773323,
-0.02311369962990284,
0.019576536491513252,
-0.03738294169306755,
-0.006767363287508488,
0.025622747838497162,
0.09634636342525482,
-0.0022296595852822065,
-0.017335249111056328,
-0.0024939849972724915,
-0.030847981572151184,
-0.002657834440469742,
-0.041620951145887375,
0.005528908222913742,
-0.020850908011198044,
-0.053486719727516174,
-0.032307710498571396,
0.007769476156681776,
0.07977283746004105,
0.01185605302453041,
-0.07528767734766006,
-0.03839103877544403,
0.01380500104278326,
-0.040503475815057755,
0.06167852506041527,
-0.08019700646400452,
0.048310309648513794,
0.009770975448191166,
-0.01145421713590622,
-0.05737194046378136,
0.09703841805458069,
-0.0018329303711652756,
-0.05006008222699165,
-0.006633705459535122,
0.009945579804480076,
-0.002945290645584464,
0.02801772579550743,
-0.03723368048667908,
0.0644044429063797,
0.02555268630385399,
0.04840283468365669,
0.012618692591786385,
-0.03268646076321602,
0.028762541711330414,
-0.006798034533858299,
0.025881070643663406,
0.043158404529094696,
0.07637196779251099,
0.027913687750697136,
0.03920137137174606,
0.005159841850399971,
-0.038360845297575,
0.06694835424423218,
-0.05814959481358528,
0.01670227386057377,
0.09579961746931076,
0.026814112439751625,
-0.06023044139146805,
-0.01312144286930561,
-0.053652871400117874,
0.0021371389739215374,
0.05542986840009689,
-0.05724163353443146,
4.2840215706466545e-33,
0.05893616005778313,
-0.03622443974018097,
0.08841606974601746,
-0.07741428911685944,
-0.01506192609667778,
-0.06327883154153824,
-0.04923378303647041,
0.008680950850248337,
-0.04907720908522606,
-0.0003366177261341363,
-0.06893660128116608,
0.033635806292295456,
-0.01620783843100071,
-0.007692666258662939,
0.017163310199975967,
-0.03323648124933243,
0.026864737272262573,
0.016888797283172607,
0.09497106820344925,
-0.01303014811128378,
0.06216390058398247,
-0.09924676269292831,
-0.07465803623199463,
-0.03157344460487366,
0.001412595040164888,
0.00393989821895957,
0.07285445183515549,
-0.086331307888031,
-0.04296749457716942,
0.013666111044585705,
-0.03274770826101303,
-0.021036146208643913,
-0.02183237113058567,
0.0760796070098877,
-0.08937090635299683,
-0.02727327309548855,
0.07488760352134705,
0.06378895789384842,
-0.0036918821278959513,
-0.026661939918994904,
0.03784668818116188,
-0.003910384140908718,
-0.0111793652176857,
-0.09979528933763504,
0.013443946838378906,
0.07231947034597397,
0.052773747593164444,
-0.08392198383808136,
0.08241559565067291,
0.06309781968593597,
0.0428464449942112,
-0.077440544962883,
-0.00724452082067728,
0.02929745614528656,
0.0152454087510705,
0.020132558420300484,
0.06736835837364197,
-0.04272136464715004,
0.044606830924749374,
0.01368585042655468,
-0.09582971781492233,
-0.08836549520492554,
-0.03523366153240204,
-0.00034749836777336895,
0.039698563516139984,
-0.017138946801424026,
-0.01779383420944214,
0.13720251619815826,
-0.007406686432659626,
0.01670231483876705,
-0.08634278178215027,
0.0006725061684846878,
0.05657535046339035,
0.03647267073392868,
0.06948293745517731,
-0.029820764437317848,
0.05297023057937622,
-0.05642421916127205,
-0.11920144408941269,
0.01295009907335043,
-0.023447377607226372,
-0.02122325263917446,
-0.04870590940117836,
-0.009395542554557323,
0.02599872462451458,
-0.08021678775548935,
-0.02824280597269535,
0.050648901611566544,
-0.018029045313596725,
0.037213604897260666,
-0.012323694303631783,
-0.0527644008398056,
-0.09919336438179016,
0.022203339263796806,
-0.19159050285816193,
-5.044237277210444e-33,
0.03560971841216087,
-0.05731324478983879,
-0.015713952481746674,
0.06704919040203094,
0.10373090952634811,
-0.01970735192298889,
0.061461154371500015,
0.01846860721707344,
-0.04857177659869194,
-0.06411488354206085,
-0.04145805537700653,
-0.0776418074965477,
0.02824501506984234,
0.04778023064136505,
-0.08614698797464371,
0.058458611369132996,
-0.043002817779779434,
0.02176712267100811,
0.05307300388813019,
0.033662132918834686,
-0.039060335606336594,
-0.009976000525057316,
0.0314764641225338,
0.02748393826186657,
0.03426392376422882,
0.02203979343175888,
0.044238049536943436,
-0.026427142322063446,
0.017010889947414398,
-0.016018545255064964,
0.0027678082697093487,
-0.0370444618165493,
-0.010087160393595695,
0.06604429334402084,
0.03999057784676552,
-0.03291738033294678,
-0.013284508138895035,
0.009185741655528545,
-0.04553117975592613,
0.024279773235321045,
0.05425165593624115,
-0.02274399995803833,
-0.0509786456823349,
-0.03181373327970505,
-0.014004121534526348,
0.007681612391024828,
-0.0045164511539042,
-0.09830454736948013,
-0.03431088849902153,
-0.061476800590753555,
0.01677471399307251,
-0.036483049392700195,
0.0042678858153522015,
0.10865462571382523,
-0.016183577477931976,
-0.002717653289437294,
0.04201333224773407,
0.01646224595606327,
-0.03780896216630936,
-0.006132292561233044,
0.08319684863090515,
-0.10058237612247467,
0.031167279928922653,
0.0034017416182905436,
0.061995651572942734,
0.008672676049172878,
0.029057558625936508,
0.016152910888195038,
-0.039939504116773605,
0.04434453323483467,
-0.04264102876186371,
0.025190319865942,
0.08794254809617996,
0.06006890907883644,
-0.08309745788574219,
0.02410365268588066,
0.01275529433041811,
-0.03135896101593971,
0.0478677861392498,
-0.034358520060777664,
-0.014471440576016903,
0.057876210659742355,
-0.0044366284273564816,
-0.037808891385793686,
0.010843059979379177,
0.04582945257425308,
0.07216034829616547,
0.10277906060218811,
0.007442652713507414,
0.034936171025037766,
-0.020562948659062386,
-0.024096330627799034,
-0.004554712679237127,
0.12124092876911163,
-0.04573262855410576,
-5.5894386008503716e-8,
0.05492173507809639,
0.05446584150195122,
-0.026590436697006226,
0.03642721101641655,
0.025954406708478928,
-0.007442377507686615,
-0.0027185396756976843,
0.020749682560563087,
-0.0029239847790449858,
0.04555026441812515,
0.055963557213544846,
0.035363227128982544,
-0.03302253410220146,
0.04576684534549713,
0.09868478029966354,
0.004524282645434141,
-0.010205263271927834,
0.0035854310262948275,
0.04077721759676933,
-0.09787873923778534,
-0.06068340688943863,
0.005427964497357607,
-0.028652194887399673,
-0.023616356775164604,
-0.024792786687612534,
0.006810967810451984,
0.06939765065908432,
0.04764942079782486,
0.03731992095708847,
-0.07104671746492386,
-0.09789910912513733,
0.022550836205482483,
-0.11603392660617828,
0.05443043261766434,
-0.00130651134531945,
-0.00969655904918909,
-0.12454841285943985,
0.07030389457941055,
0.05968499928712845,
0.04716602340340614,
-0.006132304668426514,
-0.003724941285327077,
-0.06720104813575745,
-0.033243123441934586,
0.046898771077394485,
0.09369233250617981,
-0.08593590557575226,
0.07742097228765488,
0.0037797612603753805,
-0.009087941609323025,
0.006941881962120533,
-0.055402934551239014,
-0.024764778092503548,
0.08354931324720383,
-0.02255280502140522,
0.04905402287840843,
-0.008092006668448448,
-0.0285771694034338,
-0.023800551891326904,
-0.037543412297964096,
0.047485776245594025,
0.036675140261650085,
0.0005427817231975496,
-0.008871951140463352
] | 0.038364
|
units. One CPU, in Kubernetes, is equivalent to: \* 1 AWS vCPU \* 1 GCP Core \* 1 Azure vCore \* 1 Hyperthread on a bare-metal Intel processor with Hyperthreading Fractional values are allowed. A Container that requests 0.5 CPU is guaranteed half as much CPU as a Container that requests 1 CPU. You can use the suffix m to mean milli. For example 100m CPU, 100 milliCPU, and 0.1 CPU are all the same. Precision finer than 1m is not allowed. CPU is always requested as an absolute quantity, never as a relative quantity; 0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine. Delete your Pod: ```shell kubectl delete pod cpu-demo --namespace=cpu-example ``` ## Specify a CPU request that is too big for your Nodes CPU requests and limits are associated with Containers, but it is useful to think of a Pod as having a CPU request and limit. The CPU request for a Pod is the sum of the CPU requests for all the Containers in the Pod. Likewise, the CPU limit for a Pod is the sum of the CPU limits for all the Containers in the Pod. Pod scheduling is based on requests. A Pod is scheduled to run on a Node only if the Node has enough CPU resources available to satisfy the Pod CPU request. In this exercise, you create a Pod that has a CPU request so big that it exceeds the capacity of any Node in your cluster. Here is the configuration file for a Pod that has one Container. The Container requests 100 CPU, which is likely to exceed the capacity of any Node in your cluster. {{% code\_sample file="pods/resource/cpu-request-limit-2.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/cpu-request-limit-2.yaml --namespace=cpu-example ``` View the Pod status: ```shell kubectl get pod cpu-demo-2 --namespace=cpu-example ``` The output shows that the Pod status is Pending. That is, the Pod has not been scheduled to run on any Node, and it will remain in the Pending state indefinitely: ``` NAME READY STATUS RESTARTS AGE cpu-demo-2 0/1 Pending 0 7m ``` View detailed information about the Pod, including events: ```shell kubectl describe pod cpu-demo-2 --namespace=cpu-example ``` The output shows that the Container cannot be scheduled because of insufficient CPU resources on the Nodes: ``` Events: Reason Message ------ ------- FailedScheduling No nodes are available that match all of the following predicates:: Insufficient cpu (3). ``` Delete your Pod: ```shell kubectl delete pod cpu-demo-2 --namespace=cpu-example ``` ## If you do not specify a CPU limit If you do not specify a CPU limit for a Container, then one of these situations applies: \* The Container has no upper bound on the CPU resources it can use. The Container could use all of the CPU resources available on the Node where it is running. \* The Container is running in a namespace that has a default CPU limit, and the Container is automatically assigned the default limit. Cluster administrators can use a [LimitRange](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#limitrange-v1-core/) to specify a default value for the CPU limit. ## If you specify a CPU limit but do not specify a CPU request If you specify a CPU limit for a Container but do not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit. Similarly, if a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. ## Motivation for CPU requests and limits By configuring the CPU requests and limits of the Containers that run in your cluster, you
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
[
0.0621199831366539,
-0.003355429507791996,
0.005115943029522896,
0.045755356550216675,
-0.031678780913352966,
-0.07441268116235733,
-0.013656392693519592,
-0.05382632464170456,
0.08805786073207855,
0.05500102415680885,
-0.005999990273267031,
-0.10090906172990799,
0.0010951526928693056,
-0.10144974291324615,
-0.015546333976089954,
-0.03366868570446968,
0.12087194621562958,
0.005865804851055145,
-0.06715340167284012,
0.010968366637825966,
0.05064021423459053,
0.004453103058040142,
-0.015769008547067642,
0.02079298347234726,
0.0023556561209261417,
-0.025588057935237885,
-0.10342147201299667,
-0.003968025557696819,
0.026817861944437027,
-0.012308565899729729,
-0.04746859520673752,
-0.034526277333498,
0.08031412959098816,
0.058957070112228394,
0.09968564659357071,
0.052644651383161545,
0.012623272836208344,
-0.11529617011547089,
-0.10958303511142731,
0.04449276253581047,
0.014195142313838005,
-0.005424022674560547,
-0.06905677169561386,
0.011804483830928802,
-0.03189695626497269,
0.09191493690013885,
-0.040313124656677246,
-0.05771699175238609,
0.0024360159877687693,
0.020577922463417053,
-0.01705692894756794,
-0.028473520651459694,
-0.009728911332786083,
0.04091238975524902,
0.013704473152756691,
0.01767861656844616,
0.019678888842463493,
0.0303453728556633,
0.04352473467588425,
0.0026491505559533834,
-0.003504670923575759,
-0.09278261661529541,
0.05663046985864639,
-0.055485811084508896,
0.1062401682138443,
-0.05641854181885719,
0.019574135541915894,
-0.052440494298934937,
0.017555447295308113,
0.023562846705317497,
0.10327018797397614,
-0.0762380063533783,
-0.016700653359293938,
0.03714669868350029,
-0.04930221289396286,
0.026963263750076294,
-0.06950709223747253,
0.012413736432790756,
0.0491512306034565,
0.03688806667923927,
-0.0019982904195785522,
0.04335348680615425,
0.022125542163848877,
-0.09796561300754547,
-0.03471004590392113,
0.00931963138282299,
0.06632193177938461,
0.020197710022330284,
0.03864692151546478,
-0.0003071349347010255,
0.019282661378383636,
0.020176179707050323,
0.07892407476902008,
-0.07115291059017181,
0.13277842104434967,
-0.014531749300658703,
-0.07378767430782318,
-0.0019635753706097603,
-0.0053173936903476715,
-0.027711395174264908,
0.023925142362713814,
-0.0076829735189676285,
0.03522707521915436,
0.012016517110168934,
0.003663203679025173,
-0.01983926072716713,
-0.028479035943746567,
0.07660731673240662,
0.012716354802250862,
-0.011915110051631927,
0.033937301486730576,
0.0329756997525692,
-0.02413892187178135,
0.04939386621117592,
0.0536058284342289,
-0.014039971865713596,
0.05532252416014671,
-0.01835468038916588,
0.03133227303624153,
0.08049210160970688,
0.004409404471516609,
-0.12126512080430984,
-0.02151123620569706,
-0.05016789585351944,
-0.09026037156581879,
0.020436787977814674,
-0.03666217252612114,
4.513609576357663e-33,
0.02159298025071621,
0.01083110086619854,
0.031953539699316025,
-0.08250049501657486,
0.04657450690865517,
-0.02313428930938244,
-0.035213153809309006,
0.020445361733436584,
-0.02277853712439537,
0.004746597725898027,
-0.055756404995918274,
0.0017182056326419115,
0.011372119188308716,
0.07899295538663864,
-0.025621140375733376,
-0.058728497475385666,
0.008832840248942375,
-0.004665683023631573,
0.11333492398262024,
-0.023345671594142914,
0.07274550944566727,
-0.05430084839463234,
-0.07608853280544281,
0.004742587450891733,
0.0020024527329951525,
-0.018230892717838287,
0.0023961064871400595,
-0.0867689773440361,
-0.057202402502298355,
0.007950524799525738,
-0.02207488752901554,
0.012149355374276638,
-0.028672564774751663,
-0.015325433574616909,
-0.11474347859621048,
-0.0252197477966547,
0.021468885242938995,
0.022034447640180588,
-0.03757414594292641,
0.0058267079293727875,
-0.005973141174763441,
0.012851672247052193,
0.013912628404796124,
-0.03454390540719032,
0.016907235607504845,
0.04048846289515495,
-0.00988769344985485,
-0.07888922095298767,
-0.01728551834821701,
0.03179844841361046,
-0.007853994145989418,
0.006939736660569906,
0.030299123376607895,
-0.04572122171521187,
0.06245839223265648,
0.02968885563313961,
0.14202561974525452,
0.031552754342556,
-0.03263378143310547,
0.03433224931359291,
-0.05671072378754616,
-0.047936081886291504,
0.0033682698849588633,
0.05648967623710632,
-0.02052164450287819,
0.040676843374967575,
-0.04174076020717621,
0.06588634848594666,
-0.009241871535778046,
0.059863749891519547,
-0.06859263777732849,
0.02824273519217968,
0.02494916506111622,
-0.010324030183255672,
-0.029184451326727867,
-0.03295350447297096,
0.02442455105483532,
-0.04371275380253792,
-0.14807717502117157,
0.033565446734428406,
-0.04450935125350952,
0.04869239777326584,
-0.023493198677897453,
0.006423377897590399,
-0.10671620815992355,
-0.03115302510559559,
0.013604307547211647,
0.06729398667812347,
0.0028160044457763433,
0.03394550085067749,
0.039963334798812866,
-0.012883998453617096,
-0.020729005336761475,
-0.01729303039610386,
-0.19231803715229034,
-4.766346739256209e-33,
-0.0037712170742452145,
0.008938497863709927,
-0.04049064218997955,
0.10054489970207214,
0.032530613243579865,
0.00437135249376297,
0.0477476492524147,
0.0033062580041587353,
-0.0758826807141304,
-0.0927005335688591,
-0.010332627221941948,
-0.0866817831993103,
-0.0010999321239069104,
0.051463671028614044,
-0.027947714552283287,
0.010245883837342262,
-0.07584414631128311,
-0.044004593044519424,
0.0412035807967186,
0.03613174706697464,
-0.00805395096540451,
-0.014928895980119705,
0.10608155280351639,
0.00362311489880085,
0.03240576758980751,
-0.03038785420358181,
-0.019123539328575134,
-0.001622144365683198,
0.06596485525369644,
-0.05903823673725128,
0.0012790081091225147,
-0.08269644528627396,
0.03616282716393471,
0.06536391377449036,
0.018217427656054497,
-0.0486028827726841,
-0.009963213466107845,
0.040471967309713364,
0.012441680766642094,
0.020668404176831245,
0.003903056262061,
-0.04169721528887749,
-0.01647818088531494,
-0.0214903075248003,
-0.03803405910730362,
0.023320559412240982,
0.044421419501304626,
-0.04092812538146973,
0.030179601162672043,
-0.12385768443346024,
-0.013483612798154354,
-0.00028225919231772423,
-0.05974763259291649,
0.1382322758436203,
0.0005246358341537416,
-0.015915144234895706,
-0.0009995076106861234,
0.07671168446540833,
-0.03826766088604927,
-0.03737275302410126,
0.06540687382221222,
-0.057286154478788376,
0.03738749399781227,
0.03192143142223358,
0.009630049578845501,
-0.014511567540466785,
0.02058512531220913,
0.025020532310009003,
-0.07556747645139694,
0.033341798931360245,
0.02731126919388771,
0.020753007382154465,
0.1110139861702919,
0.008945965208113194,
-0.07717055082321167,
-0.029237356036901474,
0.004594086203724146,
-0.037334881722927094,
0.04530145227909088,
-0.0019555152393877506,
-0.049749068915843964,
0.10811837762594223,
-0.05259798467159271,
-0.010939343832433224,
0.011189702898263931,
0.039355408400297165,
0.11364275962114334,
0.03826677426695824,
-0.006345087196677923,
0.044751666486263275,
-0.04112781584262848,
-0.03177152946591377,
-0.013393556699156761,
0.07305165380239487,
-0.08516205102205276,
-5.07893709311702e-8,
0.12818388640880585,
-0.04294677451252937,
-0.01207654271274805,
0.017139948904514313,
0.04546938091516495,
-0.012948528863489628,
-0.01560781616717577,
-0.0251532681286335,
-0.02098572812974453,
0.05967315286397934,
0.020109448581933975,
-0.046004120260477066,
-0.06408236175775528,
0.014214472845196724,
0.12203700095415115,
0.014639307744801044,
-0.02649953030049801,
0.05046132579445839,
0.05318240821361542,
-0.07158150523900986,
-0.07550103217363358,
0.009202386252582073,
-0.024274101480841637,
-0.03437526151537895,
-0.022213082760572433,
0.09889235347509384,
0.05614975839853287,
0.04044000431895256,
0.02435614913702011,
0.0012560104951262474,
-0.06858028471469879,
0.014446756802499294,
-0.04666273295879364,
0.006691331975162029,
-0.00030314893228933215,
0.01296951062977314,
-0.13930130004882812,
0.07312607765197754,
0.027977868914604187,
0.05760132521390915,
-0.012469999492168427,
-0.07699136435985565,
-0.01860136166214943,
-0.009580143727362156,
0.037160493433475494,
0.04760982096195221,
-0.06278008222579956,
0.005915929097682238,
-0.029085122048854828,
0.046696972101926804,
0.039017703384160995,
0.006152173969894648,
-0.021710937842726707,
0.117569699883461,
-0.047052763402462006,
0.05762023851275444,
-0.049297645688056946,
-0.1082267165184021,
-0.05629904568195343,
0.002835463732481003,
0.04965648055076599,
0.008322091773152351,
0.007770567201077938,
-0.04807692766189575
] | 0.155549
|
limit. Similarly, if a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. ## Motivation for CPU requests and limits By configuring the CPU requests and limits of the Containers that run in your cluster, you can make efficient use of the CPU resources available on your cluster Nodes. By keeping a Pod CPU request low, you give the Pod a good chance of being scheduled. By having a CPU limit that is greater than the CPU request, you accomplish two things: \* The Pod can have bursts of activity where it makes use of CPU resources that happen to be available. \* The amount of CPU resources a Pod can use during a burst is limited to some reasonable amount. ## Clean up Delete your namespace: ```shell kubectl delete namespace cpu-example ``` ## {{% heading "whatsnext" %}} ### For app developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) \* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/) \* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/) \* [Resize Pod-level CPU and Memory Resources](/docs/tasks/configure-pod-container/resize-pod-resources/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) \* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/) \* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/) \* [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md
|
[
0.08615574240684509,
0.05404994636774063,
0.003599756397306919,
0.04230035841464996,
-0.022937636822462082,
0.003885611891746521,
0.007373728323727846,
-0.009317335672676563,
0.08026578277349472,
0.04747176542878151,
-0.05591839179396629,
-0.01742173358798027,
-0.027780679985880852,
-0.06969951093196869,
0.02829769253730774,
-0.020867014303803444,
0.13353130221366882,
0.010183329693973064,
-0.0678897425532341,
-0.04562195762991905,
0.08455368131399155,
-0.014035058207809925,
0.021741336211562157,
0.04100768640637398,
-0.0588417574763298,
0.013314850628376007,
-0.04016919061541557,
-0.058734677731990814,
0.03301137313246727,
-0.00856104027479887,
-0.02314276248216629,
-0.0429607629776001,
0.04579136520624161,
0.05102045461535454,
0.09157878160476685,
0.0955103188753128,
-0.03898550197482109,
-0.044263068586587906,
-0.056768182665109634,
0.03503898158669472,
-0.0018022573785856366,
-0.0290885828435421,
-0.11465271562337875,
0.023135533556342125,
-0.019155407324433327,
0.04449767991900444,
-0.0357603095471859,
-0.05961146205663681,
-0.017512373626232147,
-0.03448168933391571,
-0.015611276030540466,
-0.024580849334597588,
0.05639089643955231,
0.02151128090918064,
0.04309353232383728,
0.03830608353018761,
-0.004240848124027252,
0.017704904079437256,
0.05820593610405922,
0.012627576477825642,
-0.0208816509693861,
-0.08603593707084656,
0.053912147879600525,
-0.061398595571517944,
0.054021477699279785,
-0.04912816360592842,
0.06409730762243271,
0.015268828719854355,
0.022305138409137726,
0.03368537500500679,
0.11039051413536072,
-0.015420961193740368,
-0.020488254725933075,
-0.031879909336566925,
-0.029301395639777184,
0.010187143459916115,
-0.07166030257940292,
-0.019447727128863335,
-0.020818717777729034,
0.0005244964850135148,
-0.008358977735042572,
0.026868978515267372,
0.04221152886748314,
-0.12826701998710632,
-0.10743604600429535,
0.017839325591921806,
0.022716527804732323,
-0.005211363080888987,
0.007422642316669226,
-0.03366253897547722,
0.03840644657611847,
0.046335820108652115,
0.057263314723968506,
-0.09599883109331131,
0.11495868116617203,
0.024835022166371346,
-0.06364143639802933,
-0.04880727827548981,
0.025896800681948662,
-0.03587194159626961,
0.06753826141357422,
0.012969119474291801,
0.031643956899642944,
0.025118345394730568,
0.053020820021629333,
-0.07399463653564453,
-0.024568932130932808,
0.035227566957473755,
0.009575890377163887,
0.03331349790096283,
0.040696755051612854,
0.05111050605773926,
0.01865660585463047,
0.044461511075496674,
0.0319354385137558,
0.007271743845194578,
0.03532743453979492,
-0.052762843668460846,
0.03601241856813431,
0.07577021420001984,
0.04085519537329674,
-0.09122028946876526,
-0.005704784300178289,
-0.004161096177995205,
-0.06436669826507568,
0.021963566541671753,
-0.08548163622617722,
4.6177220089840394e-33,
-0.019622744992375374,
-0.04890472814440727,
0.030502164736390114,
-0.061160311102867126,
0.029426131397485733,
-0.10077635198831558,
-0.04767915979027748,
0.009868416003882885,
-0.05438840016722679,
-0.04286547750234604,
-0.05325319245457649,
-0.017036205157637596,
0.020387625321745872,
0.04900643229484558,
0.007223255932331085,
-0.059640686959028244,
-0.009245789609849453,
0.005053704138845205,
0.12083972990512848,
-0.014509357511997223,
0.04286399111151695,
-0.10034622997045517,
-0.07843374460935593,
0.062366124242544174,
-0.01045849360525608,
-0.03340708091855049,
0.04771501570940018,
-0.10185645520687103,
-0.026313072070479393,
0.008169656619429588,
-0.02150801569223404,
-0.005549904424697161,
-0.02868035063147545,
0.03012467734515667,
-0.09496548771858215,
-0.004321289714425802,
-0.008334843441843987,
0.0342571921646595,
-0.030960222706198692,
-0.026024729013442993,
0.021820340305566788,
0.016252262517809868,
0.011758122593164444,
-0.04377877339720726,
0.021037399768829346,
-0.02858571894466877,
0.052341315895318985,
-0.08364412933588028,
-0.07913831621408463,
0.06110072508454323,
0.05501678213477135,
-0.05378243327140808,
0.016368532553315163,
0.0017739366739988327,
0.06345078349113464,
0.017364701256155968,
0.08811714500188828,
-0.03282754123210907,
0.006784853525459766,
0.06668567657470703,
-0.06510110199451447,
-0.06824682652950287,
0.0028564014937728643,
0.02803783304989338,
0.05419119819998741,
0.026625746861100197,
0.0052047916688025,
0.12767107784748077,
-0.04547598212957382,
0.07166138291358948,
-0.03953853249549866,
0.033945232629776,
0.025545192882418633,
0.016685813665390015,
-0.028707945719361305,
-0.014779770746827126,
0.024994848296046257,
-0.02164032682776451,
-0.1746331751346588,
-0.006806341931223869,
0.027628520503640175,
-0.006645666901022196,
0.0014341416535899043,
0.004442071076482534,
-0.06992430984973907,
-0.04996911436319351,
0.004096880555152893,
0.04477984085679054,
-0.026312677189707756,
0.06190251186490059,
0.04047462344169617,
-0.04026893526315689,
-0.06029578670859337,
0.019871199503540993,
-0.14416642487049103,
-4.3801101523027146e-33,
0.07427439838647842,
-0.02757209539413452,
-0.049795545637607574,
0.04553567245602608,
0.062155112624168396,
0.011810940690338612,
-0.010123386979103088,
0.018027031794190407,
-0.0646391361951828,
-0.14295370876789093,
-0.08811985701322556,
-0.07276695966720581,
0.03113870695233345,
0.05349079519510269,
-0.09941543638706207,
-0.05084138736128807,
-0.03449635952711105,
-0.03382411599159241,
-0.013188065961003304,
0.030548198148608208,
-0.08322768658399582,
-0.03296766057610512,
0.07921291887760162,
-0.01143631525337696,
0.0050747389905154705,
0.01248999498784542,
-0.02503352053463459,
0.005013106856495142,
0.021652445197105408,
-0.02685224637389183,
-0.008851823396980762,
-0.10516472905874252,
0.021908625960350037,
0.05344108119606972,
0.031645581126213074,
-0.03481660783290863,
-0.0161476768553257,
0.048848871141672134,
0.011963522993028164,
0.0014580223942175508,
0.045010216534137726,
0.00685870973393321,
-0.022171352058649063,
-0.032395344227552414,
-0.038942672312259674,
0.013536917045712471,
-0.022598428651690483,
-0.05232350155711174,
0.025031678378582,
-0.060930609703063965,
0.001305194804444909,
-0.02554621547460556,
-0.0319221056997776,
0.12500408291816711,
-0.011480508372187614,
-0.028552856296300888,
0.03840116038918495,
0.03650059923529625,
0.002457662718370557,
-0.01600709930062294,
0.07173565030097961,
-0.07510357350111008,
0.013558441773056984,
0.02483137883245945,
0.0348530076444149,
-0.0718100368976593,
-0.006359743885695934,
0.017728783190250397,
-0.030999457463622093,
0.05235834792256355,
0.0432470440864563,
0.03051045536994934,
0.04201310873031616,
0.10813635587692261,
-0.09176807850599289,
-0.025265146046876907,
0.012523319572210312,
-0.0039054015651345253,
0.030691899359226227,
0.016140779480338097,
-0.06346029788255692,
0.08978541940450668,
-0.050774697214365005,
-0.0008810390718281269,
-0.015943950042128563,
0.07515059411525726,
0.030273672193288803,
0.027751795947551727,
0.004190582782030106,
0.007669264450669289,
0.007246788125485182,
-0.018840990960597992,
-0.04494134709239006,
0.10527291893959045,
-0.054880112409591675,
-4.659215591118482e-8,
0.10229521244764328,
-0.020439181476831436,
0.027455968782305717,
0.04089400917291641,
0.06635310500860214,
-0.05015072226524353,
0.038888074457645416,
0.037733934819698334,
0.01126453373581171,
0.056023888289928436,
0.048210762441158295,
-0.011932289227843285,
-0.039580512791872025,
-0.007250992115586996,
0.10722862929105759,
0.020107287913560867,
0.02139904536306858,
0.0291926059871912,
0.05843430384993553,
-0.09032606333494186,
-0.09985525906085968,
-0.05422407016158104,
-0.0354231521487236,
0.008868128061294556,
0.009234088473021984,
0.03899722173810005,
0.1362980604171753,
0.06395888328552246,
0.03124822862446308,
-0.03382690250873566,
-0.09844398498535156,
0.007629184518009424,
-0.07603555172681808,
0.03607267513871193,
0.0203567985445261,
0.014042971655726433,
-0.15639792382717133,
0.030934467911720276,
0.008825656957924366,
0.06046820431947708,
-0.004036819562315941,
-0.048786502331495285,
-0.03349288925528526,
-0.007455431856215,
0.02607451006770134,
0.06719260662794113,
-0.04053650423884392,
0.07765264809131622,
0.014239802956581116,
0.023181764408946037,
0.012256243266165257,
-0.011793921701610088,
0.0006307947915047407,
0.10380937159061432,
-0.05717269331216812,
0.03610789030790329,
0.0013639598619192839,
-0.04473576694726944,
-0.02261132001876831,
-0.028174135833978653,
0.06005086749792099,
0.05237332358956337,
-0.030439630150794983,
0.00023766527010593563
] | 0.175585
|
This page shows how to configure liveness, readiness and startup probes for containers. For more information about probes, see [Liveness, Readiness and Startup Probes](/docs/concepts/configuration/liveness-readiness-startup-probes) The [kubelet](/docs/reference/command-line-tools-reference/kubelet/) uses liveness probes to know when to restart a container. For example, liveness probes could catch a deadlock, where an application is running, but unable to make progress. Restarting a container in such a state can help to make the application more available despite bugs. A common pattern for liveness probes is to use the same low-cost HTTP endpoint as for readiness probes, but with a higher failureThreshold. This ensures that the pod is observed as not-ready for some period of time before it is hard killed. The kubelet uses readiness probes to know when a container is ready to start accepting traffic. One use of this signal is to control which Pods are used as backends for Services. A Pod is considered ready when its `Ready` [condition](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions) is true. When a Pod is not ready, it is removed from Service load balancers. A Pod's `Ready` condition is false when its Node's `Ready` condition is not true, when one of the Pod's `readinessGates` is false, or when at least one of its containers is not ready. The kubelet uses startup probes to know when a container application has started. If such a probe is configured, liveness and readiness probes do not start until it succeeds, making sure those probes don't interfere with the application startup. This can be used to adopt liveness checks on slow starting containers, avoiding them getting killed by the kubelet before they are up and running. {{< caution >}} Liveness probes can be a powerful way to recover from application failures, but they should be used with caution. Liveness probes must be configured carefully to ensure that they truly indicate unrecoverable application failure, for example a deadlock. {{< /caution >}} {{< note >}} Incorrect implementation of liveness probes can lead to cascading failures. This results in restarting of container under high load; failed client requests as your application became less scalable; and increased workload on remaining pods due to some failed pods. Understand the difference between readiness and liveness probes and when to apply them for your app. {{< /note >}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} ## Define a liveness command Many applications running for long periods of time eventually transition to broken states, and cannot recover except by being restarted. Kubernetes provides liveness probes to detect and remedy such situations. In this exercise, you create a Pod that runs a container based on the `registry.k8s.io/busybox:1.27.2` image. Here is the configuration file for the Pod: {{% code\_sample file="pods/probe/exec-liveness.yaml" %}} In the configuration file, you can see that the Pod has a single `Container`. The `periodSeconds` field specifies that the kubelet should perform a liveness probe every 5 seconds. The `initialDelaySeconds` field tells the kubelet that it should wait 5 seconds before performing the first probe. To perform a probe, the kubelet executes the command `cat /tmp/healthy` in the target container. If the command succeeds, it returns 0, and the kubelet considers the container to be alive and healthy. If the command returns a non-zero value, the kubelet kills the container and restarts it. When the container starts, it executes this command: ```shell /bin/sh -c "touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600" ``` For the first 30 seconds of the container's life, there is a `/tmp/healthy` file. So during the first 30 seconds, the command `cat /tmp/healthy` returns a success code. After 30 seconds, `cat /tmp/healthy` returns a failure code. Create the Pod: ```shell kubectl
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
-0.010492962785065174,
-0.012058786116540432,
0.006870587356388569,
0.009757078252732754,
0.018115714192390442,
-0.0649498850107193,
-0.03338158503174782,
-0.026041749864816666,
0.04358893632888794,
0.05066283419728279,
-0.02709338627755642,
-0.013162389397621155,
-0.028498241677880287,
-0.014501182362437248,
0.006131642032414675,
-0.04417159780859947,
0.11033033579587936,
-0.030891206115484238,
-0.03981085121631622,
0.026858525350689888,
-0.054451603442430496,
-0.008180344477295876,
-0.004299123305827379,
-0.009125472977757454,
-0.1047201007604599,
-0.015440257266163826,
-0.04200476035475731,
-0.04187651351094246,
0.02194378897547722,
-0.012403308413922787,
-0.04593896120786667,
0.02686578407883644,
-0.051051441580057144,
-0.008786885999143124,
0.03582567349076271,
0.14647169411182404,
0.042562682181596756,
-0.044307608157396317,
-0.10273128002882004,
0.01802721992135048,
0.006563675124198198,
-0.08315521478652954,
-0.0795038640499115,
0.024525200948119164,
0.006618442013859749,
-0.03318413347005844,
-0.0618046373128891,
-0.058355748653411865,
0.0424397736787796,
-0.0511869415640831,
-0.011469378136098385,
-0.076619952917099,
0.11025203764438629,
0.05356546491384506,
0.06683701276779175,
0.05517303943634033,
0.02033827267587185,
0.0569399930536747,
0.029899749904870987,
0.019887011498212814,
0.026056380942463875,
-0.02012094110250473,
0.022624144330620766,
0.005719566717743874,
0.054428715258836746,
0.018098656088113785,
0.044547583907842636,
-0.020572438836097717,
0.11358539015054703,
-0.01819605380296707,
-0.008693726733326912,
0.03254484012722969,
-0.05800517275929451,
-0.02978965826332569,
-0.023134324699640274,
0.007666248362511396,
0.010043483227491379,
-0.03127137944102287,
-0.009866302832961082,
-0.027522381395101547,
0.009390183724462986,
0.018293382599949837,
0.015168662182986736,
-0.02612331323325634,
-0.07907960563898087,
0.01891171932220459,
0.020726216956973076,
-0.003587170271202922,
0.07513405382633209,
0.013642637990415096,
0.03576058894395828,
0.01858684793114662,
-0.015533702448010445,
-0.05365028232336044,
0.02344563603401184,
0.022620145231485367,
0.0355718694627285,
0.0480520986020565,
0.009400615468621254,
-0.018526174128055573,
0.07010221481323242,
-0.02052328549325466,
-0.00840567983686924,
0.03579962998628616,
0.07509806752204895,
-0.09485425800085068,
-0.015524130314588547,
-0.003191499039530754,
0.0529998354613781,
0.017512809485197067,
-0.02791062742471695,
-0.06524639576673508,
0.05639531835913658,
0.014138464815914631,
-0.05008396506309509,
0.006449106149375439,
-0.052615247666835785,
-0.008349107578396797,
0.0523436963558197,
0.02560429647564888,
0.09893649071455002,
-0.05576355755329132,
0.05851435288786888,
-0.07294349372386932,
0.05552520602941513,
0.024485845118761063,
0.0009272072929888964,
3.100081292913709e-33,
0.03440125659108162,
-0.08010958880186081,
0.014804334379732609,
0.039384424686431885,
-0.027020828798413277,
-0.15197241306304932,
-0.025764500722289085,
0.011215351521968842,
0.00029422639636322856,
-0.03312798589468002,
-0.031281728297472,
0.058580007404088974,
-0.049730073660612106,
-0.020552590489387512,
0.05829707905650139,
-0.04854549467563629,
-0.09352447092533112,
0.01104147918522358,
0.05839123949408531,
0.003170396899804473,
0.027682829648256302,
-0.13032566010951996,
-0.015260325744748116,
-0.015484924428164959,
0.12311501055955887,
-0.019037937745451927,
0.05327114090323448,
0.027616769075393677,
-0.04859117045998573,
0.02228306420147419,
0.030035093426704407,
0.014486889354884624,
-0.0459173358976841,
0.027132606133818626,
-0.1268632858991623,
-0.011836542747914791,
-0.0814720168709755,
0.009676520712673664,
-0.0518328882753849,
-0.06507377326488495,
-0.024972528219223022,
0.0011202477617189288,
-0.036841072142124176,
-0.033457811921834946,
0.06738748401403427,
-0.10284853726625443,
0.006256849970668554,
-0.053813789039850235,
0.021462665870785713,
0.047811999917030334,
0.016991689801216125,
-0.010555749759078026,
0.017712797969579697,
0.004101328086107969,
-0.04313386231660843,
0.06141459569334984,
0.07472512125968933,
-0.08610913157463074,
-0.10776416212320328,
0.021831993013620377,
-0.09351128339767456,
-0.06613597273826599,
0.017689960077404976,
0.024530140683054924,
0.0620608888566494,
0.0730406865477562,
-0.001575454487465322,
0.008447703905403614,
-0.029689529910683632,
0.029807597398757935,
-0.07647357881069183,
-0.016536837443709373,
-0.01389507856220007,
-0.013437563553452492,
-0.04641337692737579,
-0.025884469971060753,
0.005214869976043701,
0.02801787666976452,
-0.08503326773643494,
0.03559516742825508,
0.10642372071743011,
-0.07833943516016006,
-0.018185287714004517,
0.06332474201917648,
0.003857105504721403,
-0.07068479806184769,
-0.022209234535694122,
0.019168291240930557,
-0.1018572524189949,
0.04136091470718384,
0.02125662751495838,
0.06137543544173241,
0.016291934996843338,
0.03952838480472565,
-0.0767524242401123,
-3.7546005882133895e-33,
0.05647939816117287,
-0.06865371018648148,
-0.013668308034539223,
0.07622282207012177,
0.00797911174595356,
0.004746347665786743,
-0.019370799884200096,
0.010200969874858856,
-0.004877544939517975,
-0.04392562434077263,
-0.0405181348323822,
-0.03440364450216293,
-0.019861767068505287,
0.03530490770936012,
-0.12683221697807312,
-0.010156799107789993,
-0.0635928213596344,
-0.05104351043701172,
0.027474990114569664,
0.07792984694242477,
-0.02636267989873886,
0.015104389749467373,
-0.061626095324754715,
-0.026072025299072266,
-0.06341660767793655,
0.03170929104089737,
-0.010393344797194004,
-0.013877902179956436,
-0.1009528860449791,
-0.06121101602911949,
0.09549226611852646,
-0.08622028678655624,
0.02020026370882988,
0.11369907110929489,
0.05476875603199005,
0.02087968774139881,
0.04175854101777077,
0.032441191375255585,
-0.01840008981525898,
0.01817905902862549,
0.10284143686294556,
0.0913650169968605,
-0.016850078478455544,
-0.03290393948554993,
-0.06769169121980667,
0.06770732998847961,
-0.012171381153166294,
-0.007599945645779371,
-0.03891320154070854,
-0.051936373114585876,
0.013964999467134476,
0.013132093474268913,
-0.001191411167383194,
0.07574296742677689,
-0.0322948582470417,
-0.0018404705915600061,
-0.05308356136083603,
0.06828070431947708,
-0.09124461561441422,
0.03495412692427635,
0.09582379460334778,
-0.08036535233259201,
0.06242646649479866,
0.05926666408777237,
-0.03646135702729225,
-0.005444196052849293,
0.0011071576736867428,
0.08213860541582108,
-0.0121400635689497,
0.019415801391005516,
0.09600215405225754,
-0.016034940257668495,
0.0007216152735054493,
0.033576030284166336,
-0.0004962590173818171,
-0.03626170754432678,
-0.03257181495428085,
-0.1265752613544464,
0.022565415129065514,
0.009898023679852486,
-0.08112554997205734,
0.046987537294626236,
-0.08725135773420334,
0.03441561385989189,
0.059567514806985855,
0.054586417973041534,
0.001987346913665533,
0.06657455116510391,
0.09735213965177536,
0.007592964917421341,
-0.028217704966664314,
0.009190438315272331,
-0.08882422745227814,
0.07835440337657928,
-0.03564807400107384,
-5.1363056030595544e-8,
0.09727370738983154,
-0.0305444598197937,
-0.011574477888643742,
0.004491005092859268,
0.050002507865428925,
-0.0009455499821342528,
0.033241190016269684,
-0.03600569814443588,
-0.045822761952877045,
0.046881675720214844,
-0.04777145013213158,
0.04640254005789757,
-0.07258942723274231,
0.01567756198346615,
0.056428249925374985,
-0.023264829069375992,
-0.037246257066726685,
0.025579992681741714,
-0.026294639334082603,
-0.04972759261727333,
-0.07031944394111633,
-0.0028957591857761145,
0.03194083273410797,
0.0410270132124424,
0.06216054409742355,
0.06735093891620636,
0.1555672138929367,
0.0668194591999054,
0.020708784461021423,
0.0021509083453565836,
-0.045838095247745514,
-0.0004841152695007622,
-0.03273897245526314,
0.03264705464243889,
0.0029996277298778296,
0.10246960073709488,
-0.11580002307891846,
0.018691888079047203,
0.04742820933461189,
0.042626235634088516,
-0.036599159240722656,
-0.006091401446610689,
-0.0455281138420105,
-0.00885759387165308,
-0.024490676820278168,
0.01995665952563286,
-0.04399168863892555,
0.06567050516605377,
-0.018962232396006584,
-0.033404991030693054,
0.005707065109163523,
-0.07165604829788208,
-0.014533817768096924,
0.03524386137723923,
0.01678607240319252,
0.06344162672758102,
0.03654807433485985,
-0.03612806648015976,
0.07307563722133636,
0.08662942051887512,
0.03531760722398758,
0.01715669222176075,
0.02321774698793888,
0.015012498013675213
] | 0.209946
|
sleep 30; rm -f /tmp/healthy; sleep 600" ``` For the first 30 seconds of the container's life, there is a `/tmp/healthy` file. So during the first 30 seconds, the command `cat /tmp/healthy` returns a success code. After 30 seconds, `cat /tmp/healthy` returns a failure code. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/probe/exec-liveness.yaml ``` Within 30 seconds, view the Pod events: ```shell kubectl describe pod liveness-exec ``` The output indicates that no liveness probes have failed yet: ```none Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 11s default-scheduler Successfully assigned default/liveness-exec to node01 Normal Pulling 9s kubelet, node01 Pulling image "registry.k8s.io/busybox:1.27.2" Normal Pulled 7s kubelet, node01 Successfully pulled image "registry.k8s.io/busybox:1.27.2" Normal Created 7s kubelet, node01 Created container liveness Normal Started 7s kubelet, node01 Started container liveness ``` After 35 seconds, view the Pod events again: ```shell kubectl describe pod liveness-exec ``` At the bottom of the output, there are messages indicating that the liveness probes have failed, and the failed containers have been killed and recreated. ```none Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 57s default-scheduler Successfully assigned default/liveness-exec to node01 Normal Pulling 55s kubelet, node01 Pulling image "registry.k8s.io/busybox:1.27.2" Normal Pulled 53s kubelet, node01 Successfully pulled image "registry.k8s.io/busybox:1.27.2" Normal Created 53s kubelet, node01 Created container liveness Normal Started 53s kubelet, node01 Started container liveness Warning Unhealthy 10s (x3 over 20s) kubelet, node01 Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory Normal Killing 10s kubelet, node01 Container liveness failed liveness probe, will be restarted ``` Wait another 30 seconds, and verify that the container has been restarted: ```shell kubectl get pod liveness-exec ``` The output shows that `RESTARTS` has been incremented. Note that the `RESTARTS` counter increments as soon as a failed container comes back to the running state: ```none NAME READY STATUS RESTARTS AGE liveness-exec 1/1 Running 1 1m ``` ## Define a liveness HTTP request Another kind of liveness probe uses an HTTP GET request. Here is the configuration file for a Pod that runs a container based on the `registry.k8s.io/e2e-test-images/agnhost` image. {{% code\_sample file="pods/probe/http-liveness.yaml" %}} In the configuration file, you can see that the Pod has a single container. The `periodSeconds` field specifies that the kubelet should perform a liveness probe every 3 seconds. The `initialDelaySeconds` field tells the kubelet that it should wait 3 seconds before performing the first probe. To perform a probe, the kubelet sends an HTTP GET request to the server that is running in the container and listening on port 8080. If the handler for the server's `/healthz` path returns a success code, the kubelet considers the container to be alive and healthy. If the handler returns a failure code, the kubelet kills the container and restarts it. Any code greater than or equal to 200 and less than 400 indicates success. Any other code indicates failure. You can see the source code for the server in [server.go](https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/liveness/server.go). For the first 10 seconds that the container is alive, the `/healthz` handler returns a status of 200. After that, the handler returns a status of 500. ```go http.HandleFunc("/healthz", func(w http.ResponseWriter, r \*http.Request) { duration := time.Now().Sub(started) if duration.Seconds() > 10 { w.WriteHeader(500) w.Write([]byte(fmt.Sprintf("error: %v", duration.Seconds()))) } else { w.WriteHeader(200) w.Write([]byte("ok")) } }) ``` The kubelet starts performing health checks 3 seconds after the container starts. So the first couple of health checks will succeed. But after 10 seconds, the health checks will fail, and the kubelet will kill and restart the container. To try the HTTP liveness check, create a Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/probe/http-liveness.yaml ``` After 10 seconds, view
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
0.04736426845192909,
0.008737499825656414,
-0.003918001893907785,
0.033070310950279236,
0.03949034586548805,
-0.05781498923897743,
-0.057366497814655304,
0.0027048883493989706,
0.0706900805234909,
0.06748884916305542,
0.015229575335979462,
-0.07744073122739792,
-0.03506510332226753,
-0.007876136340200901,
0.0009102076874114573,
-0.046902112662792206,
0.048989105969667435,
-0.03887057304382324,
-0.010684655979275703,
-0.01706889271736145,
-0.02349412627518177,
0.06578998267650604,
0.06093112751841545,
0.008500855416059494,
-0.06269844621419907,
-0.011603840626776218,
-0.07112734764814377,
-0.04239115118980408,
-0.014170532114803791,
-0.014784869737923145,
-0.056672293692827225,
0.010111680254340172,
0.03727550804615021,
0.0034673246555030346,
0.0926743745803833,
0.14946062862873077,
0.016531161963939667,
-0.09231946617364883,
-0.1047537699341774,
-0.0060152593068778515,
0.034100133925676346,
-0.09037519991397858,
-0.09590961039066315,
-0.01806832291185856,
0.03333752602338791,
-0.0016717867692932487,
-0.055401094257831573,
-0.07378137856721878,
0.03629234805703163,
-0.015865562483668327,
-0.06785637140274048,
-0.05311080440878868,
0.08312329649925232,
-0.018101444467902184,
0.09744665026664734,
0.10395309329032898,
-0.03589850291609764,
0.0551779605448246,
0.08017195761203766,
0.021655993536114693,
-0.014624331146478653,
0.00043717320659197867,
0.028111886233091354,
-0.01025443896651268,
0.06999892741441727,
-0.02998828887939453,
-0.03242839500308037,
0.0011942714918404818,
0.06596113741397858,
0.010501593351364136,
0.025810962542891502,
-0.0051010907627642155,
-0.03928092494606972,
0.0004233494692016393,
-0.050466373562812805,
0.04089978709816933,
-0.0007625884609296918,
-0.03430499508976936,
-0.012494911439716816,
-0.04176200553774834,
-0.06155528873205185,
-0.016335660591721535,
-0.011088456958532333,
-0.04467618465423584,
-0.06445280462503433,
0.04269269108772278,
0.0490044467151165,
0.011824585497379303,
0.04296213015913963,
0.027889207005500793,
0.059079188853502274,
-0.000902447965927422,
-0.035788003355264664,
-0.034941766411066055,
0.07245540618896484,
-0.004948191810399294,
-0.019007660448551178,
0.07169465720653534,
-0.001221521059051156,
-0.03600583225488663,
-0.0029292115941643715,
-0.003044632961973548,
-0.03755311667919159,
0.08076949417591095,
0.10570366680622101,
-0.05104053393006325,
-0.0032730589155107737,
-0.04357650876045227,
0.024019794538617134,
0.03203582391142845,
0.011104511097073555,
-0.03729758411645889,
0.05152023956179619,
0.047679685056209564,
0.02246316708624363,
0.06329748034477234,
-0.017712410539388657,
0.03624727204442024,
0.02533172257244587,
0.059483934193849564,
0.10798543691635132,
-0.07921330630779266,
0.005408588331192732,
-0.03422980755567551,
-0.011232072487473488,
0.018392033874988556,
0.11065276712179184,
2.5793620910833982e-33,
0.0875549465417862,
-0.13189062476158142,
-0.00009601334750186652,
0.030610397458076477,
0.018838059157133102,
-0.09308526664972305,
-0.04750347137451172,
0.027200452983379364,
-0.03299099579453468,
0.020010383799672127,
-0.059669263660907745,
-0.010654173791408539,
-0.005326359998434782,
-0.054695483297109604,
-0.01168981846421957,
-0.020746398717164993,
-0.08959108591079712,
0.010824569500982761,
0.026201093569397926,
0.00892545748502016,
0.057613831013441086,
-0.09376856684684753,
-0.05736512318253517,
0.012749372981488705,
-0.01852443814277649,
0.01079176738858223,
0.0533197745680809,
-0.07970818132162094,
0.02200477197766304,
0.02306869626045227,
-0.027271082624793053,
-0.019216161221265793,
-0.023813655599951744,
0.007165014278143644,
-0.13608011603355408,
-0.02430899254977703,
0.0005629243096336722,
0.10117096453905106,
-0.09932328015565872,
-0.04041431471705437,
0.0025151523295789957,
0.004370522685348988,
0.035954199731349945,
-0.0336744524538517,
0.08097954839468002,
-0.04900864139199257,
0.008570670150220394,
-0.028692293912172318,
0.016339769586920738,
0.07488788664340973,
0.03828969970345497,
-0.04514777287840843,
0.028613073751330376,
-0.04741133004426956,
-0.012614580802619457,
0.040598295629024506,
0.09556271135807037,
-0.045800238847732544,
-0.1027568131685257,
0.0934852808713913,
-0.028528910130262375,
0.036949727684259415,
0.03406631946563721,
-0.0286678709089756,
0.0497053898870945,
0.02672901190817356,
-0.006331377197057009,
-0.030876636505126953,
-0.016325710341334343,
0.05819997936487198,
-0.05725209042429924,
0.0010896127205342054,
0.0006901148008182645,
-0.0161385927349329,
-0.039732445031404495,
-0.06579618155956268,
0.038166508078575134,
-0.02243201993405819,
-0.1644364893436432,
-0.00782007072120905,
0.07740594446659088,
-0.05232235789299011,
-0.048051223158836365,
0.011465176939964294,
0.0256498996168375,
-0.0038088338915258646,
-0.054514527320861816,
0.0013010000111535192,
-0.1131838709115982,
0.0662732943892479,
0.013037305325269699,
-0.007752138189971447,
-0.025634359568357468,
0.0005007071886211634,
-0.09387828409671783,
-4.127161400421021e-33,
0.08322421461343765,
-0.038935620337724686,
-0.0023599830456078053,
0.04396767169237137,
0.02470683865249157,
-0.014051198959350586,
-0.040460310876369476,
0.015970151871442795,
-0.006286381743848324,
-0.0025249163154512644,
-0.028755836188793182,
-0.05247146263718605,
0.02435784786939621,
0.017185848206281662,
-0.04210236296057701,
0.007070222869515419,
-0.06546082347631454,
-0.04783691465854645,
-0.050365131348371506,
0.04039480909705162,
0.003468140959739685,
0.0564965158700943,
-0.002909113885834813,
0.04229012876749039,
0.0012082982575520873,
0.05283275246620178,
0.03525508567690849,
0.08438242226839066,
-0.04012879356741905,
-0.07250730693340302,
0.018244970589876175,
-0.08296284079551697,
-0.04928578808903694,
0.1101984977722168,
0.06958364695310593,
0.004370144102722406,
-0.026584522798657417,
0.00707161333411932,
0.03341623768210411,
-0.02940332144498825,
0.10547377914190292,
0.06731706857681274,
-0.0657762661576271,
-0.030075374990701675,
-0.07870758324861526,
0.07411795854568481,
0.03530281409621239,
-0.0675627589225769,
-0.02322668768465519,
-0.06704772263765335,
0.036644499748945236,
-0.00495265144854784,
-0.058048065751791,
0.12596413493156433,
-0.022645579650998116,
0.0026976463850587606,
-0.04640989378094673,
0.010257799178361893,
-0.08316782861948013,
0.027432430535554886,
0.08222652971744537,
-0.0840793028473854,
0.040680937469005585,
-0.0005730667035095394,
-0.00033545782207511365,
-0.04194489121437073,
0.037323880940675735,
0.03418906778097153,
0.037007495760917664,
-0.01016870979219675,
0.11460307985544205,
0.04036249592900276,
-0.07889831811189651,
0.009806747548282146,
0.00511386850848794,
-0.022710710763931274,
-0.08237604051828384,
-0.044997263699769974,
0.015689991414546967,
-0.003769554663449526,
-0.05732182040810585,
0.07231549173593521,
-0.03508426621556282,
0.03480616956949234,
0.06263412535190582,
0.07823611050844193,
0.004348879214376211,
0.06994893401861191,
0.1011958122253418,
0.08172407001256943,
0.046584852039813995,
-0.0013780364533886313,
-0.04522974044084549,
0.09210886806249619,
-0.036574944853782654,
-4.625824345794172e-8,
0.08555982261896133,
-0.062320321798324585,
-0.011700973846018314,
0.08056869357824326,
0.047465164214372635,
-0.0696200504899025,
-0.0020220912992954254,
-0.006985804066061974,
-0.05271490290760994,
0.012988544069230556,
0.020815059542655945,
0.015278819017112255,
-0.037220872938632965,
0.005400568246841431,
0.08182542026042938,
-0.08418641984462738,
-0.054131027311086655,
0.04755381494760513,
-0.010757709853351116,
-0.09598441421985626,
-0.05463036522269249,
-0.051613740622997284,
-0.0017213162500411272,
-0.040613140910863876,
-0.032694872468709946,
0.07209373265504837,
0.08667105436325073,
0.025446055456995964,
0.026662370190024376,
-0.05286925658583641,
-0.0427868589758873,
-0.04161957651376724,
-0.05379809811711311,
0.04624739661812782,
-0.035328418016433716,
-0.0028359275311231613,
-0.04296983778476715,
0.004433225374668837,
-0.01929226890206337,
0.05666358396410942,
-0.0529555007815361,
-0.007978100329637527,
-0.08612659573554993,
-0.007168185897171497,
-0.08413416147232056,
-0.004003095906227827,
-0.017154209315776825,
0.0669151246547699,
0.026409512385725975,
0.011274967342615128,
-0.0054238163866102695,
-0.04108770191669464,
-0.016591927036643028,
0.04491281509399414,
-0.028558092191815376,
-0.020266398787498474,
0.047031182795763016,
-0.0778999999165535,
-0.018892383202910423,
0.05174699053168297,
0.03812960907816887,
-0.008770530112087727,
-0.04720749333500862,
-0.0033359669614583254
] | 0.173006
|
after the container starts. So the first couple of health checks will succeed. But after 10 seconds, the health checks will fail, and the kubelet will kill and restart the container. To try the HTTP liveness check, create a Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/probe/http-liveness.yaml ``` After 10 seconds, view Pod events to verify that liveness probes have failed and the container has been restarted: ```shell kubectl describe pod liveness-http ``` In releases after v1.13, local HTTP proxy environment variable settings do not affect the HTTP liveness probe. ## Define a TCP liveness probe A third type of liveness probe uses a TCP socket. With this configuration, the kubelet will attempt to open a socket to your container on the specified port. If it can establish a connection, the container is considered healthy, if it can't it is considered a failure. {{% code\_sample file="pods/probe/tcp-liveness-readiness.yaml" %}} As you can see, configuration for a TCP check is quite similar to an HTTP check. This example uses both readiness and liveness probes. The kubelet will run the first liveness probe 15 seconds after the container starts. This will attempt to connect to the `goproxy` container on port 8080. If the liveness probe fails, the container will be restarted. The kubelet will continue to run this check every 10 seconds. In addition to the liveness probe, this configuration includes a readiness probe. The kubelet will run the first readiness probe 15 seconds after the container starts. Similar to the liveness probe, this will attempt to connect to the `goproxy` container on port 8080. If the probe succeeds, the Pod will be marked as ready and will receive traffic from services. If the readiness probe fails, the pod will be marked unready and will not receive traffic from any services. To try the TCP liveness check, create a Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/probe/tcp-liveness-readiness.yaml ``` After 15 seconds, view Pod events to verify that liveness probes: ```shell kubectl describe pod goproxy ``` ## Define a gRPC liveness probe {{< feature-state for\_k8s\_version="v1.27" state="stable" >}} If your application implements the [gRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md), this example shows how to configure Kubernetes to use it for application liveness checks. Similarly you can configure readiness and startup probes. Here is an example manifest: {{% code\_sample file="pods/probe/grpc-liveness.yaml" %}} To use a gRPC probe, `port` must be configured. If you want to distinguish probes of different types and probes for different features you can use the `service` field. You can set `service` to the value `liveness` and make your gRPC Health Checking endpoint respond to this request differently than when you set `service` set to `readiness`. This lets you use the same endpoint for different kinds of container health check rather than listening on two different ports. If you want to specify your own custom service name and also specify a probe type, the Kubernetes project recommends that you use a name that concatenates those. For example: `myservice-liveness` (using `-` as a separator). {{< note >}} Unlike HTTP or TCP probes, you cannot specify the health check port by name, and you cannot configure a custom hostname. {{< /note >}} Configuration problems (for example: incorrect port or service, unimplemented health checking protocol) are considered a probe failure, similar to HTTP and TCP probes. To try the gRPC liveness check, create a Pod using the command below. In the example below, the etcd pod is configured to use gRPC liveness probe. ```shell kubectl apply -f https://k8s.io/examples/pods/probe/grpc-liveness.yaml ``` After 15 seconds, view Pod events to verify that the liveness check has not failed: ```shell kubectl describe pod etcd-with-grpc ``` When using a gRPC
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
0.005860334262251854,
0.0530225969851017,
0.02310437336564064,
0.015511910431087017,
-0.026537148281931877,
-0.04278094321489334,
-0.05506535992026329,
-0.049378857016563416,
0.05041230842471123,
0.036610301584005356,
-0.0060837301425635815,
-0.027973569929599762,
-0.020312894135713577,
-0.024423424154520035,
0.02397691272199154,
-0.028912203386425972,
0.10434309393167496,
-0.005465602036565542,
-0.04007335752248764,
0.007102773524820805,
-0.05124910920858383,
-0.002726736944168806,
0.037522073835134506,
-0.016894960775971413,
-0.08409323543310165,
-0.02915780618786812,
-0.0372297428548336,
-0.022047093138098717,
0.028941193595528603,
-0.02214890345931053,
-0.03597640246152878,
-0.000206822543987073,
-0.08737789839506149,
0.00688676442950964,
0.058915093541145325,
0.10091005265712738,
0.055653855204582214,
-0.052465151995420456,
-0.07748319953680038,
0.03468997776508331,
0.040113985538482666,
-0.07443099468946457,
-0.08056975901126862,
-0.030570071190595627,
0.02706209197640419,
0.003352533560246229,
-0.0474545955657959,
-0.02440306916832924,
0.022931043058633804,
-0.058969780802726746,
-0.025440553203225136,
-0.07881700247526169,
0.10813634097576141,
0.0780215784907341,
0.05522928386926651,
-0.005433100275695324,
-0.030639009550213814,
0.07239862531423569,
0.08452211320400238,
0.04270262271165848,
0.00019012355187442154,
-0.0198721531778574,
0.043236929923295975,
0.0063418373465538025,
0.012132489122450352,
-0.021105555817484856,
0.02036455273628235,
0.010943354107439518,
0.08502533286809921,
0.05894956737756729,
-0.0014833984896540642,
0.028497563675045967,
-0.06714942306280136,
0.006767649203538895,
0.01906919851899147,
-0.006220537703484297,
-0.004857717547565699,
-0.03938407823443413,
0.010582107119262218,
0.018899738788604736,
0.01883387379348278,
-0.018352827057242393,
0.008704408071935177,
-0.009753338061273098,
-0.08585785329341888,
-0.02571253664791584,
0.027192676439881325,
-0.0018728862050920725,
0.010724073275923729,
-0.007506868802011013,
0.030542468652129173,
0.027458449825644493,
-0.0037995127495378256,
-0.043880853801965714,
0.033867381513118744,
-0.003420341992750764,
0.021306877955794334,
0.05471881479024887,
0.023419000208377838,
-0.026488464325666428,
0.05074884742498398,
-0.027024053037166595,
-0.031667932868003845,
0.050307344645261765,
0.06919743120670319,
-0.10481802374124527,
-0.024846557527780533,
0.010706854984164238,
0.09778960049152374,
0.04246077686548233,
0.002056192373856902,
-0.051270969212055206,
0.04612045735120773,
0.012607604265213013,
-0.05038722604513168,
0.03934640437364578,
-0.03766247630119324,
0.018012341111898422,
0.03342786803841591,
0.00047935647307895124,
0.10133079439401627,
-0.0875174030661583,
0.03970419615507126,
-0.013083158992230892,
0.01609981805086136,
0.017765842378139496,
0.05450550466775894,
-2.925952835168007e-34,
0.11158744245767593,
-0.09431955218315125,
-0.001415649545378983,
0.011748692020773888,
0.010626614093780518,
-0.13957861065864563,
-0.022208983078598976,
0.03466235473752022,
-0.019311022013425827,
-0.041482966393232346,
-0.05383162572979927,
-0.02338734269142151,
-0.053631991147994995,
-0.037388913333415985,
0.027581673115491867,
0.03140425682067871,
-0.15044979751110077,
0.011368677951395512,
0.07865414023399353,
0.039811693131923676,
0.033575695008039474,
-0.16491417586803436,
0.0063247415237128735,
-0.002352735260501504,
-0.00555841438472271,
-0.025630848482251167,
0.05087767168879509,
-0.013229021802544594,
-0.0961313545703888,
0.006999767851084471,
0.0069575062952935696,
-0.014089263044297695,
-0.02355208806693554,
0.010063810274004936,
-0.12004457414150238,
-0.04312428459525108,
0.007538466714322567,
0.04414578899741173,
-0.06509176641702652,
0.0008489643223583698,
0.0028245302382856607,
-0.012103525921702385,
0.009098568931221962,
-0.022760629653930664,
0.07498844712972641,
-0.09122330695390701,
-0.02225220948457718,
-0.04523436352610588,
0.08407119661569595,
0.05721146985888481,
-0.015127187594771385,
-0.02839229814708233,
0.055394336581230164,
-0.02869562618434429,
0.0033927294425666332,
0.1013215184211731,
0.09095868468284607,
-0.0425824373960495,
-0.10558171570301056,
0.018445918336510658,
-0.05415850877761841,
-0.025279663503170013,
0.03535186126828194,
-0.0026159381959587336,
0.053054917603731155,
0.08067433536052704,
-0.015207388438284397,
0.01957741007208824,
-0.025300325825810432,
0.03269688040018082,
-0.06897690147161484,
0.017130061984062195,
-0.037499405443668365,
-0.022169671952724457,
-0.025411829352378845,
-0.02319720946252346,
0.005006634630262852,
0.04585173353552818,
-0.06559950858354568,
0.060565508902072906,
0.14585000276565552,
-0.06391876190900803,
0.01424237061291933,
0.05439131706953049,
-0.018592527136206627,
-0.03480331972241402,
0.022817060351371765,
-0.019463637843728065,
-0.08697448670864105,
0.026805860921740532,
0.01208103820681572,
0.05097665265202522,
0.003112838137894869,
0.02046695165336132,
-0.05738190934062004,
-1.401368437233171e-33,
0.06029756739735603,
-0.015115868300199509,
0.024778515100479126,
0.07189921289682388,
0.0055297440849244595,
-0.006871812976896763,
-0.007619468029588461,
0.062076739966869354,
0.011613022536039352,
-0.020715469494462013,
0.027164224535226822,
-0.026085706427693367,
0.003333035623654723,
0.03902816027402878,
-0.09715712815523148,
0.015892228111624718,
-0.11140598356723785,
-0.07657197117805481,
-0.0045130690559744835,
0.048967890441417694,
-0.027514440938830376,
-0.02344399131834507,
-0.023045826703310013,
0.013998608104884624,
-0.07872414588928223,
0.00553888501599431,
0.04962555319070816,
-0.021563751623034477,
-0.07959842681884766,
-0.052935849875211716,
0.1028270348906517,
-0.07426635175943375,
0.005429827142506838,
0.16213233768939972,
0.031632229685783386,
-0.006961599923670292,
0.032359201461076736,
0.024951277300715446,
0.03009403683245182,
-0.03756263852119446,
0.09646740555763245,
0.08287106454372406,
-0.05806294456124306,
-0.01102618407458067,
-0.020972464233636856,
0.027421364560723305,
0.021905196830630302,
-0.021903373301029205,
-0.018655791878700256,
-0.07036478072404861,
0.0029490904416888952,
0.050755180418491364,
-0.014989997260272503,
0.11749012023210526,
-0.04226316139101982,
0.01923447474837303,
-0.02740962617099285,
0.06784509867429733,
-0.05853699520230293,
0.008539790287613869,
0.02862119860947132,
-0.09490177780389786,
0.0553075447678566,
0.05477626994252205,
-0.042284946888685226,
0.03505902364850044,
-0.021827824413776398,
0.06049644947052002,
0.041775718331336975,
0.009070984087884426,
0.056194406002759933,
-0.020694365724921227,
-0.0418691486120224,
-0.019669903442263603,
0.023822875693440437,
-0.0027020787820219994,
-0.051745593547821045,
-0.04420194402337074,
0.026422996073961258,
0.07502101361751556,
-0.06714135408401489,
0.04546511173248291,
-0.11036541312932968,
-0.019955912604928017,
0.11512183398008347,
0.06620685756206512,
-0.005437830928713083,
0.04243496432900429,
0.0719609409570694,
0.03560558706521988,
-0.012264781631529331,
0.004008186049759388,
-0.10396231710910797,
0.03794899210333824,
-0.020423032343387604,
-4.187331015259588e-8,
0.08777859061956406,
-0.03125416487455368,
-0.03560761362314224,
0.05524376779794693,
0.033050745725631714,
-0.009326526895165443,
0.03202541545033455,
-0.10451652109622955,
-0.08722293376922607,
0.04300737380981445,
-0.06466567516326904,
0.07241075485944748,
-0.042055681347846985,
0.043430451303720474,
0.04746360704302788,
-0.08684186637401581,
-0.03204423561692238,
0.010251499712467194,
0.001335028326138854,
-0.033393338322639465,
-0.05382091924548149,
-0.041735853999853134,
0.05001058056950569,
0.038008589297533035,
0.007783102337270975,
0.0946163460612297,
0.09254221618175507,
0.023239756003022194,
0.012441707774996758,
-0.017396144568920135,
-0.06899916380643845,
-0.005727890878915787,
-0.10428273677825928,
0.041065189987421036,
-0.039250899106264114,
0.05736115202307701,
-0.15660293400287628,
0.04261874035000801,
0.01888483203947544,
0.06340354681015015,
-0.03255759924650192,
-0.04135742783546448,
-0.07568714022636414,
-0.007470094598829746,
-0.018566034734249115,
0.019546279683709145,
0.0076149832457304,
0.06434550136327744,
-0.031497642397880554,
-0.009688923135399818,
0.045333538204431534,
-0.09655264765024185,
-0.005859041120857,
-0.028198545798659325,
-0.02711774781346321,
0.028099801391363144,
0.03366561979055405,
-0.04766526073217392,
-0.01951547898352146,
0.026733966544270515,
0.05464659258723259,
0.0059255752712488174,
0.013745795004069805,
-0.020376261323690414
] | 0.088041
|
Pod using the command below. In the example below, the etcd pod is configured to use gRPC liveness probe. ```shell kubectl apply -f https://k8s.io/examples/pods/probe/grpc-liveness.yaml ``` After 15 seconds, view Pod events to verify that the liveness check has not failed: ```shell kubectl describe pod etcd-with-grpc ``` When using a gRPC probe, there are some technical details to be aware of: - The probes run against the pod IP address or its hostname. Be sure to configure your gRPC endpoint to listen on the Pod's IP address. - The probes do not support any authentication parameters (like `-tls`). - There are no error codes for built-in probes. All errors are considered as probe failures. - If `ExecProbeTimeout` feature gate is set to `false`, grpc-health-probe does \*\*not\*\* respect the `timeoutSeconds` setting (which defaults to 1s), while built-in probe would fail on timeout. ## Use a named port You can use a named [`port`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#ports) for HTTP and TCP probes. gRPC probes do not support named ports. For example: ```yaml ports: - name: liveness-port containerPort: 8080 livenessProbe: httpGet: path: /healthz port: liveness-port ``` ## Protect slow starting containers with startup probes {#define-startup-probes} Sometimes, you have to deal with applications that require additional startup time on their first initialization. In such cases, it can be tricky to set up liveness probe parameters without compromising the fast response to deadlocks that motivated such a probe. The solution is to set up a startup probe with the same command, HTTP or TCP check, with a `failureThreshold \* periodSeconds` long enough to cover the worst case startup time. So, the previous example would become: ```yaml ports: - name: liveness-port containerPort: 8080 livenessProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 1 periodSeconds: 10 startupProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 30 periodSeconds: 10 ``` Thanks to the startup probe, the application will have a maximum of 5 minutes (30 \* 10 = 300s) to finish its startup. Once the startup probe has succeeded once, the liveness probe takes over to provide a fast response to container deadlocks. If the startup probe never succeeds, the container is killed after 300s and subject to the pod's `restartPolicy`. ## Define readiness probes Sometimes, applications are temporarily unable to serve traffic. For example, an application might need to load large data or configuration files during startup, or depend on external services after startup. In such cases, you don't want to kill the application, but you don't want to send it requests either. Kubernetes provides readiness probes to detect and mitigate these situations. A pod with containers reporting that they are not ready does not receive traffic through Kubernetes Services. {{< note >}} Readiness probes runs on the container during its whole lifecycle. {{< /note >}} {{< caution >}} The readiness and liveness probes do not depend on each other to succeed. If you want to wait before executing a readiness probe, you should use `initialDelaySeconds` or a `startupProbe`. {{< /caution >}} Readiness probes are configured similarly to liveness probes. The only difference is that you use the `readinessProbe` field instead of the `livenessProbe` field. ```yaml readinessProbe: exec: command: - cat - /tmp/healthy initialDelaySeconds: 5 periodSeconds: 5 ``` Configuration for HTTP and TCP readiness probes also remains identical to liveness probes. Readiness and liveness probes can be used in parallel for the same container. Using both can ensure that traffic does not reach a container that is not ready for it, and that containers are restarted when they fail. ## Configure Probes [Probes](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#probe-v1-core) have a number of fields that you can use to more precisely control the behavior of startup, liveness and
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
0.03773697465658188,
0.004720340948551893,
0.05318914353847504,
0.0017126741586253047,
0.018850428983569145,
-0.05408972501754761,
-0.03262452036142349,
-0.059281185269355774,
0.06102220341563225,
0.0729062557220459,
0.006041324231773615,
-0.04694322124123573,
-0.051620226353406906,
0.03534332290291786,
-0.0019328558119013906,
-0.06359318643808365,
0.09532326459884644,
0.016042502596974373,
0.018919093534350395,
0.006398438476026058,
-0.032804202288389206,
-0.008131211623549461,
0.021141961216926575,
0.02673426643013954,
-0.10753742605447769,
-0.06046339124441147,
0.015220669098198414,
-0.02554537169635296,
-0.03848878666758537,
0.01208906527608633,
-0.03477446362376213,
-0.027223849669098854,
-0.021278364583849907,
0.021909574046730995,
0.08170665800571442,
0.12545400857925415,
0.09791180491447449,
-0.009945277124643326,
-0.09142129123210907,
0.014010736718773842,
0.015403959900140762,
-0.08019733428955078,
-0.056885264813899994,
0.009828869253396988,
0.10462314635515213,
-0.004753543995320797,
-0.07735542207956314,
-0.043541569262742996,
0.028743311762809753,
-0.04619637876749039,
0.0012096503050997853,
-0.0182073712348938,
0.14257709681987762,
-0.015933087095618248,
0.07190940529108047,
0.030752386897802353,
-0.021114766597747803,
0.0446522980928421,
0.09210246056318283,
0.007015101611614227,
0.020705334842205048,
-0.06392685323953629,
0.061936672776937485,
-0.02099495567381382,
-0.008632530458271503,
-0.0061867800541222095,
0.056163888424634933,
0.004051272291690111,
0.04995180666446686,
0.05220024287700653,
0.06893713027238846,
0.001244962913915515,
-0.03555753082036972,
-0.02031569369137287,
-0.004848902579396963,
0.04456312581896782,
-0.031135134398937225,
-0.009488184005022049,
0.013722328469157219,
-0.027978822588920593,
-0.002461238531395793,
0.055963288992643356,
-0.0054450067691504955,
-0.0020515790674835443,
-0.08836119621992111,
0.013930796645581722,
0.045339733362197876,
0.004385161679238081,
-0.03289278224110603,
-0.012909431010484695,
0.029977690428495407,
-0.029030323028564453,
-0.045616209506988525,
-0.08527848869562149,
0.03898932412266731,
0.026613175868988037,
-0.01094603817909956,
-0.026409029960632324,
0.003298857482150197,
-0.057001397013664246,
0.004772773943841457,
-0.006111706607043743,
-0.09955739229917526,
0.021914752200245857,
0.07105089724063873,
-0.03490368276834488,
-0.052224259823560715,
-0.018030721694231033,
0.07078109681606293,
0.08754289895296097,
0.0063998023979365826,
-0.008975434117019176,
0.04570617154240608,
0.08376992493867874,
0.0016980536747723818,
0.015607977285981178,
-0.012099006213247776,
0.03918462619185448,
0.017114941030740738,
0.022622009739279747,
0.06392466276884079,
-0.08446792513132095,
0.012317932210862637,
0.013298510573804379,
-0.010576286353170872,
0.07542544603347778,
0.10452030599117279,
3.957526545337826e-33,
0.0910567045211792,
-0.07785872370004654,
-0.01704077050089836,
0.0006814879598096013,
-0.02740672044456005,
-0.09352831542491913,
0.007276264019310474,
0.02733744867146015,
-0.03216411545872688,
0.011057248339056969,
-0.009667029604315758,
0.02584865503013134,
0.010266520082950592,
-0.09067831188440323,
-0.012259144335985184,
0.05870688706636429,
-0.0790509358048439,
-0.014773454517126083,
0.09414546936750412,
0.021977677941322327,
0.00453863525763154,
-0.15569017827510834,
0.005252709612250328,
-0.004056425765156746,
0.045047029852867126,
-0.01439447421580553,
-0.0133805638179183,
-0.08600054681301117,
0.0029898143839091063,
-0.01605306938290596,
-0.0008536625537090003,
-0.04411836713552475,
-0.007182139903306961,
0.023702749982476234,
-0.13804300129413605,
-0.07770010083913803,
0.01648222655057907,
0.05750424042344093,
-0.06343620270490646,
-0.02605918049812317,
0.00987817719578743,
-0.04947735741734505,
0.014460355043411255,
-0.04089846834540367,
0.0705004557967186,
-0.014770744368433952,
0.0037514795549213886,
-0.01388840563595295,
0.018653979524970055,
0.11089643836021423,
-0.016905615106225014,
-0.03327672556042671,
-0.01029195450246334,
-0.027931028977036476,
0.030792606994509697,
0.02651854045689106,
0.061712268739938736,
-0.049290820956230164,
-0.06559668481349945,
0.00724859768524766,
0.002130017150193453,
0.017199138179421425,
0.027137193828821182,
-0.04516955837607384,
0.04769252985715866,
0.015619834885001183,
-0.039192602038383484,
-0.016758950427174568,
-0.03156515583395958,
0.07640077918767929,
-0.04933984950184822,
-0.00607577757909894,
-0.009479857981204987,
-0.02379908598959446,
-0.05331607908010483,
-0.08677521347999573,
-0.02450399659574032,
0.02378668822348118,
-0.04126892611384392,
0.06118279695510864,
0.06183595582842827,
-0.0024164654314517975,
-0.00787067785859108,
0.05078458413481712,
0.029675142839550972,
0.0217313040047884,
-0.047815218567848206,
0.009430843405425549,
-0.10426469892263412,
0.025819210335612297,
0.015872467309236526,
0.04822096228599548,
0.014984842389822006,
0.004885799251496792,
-0.0572497583925724,
-4.561814028290993e-33,
0.036103975027799606,
-0.05355257913470268,
0.04222041368484497,
-0.0005483000422827899,
0.01783638261258602,
-0.04705299437046051,
-0.05945941433310509,
0.03142482787370682,
0.005154796410351992,
-0.022814137861132622,
0.021447746083140373,
-0.08738298714160919,
0.005976758431643248,
0.034621816128492355,
-0.09305109083652496,
0.029510632157325745,
-0.12668554484844208,
-0.05208687111735344,
0.0013981445226818323,
0.018713854253292084,
-0.010809228755533695,
0.023467155173420906,
0.03311659023165703,
0.02147948369383812,
-0.02342664636671543,
0.018924616277217865,
0.08666624873876572,
0.016801537945866585,
-0.04732268303632736,
-0.0874517485499382,
0.1300889551639557,
-0.039490390568971634,
-0.07215075939893723,
0.14297086000442505,
0.04147495701909065,
-0.015884580090641975,
0.005358296446502209,
0.031238088384270668,
0.003915644716471434,
-0.03558081015944481,
0.012659155763685703,
0.0951722115278244,
-0.09272238612174988,
-0.02227610908448696,
-0.05825140327215195,
0.028893260285258293,
0.014325167052447796,
0.03977075219154358,
0.011662720702588558,
-0.04382436349987984,
0.007410833612084389,
0.019573403522372246,
-0.04717922955751419,
0.14078828692436218,
-0.057075612246990204,
0.03473375737667084,
-0.0012800080003216863,
0.050277192145586014,
-0.06814483553171158,
0.0017600468127056956,
0.049609847366809845,
-0.12161524593830109,
0.05754408985376358,
0.08174672722816467,
-0.03990146890282631,
0.036726050078868866,
0.018780767917633057,
0.09458175301551819,
0.004833719227463007,
0.004819867201149464,
0.059410665184259415,
-0.03808470442891121,
-0.014520584605634212,
0.03949309140443802,
0.03494887053966522,
0.025379827246069908,
-0.07411693036556244,
-0.04326940327882767,
0.06576146185398102,
0.024474844336509705,
-0.027742058038711548,
0.07438021898269653,
-0.11386048793792725,
0.06453879177570343,
0.06513011455535889,
0.07300552725791931,
-0.021241769194602966,
0.08452315628528595,
0.0731484517455101,
0.06739519536495209,
0.016380516812205315,
-0.006324533373117447,
-0.06780718266963959,
0.012894733808934689,
-0.015146412886679173,
-4.667699826654825e-8,
0.06657462567090988,
-0.06286771595478058,
0.012935624457895756,
-0.007336016744375229,
0.03340225666761398,
-0.019797956570982933,
0.031599950045347214,
-0.07336461544036865,
-0.07362289726734161,
-0.015368416905403137,
-0.03275655582547188,
0.03977244347333908,
-0.08238331228494644,
0.047013428062200546,
0.0809980258345604,
-0.06402429938316345,
0.0129175940528512,
0.06668785959482193,
-0.00549813499674201,
-0.07658258080482483,
-0.08176643401384354,
-0.06313858181238174,
-0.01367110200226307,
-0.012217530980706215,
-0.041610077023506165,
0.07878854125738144,
0.10808110982179642,
-0.02716796286404133,
0.0022658344823867083,
-0.028782321140170097,
-0.06541620939970016,
-0.04490404203534126,
-0.0582209974527359,
0.007721917238086462,
0.022476280108094215,
0.06978660821914673,
-0.06005014479160309,
0.03379172459244728,
-0.007234363351017237,
0.04328932985663414,
-0.11237994581460953,
-0.014807547442615032,
-0.07440323382616043,
-0.024168282747268677,
-0.03056197054684162,
-0.011554238386452198,
0.006329086143523455,
0.04340554401278496,
-0.03152002766728401,
0.030940933153033257,
0.020267726853489876,
-0.1299564689397812,
0.052916839718818665,
-0.014001899398863316,
-0.05479290336370468,
0.004447096027433872,
-0.006962065119296312,
-0.08831772953271866,
0.004967196844518185,
0.07881919294595718,
0.03417098522186279,
-0.009399468079209328,
-0.00516843656077981,
-0.0019670368637889624
] | 0.087522
|
both can ensure that traffic does not reach a container that is not ready for it, and that containers are restarted when they fail. ## Configure Probes [Probes](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#probe-v1-core) have a number of fields that you can use to more precisely control the behavior of startup, liveness and readiness checks: \* `initialDelaySeconds`: Number of seconds after the container has started before startup, liveness or readiness probes are initiated. If a startup probe is defined, liveness and readiness probe delays do not begin until the startup probe has succeeded. In some older Kubernetes versions, the initialDelaySeconds might be ignored if periodSeconds was set to a value higher than initialDelaySeconds. However, in current versions, initialDelaySeconds is always honored and the probe will not start until after this initial delay. Defaults to 0 seconds. Minimum value is 0. \* `periodSeconds`: How often (in seconds) to perform the probe. Default to 10 seconds. The minimum value is 1. While a container is not Ready, the `ReadinessProbe` may be executed at times other than the configured `periodSeconds` interval. This is to make the Pod ready faster. \* `timeoutSeconds`: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. \* `successThreshold`: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Minimum value is 1. \* `failureThreshold`: After a probe fails `failureThreshold` times in a row, Kubernetes considers that the overall check has failed: the container is \_not\_ ready/healthy/live. Defaults to 3. Minimum value is 1. For the case of a startup or liveness probe, if at least `failureThreshold` probes have failed, Kubernetes treats the container as unhealthy and triggers a restart for that specific container. The kubelet honors the setting of `terminationGracePeriodSeconds` for that container. For a failed readiness probe, the kubelet continues running the container that failed checks, and also continues to run more probes; because the check failed, the kubelet sets the `Ready` [condition](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions) on the Pod to `false`. \* `terminationGracePeriodSeconds`: configure a grace period for the kubelet to wait between triggering a shut down of the failed container, and then forcing the container runtime to stop that container. The default is to inherit the Pod-level value for `terminationGracePeriodSeconds` (30 seconds if not specified), and the minimum value is 1. See [probe-level `terminationGracePeriodSeconds`](#probe-level-terminationgraceperiodseconds) for more detail. {{< caution >}} Incorrect implementation of readiness probes may result in an ever growing number of processes in the container, and resource starvation if this is left unchecked. {{< /caution >}} ### HTTP probes [HTTP probes](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#httpgetaction-v1-core) have additional fields that can be set on `httpGet`: \* `host`: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in `httpHeaders` instead. \* `scheme`: Scheme to use for connecting to the host (HTTP or HTTPS). Defaults to "HTTP". \* `path`: Path to access on the HTTP server. Defaults to "/". \* `httpHeaders`: Custom headers to set in the request. HTTP allows repeated headers. \* `port`: Name or number of the port to access on the container. Number must be in the range 1 to 65535. For an HTTP probe, the kubelet sends an HTTP request to the specified port and path to perform the check. The kubelet sends the probe to the Pod's IP address, unless the address is overridden by the optional `host` field in `httpGet`. If `scheme` field is set to `HTTPS`, the kubelet sends an HTTPS request skipping the certificate verification. In most scenarios, you do not want to set the `host` field. Here's
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
-0.004186135716736317,
0.0043273507617414,
0.036087196320295334,
0.039703115820884705,
0.0408799946308136,
-0.01703440584242344,
-0.023909972980618477,
-0.0406983308494091,
0.10735463351011276,
0.02495574951171875,
-0.03137952461838722,
-0.009764516726136208,
-0.02497810497879982,
0.015502686612308025,
-0.0316745787858963,
-0.045188095420598984,
0.10219466686248779,
-0.07154329121112823,
-0.00012263903045095503,
0.005286590661853552,
-0.035656824707984924,
-0.029181869700551033,
0.005737852770835161,
-0.024627160280942917,
-0.0982690304517746,
-0.04122202470898628,
-0.05152609944343567,
-0.04420170187950134,
0.039908669888973236,
0.04340304061770439,
-0.08586443215608597,
0.0009870413923636079,
-0.036098331212997437,
0.050256457179784775,
0.02538067102432251,
0.06009792163968086,
0.051541510969400406,
-0.02104964666068554,
-0.1029333621263504,
0.07045610249042511,
0.015464557334780693,
-0.10489042848348618,
-0.0745297223329544,
-0.018135566264390945,
0.04259872809052467,
-0.021351046860218048,
-0.01828308403491974,
-0.044211603701114655,
0.0017228168435394764,
0.006700693629682064,
0.03042006865143776,
-0.08865318447351456,
0.0946464017033577,
0.018839983269572258,
0.07320470362901688,
0.05408333241939545,
-0.050320710986852646,
0.054849304258823395,
0.06526847928762436,
0.011530370451509953,
-0.03180902078747749,
-0.055342208594083786,
-0.008703388273715973,
0.011077099479734898,
0.08228527009487152,
0.002254578284919262,
0.051768407225608826,
-0.03483693674206734,
0.10858648270368576,
0.018777402117848396,
0.04443454369902611,
0.0366913340985775,
0.0240517295897007,
-0.03419407829642296,
0.005360879469662905,
0.008534803986549377,
-0.0022493337746709585,
0.01116078719496727,
0.01938076689839363,
-0.07166673243045807,
-0.02017289400100708,
-0.0063218059949576855,
0.011638186872005463,
-0.03677215427160263,
-0.13641007244586945,
-0.0040617636404931545,
0.027577150613069534,
-0.04310810938477516,
0.05156710371375084,
-0.02630867436528206,
0.06455320864915848,
-0.0076154437847435474,
-0.07118429988622665,
-0.04658835753798485,
0.047030750662088394,
0.04698354750871658,
-0.007438612636178732,
0.03137940168380737,
0.05830894038081169,
-0.045373763889074326,
0.03313297778367996,
-0.024638306349515915,
-0.009108645841479301,
0.07304064929485321,
0.05928918346762657,
-0.07515870779752731,
-0.002139466581866145,
-0.040329087525606155,
-0.0017071506008505821,
0.07836240530014038,
0.05680157244205475,
-0.015595655888319016,
0.1219337061047554,
0.026719670742750168,
-0.004221382550895214,
0.01896783336997032,
-0.031956810504198074,
-0.016358081251382828,
0.06666713207960129,
0.05306384339928627,
0.03267474099993706,
-0.08204077184200287,
0.07373756170272827,
-0.0688060000538826,
-0.0019250804325565696,
0.06830529868602753,
0.001959273125976324,
5.4062708028224926e-33,
0.01568685658276081,
-0.0743619054555893,
0.0023661183658987284,
0.020520538091659546,
-0.05147944763302803,
-0.09124443680047989,
-0.023383906111121178,
0.03099784068763256,
-0.017981473356485367,
-0.02045559696853161,
-0.09274990111589432,
0.06406416743993759,
-0.040594253689050674,
-0.06044001504778862,
0.011066287755966187,
0.037150997668504715,
-0.044355232268571854,
-0.021564530208706856,
0.02362077683210373,
-0.013969075866043568,
0.03600253164768219,
-0.1538040041923523,
-0.010001283138990402,
-0.005503582768142223,
0.10400241613388062,
-0.10129836946725845,
0.027075117453932762,
0.002640025457367301,
-0.1055511087179184,
0.013401886448264122,
-0.04431150481104851,
-0.006314181722700596,
-0.04381523281335831,
0.04495823010802269,
-0.12277915328741074,
0.0020810533314943314,
-0.004231848753988743,
0.04021116718649864,
-0.06533967703580856,
-0.06630698591470718,
-0.023288417607545853,
0.024541892111301422,
0.018081247806549072,
-0.04357453063130379,
0.05854637175798416,
-0.10502415150403976,
-0.016505787149071693,
-0.03470311686396599,
0.06183408573269844,
0.06937742978334427,
0.03270933777093887,
-0.006523821037262678,
0.032839614897966385,
-0.0527363084256649,
0.03263618052005768,
0.03646375611424446,
0.11712297052145004,
-0.13229399919509888,
-0.1173330694437027,
0.03830135986208916,
-0.051318828016519547,
-0.10070022195577621,
0.0003781751438509673,
-0.004013613797724247,
0.08278913050889969,
0.11773575842380524,
0.02457849308848381,
0.026351774111390114,
-0.033836476504802704,
-0.0016893784049898386,
-0.07089686393737793,
-0.019989915192127228,
-0.03970225155353546,
0.003853783244267106,
0.010455875657498837,
-0.04495116323232651,
0.03856143727898598,
0.06517717242240906,
-0.04641564562916756,
0.04475057125091553,
0.06065027043223381,
-0.022898010909557343,
-0.021509334444999695,
0.0858711525797844,
-0.05433882772922516,
-0.04930459335446358,
-0.0033427730668336153,
-0.0284963957965374,
-0.007590673863887787,
0.003079573158174753,
0.01932457834482193,
0.05413878709077835,
0.004683935083448887,
0.058998409658670425,
-0.05435819551348686,
-5.5592224543316424e-33,
0.07301152497529984,
-0.0060141850262880325,
-0.01987254060804844,
0.04232615977525711,
0.02582624740898609,
-0.0016979894135147333,
0.025945907458662987,
0.00490027479827404,
0.03804245963692665,
-0.06741992384195328,
0.03412381187081337,
-0.08091870695352554,
-0.042367227375507355,
0.0030652780551463366,
-0.1047261506319046,
-0.01908039301633835,
-0.04745209217071533,
-0.07744556665420532,
0.02902114950120449,
0.03030344285070896,
0.008777827955782413,
-0.02324942871928215,
-0.03870003670454025,
-0.049034155905246735,
-0.06282325834035873,
0.0159433726221323,
-0.009261914528906345,
0.015651162713766098,
-0.10361284017562866,
-0.011557717807590961,
0.06103596091270447,
-0.06015592813491821,
0.055089011788368225,
0.1106969341635704,
0.006968480069190264,
0.014829734340310097,
0.0412001796066761,
-0.004622257314622402,
0.02147766947746277,
0.02270575426518917,
0.06535040587186813,
0.1245686486363411,
-0.00883159227669239,
-0.001337753375992179,
-0.06557517498731613,
0.07800477743148804,
0.042114973068237305,
-0.03426358476281166,
-0.05312476307153702,
-0.09819421917200089,
-0.018437054008245468,
0.04090740904211998,
-0.03875058516860008,
0.07813624292612076,
-0.0363265685737133,
0.027406997978687286,
0.013093709014356136,
0.07572135329246521,
-0.0697699785232544,
0.06570393592119217,
0.09074410051107407,
-0.07912249863147736,
0.048083119094371796,
0.0734063908457756,
-0.06775660067796707,
0.0074330042116343975,
0.02116377279162407,
0.07752951979637146,
0.008366652764379978,
0.0058372728526592255,
0.014238580130040646,
-0.013284774497151375,
0.0014079050160944462,
0.019732559099793434,
-0.03059094399213791,
-0.04926964268088341,
0.002026318572461605,
-0.07553832978010178,
0.029271356761455536,
-0.016603467985987663,
-0.09434159845113754,
0.041579652577638626,
-0.12770716845989227,
0.05421331152319908,
0.010014861822128296,
0.08149509131908417,
0.022581515833735466,
0.02130841836333275,
0.07815689593553543,
0.042967136949300766,
0.020762277767062187,
-0.021320903673768044,
-0.06280198693275452,
0.06208549439907074,
-0.04471411556005478,
-5.307989070502117e-8,
0.02417917177081108,
0.0001963336835615337,
-0.01465753372758627,
-0.010208225809037685,
0.01839933544397354,
0.004637562669813633,
0.02088511921465397,
-0.045617684721946716,
-0.05095560848712921,
0.03045482747256756,
-0.0028084595687687397,
0.10136165469884872,
-0.05852802097797394,
-0.024323763325810432,
0.04072147607803345,
-0.022725069895386696,
-0.013024830259382725,
-0.03376958519220352,
-0.0249143335968256,
-0.021905001252889633,
-0.045768339186906815,
0.010695870034396648,
-0.023539720103144646,
0.010992578230798244,
0.02832384593784809,
0.060579799115657806,
0.10660446435213089,
0.05811605602502823,
0.015582911670207977,
-0.00062875438015908,
-0.06510990113019943,
0.0277143195271492,
-0.05731263756752014,
0.056648023426532745,
-0.04106038436293602,
0.07349696755409241,
-0.11328047513961792,
0.03871750086545944,
0.024692779406905174,
0.08708871901035309,
-0.005939226131886244,
-0.02183140255510807,
-0.05800896883010864,
-0.02232414297759533,
-0.053922560065984726,
0.02433057501912117,
-0.020177286118268967,
0.056553203612565994,
-0.0253622867166996,
-0.055206768214702606,
-0.0021170019172132015,
-0.071673683822155,
0.005833280272781849,
0.027720117941498756,
-0.01869310438632965,
-0.004560762085020542,
0.02215096913278103,
-0.039414726197719574,
0.02352491393685341,
0.060890670865774155,
0.021754253655672073,
0.04132632538676262,
0.02458289824426174,
-0.05705142393708229
] | 0.144128
|
sends the probe to the Pod's IP address, unless the address is overridden by the optional `host` field in `httpGet`. If `scheme` field is set to `HTTPS`, the kubelet sends an HTTPS request skipping the certificate verification. In most scenarios, you do not want to set the `host` field. Here's one scenario where you would set it. Suppose the container listens on 127.0.0.1 and the Pod's `hostNetwork` field is true. Then `host`, under `httpGet`, should be set to 127.0.0.1. If your pod relies on virtual hosts, which is probably the more common case, you should not use `host`, but rather set the `Host` header in `httpHeaders`. For an HTTP probe, the kubelet sends two request headers in addition to the mandatory `Host` header: - `User-Agent`: The default value is `kube-probe/{{< skew currentVersion >}}`, where `{{< skew currentVersion >}}` is the version of the kubelet. - `Accept`: The default value is `\*/\*`. You can override the default headers by defining `httpHeaders` for the probe. For example: ```yaml livenessProbe: httpGet: httpHeaders: - name: Accept value: application/json startupProbe: httpGet: httpHeaders: - name: User-Agent value: MyUserAgent ``` You can also remove these two headers by defining them with an empty value. ```yaml livenessProbe: httpGet: httpHeaders: - name: Accept value: "" startupProbe: httpGet: httpHeaders: - name: User-Agent value: "" ``` {{< note >}} When the kubelet probes a Pod using HTTP, it only follows redirects if the redirect is to the same host. If the kubelet receives 11 or more redirects during probing, the probe is considered successful and a related Event is created: ```none Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 29m default-scheduler Successfully assigned default/httpbin-7b8bc9cb85-bjzwn to daocloud Normal Pulling 29m kubelet Pulling image "docker.io/kennethreitz/httpbin" Normal Pulled 24m kubelet Successfully pulled image "docker.io/kennethreitz/httpbin" in 5m12.402735213s Normal Created 24m kubelet Created container httpbin Normal Started 24m kubelet Started container httpbin Warning ProbeWarning 4m11s (x1197 over 24m) kubelet Readiness probe warning: Probe terminated redirects ``` If the kubelet receives a redirect where the hostname is different from the request, the outcome of the probe is treated as successful and kubelet creates an event to report the redirect failure. {{< /note >}} {{< caution >}} When processing an \*\*httpGet\*\* probe, the kubelet stops reading the response body after 10KiB. The probe's success is determined solely by the response status code, which is found in the response headers. If you probe an endpoint that returns a response body larger than \*\*10KiB\*\*, the kubelet will still mark the probe as successful based on the status code, but it will close the connection after reaching the 10KiB limit. This abrupt closure can cause \*\*connection reset by peer\*\* or \*\*broken pipe errors\*\* to appear in your application's logs, which can be difficult to distinguish from legitimate network issues. For reliable `httpGet` probes, it is strongly recommended to use dedicated health check endpoints that return a minimal response body. If you must use an existing endpoint with a large payload, consider using an `exec` probe to perform a HEAD request instead. {{< /caution >}} ### TCP probes For a TCP probe, the kubelet makes the probe connection at the node, not in the Pod, which means that you can not use a service name in the `host` parameter since the kubelet is unable to resolve it. ### Probe-level `terminationGracePeriodSeconds` {{< feature-state for\_k8s\_version="v1.28" state="stable" >}} In 1.25 and above, users can specify a probe-level `terminationGracePeriodSeconds` as part of the probe specification. When both a pod- and probe-level `terminationGracePeriodSeconds` are set, the kubelet will use the probe-level value. When setting the `terminationGracePeriodSeconds`, please note the following: \* The
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
0.07326535135507584,
0.06684823334217072,
0.02925202250480652,
0.016845518723130226,
-0.05142383277416229,
-0.05931466072797775,
-0.0052536120638251305,
-0.08101517707109451,
0.0804636999964714,
0.007124975323677063,
-0.0589556060731411,
-0.08660820126533508,
0.002548030111938715,
0.002300742780789733,
0.014532573521137238,
-0.061768341809511185,
0.07824073731899261,
0.043535929173231125,
0.07778432220220566,
-0.03237246721982956,
-0.04056335613131523,
0.02119242027401924,
0.10223241150379181,
-0.004838498309254646,
-0.10507193207740784,
-0.08169908076524734,
0.024899311363697052,
0.02215208299458027,
0.007777069695293903,
-0.030366508290171623,
-0.018476391211152077,
0.012686674483120441,
0.00365148251876235,
0.06075897812843323,
0.020275039598345757,
0.033443618565797806,
0.05769060179591179,
-0.008279052563011646,
-0.10111630707979202,
0.06368549168109894,
0.06483549624681473,
-0.07158961147069931,
-0.05933116003870964,
-0.04120638221502304,
-0.03959287703037262,
0.028574682772159576,
-0.017359795048832893,
-0.03810051828622818,
0.025099346414208412,
-0.049101248383522034,
0.0054211243987083435,
-0.07014232128858566,
0.09996755421161652,
0.05187123641371727,
0.039373427629470825,
0.0439046211540699,
0.005373088177293539,
0.06967509537935257,
0.08879583328962326,
0.04709625244140625,
0.008272523991763592,
-0.03765127807855606,
-0.011321544647216797,
-0.01962968148291111,
0.0017253188416361809,
-0.06585706025362015,
-0.009048250503838062,
0.03295315429568291,
0.023825883865356445,
0.04404296353459358,
0.08062291145324707,
0.021570604294538498,
-0.011142906732857227,
-0.0491931289434433,
0.03275411203503609,
0.007312895264476538,
-0.06970339268445969,
-0.01556005235761404,
0.02191220596432686,
0.03474925458431244,
0.01895047165453434,
-0.016368621960282326,
0.04610596224665642,
-0.03692089766263962,
-0.11578886210918427,
-0.03538120537996292,
0.029927901923656464,
-0.026569576933979988,
0.05115046724677086,
0.02707613632082939,
0.02895870804786682,
-0.05173034220933914,
-0.0589967705309391,
-0.05740850791335106,
0.08490539342164993,
0.058679353445768356,
0.056431230157613754,
-0.013641557656228542,
-0.0032978036906570196,
-0.05304020270705223,
0.09111922234296799,
-0.029189586639404297,
-0.04544529691338539,
-0.015332532115280628,
0.082606740295887,
-0.027888640761375427,
-0.04481995105743408,
-0.012866598553955555,
0.08837328851222992,
0.015492349863052368,
0.015154870226979256,
-0.05241880193352699,
0.041407033801078796,
0.03260080888867378,
-0.037046823650598526,
0.05053352937102318,
0.029814912006258965,
0.06103147938847542,
0.005915875546634197,
-0.03613001108169556,
-0.02822231501340866,
-0.05239830166101456,
0.02483687736093998,
0.030212607234716415,
-0.09766224026679993,
0.009911430068314075,
0.021498294547200203,
2.5452441940702467e-34,
0.10808340460062027,
0.005814476870000362,
-0.0006553981802426279,
-0.04062281548976898,
-0.007516482379287481,
-0.08929941058158875,
-0.015662802383303642,
0.056576844304800034,
-0.04116983711719513,
-0.01169529464095831,
-0.026627441868185997,
-0.016595249995589256,
-0.016244569793343544,
-0.014469344168901443,
-0.028229422867298126,
0.06375020742416382,
-0.11527162045240402,
0.031414810568094254,
0.08398605138063431,
0.06864658743143082,
0.01111325342208147,
-0.1200476884841919,
-0.010389024391770363,
0.05315788835287094,
0.03938395902514458,
-0.037923190742731094,
0.007289288565516472,
-0.053694359958171844,
-0.08378525823354721,
-0.005288902670145035,
-0.011951537802815437,
0.005618605297058821,
0.0007598475785925984,
-0.011718644760549068,
-0.07914259284734726,
0.0056168693117797375,
0.038973618298769,
0.0365607924759388,
-0.0747343897819519,
0.0005689826793968678,
0.05784706026315689,
-0.027961010113358498,
0.01850859262049198,
-0.007220176979899406,
0.04065929353237152,
-0.019071172922849655,
0.030221136286854744,
-0.06835241615772247,
0.09902234375476837,
0.12523145973682404,
-0.05631999671459198,
-0.052100714296102524,
0.018901417031884193,
-0.06893931329250336,
0.06664380431175232,
0.030514391139149666,
0.09688208997249603,
-0.022334005683660507,
-0.0841379314661026,
-0.006680431310087442,
-0.05692875385284424,
-0.035553522408008575,
0.007208718918263912,
-0.017911506816744804,
0.05438043549656868,
0.13214866816997528,
-0.02670891582965851,
0.04739817604422569,
-0.017284391447901726,
0.0548492968082428,
-0.08072143793106079,
0.04442142695188522,
-0.06977561116218567,
0.01563187502324581,
-0.050468601286411285,
0.011252721771597862,
-0.02734418399631977,
0.06136733293533325,
-0.021994303911924362,
0.012019827030599117,
0.07833784073591232,
0.02192837931215763,
0.024490907788276672,
0.08870482444763184,
-0.043075744062662125,
-0.008702368475496769,
0.002286383183673024,
0.011575361713767052,
-0.025104178115725517,
0.004454487934708595,
0.01399433333426714,
0.05708539858460426,
-0.05091308057308197,
0.046353697776794434,
-0.10853217542171478,
-1.6910630506860734e-33,
0.05594101548194885,
-0.012414200231432915,
-0.009199571795761585,
0.028576329350471497,
-0.015260263346135616,
-0.012603949755430222,
0.03784516453742981,
0.02576722577214241,
0.0068646082654595375,
-0.01064674649387598,
0.008045671507716179,
-0.0858905017375946,
0.026953617110848427,
-0.022999776527285576,
-0.09587296843528748,
-0.00033917080145329237,
-0.10290417820215225,
-0.018856817856431007,
-0.02839748002588749,
0.01222518365830183,
-0.05020106956362724,
-0.0020897940266877413,
0.014682658016681671,
-0.01549005787819624,
-0.06588319689035416,
-0.019078625366091728,
0.03979325667023659,
-0.033300451934337616,
-0.10509689897298813,
-0.08094710856676102,
0.08156996220350266,
-0.04917168617248535,
0.007174934260547161,
0.047488078474998474,
-0.04166702926158905,
-0.0029087529983371496,
-0.011866261251270771,
0.07633375376462936,
0.063430555164814,
0.043933480978012085,
0.0009750194731168449,
0.04712074249982834,
-0.06949873268604279,
0.029849866405129433,
-0.0316387414932251,
-0.03161485120654106,
-0.00620658602565527,
0.03267308697104454,
0.028370052576065063,
-0.05413547903299332,
-0.026691503822803497,
0.01029115915298462,
-0.025675376877188683,
0.06530699133872986,
-0.041111551225185394,
0.03681959956884384,
-0.02576720342040062,
0.09821479022502899,
-0.040931832045316696,
0.04292718321084976,
0.02588735520839691,
-0.08471269905567169,
0.024961402639746666,
0.05942828953266144,
-0.06100500375032425,
0.039246995002031326,
0.009707978926599026,
0.07064864784479141,
0.05927157402038574,
0.04412824660539627,
0.020087597891688347,
-0.08250044286251068,
0.0481630340218544,
0.007503650151193142,
0.035237930715084076,
-0.02773839607834816,
0.032169196754693985,
0.021600278094410896,
0.04713182523846626,
0.03347468376159668,
-0.028405260294675827,
0.0940493643283844,
-0.06189986318349838,
-0.0023205026518553495,
0.11907356232404709,
0.07243996113538742,
0.008580869063735008,
-0.01779845729470253,
-0.003594470676034689,
0.05467705428600311,
0.03464202955365181,
0.038580093532800674,
-0.036308933049440384,
0.00609905831515789,
0.00639162864536047,
-4.783940710240131e-8,
0.09306012839078903,
0.00036299621569924057,
-0.06226086616516113,
0.01291715819388628,
0.007824593223631382,
0.03014594316482544,
-0.022034280002117157,
-0.12551143765449524,
-0.0851418524980545,
0.02004595287144184,
-0.11610500514507294,
0.02024359442293644,
-0.06362440437078476,
0.039248932152986526,
0.07437588274478912,
-0.058305706828832626,
-0.00647760508581996,
-0.010406765155494213,
0.0033323082607239485,
-0.049999408423900604,
-0.05881018936634064,
-0.05843717232346535,
-0.02013145014643669,
0.06369414925575256,
0.013918271288275719,
0.08830786496400833,
0.06608565151691437,
-0.023737149313092232,
0.054491493850946426,
0.03816753998398781,
-0.04280070215463638,
-0.003984231501817703,
-0.10650207102298737,
-0.0001369040837744251,
0.0039723580703139305,
0.09168316423892975,
-0.19297340512275696,
-0.007790699601173401,
-0.009029434993863106,
0.06935987621545792,
-0.05997879058122635,
-0.041446708142757416,
-0.025848068296909332,
-0.031922560185194016,
-0.07742656767368317,
0.02513251081109047,
0.0033424587454646826,
0.060408614575862885,
-0.00788802932947874,
0.02352343499660492,
0.0021507812198251486,
-0.08892575651407242,
0.00457494193688035,
-0.005574749782681465,
-0.04044647142291069,
0.07775621116161346,
-0.04660506173968315,
-0.10084954649209976,
-0.03615729138255119,
0.007866616360843182,
0.019751274958252907,
-0.0031777257099747658,
0.001688690041191876,
-0.02927076630294323
] | 0.068025
|
### Probe-level `terminationGracePeriodSeconds` {{< feature-state for\_k8s\_version="v1.28" state="stable" >}} In 1.25 and above, users can specify a probe-level `terminationGracePeriodSeconds` as part of the probe specification. When both a pod- and probe-level `terminationGracePeriodSeconds` are set, the kubelet will use the probe-level value. When setting the `terminationGracePeriodSeconds`, please note the following: \* The kubelet always honors the probe-level `terminationGracePeriodSeconds` field if it is present on a Pod. \* If you have existing Pods where the `terminationGracePeriodSeconds` field is set and you no longer wish to use per-probe termination grace periods, you must delete those existing Pods. For example: ```yaml spec: terminationGracePeriodSeconds: 3600 # pod-level containers: - name: test image: ... ports: - name: liveness-port containerPort: 8080 livenessProbe: httpGet: path: /healthz port: liveness-port failureThreshold: 1 periodSeconds: 60 # Override pod-level terminationGracePeriodSeconds # terminationGracePeriodSeconds: 60 ``` Probe-level `terminationGracePeriodSeconds` cannot be set for readiness probes. It will be rejected by the API server. ## {{% heading "whatsnext" %}} \* Learn more about [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes). You can also read the API references for: \* [Pod](/docs/reference/kubernetes-api/workload-resources/pod-v1/), and specifically: \* [container(s)](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container) \* [probe(s)](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
|
[
0.03762974590063095,
0.07726983726024628,
0.09832707792520523,
-0.012562805786728859,
-0.032047439366579056,
-0.01467775460332632,
-0.04196992516517639,
-0.023425601422786713,
0.06167500093579292,
0.019616613164544106,
-0.016082679852843285,
-0.08221942186355591,
-0.03509821370244026,
-0.003810669295489788,
0.02869768999516964,
0.026615334674715996,
-0.013533711433410645,
0.01041192002594471,
-0.002935744123533368,
0.021062172949314117,
0.03303143382072449,
0.04507628455758095,
0.057054292410612106,
0.03052026592195034,
-0.030756298452615738,
-0.06913510710000992,
-0.004702759440988302,
0.0015974065754562616,
0.04160492867231369,
-0.05479136481881142,
-0.013161171227693558,
0.027784833684563637,
0.0020357619505375624,
0.019648369401693344,
0.12094273418188095,
0.07821213454008102,
-0.0025153569877147675,
-0.07760053128004074,
-0.051521364599466324,
-0.01973334327340126,
0.030928248539566994,
-0.035314928740262985,
-0.07878915965557098,
0.00912549439817667,
-0.01128565426915884,
0.01029878854751587,
-0.05783120542764664,
-0.04812445864081383,
-0.006368150934576988,
0.0035089722368866205,
0.011457649990916252,
-0.08537030220031738,
0.09243679791688919,
0.07149279862642288,
0.084989532828331,
0.039932429790496826,
-0.025256818160414696,
0.041484177112579346,
0.0702744573354721,
0.047392845153808594,
-0.018943684175610542,
-0.017718425020575523,
-0.08136099576950073,
-0.04809894040226936,
-0.00010581882088445127,
0.0017070824978873134,
0.031161794438958168,
-0.0335051603615284,
0.032181866466999054,
0.06934287399053574,
0.024093611165881157,
-0.06256452202796936,
-0.01822330243885517,
-0.022807324305176735,
0.04280313104391098,
0.056781213730573654,
-0.035709183663129807,
0.017142370343208313,
0.0039502778090536594,
-0.11971282213926315,
-0.03890030086040497,
-0.029864110052585602,
0.0686851292848587,
-0.03516119346022606,
-0.0682341530919075,
-0.027601616457104683,
-0.009241940453648567,
-0.05453640967607498,
0.06266620755195618,
0.02940596453845501,
0.025330843403935432,
-0.07058676332235336,
-0.0417167954146862,
-0.04969807714223862,
0.045968085527420044,
-0.02523134835064411,
0.01707104966044426,
0.014501191675662994,
0.030466053634881973,
-0.022859809920191765,
0.013533202931284904,
-0.018358901143074036,
-0.05819477140903473,
0.06267030537128448,
0.04573896899819374,
-0.06471768766641617,
-0.03645054250955582,
-0.03393885865807533,
0.005702735390514135,
-0.008339732885360718,
0.018356291577219963,
-0.006648486480116844,
0.020941901952028275,
0.008472898975014687,
0.013048628345131874,
0.04691309109330177,
-0.008038909174501896,
0.08192175626754761,
0.06157471984624863,
0.01657082885503769,
0.08081170171499252,
-0.06782776117324829,
-0.03477906063199043,
0.06240642070770264,
-0.0711912214756012,
0.019797421991825104,
0.021651001647114754,
5.252140350884659e-33,
0.06614965200424194,
-0.12871840596199036,
0.00658393045887351,
-0.007045383099466562,
-0.01878247782588005,
-0.052706461399793625,
-0.08201604336500168,
0.0295904278755188,
-0.07587705552577972,
0.018720323219895363,
-0.09927356243133545,
-0.015554915182292461,
-0.08540436625480652,
-0.06479886919260025,
0.049788329750299454,
-0.01367699820548296,
-0.07446286082267761,
0.014180474914610386,
0.04450325667858124,
0.0360780730843544,
0.10845591127872467,
-0.11808516830205917,
-0.0522613488137722,
-0.005281895399093628,
0.031827375292778015,
0.026482412591576576,
0.015882952138781548,
-0.04030889645218849,
-0.06046327203512192,
0.027946121990680695,
-0.03982459381222725,
0.01899593695998192,
0.04191555455327034,
0.062202051281929016,
-0.14773748815059662,
-0.027874687686562538,
-0.009741729125380516,
0.03736945614218712,
-0.08062002807855606,
-0.04154926538467407,
0.024662211537361145,
-0.010812947526574135,
-0.020721839740872383,
-0.03931301832199097,
0.07706904411315918,
-0.15141364932060242,
0.059041403234004974,
-0.030539924278855324,
0.07050186395645142,
0.09308076649904251,
0.0003991100820712745,
0.018153268843889236,
0.018137753009796143,
-0.04137092083692551,
0.04050753265619278,
-0.008052119985222816,
0.09995725005865097,
-0.030445443466305733,
-0.08700599521398544,
-0.0076236422173678875,
-0.011473437771201134,
0.017576051875948906,
0.052679888904094696,
0.004590831231325865,
0.023039260879158974,
0.10296328365802765,
-0.058939311653375626,
0.036992862820625305,
-0.05756758898496628,
0.045307815074920654,
-0.1410921812057495,
0.025295846164226532,
-0.02117660827934742,
0.001585947466082871,
-0.06779871881008148,
-0.0969778373837471,
0.007779198233038187,
0.0633760392665863,
-0.01825975440442562,
0.02910471335053444,
0.07219690084457397,
-0.04826270416378975,
-0.0174868106842041,
0.04481903463602066,
0.05955071747303009,
-0.06404440850019455,
-0.007334088906645775,
-0.032707203179597855,
-0.06927511841058731,
0.03196912258863449,
-0.011997024528682232,
-0.005338298622518778,
-0.03750455752015114,
0.0387117825448513,
-0.06986407935619354,
-6.5694235649871e-33,
0.10239507257938385,
-0.007306027226150036,
-0.01091377530246973,
0.007829477079212666,
-0.030213985592126846,
-0.032961320132017136,
0.029361022636294365,
0.059584446251392365,
-0.007371732499450445,
-0.021670719608664513,
0.05430412292480469,
-0.03308996558189392,
0.002144202357158065,
0.006152309477329254,
-0.08381950110197067,
0.023463010787963867,
-0.10061712563037872,
-0.061822738498449326,
-0.0046614292077720165,
0.01901218295097351,
-0.0205514095723629,
0.024493983015418053,
-0.0015686721308156848,
0.001462046056985855,
0.0013495730236172676,
-0.05928591638803482,
0.04751800000667572,
0.012968799099326134,
-0.04047283157706261,
-0.020201681181788445,
0.055167436599731445,
-0.05930923670530319,
-0.03750108927488327,
0.05650161951780319,
0.02272646687924862,
-0.050782233476638794,
0.007462171372026205,
0.03576311469078064,
-0.01648663729429245,
0.04230134189128876,
0.0818830281496048,
0.08556860685348511,
-0.01892958953976631,
0.01576569862663746,
-0.024129901081323624,
0.03471703827381134,
0.05429573357105255,
0.0030333243776112795,
0.026845838874578476,
-0.12454138696193695,
-0.04246080666780472,
0.015702825039625168,
-0.01495588943362236,
0.09979407489299774,
-0.09165852516889572,
-0.03379524499177933,
0.020261911675333977,
0.06758245825767517,
-0.0449308343231678,
-0.026668574661016464,
0.036849431693553925,
-0.0873030498623848,
0.11437195539474487,
0.009344495832920074,
0.04397207871079445,
-0.042854487895965576,
0.011295921169221401,
0.12207560241222382,
0.025647718459367752,
0.02869505062699318,
-0.010394035838544369,
0.00030383531702682376,
0.012155278585851192,
0.019719164818525314,
0.004239995963871479,
0.007558269426226616,
-0.046708960086107254,
-0.06815261393785477,
0.09660743921995163,
0.010905744507908821,
-0.05761171877384186,
0.05043969675898552,
-0.06407344341278076,
0.05929788947105408,
0.05202005058526993,
-0.0007408713572658598,
-0.03591613098978996,
0.13226953148841858,
0.06900597363710403,
0.055874329060316086,
0.03980719670653343,
-0.02606792189180851,
-0.0015445976750925183,
0.07194501161575317,
-0.020654086023569107,
-4.6886302840221106e-8,
0.046137236058712006,
-0.028989974409341812,
-0.06309498846530914,
0.006083815824240446,
0.08608289062976837,
-0.021156908944249153,
-0.04377484694123268,
0.01519655343145132,
-0.06787936389446259,
-0.042662348598241806,
-0.0041641369462013245,
0.11687169969081879,
-0.050591014325618744,
0.027332304045557976,
0.024328559637069702,
-0.09809477627277374,
-0.026538515463471413,
0.06397143751382828,
0.016688620671629906,
-0.026446044445037842,
-0.10521158576011658,
-0.04290191829204559,
0.017594989389181137,
-0.022021854296326637,
0.014625657349824905,
0.06798609346151352,
0.028340831398963928,
0.039608944207429886,
0.042094841599464417,
-0.037000253796577454,
0.007628113031387329,
0.003774484619498253,
-0.04805126041173935,
0.038831476122140884,
-0.015065577812492847,
0.09603729099035263,
-0.10543429851531982,
0.08434125036001205,
0.004501074552536011,
0.09766850620508194,
0.0019134713802486658,
-0.04631505534052849,
-0.09308376163244247,
0.027474110946059227,
-0.03015528805553913,
0.033382855355739594,
0.0037753949873149395,
0.08132436126470566,
-0.020014429464936256,
0.06639637798070908,
-0.012045634910464287,
-0.06852437555789948,
-0.02327846735715866,
0.016665223985910416,
-0.034211039543151855,
-0.003630418563261628,
-0.004579170607030392,
-0.05333126336336136,
-0.050402894616127014,
0.0043552834540605545,
0.06288999319076538,
-0.013046477921307087,
0.005471664946526289,
-0.0553487204015255
] | 0.138043
|
What's Kompose? It's a conversion tool for all things compose (namely Docker Compose) to container orchestrators (Kubernetes or OpenShift). More information can be found on the Kompose website at [https://kompose.io/](https://kompose.io/). ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Install Kompose We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release. {{< tabs name="install\_ways" >}} {{% tab name="GitHub download" %}} Kompose is released via GitHub on a three-week cycle, you can see all current releases on the [GitHub release page](https://github.com/kubernetes/kompose/releases). ```sh # Linux curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-linux-amd64 -o kompose # macOS curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-darwin-amd64 -o kompose # Windows curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-windows-amd64.exe -o kompose.exe chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose ``` Alternatively, you can download the [tarball](https://github.com/kubernetes/kompose/releases). {{% /tab %}} {{% tab name="Build from source" %}} Installing using `go get` pulls from the master branch with the latest development changes. ```sh go get -u github.com/kubernetes/kompose ``` {{% /tab %}} {{% tab name="Homebrew (macOS)" %}} On macOS you can install the latest release via [Homebrew](https://brew.sh): ```bash brew install kompose ``` {{% /tab %}} {{< /tabs >}} ## Use Kompose In a few steps, we'll take you from Docker Compose to Kubernetes. All you need is an existing `docker-compose.yml` file. 1. Go to the directory containing your `docker-compose.yml` file. If you don't have one, test using this one. ```yaml services: redis-leader: container\_name: redis-leader image: redis ports: - "6379" redis-replica: container\_name: redis-replica image: redis ports: - "6379" command: redis-server --replicaof redis-leader 6379 --dir /tmp web: container\_name: web image: quay.io/kompose/web ports: - "8080:8080" environment: - GET\_HOSTS\_FROM=dns labels: kompose.service.type: LoadBalancer ``` 2. To convert the `docker-compose.yml` file to files that you can use with `kubectl`, run `kompose convert` and then `kubectl apply -f `. ```bash kompose convert ``` The output is similar to: ```none INFO Kubernetes file "redis-leader-service.yaml" created INFO Kubernetes file "redis-replica-service.yaml" created INFO Kubernetes file "web-tcp-service.yaml" created INFO Kubernetes file "redis-leader-deployment.yaml" created INFO Kubernetes file "redis-replica-deployment.yaml" created INFO Kubernetes file "web-deployment.yaml" created ``` ```bash kubectl apply -f web-tcp-service.yaml,redis-leader-service.yaml,redis-replica-service.yaml,web-deployment.yaml,redis-leader-deployment.yaml,redis-replica-deployment.yaml ``` The output is similar to: ```none deployment.apps/redis-leader created deployment.apps/redis-replica created deployment.apps/web created service/redis-leader created service/redis-replica created service/web-tcp created ``` Your deployments are running in Kubernetes. 3. Access your application. If you're already using `minikube` for your development process: ```bash minikube service web-tcp ``` Otherwise, let's look up what IP your service is using! ```sh kubectl describe svc web-tcp ``` ```none Name: web-tcp Namespace: default Labels: io.kompose.service=web-tcp Annotations: kompose.cmd: kompose convert kompose.service.type: LoadBalancer kompose.version: 1.33.0 (3ce457399) Selector: io.kompose.service=web Type: LoadBalancer IP Family Policy: SingleStack IP Families: IPv4 IP: 10.102.30.3 IPs: 10.102.30.3 Port: 8080 8080/TCP TargetPort: 8080/TCP NodePort: 8080 31624/TCP Endpoints: 10.244.0.5:8080 Session Affinity: None External Traffic Policy: Cluster Events: ``` If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`. ```sh curl http://192.0.2.89 ``` 4. Clean-up. After you are finished testing out the example application deployment, simply run the following command in your shell to delete the resources used. ```sh kubectl delete -f web-tcp-service.yaml,redis-leader-service.yaml,redis-replica-service.yaml,web-deployment.yaml,redis-leader-deployment.yaml,redis-replica-deployment.yaml ``` ## User Guide - CLI - [`kompose convert`](#kompose-convert) - Documentation - [Alternative Conversions](#alternative-conversions) - [Labels](#labels) - [Restart](#restart) - [Docker Compose Versions](#docker-compose-versions) Kompose has support for two providers: OpenShift and Kubernetes. You can choose a targeted provider using global option `--provider`. If no provider is specified, Kubernetes is set by default. ## `kompose convert` Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. ### Kubernetes `kompose convert` example ```shell kompose --file docker-voting.yml convert ``` ```none WARN Unsupported key networks - ignoring WARN Unsupported key build - ignoring INFO Kubernetes file "worker-svc.yaml" created INFO Kubernetes file "db-svc.yaml" created
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
[
-0.001975761028006673,
-0.016472401097416878,
0.02599806897342205,
-0.010625426657497883,
0.04556363448500633,
0.006571991369128227,
-0.050293825566768646,
-0.02954365313053131,
0.006385307293385267,
0.044182855635881424,
-0.05527951940894127,
-0.02509915456175804,
-0.019280683249235153,
-0.02277582883834839,
0.03016059845685959,
-0.022632841020822525,
0.062347061932086945,
0.010556278750300407,
0.0674121230840683,
-0.02372678369283676,
-0.04022909700870514,
0.021208742633461952,
0.01754002273082733,
-0.0043487087823450565,
0.041206493973731995,
-0.013636920601129532,
-0.06469731032848358,
-0.056762419641017914,
-0.015395484864711761,
0.028802504763007164,
0.006919601000845432,
0.03997598588466644,
0.012283636257052422,
-0.025873778387904167,
0.0596047043800354,
0.07604886591434479,
0.05622107535600662,
-0.012905835174024105,
-0.045238934457302094,
0.012997240759432316,
-0.012660340406000614,
0.02347567491233349,
-0.056041497737169266,
-0.016618499532341957,
0.004441846162080765,
-0.06843651831150055,
-0.07463405281305313,
-0.13634945452213287,
-0.02632620558142662,
0.03741906210780144,
-0.0708862841129303,
-0.12413284182548523,
0.04389088600873947,
-0.002426600083708763,
0.04340357705950737,
0.01653999835252762,
-0.08362870663404465,
0.06562833487987518,
0.0015871538780629635,
0.04398089647293091,
0.019278788939118385,
-0.008460739627480507,
-0.08639747649431229,
0.022271471098065376,
-0.005630370695143938,
-0.009734692983329296,
0.03973241522908211,
0.04834231361746788,
0.1397014558315277,
-0.11254137009382248,
-0.01148801390081644,
-0.036321256309747696,
-0.006485106889158487,
0.0033752406015992165,
-0.007888821884989738,
-0.05511157959699631,
0.09412015974521637,
0.08431454747915268,
-0.1075720265507698,
-0.03443360701203346,
-0.00986752100288868,
0.033943984657526016,
-0.028461046516895294,
-0.014843792654573917,
-0.06282757222652435,
0.06595438718795776,
-0.000009414006854058243,
0.053661517798900604,
0.07253952324390411,
-0.002365345600992441,
-0.03292213752865791,
-0.06139949709177017,
0.056468430906534195,
-0.0714050754904747,
0.027714749798178673,
0.02131226658821106,
-0.05691217631101608,
0.06873708963394165,
0.0442698672413826,
0.04672126844525337,
-0.010891567915678024,
0.0007875650189816952,
0.08018174022436142,
-0.11741698533296585,
0.025070318952202797,
-0.024053309112787247,
0.0033322435338050127,
0.08259722590446472,
0.00010159191879210994,
0.029412725940346718,
-0.0058225952088832855,
-0.04907478019595146,
0.041414402425289154,
-0.030694857239723206,
0.016279084607958794,
0.00037191889714449644,
0.011935058981180191,
-0.05590754747390747,
0.06063942611217499,
0.07867264747619629,
0.1138264611363411,
-0.019340939819812775,
0.0560271218419075,
0.02768183872103691,
-0.07024576514959335,
0.05080815404653549,
-0.04558536410331726,
6.136813725893666e-33,
0.1423116773366928,
-0.004851182922720909,
0.10481206327676773,
-0.010579266585409641,
0.07233157008886337,
-0.11917822062969208,
-0.008290773257613182,
-0.03815385699272156,
-0.11334437876939774,
0.042290061712265015,
-0.06501494348049164,
0.06423074007034302,
-0.0688081607222557,
0.07494302093982697,
0.005579461343586445,
-0.09951221942901611,
-0.11102735996246338,
0.06507345288991928,
0.11744998395442963,
-0.005495685152709484,
-0.07612352073192596,
-0.09328440576791763,
-0.05392671003937721,
0.03712042421102524,
0.11145766079425812,
-0.045249298214912415,
0.04690566286444664,
-0.006997120101004839,
-0.013749799691140652,
-0.003389490768313408,
0.01275626476854086,
-0.025072086602449417,
-0.028832927346229553,
-0.02680947631597519,
-0.11165522038936615,
-0.05154363438487053,
-0.12691649794578552,
0.01049934234470129,
-0.03878999128937721,
-0.025166360661387444,
0.06464827060699463,
-0.019972816109657288,
-0.02922956459224224,
0.024721480906009674,
0.07611896842718124,
-0.013056013733148575,
-0.05033790320158005,
-0.007132888305932283,
0.20268820226192474,
-0.04018748924136162,
0.009537927806377411,
-0.07501159608364105,
0.049270618706941605,
0.1070050597190857,
-0.03974480181932449,
0.034912120550870895,
0.08634539693593979,
-0.08233721554279327,
0.037550367414951324,
-0.03549632057547569,
-0.10361761599779129,
0.009361100383102894,
-0.0020394648890942335,
-0.01859443075954914,
0.061718255281448364,
-0.059404581785202026,
-0.03565964102745056,
0.029197169467806816,
-0.006811561994254589,
0.00018735992489382625,
-0.1140885204076767,
-0.046418238431215286,
0.009133720770478249,
-0.0048792301677167416,
0.03828863427042961,
-0.06288958340883255,
-0.057870879769325256,
-0.05011671781539917,
0.0033652682323008776,
0.034298475831747055,
-0.013626850210130215,
0.001676057232543826,
-0.055486585944890976,
0.0425187386572361,
0.0029526888392865658,
0.017745764926075935,
0.03858976066112518,
0.0496799536049366,
-0.04685850441455841,
0.04023956507444382,
0.005738130770623684,
-0.0032555365469306707,
-0.04222377762198448,
0.004559731110930443,
-0.08762854337692261,
-6.322354488911425e-33,
0.01834307797253132,
-0.02881239727139473,
-0.056720372289419174,
0.008263521827757359,
0.0266634039580822,
0.03606947511434555,
0.01806633546948433,
0.01945958286523819,
0.039541490375995636,
-0.06936454027891159,
-0.020070863887667656,
0.04831210896372795,
0.050948698073625565,
0.017179248854517937,
-0.02443346194922924,
0.05372520536184311,
-0.030256660655140877,
-0.029733989387750626,
0.02904282510280609,
0.004118509124964476,
0.0028810598887503147,
-0.01752135157585144,
0.02266368828713894,
-0.03416856378316879,
-0.023962274193763733,
0.0031960296910256147,
0.13531646132469177,
0.056785948574543,
-0.04549574479460716,
0.010289783589541912,
0.052641239017248154,
-0.06515298038721085,
-0.02010287716984749,
-0.035720065236091614,
0.01486897561699152,
-0.0009157515596598387,
-0.02431464195251465,
0.07186757773160934,
-0.050924427807331085,
-0.014768505468964577,
0.0010431170230731368,
0.029824990779161453,
-0.05658377334475517,
-0.04012763872742653,
-0.0016046115197241306,
0.04770086705684662,
0.024602096527814865,
0.02686181291937828,
-0.024986034259200096,
-0.01685907691717148,
-0.01594538427889347,
-0.040876250714063644,
-0.019292840734124184,
-0.032461315393447876,
0.006761618424206972,
0.0018344329437240958,
-0.06986222416162491,
0.0735684409737587,
-0.04147271439433098,
-0.0004865500086452812,
0.048257578164339066,
-0.04901682585477829,
0.08299364149570465,
-0.015966828912496567,
0.010774621739983559,
-0.013758497312664986,
-0.05851612612605095,
0.02991029992699623,
-0.12549300491809845,
0.05374173820018768,
-0.04395030438899994,
-0.05285881832242012,
0.038702163845300674,
-0.020612213760614395,
0.02086462825536728,
-0.02775171771645546,
-0.038506221026182175,
0.025918036699295044,
-0.02380012907087803,
-0.01648505963385105,
0.03204862400889397,
0.05235842242836952,
0.032803282141685486,
-0.017803775146603584,
0.030636532232165337,
-0.043185681104660034,
0.03960764780640602,
0.024427250027656555,
0.11523281782865524,
0.037493251264095306,
-0.0015093779657036066,
0.013712476007640362,
-0.0009803816210478544,
0.06245670095086098,
0.030327768996357918,
-6.393435825202687e-8,
0.08757147938013077,
-0.03476724401116371,
-0.08753808587789536,
0.005788279697299004,
0.012117132544517517,
0.025474661961197853,
0.08443588763475418,
-0.023324698209762573,
-0.06278195977210999,
-0.03770880401134491,
0.016234509646892548,
0.020467180758714676,
-0.01937929354608059,
0.018386442214250565,
0.05909731984138489,
0.005716022569686174,
0.01579812727868557,
0.0886911153793335,
-0.04770268127322197,
-0.04677288979291916,
0.005018206313252449,
-0.012784671038389206,
0.05253417789936066,
-0.008418257348239422,
0.014386552385985851,
0.04644281417131424,
0.007221701089292765,
0.08581395447254181,
0.002199876820668578,
-0.03945102170109749,
0.01701761782169342,
0.0077226352877914906,
-0.055130816996097565,
0.030160563066601753,
0.014209636487066746,
-0.00641053169965744,
-0.13695979118347168,
0.0037616027984768152,
0.034249208867549896,
0.03454281762242317,
-0.043238088488578796,
-0.05485403165221214,
-0.024947866797447205,
0.018798088654875755,
-0.06190229579806328,
-0.015042450278997421,
0.002344433916732669,
0.006816689856350422,
0.01625547558069229,
0.011009379290044308,
-0.042414285242557526,
-0.019015757367014885,
-0.0658048540353775,
0.056248102337121964,
0.008226831443607807,
0.06919429451227188,
-0.048461973667144775,
0.0040644695982337,
0.07248955219984055,
-0.02095366083085537,
-0.006552773993462324,
0.07213389128446579,
0.11052874475717545,
0.0394686795771122
] | 0.11509
|
Kompose supports conversion of V1, V2, and V3 Docker Compose files into Kubernetes and OpenShift objects. ### Kubernetes `kompose convert` example ```shell kompose --file docker-voting.yml convert ``` ```none WARN Unsupported key networks - ignoring WARN Unsupported key build - ignoring INFO Kubernetes file "worker-svc.yaml" created INFO Kubernetes file "db-svc.yaml" created INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "result-svc.yaml" created INFO Kubernetes file "vote-svc.yaml" created INFO Kubernetes file "redis-deployment.yaml" created INFO Kubernetes file "result-deployment.yaml" created INFO Kubernetes file "vote-deployment.yaml" created INFO Kubernetes file "worker-deployment.yaml" created INFO Kubernetes file "db-deployment.yaml" created ``` ```shell ls ``` ```none db-deployment.yaml docker-compose.yml docker-gitlab.yml redis-deployment.yaml result-deployment.yaml vote-deployment.yaml worker-deployment.yaml db-svc.yaml docker-voting.yml redis-svc.yaml result-svc.yaml vote-svc.yaml worker-svc.yaml ``` You can also provide multiple docker-compose files at the same time: ```shell kompose -f docker-compose.yml -f docker-guestbook.yml convert ``` ```none INFO Kubernetes file "frontend-service.yaml" created INFO Kubernetes file "mlbparks-service.yaml" created INFO Kubernetes file "mongodb-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created INFO Kubernetes file "frontend-deployment.yaml" created INFO Kubernetes file "mlbparks-deployment.yaml" created INFO Kubernetes file "mongodb-deployment.yaml" created INFO Kubernetes file "mongodb-claim0-persistentvolumeclaim.yaml" created INFO Kubernetes file "redis-master-deployment.yaml" created INFO Kubernetes file "redis-slave-deployment.yaml" created ``` ```shell ls ``` ```none mlbparks-deployment.yaml mongodb-service.yaml redis-slave-service.jsonmlbparks-service.yaml frontend-deployment.yaml mongodb-claim0-persistentvolumeclaim.yaml redis-master-service.yaml frontend-service.yaml mongodb-deployment.yaml redis-slave-deployment.yaml redis-master-deployment.yaml ``` When multiple docker-compose files are provided the configuration is merged. Any configuration that is common will be overridden by subsequent file. ### OpenShift `kompose convert` example ```sh kompose --provider openshift --file docker-voting.yml convert ``` ```none WARN [worker] Service cannot be created because of missing port. INFO OpenShift file "vote-service.yaml" created INFO OpenShift file "db-service.yaml" created INFO OpenShift file "redis-service.yaml" created INFO OpenShift file "result-service.yaml" created INFO OpenShift file "vote-deploymentconfig.yaml" created INFO OpenShift file "vote-imagestream.yaml" created INFO OpenShift file "worker-deploymentconfig.yaml" created INFO OpenShift file "worker-imagestream.yaml" created INFO OpenShift file "db-deploymentconfig.yaml" created INFO OpenShift file "db-imagestream.yaml" created INFO OpenShift file "redis-deploymentconfig.yaml" created INFO OpenShift file "redis-imagestream.yaml" created INFO OpenShift file "result-deploymentconfig.yaml" created INFO OpenShift file "result-imagestream.yaml" created ``` It also supports creating buildconfig for build directive in a service. By default, it uses the remote repo for the current git branch as the source repo, and the current branch as the source branch for the build. You can specify a different source repo and branch using ``--build-repo`` and ``--build-branch`` options respectively. ```sh kompose --provider openshift --file buildconfig/docker-compose.yml convert ``` ```none WARN [foo] Service cannot be created because of missing port. INFO OpenShift Buildconfig using git@github.com:rtnpro/kompose.git::master as source. INFO OpenShift file "foo-deploymentconfig.yaml" created INFO OpenShift file "foo-imagestream.yaml" created INFO OpenShift file "foo-buildconfig.yaml" created ``` {{< note >}} If you are manually pushing the OpenShift artifacts using ``oc create -f``, you need to ensure that you push the imagestream artifact before the buildconfig artifact, to workaround this OpenShift issue: https://github.com/openshift/origin/issues/4518 . {{< /note >}} ## Alternative Conversions The default `kompose` transformation will generate Kubernetes [Deployments](/docs/concepts/workloads/controllers/deployment/) and [Services](/docs/concepts/services-networking/service/), in yaml format. You have alternative option to generate json with `-j`. Also, you can alternatively generate [Replication Controllers](/docs/concepts/workloads/controllers/replicationcontroller/) objects, [Daemon Sets](/docs/concepts/workloads/controllers/daemonset/), or [Helm](https://github.com/helm/helm) charts. ```sh kompose convert -j INFO Kubernetes file "redis-svc.json" created INFO Kubernetes file "web-svc.json" created INFO Kubernetes file "redis-deployment.json" created INFO Kubernetes file "web-deployment.json" created ``` The `\*-deployment.json` files contain the Deployment objects. ```sh kompose convert --replication-controller INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-replicationcontroller.yaml" created INFO Kubernetes file "web-replicationcontroller.yaml" created ``` The `\*-replicationcontroller.yaml` files contain the Replication Controller objects. If you want to specify replicas (default is 1), use `--replicas` flag: `kompose convert --replication-controller --replicas 3`. ```shell kompose convert --daemon-set INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-daemonset.yaml" created INFO Kubernetes file "web-daemonset.yaml" created ``` The `\*-daemonset.yaml` files contain the
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
[
0.0462014339864254,
-0.015614880248904228,
-0.05918947234749794,
-0.009419696405529976,
0.032311975955963135,
-0.0033186026848852634,
-0.03268924355506897,
-0.022642776370048523,
0.04714534804224968,
0.04848678782582283,
-0.042408011853694916,
-0.06800916790962219,
-0.034054946154356,
-0.06026734411716461,
0.06422384828329086,
-0.022425368428230286,
-0.03418391942977905,
0.06704740226268768,
-0.023153310641646385,
0.022569691762328148,
0.05086684226989746,
-0.03801005333662033,
0.03337825834751129,
-0.031922198832035065,
0.04728170484304428,
-0.056771647185087204,
-0.051240306347608566,
0.018562858924269676,
-0.03859519213438034,
-0.07303740829229355,
-0.017858603969216347,
-0.0325063019990921,
0.0041309236548841,
0.023299209773540497,
0.11392313987016678,
0.08658497780561447,
0.09907963871955872,
-0.062436770647764206,
-0.10251261293888092,
-0.010357791557908058,
0.04068346321582794,
0.013426371850073338,
-0.07454074174165726,
-0.031377002596855164,
-0.012046418152749538,
-0.059639010578393936,
-0.11414837837219238,
-0.08064782619476318,
-0.017486469820141792,
0.011906592175364494,
-0.07236228138208389,
-0.0927574634552002,
-0.017166707664728165,
0.05832237750291824,
0.010763290338218212,
0.08422359079122543,
-0.08072414994239807,
0.06163051724433899,
0.033395782113075256,
-0.002642108127474785,
0.021588830277323723,
0.027595283463597298,
-0.032331570982933044,
-0.016959726810455322,
-0.072273388504982,
-0.021980833262205124,
0.014928074553608894,
-0.04102489724755287,
0.07390385866165161,
-0.0034241231624037027,
-0.009344500489532948,
-0.026646414771676064,
0.006975430529564619,
-0.021393029019236565,
-0.019431045278906822,
-0.06342905759811401,
0.03459335118532181,
0.10095709562301636,
-0.04802151024341583,
-0.0734006017446518,
-0.001995834056288004,
0.047576893121004105,
-0.047454290091991425,
-0.03654002770781517,
-0.06476342678070068,
0.0467568039894104,
-0.03727304935455322,
-0.01934809982776642,
0.03565087541937828,
0.010555095970630646,
-0.06805473566055298,
-0.05463523417711258,
0.049633778631687164,
-0.08708197623491287,
0.06669231504201889,
0.011722428724169731,
-0.027003444731235504,
0.09200228750705719,
0.09659211337566376,
0.0010783371981233358,
-0.03490633890032768,
0.02346418984234333,
0.044304993003606796,
-0.10972627997398376,
0.023397155106067657,
-0.0026820721104741096,
-0.07118634879589081,
0.016261707991361618,
-0.08186617493629456,
0.023960497230291367,
0.012615391984581947,
0.0023345155641436577,
0.033029068261384964,
-0.07215533405542374,
0.021672597154974937,
0.027078820392489433,
-0.0478363074362278,
-0.053060926496982574,
-0.018442507833242416,
0.07730142772197723,
0.0665842816233635,
-0.055705294013023376,
0.047801267355680466,
0.03815840184688568,
-0.060206882655620575,
0.008153938688337803,
-0.08561169356107712,
8.25314657180725e-33,
0.05357487127184868,
-0.07475736737251282,
0.05961402878165245,
0.03282172605395317,
0.05821428447961807,
-0.03212669864296913,
-0.021743981167674065,
-0.0651971697807312,
-0.14059455692768097,
0.03262553736567497,
-0.12621960043907166,
0.0058371867053210735,
-0.035284899175167084,
-0.01009364239871502,
0.06845498830080032,
-0.021885506808757782,
-0.04796212166547775,
0.021075798198580742,
0.07514775544404984,
-0.013165212236344814,
0.06516566872596741,
-0.06138470768928528,
-0.0857633724808693,
0.01312441099435091,
0.05724864825606346,
-0.025770774111151695,
0.02152535691857338,
-0.06884723156690598,
-0.029051445424556732,
-0.004364706575870514,
0.04124268516898155,
-0.04052956774830818,
0.052617501467466354,
-0.0037197715137153864,
-0.08233887702226639,
-0.015893742442131042,
-0.028439389541745186,
0.061236053705215454,
-0.07552846521139145,
0.006960179656744003,
0.02963852696120739,
-0.0029863580130040646,
-0.05681023374199867,
0.01636783964931965,
0.05220774933695793,
-0.018756788223981857,
0.0018013670342043042,
0.021973909810185432,
0.15621735155582428,
-0.016555601730942726,
-0.02215450443327427,
-0.03078940324485302,
0.055678531527519226,
0.08368151634931564,
0.05084734410047531,
0.027874449267983437,
0.08681440353393555,
-0.01876268908381462,
-0.03861602023243904,
-0.05665470287203789,
-0.1355130672454834,
0.04211955890059471,
0.012019387446343899,
-0.027378346771001816,
0.09986142814159393,
-0.05959278345108032,
0.015100013464689255,
0.019008586183190346,
-0.0663139671087265,
0.00023598599364049733,
-0.08241894841194153,
-0.016056286171078682,
-0.0349295549094677,
0.011320115067064762,
0.04908611252903938,
-0.08619990199804306,
-0.03351739048957825,
-0.019787458702921867,
-0.054361362010240555,
0.018301652744412422,
-0.035366177558898926,
0.010509771294891834,
-0.07961654663085938,
0.04288306087255478,
0.03324801102280617,
-0.048046503216028214,
0.02351444773375988,
0.019107509404420853,
-0.020642412826418877,
0.01449226588010788,
0.06532780081033707,
-0.04667014256119728,
-0.02502323128283024,
-0.08489928394556046,
-0.1308179646730423,
-8.887614504875795e-33,
-0.013320442289113998,
0.044326674193143845,
-0.06124335899949074,
0.04068461060523987,
0.012047375552356243,
0.055128976702690125,
0.05248863250017166,
-0.004350254777818918,
-0.039533186703920364,
-0.036247409880161285,
-0.04833858460187912,
-0.012293347157537937,
0.059439126402139664,
-0.005884950049221516,
-0.02510254643857479,
-0.011477703228592873,
-0.029444817453622818,
-0.04163409769535065,
0.02818983606994152,
-0.006607243325561285,
0.007519755512475967,
0.02564653940498829,
0.08348234742879868,
0.06093217432498932,
0.0551287978887558,
-0.017537567764520645,
0.10954561084508896,
0.1072591245174408,
-0.06764253973960876,
-0.00855279341340065,
0.060786403715610504,
-0.05427893251180649,
-0.06005959212779999,
0.02313193492591381,
-0.004509747494012117,
-0.08425257354974747,
-0.006056861020624638,
0.043282248079776764,
-0.029766490682959557,
0.005350499413907528,
0.03651176393032074,
0.0060454015620052814,
-0.06436342000961304,
-0.02176126092672348,
-0.07051723450422287,
0.0014598120469599962,
0.027488352730870247,
0.05562972277402878,
-0.014764861203730106,
-0.07434079051017761,
0.028942467644810677,
-0.02586919255554676,
-0.05093119665980339,
0.04819609969854355,
-0.0069739422760903835,
0.0020540044642984867,
-0.03566500172019005,
0.04399726167321205,
-0.08266159147024155,
0.031984489411115646,
0.05863034352660179,
-0.09618590772151947,
0.09185227751731873,
0.04977349936962128,
0.04428404942154884,
-0.06003332883119583,
-0.007557549048215151,
0.04430069401860237,
-0.05653133988380432,
0.01163462083786726,
-0.044947244226932526,
-0.03360344097018242,
0.019867563620209694,
0.07347086071968079,
0.031236737966537476,
-0.06722775101661682,
-0.032797906547784805,
0.04916815459728241,
0.05311828851699829,
0.004454840440303087,
0.0341290682554245,
0.04537094756960869,
0.04336470738053322,
-0.04543047398328781,
0.122111476957798,
0.020226620137691498,
0.04210956394672394,
0.08629927039146423,
0.07859373092651367,
0.06229062378406525,
-0.03271307796239853,
0.04316341131925583,
0.008768618106842041,
0.06565666198730469,
0.027926620095968246,
-5.630485233609761e-8,
0.044185150414705276,
0.0020221795421093702,
-0.07228612154722214,
0.004620885476469994,
-0.02805766649544239,
0.028711503371596336,
0.06898610293865204,
-0.0024990926031023264,
-0.08629664033651352,
-0.031413719058036804,
-0.02668839506804943,
0.09719700366258621,
-0.014884970150887966,
-0.000625417975243181,
0.042453162372112274,
-0.019074443727731705,
0.07741637527942657,
0.1100175529718399,
0.0058785597793757915,
-0.07033742964267731,
0.006118617951869965,
-0.015163847245275974,
-0.05775279551744461,
0.06658175587654114,
0.03592744469642639,
0.07592850923538208,
-0.005619153380393982,
0.011670752428472042,
0.042933735996484756,
-0.0002259724569739774,
0.005521521437913179,
-0.01641010120511055,
-0.004340441897511482,
0.06420807540416718,
-0.013636812567710876,
-0.015847627073526382,
-0.0665387213230133,
0.08981603384017944,
-0.017634620890021324,
0.01586998999118805,
-0.033233512192964554,
-0.007149495184421539,
-0.10908859223127365,
-0.008010543882846832,
-0.08122558891773224,
-0.0029222385492175817,
0.0012586145894601941,
0.04615774005651474,
0.011273765936493874,
0.013863383792340755,
-0.02027576044201851,
-0.0398409441113472,
-0.028291650116443634,
-0.01190506387501955,
-0.04607157036662102,
0.0401226282119751,
0.03687451779842377,
0.029203632846474648,
0.06306307017803192,
0.0003975018917117268,
0.006204747129231691,
0.03272366151213646,
0.06440766155719757,
0.052270133048295975
] | 0.081256
|
Replication Controller objects. If you want to specify replicas (default is 1), use `--replicas` flag: `kompose convert --replication-controller --replicas 3`. ```shell kompose convert --daemon-set INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-daemonset.yaml" created INFO Kubernetes file "web-daemonset.yaml" created ``` The `\*-daemonset.yaml` files contain the DaemonSet objects. If you want to generate a Chart to be used with [Helm](https://github.com/kubernetes/helm) run: ```shell kompose convert -c ``` ```none INFO Kubernetes file "web-svc.yaml" created INFO Kubernetes file "redis-svc.yaml" created INFO Kubernetes file "web-deployment.yaml" created INFO Kubernetes file "redis-deployment.yaml" created chart created in "./docker-compose/" ``` ```shell tree docker-compose/ ``` ```none docker-compose ├── Chart.yaml ├── README.md └── templates ├── redis-deployment.yaml ├── redis-svc.yaml ├── web-deployment.yaml └── web-svc.yaml ``` The chart structure is aimed at providing a skeleton for building your Helm charts. ## Labels `kompose` supports Kompose-specific labels within the `docker-compose.yml` file in order to explicitly define a service's behavior upon conversion. - `kompose.service.type` defines the type of service to be created. For example: ```yaml version: "2" services: nginx: image: nginx dockerfile: foobar build: ./foobar cap\_add: - ALL container\_name: foobar labels: kompose.service.type: nodeport ``` - `kompose.service.expose` defines if the service needs to be made accessible from outside the cluster or not. If the value is set to "true", the provider sets the endpoint automatically, and for any other value, the value is set as the hostname. If multiple ports are defined in a service, the first one is chosen to be the exposed. - For the Kubernetes provider, an ingress resource is created and it is assumed that an ingress controller has already been configured. - For the OpenShift provider, a route is created. For example: ```yaml version: "2" services: web: image: tuna/docker-counter23 ports: - "5000:5000" links: - redis labels: kompose.service.expose: "counter.example.com" redis: image: redis:3.0 ports: - "6379" ``` The currently supported options are: | Key | Value | |----------------------|-------------------------------------| | kompose.service.type | nodeport / clusterip / loadbalancer | | kompose.service.expose| true / hostname | {{< note >}} The `kompose.service.type` label should be defined with `ports` only, otherwise `kompose` will fail. {{< /note >}} ## Restart If you want to create normal pods without controllers you can use `restart` construct of docker-compose to define that. Follow table below to see what happens on the `restart` value. | `docker-compose` `restart` | object created | Pod `restartPolicy` | |----------------------------|-------------------|---------------------| | `""` | controller object | `Always` | | `always` | controller object | `Always` | | `on-failure` | Pod | `OnFailure` | | `no` | Pod | `Never` | {{< note >}} The controller object could be `deployment` or `replicationcontroller`. {{< /note >}} For example, the `pival` service will become pod down here. This container calculated value of `pi`. ```yaml version: '2' services: pival: image: perl command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restart: "on-failure" ``` ### Warning about Deployment Configurations If the Docker Compose file has a volume specified for a service, the Deployment (Kubernetes) or DeploymentConfig (OpenShift) strategy is changed to "Recreate" instead of "RollingUpdate" (default). This is done to avoid multiple instances of a service from accessing a volume at the same time. If the Docker Compose file has service name with `\_` in it (for example, `web\_service`), then it will be replaced by `-` and the service name will be renamed accordingly (for example, `web-service`). Kompose does this because "Kubernetes" doesn't allow `\_` in object name. Please note that changing service name might break some `docker-compose` files. ## Docker Compose Versions Kompose supports Docker Compose versions: 1, 2 and 3. We have limited support on versions 2.1 and 3.2 due to their experimental nature. A full list on compatibility between
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
[
-0.001965773291885853,
-0.05431074649095535,
-0.07287628203630447,
-0.023290401324629784,
-0.010047100484371185,
0.004282018169760704,
-0.007693372201174498,
-0.008242976851761341,
0.0937725380063057,
0.059950198978185654,
0.008328277617692947,
-0.06758026033639908,
0.012803406454622746,
-0.059110913425683975,
0.05781647562980652,
-0.028014659881591797,
0.02331635169684887,
-0.03655032441020012,
-0.0185113362967968,
-0.08523907512426376,
0.043571289628744125,
-0.04292350262403488,
0.05623280629515648,
-0.023876657709479332,
-0.03370179980993271,
-0.04585793614387512,
-0.0312986858189106,
0.010739888064563274,
0.0012673323508352041,
-0.043053459376096725,
0.020093200728297234,
-0.04538359120488167,
-0.033783234655857086,
0.0007645019213669002,
0.012726659886538982,
0.11580326408147812,
0.08273281157016754,
-0.05432889983057976,
-0.09169352799654007,
0.07973650842905045,
0.05066285282373428,
0.05339977890253067,
-0.05405402556061745,
-0.026387974619865417,
-0.003195008495822549,
0.008997306227684021,
-0.1695135235786438,
0.02314617484807968,
0.00040403802995570004,
0.04135142266750336,
-0.011923200450837612,
-0.05873939394950867,
0.017326144501566887,
0.023256570100784302,
0.045726437121629715,
0.098237544298172,
-0.058619480580091476,
0.00776847405359149,
0.12113524973392487,
-0.007815549150109291,
0.03998255729675293,
0.0057959966361522675,
0.015732336789369583,
-0.05188583955168724,
-0.05381430312991142,
-0.013867592439055443,
0.033803749829530716,
0.03876213729381561,
-0.005090277176350355,
0.06486959755420685,
0.03254643455147743,
-0.03736598417162895,
-0.01518399640917778,
-0.025059498846530914,
-0.005397441331297159,
-0.012952045537531376,
-0.01361889485269785,
0.03395136073231697,
-0.047013238072395325,
-0.08647750318050385,
-0.047475941479206085,
0.03986933082342148,
0.002776496345177293,
0.018761204555630684,
-0.07189242541790009,
0.01784450002014637,
-0.057651206851005554,
-0.03412302955985069,
-0.006858689710497856,
-0.014050117693841457,
-0.003747069276869297,
-0.030481068417429924,
0.0013491837307810783,
-0.0923127830028534,
0.004247013945132494,
-0.0015935413539409637,
-0.010699010454118252,
0.09942037612199783,
0.07852376252412796,
-0.012019018642604351,
0.02651221863925457,
-0.026933373883366585,
0.075687937438488,
-0.007142426446080208,
-0.0012118022423237562,
-0.06265322118997574,
-0.1277344673871994,
0.002085031010210514,
-0.0742117166519165,
0.07304150611162186,
-0.01344915572553873,
0.04955189675092697,
-0.01268635131418705,
-0.006864368449896574,
0.017719652503728867,
0.042853254824876785,
-0.07458490133285522,
-0.042307883501052856,
-0.09513405710458755,
0.05720854550600052,
0.0976969301700592,
0.008098036050796509,
-0.015077220275998116,
0.05684129148721695,
-0.0308061596006155,
-0.04017819091677666,
-0.06505075097084045,
3.0011924633087993e-33,
0.06452307105064392,
-0.03192138671875,
0.06008809432387352,
0.031891148537397385,
0.023564420640468597,
0.018402842804789543,
-0.07853270322084427,
-0.002718735719099641,
-0.03845177963376045,
0.02619490586221218,
-0.04124660789966583,
0.09283579885959625,
-0.06193923577666283,
0.010495789349079132,
-0.013689597137272358,
0.0010143622057512403,
0.016612136736512184,
0.014880997128784657,
0.008627977222204208,
-0.061337508261203766,
0.02094796486198902,
0.013110650703310966,
-0.04996538162231445,
0.010031772777438164,
0.05834374576807022,
0.002987573156133294,
-0.009199715219438076,
-0.03829411417245865,
-0.032918594777584076,
0.005695422645658255,
0.026282252743840218,
-0.03256271034479141,
0.04206771031022072,
0.013338267803192139,
-0.045840632170438766,
-0.02090010978281498,
-0.04492922127246857,
0.033697400242090225,
-0.17042997479438782,
-0.001829409273341298,
-0.0031664674170315266,
-0.01706440933048725,
-0.08719467371702194,
0.0029854015447199345,
-0.0074269333854317665,
-0.013249159790575504,
0.03825988993048668,
-0.03798266500234604,
0.12897370755672455,
-0.059624768793582916,
-0.008855802938342094,
-0.009022465907037258,
0.07331551611423492,
-0.054991137236356735,
0.047881804406642914,
0.015515167266130447,
0.09540484100580215,
-0.024131691083312035,
-0.044363342225551605,
-0.03975238278508186,
-0.032657694071531296,
-0.010471886023879051,
0.006921456195414066,
0.013267483562231064,
0.07625537365674973,
0.04586869478225708,
0.02628534659743309,
-0.0356101430952549,
-0.034730106592178345,
0.0501725859940052,
-0.034721117466688156,
0.051537975668907166,
-0.05183715745806694,
-0.0023677702993154526,
0.07718969136476517,
-0.04875952750444412,
-0.018569108098745346,
0.020416487008333206,
-0.14174950122833252,
0.056652527302503586,
-0.060686465352773666,
-0.04204337298870087,
-0.11552853882312775,
0.07205957174301147,
0.008069593459367752,
-0.06424656510353088,
0.04815785959362984,
0.07847205549478531,
-0.011746291071176529,
-0.0534377284348011,
0.03706923499703407,
-0.0780409723520279,
-0.050469908863306046,
-0.05138086900115013,
-0.0716816857457161,
-4.857514775028124e-33,
0.014029988087713718,
0.07373233139514923,
0.05364464223384857,
0.026201309636235237,
0.052314966917037964,
0.012806016020476818,
0.10273095220327377,
0.09717527776956558,
-0.07557495683431625,
-0.01322549395263195,
-0.013430589810013771,
-0.13293145596981049,
-0.05022742971777916,
0.04376291483640671,
-0.02753359265625477,
0.021492574363946915,
-0.04858003556728363,
-0.02090420387685299,
0.0011325703235343099,
-0.03272336721420288,
-0.029286881908774376,
-0.0006668923888355494,
0.0797596126794815,
0.0503731332719326,
0.043411627411842346,
-0.002164870733395219,
0.017266901209950447,
0.03568060323596001,
-0.09039504826068878,
-0.05827520787715912,
0.012995624914765358,
-0.11151931434869766,
-0.02118818834424019,
-0.03822067379951477,
0.013385533355176449,
-0.03005463443696499,
0.03984637185931206,
0.08693727105855942,
-0.0710262656211853,
-0.0389995202422142,
-0.017007067799568176,
-0.005898354109376669,
-0.08037103712558746,
0.03427501767873764,
-0.024697843939065933,
-0.03313721343874931,
0.04335016757249832,
0.0643131211400032,
-0.0004233800864312798,
-0.04996051266789436,
-0.0029162520077079535,
-0.006192013621330261,
-0.004655746277421713,
0.01823761872947216,
-0.018738875165581703,
0.0010927189141511917,
-0.028169257566332817,
0.07555922120809555,
-0.03183070570230484,
0.04225924238562584,
-0.006135550327599049,
-0.10044518858194351,
0.019028788432478905,
0.06512828916311264,
0.012506415136158466,
-0.09121000021696091,
0.038625992834568024,
0.021290291100740433,
0.011425044387578964,
0.02333061955869198,
-0.03228273615241051,
0.008523798547685146,
0.015432314947247505,
0.025728773325681686,
0.02703082002699375,
-0.0780339315533638,
-0.029592785984277725,
-0.006730040069669485,
0.06887589395046234,
0.046963881701231,
-0.021465180441737175,
0.004970276262611151,
0.030442198738455772,
0.10817123204469681,
0.1074683740735054,
0.009719857946038246,
0.07856927067041397,
0.04716780036687851,
0.06379670649766922,
0.06109616532921791,
-0.007721163798123598,
0.018403390422463417,
-0.04627520218491554,
0.13144460320472717,
-0.031880948692560196,
-4.957341559475026e-8,
0.033083900809288025,
0.00763877434656024,
-0.03068876452744007,
-0.0020321847405284643,
0.03361854329705238,
0.005928792990744114,
0.036150120198726654,
-0.014911091886460781,
-0.11138474196195602,
0.03054097294807434,
-0.015541082248091698,
0.09834026545286179,
-0.05411645025014877,
-0.05151418223977089,
0.01956438645720482,
-0.07310564815998077,
0.026502467691898346,
0.052334751933813095,
0.05976638197898865,
-0.042344845831394196,
0.03927328810095787,
-0.010380834341049194,
-0.019927220419049263,
0.0018990898970514536,
0.040293339639902115,
0.035591598600149155,
0.0261538103222847,
-0.0073256101459264755,
0.027561446651816368,
0.04806750640273094,
0.006119875703006983,
-0.030357830226421356,
-0.0331914946436882,
0.07723633944988251,
-0.005804446991533041,
-0.08290011435747147,
-0.14708562195301056,
0.07850710302591324,
-0.013380193151533604,
-0.02904241718351841,
-0.015471827238798141,
0.06170680373907089,
-0.08913863450288773,
0.02543048933148384,
0.030401717871427536,
0.09374967962503433,
-0.02147897519171238,
-0.0060029239393770695,
0.08195441961288452,
0.00362575426697731,
-0.08132579177618027,
-0.09985055029392242,
0.07948191463947296,
0.013072330504655838,
-0.05789317190647125,
-0.025193411856889725,
0.08048231899738312,
-0.0046452684327960014,
0.04445772245526314,
0.01414302084594965,
-0.0031290005426853895,
-0.0008919146494008601,
0.04055928811430931,
-0.02092057093977928
] | 0.080343
|
doesn't allow `\_` in object name. Please note that changing service name might break some `docker-compose` files. ## Docker Compose Versions Kompose supports Docker Compose versions: 1, 2 and 3. We have limited support on versions 2.1 and 3.2 due to their experimental nature. A full list on compatibility between all three versions is listed in our [conversion document](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md) including a list of all incompatible Docker Compose keys.
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
|
[
-0.016458723694086075,
0.01221406552940607,
0.0750119611620903,
-0.028258733451366425,
-0.05583081766963005,
0.0008128057233989239,
0.01678517833352089,
-0.07331439852714539,
0.0867181122303009,
0.032056767493486404,
-0.09928211569786072,
-0.0959630012512207,
-0.0007177393999882042,
0.025124164298176765,
0.10041135549545288,
-0.008612893521785736,
0.058278847485780716,
0.016305161640048027,
0.021446850150823593,
0.07855994999408722,
-0.02102479711174965,
0.03184807673096657,
0.0328875333070755,
0.024788936600089073,
-0.002330794930458069,
-0.049300841987133026,
-0.04299137741327286,
-0.033654894679784775,
-0.008108915761113167,
0.008618798106908798,
0.018461303785443306,
0.012753328308463097,
0.019539035856723785,
-0.0007356684654951096,
0.09415852278470993,
0.09830330312252045,
0.03499321639537811,
-0.06915373355150223,
0.015093992464244366,
0.03697533160448074,
0.06108877807855606,
-0.016893627122044563,
-0.06288628280162811,
0.008625086396932602,
-0.03776843845844269,
-0.040019966661930084,
-0.03059200756251812,
-0.10812351107597351,
-0.05305920168757439,
0.07084921002388,
-0.08735579252243042,
-0.08499910682439804,
0.004744809586554766,
0.002702408004552126,
0.01329827681183815,
0.02962750382721424,
-0.06375396251678467,
0.12240567803382874,
0.03517201170325279,
0.06569657474756241,
0.011742563918232918,
0.027407852932810783,
0.047378603368997574,
-0.003985937684774399,
-0.04804565757513046,
-0.07225584238767624,
0.0036972060333937407,
0.03185642883181572,
0.029728207737207413,
0.04856167361140251,
0.07171978801488876,
0.0028172547463327646,
0.014608948491513729,
0.013197577558457851,
0.006195017136633396,
0.013613799586892128,
0.08147108554840088,
0.046916402876377106,
-0.0660664513707161,
-0.03749706596136093,
0.026496712118387222,
0.022953400388360023,
-0.03745083883404732,
-0.06740919500589371,
-0.06628908216953278,
0.021930554881691933,
-0.070967897772789,
-0.06548693031072617,
0.024409549310803413,
-0.04631049185991287,
-0.04660852998495102,
-0.12114010006189346,
0.06393764168024063,
-0.08916868269443512,
0.0350753515958786,
-0.033281173557043076,
-0.051843591034412384,
0.07902330160140991,
0.014427615329623222,
-0.02037517912685871,
-0.038587573915719986,
0.05042347311973572,
0.03048969805240631,
-0.028403189033269882,
0.08235535770654678,
-0.02391175925731659,
-0.05472544580698013,
-0.005150544457137585,
-0.04460307955741882,
-0.010152378119528294,
0.0426362045109272,
-0.003418665612116456,
0.016458235681056976,
-0.01560408528894186,
-0.013568408787250519,
-0.03896369785070419,
-0.03508142754435539,
-0.16128529608249664,
0.06907548755407333,
0.11430780589580536,
0.09610157459974289,
-0.10378509759902954,
-0.030618850141763687,
0.060093775391578674,
-0.09016714990139008,
0.056577470153570175,
0.02289251796901226,
5.8524387753912115e-34,
0.10521279275417328,
-0.057844359427690506,
0.13128699362277985,
0.005089953541755676,
0.05600489675998688,
-0.09116967767477036,
-0.015881210565567017,
0.024782374501228333,
-0.07083053141832352,
0.0031843669712543488,
-0.05106276646256447,
-0.0073003750294446945,
0.0037632426247000694,
0.05168236419558525,
0.01650192216038704,
0.016751771792769432,
-0.044196803122758865,
0.015674106776714325,
0.08598702400922775,
-0.01972982846200466,
-0.026271238923072815,
-0.014800366014242172,
-0.08525504916906357,
0.028372853994369507,
0.028631336987018585,
-0.019802428781986237,
0.017070109024643898,
-0.0865914598107338,
0.01670937053859234,
-0.009517977014183998,
0.07490256428718567,
-0.08894217014312744,
0.015264913439750671,
0.05539245158433914,
-0.12516294419765472,
-0.0240627471357584,
-0.04611331224441528,
0.09375932812690735,
-0.15029376745224,
0.005944380071014166,
0.060187727212905884,
-0.005807237233966589,
-0.08231080323457718,
0.06590952724218369,
0.012446663342416286,
-0.03925470635294914,
-0.000729150662664324,
-0.002992666559293866,
0.11271931231021881,
-0.06554079800844193,
-0.022869974374771118,
-0.0063519952818751335,
0.026947904378175735,
0.11241406202316284,
0.022315898910164833,
0.05829860642552376,
0.02939913235604763,
-0.06636393815279007,
-0.03874979913234711,
-0.14322562515735626,
-0.13786278665065765,
0.0016354512190446258,
0.06603578478097916,
0.030182747170329094,
0.09545481950044632,
-0.027101794257760048,
0.039222169667482376,
0.034529171884059906,
-0.07278327643871307,
0.0273430272936821,
-0.07151444256305695,
-0.0013882237253710628,
-0.10007859766483307,
0.033729907125234604,
0.04363492876291275,
-0.04533648490905762,
-0.04396675527095795,
-0.06991113722324371,
-0.02663569152355194,
0.04567675292491913,
-0.019988954067230225,
0.0037523487117141485,
-0.024090174585580826,
0.09077394008636475,
-0.05397021770477295,
-0.0174581166356802,
0.03143484517931938,
0.0676330178976059,
-0.023882782086730003,
0.02521550841629505,
0.033126164227724075,
-0.011817432008683681,
-0.05643117055296898,
-0.0016631337348371744,
-0.15351636707782745,
-4.808024993490567e-33,
-0.0024212950374931097,
0.0214923657476902,
-0.043126486241817474,
0.01593463309109211,
-0.040534622967243195,
0.009615122340619564,
0.11641555279493332,
0.009844908490777016,
-0.0157864298671484,
-0.03195298835635185,
0.02145191840827465,
-0.007363953627645969,
0.007171152159571648,
0.022184133529663086,
-0.03208862990140915,
-0.0005352553562261164,
-0.12790322303771973,
-0.005104960408061743,
0.007624015212059021,
-0.0027956964913755655,
0.045711927115917206,
-0.0035813956055790186,
0.04780564457178116,
0.018548181280493736,
0.0038137033116072416,
-0.020445581525564194,
0.07244967669248581,
0.03118342161178589,
-0.04376722499728203,
0.010530869476497173,
0.05669528618454933,
0.012724443338811398,
-0.028477732092142105,
0.06717461347579956,
-0.044637590646743774,
-0.023880252614617348,
-0.04959127679467201,
0.04086851328611374,
-0.017230425029993057,
-0.03278132900595665,
0.014234380796551704,
0.04161480814218521,
0.011766120791435242,
0.04091383144259453,
0.00004048888513352722,
-0.04009009525179863,
0.02834651805460453,
-0.03812022879719734,
0.06827133893966675,
-0.004331551492214203,
-0.01917986571788788,
-0.06627734005451202,
-0.053726233541965485,
-0.0036289431154727936,
-0.008261524140834808,
-0.000403270882088691,
-0.0593046098947525,
0.008013538084924221,
-0.07415521889925003,
-0.00883551873266697,
0.057227667421102524,
-0.04707018658518791,
0.06047320365905762,
0.029059378430247307,
0.06130348518490791,
-0.061750318855047226,
-0.05473600700497627,
0.017902472987771034,
0.013777380809187889,
-0.11960581690073013,
0.01651674695312977,
-0.05855713412165642,
-0.004043704830110073,
0.0940900593996048,
0.008882613852620125,
0.0012799380347132683,
-0.008260977454483509,
0.026572365313768387,
0.019247326999902725,
0.03385266661643982,
0.0025185008998960257,
-0.00039395742351189256,
0.00771819893270731,
-0.011292974464595318,
-0.0058668372221291065,
-0.039257217198610306,
0.06570015847682953,
0.07821112871170044,
-0.010619009844958782,
0.009283632040023804,
0.01185584906488657,
0.006551407743245363,
-0.03877093270421028,
-0.027218762785196304,
-0.028936434537172318,
-5.014394233171515e-8,
0.033164117485284805,
-0.020741809159517288,
-0.0523025207221508,
-0.0060628559440374374,
-0.03801268711686134,
-0.023137642070651054,
0.029213417321443558,
-0.045465536415576935,
-0.0438835583627224,
0.027381274849176407,
-0.07363758981227875,
0.038088325411081314,
0.0013481432106345892,
-0.015965482220053673,
0.01834309846162796,
-0.06258031725883484,
0.006167345214635134,
0.07694786041975021,
-0.02695668861269951,
-0.0001770810631569475,
-0.018560219556093216,
-0.017537172883749008,
-0.016658218577504158,
-0.061811964958906174,
0.017964685335755348,
0.07930482923984528,
-0.03262023255228996,
0.028454821556806564,
0.011111804284155369,
-0.008434916846454144,
0.020303325727581978,
0.010033197700977325,
-0.0024358194787055254,
0.12818992137908936,
-0.03667367249727249,
-0.0036159835290163755,
-0.03477344289422035,
0.006746041588485241,
-0.026546139270067215,
0.08074047416448593,
-0.013385464437305927,
-0.07073858380317688,
-0.10034690797328949,
-0.034198254346847534,
-0.05157547444105148,
0.01972646266222,
0.059278979897499084,
0.08890226483345032,
0.024710040539503098,
0.030922062695026398,
-0.03678024932742119,
0.002950020134449005,
-0.041384391486644745,
-0.007855976931750774,
-0.02293558232486248,
0.01530848816037178,
0.017784815281629562,
0.014701229520142078,
0.021737242117524147,
-0.045895807445049286,
0.007107810117304325,
0.015043904073536396,
0.04952102154493332,
0.002519235946238041
] | 0.02591
|
Namespaces can be labeled to enforce the [Pod Security Standards](/docs/concepts/security/pod-security-standards). The three policies [privileged](/docs/concepts/security/pod-security-standards/#privileged), [baseline](/docs/concepts/security/pod-security-standards/#baseline) and [restricted](/docs/concepts/security/pod-security-standards/#restricted) broadly cover the security spectrum and are implemented by the [Pod Security](/docs/concepts/security/pod-security-admission/) {{< glossary\_tooltip text="admission controller" term\_id="admission-controller" >}}. ## {{% heading "prerequisites" %}} Pod Security Admission was available by default in Kubernetes v1.23, as a beta. From version 1.25 onwards, Pod Security Admission is generally available. {{% version-check %}} ## Requiring the `baseline` Pod Security Standard with namespace labels This manifest defines a Namespace `my-baseline-namespace` that: - \_Blocks\_ any pods that don't satisfy the `baseline` policy requirements. - Generates a user-facing warning and adds an audit annotation to any created pod that does not meet the `restricted` policy requirements. - Pins the versions of the `baseline` and `restricted` policies to v{{< skew currentVersion >}}. ```yaml apiVersion: v1 kind: Namespace metadata: name: my-baseline-namespace labels: pod-security.kubernetes.io/enforce: baseline pod-security.kubernetes.io/enforce-version: v{{< skew currentVersion >}} # We are setting these to our \_desired\_ `enforce` level. pod-security.kubernetes.io/audit: restricted pod-security.kubernetes.io/audit-version: v{{< skew currentVersion >}} pod-security.kubernetes.io/warn: restricted pod-security.kubernetes.io/warn-version: v{{< skew currentVersion >}} ``` ## Add labels to existing namespaces with `kubectl label` {{< note >}} When an `enforce` policy (or version) label is added or changed, the admission plugin will test each pod in the namespace against the new policy. Violations are returned to the user as warnings. {{< /note >}} It is helpful to apply the `--dry-run` flag when initially evaluating security profile changes for namespaces. The Pod Security Standard checks will still be run in \_dry run\_ mode, giving you information about how the new policy would treat existing pods, without actually updating a policy. ```shell kubectl label --dry-run=server --overwrite ns --all \ pod-security.kubernetes.io/enforce=baseline ``` ### Applying to all namespaces If you're just getting started with the Pod Security Standards, a suitable first step would be to configure all namespaces with audit annotations for a stricter level such as `baseline`: ```shell kubectl label --overwrite ns --all \ pod-security.kubernetes.io/audit=baseline \ pod-security.kubernetes.io/warn=baseline ``` Note that this is not setting an enforce level, so that namespaces that haven't been explicitly evaluated can be distinguished. You can list namespaces without an explicitly set enforce level using this command: ```shell kubectl get namespaces --selector='!pod-security.kubernetes.io/enforce' ``` ### Applying to a single namespace You can update a specific namespace as well. This command adds the `enforce=restricted` policy to `my-existing-namespace`, pinning the restricted policy version to v{{< skew currentVersion >}}. ```shell kubectl label --overwrite ns my-existing-namespace \ pod-security.kubernetes.io/enforce=restricted \ pod-security.kubernetes.io/enforce-version=v{{< skew currentVersion >}} ```
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/enforce-standards-namespace-labels.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/enforce-standards-namespace-labels.md
|
[
-0.004953627474606037,
-0.015507819131016731,
0.02312861569225788,
-0.03133430331945419,
0.03880753740668297,
0.0057591223157942295,
0.06516904383897781,
-0.038381606340408325,
0.04957190901041031,
0.03483482822775841,
0.022643832489848137,
-0.01819141022861004,
0.024350076913833618,
0.024197254329919815,
0.04970104247331619,
-0.035985611379146576,
0.07967700809240341,
-0.0076289428398013115,
-0.011954094283282757,
0.0012558352900668979,
0.06885041296482086,
0.04064800590276718,
0.02504730224609375,
-0.014365491457283497,
-0.1191379502415657,
0.014806201681494713,
-0.07077224552631378,
0.040549445897340775,
0.025306254625320435,
-0.008013103157281876,
-0.03023327887058258,
0.028188560158014297,
0.08306083083152771,
0.07056000828742981,
0.06616351008415222,
-0.007698258385062218,
0.0017632943345233798,
-0.050327494740486145,
-0.04736526310443878,
0.010110078379511833,
-0.005681197624653578,
-0.06316376477479935,
-0.09817609935998917,
0.05637787654995918,
-0.05193173885345459,
0.011646370403468609,
-0.01128793228417635,
-0.10877344012260437,
-0.012781085446476936,
-0.00484309671446681,
0.06814242899417877,
-0.062451936304569244,
0.0878230482339859,
-0.0013492594007402658,
0.030338143929839134,
0.019889507442712784,
-0.05722664296627045,
0.03883501514792442,
0.061617400497198105,
0.060403332114219666,
-0.011063337326049805,
-0.038371194154024124,
-0.047980308532714844,
-0.009464491158723831,
0.0010548775317147374,
-0.00731658237054944,
-0.04458274319767952,
0.06974063813686371,
0.0514325313270092,
0.011398029513657093,
0.0239526629447937,
0.027340920642018318,
0.020931024104356766,
-0.032971981912851334,
-0.020536961033940315,
0.004604770336300135,
-0.05497650057077408,
0.08124255388975143,
0.01371787954121828,
-0.11300689727067947,
0.02041226625442505,
0.03471161425113678,
0.05897146090865135,
0.011517124250531197,
-0.008725899271667004,
0.058483634144067764,
-0.01977790705859661,
-0.0627572238445282,
0.03916666656732559,
0.026715919375419617,
0.046734824776649475,
-0.12415603548288345,
0.06390402466058731,
-0.03978258743882179,
0.05188338831067085,
-0.04829991236329079,
-0.007477919105440378,
0.00025522909709252417,
-0.016934046521782875,
0.006297441199421883,
-0.016452275216579437,
-0.07146736979484558,
-0.04977148771286011,
0.00031891692196950316,
0.062425289303064346,
-0.013501092791557312,
0.0029078300576657057,
-0.0426684133708477,
0.06017468497157097,
0.07819641381502151,
-0.018856456503272057,
0.027313528582453728,
-0.017722686752676964,
0.014283513650298119,
-0.04054544121026993,
-0.026165278628468513,
-0.013849964365363121,
-0.030074572190642357,
0.11332052201032639,
0.043670523911714554,
0.04535471647977829,
-0.026913898065686226,
0.06918007135391235,
-0.022951405495405197,
-0.0767420306801796,
0.020920807495713234,
-0.06665241718292236,
-1.6730006616307274e-33,
0.01589474268257618,
-0.005567639134824276,
-0.08359573781490326,
-0.020222827792167664,
0.021237216889858246,
-0.07902327924966812,
-0.07162816822528839,
0.035308342427015305,
-0.012370972894132137,
0.0180226881057024,
-0.003999714273959398,
0.06923007220029831,
0.0055176797322928905,
-0.06424406170845032,
0.06011622026562691,
0.08482737094163895,
-0.06444231420755386,
0.11423367261886597,
0.11744865775108337,
0.043148551136255264,
0.02160462737083435,
-0.04484925419092178,
-0.0093201519921422,
0.0029418880585581064,
0.07827340811491013,
0.011716482229530811,
-0.014640199951827526,
-0.13634736835956573,
0.06145840883255005,
0.04504818469285965,
-0.05012284591794014,
-0.03759220987558365,
0.07738051563501358,
-0.01662493497133255,
-0.06200980767607689,
0.005958089604973793,
0.0019315568497404456,
0.0019367346540093422,
-0.07135579735040665,
-0.10454355180263519,
0.021053781732916832,
-0.04615781083703041,
0.0025916527956724167,
0.003291565924882889,
0.06803762167692184,
0.016696251928806305,
0.009370295330882072,
-0.06193815544247627,
0.07489392161369324,
0.007048961240798235,
-0.049806706607341766,
-0.057602111250162125,
0.008488613180816174,
-0.07788855582475662,
-0.02908502146601677,
-0.06775128841400146,
0.019007869064807892,
0.02230798453092575,
-0.07500433921813965,
-0.007387809455394745,
-0.0854545384645462,
0.013359220698475838,
0.008036809973418713,
-0.017016606405377388,
0.042114704847335815,
0.03526251018047333,
-0.06711393594741821,
0.023379500955343246,
0.04990099370479584,
0.0157371386885643,
-0.13544075191020966,
0.02094477228820324,
-0.060034606605768204,
0.11254335194826126,
-0.008061658591032028,
-0.08292161673307419,
0.026957811787724495,
0.058507077395915985,
-0.05681974068284035,
0.005185287445783615,
-0.0372292622923851,
-0.013407688587903976,
-0.004086076281964779,
0.09256534278392792,
-0.0540727898478508,
-0.03340616449713707,
0.032158263027668,
0.009947383776307106,
-0.0530097559094429,
-0.018695058301091194,
0.030895380303263664,
-0.0681724101305008,
-0.05785026773810387,
0.06715808808803558,
-0.09162694215774536,
-1.1569454173082964e-33,
0.1073361486196518,
-0.018030870705842972,
-0.04249512031674385,
0.022502398118376732,
-0.03864014521241188,
0.006676241289824247,
0.013053948991000652,
0.062072671949863434,
0.043174970895051956,
-0.04225285351276398,
0.011503724381327629,
0.0035964041016995907,
0.12066619843244553,
0.015538303181529045,
-0.04965956509113312,
-0.002134831389412284,
-0.15596428513526917,
-0.01367653626948595,
-0.031930405646562576,
0.03110927902162075,
0.012287820689380169,
0.0077517470344901085,
0.03169497475028038,
0.04138418287038803,
0.01654261164367199,
0.004146939143538475,
0.008177276700735092,
0.01181148923933506,
0.006809185724705458,
0.0015997469890862703,
-0.02624480426311493,
-0.05929369106888771,
-0.06664208322763443,
0.018643740564584732,
-0.005115739535540342,
-0.10236600786447525,
-0.008350261487066746,
0.029892422258853912,
-0.027545776218175888,
0.009130280464887619,
0.04901393502950668,
0.036324240267276764,
-0.03821748122572899,
-0.03484302759170532,
-0.06901206076145172,
0.022058701142668724,
0.05904289707541466,
-0.010107985697686672,
0.0069408901035785675,
-0.14386357367038727,
-0.002831457182765007,
-0.05669976398348808,
-0.056163448840379715,
0.05883927643299103,
-0.019072990864515305,
0.04020866006612778,
0.020154157653450966,
0.012664029374718666,
-0.05417497456073761,
0.059983398765325546,
0.06555670499801636,
-0.03193995729088783,
0.005597423762083054,
0.05345477908849716,
-0.012821698561310768,
-0.07433296740055084,
-0.06265678256750107,
0.06972905993461609,
-0.008672332391142845,
-0.007811217103153467,
0.006754777859896421,
-0.08847787231206894,
0.0363728329539299,
0.03858061134815216,
-0.002097909338772297,
-0.037877462804317474,
0.1453852653503418,
-0.08899722993373871,
0.01884780265390873,
0.024655809625983238,
-0.06013043597340584,
0.07870986312627792,
-0.06868793070316315,
0.07614044845104218,
0.09746474772691727,
0.08563532680273056,
0.06386694312095642,
0.06435789912939072,
0.03769378736615181,
0.026931412518024445,
-0.00005031669570598751,
-0.0007998772780410945,
-0.05354256555438042,
0.08624085783958435,
-0.0762866884469986,
-4.5381959523638216e-8,
0.05102236568927765,
0.03541979566216469,
0.014604609459638596,
0.049020152539014816,
0.04478844627737999,
0.013098537921905518,
-0.027024369686841965,
-0.02754341810941696,
-0.0587739534676075,
0.005791626404970884,
-0.025080613791942596,
0.10471482574939728,
-0.11838966608047485,
-0.057623490691185,
-0.024578828364610672,
-0.0004103733808733523,
-0.03229372203350067,
0.07496757060289383,
-0.03624044358730316,
-0.03317037597298622,
-0.08472326397895813,
-0.05917120724916458,
-0.0025774389505386353,
-0.04859619587659836,
-0.04289054498076439,
0.061461545526981354,
0.03410732001066208,
-0.023222357034683228,
0.07219190895557404,
0.041374657303094864,
-0.026875678449869156,
0.013283023610711098,
-0.02226409874856472,
0.015998579561710358,
-0.022965537384152412,
0.053750187158584595,
-0.08510424941778183,
0.016283107921481133,
0.07827332615852356,
0.07420293241739273,
-0.05627825856208801,
-0.08006768673658371,
0.006544162053614855,
0.016814906150102615,
-0.024631725624203682,
0.07929392158985138,
0.003361388808116317,
0.056919459253549576,
0.02907692641019821,
0.015222766436636448,
-0.006941125262528658,
-0.04051348567008972,
-0.011916164308786392,
0.08386273682117462,
-0.045191340148448944,
0.021826408803462982,
-0.026230009272694588,
-0.08938741683959961,
0.001132215023972094,
-0.050313934683799744,
0.01945500448346138,
-0.0440741702914238,
0.0442805290222168,
0.04060761630535126
] | 0.164302
|
This page shows how to use an Init Container to initialize a Pod before an application Container runs. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Create a Pod that has an Init Container In this exercise you create a Pod that has one application Container and one Init Container. The init container runs to completion before the application container starts. Here is the configuration file for the Pod: {{% code\_sample file="pods/init-containers.yaml" %}} In the configuration file, you can see that the Pod has a Volume that the init container and the application container share. The init container mounts the shared Volume at `/work-dir`, and the application container mounts the shared Volume at `/usr/share/nginx/html`. The init container runs the following command and then terminates: ```shell wget -O /work-dir/index.html http://info.cern.ch ``` Notice that the init container writes the `index.html` file in the root directory of the nginx server. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/init-containers.yaml ``` Verify that the nginx container is running: ```shell kubectl get pod init-demo ``` The output shows that the nginx container is running: ``` NAME READY STATUS RESTARTS AGE init-demo 1/1 Running 0 1m ``` Get a shell into the nginx container running in the init-demo Pod: ```shell kubectl exec -it init-demo -- /bin/bash ``` In your shell, send a GET request to the nginx server: ``` root@nginx:~# apt-get update root@nginx:~# apt-get install curl root@nginx:~# curl localhost ``` The output shows that nginx is serving the web page that was written by the init container: ```html http://info.cern.ch # http://info.cern.ch - home of the first website ...- [Browse the first website](http://info.cern.ch/hypertext/WWW/TheProject.html) ... ``` ## {{% heading "whatsnext" %}} \* Learn more about [communicating between Containers running in the same Pod](/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/). \* Learn more about [Init Containers](/docs/concepts/workloads/pods/init-containers/). \* Learn more about [Volumes](/docs/concepts/storage/volumes/). \* Learn more about [Debugging Init Containers](/docs/tasks/debug/debug-application/debug-init-containers/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-pod-initialization.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-pod-initialization.md
|
[
-0.02558209002017975,
0.031516656279563904,
0.008052719756960869,
0.012500561773777008,
0.01609514281153679,
-0.06476446986198425,
-0.0017190264770761132,
0.00042704344377852976,
0.0020399638451635838,
0.04089644178748131,
-0.020729387179017067,
0.03763572499155998,
-0.02886260487139225,
0.020016085356473923,
0.007957571186125278,
-0.05579625815153122,
0.05117540434002876,
-0.01047900877892971,
-0.00014533937792293727,
-0.03766587749123573,
-0.014748702757060528,
0.08555589616298676,
0.04663803428411484,
0.033052150160074234,
-0.019884850829839706,
-0.03744405880570412,
-0.06250657886266708,
-0.006905707530677319,
0.054090604186058044,
0.025906234979629517,
0.023040078580379486,
0.0032743073534220457,
0.02916995994746685,
0.03676408901810646,
0.011164039373397827,
0.17821337282657623,
0.03791322931647301,
-0.059462592005729675,
-0.021091047674417496,
-0.01755720190703869,
0.043671246618032455,
-0.013495284132659435,
-0.09680338948965073,
-0.0077301207929849625,
-0.059240683913230896,
-0.07652216404676437,
-0.04889319837093353,
-0.05429433286190033,
0.02944173850119114,
-0.025960136204957962,
-0.05820512771606445,
-0.09556347876787186,
0.06027592346072197,
0.01920313388109207,
0.046377599239349365,
0.034420158714056015,
0.020469924435019493,
0.04616067558526993,
0.053647249937057495,
0.015079698525369167,
-0.011784219183027744,
-0.049849335104227066,
0.03205075114965439,
-0.05443137139081955,
0.08948194235563278,
-0.02156537026166916,
-0.028261195868253708,
0.01227656751871109,
0.00264789373613894,
-0.04918494448065758,
0.05576302483677864,
0.02307967282831669,
-0.013041939586400986,
-0.05096987634897232,
-0.054851267486810684,
0.021136639639735222,
-0.008413637056946754,
0.04545474424958229,
-0.08078663051128387,
0.010893473401665688,
0.016611851751804352,
0.06051291152834892,
0.0430573970079422,
-0.017752720043063164,
-0.0678124725818634,
0.007644725032150745,
0.05472654849290848,
-0.016759539023041725,
0.037385135889053345,
-0.07240062952041626,
0.012141402810811996,
-0.046783447265625,
-0.054141342639923096,
-0.007459770888090134,
0.09394624829292297,
0.0074312929064035416,
-0.02075868844985962,
0.036238893866539,
0.022836143150925636,
0.03713726997375488,
0.02761075273156166,
-0.08976756036281586,
0.03326014056801796,
0.04429169371724129,
0.09137235581874847,
-0.09030375629663467,
-0.021114369854331017,
-0.05014575645327568,
0.027487939223647118,
0.009014884009957314,
-0.0010303868912160397,
-0.07476256787776947,
0.032819900661706924,
0.09216896444559097,
-0.05350383743643761,
0.020295564085245132,
-0.01086576096713543,
0.052094973623752594,
-0.014439761638641357,
0.07693734019994736,
0.07497342675924301,
-0.03165483474731445,
0.07940085232257843,
-0.001686707022599876,
-0.056895747780799866,
-0.07242181897163391,
-0.0022508669644594193,
1.970441323678068e-33,
0.04946545511484146,
-0.11033948510885239,
0.004300759639590979,
0.06039980426430702,
0.057469844818115234,
-0.10627445578575134,
0.019914746284484863,
0.03378995880484581,
-0.015131046995520592,
-0.027614587917923927,
-0.05331815779209137,
0.09860274940729141,
-0.04204544052481651,
0.028289085254073143,
-0.07300111651420593,
-0.08900267630815506,
-0.09393343329429626,
0.06789538264274597,
0.07045282423496246,
-0.002046571345999837,
0.06933406740427017,
-0.07277873158454895,
-0.1084752157330513,
-0.011095883324742317,
0.05201033875346184,
-0.014242240227758884,
-0.0009199012420140207,
-0.1225958988070488,
-0.0039587561041116714,
0.03473952040076256,
0.02689346671104431,
0.0063949888572096825,
-0.03471467271447182,
0.014337580651044846,
-0.1319115310907364,
-0.017264902591705322,
0.010585139505565166,
0.04918456822633743,
-0.08935852348804474,
-0.0684664249420166,
0.08754575997591019,
0.003224701154977083,
-0.007978019304573536,
-0.026225663721561432,
-0.032425280660390854,
-0.06948161870241165,
0.023899490013718605,
-0.08134891837835312,
0.11265908181667328,
0.032628852874040604,
0.007699060253798962,
-0.04702591896057129,
0.01646868884563446,
-0.03619977831840515,
-0.002536958083510399,
0.0037104322109371424,
0.033635929226875305,
-0.05577398091554642,
0.021242965012788773,
-0.052257463335990906,
-0.09285858273506165,
-0.0014942487468943,
-0.040181610733270645,
0.037715643644332886,
0.008981290273368359,
0.03352681174874306,
-0.02643834426999092,
-0.0267390888184309,
0.10362638533115387,
0.0330764502286911,
-0.11279144883155823,
-0.0035826547536998987,
-0.00923217087984085,
-0.01865971088409424,
-0.005119675304740667,
0.02091703563928604,
0.006420067977160215,
0.04076768457889557,
-0.12610957026481628,
0.010474842973053455,
0.025757113471627235,
-0.008668456226587296,
-0.07966019958257675,
0.04294862970709801,
-0.0023652620147913694,
0.02741403318941593,
0.004185328260064125,
-0.013422707095742226,
-0.04082518070936203,
-0.007016700692474842,
0.02323109842836857,
0.06490633636713028,
-0.07137297838926315,
-0.022549813613295555,
-0.008088851347565651,
-3.71276915237144e-33,
0.12530264258384705,
-0.02703469805419445,
0.010724874213337898,
0.024690181016921997,
0.023095227777957916,
0.03224077448248863,
0.02531789056956768,
-0.03159201890230179,
-0.05068167671561241,
-0.006846971809864044,
-0.06476369500160217,
-0.07834187895059586,
0.045581039041280746,
0.08949635922908783,
-0.13016436994075775,
0.029687432572245598,
-0.047057848423719406,
-0.026521669700741768,
0.052084557712078094,
0.04904823377728462,
-0.021006524562835693,
-0.018121233209967613,
0.07458438724279404,
0.022040175274014473,
-0.008272464387118816,
0.007786772679537535,
0.10979852825403214,
-0.04840672016143799,
-0.04521052911877632,
-0.04745972156524658,
0.006210633087903261,
-0.03905102238059044,
-0.0158392321318388,
-0.021714026108384132,
-0.015362049452960491,
-0.014200267381966114,
-0.11856202781200409,
0.058535993099212646,
0.013541520573198795,
-0.06893808394670486,
0.13923092186450958,
-0.03472600132226944,
-0.04915468767285347,
-0.004893240053206682,
-0.1081731989979744,
-0.06356920301914215,
0.0689023807644844,
-0.021454181522130966,
-0.024186477065086365,
-0.04880739375948906,
0.016286831349134445,
0.03585436940193176,
-0.03114759922027588,
0.007784979417920113,
0.041438665241003036,
0.002733779838308692,
0.05123459920287132,
0.040957048535346985,
-0.043393805623054504,
0.03501049056649208,
0.10227547585964203,
-0.013299292884767056,
0.06409379839897156,
-0.03938177600502968,
-0.06687889248132706,
-0.09316080808639526,
-0.06711427867412567,
0.0533180870115757,
0.04596217721700668,
0.03085719235241413,
-0.012995387427508831,
0.03164852410554886,
0.09092771261930466,
0.004649928770959377,
0.0016435101861134171,
0.01674470491707325,
0.036274030804634094,
-0.09377980977296829,
0.059571798890829086,
-0.028032362461090088,
-0.09592609107494354,
0.11143455654382706,
-0.08141761273145676,
0.002189644379541278,
0.014377965591847897,
0.05310436338186264,
0.040614377707242966,
0.06032436341047287,
0.0016298469854518771,
0.04260404035449028,
0.012671025469899178,
0.036587703973054886,
0.020694363862276077,
0.011242040432989597,
-0.01649678871035576,
-5.331801844477013e-8,
0.03266925364732742,
0.020543143153190613,
-0.007668308448046446,
0.08095428347587585,
-0.005108955781906843,
-0.04014642909169197,
0.07922441512346268,
0.036966584622859955,
-0.018776750192046165,
0.00693831080570817,
-0.03899691253900528,
0.032897528260946274,
-0.07816282659769058,
0.040945105254650116,
-0.036645859479904175,
0.016788125038146973,
0.023608846589922905,
0.042409054934978485,
0.002009166870266199,
-0.05909781530499458,
-0.05255021154880524,
-0.02979414537549019,
0.03749751299619675,
-0.007778010796755552,
0.00045511097414419055,
0.08933538943529129,
0.06007206812500954,
-0.0029097306542098522,
0.02776426449418068,
0.002551683923229575,
0.009464112110435963,
0.002962237223982811,
-0.09488866478204727,
0.061436764895915985,
-0.05391578748822212,
-0.0053435275331139565,
-0.12316656112670898,
0.020034315064549446,
0.01327024307101965,
-0.02507280558347702,
-0.00284996023401618,
-0.0044084638357162476,
0.002135020913556218,
-0.07857555150985718,
-0.06461286544799805,
0.045497845858335495,
-0.09702108800411224,
0.0354921780526638,
-0.04835593327879906,
0.0480831079185009,
-0.019242096692323685,
-0.0050443424843251705,
0.02238631434738636,
0.05543409287929535,
0.08956345915794373,
0.09939688444137573,
0.04542415961623192,
-0.05545620620250702,
-0.009033538401126862,
0.012174866162240505,
0.004882556851953268,
-0.012065029703080654,
0.04779473692178726,
0.02080278843641281
] | 0.109696
|
{{< feature-state state="stable" >}} This page shows how to assign extended resources to a Container. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} Before you do this exercise, do the exercise in [Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/). That will configure one of your Nodes to advertise a dongle resource. ## Assign an extended resource to a Pod To request an extended resource, include the `resources:requests` field in your Container manifest. Extended resources are fully qualified with any domain outside of `\*.kubernetes.io/`. Valid extended resource names have the form `example.com/foo` where `example.com` is replaced with your organization's domain and `foo` is a descriptive resource name. Here is the configuration file for a Pod that has one Container: {{% code\_sample file="pods/resource/extended-resource-pod.yaml" %}} In the configuration file, you can see that the Container requests 3 dongles. Create a Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod.yaml ``` Verify that the Pod is running: ```shell kubectl get pod extended-resource-demo ``` Describe the Pod: ```shell kubectl describe pod extended-resource-demo ``` The output shows dongle requests: ```yaml Limits: example.com/dongle: 3 Requests: example.com/dongle: 3 ``` ## Attempt to create a second Pod Here is the configuration file for a Pod that has one Container. The Container requests two dongles. {{% code\_sample file="pods/resource/extended-resource-pod-2.yaml" %}} Kubernetes will not be able to satisfy the request for two dongles, because the first Pod used three of the four available dongles. Attempt to create a Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/extended-resource-pod-2.yaml ``` Describe the Pod ```shell kubectl describe pod extended-resource-demo-2 ``` The output shows that the Pod cannot be scheduled, because there is no Node that has 2 dongles available: ``` Conditions: Type Status PodScheduled False ... Events: ... ... Warning FailedScheduling pod (extended-resource-demo-2) failed to fit in any node fit failure summary on nodes : Insufficient example.com/dongle (1) ``` View the Pod status: ```shell kubectl get pod extended-resource-demo-2 ``` The output shows that the Pod was created, but not scheduled to run on a Node. It has a status of Pending: ```yaml NAME READY STATUS RESTARTS AGE extended-resource-demo-2 0/1 Pending 0 6m ``` ## Clean up Delete the Pods that you created for this exercise: ```shell kubectl delete pod extended-resource-demo kubectl delete pod extended-resource-demo-2 ``` ## {{% heading "whatsnext" %}} ### For application developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) ### For cluster administrators \* [Advertise Extended Resources for a Node](/docs/tasks/administer-cluster/extended-resource-node/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/extended-resource.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/extended-resource.md
|
[
0.0195586159825325,
0.022550031542778015,
0.06600140780210495,
0.04637622460722923,
0.04338910058140755,
-0.016710076481103897,
0.0036496666725724936,
-0.018885325640439987,
-0.06155156344175339,
0.04041106998920441,
-0.033552538603544235,
-0.022613506764173508,
0.023729907348752022,
0.023126620799303055,
0.11443831771612167,
-0.00001730000803945586,
0.06670941412448883,
-0.040072813630104065,
0.027275606989860535,
-0.05183836445212364,
0.06915978342294693,
0.010033401660621166,
0.07262644171714783,
-0.021760933101177216,
-0.04464033246040344,
-0.04177568107843399,
-0.044538240879774094,
-0.0170881487429142,
0.0632782131433487,
0.01293663214892149,
-0.003109817625954747,
0.022633394226431847,
-0.014406516216695309,
0.014086799696087837,
0.09192304313182831,
0.1411130428314209,
-0.013169773854315281,
-0.0557955764234066,
-0.07973899692296982,
0.008566498756408691,
0.08632723987102509,
0.012664022855460644,
-0.02501954510807991,
-0.03226882964372635,
-0.04049605503678322,
-0.04173969477415085,
-0.042717345058918,
-0.05480235815048218,
-0.02252122387290001,
0.0003350225742906332,
0.06112417206168175,
-0.13256748020648956,
0.06777588278055191,
0.01575571857392788,
0.025041868910193443,
0.035361822694540024,
-0.023359034210443497,
0.07313800603151321,
0.056860409677028656,
0.011995564214885235,
0.057858098298311234,
-0.08333775401115417,
-0.004431584849953651,
-0.09075531363487244,
0.004930940922349691,
-0.01833903230726719,
-0.013175043277442455,
0.08702327311038971,
-0.027381569147109985,
-0.034027423709630966,
0.05894762650132179,
0.004764746408909559,
-0.019557934254407883,
-0.033260688185691833,
0.019494518637657166,
0.029490360990166664,
-0.02276645414531231,
0.08260180801153183,
0.007113978732377291,
-0.0745120570063591,
-0.019067201763391495,
0.026074733585119247,
0.04177304357290268,
-0.03890545293688774,
-0.035787563771009445,
0.023093845695257187,
-0.017480911687016487,
-0.050760455429553986,
0.057645682245492935,
-0.020924154669046402,
0.01676904410123825,
-0.1013079583644867,
-0.023907611146569252,
-0.08521586656570435,
0.06429468840360641,
0.04021988436579704,
-0.03471389785408974,
-0.010109872557222843,
-0.016029030084609985,
0.02023405395448208,
0.0037747384048998356,
0.021042434498667717,
0.016706237569451332,
-0.0013665438164025545,
0.0894615426659584,
-0.038205452263355255,
-0.08273951709270477,
0.0499064065515995,
0.034238364547491074,
0.08363542705774307,
-0.01074698194861412,
0.028962982818484306,
0.01408641692250967,
0.013183646835386753,
-0.032758500427007675,
-0.02655947208404541,
0.035958919674158096,
0.006403326988220215,
-0.02143649011850357,
0.016036242246627808,
0.05839712917804718,
-0.0897124782204628,
0.03102649748325348,
-0.009284534491598606,
0.013417351059615612,
-0.07228648662567139,
-0.0877518355846405,
2.638818962689974e-33,
0.05000053346157074,
-0.0715176910161972,
0.028838947415351868,
0.03294898942112923,
0.07231124490499496,
-0.0844932347536087,
0.01163747999817133,
0.0009742410038597882,
-0.09044445306062698,
-0.018383771181106567,
-0.035680655390024185,
0.14803634583950043,
-0.01858755201101303,
0.0060323672369122505,
-0.07950379699468613,
-0.06376779079437256,
-0.03882712125778198,
0.0851028710603714,
0.1760546863079071,
0.011483564041554928,
-0.0050774067640304565,
-0.05557073652744293,
-0.07688713818788528,
0.0001741393789416179,
0.028080405667424202,
-0.025745972990989685,
0.024068418890237808,
-0.0815088301897049,
-0.002473669359460473,
0.0021990258246660233,
-0.007753569167107344,
-0.0443420372903347,
-0.01069726049900055,
0.016079440712928772,
-0.12413717806339264,
-0.04792578145861626,
0.009756134822964668,
0.021164853125810623,
-0.09866549074649811,
-0.03925009071826935,
0.05245855823159218,
-0.016102613881230354,
0.0168874803930521,
-0.06473475694656372,
0.05045657977461815,
-0.04147481545805931,
0.08476562052965164,
-0.09319572895765305,
0.09742061048746109,
0.007466610055416822,
-0.008932537399232388,
-0.12112259864807129,
0.002030516741797328,
-0.07024047523736954,
0.050462011247873306,
0.006038594990968704,
0.024552222341299057,
0.033740539103746414,
0.011182599700987339,
-0.045847151428461075,
-0.04129743203520775,
-0.020587744191288948,
-0.036257077008485794,
0.03478842228651047,
0.03088153339922428,
0.004902403336018324,
-0.011841846629977226,
0.030421217903494835,
0.06210983172059059,
0.007123194169253111,
-0.04150965064764023,
0.0003965260984841734,
-0.006524880416691303,
0.054727066308259964,
-0.05296130105853081,
-0.043530307710170746,
0.007806593552231789,
0.05401843413710594,
-0.11941227316856384,
0.062207575887441635,
-0.014594397507607937,
-0.04688084498047829,
-0.034346386790275574,
0.10113400220870972,
-0.0022557894699275494,
-0.022158466279506683,
-0.000991512555629015,
-0.043019525706768036,
-0.031129997223615646,
-0.00124391820281744,
0.010108765214681625,
0.015811938792467117,
-0.08398288488388062,
0.010986232198774815,
-0.056002791970968246,
-2.6261719291720725e-33,
0.13903772830963135,
0.011256649158895016,
0.016910554841160774,
-0.044957853853702545,
0.04480312019586563,
0.009938468225300312,
0.047680940479040146,
0.01719563640654087,
-0.016446493566036224,
-0.09604068845510483,
-0.08395405113697052,
-0.06431377679109573,
0.04260627552866936,
0.01879209093749523,
-0.13205945491790771,
0.03357343003153801,
-0.07676194608211517,
-0.027352314442396164,
0.023978151381015778,
0.06112175062298775,
-0.07653569430112839,
0.02611314319074154,
0.05570410564541817,
0.034116778522729874,
0.04484022408723831,
0.013014234602451324,
0.01685781031847,
-0.006705089937895536,
-0.0630512610077858,
-0.014893773011863232,
-0.022168973460793495,
-0.14810240268707275,
-0.013219460844993591,
0.010400435887277126,
0.027756517753005028,
-0.052098631858825684,
-0.05682126060128212,
0.08692658692598343,
0.003929349593818188,
-0.006723151076585054,
0.08523981273174286,
-0.041607119143009186,
-0.05500718951225281,
-0.0045811887830495834,
-0.03336045891046524,
-0.05620045214891434,
0.04261402785778046,
-0.05444687604904175,
-0.0638042613863945,
-0.07804393023252487,
-0.005693984217941761,
-0.028713906183838844,
-0.08316981047391891,
0.03815692663192749,
-0.016084367409348488,
0.021442370489239693,
0.050938695669174194,
0.062135349959135056,
-0.003876484464854002,
0.0013030286645516753,
0.08793873339891434,
-0.07260053604841232,
0.05436432734131813,
0.023800242692232132,
0.007856471464037895,
-0.07158643752336502,
-0.009294864721596241,
0.014753736555576324,
-0.03299671784043312,
0.021497933194041252,
-0.038119882345199585,
0.043919943273067474,
0.058723803609609604,
0.049988437443971634,
0.03945416212081909,
-0.019880494102835655,
0.07069101929664612,
-0.04056438431143761,
0.058881260454654694,
-0.006075397599488497,
-0.11682306975126266,
0.06740575283765793,
-0.11693871021270752,
-0.027287917211651802,
0.03941505402326584,
0.0769628956913948,
0.07675717771053314,
0.12968838214874268,
0.00946847628802061,
0.0632614865899086,
-0.01694127358496189,
0.0076991599053144455,
-0.02830531820654869,
0.09669094532728195,
-0.06716480106115341,
-5.6386465274727016e-8,
0.013732361607253551,
0.07777991145849228,
-0.03753824532032013,
0.042213521897792816,
0.018890872597694397,
-0.015961049124598503,
0.034150924533605576,
-0.0015348675660789013,
-0.006660167593508959,
0.03497108072042465,
-0.033948853611946106,
0.02420288324356079,
-0.031973227858543396,
0.05285695940256119,
0.018665801733732224,
-0.04087252542376518,
0.04468488320708275,
0.08947601914405823,
-0.0349554643034935,
-0.041820015758275986,
-0.03427021577954292,
0.004105048719793558,
0.013792028650641441,
0.0016088570700958371,
0.027789151296019554,
0.11132632941007614,
-0.020043732598423958,
0.005516546778380871,
0.01730341650545597,
0.016453737393021584,
-0.0016404592897742987,
0.00044427678221836686,
-0.08657819032669067,
0.07577036321163177,
-0.03267356753349304,
-0.00927094928920269,
-0.08212726563215256,
0.042922958731651306,
0.030833080410957336,
0.09814849495887756,
-0.016781318932771683,
0.027378229424357414,
-0.04086647182703018,
-0.01284732110798359,
0.012211259454488754,
0.06413712352514267,
-0.045847345143556595,
0.035408683121204376,
-0.010689649730920792,
0.04282273352146149,
-0.0038788446690887213,
-0.060459017753601074,
0.01614709012210369,
0.05327124148607254,
-0.003264176193624735,
0.021533992141485214,
-0.015482757240533829,
0.005924553144723177,
-0.02803308703005314,
0.0018230160931125283,
0.008232072927057743,
-0.015583658590912819,
0.023432869464159012,
0.032380059361457825
] | 0.126011
|
\*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. Unlike Pods that are managed by the control plane (for example, a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}}); instead, the kubelet watches 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 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. The Pod names will be suffixed with the node hostname with a leading hyphen. {{< note >}} If you are running clustered Kubernetes and are using static Pods to run a Pod on every node, you should probably be using a {{< glossary\_tooltip text="DaemonSet" term\_id="daemonset" >}} instead. {{< /note >}} {{< 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 >}} {{< note >}} Static pods do not support [ephemeral containers](/docs/concepts/workloads/pods/ephemeral-containers/). {{< /note >}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} This page assumes you're using {{< glossary\_tooltip term\_id="cri-o" >}} to run Pods, and that your nodes are running the Fedora operating system. Instructions for other distributions or Kubernetes installations may vary. ## Create a static pod {#static-pod-creation} You can configure a static Pod with either a [file system hosted configuration file](/docs/tasks/configure-pod-container/static-pod/#configuration-files) or a [web hosted configuration file](/docs/tasks/configure-pod-container/static-pod/#pods-created-via-http). ### Filesystem-hosted static Pod manifest {#configuration-files} Manifests are standard Pod definitions in JSON or YAML format in a specific directory. Use the `staticPodPath: ` field in the [kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/), which periodically scans the directory and creates/deletes static Pods as YAML/JSON files appear/disappear there. Note that the kubelet will ignore files starting with dots when scanning the specified directory. For example, this is how to start a simple web server as a static Pod: 1. Choose a node where you want to run the static Pod. In this example, it's `my-node1`. ```shell ssh my-node1 ``` 1. Choose a directory, say `/etc/kubernetes/manifests` and place a web server Pod definition there, for example `/etc/kubernetes/manifests/static-web.yaml`: ```shell # Run this command on the node where kubelet is running mkdir -p /etc/kubernetes/manifests/ cat </etc/kubernetes/manifests/static-web.yaml apiVersion: v1 kind: Pod metadata: name: static-web labels: role: myrole spec: containers: - name: web image: nginx ports: - name: web containerPort: 80 protocol: TCP EOF ``` 1. Configure the kubelet on that node to set a `staticPodPath` value in the [kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/). See [Set Kubelet Parameters Via A Configuration File](/docs/tasks/administer-cluster/kubelet-config-file/) for more information. An alternative and deprecated method is to configure the kubelet on that node to look for static Pod manifests locally, using a command line argument. To use the deprecated approach, start the kubelet with the `--pod-manifest-path=/etc/kubernetes/manifests/` argument. 1. Restart the kubelet. On Fedora, you would run: ```shell # Run this command on the node where the kubelet is running systemctl restart kubelet ``` ### Web-hosted static pod manifest {#pods-created-via-http} Kubelet periodically downloads a file specified by `--manifest-url=` argument and interprets it as a JSON/YAML file that contains Pod definitions. Similar to how [filesystem-hosted manifests](#configuration-files) work, the kubelet refetches the manifest on a schedule. If there are changes to the list of static Pods, the kubelet applies them. To use this approach: 1. Create a YAML file and store it on a web server so that you can pass
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/static-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/static-pod.md
|
[
-0.034174129366874695,
-0.009465890005230904,
0.10686855018138885,
0.01886138878762722,
-0.05870999023318291,
-0.03536077216267586,
0.02869560569524765,
-0.06880362331867218,
0.10641787201166153,
0.021088624373078346,
0.0015209696721285582,
-0.09450656175613403,
0.014825128018856049,
-0.051418237388134,
0.03501356020569801,
0.020982801914215088,
0.042681239545345306,
-0.025523198768496513,
-0.03290923684835434,
-0.003651960752904415,
0.05508647486567497,
0.0410958006978035,
-0.005212968681007624,
0.017045944929122925,
-0.015447794459760189,
0.00025072795688174665,
-0.07492151111364365,
-0.016594067215919495,
0.11862240731716156,
0.010056652128696442,
-0.05077406391501427,
0.034802090376615524,
-0.08910642564296722,
0.09331297129392624,
0.07362118363380432,
0.033368177711963654,
-0.0157488863915205,
-0.00878836028277874,
-0.026803113520145416,
0.028449131175875664,
0.058509550988674164,
-0.04403679445385933,
-0.11693704128265381,
-0.03958926349878311,
-0.034555986523628235,
0.03295799344778061,
-0.0010004997020587325,
-0.05240224301815033,
-0.009563513100147247,
0.006965224165469408,
0.002348685171455145,
-0.15120568871498108,
0.03378455713391304,
0.00027462869184091687,
0.0825759619474411,
-0.0009181922650896013,
-0.01193563174456358,
0.025949671864509583,
0.07992717623710632,
0.05208640173077583,
0.029888959601521492,
-0.01091238297522068,
0.0047254618257284164,
0.009180999360978603,
-0.0008689489332027733,
-0.00001064007210516138,
-0.0013945596292614937,
0.03832017630338669,
0.008788575418293476,
-0.04334152862429619,
0.06950274854898453,
-0.02043016627430916,
0.018066901713609695,
-0.020282112061977386,
0.015602588653564453,
0.032384827733039856,
-0.041500892490148544,
0.04473313316702843,
-0.020248061046004295,
-0.11495191603899002,
0.0645989179611206,
0.07417666912078857,
0.12012718617916107,
0.05946602672338486,
-0.03069150634109974,
-0.0354435034096241,
-0.02035575732588768,
-0.025777461007237434,
-0.003531793365254998,
0.03790326043963432,
0.01362371165305376,
-0.13716325163841248,
0.05271054804325104,
-0.13733062148094177,
0.06066044047474861,
-0.019838247448205948,
0.027346806600689888,
-0.0041665141470730305,
0.010050986893475056,
-0.0012121082982048392,
0.02522076852619648,
0.009960119612514973,
-0.012195644900202751,
0.027199028059840202,
0.034847840666770935,
-0.03923894092440605,
-0.08858530968427658,
-0.05007972940802574,
0.055429983884096146,
0.021907294169068336,
-0.03676567226648331,
0.03869426250457764,
-0.01407674327492714,
0.029727691784501076,
-0.08632935583591461,
-0.04658877104520798,
-0.022775404155254364,
-0.01036677323281765,
0.07689902931451797,
0.015414710156619549,
0.03353351354598999,
-0.07791336625814438,
0.004456143360584974,
0.02357318066060543,
-0.05803545564413071,
0.08139023929834366,
-0.026006633415818214,
2.901768967445258e-33,
0.11538179218769073,
-0.07307036966085434,
-0.025228971615433693,
-0.050308529287576675,
-0.047098372131586075,
-0.10278355330228806,
-0.04109777882695198,
-0.004052483476698399,
-0.06886026263237,
-0.009777243249118328,
-0.016095275059342384,
0.07284148037433624,
0.010020398534834385,
-0.005739815998822451,
0.030828440561890602,
0.0218166746199131,
-0.02329428680241108,
0.05538623780012131,
0.01758771389722824,
-0.015723921358585358,
0.007815893739461899,
-0.020847223699092865,
-0.006756950635462999,
0.005797176156193018,
0.027869097888469696,
-0.0009196188766509295,
-0.0037146355025470257,
-0.06594447046518326,
-0.02104869671165943,
0.0258953794836998,
-0.026985421776771545,
-0.02513296902179718,
0.0789061114192009,
0.049560870975255966,
-0.1359504759311676,
-0.0062875342555344105,
-0.043343815952539444,
-0.05203745886683464,
-0.027486158534884453,
-0.050648145377635956,
0.0069398838095366955,
-0.002041612984612584,
-0.02103489078581333,
-0.06147978454828262,
0.04837803542613983,
0.04789281636476517,
-0.01449192687869072,
-0.09407471865415573,
0.047421254217624664,
0.0011246711947023869,
-0.03739640489220619,
0.027166996151208878,
0.005496853031218052,
0.024408280849456787,
0.03628940507769585,
0.06823105365037918,
0.07772766053676605,
-0.08050479739904404,
-0.06978988647460938,
0.02643769420683384,
-0.09482484310865402,
0.016607485711574554,
0.014781134203076363,
-0.01696547120809555,
0.07045076042413712,
0.09123790264129639,
-0.014893386512994766,
0.11015719920396805,
-0.0035557206720113754,
0.03860870748758316,
-0.02597103826701641,
0.06578894704580307,
-0.014672367833554745,
0.02238362282514572,
0.023193666711449623,
-0.06771915405988693,
-0.010781505145132542,
0.003410134231671691,
-0.11567433178424835,
-0.0008945567533373833,
-0.001005649333819747,
-0.04357762634754181,
-0.01576349511742592,
0.08076510578393936,
-0.03469835966825485,
-0.030640434473752975,
0.028891928493976593,
-0.033490292727947235,
-0.08432137966156006,
0.02713877707719803,
0.018104026094079018,
0.000795886036939919,
-0.1454361379146576,
0.02115868218243122,
-0.1973506212234497,
-4.723022425588715e-33,
0.11205337941646576,
-0.016072077676653862,
-0.040814109146595,
0.005171346478164196,
-0.030246438458561897,
0.002926748478785157,
-0.002267599105834961,
0.08032453805208206,
-0.010265885852277279,
-0.03227810934185982,
-0.01634805276989937,
0.005316523369401693,
-0.02270229533314705,
0.0808366984128952,
-0.022432999685406685,
0.01905548945069313,
-0.11330568045377731,
0.02836131490767002,
-0.006347086280584335,
0.023978013545274734,
-0.008108153939247131,
-0.02544981800019741,
0.013389908708631992,
0.024913951754570007,
0.0005474564386531711,
-0.045988354831933975,
-0.010514930821955204,
0.03628697246313095,
-0.025682969018816948,
-0.0391828715801239,
0.05541478097438812,
-0.004212064202874899,
-0.03264214098453522,
-0.037350501865148544,
0.022553961724042892,
-0.05394289270043373,
-0.04488328844308853,
0.017142610624432564,
-0.02342524565756321,
-0.0019344417378306389,
0.03650772199034691,
0.03652617335319519,
-0.02221931330859661,
-0.07377289980649948,
-0.008429639972746372,
0.02276172675192356,
-0.044870782643556595,
-0.004665678832679987,
-0.014824087731540203,
-0.0986400842666626,
0.04581132531166077,
-0.04542209580540657,
-0.03545212000608444,
0.04977495223283768,
-0.1039406880736351,
0.035732850432395935,
0.014731381088495255,
0.023114673793315887,
-0.07844337821006775,
-0.023412957787513733,
0.06380990147590637,
-0.09406723827123642,
0.033201321959495544,
0.03029136173427105,
-0.013170818798244,
-0.035336125642061234,
0.011836759746074677,
0.026866832748055458,
0.02229483798146248,
-0.019925830885767937,
-0.0036240103654563427,
-0.021122347563505173,
0.030877310782670975,
-0.02272704243659973,
-0.015213833190500736,
0.04872185364365578,
0.044875241816043854,
-0.09493207931518555,
0.0635438784956932,
-0.05686105787754059,
-0.05440323054790497,
0.07992718368768692,
0.009493840858340263,
0.06328099966049194,
0.013377166353166103,
0.03295644745230675,
0.038231123238801956,
0.14814980328083038,
0.03806613013148308,
0.0734606459736824,
0.02957974374294281,
0.018745694309473038,
-0.003471622010692954,
0.14110136032104492,
-0.009244821034371853,
-4.883485615891914e-8,
0.023553552106022835,
0.12469810247421265,
-0.043246492743492126,
0.06163879856467247,
0.013392901979386806,
-0.00004481828000280075,
0.04321422800421715,
-0.01910323090851307,
-0.06866610050201416,
-0.034888237714767456,
-0.04804599657654762,
0.03597152605652809,
-0.09629574418067932,
-0.0006933624390512705,
0.025605911388993263,
0.009364373050630093,
-0.060603391379117966,
0.04170769453048706,
0.015758123248815536,
-0.05872206389904022,
-0.09406952559947968,
-0.008643589913845062,
0.0018433365039527416,
0.010181402787566185,
-0.03433474898338318,
0.0557430200278759,
0.05375604331493378,
0.026152504608035088,
0.01606639474630356,
0.011662873439490795,
-0.025538479909300804,
0.02392042987048626,
-0.09842483699321747,
0.05166853591799736,
-0.006844788324087858,
0.027773777022957802,
-0.15808942914009094,
0.003011800814419985,
0.07877455651760101,
0.08748045563697815,
-0.009141899645328522,
-0.05671543627977371,
-0.07564608007669449,
0.0027053067460656166,
0.024905476719141006,
0.07702118903398514,
0.03861188516020775,
0.057475168257951736,
0.016727617010474205,
0.005881080403923988,
-0.03221767023205757,
-0.0338452085852623,
-0.012723645195364952,
0.07362528145313263,
-0.02795586548745632,
-0.014770649373531342,
0.00964019913226366,
-0.017530595883727074,
0.01570720225572586,
-0.006779937539249659,
0.021302904933691025,
-0.01180514506995678,
0.04725513234734535,
0.028300197795033455
] | 0.126864
|
definitions. Similar to how [filesystem-hosted manifests](#configuration-files) work, the kubelet refetches the manifest on a schedule. If there are changes to the list of static Pods, the kubelet applies them. To use this approach: 1. Create a YAML file and store it on a web server so that you can pass the URL of that file to the kubelet. ```yaml apiVersion: v1 kind: Pod metadata: name: static-web labels: role: myrole spec: containers: - name: web image: nginx ports: - name: web containerPort: 80 protocol: TCP ``` 1. Configure the kubelet on your selected node to use this web manifest by running it with `--manifest-url=`. On Fedora, edit `/etc/kubernetes/kubelet` to include this line: ```shell KUBELET\_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --manifest-url=" ``` 1. Restart the kubelet. On Fedora, you would run: ```shell # Run this command on the node where the kubelet is running systemctl restart kubelet ``` ## Observe static pod behavior {#behavior-of-static-pods} When the kubelet starts, it automatically starts all defined static Pods. As you have defined a static Pod and restarted the kubelet, the new static Pod should already be running. You can view running containers (including static Pods) by running (on the node): ```shell # Run this command on the node where the kubelet is running crictl ps ``` The output might be something like: ```console CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID 129fd7d382018 docker.io/library/nginx@sha256:... 11 minutes ago Running web 0 34533c6729106 ``` {{< note >}} `crictl` outputs the image URI and SHA-256 checksum. `NAME` will look more like: `docker.io/library/nginx@sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31`. {{< /note >}} You can see the mirror Pod on the API server: ```shell kubectl get pods ``` ```console NAME READY STATUS RESTARTS AGE static-web-my-node1 1/1 Running 0 2m ``` {{< note >}} Make sure the kubelet has permission to create the mirror Pod in the API server. If not, the creation request is rejected by the API server. {{< /note >}} {{< glossary\_tooltip term\_id="label" text="Labels" >}} from the static Pod are propagated into the mirror Pod. You can use those labels as normal via {{< glossary\_tooltip term\_id="selector" text="selectors" >}}, etc. If you try to use `kubectl` to delete the mirror Pod from the API server, the kubelet \_doesn't\_ remove the static Pod: ```shell kubectl delete pod static-web-my-node1 ``` ```console pod "static-web-my-node1" deleted ``` You can see that the Pod is still running: ```shell kubectl get pods ``` ```console NAME READY STATUS RESTARTS AGE static-web-my-node1 1/1 Running 0 4s ``` Back on your node where the kubelet is running, you can try to stop the container manually. You'll see that, after a time, the kubelet will notice and will restart the Pod automatically: ```shell # Run these commands on the node where the kubelet is running crictl stop 129fd7d382018 # replace with the ID of your container sleep 20 crictl ps ``` ```console CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID 89db4553e1eeb docker.io/library/nginx@sha256:... 19 seconds ago Running web 1 34533c6729106 ``` Once you identify the right container, you can get the logs for that container with `crictl`: ```shell # Run these commands on the node where the container is running crictl logs ``` ```console 10.240.0.48 - - [16/Nov/2022:12:45:49 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.47.0" "-" 10.240.0.48 - - [16/Nov/2022:12:45:50 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.47.0" "-" 10.240.0.48 - - [16/Nove/2022:12:45:51 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.47.0" "-" ``` To find more about how to debug using `crictl`, please visit [\_Debugging Kubernetes nodes with crictl\_](/docs/tasks/debug/debug-cluster/crictl/). ## Dynamic addition and removal of static pods The running kubelet periodically scans the configured directory (`/etc/kubernetes/manifests` in our example) for changes and adds/removes Pods as files appear/disappear in this directory.
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/static-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/static-pod.md
|
[
0.05033726990222931,
0.03118479810655117,
0.04352204129099846,
0.013401160947978497,
-0.036040015518665314,
0.0141686350107193,
-0.04076670482754707,
0.04477129876613617,
0.03977234661579132,
0.002030230825766921,
-0.06360511481761932,
-0.07760291546583176,
-0.029059365391731262,
-0.017849180847406387,
0.059197861701250076,
-0.046767592430114746,
0.04741111770272255,
0.06268582493066788,
0.0086632389575243,
0.002562084700912237,
-0.00714599946513772,
0.03622087091207504,
0.04271651431918144,
-0.014797368086874485,
-0.03457321599125862,
-0.06674797087907791,
0.009990613907575607,
0.004709157627075911,
0.0894910916686058,
-0.04408147931098938,
-0.0007345475605688989,
0.038844283670186996,
0.006945342291146517,
0.03252669796347618,
0.04801253229379654,
0.08909612894058228,
0.059455860406160355,
-0.06786858290433884,
-0.059837281703948975,
0.014618675224483013,
0.10391278564929962,
-0.011800933629274368,
-0.08561452478170395,
-0.06401333212852478,
-0.0529954619705677,
-0.0353582464158535,
0.010746415704488754,
-0.03913817182183266,
0.006710287649184465,
-0.0172960814088583,
-0.003295481437817216,
-0.14663101732730865,
0.041424460709095,
0.014512404799461365,
0.05626785755157471,
0.03418831154704094,
0.03104420192539692,
0.04665258899331093,
0.08108861744403839,
0.037720341235399246,
0.030479229986667633,
-0.022304102778434753,
0.05947292968630791,
-0.014412649907171726,
-0.031202416867017746,
0.02811749093234539,
-0.04406566545367241,
0.03418247029185295,
0.025487273931503296,
-0.020603587850928307,
0.05050720274448395,
-0.00628582201898098,
-0.016838712617754936,
-0.06874909996986389,
-0.027448367327451706,
-0.03572733327746391,
-0.03234115242958069,
0.05677749961614609,
-0.040666185319423676,
-0.007823659107089043,
0.05528301000595093,
0.028157008811831474,
0.11393309384584427,
-0.01764417625963688,
-0.06713361293077469,
-0.08043964952230453,
-0.000669589382596314,
-0.013629934750497341,
0.013919882476329803,
-0.0009953150292858481,
-0.0015257465420290828,
-0.04580743610858917,
0.01768782176077366,
-0.13393133878707886,
0.025671832263469696,
0.019855407997965813,
-0.00638474989682436,
0.07530815899372101,
0.06415380537509918,
-0.005243091844022274,
0.03261597082018852,
0.036693453788757324,
-0.06378228217363358,
0.024801865220069885,
0.07774714380502701,
-0.055908288806676865,
-0.010775802657008171,
-0.01450275257229805,
0.04009668529033661,
-0.023762296885252,
-0.02987286075949669,
-0.00593335647135973,
-0.015299457125365734,
0.011578919366002083,
-0.06679666042327881,
-0.004031235817819834,
-0.013153474777936935,
0.04840271919965744,
0.034729138016700745,
0.02092345617711544,
0.09427528083324432,
-0.04590020701289177,
0.025232192128896713,
0.06643230468034744,
-0.05272398889064789,
0.023339467123150826,
-0.01657227613031864,
2.1046118815389392e-33,
0.08137620985507965,
-0.07783503085374832,
0.02722339518368244,
-0.025879740715026855,
-0.006663687992841005,
-0.15820153057575226,
-0.042924072593450546,
-0.04830650985240936,
-0.050821274518966675,
-0.028964271768927574,
-0.03575606271624565,
0.04224028438329697,
-0.030599970370531082,
0.04949374496936798,
0.013312914408743382,
0.011901521123945713,
-0.10527060925960541,
0.02442239038646221,
0.11419890820980072,
-0.051069475710392,
0.015744617208838463,
-0.062113478779792786,
-0.027974607422947884,
0.026520784944295883,
0.02649959921836853,
-0.0287912767380476,
0.05836806073784828,
-0.045564938336610794,
-0.04593898355960846,
-0.019703978672623634,
0.05851694568991661,
-0.01024157740175724,
0.05045560002326965,
0.06664394587278366,
-0.13546167314052582,
-0.0005098971305415034,
-0.04660569876432419,
0.04805675894021988,
-0.07383508235216141,
0.0005187855567783117,
0.036182332783937454,
-0.010821948759257793,
-0.04223741963505745,
-0.04690955951809883,
0.06885286420583725,
-0.034317512065172195,
0.01491833571344614,
-0.10756043344736099,
0.09708868712186813,
0.011113172397017479,
-0.04644708335399628,
-0.04024443030357361,
0.032510966062545776,
0.01177845150232315,
0.02894006296992302,
0.056405697017908096,
0.037921566516160965,
-0.07473563402891159,
-0.07663562893867493,
-0.007033113855868578,
-0.058959249407052994,
-0.01929178461432457,
0.027758175507187843,
0.032122474163770676,
0.0035038155037909746,
0.08715894818305969,
-0.011081806384027004,
0.06311177462339401,
-0.005573784001171589,
0.03518037125468254,
-0.0419037863612175,
0.058845747262239456,
-0.046389389783144,
-0.013889939524233341,
-0.03252134472131729,
-0.04186832904815674,
-0.028417125344276428,
0.011424453929066658,
-0.18036875128746033,
0.045028556138277054,
0.03697562962770462,
-0.06898756325244904,
-0.03731745481491089,
0.09814032167196274,
0.013192848302423954,
-0.03273102641105652,
0.029978007078170776,
0.04092743620276451,
-0.02519953064620495,
0.021167097613215446,
-0.0034115463495254517,
0.024921784177422523,
-0.09089409559965134,
0.020647574216127396,
-0.09833765774965286,
-3.975086226887203e-33,
0.12405559420585632,
-0.012446453794836998,
-0.0020307491067796946,
0.011376667767763138,
-0.02475166507065296,
0.04006021097302437,
-0.02694549970328808,
0.09326866269111633,
-0.01451293658465147,
-0.015152687206864357,
-0.08759313076734543,
-0.011883331462740898,
0.01595153845846653,
-0.015520283952355385,
-0.1365862935781479,
0.03351026028394699,
-0.10887092351913452,
-0.028468025848269463,
-0.01005719043314457,
-0.012534667737782001,
-0.06224521994590759,
-0.026686424389481544,
0.06307223439216614,
-0.01736312359571457,
0.00596235366538167,
0.00335971568711102,
0.011820556595921516,
-0.00590472761541605,
-0.08850257843732834,
-0.03534925729036331,
0.02303612045943737,
-0.06843076646327972,
-0.04144986718893051,
-0.025369083508849144,
0.005461664870381355,
-0.016605572775006294,
-0.040466513484716415,
0.05419537052512169,
0.004857085645198822,
-0.0019578735809773207,
0.02427850104868412,
0.05185265839099884,
-0.029424721375107765,
-0.04729287698864937,
-0.04459535330533981,
0.029554003849625587,
-0.0030211128760129213,
-0.041587695479393005,
-0.016895867884159088,
-0.07648351043462753,
-0.012548928149044514,
-0.00402198638767004,
-0.03718084469437599,
0.07107668370008469,
-0.013951228931546211,
0.06996108591556549,
-0.015056321397423744,
0.07406293600797653,
-0.07768407464027405,
0.029328249394893646,
0.05949746444821358,
-0.12311379611492157,
0.04268518462777138,
-0.010173917748034,
-0.0586579330265522,
-0.0754091665148735,
-0.03231401368975639,
0.03409155085682869,
-0.034425344318151474,
0.06817124783992767,
-0.0024092199746519327,
0.005776367150247097,
0.0076420847326517105,
0.061981841921806335,
-0.03362298011779785,
0.00816732831299305,
0.03994903713464737,
-0.014876307919621468,
0.061542291194200516,
0.01244419626891613,
-0.022411853075027466,
0.08930891752243042,
-0.0840311050415039,
-0.04903252050280571,
0.04630033299326897,
0.04308271408081055,
0.04837379977107048,
0.07466010004281998,
0.0830383375287056,
0.04526831582188606,
0.02172231115400791,
0.02897477149963379,
-0.015046376734972,
0.04583503678441048,
-0.03228115662932396,
-5.1921592358894486e-8,
0.08565513044595718,
0.007715275045484304,
-0.08465417474508286,
0.037771034985780716,
-0.003082330571487546,
0.006083029787987471,
0.03387945517897606,
-0.019833702594041824,
-0.05004284903407097,
-0.011424935422837734,
-0.06384675204753876,
0.007666897960007191,
-0.061810821294784546,
0.006533943582326174,
-0.006520365364849567,
-0.019223911687731743,
0.033611033111810684,
0.0875038430094719,
0.05780522897839546,
-0.039143215864896774,
-0.07708660513162613,
-0.04979526624083519,
0.03362623602151871,
0.04267396405339241,
0.033812474459409714,
0.11619935184717178,
0.059696704149246216,
-0.02539583295583725,
0.030635831877589226,
0.024757470935583115,
-0.02148320898413658,
0.009668818674981594,
-0.08338578790426254,
0.03874136507511139,
-0.034025464206933975,
0.018573913723230362,
-0.24780002236366272,
0.014285964891314507,
0.03431219980120659,
0.039368122816085815,
0.02544599212706089,
-0.0500754676759243,
-0.027804221957921982,
-0.022993559017777443,
-0.03889317065477371,
-0.0021088048815727234,
0.04902930557727814,
0.07855862379074097,
0.013652189634740353,
0.0702090635895729,
0.006340999621897936,
-0.08471652865409851,
0.00520653510466218,
0.06736057996749878,
0.0277271531522274,
0.07398676872253418,
-0.007392496801912785,
-0.04585921764373779,
0.026514682918787003,
-0.00690703559666872,
-0.01733315922319889,
-0.007549552712589502,
0.011651999317109585,
-0.02162531390786171
] | 0.168342
|
"curl/7.47.0" "-" ``` To find more about how to debug using `crictl`, please visit [\_Debugging Kubernetes nodes with crictl\_](/docs/tasks/debug/debug-cluster/crictl/). ## Dynamic addition and removal of static pods The running kubelet periodically scans the configured directory (`/etc/kubernetes/manifests` in our example) for changes and adds/removes Pods as files appear/disappear in this directory. ```shell # This assumes you are using filesystem-hosted static Pod configuration # Run these commands on the node where the container is running # mv /etc/kubernetes/manifests/static-web.yaml /tmp sleep 20 crictl ps # You see that no nginx container is running mv /tmp/static-web.yaml /etc/kubernetes/manifests/ sleep 20 crictl ps ``` ```console CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID f427638871c35 docker.io/library/nginx@sha256:... 19 seconds ago Running web 1 34533c6729106 ``` ## {{% heading "whatsnext" %}} \* [Generate static Pod manifests for control plane components](/docs/reference/setup-tools/kubeadm/implementation-details/#generate-static-pod-manifests-for-control-plane-components) \* [Generate static Pod manifest for local etcd](/docs/reference/setup-tools/kubeadm/implementation-details/#generate-static-pod-manifest-for-local-etcd) \* [Debugging Kubernetes nodes with `crictl`](/docs/tasks/debug/debug-cluster/crictl/) \* [Learn more about `crictl`](https://github.com/kubernetes-sigs/cri-tools) \* [Map `docker` CLI commands to `crictl`](/docs/reference/tools/map-crictl-dockercli/) \* [Set up etcd instances as static pods managed by a kubelet](/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/static-pod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/static-pod.md
|
[
0.012391612865030766,
0.08192513138055801,
0.0278934333473444,
0.037098515778779984,
0.038658421486616135,
-0.0661669597029686,
-0.039793431758880615,
-0.0044872574508190155,
0.059091489762067795,
0.05984598398208618,
-0.028082093223929405,
-0.11271124333143234,
-0.02430017851293087,
-0.00842420756816864,
-0.027495404705405235,
-0.06014401093125343,
-0.031591374427080154,
0.04579431563615799,
0.01384356152266264,
-0.027681531384587288,
-0.056068580597639084,
0.07354344427585602,
0.011948984116315842,
0.04479005187749863,
-0.003098017070442438,
0.01446510199457407,
-0.04077340289950371,
-0.0033248593099415302,
0.03269606828689575,
-0.009354932233691216,
-0.0168442539870739,
0.029808243736624718,
0.021760085597634315,
0.038701314479112625,
0.10125238448381424,
0.14281682670116425,
0.07071872055530548,
-0.034484345465898514,
-0.040047600865364075,
0.04757889360189438,
0.07475307583808899,
-0.016846243292093277,
-0.06148369982838631,
-0.1246161237359047,
-0.007843117229640484,
-0.06832825392484665,
-0.057823918759822845,
-0.0429905541241169,
-0.021768830716609955,
0.014901720918715,
-0.017942653968930244,
-0.07683201134204865,
0.015613689087331295,
0.021901849657297134,
0.03889073058962822,
0.028550682589411736,
-0.013484766706824303,
0.09403646737337112,
0.10160712897777557,
0.013302117586135864,
0.029635565355420113,
-0.011981084942817688,
0.05168028175830841,
-0.040480177849531174,
-0.01728362962603569,
-0.004409631714224815,
-0.0423772968351841,
0.006749861873686314,
0.05372393876314163,
0.016182469204068184,
0.08377958089113235,
0.009773923084139824,
-0.07296508550643921,
-0.10172675549983978,
0.018454141914844513,
0.0571894571185112,
-0.03236028552055359,
-0.013802842237055302,
-0.10137342661619186,
0.007955266162753105,
0.031092338263988495,
-0.03174286335706711,
0.07954561710357666,
-0.000548053823877126,
-0.0537300631403923,
0.00956854596734047,
0.05185182765126228,
-0.05882445350289345,
0.020863113924860954,
-0.04660872370004654,
0.032002825289964676,
0.02383575774729252,
-0.013400444760918617,
-0.12004459649324417,
0.09744486957788467,
0.04081401973962784,
-0.04276033863425255,
0.05703837797045708,
0.009238838218152523,
0.037164103239774704,
0.01871386542916298,
-0.004522437695413828,
-0.013349312357604504,
0.019256537780165672,
0.07547677308320999,
-0.010218079201877117,
-0.012366104871034622,
-0.00682075833901763,
-0.005441285669803619,
-0.010560714639723301,
-0.008937770500779152,
0.02063281089067459,
-0.017146119847893715,
0.03490283712744713,
0.01854025386273861,
0.013795780017971992,
-0.016461925581097603,
0.04358495771884918,
0.00829252041876316,
0.05358629301190376,
0.15333212912082672,
-0.07913562655448914,
-0.029911188408732414,
0.038651611655950546,
-0.00325105432420969,
0.04720337316393852,
0.017266113311052322,
6.684108467273169e-33,
0.050023555755615234,
-0.038566723465919495,
0.02910328097641468,
0.047663021832704544,
0.013550857082009315,
-0.10825619101524353,
-0.03529995679855347,
0.004800076130777597,
-0.04918334633111954,
-0.025761891156435013,
-0.07350192964076996,
0.08742834627628326,
-0.008753771893680096,
-0.014081638306379318,
-0.01143177505582571,
-0.04154709726572037,
-0.04050737991929054,
-0.047796428203582764,
0.10207652300596237,
-0.006707509979605675,
0.0580243319272995,
-0.06250091642141342,
-0.041707493364810944,
-0.010736532509326935,
0.010533875785768032,
-0.04491947591304779,
0.06285291910171509,
-0.0735781118273735,
-0.0530528724193573,
-0.02541171945631504,
0.04689791053533554,
-0.009784788824617863,
0.0549083910882473,
0.030530033633112907,
-0.09252975136041641,
-0.02153506688773632,
0.004889361094683409,
0.06276123970746994,
-0.16851554811000824,
0.00408184016123414,
-0.0027294608298689127,
0.0035089629236608744,
-0.0882415622472763,
-0.048356279730796814,
0.0739264115691185,
-0.05830102041363716,
0.0038255115505307913,
-0.12065480649471283,
0.0566638708114624,
0.039630088955163956,
-0.02310344949364662,
0.03322630748152733,
0.022059490904211998,
-0.03577557951211929,
0.01783502660691738,
0.030362924560904503,
0.05540061369538307,
-0.09597225487232208,
-0.029790444299578667,
0.022600270807743073,
0.007619427517056465,
0.009463027119636536,
0.003807465313002467,
-0.052953824400901794,
0.08281686902046204,
0.024889102205634117,
-0.009008519351482391,
0.06179437041282654,
0.029173633083701134,
0.04506019502878189,
-0.04666178673505783,
0.06315162777900696,
-0.005452651996165514,
-0.009702450595796108,
0.030017435550689697,
-0.05390724167227745,
-0.00019276463717687875,
0.025113608688116074,
-0.12643103301525116,
0.009518214501440525,
0.07607094943523407,
-0.08579681813716888,
0.015497829765081406,
0.03595937043428421,
0.012594064697623253,
-0.07522863149642944,
-0.010044315829873085,
0.03252425044775009,
-0.018183480948209763,
0.048680149018764496,
0.037831924855709076,
0.02713060937821865,
-0.09608902037143707,
-0.007892697118222713,
-0.12293973565101624,
-6.42310904845628e-33,
0.06302682310342789,
-0.036958567798137665,
-0.03525299206376076,
0.06397489458322525,
-0.05196591839194298,
0.006881012115627527,
-0.009382023476064205,
0.06810864806175232,
0.013556120917201042,
-0.06080805882811546,
0.006829588208347559,
-0.026118377223610878,
-0.006839763838797808,
0.05300617218017578,
-0.07040640711784363,
0.036227304488420486,
-0.09275195002555847,
-0.11182582378387451,
-0.00411631353199482,
0.007149866782128811,
-0.04579964280128479,
0.03905659168958664,
0.10072061419487,
0.05668525770306587,
-0.02259155921638012,
0.02303425781428814,
0.08122310042381287,
-0.006112831179052591,
-0.07219704240560532,
-0.06233736872673035,
0.034422364085912704,
-0.06764625757932663,
-0.037786807864904404,
0.10292701423168182,
-0.003529887180775404,
-0.028600210323929787,
-0.04915694147348404,
0.1228325143456459,
-0.01168524008244276,
-0.06378056854009628,
0.06820497661828995,
0.03619519993662834,
-0.03248004987835884,
-0.0643281564116478,
-0.0615856871008873,
-0.013552679680287838,
0.05068642646074295,
0.00372131634503603,
0.004119779448956251,
-0.08778705447912216,
0.003591215470805764,
-0.00562036270275712,
-0.06681299209594727,
0.05184396728873253,
0.02701493166387081,
0.06424294412136078,
0.006238147616386414,
0.046072300523519516,
-0.04688311740756035,
0.03333953768014908,
0.07793523371219635,
-0.08864432573318481,
-0.02853882685303688,
0.01081924233585596,
0.005625172518193722,
-0.06840154528617859,
-0.06366688013076782,
-0.004003714770078659,
0.01748626120388508,
0.03900710865855217,
0.006132206413894892,
0.04676463454961777,
-0.00887854490429163,
0.019457748159766197,
-0.013717662543058395,
0.024208033457398415,
-0.01941334269940853,
-0.056572325527668,
0.05747527629137039,
0.011237316764891148,
-0.021889828145503998,
0.018477562814950943,
-0.09414009749889374,
-0.05869333818554878,
-0.0066086892038583755,
0.05218019336462021,
-0.030957607552409172,
0.06807312369346619,
0.0867977887392044,
0.06246321648359299,
0.0242500938475132,
-0.015377906151115894,
-0.059791307896375656,
0.033775705844163895,
0.018973488360643387,
-5.344685760633183e-8,
0.09095452725887299,
-0.02465839497745037,
-0.03436462953686714,
0.07006266713142395,
0.07246451824903488,
-0.0094133410602808,
0.09380562603473663,
-0.010128524154424667,
-0.07012636214494705,
-0.02518717758357525,
-0.08838573098182678,
-0.006155825685709715,
-0.04848965257406235,
0.04771574214100838,
-0.002357042394578457,
-0.013749134726822376,
-0.03814814239740372,
0.07636549323797226,
0.03226318210363388,
-0.09359186142683029,
-0.08996360003948212,
-0.04616539552807808,
-0.030563145875930786,
0.04233425483107567,
0.002453991211950779,
0.010770177468657494,
0.06704328954219818,
0.017851557582616806,
0.009474263526499271,
-0.06362887471914291,
-0.04072387516498566,
-0.02624344639480114,
-0.05358371511101723,
-0.01287937629967928,
0.0033362191170454025,
0.02399877831339836,
-0.12875235080718994,
0.05703190341591835,
-0.0160308089107275,
0.026217391714453697,
-0.032592277973890305,
0.012151535600423813,
-0.03657667338848114,
-0.05486375838518143,
-0.05953701213002205,
-0.011672336608171463,
0.061443030834198,
0.09292087703943253,
0.0032530310563743114,
0.017312295734882355,
0.060813214629888535,
-0.062154900282621384,
0.022378208115696907,
0.061170563101768494,
-0.015284927561879158,
0.04044325277209282,
0.062390413135290146,
-0.06349090486764908,
-0.015115262009203434,
-0.00500934012234211,
-0.004358030389994383,
-0.019652564078569412,
0.030877189710736275,
-0.007683487609028816
] | 0.123702
|
Kubernetes provides a built-in [admission controller](/docs/reference/access-authn-authz/admission-controllers/#podsecurity) to enforce the [Pod Security Standards](/docs/concepts/security/pod-security-standards). You can configure this admission controller to set cluster-wide defaults and [exemptions](/docs/concepts/security/pod-security-admission/#exemptions). ## {{% heading "prerequisites" %}} Following an alpha release in Kubernetes v1.22, Pod Security Admission became available by default in Kubernetes v1.23, as a beta. From version 1.25 onwards, Pod Security Admission is generally available. {{% version-check %}} If you are not running Kubernetes {{< skew currentVersion >}}, you can switch to viewing this page in the documentation for the Kubernetes version that you are running. ## Configure the Admission Controller {{< note >}} `pod-security.admission.config.k8s.io/v1` configuration requires v1.25+. For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/). For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/). {{< /note >}} ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: AdmissionConfiguration plugins: - name: PodSecurity configuration: apiVersion: pod-security.admission.config.k8s.io/v1 # see compatibility note kind: PodSecurityConfiguration # Defaults applied when a mode label is not set. # # Level label values must be one of: # - "privileged" (default) # - "baseline" # - "restricted" # # Version label values must be one of: # - "latest" (default) # - specific version like "v{{< skew currentVersion >}}" defaults: enforce: "privileged" enforce-version: "latest" audit: "privileged" audit-version: "latest" warn: "privileged" warn-version: "latest" exemptions: # Array of authenticated usernames to exempt. usernames: [] # Array of runtime class names to exempt. runtimeClasses: [] # Array of namespaces to exempt. namespaces: [] ``` {{< note >}} The above manifest needs to be specified via the `--admission-control-config-file` to kube-apiserver. {{< /note >}}
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/enforce-standards-admission-controller.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/enforce-standards-admission-controller.md
|
[
0.07713057845830917,
0.002093659248203039,
0.03999757021665573,
-0.007982837967574596,
0.03139510005712509,
0.053498461842536926,
0.03657924011349678,
-0.01589568331837654,
0.02834208495914936,
0.06899219751358032,
0.013864140957593918,
-0.008383373729884624,
0.009630410932004452,
0.03552300110459328,
0.009539802558720112,
-0.06407085061073303,
0.08628183603286743,
-0.008395167998969555,
-0.0043272296898067,
-0.04890717938542366,
0.01244928129017353,
-0.04456381872296333,
0.016620494425296783,
0.005532477516680956,
-0.09656110405921936,
-0.02186054363846779,
-0.007012766320258379,
0.015732381492853165,
0.01752656139433384,
0.008355661295354366,
-0.058766815811395645,
-0.012824387289583683,
0.08146372437477112,
0.056543637067079544,
0.021045982837677002,
-0.040971435606479645,
0.038319796323776245,
-0.05652232468128204,
-0.03455234318971634,
0.04501977190375328,
-0.028758320957422256,
-0.06486693769693375,
-0.0816432535648346,
-0.012745151296257973,
-0.016565220430493355,
-0.026758480817079544,
-0.04246120527386665,
-0.09266249090433121,
-0.00786860752850771,
0.009953872300684452,
0.0756068304181099,
0.0014222159516066313,
0.10927558690309525,
-0.005841417703777552,
0.00014597173139918596,
0.026226337999105453,
-0.03851587325334549,
0.052956148982048035,
0.06116044148802757,
0.024751195684075356,
-0.0042664045467972755,
-0.06963944435119629,
-0.03209403157234192,
-0.033766552805900574,
-0.02705967426300049,
0.008834050968289375,
-0.007437332067638636,
0.05207841843366623,
0.07532983273267746,
0.011732605285942554,
0.08372920751571655,
0.01692977361381054,
-0.03125438466668129,
-0.06837598234415054,
-0.02004423178732395,
0.04585085064172745,
-0.041599929332733154,
0.04392685741186142,
0.00577918766066432,
-0.01781182363629341,
0.003644572338089347,
0.006102110259234905,
0.052444227039813995,
-0.04599267244338989,
-0.04133254289627075,
0.05447084456682205,
-0.0577053502202034,
-0.04908374696969986,
0.06851661950349808,
0.048695679754018784,
0.02313135378062725,
-0.04206126928329468,
0.0025255191139876842,
-0.04766302555799484,
0.07284034043550491,
-0.04816104844212532,
-0.006888890638947487,
-0.0424511544406414,
0.013678246177732944,
0.016233639791607857,
0.006892673671245575,
-0.057455502450466156,
-0.053723372519016266,
0.01002235896885395,
0.09626207500696182,
-0.01905103027820587,
0.03165404126048088,
-0.08256465196609497,
0.08613430708646774,
0.10632003098726273,
0.0022060812916606665,
-0.02294456772506237,
0.032864902168512344,
0.03948226571083069,
-0.021356668323278427,
0.008387488313019276,
0.04351825267076492,
-0.010811548680067062,
0.05615647882223129,
0.06034417450428009,
0.05336208641529083,
-0.01861562952399254,
0.08270059525966644,
0.014907091856002808,
-0.09068182110786438,
-0.0068007903173565865,
-0.11513037234544754,
1.6847144628366715e-33,
-0.007972905412316322,
0.008414528332650661,
-0.027027908712625504,
-0.08110233396291733,
-0.013916744850575924,
-0.12673640251159668,
-0.05406663939356804,
-0.02138480916619301,
-0.02644876390695572,
-0.002498896326869726,
-0.07003135979175568,
0.07167144119739532,
0.03244258463382721,
-0.06788541376590729,
0.054451581090688705,
0.08127741515636444,
-0.08551491051912308,
0.04641248658299446,
0.14756980538368225,
0.041276801377534866,
0.024846524000167847,
-0.10456006973981857,
0.0010817463044077158,
0.03885708004236221,
0.024369290098547935,
-0.033781614154577255,
-0.028495408594608307,
-0.09099238365888596,
0.022607728838920593,
0.035209521651268005,
-0.022281743586063385,
-0.02351492829620838,
0.06387694925069809,
-0.017732976004481316,
-0.09975593537092209,
-0.03119583986699581,
-0.030298665165901184,
0.017206480726599693,
-0.018671801313757896,
-0.11708677560091019,
0.019175129011273384,
-0.05111085623502731,
0.027005132287740707,
-0.028894225135445595,
0.11586954444646835,
0.022028757259249687,
0.027657706290483475,
-0.04267323389649391,
0.06189553439617157,
0.005212992895394564,
-0.08819220960140228,
-0.06137792766094208,
0.007738846354186535,
-0.06554029136896133,
-0.015014472417533398,
-0.08653746545314789,
0.06665384024381638,
-0.029215404763817787,
-0.06488080322742462,
-0.0060800244100391865,
-0.04614081233739853,
-0.017428770661354065,
0.027022330090403557,
-0.06954768300056458,
-0.008401282131671906,
0.003181301988661289,
-0.052256952971220016,
0.034415531903505325,
0.022120751440525055,
0.01253797672688961,
-0.14788982272148132,
0.020815430209040642,
-0.07408145815134048,
0.045517388731241226,
-0.0506010465323925,
-0.038156669586896896,
0.06989406049251556,
0.06434720754623413,
0.0018836724339053035,
0.013504098169505596,
-0.051592882722616196,
0.04392345994710922,
-0.002859341911971569,
0.0966733917593956,
-0.03869825229048729,
-0.023202290758490562,
0.020924096927046776,
0.04817986115813255,
-0.027536557987332344,
-0.01955290697515011,
0.09489600360393524,
-0.03807278722524643,
0.010990888811647892,
0.0915505588054657,
-0.05163411796092987,
-3.276061246097452e-33,
0.07906747609376907,
-0.001390596036799252,
-0.026886392384767532,
-0.044338762760162354,
-0.006719890516251326,
0.040384333580732346,
-0.01171069499105215,
0.05713559314608574,
0.05174301192164421,
-0.06534948199987411,
0.035579755902290344,
-0.02533227577805519,
0.12964791059494019,
-0.007972978986799717,
-0.06611115485429764,
-0.014357693493366241,
-0.07656688988208771,
0.059094492346048355,
0.023582542315125465,
0.009098985232412815,
-0.03291131556034088,
-0.038757842034101486,
0.07234705984592438,
0.01610945537686348,
0.020997656509280205,
-0.013532368466258049,
0.006548352539539337,
0.015851400792598724,
-0.05150410532951355,
-0.0062588793225586414,
0.0008714383002370596,
-0.06746716797351837,
-0.019765034317970276,
0.06002305820584297,
0.00607368303462863,
-0.07413624227046967,
0.0037890563253313303,
0.040451083332300186,
0.0032578851096332073,
0.017150158062577248,
0.020440617576241493,
0.04474513977766037,
-0.01823042705655098,
0.023238375782966614,
-0.06700501590967178,
0.04079229757189751,
0.09065981209278107,
-0.022392230108380318,
-0.03399017080664635,
-0.12669755518436432,
-0.014273608103394508,
-0.026318414136767387,
0.04175863042473793,
0.05404949188232422,
-0.027922065928578377,
0.030286064371466637,
0.027566252276301384,
0.07441087812185287,
0.023788349702954292,
0.0903811976313591,
0.04994149133563042,
-0.04987746477127075,
0.015051105991005898,
0.06036932021379471,
-0.06221993267536163,
-0.05285597965121269,
-0.03299492225050926,
0.13304781913757324,
-0.020359961315989494,
0.04913445562124252,
-0.019014256075024605,
-0.0688488632440567,
0.05573207885026932,
0.06178733706474304,
0.00916239246726036,
-0.08077329397201538,
0.05620869994163513,
-0.05320010706782341,
0.0004851608246099204,
-0.036820296198129654,
-0.04611349478363991,
0.08487644791603088,
-0.09618394076824188,
0.023761574178934097,
0.09970979392528534,
0.04388749971985817,
0.08952144533395767,
-0.01087301503866911,
0.05850404500961304,
0.0826774388551712,
-0.02904854528605938,
0.0032271724194288254,
-0.020431991666555405,
0.03496439754962921,
-0.05460813269019127,
-5.053474083638321e-8,
0.0833325982093811,
-0.025411246344447136,
0.026403941214084625,
0.029853306710720062,
0.09900345653295517,
0.03555942699313164,
-0.05491061881184578,
-0.04243762046098709,
-0.08872723579406738,
-0.005579840857535601,
-0.027097253128886223,
0.09465465694665909,
-0.06542859971523285,
-0.09822233766317368,
0.019846150651574135,
0.014322007074952126,
-0.037575364112854004,
0.04998563602566719,
0.001934156520292163,
-0.04431041702628136,
-0.08478374034166336,
-0.08149027824401855,
-0.0004997828509658575,
-0.023909958079457283,
-0.015077267773449421,
0.06539741158485413,
-0.008257754147052765,
-0.046272162348032,
0.06359963864088058,
0.05500456690788269,
-0.06886761635541916,
-0.017939377576112747,
-0.017004678025841713,
-0.010034463368356228,
-0.04626532271504402,
0.08396749198436737,
-0.11606259644031525,
0.005128776654601097,
-0.01754615269601345,
0.026177970692515373,
-0.05504477396607399,
-0.0404394306242466,
-0.0011864436091855168,
-0.01574230007827282,
-0.07724697887897491,
0.06639755517244339,
0.030878286808729172,
0.014230269938707352,
0.04702978581190109,
-0.0037506353110074997,
0.0389346145093441,
-0.02522909641265869,
-0.03757822886109352,
0.08524748682975769,
-0.0160357803106308,
0.028766246512532234,
-0.03539774566888809,
-0.08535214513540268,
0.03084137849509716,
-0.02151794172823429,
0.0340835340321064,
0.005333155859261751,
0.024346446618437767,
0.0161198228597641
] | 0.129642
|
A security context defines privilege and access control settings for a Pod or Container. Security context settings include, but are not limited to: \* Discretionary Access Control: Permission to access an object, like a file, is based on [user ID (UID) and group ID (GID)](https://wiki.archlinux.org/index.php/users\_and\_groups). \* [Security Enhanced Linux (SELinux)](https://en.wikipedia.org/wiki/Security-Enhanced\_Linux): Objects are assigned security labels. \* Running as privileged or unprivileged. \* [Linux Capabilities](https://linux-audit.com/linux-capabilities-hardening-linux-binaries-by-removing-setuid/): Give a process some privileges, but not all the privileges of the root user. \* [AppArmor](/docs/tutorials/security/apparmor/): Use program profiles to restrict the capabilities of individual programs. \* [Seccomp](/docs/tutorials/security/seccomp/): Filter a process's system calls. \* `allowPrivilegeEscalation`: Controls whether a process can gain more privileges than its parent process. This bool directly controls whether the [`no\_new\_privs`](https://www.kernel.org/doc/Documentation/prctl/no\_new\_privs.txt) flag gets set on the container process. `allowPrivilegeEscalation` is always true when the container: - is run as privileged, or - has `CAP\_SYS\_ADMIN` \* `readOnlyRootFilesystem`: Mounts the container's root filesystem as read-only. The above bullets are not a complete set of security context settings -- please see [SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core) for a comprehensive list. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Set the security context for a Pod To specify security settings for a Pod, include the `securityContext` field in the Pod specification. The `securityContext` field is a [PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core) object. The security settings that you specify for a Pod apply to all Containers in the Pod. Here is a configuration file for a Pod that has a `securityContext` and an `emptyDir` volume: {{% code\_sample file="pods/security/security-context.yaml" %}} In the configuration file, the `runAsUser` field specifies that for any Containers in the Pod, all processes run with user ID 1000. The `runAsGroup` field specifies the primary group ID of 3000 for all processes within any containers of the Pod. If this field is omitted, the primary group ID of the containers will be root(0). Any files created will also be owned by user 1000 and group 3000 when `runAsGroup` is specified. Since `fsGroup` field is specified, all processes of the container are also part of the supplementary group ID 2000. The owner for volume `/data/demo` and any files created in that volume will be Group ID 2000. Additionally, when the `supplementalGroups` field is specified, all processes of the container are also part of the specified groups. If this field is omitted, it means empty. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod security-context-demo ``` Get a shell to the running Container: ```shell kubectl exec -it security-context-demo -- sh ``` In your shell, list the running processes: ```shell ps ``` The output shows that the processes are running as user 1000, which is the value of `runAsUser`: ```none PID USER TIME COMMAND 1 1000 0:00 sleep 1h 6 1000 0:00 sh ... ``` In your shell, navigate to `/data`, and list the one directory: ```shell cd /data ls -l ``` The output shows that the `/data/demo` directory has group ID 2000, which is the value of `fsGroup`. ```none drwxrwsrwx 2 root 2000 4096 Jun 6 20:08 demo ``` In your shell, navigate to `/data/demo`, and create a file: ```shell cd demo echo hello > testfile ``` List the file in the `/data/demo` directory: ```shell ls -l ``` The output shows that `testfile` has group ID 2000, which is the value of `fsGroup`. ```none -rw-r--r-- 1 1000 2000 6 Jun 6 20:08 testfile ``` Run the following command: ```shell id ``` The output is similar to this: ```none uid=1000 gid=3000 groups=2000,3000,4000 ``` From the output, you can see that `gid` is 3000 which is
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
-0.002344082808122039,
0.045409902930259705,
-0.11732993274927139,
-0.02909315936267376,
0.05721714720129967,
-0.05232495814561844,
0.09381529688835144,
0.08118682354688644,
0.010546275414526463,
-0.028120994567871094,
0.033491622656583786,
-0.02774740569293499,
0.02036307565867901,
0.003280475502833724,
0.03538040444254875,
-0.032535552978515625,
0.08208520710468292,
0.046827662736177444,
-0.08483441919088364,
0.029540976509451866,
0.023489031940698624,
-0.02265092544257641,
0.012892497703433037,
0.0060934703797101974,
-0.09469443559646606,
0.006555981934070587,
-0.04401697218418121,
-0.03934374079108238,
0.055414825677871704,
0.012377588078379631,
0.022805385291576385,
0.028919603675603867,
0.011580492369830608,
0.0038073603063821793,
0.027624918147921562,
0.11869977414608002,
0.07628010213375092,
-0.09968381375074387,
-0.06597510725259781,
-0.0003579925396479666,
-0.029510410502552986,
-0.018293015658855438,
-0.10748909413814545,
0.07565220445394516,
-0.08875217288732529,
-0.02475556917488575,
0.015296745114028454,
-0.053655315190553665,
-0.05350150540471077,
-0.030639104545116425,
-0.01727272942662239,
0.08930426090955734,
0.04376417398452759,
0.017290595918893814,
-0.025751585140824318,
0.000999022857286036,
0.006089475005865097,
-0.024638867005705833,
0.03999512642621994,
0.024735771119594574,
-0.020175758749246597,
0.01164261344820261,
-0.03753512352705002,
0.04074747487902641,
0.009823938831686974,
0.0024167029187083244,
0.0032653496600687504,
-0.02835064008831978,
0.012487554922699928,
-0.09113597124814987,
0.0009309927118010819,
-0.028303971514105797,
-0.005202788393944502,
0.004331356380134821,
0.014041164889931679,
-0.028091641142964363,
-0.045866090804338455,
-0.005914583336561918,
-0.04728773236274719,
-0.10999350994825363,
0.027682287618517876,
0.08371647447347641,
0.07911773025989532,
-0.039615727961063385,
-0.06174731254577637,
0.10647744685411453,
0.03362917900085449,
-0.011254099197685719,
0.0687050074338913,
0.11487229913473129,
0.054606180638074875,
-0.013860270380973816,
0.05614504963159561,
-0.05615498870611191,
0.13396182656288147,
-0.05663811042904854,
0.02688761241734028,
-0.018491925671696663,
-0.01779765449464321,
0.03284153714776039,
-0.03172948211431503,
-0.026554958894848824,
-0.051283590495586395,
0.03644727170467377,
0.04427066817879677,
-0.021094471216201782,
-0.02037219889461994,
-0.04650238901376724,
-0.05105485022068024,
0.02462228201329708,
-0.007334152702242136,
0.03981935977935791,
-0.036033276468515396,
0.0011733851861208677,
0.037439461797475815,
0.01565447449684143,
0.0002256342995679006,
-0.02519673854112625,
0.015808282420039177,
0.08303256332874298,
0.04783540964126587,
-0.030869992449879646,
0.0352436825633049,
0.023193486034870148,
-0.035779863595962524,
0.005576765164732933,
-0.06622115522623062,
1.2787753048664492e-33,
0.005103365518152714,
-0.10677284002304077,
-0.012432406656444073,
0.011405346915125847,
0.04831157997250557,
0.027671566233038902,
-0.030868232250213623,
0.0006892700912430882,
-0.04404827207326889,
0.0794699415564537,
-0.03835608437657356,
0.060802578926086426,
-0.04494600370526314,
-0.029022129252552986,
0.10511895269155502,
0.028858868405222893,
-0.045837756246328354,
0.022734347730875015,
0.1227131336927414,
-0.018208209425210953,
-0.0157205481082201,
0.036942023783922195,
-0.07066629081964493,
0.02802416682243347,
0.0148685984313488,
0.0021644262596964836,
-0.06964007019996643,
-0.07384940981864929,
0.06592338532209396,
0.04569539800286293,
-0.014871546998620033,
-0.017828352749347687,
0.0024462887085974216,
0.07455167174339294,
-0.03954930603504181,
-0.019545651972293854,
-0.011792047880589962,
0.013668125495314598,
-0.04246100038290024,
-0.12037822604179382,
0.022698761895298958,
-0.03503846749663353,
-0.006148542743176222,
-0.00345072103664279,
-0.011896373704075813,
-0.08868741989135742,
-0.043462492525577545,
0.02408485859632492,
-0.07809522747993469,
0.05655551701784134,
-0.0184550192207098,
0.05337691307067871,
0.058812979608774185,
-0.1096237376332283,
-0.00019195620552636683,
-0.1046469509601593,
-0.0670323371887207,
-0.004756998736411333,
-0.04353097081184387,
0.02587575651705265,
-0.041572123765945435,
0.08975928276777267,
0.009140977635979652,
0.030400509014725685,
0.020782405510544777,
-0.004721203353255987,
0.002681837184354663,
-0.01780482940375805,
0.06717906892299652,
0.03413635492324829,
-0.14259345829486847,
0.0516405813395977,
-0.033989209681749344,
0.0628153532743454,
-0.07259855419397354,
-0.03867015987634659,
0.09256935119628906,
0.025271788239479065,
-0.06114700064063072,
-0.008306070230901241,
-0.05435120686888695,
0.03890538960695267,
0.022983165457844734,
0.03200080990791321,
-0.10401054471731186,
0.003297381801530719,
-0.0837513655424118,
-0.013784503564238548,
-0.034843809902668,
-0.01834445260465145,
0.05060487240552902,
-0.04890507087111473,
-0.00889408215880394,
0.05840286612510681,
-0.10962678492069244,
-4.7757337963314945e-33,
0.09599675238132477,
-0.08362735062837601,
-0.05424690619111061,
-0.050496604293584824,
-0.033063098788261414,
0.0024267483968287706,
0.0038882819935679436,
-0.026683280244469643,
0.0019011219264939427,
-0.05093580111861229,
-0.08041809499263763,
0.032855283468961716,
0.08108263462781906,
-0.03649945557117462,
-0.026041213423013687,
-0.017794247716665268,
-0.07576153427362442,
-0.00852273404598236,
-0.02296554483473301,
0.04756380617618561,
-0.06360837072134018,
0.10378255695104599,
0.10939265042543411,
0.07601245492696762,
0.0030642347410321236,
-0.027913374826312065,
-0.054673563688993454,
-0.02695559896528721,
-0.02933717705309391,
0.0008836545748636127,
0.046660248190164566,
-0.06636328995227814,
-0.04553847014904022,
-0.011792962439358234,
-0.09737619012594223,
-0.09722689539194107,
-0.021759381517767906,
0.04263896867632866,
-0.008499997667968273,
-0.02005820721387863,
0.047940585762262344,
0.08015944808721542,
0.03248865157365799,
0.016232779249548912,
-0.015629002824425697,
0.055258624255657196,
0.025434182956814766,
-0.06407754123210907,
-0.012609103694558144,
-0.05568905919790268,
0.000903512816876173,
-0.02213018760085106,
0.11479482799768448,
0.038588497787714005,
0.022934840992093086,
-0.005351906176656485,
0.11538083851337433,
-0.061752960085868835,
0.017103908583521843,
0.06199880316853523,
0.12933947145938873,
-0.00354239484295249,
-0.049088794738054276,
0.06538465619087219,
-0.017669448629021645,
-0.06484697014093399,
-0.07601360976696014,
0.003770741168409586,
0.023307453840970993,
-0.004664314445108175,
0.1039075255393982,
-0.06786711513996124,
0.02172069624066353,
0.032968319952487946,
-0.016162361949682236,
-0.013654287904500961,
0.0328555591404438,
-0.1292080134153366,
-0.04728444665670395,
0.0481635183095932,
-0.03410780802369118,
0.05483346804976463,
-0.05981734022498131,
0.06316511332988739,
-0.034235794097185135,
-0.029903128743171692,
0.02768043428659439,
-0.007863339968025684,
0.08513205498456955,
0.0018385336734354496,
-0.0029358987230807543,
0.0004374253621790558,
-0.08229920268058777,
0.0629412829875946,
-0.0045928494073450565,
-5.6175135654257247e-8,
0.05834183841943741,
-0.01972423493862152,
-0.008963375352323055,
0.00989440456032753,
0.018390117213129997,
0.018251899629831314,
-0.02356909029185772,
-0.02167290635406971,
-0.004238384310156107,
-0.015506735071539879,
0.004769403021782637,
0.012080038897693157,
-0.07722743600606918,
-0.0736955776810646,
0.04934316128492355,
-0.017985811457037926,
0.0040193344466388226,
0.07678453624248505,
0.0012985828798264265,
-0.03499709814786911,
0.004979926627129316,
-0.11796822398900986,
-0.018009761348366737,
0.050006844103336334,
-0.0041564772836863995,
-0.01546632032841444,
0.046619005501270294,
-0.04042530059814453,
0.039300914853811264,
0.06652168929576874,
-0.04334571585059166,
-0.013442699797451496,
-0.005653147120028734,
0.062810979783535,
-0.04119904339313507,
0.08371758460998535,
-0.07729723304510117,
-0.01328304409980774,
0.0003149691328871995,
-0.01313100103288889,
-0.02088763564825058,
0.009793613106012344,
-0.0005077148089185357,
0.013524603098630905,
-0.07890953123569489,
0.039024606347084045,
0.035017598420381546,
0.0019652789924293756,
0.05542576685547829,
0.05801866948604584,
0.04109420254826546,
0.039155833423137665,
-0.013068592175841331,
0.12468462437391281,
0.022242620587348938,
0.06457477807998657,
0.018751561641693115,
-0.03612222895026207,
0.013777602463960648,
-0.01063760556280613,
0.01947731152176857,
0.05458482354879379,
0.03751565143465996,
-0.004032218363136053
] | 0.258924
|
group ID 2000, which is the value of `fsGroup`. ```none -rw-r--r-- 1 1000 2000 6 Jun 6 20:08 testfile ``` Run the following command: ```shell id ``` The output is similar to this: ```none uid=1000 gid=3000 groups=2000,3000,4000 ``` From the output, you can see that `gid` is 3000 which is same as the `runAsGroup` field. If the `runAsGroup` was omitted, the `gid` would remain as 0 (root) and the process will be able to interact with files that are owned by the root(0) group and groups that have the required group permissions for the root (0) group. You can also see that `groups` contains the group IDs which are specified by `fsGroup` and `supplementalGroups`, in addition to `gid`. Exit your shell: ```shell exit ``` ### Implicit group memberships defined in `/etc/group` in the container image By default, kubernetes merges group information from the Pod with information defined in `/etc/group` in the container image. {{% code\_sample file="pods/security/security-context-5.yaml" %}} This Pod security context contains `runAsUser`, `runAsGroup` and `supplementalGroups`. However, you can see that the actual supplementary groups attached to the container process will include group IDs which come from `/etc/group` in the container image. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context-5.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod security-context-demo ``` Get a shell to the running Container: ```shell kubectl exec -it security-context-demo -- sh ``` Check the process identity: ```shell id ``` The output is similar to this: ```none uid=1000 gid=3000 groups=3000,4000,50000 ``` You can see that `groups` includes group ID `50000`. This is because the user (`uid=1000`), which is defined in the image, belongs to the group (`gid=50000`), which is defined in `/etc/group` inside the container image. Check the `/etc/group` in the container image: ```shell cat /etc/group ``` You can see that uid `1000` belongs to group `50000`. ```none ... user-defined-in-image:x:1000: group-defined-in-image:x:50000:user-defined-in-image ``` Exit your shell: ```shell exit ``` {{}} \_Implicitly merged\_ supplementary groups may cause security problems particularly when accessing the volumes (see [kubernetes/kubernetes#112879](https://issue.k8s.io/112879) for details). If you want to avoid this. Please see the below section. {{}} ## Configure fine-grained SupplementalGroups control for a Pod {#supplementalgroupspolicy} {{< feature-state feature\_gate\_name="SupplementalGroupsPolicy" >}} This feature can be enabled by setting the `SupplementalGroupsPolicy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for kubelet and kube-apiserver, and setting the `.spec.securityContext.supplementalGroupsPolicy` field for a pod. The `supplementalGroupsPolicy` field defines the policy for calculating the supplementary groups for the container processes in a pod. There are two valid values for this field: \* `Merge`: The group membership defined in `/etc/group` for the container's primary user will be merged. This is the default policy if not specified. \* `Strict`: Only group IDs in `fsGroup`, `supplementalGroups`, or `runAsGroup` fields are attached as the supplementary groups of the container processes. This means no group membership from `/etc/group` for the container's primary user will be merged. When the feature is enabled, it also exposes the process identity attached to the first container process in `.status.containerStatuses[].user.linux` field. It would be useful for detecting if implicit group ID's are attached. {{% code\_sample file="pods/security/security-context-6.yaml" %}} This pod manifest defines `supplementalGroupsPolicy=Strict`. You can see that no group memberships defined in `/etc/group` are merged to the supplementary groups for container processes. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context-6.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod security-context-demo ``` Check the process identity: ```shell kubectl exec -it security-context-demo -- id ``` The output is similar to this: ```none uid=1000 gid=3000 groups=3000,4000 ``` See the Pod's status: ```shell kubectl get pod security-context-demo -o yaml ``` You can see that the `status.containerStatuses[].user.linux` field exposes the process identity attached to the first container process.
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
-0.0037775905802845955,
-0.030979037284851074,
-0.06435105949640274,
0.019567593932151794,
0.017102548852562904,
-0.046329136937856674,
-0.003031655214726925,
-0.024408550933003426,
0.07134882360696793,
-0.007083732169121504,
0.05417197197675705,
0.0037914372514933348,
0.004010553006082773,
-0.0320335328578949,
-0.006833656691014767,
-0.05478363856673241,
-0.04570263996720314,
0.028868332505226135,
-0.13716287910938263,
-0.05592399463057518,
-0.03572328761219978,
-0.005635378882288933,
0.038537025451660156,
-0.0011625450570136309,
-0.07243002951145172,
-0.014447222463786602,
-0.05884462594985962,
-0.03411136940121651,
0.03661120682954788,
-0.01386965811252594,
0.0012126800138503313,
0.060533177107572556,
0.06886311620473862,
0.058475345373153687,
0.016740871593356133,
0.145761176943779,
0.09566549956798553,
-0.06884454190731049,
-0.0917568951845169,
0.05923940986394882,
0.011161227710545063,
-0.002137917559593916,
-0.0517190583050251,
-0.0032027612905949354,
0.007189950440078974,
0.05826582759618759,
-0.05674260854721069,
0.00035354922874830663,
-0.042481306940317154,
0.05110001564025879,
0.08008377999067307,
-0.005938363261520863,
0.04058587923645973,
0.08829260617494583,
0.030488207936286926,
0.015319223515689373,
-0.03108842670917511,
-0.011241298168897629,
0.03694458678364754,
0.001199154881760478,
0.06055343151092529,
0.0036470945924520493,
0.02795884571969509,
0.008277971297502518,
0.04398703947663307,
-0.040935054421424866,
0.06974037736654282,
-0.011982356198132038,
-0.021903760731220245,
-0.07777123153209686,
0.15045884251594543,
-0.048309411853551865,
0.004775871988385916,
0.00246123387478292,
0.018148401752114296,
0.017026808112859726,
-0.021176282316446304,
0.03718547523021698,
-0.06062852218747139,
-0.10167395323514938,
0.052941061556339264,
0.04546649008989334,
0.033402588218450546,
-0.08316118270158768,
-0.10281961411237717,
0.04336569830775261,
0.04160519316792488,
0.03564433753490448,
0.002145088044926524,
0.10404996573925018,
-0.0480317696928978,
0.051211122423410416,
0.0007068884442560375,
-0.06459254026412964,
0.08074471354484558,
0.027139604091644287,
0.026777755469083786,
0.06703352928161621,
0.019770193845033646,
0.006282040849328041,
-0.0023374466691166162,
-0.008462965488433838,
-0.017654241994023323,
-0.005438501480966806,
-0.021515199914574623,
-0.04722461849451065,
-0.06456691771745682,
0.029331114143133163,
-0.03327101841568947,
-0.035616252571344376,
-0.01683388464152813,
-0.01078171469271183,
-0.021927930414676666,
0.06221089884638786,
-0.01048620231449604,
-0.08188294619321823,
0.03673864156007767,
-0.011070051230490208,
-0.012780524790287018,
0.04254188761115074,
0.0810316875576973,
-0.03305863216519356,
0.056549251079559326,
0.06805797666311264,
-0.014882667921483517,
0.1263832300901413,
-0.10154867172241211,
-6.565249366180231e-34,
0.03729298710823059,
-0.09741237759590149,
0.017519786953926086,
0.025328906252980232,
0.06327757984399796,
-0.056595850735902786,
-0.05355984345078468,
0.01678038388490677,
-0.10971346497535706,
0.05902742221951485,
-0.09754571318626404,
0.06957221031188965,
-0.02815411612391472,
-0.0538642518222332,
0.06272068619728088,
0.03455984219908714,
-0.05824252590537071,
-0.042645394802093506,
0.06084117293357849,
-0.05253294110298157,
0.002987702377140522,
0.04448086768388748,
-0.07764491438865662,
0.041979655623435974,
0.013920226134359837,
-0.01587846502661705,
-0.06304838508367538,
-0.10086899250745773,
0.05244247615337372,
0.010322606191039085,
-0.020508773624897003,
-0.04045497253537178,
-0.02664024755358696,
-0.012435047887265682,
-0.13907314836978912,
0.06020176038146019,
-0.009104008786380291,
-0.012006782926619053,
-0.04676302894949913,
-0.013854898512363434,
0.016388436779379845,
-0.020301805809140205,
-0.016049226745963097,
-0.05130169913172722,
0.029787644743919373,
-0.06947074830532074,
-0.05172475799918175,
0.012189263477921486,
-0.0005739984335377812,
0.14512117207050323,
-0.0011354064336046576,
-0.0020688886288553476,
0.052063435316085815,
-0.06650415062904358,
0.028538903221488,
-0.04495798796415329,
0.005270262714475393,
-0.049250051379203796,
-0.0230353232473135,
0.00890937726944685,
-0.010001176036894321,
0.030340855941176414,
-0.045638248324394226,
0.10088468343019485,
-0.00927707739174366,
-0.012045791372656822,
0.05093253031373024,
0.06848600506782532,
0.017558975145220757,
0.027912551537156105,
-0.07117585837841034,
-0.024303143844008446,
-0.06565438956022263,
0.10257051140069962,
-0.01909872330725193,
-0.055674608796834946,
0.09202631562948227,
0.0035032702144235373,
-0.12368044257164001,
0.027344506233930588,
0.0002219858579337597,
0.006389939691871405,
-0.04904276132583618,
-0.02904248982667923,
-0.09238181263208389,
0.07158612459897995,
-0.0005048047751188278,
-0.01198455411940813,
-0.04663858190178871,
-0.039719004184007645,
0.06270935386419296,
-0.015366241335868835,
0.01303913351148367,
0.06565596908330917,
-0.0409785695374012,
-2.6131799615306015e-33,
0.007399565074592829,
0.017313674092292786,
-0.03874317556619644,
-0.05430041253566742,
0.027806341648101807,
-0.01031558495014906,
0.03835248202085495,
-0.05283147096633911,
-0.0003908473299816251,
-0.022340167313814163,
-0.03869764506816864,
-0.022530963644385338,
0.051825616508722305,
0.03974981606006622,
-0.04398324713110924,
-0.03071199730038643,
-0.002392972121015191,
-0.02358483336865902,
0.0007050195126794279,
0.04855871573090553,
-0.014545474201440811,
0.05699378252029419,
0.11286793649196625,
0.12274830043315887,
0.021285243332386017,
0.012967829592525959,
-0.018551098182797432,
-0.01568513922393322,
-0.03635001927614212,
-0.0037781852297484875,
0.0940653383731842,
-0.10397299379110336,
-0.06578882038593292,
0.030358046293258667,
-0.029435662552714348,
-0.09137021005153656,
-0.03800952062010765,
0.0850600004196167,
-0.014972222037613392,
-0.012897897511720657,
0.009546366520226002,
0.07451822608709335,
-0.028215458616614342,
0.03779960051178932,
-0.07407636940479279,
0.09035395830869675,
0.10118082910776138,
-0.05078629404306412,
-0.06764529645442963,
-0.05205875262618065,
0.020611049607396126,
0.05728397145867348,
0.09446223080158234,
0.09225683659315109,
0.02261815033853054,
0.018826354295015335,
0.06423971801996231,
0.018937742337584496,
-0.04948967695236206,
0.017137497663497925,
0.11459926515817642,
-0.034420792013406754,
0.012568425387144089,
0.021915024146437645,
-0.07600661367177963,
-0.08287505805492401,
-0.05893857404589653,
0.006675467360764742,
0.017170580103993416,
0.06094708666205406,
-0.014050696976482868,
-0.07970819622278214,
-0.04162716120481491,
-0.007122813258320093,
-0.03269084542989731,
-0.00005233615229371935,
-0.035548172891139984,
-0.014589750207960606,
-0.006539605092257261,
0.0008721890626475215,
0.009566250257194042,
0.04611237347126007,
-0.030266540125012398,
0.03051748313009739,
-0.02769392728805542,
-0.02261033095419407,
0.08883409202098846,
0.06946073472499847,
0.05995723232626915,
0.016942568123340607,
0.011256448924541473,
-0.0038040790241211653,
0.012510300613939762,
0.023516522720456123,
-0.01817130669951439,
-4.943109388477751e-8,
0.030553558841347694,
0.034421406686306,
-0.047077931463718414,
0.0041844784282147884,
0.08343588560819626,
-0.07478666305541992,
-0.039035726338624954,
0.039515938609838486,
0.0019102871883660555,
-0.034280482679605484,
-0.04467463493347168,
0.03377103805541992,
-0.07212118804454803,
-0.04034554585814476,
0.04809563606977463,
-0.01085472758859396,
-0.0013610348105430603,
-0.01765136606991291,
0.007950595580041409,
-0.015320677310228348,
-0.05481533706188202,
-0.07824618369340897,
-0.05914860963821411,
-0.0006568446406163275,
-0.05247199907898903,
0.0577208437025547,
0.06510341912508011,
-0.03665708377957344,
-0.033008869737386703,
-0.015668878331780434,
-0.015335066244006157,
-0.02065243199467659,
-0.14489050209522247,
0.09135626256465912,
-0.02417403645813465,
0.019268004223704338,
-0.08457266539335251,
0.05044642463326454,
-0.02338678576052189,
0.010252708569169044,
-0.04566674306988716,
-0.04615205526351929,
0.028615819290280342,
0.017340773716568947,
-0.09337186813354492,
-0.03561557084321976,
0.0173643771559,
-0.012522635981440544,
0.006768433377146721,
-0.010566284880042076,
0.04635206237435341,
-0.043522126972675323,
-0.07643347978591919,
0.07847931981086731,
-0.031427279114723206,
0.02557033859193325,
-0.0037200492806732655,
0.05705420672893524,
-0.00264043384231627,
-0.01254560798406601,
-0.016884367913007736,
0.03992043063044548,
-0.003981800749897957,
-0.04395424947142601
] | 0.135834
|
process identity: ```shell kubectl exec -it security-context-demo -- id ``` The output is similar to this: ```none uid=1000 gid=3000 groups=3000,4000 ``` See the Pod's status: ```shell kubectl get pod security-context-demo -o yaml ``` You can see that the `status.containerStatuses[].user.linux` field exposes the process identity attached to the first container process. ```none ... status: containerStatuses: - name: sec-ctx-demo user: linux: gid: 3000 supplementalGroups: - 3000 - 4000 uid: 1000 ... ``` {{}} Please note that the values in the `status.containerStatuses[].user.linux` field is \_the first attached\_ process identity to the first container process in the container. If the container has sufficient privilege to make system calls related to process identity (e.g. [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html), [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html) or [`setgroups(2)`](https://man7.org/linux/man-pages/man2/setgroups.2.html), etc.), the container process can change its identity. Thus, the \_actual\_ process identity will be dynamic. {{}} ### Implementations {#implementations-supplementalgroupspolicy} {{% thirdparty-content %}} The following container runtimes are known to support fine-grained SupplementalGroups control. CRI-level: - [containerd](https://containerd.io/), since v2.0 - [CRI-O](https://cri-o.io/), since v1.31 You can see if the feature is supported in the Node status. ```yaml apiVersion: v1 kind: Node ... status: features: supplementalGroupsPolicy: true ``` {{}} At this alpha release(from v1.31 to v1.32), when a pod with `SupplementalGroupsPolicy=Strict` are scheduled to a node that does NOT support this feature(i.e. `.status.features.supplementalGroupsPolicy=false`), the pod's supplemental groups policy falls back to the `Merge` policy \_silently\_. However, since the beta release (v1.33), to enforce the policy more strictly, \_\_such pod creation will be rejected by kubelet because the node cannot ensure the specified policy\_\_. When your pod is rejected, you will see warning events with `reason=SupplementalGroupsPolicyNotSupported` like below: ```yaml apiVersion: v1 kind: Event ... type: Warning reason: SupplementalGroupsPolicyNotSupported message: "SupplementalGroupsPolicy=Strict is not supported in this node" involvedObject: apiVersion: v1 kind: Pod ... ``` {{}} ## Configure volume permission and ownership change policy for Pods {{< feature-state for\_k8s\_version="v1.23" state="stable" >}} By default, Kubernetes recursively changes ownership and permissions for the contents of each volume to match the `fsGroup` specified in a Pod's `securityContext` when that volume is mounted. For large volumes, checking and changing ownership and permissions can take a lot of time, slowing Pod startup. You can use the `fsGroupChangePolicy` field inside a `securityContext` to control the way that Kubernetes checks and manages ownership and permissions for a volume. \*\*fsGroupChangePolicy\*\* - `fsGroupChangePolicy` defines behavior for changing ownership and permission of the volume before being exposed inside a Pod. This field only applies to volume types that support `fsGroup` controlled ownership and permissions. This field has two possible values: \* \_OnRootMismatch\_: Only change permissions and ownership if the permission and the ownership of root directory does not match with expected permissions of the volume. This could help shorten the time it takes to change ownership and permission of a volume. \* \_Always\_: Always change permission and ownership of the volume when volume is mounted. For example: ```yaml securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 fsGroupChangePolicy: "OnRootMismatch" ``` {{< note >}} This field has no effect on ephemeral volume types such as [`secret`](/docs/concepts/storage/volumes/#secret), [`configMap`](/docs/concepts/storage/volumes/#configmap), and [`emptyDir`](/docs/concepts/storage/volumes/#emptydir). {{< /note >}} ## Delegating volume permission and ownership change to CSI driver {{< feature-state for\_k8s\_version="v1.26" state="stable" >}} If you deploy a [Container Storage Interface (CSI)](https://github.com/container-storage-interface/spec/blob/master/spec.md) driver which supports the `VOLUME\_MOUNT\_GROUP` `NodeServiceCapability`, the process of setting file ownership and permissions based on the `fsGroup` specified in the `securityContext` will be performed by the CSI driver instead of Kubernetes. In this case, since Kubernetes doesn't perform any ownership and permission change, `fsGroupChangePolicy` does not take effect, and as specified by CSI, the driver is expected to mount the volume with the provided `fsGroup`, resulting in a volume that is readable/writable by the `fsGroup`. ## Set the security
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
-0.011463403701782227,
0.036452628672122955,
-0.06051326170563698,
-0.039274588227272034,
0.011212403886020184,
-0.06643770635128021,
0.10861965268850327,
0.02037079818546772,
0.09907769411802292,
0.037128251045942307,
0.0040909042581915855,
-0.08271482586860657,
0.0050424025394022465,
-0.0013571622548624873,
0.011044337414205074,
-0.050673794001340866,
0.08914650231599808,
0.03235509619116783,
-0.06311526149511337,
-0.07279673963785172,
-0.03594374656677246,
-0.006323012989014387,
0.053091347217559814,
-0.018856003880500793,
-0.08843185752630234,
-0.04931408539414406,
-0.03177037090063095,
-0.0404772087931633,
0.05490903556346893,
-0.04039722681045532,
0.03874557837843895,
0.01632876694202423,
0.017196735367178917,
-0.03904556483030319,
0.09141772985458374,
0.15837761759757996,
0.08184497058391571,
-0.11945739388465881,
-0.059792447835206985,
-0.0048153758980333805,
0.023974234238266945,
-0.055588021874427795,
-0.12214396893978119,
0.04107225313782692,
-0.02799619548022747,
-0.002257179468870163,
-0.032393649220466614,
-0.08196379244327545,
-0.03385292738676071,
-0.03045777790248394,
0.03333480283617973,
0.02979755774140358,
0.04188472032546997,
0.03092488832771778,
0.005424579605460167,
0.003572206012904644,
0.021434783935546875,
0.004064836073666811,
0.0612812414765358,
0.05604972317814827,
0.0063656968995928764,
-0.013095110654830933,
0.04024414345622063,
0.010628081858158112,
0.018778899684548378,
0.011042281985282898,
0.021525448188185692,
-0.03555161505937576,
0.014668549410998821,
-0.05123047158122063,
0.08601229637861252,
-0.021782470867037773,
-0.019104667007923126,
-0.049167487770318985,
-0.015787186101078987,
0.0018142462940886617,
-0.05408642441034317,
0.006754655856639147,
-0.060213811695575714,
-0.06991729885339737,
-0.023852398619055748,
0.06771033257246017,
0.023923330008983612,
-0.10838537663221359,
-0.06801649183034897,
0.0749887004494667,
-0.015075654722750187,
-0.02049749158322811,
0.03553367778658867,
0.10385911166667938,
-0.0054938034154474735,
-0.007357057649642229,
0.02544056624174118,
-0.051002129912376404,
0.13158613443374634,
-0.021797209978103638,
-0.04159916937351227,
0.05266237258911133,
-0.004441394936293364,
-0.009400498121976852,
0.0048745861276984215,
0.04153096675872803,
-0.01903504878282547,
0.0318104550242424,
0.04385655000805855,
-0.0444398857653141,
-0.06552392244338989,
-0.03094830922782421,
-0.028535254299640656,
0.007580351084470749,
-0.023212086409330368,
-0.02017338015139103,
-0.02178804948925972,
0.08139123022556305,
-0.011162222363054752,
0.018901845440268517,
0.04562621936202049,
-0.015268992632627487,
0.036187104880809784,
0.02499496564269066,
0.10899324715137482,
-0.03595845773816109,
-0.0006051443051546812,
0.06805424392223358,
-0.053047314286231995,
0.036262355744838715,
0.004088277462869883,
-5.073174642049827e-34,
0.039378322660923004,
-0.0681149959564209,
0.0436515212059021,
-0.020449891686439514,
0.03708766773343086,
-0.057594411075115204,
-0.07696624845266342,
-0.0751274973154068,
-0.06428278237581253,
0.06000014767050743,
-0.1000729501247406,
0.05785847827792168,
-0.040930040180683136,
-0.0614711195230484,
0.008132952265441418,
0.036745939403772354,
-0.048011764883995056,
-0.005212071817368269,
0.08344166725873947,
-0.019437339156866074,
0.036515090614557266,
-0.018739251419901848,
-0.09461704641580582,
0.01944081299006939,
0.03143411502242088,
-0.019419275224208832,
-0.05069023743271828,
-0.07470359653234482,
0.034000247716903687,
0.03270567208528519,
0.0013895666925236583,
-0.02656930312514305,
0.011602361686527729,
0.06027550250291824,
-0.09444747865200043,
0.0008373010787181556,
0.048514045774936676,
0.049661003053188324,
-0.058369848877191544,
-0.11916973441839218,
0.039258792996406555,
-0.006723292171955109,
0.025736458599567413,
0.0016213844064623117,
0.010851964354515076,
-0.09001296758651733,
-0.012159408070147038,
-0.014536526054143906,
0.00764192221686244,
0.07730085402727127,
0.01380873192101717,
-0.0028950192499905825,
0.04949107766151428,
-0.08488769084215164,
0.018942004069685936,
-0.0723787471652031,
0.023261772468686104,
0.005394313018769026,
-0.04813534393906593,
0.016934461891651154,
-0.0901399701833725,
0.07079793512821198,
-0.05541747808456421,
0.06371414661407471,
0.016215238720178604,
-0.004765716847032309,
0.018525293096899986,
0.052408523857593536,
0.01325932890176773,
0.08223699033260345,
-0.12168899923563004,
0.056908633559942245,
-0.04326228052377701,
0.016769500449299812,
-0.025179771706461906,
-0.08742021769285202,
0.08762712776660919,
-0.011576727032661438,
-0.12157289683818817,
0.07026247680187225,
0.01942763663828373,
0.0003383680304978043,
-0.0762639194726944,
0.03346818685531616,
-0.03391115367412567,
0.053985871374607086,
-0.07611905038356781,
0.04552200436592102,
-0.04341952130198479,
0.006669041234999895,
0.04988262057304382,
0.014066663570702076,
-0.031805504113435745,
0.06060732528567314,
-0.14731985330581665,
-3.69768278440459e-33,
0.04647102206945419,
-0.040865056216716766,
-0.02479439601302147,
-0.0214979350566864,
-0.015470603480935097,
0.0013284638989716768,
0.05086298659443855,
-0.030166899785399437,
-0.01950095221400261,
-0.05488632246851921,
-0.06497807055711746,
-0.014851938933134079,
0.04414397105574608,
0.07682953029870987,
-0.03436357527971268,
-0.02714858204126358,
-0.07778508216142654,
-0.008168241009116173,
0.006546282209455967,
0.047871023416519165,
-0.02672480419278145,
0.10480575263500214,
0.08341605216264725,
0.07969871908426285,
-0.00493911188095808,
0.009705294854938984,
-0.010990523733198643,
-0.0005238172016106546,
-0.038215190172195435,
-0.03505931794643402,
0.04608440771698952,
-0.09568663686513901,
-0.08341208100318909,
0.03681899607181549,
-0.04564724490046501,
-0.08606560528278351,
-0.0016368727665394545,
0.09760402888059616,
-0.021043570712208748,
0.015415524132549763,
0.0038986329454928637,
0.056725990027189255,
-0.023946117609739304,
0.04896988719701767,
-0.06527351588010788,
0.055701568722724915,
0.11529792100191116,
-0.08441124111413956,
-0.03767858073115349,
-0.03477655351161957,
0.0056940349750220776,
0.051412105560302734,
0.04541864991188049,
0.09464821964502335,
0.0109077338129282,
-0.042979538440704346,
0.032555192708969116,
-0.018308816477656364,
-0.04841537028551102,
-0.005506363231688738,
0.12348774075508118,
-0.00948832556605339,
0.006849330384284258,
0.023201076313853264,
0.002023033332079649,
-0.04549816623330116,
-0.045574650168418884,
0.029841771349310875,
0.015329820103943348,
-0.016335004940629005,
0.11435186862945557,
-0.04516660049557686,
-0.06879381835460663,
-0.005699280183762312,
-0.003699292428791523,
-0.024200649932026863,
-0.05166644603013992,
-0.06859200447797775,
0.0035167213063687086,
0.06466646492481232,
-0.042094819247722626,
0.06334271281957626,
-0.033162008970975876,
-0.010382362641394138,
0.009409823454916477,
-0.009093185886740685,
0.05796966329216957,
0.07629501074552536,
0.05950390174984932,
0.07431505620479584,
0.0006252562161535025,
0.00968200247734785,
-0.08101426064968109,
0.03895588964223862,
-0.04070805013179779,
-4.584541102303774e-8,
0.039269693195819855,
0.013350010849535465,
-0.019949760288000107,
-0.015124057419598103,
0.026445042341947556,
-0.05223209783434868,
-0.02380388230085373,
-0.0014660242013633251,
-0.041577164083719254,
-0.05973324179649353,
-0.03274867683649063,
0.03394566476345062,
-0.04384626820683479,
-0.036426905542612076,
0.07984151691198349,
-0.017735108733177185,
-0.030326440930366516,
0.02703108824789524,
0.01408856175839901,
-0.08633828163146973,
-0.04722629860043526,
-0.06042440980672836,
-0.031153259798884392,
-0.01827983185648918,
-0.047387801110744476,
0.05068415775895119,
0.08353232592344284,
-0.02904426120221615,
0.013438423164188862,
0.03112233616411686,
-0.03274619206786156,
-0.041989803314208984,
-0.059183888137340546,
0.0649120956659317,
-0.0034530325792729855,
-0.0010612165788188577,
-0.08330792188644409,
0.029599882662296295,
-0.007911600172519684,
-0.002954282099381089,
-0.10075145959854126,
0.023648466914892197,
-0.04279043897986412,
0.04912891611456871,
-0.0737069696187973,
0.06845088303089142,
-0.003576070535928011,
-0.00129119330085814,
0.012762235477566719,
0.024374084547162056,
0.04136853665113449,
-0.05759403109550476,
-0.02390974573791027,
0.11247076094150543,
-0.0009656311012804508,
0.05213838443160057,
0.0419112965464592,
-0.006912681739777327,
0.023859256878495216,
0.01995420828461647,
0.005180457606911659,
0.060760270804166794,
0.034963421523571014,
-0.018542176112532616
] | 0.239868
|
of Kubernetes. In this case, since Kubernetes doesn't perform any ownership and permission change, `fsGroupChangePolicy` does not take effect, and as specified by CSI, the driver is expected to mount the volume with the provided `fsGroup`, resulting in a volume that is readable/writable by the `fsGroup`. ## Set the security context for a Container To specify security settings for a Container, include the `securityContext` field in the Container manifest. The `securityContext` field is a [SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core) object. Security settings that you specify for a Container apply only to the individual Container, and they override settings made at the Pod level when there is overlap. Container settings do not affect the Pod's Volumes. Here is the configuration file for a Pod that has one Container. Both the Pod and the Container have a `securityContext` field: {{% code\_sample file="pods/security/security-context-2.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context-2.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod security-context-demo-2 ``` Get a shell into the running Container: ```shell kubectl exec -it security-context-demo-2 -- sh ``` In your shell, list the running processes: ```shell ps aux ``` The output shows that the processes are running as user 2000. This is the value of `runAsUser` specified for the Container. It overrides the value 1000 that is specified for the Pod. ``` USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND 2000 1 0.0 0.0 4336 764 ? Ss 20:36 0:00 /bin/sh -c node server.js 2000 8 0.1 0.5 772124 22604 ? Sl 20:36 0:00 node server.js ... ``` Exit your shell: ```shell exit ``` ## Set capabilities for a Container With [Linux capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html), you can grant certain privileges to a process without granting all the privileges of the root user. To add or remove Linux capabilities for a Container, include the `capabilities` field in the `securityContext` section of the Container manifest. First, see what happens when you don't include a `capabilities` field. Here is configuration file that does not add or remove any Container capabilities: {{% code\_sample file="pods/security/security-context-3.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context-3.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod security-context-demo-3 ``` Get a shell into the running Container: ```shell kubectl exec -it security-context-demo-3 -- sh ``` In your shell, list the running processes: ```shell ps aux ``` The output shows the process IDs (PIDs) for the Container: ``` USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 4336 796 ? Ss 18:17 0:00 /bin/sh -c node server.js root 5 0.1 0.5 772124 22700 ? Sl 18:17 0:00 node server.js ``` In your shell, view the status for process 1: ```shell cd /proc/1 cat status ``` The output shows the capabilities bitmap for the process: ``` ... CapPrm: 00000000a80425fb CapEff: 00000000a80425fb ... ``` Make a note of the capabilities bitmap, and then exit your shell: ```shell exit ``` Next, run a Container that is the same as the preceding container, except that it has additional capabilities set. Here is the configuration file for a Pod that runs one Container. The configuration adds the `CAP\_NET\_ADMIN` and `CAP\_SYS\_TIME` capabilities: {{% code\_sample file="pods/security/security-context-4.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/security-context-4.yaml ``` Get a shell into the running Container: ```shell kubectl exec -it security-context-demo-4 -- sh ``` In your shell, view the capabilities for process 1: ```shell cd /proc/1 cat status ``` The output shows capabilities bitmap for the process: ``` ... CapPrm: 00000000aa0435fb CapEff: 00000000aa0435fb ... ``` Compare the capabilities of the two Containers: ``` 00000000a80425fb 00000000aa0435fb ``` In the capability bitmap of the
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
0.052037641406059265,
0.02342909947037697,
-0.004347550682723522,
-0.004149161279201508,
0.0282874945551157,
-0.03633807972073555,
0.026804303750395775,
0.03763293847441673,
0.066098652780056,
0.02061161957681179,
0.008006996475160122,
-0.03096943162381649,
0.017201688140630722,
0.020133616402745247,
-0.010546544566750526,
-0.13074634969234467,
0.022951066493988037,
0.03272177278995514,
-0.06643865257501602,
0.02083423174917698,
-0.030459336936473846,
0.015752078965306282,
0.057537782937288284,
0.015787597745656967,
-0.099028080701828,
-0.031332653015851974,
-0.06466931849718094,
0.004455845803022385,
0.03359315171837807,
-0.027825169265270233,
-0.0001591687323525548,
0.01210952177643776,
0.041619714349508286,
0.04952392727136612,
0.023673687130212784,
0.009675893001258373,
0.009057197719812393,
-0.1109311431646347,
-0.06275325268507004,
-0.007573230192065239,
-0.0037994079757481813,
-0.035618457943201065,
-0.08045540750026703,
0.0280463770031929,
-0.10390502214431763,
0.012269964441657066,
0.04098327085375786,
-0.05316200479865074,
0.019592950120568275,
0.0425899401307106,
0.03143704682588577,
-0.01610652357339859,
0.06541108340024948,
0.06683837622404099,
-0.025855885818600655,
0.020646991208195686,
0.02575775235891342,
0.12937457859516144,
0.06088164448738098,
-0.019021064043045044,
0.036075759679079056,
-0.03034391812980175,
-0.011210824362933636,
-0.02456614188849926,
0.010007252916693687,
0.01621672883629799,
0.02522410824894905,
0.017658839002251625,
-0.045467302203178406,
0.003102618269622326,
0.14695674180984497,
0.09842021018266678,
0.031903572380542755,
-0.03539563715457916,
0.06861764937639236,
0.02118927612900734,
-0.08449725806713104,
0.0347265861928463,
0.00863857101649046,
-0.05394424498081207,
0.030979152768850327,
0.04211939126253128,
0.01993628777563572,
-0.04867542162537575,
-0.0755721777677536,
-0.04439287260174751,
-0.04725717753171921,
0.01230473630130291,
-0.02637478895485401,
0.019786370918154716,
0.03264041990041733,
-0.03689122572541237,
0.006672561168670654,
-0.061928484588861465,
0.038653645664453506,
-0.026735492050647736,
-0.01060926541686058,
0.019809752702713013,
0.038864362984895706,
0.000988308573141694,
-0.018705153837800026,
-0.029252180829644203,
-0.051247794181108475,
0.056803278625011444,
0.08173782378435135,
-0.05897253006696701,
-0.04726425185799599,
-0.020878218114376068,
-0.07219910621643066,
0.04455646499991417,
0.05393780767917633,
0.07912086695432663,
0.0033154720440506935,
0.054384745657444,
0.002208852441981435,
0.023651286959648132,
-0.05155213549733162,
0.043743912130594254,
-0.02126435935497284,
0.028613213449716568,
0.06323295831680298,
-0.06385066360235214,
0.05020613968372345,
0.049693625420331955,
-0.01343605201691389,
0.011662514880299568,
-0.05213191360235214,
1.2428745135308864e-33,
-0.04078178107738495,
-0.09872926026582718,
0.011583426035940647,
0.033370476216077805,
0.10816244035959244,
-0.055297285318374634,
0.02806786820292473,
-0.002300347900018096,
-0.07208538055419922,
-0.01847049593925476,
-0.07543215900659561,
0.11533565819263458,
-0.02291111648082733,
-0.09302233159542084,
0.0028429387602955103,
-0.0025574087630957365,
-0.07018324732780457,
0.02769593335688114,
0.07281272113323212,
-0.03742203116416931,
0.06977551430463791,
-0.03293907269835472,
0.0010016952874138951,
-0.017175085842609406,
-0.013208297081291676,
-0.01330102700740099,
-0.06129201874136925,
-0.028860202059149742,
0.015132084488868713,
0.04553263261914253,
-0.11730599403381348,
0.023512952029705048,
0.06404587626457214,
0.005783211439847946,
-0.07148502767086029,
-0.05024777725338936,
-0.017217885702848434,
-0.012759634293615818,
-0.11284001171588898,
-0.06815186142921448,
0.06276863068342209,
-0.09150571376085281,
0.029972713440656662,
-0.06765013188123703,
0.0032342232298105955,
-0.031537942588329315,
-0.07293211668729782,
-0.00012629936099983752,
-0.007902676239609718,
0.09372447431087494,
-0.021341687068343163,
-0.0066353133879601955,
0.020539158955216408,
-0.0974293127655983,
0.030822288244962692,
-0.07874980568885803,
0.015507173724472523,
-0.05377979576587677,
-0.05315545201301575,
-0.01149580255150795,
-0.03122136928141117,
0.1075991839170456,
0.058962687849998474,
0.006259207613766193,
-0.024324703961610794,
0.08019638061523438,
0.02128937840461731,
0.024519432336091995,
0.03744808956980705,
0.02137339860200882,
-0.07221483439207077,
0.10845573991537094,
-0.07286269962787628,
0.03160209581255913,
-0.06287699937820435,
-0.04363655298948288,
0.017761075869202614,
-0.03628157451748848,
-0.03267930820584297,
0.006437036208808422,
-0.022784531116485596,
-0.013562209904193878,
0.006713125854730606,
0.11264052987098694,
-0.11545322090387344,
-0.01574799045920372,
-0.02053758315742016,
0.024461524561047554,
-0.05275111645460129,
0.02728860452771187,
0.04115202650427818,
-0.06340017914772034,
0.032201219350099564,
0.012664401903748512,
-0.043491967022418976,
-2.9200677410677146e-33,
0.07249812036752701,
-0.06747724115848541,
-0.013538787141442299,
-0.03035011515021324,
-0.0022807626519352198,
0.0155115257948637,
0.010332954116165638,
0.0028604359831660986,
0.015600845217704773,
-0.028735237196087837,
-0.04114655777812004,
-0.03489689901471138,
-0.006814554333686829,
-0.02295404113829136,
-0.05910283699631691,
0.00530987698584795,
-0.06036745756864548,
-0.062774658203125,
0.05377896875143051,
0.03989738970994949,
-0.055025797337293625,
0.0038399386685341597,
0.04461679980158806,
0.10829972475767136,
-0.024543700739741325,
-0.019374847412109375,
-0.0729682445526123,
0.05095840245485306,
-0.028306417167186737,
-0.02009686641395092,
-0.03152583912014961,
-0.09682699292898178,
0.01942318305373192,
-0.015600156038999557,
-0.010815505869686604,
-0.04686681926250458,
-0.011266342364251614,
0.028500543907284737,
-0.01636628247797489,
-0.03924256190657616,
0.005132325924932957,
0.07583702355623245,
0.015338891185820103,
0.009336346760392189,
-0.034688614308834076,
0.055669255554676056,
0.10735415667295456,
-0.04686614125967026,
0.029701821506023407,
-0.07027554512023926,
0.010342077352106571,
-0.007680014241486788,
-0.0050325351767241955,
0.09100322425365448,
-0.01958487555384636,
0.06591378897428513,
0.046700965613126755,
0.04407192021608353,
-0.04502382129430771,
0.051628224551677704,
0.10521364957094193,
-0.0711682140827179,
-0.006182004697620869,
0.027648620307445526,
-0.026338918134570122,
-0.039091795682907104,
-0.021762659773230553,
0.05817071720957756,
0.03301781415939331,
0.0677427351474762,
0.07174734771251678,
-0.10975519567728043,
0.08973575383424759,
0.020022299140691757,
0.042883168905973434,
-0.019127698615193367,
-0.029145989567041397,
-0.054562028497457504,
0.01172601617872715,
0.030231129378080368,
-0.018962854519486427,
0.038519252091646194,
-0.10323875397443771,
0.12037631869316101,
0.04692697152495384,
0.015541081316769123,
0.08578493446111679,
0.029989885166287422,
0.042983949184417725,
0.0722968801856041,
0.003996368497610092,
0.03581496700644493,
-0.02356361225247383,
0.03931615129113197,
-0.008267509751021862,
-5.2997510380237145e-8,
0.07536701112985611,
0.018858319148421288,
-0.08393466472625732,
0.022311441600322723,
0.008532408624887466,
-0.09278695285320282,
0.0275131706148386,
-0.03549971804022789,
-0.0990305244922638,
0.04387972876429558,
-0.025686686858534813,
0.02477213926613331,
-0.040244217962026596,
-0.045175060629844666,
-0.037177395075559616,
-0.012339549139142036,
-0.0752016231417656,
0.0527014397084713,
-0.02294986881315708,
-0.10392741113901138,
-0.054145392030477524,
-0.0637068822979927,
-0.001278689131140709,
-0.005970941390842199,
0.0048552523367106915,
0.0773020088672638,
-0.0053713275119662285,
-0.09191177040338516,
0.08226554095745087,
0.0019683900754898787,
-0.06019354239106178,
-0.05166090652346611,
-0.04849902540445328,
0.1518298238515854,
-0.0438687801361084,
0.04956803098320961,
-0.054824989289045334,
0.08222051709890366,
0.023450911045074463,
0.01718279905617237,
-0.020382272079586983,
-0.05451841652393341,
-0.039009854197502136,
0.018109595403075218,
-0.04303126409649849,
0.058782752603292465,
0.018724068999290466,
0.09422608464956284,
0.012037613429129124,
0.04231115058064461,
0.04304012656211853,
0.027956990525126457,
-0.04098137095570564,
0.13350772857666016,
-0.011553401127457619,
0.03180818259716034,
-0.03019079379737377,
0.010458113625645638,
0.06185998022556305,
0.010581552051007748,
-0.013886281289160252,
0.0667545273900032,
0.005474683828651905,
-0.02897440455853939
] | 0.120209
|
sh ``` In your shell, view the capabilities for process 1: ```shell cd /proc/1 cat status ``` The output shows capabilities bitmap for the process: ``` ... CapPrm: 00000000aa0435fb CapEff: 00000000aa0435fb ... ``` Compare the capabilities of the two Containers: ``` 00000000a80425fb 00000000aa0435fb ``` In the capability bitmap of the first container, bits 12 and 25 are clear. In the second container, bits 12 and 25 are set. Bit 12 is `CAP\_NET\_ADMIN`, and bit 25 is `CAP\_SYS\_TIME`. See [capability.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h) for definitions of the capability constants. {{< note >}} Linux capability constants have the form `CAP\_XXX`. But when you list capabilities in your container manifest, you must omit the `CAP\_` portion of the constant. For example, to add `CAP\_SYS\_TIME`, include `SYS\_TIME` in your list of capabilities. {{< /note >}} ## Set the Seccomp Profile for a Container To set the Seccomp profile for a Container, include the `seccompProfile` field in the `securityContext` section of your Pod or Container manifest. The `seccompProfile` field is a [SeccompProfile](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#seccompprofile-v1-core) object consisting of `type` and `localhostProfile`. Valid options for `type` include `RuntimeDefault`, `Unconfined`, and `Localhost`. `localhostProfile` must only be set if `type: Localhost`. It indicates the path of the pre-configured profile on the node, relative to the kubelet's configured Seccomp profile location (configured with the `--root-dir` flag). Here is an example that sets the Seccomp profile to the node's container runtime default profile: ```yaml ... securityContext: seccompProfile: type: RuntimeDefault ``` Here is an example that sets the Seccomp profile to a pre-configured file at `/seccomp/my-profiles/profile-allow.json`: ```yaml ... securityContext: seccompProfile: type: Localhost localhostProfile: my-profiles/profile-allow.json ``` ## Set the AppArmor Profile for a Container To set the AppArmor profile for a Container, include the `appArmorProfile` field in the `securityContext` section of your Container. The `appArmorProfile` field is a [AppArmorProfile](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#apparmorprofile-v1-core) object consisting of `type` and `localhostProfile`. Valid options for `type` include `RuntimeDefault`(default), `Unconfined`, and `Localhost`. `localhostProfile` must only be set if `type` is `Localhost`. It indicates the name of the pre-configured profile on the node. The profile needs to be loaded onto all nodes suitable for the Pod, since you don't know where the pod will be scheduled. Approaches for setting up custom profiles are discussed in [Setting up nodes with profiles](/docs/tutorials/security/apparmor/#setting-up-nodes-with-profiles). Note: If `containers[\*].securityContext.appArmorProfile.type` is explicitly set to `RuntimeDefault`, then the Pod will not be admitted if AppArmor is not enabled on the Node. However if `containers[\*].securityContext.appArmorProfile.type` is not specified, then the default (which is also `RuntimeDefault`) will only be applied if the node has AppArmor enabled. If the node has AppArmor disabled the Pod will be admitted but the Container will not be restricted by the `RuntimeDefault` profile. Here is an example that sets the AppArmor profile to the node's container runtime default profile: ```yaml ... containers: - name: container-1 securityContext: appArmorProfile: type: RuntimeDefault ``` Here is an example that sets the AppArmor profile to a pre-configured profile named `k8s-apparmor-example-deny-write`: ```yaml ... containers: - name: container-1 securityContext: appArmorProfile: type: Localhost localhostProfile: k8s-apparmor-example-deny-write ``` For more details please see, [Restrict a Container's Access to Resources with AppArmor](/docs/tutorials/security/apparmor/). ## Assign SELinux labels to a Container To assign SELinux labels to a Container, include the `seLinuxOptions` field in the `securityContext` section of your Pod or Container manifest. The `seLinuxOptions` field is an [SELinuxOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#selinuxoptions-v1-core) object. Here's an example that applies an SELinux level: ```yaml ... securityContext: seLinuxOptions: level: "s0:c123,c456" ``` {{< note >}} To assign SELinux labels, the SELinux security module must be loaded on the host operating system. On Windows and Linux worker nodes without SELinux support, this field and any SELinux feature gates described below have no effect. {{< /note
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
0.08174485713243484,
0.03990407660603523,
-0.06592991203069687,
-0.051496993750333786,
0.038982927799224854,
-0.06558395177125931,
0.009879423305392265,
0.03991306945681572,
-0.05760858580470085,
-0.014500284567475319,
0.02164709009230137,
-0.07294236868619919,
-0.003530586836859584,
0.0055625056847929955,
-0.018172036856412888,
-0.03618455305695534,
0.06934916228055954,
-0.08095885813236237,
-0.033928293734788895,
-0.0058627622202038765,
0.07154175639152527,
0.009674678556621075,
0.00410071574151516,
-0.043675389140844345,
-0.0030866325832903385,
-0.020514247938990593,
-0.07106834650039673,
-0.010052597150206566,
0.07793702930212021,
-0.034290414303541183,
0.022549331188201904,
0.061173830181360245,
0.006197248585522175,
-0.03121800348162651,
0.12330866605043411,
0.10133974254131317,
0.046581633388996124,
-0.0683809220790863,
-0.029127493500709534,
-0.016313884407281876,
0.04201548546552658,
0.01823362521827221,
-0.06556674093008041,
0.027781901881098747,
-0.01974191889166832,
0.020678378641605377,
0.02441370114684105,
-0.01542559266090393,
-0.08383546024560928,
-0.00015875801909714937,
0.024796240031719208,
0.11134129762649536,
-0.008456690236926079,
0.020742516964673996,
0.024411063641309738,
0.004635148216038942,
-0.08244150131940842,
-0.004118378274142742,
-0.0569150410592556,
0.05033525824546814,
-0.13657470047473907,
-0.021181125193834305,
-0.031184006482362747,
-0.051250655204057693,
0.081534743309021,
0.0246517825871706,
0.03862212598323822,
-0.055430810898542404,
-0.06423118710517883,
-0.010740173980593681,
-0.048283714801073074,
-0.015641262754797935,
-0.029070938006043434,
-0.00463133305311203,
-0.02248925156891346,
-0.01106545701622963,
-0.01640968769788742,
0.035872820764780045,
-0.0518929548561573,
-0.10717197507619858,
-0.05680002272129059,
0.021392079070210457,
0.021698223426938057,
-0.04570077359676361,
-0.09501293301582336,
0.03177640587091446,
-0.03402547910809517,
0.028557823970913887,
0.07770835608243942,
0.006899579428136349,
0.024162625893950462,
0.00023109535686671734,
-0.03664880618453026,
0.03551926836371422,
0.09063918143510818,
-0.02654941938817501,
-0.019873451441526413,
0.040948398411273956,
0.013019637204706669,
0.028641143813729286,
-0.04725331813097,
-0.05412475764751434,
-0.032732829451560974,
-0.032770637422800064,
0.0005911084008403122,
-0.024616742506623268,
-0.018445191904902458,
-0.005523850210011005,
-0.05291295051574707,
0.04682299867272377,
0.0917169451713562,
0.02245689183473587,
-0.04347292333841324,
0.022922832518815994,
0.05642251670360565,
0.008454917930066586,
-0.04993513599038124,
-0.010972420684993267,
0.04373854026198387,
-0.01013497170060873,
-0.0063654230907559395,
-0.06370639055967331,
0.06956098973751068,
-0.01237924862653017,
-0.08038157224655151,
-0.016821973025798798,
-0.05573059991002083,
5.997968006594384e-33,
-0.0036580415908247232,
-0.12459655851125717,
0.017845110967755318,
0.03318843990564346,
0.06943249702453613,
0.07077297568321228,
-0.02020728774368763,
-0.04560033977031708,
-0.07158636301755905,
0.04701877757906914,
-0.07180839031934738,
0.05851510167121887,
-0.09242261946201324,
-0.04647005349397659,
0.03813156113028526,
-0.0017724995268508792,
0.04905085265636444,
0.02356713078916073,
0.03582584485411644,
-0.011696483008563519,
0.08133841305971146,
0.06593548506498337,
-0.11504419147968292,
0.007211864460259676,
0.09548135846853256,
0.011524145491421223,
-0.03725459426641464,
-0.020913463085889816,
0.042054954916238785,
0.03181346133351326,
0.007513580843806267,
0.06616760790348053,
-0.014506815001368523,
-0.00461010355502367,
0.06208811700344086,
-0.041294507682323456,
-0.015902195125818253,
0.008338769897818565,
-0.036289479583501816,
-0.061049144715070724,
0.016250252723693848,
-0.00947345420718193,
-0.0025862001348286867,
-0.059704091399908066,
-0.03721175342798233,
-0.11671163886785507,
-0.06428997963666916,
0.009711626917123795,
-0.05717913433909416,
0.07698561996221542,
0.04472468048334122,
0.05133616179227829,
-0.004772776272147894,
-0.10191722959280014,
0.03728443756699562,
-0.12927308678627014,
-0.029815809801220894,
0.016846539452672005,
0.00857201125472784,
0.13528847694396973,
-0.05125419795513153,
0.022010184824466705,
0.022965004667639732,
0.012620790861546993,
0.05600115656852722,
0.0891973003745079,
0.016838761046528816,
0.046454157680273056,
0.04369490221142769,
0.05185679346323013,
-0.11925967037677765,
0.005438290536403656,
0.059666700661182404,
0.0672243982553482,
-0.03736789897084236,
-0.05464549362659454,
0.089881531894207,
-0.03320658951997757,
-0.06794470548629761,
0.0027195021975785494,
-0.038245201110839844,
0.03557610884308815,
-0.021518925204873085,
0.003989470656961203,
-0.049810271710157394,
-0.09459520876407623,
-0.025148024782538414,
0.020289232954382896,
0.00457910867407918,
-0.008703797124326229,
0.026128938421607018,
0.01596795953810215,
0.033650677651166916,
-0.0141559774056077,
-0.15802669525146484,
-7.773669772946531e-33,
0.04502342268824577,
-0.0400957427918911,
-0.007878442294895649,
-0.016479162499308586,
-0.043274350464344025,
-0.02586604841053486,
0.06476955860853195,
-0.06260044127702713,
0.024624817073345184,
-0.07080875337123871,
0.004388131201267242,
0.023629816249012947,
-0.01768953911960125,
-0.014138276688754559,
-0.06150776520371437,
0.011335915885865688,
-0.034907031804323196,
-0.04260396584868431,
0.049764420837163925,
0.04456508532166481,
-0.03881732001900673,
0.0805910974740982,
0.12568067014217377,
0.06913366913795471,
-0.0034829950891435146,
-0.015971200540661812,
-0.026660356670618057,
0.007258602883666754,
-0.021986739709973335,
-0.05563167482614517,
0.01987045258283615,
-0.051708612591028214,
-0.05998348817229271,
0.04344971477985382,
-0.021035371348261833,
-0.0723777487874031,
-0.043425749987363815,
0.07551069557666779,
-0.013264179229736328,
0.01924537494778633,
0.03823699802160263,
-0.0027530016377568245,
-0.044040974229574203,
-0.014519655145704746,
-0.05020807683467865,
0.05331829562783241,
0.06931000202894211,
-0.11497876793146133,
0.044191621243953705,
-0.0820879265666008,
0.09152384847402573,
-0.001770574483089149,
0.08645199984312057,
0.07686680555343628,
0.009606560692191124,
-0.023108625784516335,
0.036904189735651016,
-0.02886597067117691,
0.052028946578502655,
-0.049292344599962234,
0.15121132135391235,
-0.07127413153648376,
-0.0258299820125103,
0.052035219967365265,
0.045570008456707,
-0.03885233402252197,
-0.08769948035478592,
-0.07621052116155624,
-0.014868006110191345,
0.03135685622692108,
0.05340423807501793,
-0.05343378335237503,
0.0336073562502861,
0.003309265710413456,
-0.06069421023130417,
0.04222419112920761,
-0.025815999135375023,
-0.0631769672036171,
-0.026574471965432167,
0.015142259187996387,
-0.1265365332365036,
0.05762225762009621,
-0.04958338290452957,
-0.0031592107843607664,
-0.06557823717594147,
0.07279223203659058,
0.010169479995965958,
-0.0026292041875422,
0.0811835527420044,
0.01714518666267395,
0.02786596119403839,
0.022911125794053078,
-0.1086086854338646,
0.1118602603673935,
-0.009589185006916523,
-5.423539661819632e-8,
0.059903111308813095,
-0.06330640614032745,
-0.07340287417173386,
-0.027369501069188118,
0.03169824182987213,
0.019472479820251465,
-0.029791101813316345,
-0.021560881286859512,
0.01508563943207264,
0.0011316725285723805,
0.039953041821718216,
0.003090260550379753,
-0.0667608305811882,
-0.07468117773532867,
0.10739360749721527,
0.030073324218392372,
-0.014470834285020828,
0.014670093543827534,
0.017889179289340973,
-0.02337667904794216,
-0.013702108524739742,
-0.04132428020238876,
-0.0019255963852629066,
0.017253216356039047,
-0.09261978417634964,
-0.007078508846461773,
0.038618817925453186,
0.030433611944317818,
-0.007372239138931036,
0.050267238169908524,
0.053901247680187225,
-0.04336066171526909,
0.018534591421484947,
0.026623886078596115,
0.05561040714383125,
0.03610672056674957,
-0.026123007759451866,
0.06574741005897522,
0.03641963005065918,
0.056135013699531555,
-0.018024355173110962,
-0.040807001292705536,
0.008869011886417866,
0.04152823984622955,
-0.013507425785064697,
-0.005275677423924208,
-0.011101667769253254,
0.06330306828022003,
0.0056080929934978485,
0.04042533040046692,
0.017325833439826965,
0.08494546264410019,
-0.02457342855632305,
0.04321697726845741,
0.019276408478617668,
0.04005502536892891,
-0.003969703800976276,
-0.041676830500364304,
-0.017224077135324478,
0.09293471276760101,
0.008360874839127064,
0.02916477993130684,
0.025241803377866745,
-0.004748085979372263
] | 0.086581
|
level: ```yaml ... securityContext: seLinuxOptions: level: "s0:c123,c456" ``` {{< note >}} To assign SELinux labels, the SELinux security module must be loaded on the host operating system. On Windows and Linux worker nodes without SELinux support, this field and any SELinux feature gates described below have no effect. {{< /note >}} ### Efficient SELinux volume relabeling {{< feature-state feature\_gate\_name="SELinuxMountReadWriteOncePod" >}} {{< note >}} Kubernetes v1.27 introduced an early limited form of this behavior that was only applicable to volumes (and PersistentVolumeClaims) using the `ReadWriteOncePod` access mode. Kubernetes v1.33 promotes `SELinuxChangePolicy` and `SELinuxMount` [feature gates](/docs/reference/command-line-tools-reference/feature-gates/) as beta to widen that performance improvement to other kinds of PersistentVolumeClaims, as explained in detail below. While in beta, `SELinuxMount` is still disabled by default. {{< /note >}} With `SELinuxMount` feature gate disabled (the default in Kubernetes 1.33 and any previous release), the container runtime recursively assigns SELinux label to all files on all Pod volumes by default. To speed up this process, Kubernetes can change the SELinux label of a volume instantly by using a mount option `-o context=`. To benefit from this speedup, all these conditions must be met: \* The [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) `SELinuxMountReadWriteOncePod` must be enabled. \* Pod must use PersistentVolumeClaim with applicable `accessModes` and [feature gates](/docs/reference/command-line-tools-reference/feature-gates/): \* Either the volume has `accessModes: ["ReadWriteOncePod"]`, and feature gate `SELinuxMountReadWriteOncePod` is enabled. \* Or the volume can use any other access modes and all feature gates `SELinuxMountReadWriteOncePod`, `SELinuxChangePolicy` and `SELinuxMount` must be enabled and the Pod has `spec.securityContext.seLinuxChangePolicy` either nil (default) or `MountOption`. \* Pod (or all its Containers that use the PersistentVolumeClaim) must have `seLinuxOptions` set. \* The corresponding PersistentVolume must be either: \* A volume that uses the legacy in-tree `iscsi`, `rbd` or `fc` volume type. \* Or a volume that uses a {{< glossary\_tooltip text="CSI" term\_id="csi" >}} driver. The CSI driver must announce that it supports mounting with `-o context` by setting `spec.seLinuxMount: true` in its CSIDriver instance. When any of these conditions is not met, SELinux relabelling happens another way: the container runtime recursively changes the SELinux label for all inodes (files and directories) in the volume. Calling out explicitly, this applies to Kubernetes ephemeral volumes like `secret`, `configMap` and `projected`, and all volumes whose CSIDriver instance does not explicitly announce mounting with `-o context`. When this speedup is used, all Pods that use the same applicable volume concurrently on the same node \*\*must have the same SELinux label\*\*. A Pod with a different SELinux label will fail to start and will be `ContainerCreating` until all Pods with other SELinux labels that use the volume are deleted. {{< feature-state feature\_gate\_name="SELinuxChangePolicy" >}} For Pods that want to opt-out from relabeling using mount options, they can set `spec.securityContext.seLinuxChangePolicy` to `Recursive`. This is required when multiple pods share a single volume on the same node, but they run with different SELinux labels that allows simultaneous access to the volume. For example, a privileged pod running with label `spc\_t` and an unprivileged pod running with the default label `container\_file\_t`. With unset `spec.securityContext.seLinuxChangePolicy` (or with the default value `MountOption`), only one of such pods is able to run on a node, the other one gets ContainerCreating with error `conflicting SELinux labels of volume : and `. #### SELinuxWarningController To make it easier to identify Pods that are affected by the change in SELinux volume relabeling, a new controller called `SELinuxWarningController` has been introduced in kube-controller-manager. It is disabled by default and can be enabled by either setting the `--controllers=\*,selinux-warning-controller` [command line flag](/docs/reference/command-line-tools-reference/kube-controller-manager/), or by setting `genericControllerManagerConfiguration.controllers` [field in KubeControllerManagerConfiguration](/docs/reference/config-api/kube-controller-manager-config.v1alpha1/#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration). This controller requires `SELinuxChangePolicy` feature gate to be enabled. When enabled, the controller observes running Pods
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
0.03630417212843895,
-0.011716936714947224,
0.017288073897361755,
0.011060631833970547,
0.04337485879659653,
-0.014751151204109192,
-0.027031924575567245,
0.0293823704123497,
0.03289605677127838,
-0.053733643144369125,
-0.015695882961153984,
0.007730590645223856,
0.008658445440232754,
0.0008413268951699138,
0.027183732017874718,
0.0032713129185140133,
0.07887769490480423,
0.059264615178108215,
-0.025814538821578026,
-0.0497925728559494,
-0.023128362372517586,
0.019288014620542526,
0.004126534331589937,
0.02785954624414444,
-0.0050405836664140224,
-0.061118993908166885,
-0.10480570048093796,
-0.003654520958662033,
0.07536710053682327,
-0.01652715727686882,
-0.08263180404901505,
0.009149888530373573,
-0.05198916792869568,
0.009385034441947937,
0.008395429700613022,
0.068357452750206,
0.022472603246569633,
-0.10087377578020096,
-0.11353950202465057,
0.009208351373672485,
0.01576407253742218,
-0.013537260703742504,
-0.09476664662361145,
0.009191802702844143,
-0.0791703388094902,
-0.013729031197726727,
0.07222170382738113,
-0.07257683575153351,
-0.03987232223153114,
0.051248881965875626,
0.011242849752306938,
-0.026923274621367455,
0.06669021397829056,
0.03423110023140907,
0.022572940215468407,
-0.021229583770036697,
-0.02622443437576294,
0.07237818837165833,
0.12885676324367523,
0.06638504564762115,
0.010885950177907944,
-0.006281960755586624,
0.032571885734796524,
-0.03466816991567612,
-0.009214908815920353,
0.0170783381909132,
0.03677242249250412,
-0.05007803440093994,
-0.02926291711628437,
-0.001441914588212967,
0.04364767670631409,
0.04546865448355675,
-0.009606038220226765,
0.012701067142188549,
-0.018383147194981575,
0.006365531589835882,
-0.09481257200241089,
0.01945899985730648,
0.022892896085977554,
-0.06849407404661179,
-0.010589811950922012,
0.06838272511959076,
0.03729134425520897,
-0.02012833021581173,
-0.00919880997389555,
-0.0018710287986323237,
-0.04646282270550728,
0.003517614211887121,
0.004446386359632015,
0.046386025846004486,
0.06048211082816124,
-0.09359925240278244,
0.009956024587154388,
-0.11159997433423996,
0.08773499727249146,
-0.051326919347047806,
0.00272758468054235,
-0.004709551110863686,
0.03601701185107231,
-0.02389267273247242,
-0.024583201855421066,
0.008705302141606808,
-0.020305275917053223,
0.06278529018163681,
0.06368975341320038,
-0.05408071354031563,
0.03102499060332775,
0.0015782489208504558,
-0.054092440754175186,
-0.0038363139610737562,
0.04274376109242439,
0.06870561093091965,
0.05602898448705673,
-0.005793859250843525,
0.0431012399494648,
0.019932258874177933,
-0.026075808331370354,
0.018855294212698936,
0.045470479875802994,
0.07254626601934433,
0.03707939013838768,
-0.09796182066202164,
0.0017913455376401544,
0.03089422732591629,
0.021920595318078995,
0.08215562254190445,
-0.08206463605165482,
5.556082782388993e-33,
0.026438921689987183,
-0.05829907953739166,
0.006216222885996103,
0.021499479189515114,
0.043444301933050156,
-0.06865474581718445,
-0.013743075542151928,
0.01073294784873724,
-0.06264061480760574,
-0.008427643217146397,
-0.07868032157421112,
0.05464812368154526,
0.03340884670615196,
-0.07114684581756592,
0.06549998372793198,
-0.028012506663799286,
-0.03657776862382889,
-0.020037226378917694,
0.07372069358825684,
-0.0034116581082344055,
0.06684292107820511,
-0.038035545498132706,
0.008031019009649754,
0.0058208974078297615,
0.021075865253806114,
-0.05652698874473572,
-0.022121962159872055,
-0.04679972305893898,
0.010635151527822018,
0.0442543551325798,
-0.11807160824537277,
0.0029844995588064194,
0.048112187534570694,
-0.003175735706463456,
-0.10166241973638535,
-0.07337402552366257,
-0.020165544003248215,
-0.01948215812444687,
-0.0764797180891037,
-0.07580623030662537,
0.040874142199754715,
-0.04590502753853798,
-0.04358302056789398,
-0.06560434401035309,
0.0067373220808804035,
-0.03561355173587799,
-0.002762028481811285,
0.04195821285247803,
0.059787798672914505,
-0.008993043564260006,
-0.04493134468793869,
0.03041907213628292,
0.011761890724301338,
-0.12169893831014633,
0.05464491620659828,
-0.03334886580705643,
0.011211066506803036,
-0.05132632330060005,
-0.09451346099376678,
0.047511182725429535,
-0.007695007603615522,
0.05541086196899414,
0.036320965737104416,
0.017854856327176094,
0.01740969903767109,
0.02731546200811863,
-0.02517707087099552,
0.023626403883099556,
-0.010141421109437943,
-0.06343027949333191,
-0.10893403738737106,
0.049486394971609116,
-0.13112229108810425,
0.013072413392364979,
-0.022691652178764343,
-0.091092050075531,
0.01814119890332222,
-0.050261322408914566,
0.03422395512461662,
-0.008371067233383656,
-0.027853332459926605,
0.009728195145726204,
-0.007876710034906864,
0.08301595598459244,
-0.008031342178583145,
-0.037407297641038895,
-0.052310723811388016,
-0.0017448842991143465,
-0.03225197270512581,
-0.015056315809488297,
0.08422627300024033,
-0.08250849694013596,
0.07814788818359375,
0.04795762151479721,
-0.13461796939373016,
-6.277741539561842e-33,
0.007115059532225132,
-0.06365766376256943,
-0.02832941897213459,
-0.024478813633322716,
-0.01307598315179348,
0.11701378971338272,
0.0014252957189455628,
0.03155402094125748,
-0.019395174458622932,
-0.07577846199274063,
-0.032788537442684174,
0.03360798954963684,
-0.037519972771406174,
-0.014527772553265095,
-0.021483464166522026,
-0.02188228815793991,
-0.1063309982419014,
-0.03271779790520668,
-0.01715110056102276,
0.0580480694770813,
-0.04695481061935425,
0.06504311412572861,
0.08200190216302872,
0.1115211695432663,
0.011818846687674522,
0.04876909777522087,
-0.05034441128373146,
0.01360375341027975,
-0.08428245037794113,
-0.006991230417042971,
-0.036125052720308304,
-0.0681312307715416,
-0.033750955015420914,
-0.04529215022921562,
-0.006045489106327295,
-0.05851621553301811,
-0.006134818773716688,
0.019445272162556648,
-0.06687455624341965,
-0.02186978980898857,
0.038648176938295364,
0.0761798843741417,
0.024795688688755035,
0.03221585974097252,
-0.046320073306560516,
0.05759120360016823,
0.014121158048510551,
-0.03892386704683304,
-0.054725997149944305,
-0.03864878788590431,
-0.00849570520222187,
0.005898656323552132,
0.01873050630092621,
0.06806982308626175,
-0.05197498947381973,
0.04128708690404892,
-0.022150758653879166,
0.03379496932029724,
-0.009512529708445072,
0.06945770233869553,
0.04756750911474228,
-0.06149854511022568,
0.018590202555060387,
0.04976252093911171,
0.024620434269309044,
-0.034004151821136475,
-0.015485264360904694,
0.10902602970600128,
0.04585922136902809,
0.02927062101662159,
0.03359084203839302,
-0.08121882379055023,
0.04072541370987892,
0.05858386307954788,
0.019208639860153198,
-0.04010841250419617,
0.05482305958867073,
-0.11699394136667252,
-0.07628035545349121,
0.03989623486995697,
-0.01322895847260952,
0.057947706431150436,
-0.10502081364393234,
0.07490077614784241,
0.06286144256591797,
-0.029613997787237167,
0.007254424039274454,
0.06520116329193115,
0.10677521675825119,
0.06143520027399063,
-0.006259278394281864,
-0.0155099555850029,
-0.07134449481964111,
0.11647243797779083,
0.032265935093164444,
-5.101510325289382e-8,
0.05091537535190582,
0.03672361746430397,
-0.06040334701538086,
0.02136206068098545,
0.03677482157945633,
-0.053030192852020264,
0.04505838081240654,
-0.017260925844311714,
-0.10174176096916199,
0.032018326222896576,
-0.007923184894025326,
0.022932861000299454,
-0.016033053398132324,
-0.0874132439494133,
0.014161327853798866,
0.008135889656841755,
0.03204572573304176,
0.051525793969631195,
0.01742399111390114,
-0.04990004003047943,
-0.01433977298438549,
-0.0777081772685051,
-0.027836915105581284,
0.045457471162080765,
-0.009356276132166386,
0.023947561159729958,
0.04363831505179405,
-0.02273384854197502,
0.10910335928201675,
0.0656508207321167,
-0.042570240795612335,
-0.018072940409183502,
-0.06644845753908157,
0.14874762296676636,
-0.059363435953855515,
0.07084235548973083,
-0.0677751898765564,
0.037117280066013336,
0.024672336876392365,
0.01713084615767002,
0.012270068749785423,
0.026506783440709114,
-0.03665225952863693,
0.015074088238179684,
-0.056857578456401825,
0.06155887618660927,
-0.027821198105812073,
0.08378917723894119,
0.06617088615894318,
0.036574866622686386,
-0.0038411058485507965,
-0.0038581346161663532,
-0.04282841086387634,
0.17628616094589233,
0.04765929654240608,
-0.019672740250825882,
-0.021109875291585922,
-0.031805574893951416,
0.017156995832920074,
0.0320240817964077,
0.036614447832107544,
0.022674355655908585,
0.04879897087812424,
-0.04092543199658394
] | 0.146201
|
a new controller called `SELinuxWarningController` has been introduced in kube-controller-manager. It is disabled by default and can be enabled by either setting the `--controllers=\*,selinux-warning-controller` [command line flag](/docs/reference/command-line-tools-reference/kube-controller-manager/), or by setting `genericControllerManagerConfiguration.controllers` [field in KubeControllerManagerConfiguration](/docs/reference/config-api/kube-controller-manager-config.v1alpha1/#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration). This controller requires `SELinuxChangePolicy` feature gate to be enabled. When enabled, the controller observes running Pods and when it detects that two Pods use the same volume with different SELinux labels: 1. It emits an event to both of the Pods. `kubectl describe pod ` the shows `SELinuxLabel "" conflicts with pod that uses the same volume as this pod with SELinuxLabel "". If both pods land on the same node, only one of them may access the volume`. 2. Raise `selinux\_warning\_controller\_selinux\_volume\_conflict` metric. The metric has both pod names + namespaces as labels to identify the affected pods easily. A cluster admin can use this information to identify pods affected by the planning change and proactively opt-out Pods from the optimization (i.e. set `spec.securityContext.seLinuxChangePolicy: Recursive`). {{< warning >}} We strongly recommend clusters that use SELinux to enable this controller and make sure that `selinux\_warning\_controller\_selinux\_volume\_conflict` metric does not report any conflicts before enabling `SELinuxMount` feature gate or upgrading to a version where `SELinuxMount` is enabled by default. {{< /warning >}} #### Feature gates The following feature gates control the behavior of SELinux volume relabeling: \* `SELinuxMountReadWriteOncePod`: enables the optimization for volumes with `accessModes: ["ReadWriteOncePod"]`. This is a very safe feature gate to enable, as it cannot happen that two pods can share one single volume with this access mode. This feature gate is enabled by default sine v1.28. \* `SELinuxChangePolicy`: enables `spec.securityContext.seLinuxChangePolicy` field in Pod and related SELinuxWarningController in kube-controller-manager. This feature can be used before enabling `SELinuxMount` to check Pods running on a cluster, and to pro-actively opt-out Pods from the optimization. This feature gate requires `SELinuxMountReadWriteOncePod` enabled. It is beta and enabled by default in 1.33. \* `SELinuxMount` enables the optimization for all eligible volumes. Since it can break existing workloads, we recommend enabling `SELinuxChangePolicy` feature gate + SELinuxWarningController first to check the impact of the change. This feature gate requires `SELinuxMountReadWriteOncePod` and `SELinuxChangePolicy` enabled. It is beta, but disabled by default in 1.33. ## Managing access to the `/proc` filesystem {#proc-access} {{< feature-state feature\_gate\_name="ProcMountType" >}} For runtimes that follow the OCI runtime specification, containers default to running in a mode where there are multiple paths that are both masked and read-only. The result of this is the container has these paths present inside the container's mount namespace, and they can function similarly to if the container was an isolated host, but the container process cannot write to them. The list of masked and read-only paths are as follows: - Masked Paths: - `/proc/asound` - `/proc/acpi` - `/proc/kcore` - `/proc/keys` - `/proc/latency\_stats` - `/proc/timer\_list` - `/proc/timer\_stats` - `/proc/sched\_debug` - `/proc/scsi` - `/sys/firmware` - `/sys/devices/virtual/powercap` - Read-Only Paths: - `/proc/bus` - `/proc/fs` - `/proc/irq` - `/proc/sys` - `/proc/sysrq-trigger` For some Pods, you might want to bypass that default masking of paths. The most common context for wanting this is if you are trying to run containers within a Kubernetes container (within a pod). The `securityContext` field `procMount` allows a user to request a container's `/proc` be `Unmasked`, or be mounted as read-write by the container process. This also applies to `/sys/firmware` which is not in `/proc`. ```yaml ... securityContext: procMount: Unmasked ``` {{< note >}} Setting `procMount` to Unmasked requires the `spec.hostUsers` value in the pod spec to be `false`. In other words: a container that wishes to have an Unmasked `/proc` or unmasked `/sys` must also be in a [user namespace](/docs/concepts/workloads/pods/user-namespaces/). Kubernetes v1.12 to v1.29
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
0.01219301950186491,
-0.03937426209449768,
-0.011224196292459965,
0.009086452424526215,
0.04722129553556442,
-0.01805032603442669,
0.008941061794757843,
0.02706453949213028,
0.07357242703437805,
-0.04047388583421707,
0.049863316118717194,
-0.04940849915146828,
0.009385669603943825,
-0.04627068340778351,
0.0013374757254496217,
0.012644537724554539,
0.06094590201973915,
-0.005844674538820982,
-0.02729789726436138,
-0.04738600179553032,
0.03812481090426445,
0.012360164895653725,
-0.022525710985064507,
0.05895276367664337,
-0.09718766808509827,
-0.04734968766570091,
-0.07024495303630829,
0.011049591936171055,
0.022799910977482796,
-0.07268200814723969,
-0.044522590935230255,
0.013990742154419422,
-0.028928812593221664,
0.00377730093896389,
0.03677995502948761,
-0.015192117542028427,
0.007577620446681976,
-0.06252194195985794,
-0.09746251255273819,
-0.018761828541755676,
0.02321736328303814,
-0.038373351097106934,
-0.08990645408630371,
-0.0362069271504879,
-0.056809522211551666,
0.021839844062924385,
-0.025660626590251923,
-0.046036526560783386,
0.010015861131250858,
-0.01956915110349655,
0.052906330674886703,
-0.040612224489450455,
0.04215960577130318,
0.005800992250442505,
0.06582458317279816,
-0.013747592456638813,
-0.03958731144666672,
0.09301614761352539,
0.1571580320596695,
0.070292167365551,
-0.015072125941514969,
0.006560014560818672,
0.01015521865338087,
-0.01565169356763363,
0.009784023277461529,
-0.0582873597741127,
0.017339564859867096,
-0.047143518924713135,
-0.04334814101457596,
0.00524192675948143,
0.04307636246085167,
0.015181400813162327,
0.0413270927965641,
0.00959518551826477,
-0.019923266023397446,
-0.008217787370085716,
-0.08152090758085251,
0.0651792660355568,
-0.02218431793153286,
-0.07506638765335083,
-0.02784409001469612,
0.08980292826890945,
0.02119005285203457,
-0.04600967839360237,
-0.044084470719099045,
-0.0053062899969518185,
-0.0404667854309082,
-0.028268583118915558,
0.022884495556354523,
0.03930312767624855,
0.052271705120801926,
-0.0858597382903099,
0.03405063599348068,
-0.09269140660762787,
0.06154832988977432,
-0.05687866732478142,
0.005558803211897612,
0.02347942814230919,
0.04297357425093651,
-0.003979208413511515,
-0.0511564239859581,
0.017774339765310287,
-0.016856161877512932,
0.08365160971879959,
0.10418719798326492,
-0.06775007396936417,
-0.03606745973229408,
-0.010297968983650208,
-0.01256654690951109,
0.02386300079524517,
0.03811110928654671,
0.03528713807463646,
0.04759884253144264,
0.054308533668518066,
0.07239169627428055,
0.05669321492314339,
0.03131430223584175,
0.02773258090019226,
0.00515314657241106,
0.07791498303413391,
0.016905875876545906,
-0.12725430727005005,
-0.014206175692379475,
0.0010201268596574664,
0.010172882117331028,
0.05220155045390129,
-0.038747306913137436,
4.2789423330251484e-33,
0.07332882285118103,
-0.07010731846094131,
0.03517773374915123,
0.004963190294802189,
0.0062705823220312595,
-0.01876121014356613,
-0.04801323264837265,
0.0350276343524456,
-0.02706393413245678,
0.04311379790306091,
-0.07238352298736572,
0.07503502815961838,
-0.024579862132668495,
-0.036367714405059814,
0.027482185512781143,
-0.061945591121912,
-0.09677566587924957,
0.011292343027889729,
0.07098120450973511,
-0.07699374109506607,
0.07966329157352448,
0.011090938933193684,
-0.019899219274520874,
-0.013673380017280579,
0.046049050986766815,
-0.008320639841258526,
0.006607884541153908,
-0.07029292732477188,
-0.002542854053899646,
0.03557658568024635,
-0.07406621426343918,
-0.007671798579394817,
-0.021038370206952095,
0.02255178987979889,
-0.07447226345539093,
-0.06836778670549393,
-0.015226957388222218,
0.02677481435239315,
-0.12447284907102585,
-0.0274081788957119,
-0.028162937611341476,
-0.03461186960339546,
-0.09740710258483887,
-0.09720675647258759,
0.0036021131090819836,
-0.039216384291648865,
0.03019184060394764,
-0.06108160689473152,
0.07777918875217438,
-0.02061859332025051,
-0.06741585582494736,
0.01543060876429081,
0.08782227337360382,
-0.08822479844093323,
0.06983979791402817,
-0.030363524332642555,
0.0887095108628273,
-0.07697615772485733,
-0.061984024941921234,
0.006508971564471722,
0.01555903535336256,
-0.004218696150928736,
-0.01004047691822052,
0.013552157208323479,
0.029080873355269432,
0.07691771537065506,
-0.023925062268972397,
-0.016086554154753685,
-0.0057116299867630005,
-0.04780266806483269,
-0.0933884009718895,
0.036372873932123184,
-0.05180767551064491,
-0.021133577451109886,
-0.0008388021378777921,
-0.11860115826129913,
0.022858113050460815,
0.019803538918495178,
-0.08698559552431107,
-0.010949749499559402,
-0.05415556952357292,
-0.022226573899388313,
-0.012173177674412727,
0.07628069072961807,
-0.013828455470502377,
-0.04323625564575195,
-0.033382598310709,
0.05114438384771347,
-0.0220475010573864,
0.004325007554143667,
0.05204641819000244,
-0.027013853192329407,
0.004759416449815035,
0.03339163213968277,
-0.09524070471525192,
-5.7876085170689353e-33,
0.04284512624144554,
-0.04628859832882881,
0.03211704641580582,
-0.015147192403674126,
0.002435543341562152,
0.10769864916801453,
-0.0048944829031825066,
0.084560327231884,
-0.03927052021026611,
-0.0713416114449501,
-0.0020965563599020243,
0.03460339456796646,
0.00012428584159351885,
0.003790097776800394,
-0.04834018647670746,
0.02159821428358555,
-0.09122346341609955,
0.011970552615821362,
-0.02635432593524456,
0.03775439411401749,
-0.07577212899923325,
0.0795353576540947,
0.06662864238023758,
0.039043448865413666,
-0.0074669127352535725,
0.04114774242043495,
-0.0022267503663897514,
0.07470116019248962,
-0.057971760630607605,
0.018579553812742233,
0.016999414190649986,
-0.0792500302195549,
-0.015610847622156143,
0.0521797277033329,
-0.02059115655720234,
-0.07762159407138824,
-0.018726544454693794,
0.048668596893548965,
-0.05521666631102562,
0.007758511230349541,
0.0031154996249824762,
0.0672711655497551,
0.03735213726758957,
0.06446395814418793,
-0.04736543819308281,
0.02068134769797325,
0.07189413905143738,
-0.03298620507121086,
-0.019938932731747627,
-0.09419073909521103,
-0.023478077724575996,
-0.006241888273507357,
-0.050008371472358704,
0.05033975467085838,
-0.08377576619386673,
0.021357787773013115,
0.018786629661917686,
0.053411051630973816,
-0.08937082439661026,
0.07897310703992844,
0.0749378576874733,
-0.08477074652910233,
0.04229526221752167,
0.021822407841682434,
0.021226057782769203,
-0.02810794860124588,
0.0216998178511858,
0.09871013462543488,
0.11810781061649323,
0.024021010845899582,
0.04960273578763008,
-0.0374530553817749,
0.051132798194885254,
0.03430281952023506,
0.042877197265625,
-0.05375290662050247,
0.004437429364770651,
-0.059446338564157486,
-0.0456857867538929,
0.009496166370809078,
-0.053943149745464325,
-0.003494568169116974,
-0.04724752530455589,
0.0604725182056427,
-0.0034725710283964872,
0.05699990689754486,
0.040944088250398636,
0.08690669387578964,
0.08879512548446655,
0.05238410830497742,
-0.007741795852780342,
0.013061781413853168,
-0.04574107751250267,
0.15326443314552307,
-0.015249114483594894,
-4.962403821195949e-8,
0.082198865711689,
-0.02705778181552887,
-0.035851333290338516,
0.03677232563495636,
0.05499190837144852,
-0.05374631658196449,
0.012972438707947731,
-0.030723227187991142,
-0.12364783138036728,
0.017245018854737282,
-0.004911742173135281,
0.09474818408489227,
-0.06380217522382736,
-0.030578723177313805,
0.07293214648962021,
-0.04669501632452011,
-0.009815067984163761,
0.08450525999069214,
0.03879899904131889,
-0.02563164010643959,
-0.028152959421277046,
-0.06787281483411789,
0.0034151768777519464,
-0.005661217495799065,
0.03429020941257477,
0.04378063976764679,
-0.006856985855847597,
-0.010550634935498238,
0.1033158078789711,
0.046162549406290054,
0.0033212595153599977,
0.017764117568731308,
-0.09689119458198547,
0.10087672621011734,
-0.043039724230766296,
0.04731570929288864,
-0.09649991244077682,
0.03280048072338104,
0.026103802025318146,
-0.017072804272174835,
-0.0009224789682775736,
0.020560426637530327,
-0.08513879776000977,
0.006086968816816807,
-0.014838800765573978,
0.12483160942792892,
0.007891352288424969,
0.03883896768093109,
0.039919108152389526,
0.004955246113240719,
-0.026167940348386765,
-0.012442538514733315,
0.016038667410612106,
0.12262078374624252,
0.0035380269400775433,
-0.02734157256782055,
-0.04007326811552048,
-0.07354751974344254,
0.04464738070964813,
0.02872428484261036,
0.02308974228799343,
-0.023859960958361626,
0.042755965143442154,
-0.025529054924845695
] | 0.210629
|
```yaml ... securityContext: procMount: Unmasked ``` {{< note >}} Setting `procMount` to Unmasked requires the `spec.hostUsers` value in the pod spec to be `false`. In other words: a container that wishes to have an Unmasked `/proc` or unmasked `/sys` must also be in a [user namespace](/docs/concepts/workloads/pods/user-namespaces/). Kubernetes v1.12 to v1.29 did not enforce that requirement. {{< /note >}} ## Discussion The security context for a Pod applies to the Pod's Containers and also to the Pod's Volumes when applicable. Specifically `fsGroup` and `seLinuxOptions` are applied to Volumes as follows: \* `fsGroup`: Volumes that support ownership management are modified to be owned and writable by the GID specified in `fsGroup`. See the [Ownership Management design document](https://git.k8s.io/design-proposals-archive/storage/volume-ownership-management.md) for more details. \* `seLinuxOptions`: Volumes that support SELinux labeling are relabeled to be accessible by the label specified under `seLinuxOptions`. Usually you only need to set the `level` section. This sets the [Multi-Category Security (MCS)](https://selinuxproject.org/page/NB\_MLS) label given to all Containers in the Pod as well as the Volumes. {{< warning >}} After you specify an MCS label for a Pod, all Pods with the same label can access the Volume. If you need inter-Pod protection, you must assign a unique MCS label to each Pod. {{< /warning >}} ## Clean up Delete the Pod: ```shell kubectl delete pod security-context-demo kubectl delete pod security-context-demo-2 kubectl delete pod security-context-demo-3 kubectl delete pod security-context-demo-4 ``` ## {{% heading "whatsnext" %}} \* [PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core) \* [SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core) \* [CRI Plugin Config Guide](https://github.com/containerd/containerd/blob/main/docs/cri/config.md) \* [Security Contexts design document](https://git.k8s.io/design-proposals-archive/auth/security\_context.md) \* [Ownership Management design document](https://git.k8s.io/design-proposals-archive/storage/volume-ownership-management.md) \* [PodSecurity Admission](/docs/concepts/security/pod-security-admission/) \* [AllowPrivilegeEscalation design document](https://git.k8s.io/design-proposals-archive/auth/no-new-privs.md) \* For more information about security mechanisms in Linux, see [Overview of Linux Kernel Security Features](https://www.linux.com/learn/overview-linux-kernel-security-features) (Note: Some information is out of date) \* Read about [User Namespaces](/docs/concepts/workloads/pods/user-namespaces/) for Linux pods. \* [Masked Paths in the OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/f66aad47309/config-linux.md#masked-paths)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/security-context.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/security-context.md
|
[
0.014590120874345303,
0.020522484555840492,
0.0059829941019415855,
-0.007229677867144346,
0.047310877591371536,
-0.014800054021179676,
0.060596223920583725,
0.01268753781914711,
0.05876404419541359,
0.05254971235990524,
0.04261646419763565,
-0.03376559540629387,
0.014117161743342876,
0.024083316326141357,
0.041101545095443726,
-0.044751401990652084,
0.02036278136074543,
0.02983573079109192,
0.02073746919631958,
0.001734312390908599,
0.05178293585777283,
0.021522287279367447,
0.05462075024843216,
0.003932852763682604,
-0.02294466830790043,
-0.06343306601047516,
-0.06663528829813004,
0.057139649987220764,
0.031477004289627075,
-0.016546478495001793,
-0.018407121300697327,
-0.023530395701527596,
0.04539432004094124,
0.038399022072553635,
0.08733538538217545,
0.052342817187309265,
0.023962972685694695,
-0.11100060492753983,
-0.09484454989433289,
0.01781991682946682,
-0.0022144592367112637,
-0.013334773480892181,
-0.1285484880208969,
0.0016323017189279199,
-0.09795765578746796,
0.02210903912782669,
0.0015716985799372196,
-0.037117812782526016,
-0.053108468651771545,
0.009388836100697517,
0.05938201770186424,
-0.045584604144096375,
0.0807899758219719,
0.06263136863708496,
0.034190159291028976,
0.015169855207204819,
-0.04529082030057907,
0.00548498285934329,
0.0999152809381485,
0.02680784836411476,
0.024765342473983765,
-0.010761618614196777,
-0.004315256141126156,
-0.049103714525699615,
0.07806914299726486,
-0.01874224841594696,
-0.00029833303415216506,
0.01209600642323494,
-0.03481787443161011,
0.0605253241956234,
0.1279377043247223,
-0.008875630795955658,
0.02350553870201111,
-0.026294050738215446,
-0.0023737649898976088,
0.029681337997317314,
-0.09303420037031174,
0.020898962393403053,
-0.008884607814252377,
-0.07791047543287277,
0.03197457268834114,
0.07235518842935562,
0.07896088808774948,
-0.07940106093883514,
-0.09011411666870117,
0.007003386039286852,
-0.03933163732290268,
-0.012197988107800484,
0.014806047081947327,
0.04039919376373291,
0.04443282261490822,
-0.06749604642391205,
0.04795810952782631,
-0.054325927048921585,
0.07226963341236115,
-0.05735458806157112,
-0.021282069385051727,
0.051707737147808075,
-0.03115534782409668,
0.006230143364518881,
-0.03150228038430214,
-0.021360168233513832,
-0.02690434455871582,
-0.04813353344798088,
0.06350547075271606,
0.005913915578275919,
-0.05230122432112694,
0.0022778611164540052,
0.000976715236902237,
0.04821823909878731,
0.0191146619617939,
0.036655813455581665,
-0.04685933142900467,
0.027473101392388344,
-0.011883312836289406,
0.0006477251881733537,
-0.04329758509993553,
0.04394559562206268,
0.02720070257782936,
0.029068564996123314,
0.03873436897993088,
-0.06552563607692719,
0.03506726026535034,
0.03531305119395256,
-0.0763494223356247,
0.051022715866565704,
-0.0728035494685173,
8.186963668462063e-34,
0.032088909298181534,
-0.0526154488325119,
-0.03402898833155632,
0.017222745344042778,
0.054028816521167755,
-0.053243886679410934,
-0.003101699985563755,
0.009344938211143017,
-0.047216784209012985,
0.021473707631230354,
-0.019586890935897827,
0.07018441706895828,
-0.019162926822900772,
-0.05288736894726753,
0.04222431778907776,
0.026218947023153305,
-0.0378812775015831,
0.02932221256196499,
0.09296001493930817,
-0.022371960803866386,
0.06239532679319382,
-0.016766443848609924,
-0.012643502093851566,
-0.008900237269699574,
0.004061663988977671,
-0.0029452135786414146,
-0.023582538589835167,
-0.1107817068696022,
0.037885524332523346,
0.05511420965194702,
-0.07106397300958633,
-0.00013430170656647533,
0.08418238908052444,
0.04321015253663063,
-0.06815081834793091,
-0.005811454262584448,
-0.004049553535878658,
-0.005864131264388561,
-0.12212160229682922,
-0.0567912682890892,
0.054338496178388596,
-0.051535576581954956,
-0.010829255916178226,
-0.0516807995736599,
0.019318969920277596,
-0.0720226988196373,
0.055923111736774445,
-0.020083095878362656,
0.05129455029964447,
0.08696389943361282,
-0.020087027922272682,
-0.02912302315235138,
0.010199322365224361,
-0.09087258577346802,
0.05140463635325432,
-0.05530361086130142,
0.025242406874895096,
-0.035265978425741196,
-0.038614917546510696,
-0.03367495909333229,
-0.06994706392288208,
0.02179035358130932,
0.04661857336759567,
-0.014224253594875336,
-0.035867854952812195,
0.057064130902290344,
-0.023284366354346275,
0.03957241028547287,
-0.036531638354063034,
0.01550688873976469,
-0.11905993521213531,
0.0848037451505661,
-0.07629062235355377,
0.05476774275302887,
-0.1107545718550682,
-0.06430618464946747,
0.033693745732307434,
0.016694743186235428,
-0.0670803114771843,
0.03494047373533249,
-0.013609291054308414,
0.021564459428191185,
-0.06660573929548264,
0.11252770572900772,
-0.09218256920576096,
-0.002281301887705922,
0.013019773177802563,
0.0624941885471344,
-0.05362595617771149,
0.048994097858667374,
0.09555701911449432,
-0.029948765411973,
-0.03889787197113037,
0.018548235297203064,
-0.1333104372024536,
-3.429921701676581e-33,
0.029770977795124054,
-0.03600842133164406,
-0.051249533891677856,
-0.021789755672216415,
-0.0007996971835382283,
0.0025331261567771435,
0.053048353642225266,
0.031930431723594666,
-0.01189202070236206,
-0.07281836122274399,
-0.05055278539657593,
-0.03989937901496887,
0.03749703988432884,
0.009939507581293583,
-0.05799933522939682,
-0.003020973177626729,
-0.1317247599363327,
-0.03756725788116455,
-0.04254872351884842,
0.025903664529323578,
0.0026144490111619234,
0.0532655268907547,
0.06908802688121796,
0.08176982402801514,
0.0018083418253809214,
-0.009492375887930393,
0.016377922147512436,
0.014968057163059711,
-0.039003051817417145,
-0.014332257211208344,
0.0717720314860344,
-0.07329659909009933,
-0.06042853742837906,
-0.03171268105506897,
-0.05476316437125206,
-0.07948076725006104,
-0.0679917111992836,
0.052546773105859756,
-0.004847151692956686,
-0.02429479919373989,
0.0173149686306715,
0.08391468226909637,
-0.03993098810315132,
0.014527427032589912,
-0.09652138501405716,
0.02476641535758972,
0.0722784548997879,
-0.0737578272819519,
0.06783302873373032,
-0.07972412556409836,
-0.009348955005407333,
0.0012409063056111336,
-0.02083153836429119,
0.03362474963068962,
-0.08273439109325409,
0.004510775674134493,
0.008152604103088379,
0.032531388103961945,
0.008239669725298882,
0.03171311691403389,
0.08315262943506241,
-0.04295725375413895,
0.015902388840913773,
0.03946123644709587,
0.0038667782209813595,
-0.07994087040424347,
-0.01406195666640997,
0.0611615926027298,
0.0440182164311409,
0.02652331069111824,
0.06186385452747345,
-0.09461869299411774,
0.006100310944020748,
0.0037913101259618998,
0.004616471938788891,
-0.043538372963666916,
0.01641162857413292,
-0.04064556583762169,
0.014511737041175365,
-0.0010757402051240206,
-0.024695081636309624,
0.0707407221198082,
-0.10672473162412643,
0.051144763827323914,
0.09676522016525269,
-0.007563202641904354,
0.0875701904296875,
0.07967546582221985,
-0.00032584165455773473,
0.08073251694440842,
0.03614585101604462,
-0.0029336465522646904,
-0.020282641053199768,
0.11506765335798264,
-0.014131437055766582,
-4.844373791001999e-8,
0.037999533116817474,
0.024326534941792488,
-0.01994723454117775,
0.029860660433769226,
0.03180354833602905,
-0.04480249807238579,
0.033781468868255615,
-0.01112249493598938,
-0.056271158158779144,
0.012635501101613045,
-0.007811162155121565,
0.04379180073738098,
-0.08625907450914383,
-0.03937468305230141,
0.011363393627107143,
-0.04854867607355118,
-0.012809163890779018,
0.1042652428150177,
-0.031857192516326904,
-0.0832747146487236,
-0.10418660193681717,
-0.06255694478750229,
-0.05494336783885956,
0.005504969507455826,
-0.04456457868218422,
0.09185492247343063,
0.07192463427782059,
-0.016456814482808113,
0.06181744486093521,
0.04058033227920532,
-0.03241106495261192,
-0.004796150140464306,
-0.06465009599924088,
0.055491212755441666,
-0.025062978267669678,
0.08670750260353088,
-0.09289423376321793,
0.05241560563445091,
-0.02133236825466156,
0.028486255556344986,
-0.053759120404720306,
-0.04669769108295441,
-0.0309726782143116,
0.018534738570451736,
-0.11994178593158722,
0.048622291535139084,
-0.014224679209291935,
0.09039800614118576,
-0.02748044952750206,
0.06490200012922287,
0.011005803942680359,
-0.05406086519360542,
-0.07667486369609833,
0.14609870314598083,
-0.002146853832527995,
0.017314191907644272,
0.008346932008862495,
-0.00895778089761734,
-0.016467733308672905,
-0.007902574725449085,
0.05659211799502373,
0.003895001020282507,
0.0023858111817389727,
-0.01527619082480669
] | 0.15191
|
This page shows how to assign a Kubernetes Pod to a particular node in a Kubernetes cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Add a label to a node 1. List the {{< glossary\_tooltip term\_id="node" text="nodes" >}} in your cluster, along with their labels: ```shell kubectl get nodes --show-labels ``` The output is similar to this: ```shell NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` 1. Choose one of your nodes, and add a label to it: ```shell kubectl label nodes disktype=ssd ``` where `` is the name of your chosen node. 1. Verify that your chosen node has a `disktype=ssd` label: ```shell kubectl get nodes --show-labels ``` The output is similar to this: ```shell NAME STATUS ROLES AGE VERSION LABELS worker0 Ready 1d v1.13.0 ...,disktype=ssd,kubernetes.io/hostname=worker0 worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` In the preceding output, you can see that the `worker0` node has a `disktype=ssd` label. ## Create a pod that gets scheduled to your chosen node This pod configuration file describes a pod that has a node selector, `disktype: ssd`. This means that the pod will get scheduled on a node that has a `disktype=ssd` label. {{% code\_sample file="pods/pod-nginx.yaml" %}} 1. Use the configuration file to create a pod that will get scheduled on your chosen node: ```shell kubectl apply -f https://k8s.io/examples/pods/pod-nginx.yaml ``` 1. Verify that the pod is running on your chosen node: ```shell kubectl get pods --output=wide ``` The output is similar to this: ```shell NAME READY STATUS RESTARTS AGE IP NODE nginx 1/1 Running 0 13s 10.200.0.4 worker0 ``` ## Create a pod that gets scheduled to specific node You can also schedule a pod to one specific node via setting `nodeName`. {{% code\_sample file="pods/pod-nginx-specific-node.yaml" %}} Use the configuration file to create a pod that will get scheduled on `foo-node` only. ## {{% heading "whatsnext" %}} \* Learn more about [labels and selectors](/docs/concepts/overview/working-with-objects/labels/). \* Learn more about [nodes](/docs/concepts/architecture/nodes/).
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md
|
[
0.014747001230716705,
0.022764001041650772,
0.03204489126801491,
-0.003439858788624406,
-0.020049329847097397,
0.03853003680706024,
0.07212235033512115,
-0.07537488639354706,
0.02029726468026638,
0.027053017169237137,
-0.004854785744100809,
-0.13578520715236664,
0.018383057788014412,
-0.04908117651939392,
-0.003851125715300441,
-0.009319049306213856,
0.026356251910328865,
-0.05260603874921799,
0.03396129980683327,
-0.13438208401203156,
0.0232890322804451,
0.06744255125522614,
0.0699806660413742,
-0.009130480699241161,
-0.014659791253507137,
0.013185407966375351,
-0.06199070066213608,
0.024005310609936714,
0.043431930243968964,
0.014024128206074238,
-0.02146964892745018,
0.070346899330616,
-0.023207006976008415,
0.09207289665937424,
0.06579717993736267,
0.07112543284893036,
-0.024253804236650467,
0.022667041048407555,
-0.02742893621325493,
0.03703815117478371,
0.07955754548311234,
0.00746516790241003,
-0.07160511612892151,
-0.06429032981395721,
-0.029961461201310158,
0.015361285768449306,
-0.07027585059404373,
-0.03856431320309639,
-0.006868790835142136,
0.0451783612370491,
0.013029688969254494,
-0.15939852595329285,
0.03414158523082733,
0.0027229904662817717,
0.051592569798231125,
0.06351248174905777,
-0.01964803971350193,
-0.028782367706298828,
0.07547160238027573,
-0.006034909747540951,
0.0030369379092007875,
-0.02437729388475418,
0.030138034373521805,
-0.0462263859808445,
0.035068612545728683,
-0.0007457852480001748,
0.030016327276825905,
-0.00394414272159338,
-0.06522881239652634,
-0.02469613403081894,
0.045544788241386414,
-0.023791708052158356,
0.0582984983921051,
-0.04751911759376526,
-0.033599648624658585,
0.038083989173173904,
-0.03543475270271301,
0.08700252324342728,
-0.02698584832251072,
-0.11012008786201477,
-0.021893411874771118,
0.09568018466234207,
0.07131737470626831,
0.07857881486415863,
-0.08178751915693283,
-0.021079694852232933,
0.010833444073796272,
-0.03947051241993904,
0.00373372551985085,
-0.023319825530052185,
-0.024684185162186623,
-0.07920800149440765,
0.02999052405357361,
-0.12484586983919144,
0.042680252343416214,
0.028505807742476463,
0.004801083821803331,
0.014392929151654243,
0.03164928779006004,
-0.020517120137810707,
-0.0014737723395228386,
-0.08557891845703125,
0.018313093110919,
-0.0410442128777504,
-0.03967679664492607,
0.007960441522300243,
-0.121651291847229,
-0.03653598949313164,
0.016208795830607414,
0.02995271421968937,
0.005076633766293526,
0.07606346160173416,
-0.03591257333755493,
0.03141998499631882,
-0.021983124315738678,
-0.08074008673429489,
0.059862762689590454,
-0.0263143889605999,
0.04111449047923088,
0.031780511140823364,
0.024967513978481293,
-0.07002951204776764,
-0.02487962692975998,
0.024341408163309097,
-0.0532834492623806,
0.014365226961672306,
-0.04208358749747276,
3.1187775305635374e-33,
0.1213652566075325,
-0.07279859483242035,
0.006005018018186092,
-0.035533357411623,
-0.00535937724635005,
-0.04627663642168045,
-0.06737076491117477,
-0.03107183426618576,
-0.05662532523274422,
-0.010338891297578812,
-0.03289616107940674,
0.07944072037935257,
-0.001557443873025477,
-0.034908708184957504,
-0.051825493574142456,
-0.006341221276670694,
-0.007682417053729296,
0.0866432785987854,
0.008583134040236473,
-0.02727433107793331,
0.0017114185029640794,
-0.026855885982513428,
-0.04838943108916283,
-0.044137630611658096,
0.08032044768333435,
-0.005731722805649042,
-0.00830987747758627,
-0.11143442243337631,
0.023737415671348572,
-0.009515316225588322,
-0.012936924584209919,
-0.036173127591609955,
0.062368813902139664,
-0.010233738459646702,
-0.1659660041332245,
-0.0017350626876577735,
0.005159998312592506,
-0.005821717903017998,
-0.015073636546730995,
-0.0777994692325592,
0.04345755651593208,
0.0019288168987259269,
0.05653331056237221,
-0.0435507670044899,
0.06489476561546326,
0.03724556788802147,
-0.005851270630955696,
-0.09354571998119354,
0.07916858792304993,
0.0048224362544715405,
-0.009190844371914864,
-0.10836518555879593,
0.027620241045951843,
-0.013546180911362171,
0.027126705273985863,
0.10062721371650696,
0.05976109951734543,
-0.009947149083018303,
-0.03913113847374916,
-0.0036543230526149273,
-0.06528676301240921,
0.03351873531937599,
-0.04857053607702255,
0.006142656318843365,
0.07038572430610657,
0.030632570385932922,
0.006339977495372295,
0.07544144243001938,
0.0482342503964901,
0.0247183870524168,
-0.08997569233179092,
0.012347066774964333,
0.0037646021228283644,
0.07534558326005936,
0.01783827692270279,
-0.016097253188490868,
-0.04279985651373863,
-0.05113308131694794,
-0.079229436814785,
0.03757547587156296,
-0.019969765096902847,
-0.09002937376499176,
-0.05405484512448311,
0.05585438758134842,
0.08821465820074081,
-0.05351238697767258,
0.0024235479068011045,
-0.02447734959423542,
-0.041003599762916565,
0.02500711753964424,
-0.025231776759028435,
-0.039732709527015686,
-0.11357636749744415,
0.027915123850107193,
-0.10820728540420532,
-5.929128853358323e-33,
0.07891451567411423,
0.03356507793068886,
0.04201207682490349,
0.016817359253764153,
0.04938286542892456,
-0.009480570442974567,
0.014939266256988049,
0.026817569509148598,
-0.014509044587612152,
-0.01663244143128395,
-0.04447571933269501,
-0.012281534262001514,
0.000700581818819046,
0.0694180354475975,
-0.05452490225434303,
0.02269439958035946,
-0.12829607725143433,
0.04286722093820572,
0.0008160799625329673,
0.02304457500576973,
-0.03597664460539818,
0.011913444846868515,
0.04814598336815834,
0.03952490910887718,
0.02222438156604767,
-0.04716447368264198,
0.0921967402100563,
0.030739668756723404,
-0.0322919525206089,
-0.031246960163116455,
-0.01762600615620613,
-0.045442890375852585,
-0.01951049081981182,
-0.013994515873491764,
0.0376584529876709,
-0.09499219059944153,
0.0018164287321269512,
-0.041761089116334915,
-0.038058385252952576,
0.049773652106523514,
0.050949398428201675,
0.009852688759565353,
-0.08166032284498215,
-0.0799158439040184,
-0.05047919973731041,
0.007720543071627617,
0.04875959828495979,
-0.013045050203800201,
-0.03901587054133415,
-0.0783611536026001,
0.02002057060599327,
-0.02874469943344593,
-0.0280389916151762,
0.06977804005146027,
-0.07435300201177597,
-0.0044105164706707,
0.01574145257472992,
-0.018806885927915573,
-0.02703423611819744,
-0.02850075252354145,
0.04005284607410431,
-0.08853430300951004,
0.07912891358137131,
0.031039869412779808,
0.018820777535438538,
-0.10753042995929718,
-0.008271975442767143,
-0.011672726832330227,
-0.026765557006001472,
-0.01018442027270794,
0.016852272674441338,
-0.004613449797034264,
0.05136287212371826,
-0.02071293443441391,
0.02675221674144268,
-0.005579913966357708,
0.011467091739177704,
-0.033072974532842636,
0.02591506764292717,
-0.04958408325910568,
-0.008190843276679516,
0.07404615730047226,
-0.030408164486289024,
0.08716379851102829,
0.026814930140972137,
0.05615976080298424,
0.09447669982910156,
0.15534496307373047,
0.03569811210036278,
0.05021258071064949,
-0.021885717287659645,
-0.001105707953684032,
-0.003154448699206114,
0.11988074332475662,
-0.08379680663347244,
-5.529069468934722e-8,
-0.004462257027626038,
0.11528679728507996,
-0.07440239191055298,
0.02797165885567665,
0.002551394049078226,
0.03250248730182648,
0.008825290016829967,
0.006172912195324898,
-0.03597988188266754,
-0.004050936084240675,
-0.0015657128533348441,
0.05098652094602585,
-0.047538939863443375,
0.005908613093197346,
0.05059923604130745,
0.030705904588103294,
-0.03925083950161934,
0.025979511439800262,
0.04772496223449707,
-0.0180991031229496,
0.007644700817763805,
-0.017219113186001778,
0.017485570162534714,
0.048961736261844635,
-0.052287742495536804,
-0.01259048655629158,
0.018786229193210602,
0.02884824201464653,
-0.009345355443656445,
0.032710179686546326,
-0.014721653424203396,
-0.0019025898072868586,
-0.10354180634021759,
0.09398559480905533,
0.05221172422170639,
-0.031287938356399536,
-0.12481944262981415,
0.04887464642524719,
0.12748730182647705,
0.10090667754411697,
-0.016489658504724503,
0.03297305852174759,
-0.13936872780323029,
-0.000003853389443975175,
0.019171182066202164,
0.050514884293079376,
0.003966658376157284,
0.03378436714410782,
-0.00488416338339448,
-0.03309981897473335,
-0.06339684128761292,
-0.04711005464196205,
-0.005492195021361113,
0.03429337590932846,
-0.04564577341079712,
0.003838502336293459,
0.0061505637131631374,
0.012095638550817966,
0.020454609766602516,
-0.004865781404078007,
0.014026248827576637,
0.006678140256553888,
0.04238505661487579,
0.03944825381040573
] | 0.09019
|
{{< feature-state feature\_gate\_name="InPlacePodLevelResourcesVerticalScaling" >}} This page explains how to change the CPU and memory resources set at the Pod level without recreating the Pod. The In-place Pod Resize feature allows modifying resource allocations for a running Pod, avoiding application disruption. The process for resizing individual container resources is covered in [Resize CPU and Memory Resources assigned to Containers](/docs/tasks/configure-pod-container/resize-container-resources). This page highlights In-place Pod-level resources resize. Pod-level resources are defined in `spec.resources` and they act as the upper bound on the aggregate resources consumed by all containers in the Pod. The In-place Pod-level resources resize feature lets you change these aggregate CPU and memory allocations for a running Pod directly. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} The following [feature gates](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled for your control plane and for all nodes in your cluster: \* [`InPlacePodLevelResourcesVerticalScaling`](/docs/reference/command-line-tools-reference/feature-gates/#InPlacePodLevelResourcesVerticalScaling) \* [`PodLevelResources`](/docs/reference/command-line-tools-reference/feature-gates/#PodLevelResources) \* [`InPlacePodVerticalScaling`](/docs/reference/command-line-tools-reference/feature-gates/#InPlacePodVerticalScaling) \* [`NodeDeclaredFeatures`](/docs/reference/command-line-tools-reference/feature-gates/#NodeDeclaredFeatures) The kubectl client version must be at least v1.32 to use the `--subresource=resize` flag. ## Pod Resize Status and Retry Logic The mechanism the `kubelet` uses to track and retry resource changes is shared between container-level and Pod-level resize requests. The statuses, reasons, and retry priorities are identical to those defined for container resize: \* Status Conditions: The `kubelet` uses PodResizePending (with reasons like Infeasible or Deferred) and PodResizeInProgress to communicate the state of the request. \* Retry Priority: Deferred resizes are retried based on PriorityClass, then QoS class (Guaranteed over Burstable), and finally by the duration they have been deferred. \* Tracking: You can use the `observedGeneration` fields to track which Pod specification (metadata.generation) corresponds to the status of the latest processed resize request. For a full description of these conditions and retry logic, please refer to the [Pod resize status](/docs/tasks/configure-pod-container/resize-container-resources/#pod-resize-status) section in the container resize documentation. ## Container Resize Policy and Pod-Level Resize Pod-level resource resize does not support or require its own restart policy. \* No Pod-Level Policy: Changes to the Pod's aggregate resources (spec.resources) are always applied in-place without triggering a restart. This is because Pod-level resources act as an overall constraint on the Pod's cgroup and do not directly manage the application runtime within containers. \* [Container Policy](/docs/tasks/configure-pod-container/resize-container-resources/#container-resize-policies) Still Governs: The resizePolicy must still be configured at the container level (spec.containers[\*].resizePolicy). This policy governs whether an individual container is restarted when its resource requests or limits change, regardless of whether that change was initiated by a direct container-level resize or by an update to the overall Pod-level resource envelope. ## Limitations For Kubernetes {{< skew currentVersion >}}, resizing Pod-level resources in-place is subject to all the limitations described for container-level resource resize, which you can find here: (Resize CPU and Memory Resources assigned to Containers: Limitations)[docs/tasks/configure-pod-container/resize-container-resources/#limitations]. Additionally, the following constraint is specific to Pod-level resource resize: \* Container Requests Validation: A resize is only permitted if the resulting Pod-level resource requests (spec.resources.requests) are greater than or equal to the sum of the corresponding resource requests from all individual containers within the Pod. This maintains the minimum guaranteed resource availability for the Pod. \* Container Limits Validation: A resize is permitted if individual container limits are less than or equal to the Pod-level resource limits (spec.resources.limits). The Pod-level limit serves as a boundary that no single container may exceed, but the sum of container limits is permitted to exceed the Pod-level limit, enabling resource sharing across containers within the Pod. ## Example: Resizing Pod-Level Resources First, create a Pod designed for in-place CPU resize and restart-required memory resize. {{% code\_sample file="pods/resource/pod-level-resize.yaml" %}} Create the pod: ```shell kubectl create -f pod-level-resize.yaml ``` This pod starts in the Guaranteed QoS class
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-pod-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-pod-resources.md
|
[
0.060592591762542725,
0.06032915413379669,
-0.002244088565930724,
0.09842928498983383,
0.017291678115725517,
-0.05267347767949104,
-0.0017111914930865169,
0.04307490214705467,
-0.060604553669691086,
0.030374830588698387,
-0.04357121139764786,
0.04247036203742027,
-0.05058160051703453,
-0.044659096747636795,
0.01252781879156828,
-0.004797208122909069,
0.06510286033153534,
0.07479292154312134,
-0.05404017120599747,
-0.0416770838201046,
0.1029968187212944,
-0.05040425434708595,
0.020374979823827744,
0.011500743217766285,
0.006687600165605545,
0.0062958537600934505,
-0.08210587501525879,
-0.03501701354980469,
0.025429880246520042,
-0.03478899970650673,
-0.03477204591035843,
0.033744294196367264,
0.06032023951411247,
0.01377086155116558,
0.08660566806793213,
0.11637680977582932,
0.014811927452683449,
-0.10391160100698471,
-0.021485693752765656,
-0.02969687432050705,
-0.025082947686314583,
-0.003992228768765926,
-0.09792853146791458,
0.02669866569340229,
-0.036565352231264114,
0.04274418577551842,
-0.026067271828651428,
-0.034968502819538116,
-0.040759194642305374,
-0.046285368502140045,
0.03491950407624245,
-0.03900367394089699,
0.03923629969358444,
0.032052066177129745,
0.042498596012592316,
0.037585821002721786,
0.06891734898090363,
0.02312481589615345,
0.03861311078071594,
0.04224763065576553,
0.00828426331281662,
-0.02952650748193264,
0.019319212064146996,
-0.030570417642593384,
0.049004651606082916,
-0.045121900737285614,
0.040192823857069016,
0.005528036970645189,
0.0030272093135863543,
-0.01695089600980282,
0.058273766189813614,
-0.01602548360824585,
0.016409320756793022,
-0.06423455476760864,
-0.008968967944383621,
-0.01398097351193428,
-0.018177397549152374,
0.0528312548995018,
0.014964590780436993,
0.011414614506065845,
-0.004959746729582548,
0.06848804652690887,
0.041513245552778244,
-0.09628833830356598,
-0.013061679899692535,
0.02084687352180481,
0.030127715319395065,
-0.058868296444416046,
0.01943734847009182,
-0.015418893657624722,
0.03640228882431984,
-0.05124245211482048,
0.005116361193358898,
-0.0601467527449131,
0.055214546620845795,
-0.03692030906677246,
-0.07609417289495468,
-0.07919030636548996,
-0.008152434602379799,
-0.011511918157339096,
0.08094808459281921,
0.031917888671159744,
0.0947195291519165,
0.004798355512320995,
0.05973278731107712,
-0.03642164170742035,
-0.03871293365955353,
0.05951210483908653,
-0.015284653753042221,
0.04889737814664841,
0.06294047832489014,
0.03531418368220329,
0.03508910536766052,
0.05805588886141777,
0.017153996974229813,
0.016328886151313782,
-0.008335414342582226,
-0.005922882352024317,
0.024254966527223587,
0.05490846186876297,
0.04273510351777077,
-0.05875951796770096,
0.0143222501501441,
-0.017136123031377792,
-0.02621624246239662,
-0.00029278427246026695,
-0.10164420306682587,
4.814156665898044e-33,
-0.015387431718409061,
-0.08491113781929016,
-0.027196640148758888,
-0.018613310530781746,
0.04289664328098297,
-0.022794509306550026,
-0.004763687960803509,
0.05026860162615776,
-0.03196931630373001,
-0.005817788187414408,
-0.008194584399461746,
0.06663541495800018,
-0.031501561403274536,
0.025126848369836807,
-0.007077441085129976,
-0.12149403244256973,
-0.0644301027059555,
0.1024334579706192,
0.10238548368215561,
-0.04864000901579857,
0.0033615471329540014,
-0.007177016697824001,
-0.08523470908403397,
0.0054369703866541386,
0.07573585957288742,
-0.02271294966340065,
-0.01459686178714037,
-0.11561484634876251,
-0.0848434567451477,
0.02152995392680168,
-0.04133346304297447,
-0.0007409468526020646,
-0.033316172659397125,
0.029204796999692917,
-0.08286748081445694,
-0.05636821314692497,
0.023585647344589233,
-0.011950618587434292,
-0.03889351710677147,
-0.016658106818795204,
0.06310111284255981,
0.013849951326847076,
0.020372794941067696,
-0.0726994201540947,
-0.047660425305366516,
-0.04039554297924042,
0.08983274549245834,
-0.04082886502146721,
-0.022053362801671028,
0.016837000846862793,
0.006176694296300411,
-0.026105519384145737,
0.01678009331226349,
-0.06462587416172028,
0.03213530778884888,
-0.07846121490001678,
0.05244787782430649,
0.003659665584564209,
0.056264281272888184,
0.012829422019422054,
-0.05940237641334534,
-0.032163623720407486,
-0.013620864599943161,
0.04690323397517204,
0.0447322279214859,
0.04336267337203026,
-0.01019372884184122,
0.04371633753180504,
0.00491230096668005,
0.09890875220298767,
-0.09882716834545135,
0.003738181432709098,
0.03524831682443619,
0.08758607506752014,
-0.09663929045200348,
-0.0643109381198883,
0.04154446721076965,
0.005360548384487629,
-0.1859411746263504,
0.007972881197929382,
0.00021312551689334214,
0.08753378689289093,
-0.011106802150607109,
0.04170805588364601,
-0.04179081693291664,
-0.10462995618581772,
0.011869191192090511,
0.011490711942315102,
-0.01786075532436371,
-0.0035736793652176857,
0.025967605412006378,
-0.05624983459711075,
-0.026897603645920753,
-0.0322144478559494,
-0.10677707195281982,
-4.5050435286180305e-33,
0.05950406566262245,
-0.034973546862602234,
-0.03395615145564079,
0.010473273694515228,
-0.03244395554065704,
-0.005709876772016287,
0.036747660487890244,
0.023587221279740334,
-0.028226660564541817,
-0.13591566681861877,
-0.12249736487865448,
-0.05120760574936867,
0.024771586060523987,
0.011414892971515656,
-0.09500562399625778,
0.04475846886634827,
-0.1345990002155304,
-0.04219304397702217,
0.005717901512980461,
0.046939000487327576,
-0.03221200406551361,
0.01925201714038849,
0.12895633280277252,
0.054890867322683334,
0.00918920524418354,
-0.05171436816453934,
0.042794398963451385,
-0.008844024501740932,
0.026420963928103447,
-0.06007711961865425,
0.023747889325022697,
-0.10535027831792831,
-0.032251305878162384,
0.05490909516811371,
-0.022373441606760025,
-0.05468690022826195,
-0.060039740055799484,
0.027657201513648033,
0.009438421577215195,
0.07914319634437561,
0.12510399520397186,
-0.01720891147851944,
-0.0386897511780262,
-0.02384210377931595,
-0.01695961132645607,
0.02026287280023098,
-0.0009325188002549112,
-0.04754249006509781,
-0.01469484157860279,
-0.13294728100299835,
0.019346019253134727,
-0.020398491993546486,
-0.04817605018615723,
0.06524668633937836,
-0.009130117483437061,
0.010942326858639717,
0.07681109756231308,
0.034092143177986145,
0.008501304313540459,
-0.030927738174796104,
0.06815409660339355,
-0.07129105925559998,
0.021108290180563927,
-0.05326461046934128,
-0.012965158559381962,
-0.028370680287480354,
-0.007074764929711819,
0.004768766462802887,
-0.04767518863081932,
0.042567674070596695,
0.031674038618803024,
-0.005055741406977177,
0.06918707489967346,
0.05045720934867859,
-0.07139717787504196,
-0.013976691290736198,
0.024944962933659554,
-0.06046415865421295,
0.07454296201467514,
-0.011382041499018669,
-0.09294722229242325,
0.07663615792989731,
-0.03850644826889038,
0.012888865545392036,
0.026794932782649994,
0.07340611517429352,
0.03473956882953644,
0.11066823452711105,
-0.010909244418144226,
0.03038344904780388,
-0.023830650374293327,
-0.006749202497303486,
-0.01854785531759262,
0.08955761045217514,
-0.017712896689772606,
-4.89964477878857e-8,
0.06900843232870102,
0.013210705481469631,
0.03138250485062599,
0.09305872768163681,
0.03694477304816246,
-0.06295844912528992,
0.06804829835891724,
0.09491987526416779,
-0.0011477053631097078,
0.0768660232424736,
0.011240122839808464,
0.019619334489107132,
-0.030210142955183983,
-0.0030012535862624645,
0.09549403935670853,
0.03438105434179306,
-0.01340708788484335,
0.08027172088623047,
-0.0077721294946968555,
-0.10956019163131714,
-0.029443936422467232,
-0.01462997030466795,
0.014564553275704384,
0.030050363391637802,
0.046848759055137634,
0.010039318352937698,
0.06961054354906082,
0.06878067553043365,
0.03166067600250244,
-0.02832133136689663,
-0.023051561787724495,
0.012715952470898628,
-0.019129976630210876,
0.05778644606471062,
0.05713590979576111,
0.005622062832117081,
-0.10529174655675888,
0.07423736900091171,
0.004520774353295565,
0.006665815599262714,
-0.03183905780315399,
-0.055705249309539795,
-0.02722613327205181,
0.013584288768470287,
-0.029508255422115326,
0.040472012013196945,
-0.08538950979709625,
0.09331216663122177,
0.003111121943220496,
0.027649980038404465,
0.023364605382084846,
0.01954253576695919,
-0.012692893855273724,
0.07102755457162857,
0.02812858484685421,
0.06470367312431335,
-0.03395616635680199,
-0.016781000420451164,
-0.018144991248846054,
0.01928677409887314,
0.030526120215654373,
0.04560314863920212,
-0.026612957939505577,
-0.05618617311120033
] | 0.170631
|
the Pod-level limit, enabling resource sharing across containers within the Pod. ## Example: Resizing Pod-Level Resources First, create a Pod designed for in-place CPU resize and restart-required memory resize. {{% code\_sample file="pods/resource/pod-level-resize.yaml" %}} Create the pod: ```shell kubectl create -f pod-level-resize.yaml ``` This pod starts in the Guaranteed QoS class as pod-level requests are equal to limits. Verify its initial state: ```shell # Wait a moment for the pod to be running kubectl get pod pod-level-resize-demo --output=yaml ``` Observe the `spec.resources`(200m CPU, 200Mi memory). Note the `status.containerStatuses[0].restartCount` (should be 0) and `status.containerStatuses[1].restartCount` (should be 0). Now, increase the pod-level CPU request and limit to `300m`. You use `kubectl patch` with the `--subresource resize` command line argument. ```shell kubectl patch pod resize-demo --subresource resize --patch \ '{"spec":{"resources":{"requests":{"cpu":"300m"}, "limits":{"cpu":"300m"}}}}' # Alternative methods: # kubectl -n qos-example edit pod resize-demo --subresource resize # kubectl -n qos-example apply -f --subresource resize --server-side ``` {{< note >}} The `--subresource resize` command line argument requires `kubectl` client version v1.32.0 or later. Older versions will report an `invalid subresource` error. {{< /note >}} Check the pod status again after patching: ```shell kubectl get pod pod-level-resize-demo --output=yaml ``` You should see: \* `spec.resources.requests` and `spec.resources.limits` now show `cpu: 300m`. \* `status.containerStatuses[0].restartCount` remains `0`, because the CPU `resizePolicy` was `NotRequired`. \* `status.containerStatuses[1].restartCount` increased to `1` indicating the container was restarted to apply the CPU change. The restart occurred in Container 1 despite the resize being applied at the Pod level, due to the intricate relationship between Pod-level limits and container-level policies. Because Container 1 did not specify an explicit CPU limit, its underlying resource configuration (For example, cgroups) implicitly adopted the Pod's overall CPU limit as its effective maximum consumption boundary. When the Pod-level CPU limit was patched from 200m to 300m, this action consequently changed the implicit limit enforced on Container 1. Since Container 1 had its resizePolicy explicitly set to RestartContainer for CPU, the `kubelet` was obligated to restart the container to correctly apply this change in the underlying resource enforcement mechanism, thus confirming that altering Pod-level limits can trigger container restart policies even when container limits are not directly defined. ## Clean up Delete the pod: ```shell kubectl pod-level-resize-demo ``` ## {{% heading "whatsnext" %}} ### For application developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) \* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/resize-pod-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/resize-pod-resources.md
|
[
0.0516415610909462,
0.019698644056916237,
-0.002592402743175626,
0.028970694169402122,
-0.03120020218193531,
-0.06403800845146179,
-0.027354706078767776,
0.03751630708575249,
0.00622031232342124,
0.06415550410747528,
-0.031094837933778763,
-0.011476538144052029,
-0.020664656534790993,
-0.020401181653141975,
0.019750239327549934,
0.0005130667705088854,
0.0694349929690361,
0.07964072376489639,
-0.07628557831048965,
-0.0481988750398159,
0.09175469726324081,
-0.003769990522414446,
0.032242901623249054,
-0.009989699348807335,
-0.008162211626768112,
-0.02237575314939022,
-0.07408055663108826,
-0.032073039561510086,
0.015751615166664124,
-0.06349381059408188,
-0.00550286378711462,
0.010130106471478939,
0.009379089809954166,
0.0032794405706226826,
0.1044219508767128,
0.11678853631019592,
-0.013272568583488464,
-0.11835905909538269,
-0.040350060909986496,
-0.011495707556605339,
-0.02362097054719925,
-0.016495641320943832,
-0.12330304831266403,
0.038777563720941544,
0.017233440652489662,
0.024658849462866783,
-0.019797585904598236,
-0.013245735317468643,
0.0338895246386528,
-0.09572353959083557,
-0.00576358288526535,
-0.05485943704843521,
0.06856520473957062,
0.043923329561948776,
0.05136190354824066,
0.01605265960097313,
0.011782815679907799,
0.03384599834680557,
0.06550471484661102,
0.04640338942408562,
-0.03646062687039375,
0.005168288014829159,
0.04797143116593361,
-0.030550651252269745,
0.031028825789690018,
-0.03250829875469208,
0.0035269190557301044,
0.016401046887040138,
-0.023880694061517715,
0.029741788282990456,
0.07405068725347519,
0.008330644108355045,
0.0072465273551642895,
-0.014964518137276173,
-0.008431012742221355,
-0.044587694108486176,
-0.037950094789266586,
0.07086506485939026,
-0.018793972209095955,
-0.011796077713370323,
0.0005556612159125507,
0.014830932021141052,
0.044435665011405945,
-0.0899728313088417,
-0.08271781355142593,
0.00961755495518446,
-0.0012990898685529828,
-0.003965100739151239,
-0.006122761406004429,
-0.010132614523172379,
0.06304566562175751,
0.01658240705728531,
-0.01929623633623123,
-0.05658968165516853,
0.055961973965168,
-0.04208148270845413,
-0.06668132543563843,
-0.06337323039770126,
0.017597312107682228,
-0.029844921082258224,
0.08993222564458847,
0.0394587367773056,
0.07586819678544998,
0.020515352487564087,
0.07630207389593124,
-0.01925116963684559,
-0.03474459424614906,
0.04120772331953049,
-0.0139315165579319,
0.04001437500119209,
0.020195817574858665,
0.02700437419116497,
-0.003698921762406826,
0.053695082664489746,
0.004893151577562094,
0.05603701248764992,
-0.004189810249954462,
0.009028474800288677,
-0.020532194525003433,
0.05416753888130188,
0.08995279669761658,
-0.053210824728012085,
-0.000749547325540334,
-0.019348500296473503,
-0.03654182329773903,
0.0367373563349247,
-0.05961839482188225,
3.0069406306843203e-33,
0.019496245309710503,
-0.06695578247308731,
0.007861535996198654,
-0.0002918985264841467,
0.03860066086053848,
-0.0538850873708725,
-0.001197226345539093,
0.037018220871686935,
-0.11485879868268967,
-0.028336340561509132,
-0.02127566561102867,
0.04563776031136513,
-0.03843362256884575,
0.006743890233337879,
0.017920376732945442,
-0.034581463783979416,
-0.06995698064565659,
0.07416827976703644,
0.05992347374558449,
0.008517147973179817,
0.03909745812416077,
-0.11261824518442154,
-0.05533658340573311,
0.045792896300554276,
-0.0062006255611777306,
-0.01101111713796854,
0.04853981360793114,
-0.08006937056779861,
-0.038288433104753494,
0.011052928864955902,
-0.05044401064515114,
-0.004949703346937895,
0.004470404703170061,
0.011292358860373497,
-0.12122419476509094,
-0.029845671728253365,
0.018644018098711967,
0.05362560227513313,
-0.10400558263063431,
-0.023045124486088753,
0.05609951913356781,
0.010008750483393669,
0.044663529843091965,
-0.07333821803331375,
0.021355973556637764,
-0.0378643274307251,
0.05353613197803497,
-0.028862325474619865,
-0.04648056998848915,
0.06654403358697891,
0.04046240448951721,
-0.025717899203300476,
0.0007079598144628108,
-0.04942772164940834,
0.07896819710731506,
-0.017776869237422943,
0.07000663876533508,
0.020608490332961082,
-0.019453778862953186,
0.02118154615163803,
-0.050604198127985,
-0.03770292550325394,
-0.012043649330735207,
0.06378675997257233,
0.02048490010201931,
0.055019281804561615,
-0.0437806136906147,
0.05699862912297249,
-0.016166318207979202,
0.12996016442775726,
-0.031226111575961113,
0.018704161047935486,
0.029674256220459938,
0.04318884015083313,
-0.05671023949980736,
-0.09615762531757355,
0.0412120521068573,
0.002272696467116475,
-0.16183745861053467,
0.01587345078587532,
0.017391256988048553,
0.01647062972187996,
-0.005699786823242903,
0.026397278532385826,
-0.020566223189234734,
-0.08727971464395523,
0.008768418803811073,
0.04911406338214874,
-0.050047386437654495,
0.05532347783446312,
0.004455143585801125,
-0.06119057908654213,
-0.007545950822532177,
-0.03106679767370224,
-0.11764966696500778,
-2.5541196355964358e-33,
0.11033101379871368,
-0.017600150778889656,
-0.015312502160668373,
0.02001175470650196,
0.014858867041766644,
-0.001158724189735949,
-0.01559145376086235,
0.08845433592796326,
-0.06136821582913399,
-0.11793137341737747,
-0.0928565263748169,
-0.061054203659296036,
0.07801900058984756,
0.030703412368893623,
-0.12820138037204742,
-0.023792818188667297,
-0.059048864990472794,
-0.059901151806116104,
0.010126296430826187,
0.048876095563173294,
-0.06168809533119202,
0.012286585755646229,
0.14288818836212158,
0.04350561276078224,
0.020518071949481964,
-0.004163517151027918,
-0.001963031478226185,
0.0247501153498888,
-0.012457496486604214,
-0.03163390979170799,
0.030311385169625282,
-0.16085441410541534,
-0.07202556729316711,
0.03321662172675133,
0.03641409054398537,
-0.029427463188767433,
-0.04022779315710068,
0.05952608957886696,
0.028256479650735855,
0.05170479044318199,
0.06570959836244583,
-0.020228492096066475,
-0.05511493980884552,
-0.054445356130599976,
-0.03731841593980789,
-0.01606770046055317,
-0.02905329130589962,
-0.09962084144353867,
-0.010070184245705605,
-0.11278103291988373,
0.039363835006952286,
0.023913666605949402,
-0.03844209760427475,
0.10935512185096741,
0.001904109725728631,
0.0004505060787778348,
-0.008549056947231293,
0.08230733871459961,
-0.051015663892030716,
-0.009872603230178356,
0.06543417274951935,
-0.09458285570144653,
-0.012106241658329964,
-0.006408794317394495,
0.018428215757012367,
-0.0582854188978672,
-0.015518085099756718,
0.05377526953816414,
-0.017418941482901573,
0.041096460074186325,
0.07118037343025208,
0.02508726716041565,
0.05595832318067551,
0.10617558658123016,
-0.0446818545460701,
-0.014825322665274143,
-0.027292616665363312,
-0.05628083646297455,
0.08948658406734467,
0.02724345028400421,
-0.08095733076334,
0.09063760936260223,
-0.03663438558578491,
0.017954109236598015,
0.028563885018229485,
0.0764484703540802,
0.03555452823638916,
0.08822472393512726,
0.022841738536953926,
0.03189497068524361,
0.01658014766871929,
-0.024584904313087463,
-0.020628556609153748,
0.06954866647720337,
0.007929634302854538,
-4.342920689737184e-8,
0.09717657417058945,
0.014631379395723343,
-0.007168971933424473,
0.06926046311855316,
0.06703147292137146,
-0.020903754979372025,
0.051023565232753754,
0.03381906449794769,
-0.03189945966005325,
0.0866449698805809,
-0.027036594226956367,
0.047352708876132965,
-0.029111571609973907,
0.035531528294086456,
0.07294759899377823,
-0.0028573391027748585,
-0.0023464011028409004,
0.04281467944383621,
0.017054934054613113,
-0.11696004867553711,
-0.049151889979839325,
-0.012012084946036339,
-0.019100558012723923,
-0.011763740330934525,
0.019191589206457138,
0.023201534524559975,
0.1138586550951004,
0.0240979865193367,
0.005766605492681265,
-0.050551414489746094,
-0.03816136345267296,
-0.03691481426358223,
-0.07738734781742096,
0.03917907178401947,
0.026607241481542587,
-0.0152153754606843,
-0.15193375945091248,
0.09502730518579483,
0.010466599836945534,
0.025266597047448158,
-0.060303863137960434,
-0.05070829391479492,
-0.007288690656423569,
0.005478288978338242,
-0.006510472856462002,
0.021937035024166107,
-0.07864899188280106,
0.08774670213460922,
-0.015865908935666084,
0.043000996112823486,
0.04257446900010109,
-0.029282094910740852,
-0.012171139940619469,
0.0321572907269001,
-0.02017049491405487,
0.04680579900741577,
-0.0031489243265241385,
0.018597839400172234,
-0.027911487966775894,
0.007237781770527363,
0.04187473654747009,
0.01600928232073784,
-0.03922116383910179,
0.012106738053262234
] | 0.149857
|
{{< feature-state for\_k8s\_version="v1.18" state="stable" >}} This page shows how to use the `runAsUserName` setting for Pods and containers that will run on Windows nodes. This is roughly equivalent of the Linux-specific `runAsUser` setting, allowing you to run applications in a container as a different username than the default. ## {{% heading "prerequisites" %}} You need to have a Kubernetes cluster and the kubectl command-line tool must be configured to communicate with your cluster. The cluster is expected to have Windows worker nodes where pods with containers running Windows workloads will get scheduled. ## Set the Username for a Pod To specify the username with which to execute the Pod's container processes, include the `securityContext` field ([PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core)) in the Pod specification, and within it, the `windowsOptions` ([WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core)) field containing the `runAsUserName` field. The Windows security context options that you specify for a Pod apply to all Containers and init Containers in the Pod. Here is a configuration file for a Windows Pod that has the `runAsUserName` field set: {{% code\_sample file="windows/run-as-username-pod.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/windows/run-as-username-pod.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod run-as-username-pod-demo ``` Get a shell to the running Container: ```shell kubectl exec -it run-as-username-pod-demo -- powershell ``` Check that the shell is running user the correct username: ```powershell echo $env:USERNAME ``` The output should be: ``` ContainerUser ``` ## Set the Username for a Container To specify the username with which to execute a Container's processes, include the `securityContext` field ([SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core)) in the Container manifest, and within it, the `windowsOptions` ([WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core)) field containing the `runAsUserName` field. The Windows security context options that you specify for a Container apply only to that individual Container, and they override the settings made at the Pod level. Here is the configuration file for a Pod that has one Container, and the `runAsUserName` field is set at the Pod level and the Container level: {{% code\_sample file="windows/run-as-username-container.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/windows/run-as-username-container.yaml ``` Verify that the Pod's Container is running: ```shell kubectl get pod run-as-username-container-demo ``` Get a shell to the running Container: ```shell kubectl exec -it run-as-username-container-demo -- powershell ``` Check that the shell is running user the correct username (the one set at the Container level): ```powershell echo $env:USERNAME ``` The output should be: ``` ContainerAdministrator ``` ## Windows Username limitations In order to use this feature, the value set in the `runAsUserName` field must be a valid username. It must have the following format: `DOMAIN\USER`, where `DOMAIN\` is optional. Windows user names are case insensitive. Additionally, there are some restrictions regarding the `DOMAIN` and `USER`: - The `runAsUserName` field cannot be empty, and it cannot contain control characters (ASCII values: `0x00-0x1F`, `0x7F`) - The `DOMAIN` must be either a NetBios name, or a DNS name, each with their own restrictions: - NetBios names: maximum 15 characters, cannot start with `.` (dot), and cannot contain the following characters: `\ / : \* ? " < > |` - DNS names: maximum 255 characters, contains only alphanumeric characters, dots, and dashes, and it cannot start or end with a `.` (dot) or `-` (dash). - The `USER` must have at most 20 characters, it cannot contain \*only\* dots or spaces, and it cannot contain the following characters: `" / \ [ ] : ; | = , + \* ? < > @`. Examples of acceptable values for the `runAsUserName` field: `ContainerAdministrator`, `ContainerUser`, `NT AUTHORITY\NETWORK SERVICE`, `NT AUTHORITY\LOCAL SERVICE`. For more information about these limtations, check [here](https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-runasusername.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-runasusername.md
|
[
0.03469531983137131,
0.02338551916182041,
0.026843544095754623,
0.026336174458265305,
-0.07620460540056229,
0.0380978025496006,
-0.003990557044744492,
0.016145111992955208,
0.008039439097046852,
0.04307965561747551,
-0.1002780944108963,
-0.12925072014331818,
0.007884131744503975,
0.030400726944208145,
0.03986267000436783,
-0.00856885313987732,
0.09023164957761765,
0.0012391263153403997,
-0.003350918646901846,
-0.009304779581725597,
-0.02161947824060917,
-0.006874473299831152,
0.012370583601295948,
0.018316321074962616,
-0.06192414462566376,
-0.041152190417051315,
-0.020502151921391487,
-0.020254479721188545,
0.0063994331285357475,
0.09636969864368439,
-0.04430793970823288,
-0.028572242707014084,
0.054315824061632156,
0.026896409690380096,
0.06719988584518433,
0.08554868400096893,
0.03705061972141266,
-0.007342024706304073,
-0.097819022834301,
-0.044153984636068344,
0.06091843172907829,
-0.05896834656596184,
-0.13336144387722015,
0.00929737277328968,
-0.050574298948049545,
-0.03447816148400307,
-0.0158682931214571,
-0.022422701120376587,
-0.028339136391878128,
0.03255390003323555,
-0.009187464602291584,
-0.08791151642799377,
0.10025444626808167,
0.0021230005659163,
0.020924685522913933,
0.034162525087594986,
0.02299194224178791,
0.070682093501091,
0.15451963245868683,
-0.004530849400907755,
0.02343970164656639,
-0.10850098729133606,
0.012375068850815296,
-0.015749657526612282,
0.011885490268468857,
-0.005494512617588043,
-0.021054334938526154,
-0.013563972897827625,
0.022817732766270638,
-0.04064879193902016,
-0.00010501823999220505,
0.026467900723218918,
-0.009049592539668083,
-0.0494152195751667,
-0.06786764413118362,
0.04148515313863754,
0.012392031960189342,
0.058327943086624146,
-0.007610578089952469,
-0.04871957376599312,
0.004647849593311548,
0.040020428597927094,
-0.001731236232444644,
-0.03659040108323097,
-0.12144792824983597,
0.04407927766442299,
-0.05078739672899246,
-0.09010051190853119,
0.05904053896665573,
0.00946793146431446,
0.02051209844648838,
-0.049967970699071884,
0.012070419266819954,
-0.1389142870903015,
0.09893843531608582,
-0.029087597504258156,
0.019455811008810997,
0.014745659194886684,
0.02456071227788925,
-0.01604427397251129,
0.01843743957579136,
-0.0303661972284317,
-0.033469244837760925,
0.04209493100643158,
0.06787692755460739,
-0.01866905204951763,
-0.0687623918056488,
-0.05372348427772522,
0.01748703047633171,
0.01711864210665226,
0.014578252099454403,
0.041362617164850235,
-0.012939978390932083,
0.023298639804124832,
0.006961057893931866,
-0.018707260489463806,
0.012044591829180717,
0.010575147345662117,
0.0018622190691530704,
0.055603690445423126,
0.006376200821250677,
-0.13859815895557404,
-0.008355475030839443,
-0.02706834301352501,
-0.04515327513217926,
0.025470556691288948,
-0.0302707701921463,
2.4630370068359478e-33,
0.04937353357672691,
-0.10282932221889496,
0.0690251812338829,
0.02391146868467331,
0.11120598763227463,
-0.10823529958724976,
-0.023239929229021072,
-0.04588533565402031,
-0.020510826259851456,
-0.03599366173148155,
-0.08702028542757034,
0.06105586886405945,
0.04947742447257042,
-0.035502221435308456,
0.015279410406947136,
0.021213354542851448,
-0.09489381313323975,
0.002399202436208725,
0.11481700092554092,
0.014920945279300213,
0.05205800384283066,
-0.07998089492321014,
-0.03879851847887039,
-0.03221752867102623,
-0.007550543639808893,
-0.08069217205047607,
0.030165506526827812,
-0.09370304644107819,
0.07694780826568604,
0.0209957268089056,
-0.05052103102207184,
-0.0014577232068404555,
0.02558579295873642,
0.05574167147278786,
-0.17923593521118164,
-0.02514309622347355,
-0.030705267563462257,
0.057321496307849884,
-0.04710221663117409,
-0.04074353724718094,
0.061140064150094986,
-0.006332296412438154,
0.08270794153213501,
-0.050686080008745193,
0.07827772945165634,
-0.03874349594116211,
0.05494431406259537,
-0.05532567575573921,
0.07236011326313019,
0.05892376974225044,
-0.020242875441908836,
-0.06718400120735168,
0.02016526646912098,
-0.039902087301015854,
0.037613529711961746,
-0.02959400974214077,
0.07359935343265533,
-0.05703447386622429,
-0.0621982179582119,
-0.03766008839011192,
-0.08962741494178772,
0.027241773903369904,
-0.010833769105374813,
0.023882411420345306,
-0.005722984205931425,
-0.032642628997564316,
-0.007654727436602116,
0.045100465416908264,
-0.04528393968939781,
0.07703536003828049,
-0.073698490858078,
0.08142828196287155,
-0.06171638146042824,
0.04380990192294121,
-0.029429955407977104,
-0.034961502999067307,
0.0715341791510582,
0.04648084565997124,
-0.11847347021102905,
0.08582597225904465,
0.01286555826663971,
0.0009038996649906039,
-0.014386291615664959,
0.030949028208851814,
-0.007528487127274275,
-0.03516467660665512,
-0.06093772500753403,
0.01775878295302391,
-0.013635394163429737,
0.00009846166358329356,
0.08064374327659607,
-0.03493206575512886,
-0.024206919595599174,
0.1045190617442131,
-0.11060775071382523,
-4.1510735269106385e-33,
0.0697108656167984,
-0.010715167969465256,
0.021098079159855843,
-0.004600161220878363,
0.03682425245642662,
0.030198074877262115,
-0.02097221463918686,
-0.0005748490220867097,
-0.04552293196320534,
-0.08087817579507828,
-0.04530658945441246,
-0.011305218562483788,
0.015022127889096737,
0.07921212166547775,
-0.04004227742552757,
0.02895086444914341,
-0.012415854260325432,
0.013912437483668327,
-0.0030194425489753485,
0.013433759100735188,
-0.03164282813668251,
-0.003913372755050659,
-0.016682174056768417,
0.023506317287683487,
0.009385515935719013,
-0.04944787546992302,
0.056991301476955414,
0.006743673235177994,
-0.06257738918066025,
-0.007898540236055851,
0.02273590862751007,
-0.08362070471048355,
-0.016996152698993683,
-0.005275719799101353,
0.034476388245821,
-0.0703393816947937,
-0.028437381610274315,
0.003398382803425193,
0.01909305714070797,
-0.0015237790066748857,
0.05941871926188469,
-0.030194558203220367,
-0.056079428642988205,
-0.01954297535121441,
-0.04242017865180969,
0.0830208957195282,
0.03172626346349716,
-0.01599627360701561,
-0.058171723037958145,
-0.021948082372546196,
-0.011223282665014267,
0.018617011606693268,
-0.06807810068130493,
0.08038781583309174,
-0.03782946616411209,
-0.022275714203715324,
0.03899301588535309,
0.04812324047088623,
-0.06334889680147171,
0.07404746115207672,
0.0860501155257225,
-0.0844343975186348,
0.11256881803274155,
0.034923575818538666,
-0.03740721195936203,
-0.0084284208714962,
-0.015293155796825886,
0.1022820770740509,
-0.08055614680051804,
0.0190450269728899,
-0.01377660222351551,
-0.04878765717148781,
-0.008542568422853947,
0.061947520822286606,
-0.04277010262012482,
-0.0797899067401886,
0.04042891785502434,
-0.047204479575157166,
0.03068855218589306,
0.04445427656173706,
-0.004218870773911476,
0.09055832773447037,
-0.04995289817452431,
-0.029396191239356995,
0.013978728093206882,
0.07360249757766724,
0.10403481125831604,
0.08670543879270554,
0.026454724371433258,
0.09246030449867249,
0.02036336436867714,
-0.026447122916579247,
-0.02045944146811962,
0.07973300665616989,
0.02103556878864765,
-4.9709139915421474e-8,
0.05443752557039261,
0.0199833195656538,
-0.040079254657030106,
0.023527441546320915,
0.001065105781890452,
0.041672732681035995,
0.0038771769031882286,
-0.046116139739751816,
-0.05050860345363617,
-0.009904376231133938,
-0.06572830677032471,
0.027237819507718086,
-0.021906627342104912,
0.00046518127783201635,
0.03364657238125801,
-0.01930965483188629,
-0.027774114161729813,
0.0695863589644432,
0.040883615612983704,
-0.03627266734838486,
-0.0038061460945755243,
-0.04914262518286705,
0.059318073093891144,
0.01470897626131773,
-0.009749042801558971,
0.09062831103801727,
0.04057491943240166,
-0.03683588653802872,
0.043782394379377365,
0.00793114211410284,
-0.04485606402158737,
-0.016105690971016884,
-0.06016417220234871,
0.08041594177484512,
-0.06001076102256775,
0.02028537355363369,
-0.11613605916500092,
0.03740029036998749,
0.040998298674821854,
0.04128807783126831,
0.008321107365190983,
-0.004366863053292036,
-0.0398830883204937,
-0.02855500392615795,
-0.0284331813454628,
0.10306805372238159,
-0.001239307806827128,
0.05491359159350395,
0.012426450848579407,
0.01527143269777298,
-0.015463647432625294,
-0.012669133022427559,
0.04463817551732063,
0.08080391585826874,
0.03319093585014343,
0.01455608755350113,
-0.045399636030197144,
-0.0510684996843338,
0.0399223230779171,
-0.014422344975173473,
0.0099311089143157,
0.0019802702590823174,
0.003454842371866107,
0.008587726391851902
] | 0.145083
|
dots or spaces, and it cannot contain the following characters: `" / \ [ ] : ; | = , + \* ? < > @`. Examples of acceptable values for the `runAsUserName` field: `ContainerAdministrator`, `ContainerUser`, `NT AUTHORITY\NETWORK SERVICE`, `NT AUTHORITY\LOCAL SERVICE`. For more information about these limtations, check [here](https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and) and [here](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/new-localuser?view=powershell-5.1). ## {{% heading "whatsnext" %}} \* [Guide for scheduling Windows containers in Kubernetes](/docs/concepts/windows/user-guide/) \* [Managing Workload Identity with Group Managed Service Accounts (GMSA)](/docs/concepts/windows/user-guide/#managing-workload-identity-with-group-managed-service-accounts) \* [Configure GMSA for Windows pods and containers](/docs/tasks/configure-pod-container/configure-gmsa/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/configure-runasusername.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/configure-runasusername.md
|
[
-0.000483610579976812,
0.0012656508479267359,
-0.0032424370292574167,
0.008239738643169403,
-0.04332926869392395,
0.01851116679608822,
0.13768130540847778,
-0.028808843344449997,
0.022735679522156715,
0.03246872499585152,
0.013265113346278667,
-0.10111864656209946,
0.043772391974925995,
-0.0037712575867772102,
0.010465428233146667,
0.0360511913895607,
0.01193815004080534,
-0.04535271227359772,
-0.027696721255779266,
-0.016138792037963867,
0.05646688863635063,
0.04326041787862778,
-0.06124985218048096,
-0.00874208752065897,
-0.013777663931250572,
0.018655434250831604,
-0.04441368952393532,
0.007074475754052401,
-0.04477948322892189,
0.04683484882116318,
-0.04078003019094467,
-0.03028181381523609,
0.03753284364938736,
-0.005217644851654768,
0.20257093012332916,
0.10080596804618835,
0.05512204021215439,
0.10443627834320068,
-0.02461395226418972,
-0.08152437955141068,
0.07342218607664108,
-0.10040260851383209,
-0.013611462898552418,
0.034357767552137375,
-0.06463253498077393,
-0.012959257699549198,
-0.018718905746936798,
-0.06047616899013519,
-0.09353330731391907,
0.016285404562950134,
-0.018016118556261063,
-0.057829972356557846,
0.06734930723905563,
0.02439105324447155,
0.015905847772955894,
0.01662733592092991,
-0.025233305990695953,
0.14917342364788055,
0.052881091833114624,
-0.036191605031490326,
-0.027095621451735497,
-0.0639982596039772,
-0.036440275609493256,
-0.006226128898561001,
0.009679753333330154,
-0.07134200632572174,
-0.10540595650672913,
-0.02070772275328636,
-0.06483779102563858,
0.0010510418796911836,
-0.05913309007883072,
0.03476228564977646,
-0.10357658565044403,
0.05979623645544052,
-0.018364381045103073,
0.04822434484958649,
-0.0017160630086436868,
0.06684447079896927,
0.035890333354473114,
-0.050762470811605453,
0.0004382489714771509,
0.028559746220707893,
0.005034559406340122,
-0.027748875319957733,
-0.04665294662117958,
0.10100371390581131,
-0.08983983099460602,
-0.08661816269159317,
-0.012721921317279339,
-0.03742729127407074,
0.028017980977892876,
-0.04295935854315758,
0.07418622821569443,
-0.02468693070113659,
0.1064942330121994,
-0.01666138507425785,
-0.020377393811941147,
0.04988532513380051,
-0.02154233306646347,
0.02454315312206745,
0.009484379552304745,
0.00361068663187325,
0.011514968238770962,
0.023273231461644173,
-0.034623339772224426,
-0.02892538160085678,
-0.03349689394235611,
-0.032665181905031204,
0.045199163258075714,
-0.008510955609381199,
-0.015090378932654858,
0.04541120305657387,
-0.08752325922250748,
-0.042704299092292786,
0.0037616936024278402,
-0.100348100066185,
-0.016398459672927856,
-0.03615092486143112,
0.04805489256978035,
0.04985393211245537,
-0.006287719123065472,
-0.14858318865299225,
-0.08117663860321045,
-0.0175289586186409,
0.019460095092654228,
0.021746927872300148,
0.03989493474364281,
-9.372953898140247e-34,
0.02394869737327099,
-0.009158745408058167,
0.04717794433236122,
0.03396330773830414,
0.08827028423547745,
-0.024817459285259247,
-0.0028480286709964275,
0.008696015924215317,
0.02312563918530941,
0.02446846105158329,
-0.041301216930150986,
0.03096294403076172,
0.05932442098855972,
-0.051831670105457306,
0.01165578979998827,
0.04625065624713898,
0.06572458148002625,
0.0014890854945406318,
0.06326253712177277,
0.016023900359869003,
0.016634562984108925,
0.015589531511068344,
-0.04562344029545784,
0.021370967850089073,
-0.0406426377594471,
-0.04948755353689194,
-0.0029418496415019035,
-0.06697294116020203,
0.11130334436893463,
0.04033038765192032,
0.0023780486080795527,
-0.004018472973257303,
0.01389383152127266,
0.04736354574561119,
0.00445814011618495,
0.051229167729616165,
0.017962409183382988,
0.029679717496037483,
-0.06066664308309555,
-0.03668965771794319,
-0.007673847954720259,
-0.017362121492624283,
0.0667429119348526,
0.04969869554042816,
0.0005618142895400524,
-0.06428001821041107,
0.06131378561258316,
-0.03826380893588066,
-0.008552628569304943,
0.1041446328163147,
-0.022791707888245583,
-0.015557641163468361,
0.0037205254193395376,
-0.019636908546090126,
0.012302689254283905,
-0.05583799257874489,
-0.02314687892794609,
0.010157969780266285,
-0.0687275305390358,
-0.051139477640390396,
-0.05503661185503006,
0.03299916908144951,
0.02317640371620655,
0.01401868462562561,
0.0021339929662644863,
-0.13356056809425354,
0.022394351661205292,
0.008198235183954239,
-0.021226009353995323,
0.03848820552229881,
-0.0019924528896808624,
0.05488836392760277,
-0.011073008179664612,
0.124507375061512,
-0.0679672360420227,
-0.053541965782642365,
0.0516829714179039,
0.040614522993564606,
-0.10409536957740784,
0.02047679014503956,
-0.012140464968979359,
-0.05005697160959244,
-0.11618167906999588,
0.010387377813458443,
-0.04088475927710533,
-0.01843811757862568,
0.013686839491128922,
-0.001104735187254846,
-0.016862578690052032,
-0.10903789848089218,
0.07292839884757996,
-0.04453184828162193,
-0.06942109763622284,
0.09171372652053833,
-0.1584029495716095,
-2.942654865018765e-33,
0.13044779002666473,
-0.028375381603837013,
0.008468754589557648,
-0.031916216015815735,
0.04712029919028282,
-0.01912849210202694,
0.07530517131090164,
-0.0018646173411980271,
-0.010000243782997131,
-0.08559642732143402,
-0.03385097160935402,
0.012844626791775227,
-0.01799502596259117,
0.05214548483490944,
0.03909561410546303,
0.012252150103449821,
-0.02944486029446125,
-0.009398502297699451,
0.040096137672662735,
0.02551448903977871,
0.0014152203220874071,
0.039517611265182495,
-0.059752628207206726,
0.06151322275400162,
0.024426313117146492,
-0.022577514871954918,
0.05527869984507561,
-0.022360069677233696,
-0.04718276858329773,
0.06845077872276306,
0.004409386310726404,
-0.0013897354947403073,
-0.04995347559452057,
0.06970766186714172,
-0.10022371262311935,
-0.06672878563404083,
-0.02085283026099205,
0.004595901817083359,
0.017264973372220993,
0.034683723002672195,
0.026733648031949997,
-0.009734808467328548,
-0.01755661331117153,
0.034875210374593735,
-0.00798835139721632,
0.006173225585371256,
0.06748066842556,
-0.04399287328124046,
-0.06018085777759552,
0.024107828736305237,
0.026629790663719177,
-0.11937012523412704,
-0.03191869333386421,
0.03773966431617737,
-0.010250244289636612,
-0.00842026062309742,
0.021528061479330063,
0.01288164034485817,
-0.019110828638076782,
-0.0493466854095459,
0.0270385704934597,
0.025979071855545044,
0.0034193769097328186,
0.09570874273777008,
-0.03974119573831558,
-0.03672616556286812,
-0.019731441512703896,
0.049339260905981064,
-0.07704809308052063,
-0.1255868673324585,
-0.024912714958190918,
-0.09135167300701141,
-0.0680881068110466,
0.04315942898392677,
-0.1148795410990715,
-0.05003140866756439,
0.08508539199829102,
-0.013610446825623512,
0.00017470696184318513,
0.09423044323921204,
-0.03069070726633072,
0.04181457310914993,
-0.05417783558368683,
0.0365307480096817,
-0.017413750290870667,
0.0007334108231589198,
0.07030541449785233,
0.07955967634916306,
-0.07066608220338821,
0.052077993750572205,
0.016306230798363686,
0.026603620499372482,
-0.039349544793367386,
0.0946626216173172,
-0.05185554921627045,
-5.5459537406932213e-8,
-0.00892486609518528,
-0.0019341802690178156,
-0.08306575566530228,
-0.030268345028162003,
-0.02706878073513508,
-0.012749576941132545,
-0.014118892140686512,
-0.051901429891586304,
0.0031378627754747868,
0.042758189141750336,
0.012746468186378479,
0.02257123589515686,
-0.01694103330373764,
-0.07061493396759033,
0.008309767581522465,
-0.009534521959722042,
-0.050327036529779434,
0.07784497737884521,
-0.019492145627737045,
0.04343649744987488,
-0.016633890569210052,
0.028717441484332085,
-0.0009859194979071617,
-0.08870629966259003,
-0.035107146948575974,
0.12823988497257233,
0.013358968310058117,
-0.01540301088243723,
-0.009125933982431889,
0.05421459674835205,
0.013311764225363731,
0.05757827311754227,
0.025087343528866768,
-0.020942891016602516,
-0.08169463276863098,
0.01307229045778513,
-0.03854427486658096,
0.020325331017374992,
0.037899199873209,
0.05148535594344139,
-0.0284100528806448,
-0.0065623181872069836,
0.004086022265255451,
0.0006727856234647334,
-0.007202321197837591,
0.013539643958210945,
0.02227235771715641,
0.06842498481273651,
0.023978371173143387,
-0.08712348341941833,
-0.03125800937414169,
0.0166948102414608,
0.009525065310299397,
0.08880205452442169,
-0.0050279442220926285,
-0.013773653656244278,
0.0324946790933609,
0.075643390417099,
0.0034223601687699556,
-0.005031284410506487,
-0.03758382424712181,
0.059926588088274,
-0.044489216059446335,
-0.000060630132793448865
] | 0.108631
|
This page shows how to configure process namespace sharing for a pod. When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. You can use this feature to configure cooperating containers, such as a log handler sidecar container, or to troubleshoot container images that don't include debugging utilities like a shell. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} ## Configure a Pod Process namespace sharing is enabled using the `shareProcessNamespace` field of `.spec` for a Pod. For example: {{% code\_sample file="pods/share-process-namespace.yaml" %}} 1. Create the pod `nginx` on your cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/share-process-namespace.yaml ``` 1. Attach to the `shell` container and run `ps`: ```shell kubectl exec -it nginx -c shell -- /bin/sh ``` If you don't see a command prompt, try pressing enter. In the container shell: ```shell # run this inside the "shell" container ps ax ``` The output is similar to this: ```none PID USER TIME COMMAND 1 root 0:00 /pause 8 root 0:00 nginx: master process nginx -g daemon off; 14 101 0:00 nginx: worker process 15 root 0:00 sh 21 root 0:00 ps ax ``` You can signal processes in other containers. For example, send `SIGHUP` to `nginx` to restart the worker process. This requires the `SYS\_PTRACE` capability. ```shell # run this inside the "shell" container kill -HUP 8 # change "8" to match the PID of the nginx leader process, if necessary ps ax ``` The output is similar to this: ```none PID USER TIME COMMAND 1 root 0:00 /pause 8 root 0:00 nginx: master process nginx -g daemon off; 15 root 0:00 sh 22 101 0:00 nginx: worker process 23 root 0:00 ps ax ``` It's even possible to access the file system of another container using the `/proc/$pid/root` link. ```shell # run this inside the "shell" container # change "8" to the PID of the Nginx process, if necessary head /proc/8/root/etc/nginx/nginx.conf ``` The output is similar to this: ```none user nginx; worker\_processes 1; error\_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker\_connections 1024; ``` ## Understanding process namespace sharing Pods share many resources so it makes sense they would also share a process namespace. Some containers may expect to be isolated from others, though, so it's important to understand the differences: 1. \*\*The container process no longer has PID 1.\*\* Some containers refuse to start without PID 1 (for example, containers using `systemd`) or run commands like `kill -HUP 1` to signal the container process. In pods with a shared process namespace, `kill -HUP 1` will signal the pod sandbox (`/pause` in the above example). 1. \*\*Processes are visible to other containers in the pod.\*\* This includes all information visible in `/proc`, such as passwords that were passed as arguments or environment variables. These are protected only by regular Unix permissions. 1. \*\*Container filesystems are visible to other containers in the pod through the `/proc/$pid/root` link.\*\* This makes debugging easier, but it also means that filesystem secrets are protected only by filesystem permissions.
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/share-process-namespace.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/share-process-namespace.md
|
[
0.009778800420463085,
-0.05755845829844475,
-0.0020120670087635517,
0.02969224937260151,
-0.014279750175774097,
-0.022353975102305412,
-0.02651161327958107,
-0.025929763913154602,
-0.003858113894239068,
0.05420105531811714,
-0.05762634798884392,
-0.0278047863394022,
-0.021102184429764748,
0.0306268148124218,
0.029076483100652695,
-0.06490787118673325,
0.07713603973388672,
-0.03848865255713463,
0.004169168416410685,
-0.06267610192298889,
0.03464492782950401,
0.017783451825380325,
0.020666761323809624,
0.018905946984887123,
-0.04861431568861008,
0.015560931526124477,
-0.06043010577559471,
-0.0132127795368433,
0.05471173673868179,
-0.030328897759318352,
0.025049908086657524,
0.006890473887324333,
0.01813947781920433,
0.029194144532084465,
0.0814317837357521,
0.12930844724178314,
0.0036658786702901125,
-0.05593855306506157,
-0.028397971764206886,
-0.04376444220542908,
0.07465284317731857,
-0.01732914336025715,
-0.11169876903295517,
-0.034216638654470444,
-0.0508025661110878,
-0.048467040061950684,
-0.042623721063137054,
-0.08092734962701797,
0.006922649685293436,
-0.02365703694522381,
-0.040734827518463135,
-0.09434160590171814,
0.0617278516292572,
0.04356875643134117,
0.012048616074025631,
0.03370259702205658,
0.022948691621422768,
0.030276471748948097,
0.0668887197971344,
0.020210226997733116,
-0.04513698071241379,
-0.04269557073712349,
0.03165677562355995,
-0.0466531477868557,
0.013654154725372791,
0.019629936665296555,
-0.0022506704553961754,
0.08438602834939957,
0.01563354767858982,
-0.03218523785471916,
0.040761254727840424,
0.051761552691459656,
0.01158210914582014,
-0.07981035113334656,
-0.052720148116350174,
0.02487368695437908,
-0.04543264955282211,
0.03753989562392235,
-0.09245429933071136,
-0.055055178701877594,
0.013323172926902771,
0.09613852202892303,
0.005700045730918646,
-0.04005725309252739,
-0.06281685829162598,
0.03712189570069313,
0.0028428328223526478,
-0.06051547825336456,
0.029947126284241676,
-0.0848090723156929,
-0.041100356727838516,
-0.06630735099315643,
-0.02721938118338585,
-0.09393243491649628,
0.07490762323141098,
-0.013020241633057594,
-0.07469982653856277,
0.043231476098299026,
0.0418597012758255,
-0.009460465051233768,
0.001234092633239925,
0.014130743220448494,
0.03210117295384407,
-0.003517946694046259,
0.07550695538520813,
0.04683910310268402,
-0.03236967697739601,
-0.02310498245060444,
0.06375265121459961,
0.08496536314487457,
-0.029322931542992592,
0.05288035795092583,
-0.03413146361708641,
0.05509873107075691,
-0.024556662887334824,
-0.009211421012878418,
0.026423847302794456,
-0.01871619187295437,
0.06102311983704567,
0.03626873344182968,
0.07058624923229218,
-0.07576587051153183,
0.058862172067165375,
0.039509497582912445,
0.018597550690174103,
0.00018710482981987298,
-0.04913150146603584,
4.622549617346073e-33,
0.01723632402718067,
-0.10348092019557953,
0.03767597675323486,
-0.0027901052962988615,
0.0547795370221138,
-0.05127600580453873,
-0.05762764438986778,
0.02449442632496357,
-0.05159078165888786,
-0.014182106591761112,
-0.014545401558279991,
0.09758572280406952,
-0.004813821520656347,
-0.07843998074531555,
-0.00878293626010418,
-0.00403899559751153,
-0.04492033272981644,
0.06078754737973213,
0.0978255346417427,
0.024802153930068016,
0.013241618871688843,
-0.02774602361023426,
-0.1066584661602974,
0.06249430030584335,
-0.01657334342598915,
-0.0020386341493576765,
0.03788239136338234,
-0.18514932692050934,
0.034839387983083725,
0.012152198702096939,
0.035978514701128006,
-0.003644014708697796,
0.043765053153038025,
0.04710299149155617,
-0.1048017218708992,
-0.014473950490355492,
0.010316901840269566,
0.09423753619194031,
-0.08102400600910187,
-0.010387064889073372,
0.04547666385769844,
-0.043891165405511856,
-0.03095349483191967,
-0.06561551988124847,
-0.008642286993563175,
-0.05884229764342308,
0.0015424302546307445,
-0.07538150250911713,
0.09698456525802612,
0.001983232796192169,
0.011738707311451435,
-0.09627249091863632,
0.009419215843081474,
-0.017057551071047783,
0.029471084475517273,
0.008866648189723492,
0.04322683438658714,
-0.03953082859516144,
0.02227621152997017,
-0.04729168117046356,
-0.07002339512109756,
0.009396199136972427,
-0.029936546459794044,
0.026813145726919174,
0.043579425662755966,
0.02671511285007,
0.017888452857732773,
0.04077259078621864,
0.046102799475193024,
0.07554289698600769,
-0.14825379848480225,
0.02962576411664486,
-0.053675711154937744,
0.05731391906738281,
0.024378236383199692,
-0.04802929237484932,
-0.020414389669895172,
0.056468259543180466,
-0.08924760669469833,
0.05067224055528641,
-0.010645659640431404,
-0.018232477828860283,
-0.046417247503995895,
0.0914601981639862,
-0.05542214959859848,
-0.04421636462211609,
-0.042323384433984756,
0.04035421833395958,
-0.09626708179712296,
0.022497057914733887,
0.05234960466623306,
0.03310016170144081,
-0.025322437286376953,
0.05263156071305275,
-0.10459494590759277,
-5.3077199278434445e-33,
0.07628940790891647,
-0.007893748581409454,
-0.020204925909638405,
0.056480828672647476,
-0.00032697603455744684,
0.008074385114014149,
0.01935209520161152,
0.00211924035102129,
-0.019935447722673416,
0.007814382202923298,
-0.09054682403802872,
-0.04640085995197296,
0.05992966517806053,
0.06029326096177101,
-0.1112140342593193,
0.04362691938877106,
-0.01917150802910328,
-0.006539080757647753,
0.021525783464312553,
0.010464299470186234,
-0.047173015773296356,
0.034566331654787064,
0.09794169664382935,
0.011880236677825451,
0.0028294301591813564,
0.02775469794869423,
0.06099926307797432,
-0.01258639432489872,
-0.003534615971148014,
-0.014941043220460415,
-0.040672678500413895,
-0.043538812547922134,
-0.03051280416548252,
-0.010107002221047878,
-0.012377181090414524,
-0.05476253852248192,
-0.10011058300733566,
0.06820165365934372,
0.012762169353663921,
-0.029952887445688248,
0.05239848792552948,
0.013510813005268574,
-0.1170092448592186,
-0.027787333354353905,
-0.08936068415641785,
-0.0017415645997971296,
0.011295357719063759,
-0.06905700266361237,
-0.02675095573067665,
-0.06309075653553009,
0.01831018179655075,
0.024741515517234802,
-0.11370721459388733,
0.017770100384950638,
0.005873380694538355,
0.04281852766871452,
0.064114049077034,
0.04722075164318085,
-0.07213336229324341,
0.024524513632059097,
0.15618830919265747,
-0.0569608099758625,
0.043344881385564804,
0.011331353336572647,
-0.025487234815955162,
-0.03960045427083969,
-0.048889823257923126,
0.029834220185875893,
0.04090752452611923,
0.04959125444293022,
0.008440653793513775,
0.022495316341519356,
0.026513369753956795,
0.06510267406702042,
0.011702748946845531,
0.07098701596260071,
0.04881460592150688,
-0.07655803114175797,
0.04090495407581329,
0.03896594047546387,
-0.0496370904147625,
0.0689474493265152,
-0.06407054513692856,
-0.016499493271112442,
0.02100621536374092,
0.10130313783884048,
0.07497620582580566,
0.13108602166175842,
0.02728896774351597,
0.006845966447144747,
0.03781205043196678,
0.013662436977028847,
-0.027159612625837326,
0.007225940935313702,
-0.05731942132115364,
-5.243350287287285e-8,
0.046231284737586975,
-0.02899845317006111,
0.010665902867913246,
0.05969739705324173,
-0.009471574798226357,
-0.008158089593052864,
0.06431157141923904,
0.03689337521791458,
-0.03527192026376724,
0.051144279539585114,
-0.0668480172753334,
-0.0014017153298482299,
-0.08317818492650986,
0.03708725795149803,
0.01959073543548584,
-0.007765047252178192,
0.03276413306593895,
0.11141635477542877,
-0.0057417904026806355,
-0.07293801009654999,
-0.05828356370329857,
-0.03702088072896004,
0.007449776865541935,
-0.02093040943145752,
-0.04729386046528816,
0.03695736825466156,
0.07088615000247955,
0.0003124862560071051,
0.04092336446046829,
-0.022683115676045418,
0.018003739416599274,
-0.009574268944561481,
-0.08833377808332443,
0.050182659178972244,
-0.023484492674469948,
-0.038401760160923004,
-0.11409829556941986,
0.07711578160524368,
0.03463762626051903,
0.04424050450325012,
-0.06360524147748947,
0.01640150509774685,
-0.027558421716094017,
-0.04501039907336235,
-0.014747182838618755,
0.07771176099777222,
0.00944029726088047,
0.038576170802116394,
-0.03203977644443512,
0.07036033272743225,
-0.005023993086069822,
-0.05208134651184082,
-0.00501227518543601,
0.06091983616352081,
0.030502088367938995,
0.058683913201093674,
0.0018656249158084393,
-0.08208094537258148,
0.03539388254284859,
-0.07888950407505035,
0.004959489684551954,
0.0037742506247013807,
0.0057842666283249855,
0.04906563460826874
] | 0.142009
|
{{< feature-state feature\_gate\_name="PodLevelResources" >}} This page shows how to specify CPU and memory resources for a Pod at pod-level in addition to container-level resource specifications. A Kubernetes node allocates resources to a pod based on the pod's resource requests. These requests can be defined at the pod level or individually for containers within the pod. When both are present, the pod-level requests take precedence. Similarly, a pod's resource usage is restricted by limits, which can also be set at the pod-level or individually for containers within the pod. Again, pod-level limits are prioritized when both are present. This allows for flexible resource management, enabling you to control resource allocation at both the pod and container levels. In order to specify the resources at pod-level, it is required to enable `PodLevelResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/). For Pod Level Resources: \* Priority: When both pod-level and container-level resources are specified, pod-level resources take precedence. \* QoS: Pod-level resources take precedence in influencing the QoS class of the pod. \* OOM Score: The OOM score adjustment calculation considers both pod-level and container-level resources. \* Compatibility: Pod-level resources are designed to be compatible with existing features. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} The `PodLevelResources` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled for your control plane and for all nodes in your cluster. ## Limitations For Kubernetes {{< skew currentVersion >}}, resizing pod-level resources has the following limitations: \* \*\*Resource Types:\*\* Only CPU, memory and hugepages resources can be specified at pod-level. \* \*\*Operating System:\*\* Pod-level resources are not supported for Windows pods. \* \*\*Resource Managers:\*\* The Topology Manager, Memory Manager and CPU Manager do not align pods and containers based on pod-level resources as these resource managers don't currently support pod-level resources. \* \*\*[In-Place Resize](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/):\*\* In-place resize of pod-level resources is not supported. Modifying the pod-level resource limits or requests on a pod result in a field.Forbidden error. The error message explicitly states, "pods with pod-level resources cannot be resized." ## Create a namespace Create a namespace so that the resources you create in this exercise are isolated from the rest of your cluster. ```shell kubectl create namespace pod-resources-example ``` ## Create a pod with memory requests and limits at pod-level To specify memory requests for a Pod at pod-level, include the `resources.requests.memory` field in the Pod spec manifest. To specify a memory limit, include `resources.limits.memory`. In this exercise, you create a Pod that has one Container. The Pod has a memory request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file for the Pod: {{% code\_sample file="pods/resource/pod-level-memory-request-limit.yaml" %}} The `args` section in the manifest provides arguments for the container when it starts. The `"--vm-bytes", "150M"` arguments tell the Container to attempt to allocate 150 MiB of memory. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/pod-level-memory-request-limit.yaml --namespace=pod-resources-example ``` Verify that the Pod is running: ```shell kubectl get pod memory-demo --namespace=pod-resources-example ``` View detailed information about the Pod: ```shell kubectl get pod memory-demo --output=yaml --namespace=pod-resources-example ``` The output shows that the Pod has a memory request of 100 MiB and a memory limit of 200 MiB. ```yaml ... spec: containers: ... resources: requests: memory: 100Mi limits: memory: 200Mi ... ``` Run `kubectl top` to fetch the metrics for the pod: ```shell kubectl top pod memory-demo --namespace=pod-resources-example ``` The output shows that the Pod is using about 162,900,000 bytes of memory, which is about 150 MiB. This is greater than the Pod's 100 MiB request, but within the Pod's 200 MiB limit. ``` NAME CPU(cores) MEMORY(bytes) memory-demo 162856960 ``` ## Create a pod with CPU requests and limits at
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
[
0.029646901413798332,
0.03228505700826645,
0.0068100024946033955,
0.05091310665011406,
0.006209834478795528,
-0.04153205454349518,
0.0076739792712032795,
0.0027757028583437204,
0.03309616819024086,
0.03397802636027336,
-0.04039217531681061,
-0.03088372014462948,
-0.04408060014247894,
0.009373104199767113,
0.057816848158836365,
0.022964591160416603,
0.08360934257507324,
0.02070973441004753,
-0.04622326046228409,
-0.028231916949152946,
0.14382995665073395,
-0.0298747718334198,
0.03881089761853218,
-0.015535798855125904,
-0.05275827273726463,
-0.012027035467326641,
-0.0730789303779602,
-0.025591647252440453,
0.08884469419717789,
-0.011822223663330078,
-0.06468113511800766,
0.008026414550840855,
0.032087236642837524,
0.012371947057545185,
0.062388092279434204,
0.10145125538110733,
-0.003629439976066351,
-0.13258224725723267,
-0.06443953514099121,
0.0000985168808256276,
-0.016668913885951042,
-0.04617014527320862,
-0.11190613359212875,
0.014115716330707073,
-0.008069916628301144,
0.03285439312458038,
-0.012345033697783947,
-0.011623146943747997,
-0.04789826273918152,
-0.0731162503361702,
0.038393158465623856,
-0.03952785208821297,
0.06263231486082077,
0.03919224441051483,
0.05741656944155693,
0.07497588545084,
0.02225235477089882,
0.030452489852905273,
0.07785236835479736,
0.045682311058044434,
-0.02267802134156227,
-0.05516059324145317,
-0.007628284860402346,
-0.024566123262047768,
0.07264096289873123,
-0.04529980197548866,
0.04533112421631813,
0.010962235741317272,
-0.02018076740205288,
-0.021732421591877937,
0.06951116770505905,
-0.021111540496349335,
-0.01024306658655405,
-0.05022241175174713,
0.013295006938278675,
-0.006539251655340195,
-0.01785959303379059,
0.06501656770706177,
-0.0018379447283223271,
-0.06933712959289551,
0.003115581115707755,
0.03521508723497391,
0.047218549996614456,
-0.082688108086586,
-0.061159078031778336,
0.04067438840866089,
-0.028948606923222542,
-0.04141797497868538,
0.013639881275594234,
0.03711435943841934,
0.049518536776304245,
-0.05554978549480438,
0.013921531848609447,
-0.08421564102172852,
0.09819682687520981,
0.0010161579120904207,
-0.012925255112349987,
-0.07552691549062729,
-0.017688535153865814,
-0.05400671809911728,
0.0036574110854417086,
0.008993908762931824,
0.05712515860795975,
0.022916531190276146,
0.10891302675008774,
-0.03438407927751541,
-0.04556307941675186,
0.024394448846578598,
-0.011539886705577374,
0.046147797256708145,
0.018538527190685272,
0.06191224977374077,
0.02417011559009552,
0.009883205406367779,
-0.004745314829051495,
0.02975662425160408,
-0.007627379614859819,
-0.004860022105276585,
0.0389971062541008,
0.0705774798989296,
-0.0133126275613904,
-0.10752767324447632,
0.0019289006013423204,
0.010778671130537987,
-0.04601561278104782,
0.010306466370821,
-0.1213001012802124,
3.660795036991817e-33,
0.015740271657705307,
-0.11517130583524704,
-0.03144210949540138,
-0.05985363572835922,
0.0272101778537035,
-0.06115901842713356,
0.009642550721764565,
-0.005171322729438543,
-0.08147380501031876,
-0.009048043750226498,
-0.04073353484272957,
0.04134529083967209,
-0.013150293380022049,
-0.015888581052422523,
0.018750732764601707,
-0.05042220279574394,
-0.046523332595825195,
0.06083421781659126,
0.11262866109609604,
0.008980462327599525,
0.037135250866413116,
-0.06353028118610382,
-0.057137612253427505,
0.013590398244559765,
0.0666317567229271,
-0.03071414865553379,
0.002653170609846711,
-0.10881558060646057,
-0.04489653930068016,
0.0246621984988451,
-0.04555841162800789,
0.00397706450894475,
0.04190295189619064,
0.006868768483400345,
-0.09521064907312393,
-0.02825797162950039,
-0.004032614640891552,
-0.00501599907875061,
-0.047955069690942764,
-0.03938915207982063,
0.017470501363277435,
-0.0033520946744829416,
0.016036193817853928,
-0.07999549061059952,
-0.010493929497897625,
-0.05625557899475098,
0.05869317799806595,
-0.049266524612903595,
-0.03343644738197327,
0.061857469379901886,
-0.0024443818256258965,
-0.0035933300387114286,
0.027498429641127586,
-0.0698428750038147,
0.07554459571838379,
-0.07261745631694794,
0.032809339463710785,
-0.018239693716168404,
-0.03675417602062225,
0.05973905697464943,
-0.03439414128661156,
-0.01074601523578167,
0.007740084081888199,
0.003112124279141426,
0.03478844836354256,
0.06500241905450821,
-0.019014200195670128,
0.05885732173919678,
-0.01555327046662569,
0.07578863203525543,
-0.06615307182073593,
0.0035137468948960304,
0.009376698173582554,
0.06144101172685623,
-0.04587169364094734,
-0.03483098745346069,
0.06566310673952103,
0.002073046285659075,
-0.12302716076374054,
0.007637660484761,
-0.019984975457191467,
0.07167832553386688,
0.005833579692989588,
0.08002357929944992,
-0.049081020057201385,
-0.0712876096367836,
0.002926730317994952,
0.0013064766535535455,
-0.03790959715843201,
0.03899146616458893,
0.010386544279754162,
-0.023017171770334244,
-0.02500968426465988,
-0.0037692103069275618,
-0.10124228149652481,
-4.784246212141371e-33,
0.09685345739126205,
0.009683225303888321,
-0.015402632765471935,
-0.009037789888679981,
-0.03626755252480507,
-0.009100493043661118,
-0.009528321214020252,
-0.04660097882151604,
-0.010623401962220669,
-0.09039460867643356,
-0.06464364379644394,
-0.02399802766740322,
0.006883728317916393,
0.000758750073146075,
-0.09013678133487701,
0.03376435115933418,
-0.10453088581562042,
-0.08327154070138931,
0.026835523545742035,
0.0653441771864891,
-0.07223552465438843,
0.026529517024755478,
0.06463271379470825,
0.06255458295345306,
-0.010382421314716339,
-0.045210786163806915,
-0.0073766522109508514,
-0.012631853111088276,
-0.003910454921424389,
-0.06602390110492706,
0.009994704276323318,
-0.1462957262992859,
-0.0338769294321537,
0.014347678981721401,
0.005556043703109026,
-0.05417273938655853,
-0.05249332636594772,
0.028504079207777977,
0.052163880318403244,
0.05574772506952286,
0.1208043321967125,
-0.01325545646250248,
-0.02212904393672943,
-0.019869694486260414,
-0.0492515005171299,
0.012284819036722183,
-0.008237403817474842,
-0.06120191514492035,
-0.014964573085308075,
-0.13596628606319427,
0.005088409874588251,
0.024367693811655045,
-0.03672325611114502,
0.11005837470293045,
-0.030050501227378845,
0.023458467796444893,
0.03427736461162567,
0.09284961968660355,
0.0041487496346235275,
0.005936088506132364,
0.09029792994260788,
-0.06251952052116394,
-0.015780622139573097,
-0.003414447419345379,
-0.00446717906743288,
-0.046101514250040054,
0.004205901641398668,
0.014237179420888424,
-0.019211867824196815,
-0.0023739447351545095,
-0.01675291545689106,
-0.008371810428798199,
0.07762918621301651,
0.10264185816049576,
-0.08156608045101166,
-0.010400527156889439,
0.02794492430984974,
-0.0762992724776268,
0.07004675269126892,
0.01328507624566555,
-0.09538347274065018,
0.12349361926317215,
-0.087547667324543,
0.03117092326283455,
-0.012432899326086044,
0.09755341708660126,
0.053712110966444016,
0.057457201182842255,
0.040176618844270706,
0.018829770386219025,
0.0032649021595716476,
0.0029820792842656374,
-0.06372328847646713,
0.10825589299201965,
-0.01584462821483612,
-4.965490063568723e-8,
0.08453477919101715,
-0.015076380223035812,
0.017242873087525368,
0.02321554347872734,
0.048194341361522675,
-0.01878632977604866,
0.07029364258050919,
0.02571243792772293,
-0.031430281698703766,
0.08532994985580444,
-0.002759570488706231,
0.06308507919311523,
-0.043162669986486435,
-0.024040840566158295,
0.11385536193847656,
0.001183789107017219,
0.01742333173751831,
0.03417852893471718,
0.013538177125155926,
-0.11394790560007095,
-0.03293916583061218,
-0.04864762723445892,
-0.0031092127319425344,
0.01197511050850153,
0.016101941466331482,
0.007119917310774326,
0.11253470927476883,
0.03391969949007034,
0.016832483932375908,
0.008147097192704678,
-0.015261772088706493,
-0.0027349272277206182,
-0.08192165195941925,
0.054926108568906784,
0.04043624922633171,
0.016760358586907387,
-0.14205215871334076,
0.048337601125240326,
0.010517220944166183,
0.05419016629457474,
0.003713020356371999,
-0.05034308135509491,
-0.018137788400053978,
0.03721027076244354,
-0.008869168348610401,
0.0967504009604454,
-0.08435950428247452,
0.08506235480308533,
0.02637602388858795,
0.03472628816962242,
0.01403909269720316,
-0.01200686302036047,
0.01994975470006466,
0.10804706066846848,
-0.0033829547464847565,
0.05284586921334267,
-0.011008031666278839,
-0.03068477474153042,
0.020759213715791702,
-0.014607677236199379,
0.06787993013858795,
0.03894800692796707,
-0.0037142704240977764,
-0.03234194964170456
] | 0.180145
|
output shows that the Pod is using about 162,900,000 bytes of memory, which is about 150 MiB. This is greater than the Pod's 100 MiB request, but within the Pod's 200 MiB limit. ``` NAME CPU(cores) MEMORY(bytes) memory-demo 162856960 ``` ## Create a pod with CPU requests and limits at pod-level To specify a CPU request for a Pod, include the `resources.requests.cpu` field in the Pod spec manifest. To specify a CPU limit, include `resources.limits.cpu`. In this exercise, you create a Pod that has one container. The Pod has a request of 0.5 CPU and a limit of 1 CPU. Here is the configuration file for the Pod: {{% code\_sample file="pods/resource/pod-level-cpu-request-limit.yaml" %}} The `args` section of the configuration file provides arguments for the container when it starts. The `-cpus "2"` argument tells the Container to attempt to use 2 CPUs. Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/pod-level-cpu-request-limit.yaml --namespace=pod-resources-example ``` Verify that the Pod is running: ```shell kubectl get pod cpu-demo --namespace=pod-resources-example ``` View detailed information about the Pod: ```shell kubectl get pod cpu-demo --output=yaml --namespace=pod-resources-example ``` The output shows that the Pod has a CPU request of 500 milliCPU and a CPU limit of 1 CPU. ```yaml spec: containers: ... resources: limits: cpu: "1" requests: cpu: 500m ``` Use `kubectl top` to fetch the metrics for the Pod: ```shell kubectl top pod cpu-demo --namespace=pod-resources-example ``` This example output shows that the Pod is using 974 milliCPU, which is slightly less than the limit of 1 CPU specified in the Pod configuration. ``` NAME CPU(cores) MEMORY(bytes) cpu-demo 974m ``` Recall that by setting `-cpu "2"`, you configured the Container to attempt to use 2 CPUs, but the Container is only being allowed to use about 1 CPU. The container's CPU use is being throttled, because the container is attempting to use more CPU resources than the Pod CPU limit. ## Create a pod with resource requests and limits at both pod-level and container-level To assign CPU and memory resources to a Pod, you can specify them at both the pod level and the container level. Include the `resources` field in the Pod spec to define resources for the entire Pod. Additionally, include the `resources` field within container's specification in the Pod's manifest to set container-specific resource requirements. In this exercise, you'll create a Pod with two containers to explore the interaction of pod-level and container-level resource specifications. The Pod itself will have defined CPU requests and limits, while only one of the containers will have its own explicit resource requests and limits. The other container will inherit the resource constraints from the pod-level settings. Here's the configuration file for the Pod: {{% code\_sample file="pods/resource/pod-level-resources.yaml" %}} Create the Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/resource/pod-level-resources.yaml --namespace=pod-resources-example ``` Verify that the Pod Container is running: ```shell kubectl get pod-resources-demo --namespace=pod-resources-example ``` View detailed information about the Pod: ```shell kubectl get pod memory-demo --output=yaml --namespace=pod-resources-example ``` The output shows that one container in the Pod has a memory request of 50 MiB and a CPU request of 0.5 cores, with a memory limit of 100 MiB and a CPU limit of 0.5 cores. The Pod itself has a memory request of 100 MiB and a CPU request of 1 core, and a memory limit of 200 MiB and a CPU limit of 1 core. ```yaml ... containers: name: pod-resources-demo-ctr-1 resources: requests: cpu: 500m memory: 50Mi limits: cpu: 500m memory: 100Mi ... name: pod-resources-demo-ctr-2 resources: {} resources: limits: cpu: 1 memory: 200Mi requests: cpu: 1 memory: 100Mi ... ``` Since pod-level requests and limits are specified, the request guarantees for both containers in the pod
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
[
0.0876506119966507,
0.030035503208637238,
0.0000892676689545624,
0.05519036203622818,
-0.038239486515522,
-0.08226380497217178,
-0.017083562910556793,
0.019445136189460754,
0.032540999352931976,
0.05305444076657295,
-0.03682457655668259,
-0.0334017276763916,
-0.05117790773510933,
-0.08559142798185349,
0.026848597452044487,
-0.007718263193964958,
0.09118630737066269,
-0.02170303277671337,
-0.05356442183256149,
-0.01821221597492695,
0.10036395490169525,
0.0031279658433049917,
0.05598071217536926,
0.010930893942713737,
-0.02302074432373047,
-0.014757470227777958,
-0.06809835135936737,
-0.03879864513874054,
0.018189938738942146,
-0.035574741661548615,
-0.005028713960200548,
-0.0027069489005953074,
0.04028289392590523,
0.037656020373106,
0.11550526320934296,
0.08330737799406052,
-0.028035292401909828,
-0.11044906824827194,
-0.04265526309609413,
0.0014856726629659534,
-0.009143550880253315,
-0.015117404982447624,
-0.08814497292041779,
0.04036545008420944,
-0.006350473500788212,
0.051132455468177795,
-0.03762984648346901,
-0.0387292243540287,
0.04148733615875244,
-0.020917093381285667,
-0.04908842593431473,
-0.04017233848571777,
0.05809783190488815,
0.016325462609529495,
0.04480663686990738,
-0.008531823754310608,
0.014520627446472645,
0.04216448962688446,
0.032381124794483185,
0.05275594815611839,
-0.0290360227227211,
-0.05845561996102333,
0.019780036062002182,
-0.06096169725060463,
0.06748830527067184,
-0.059755075722932816,
0.01916421204805374,
-0.004130485001951456,
-0.005655304994434118,
0.020887264981865883,
0.11711180955171585,
-0.02110431157052517,
-0.036194246262311935,
-0.00593705615028739,
-0.05615904927253723,
-0.01834462583065033,
-0.05614113435149193,
0.02510794997215271,
-0.004487188067287207,
-0.01009128987789154,
-0.011344783008098602,
0.015499561093747616,
0.03621478006243706,
-0.10232507437467575,
-0.05732308328151703,
-0.00029529049061238766,
0.034443486481904984,
-0.005638285540044308,
-0.0201480221003294,
-0.0048305923119187355,
0.041523974388837814,
0.012369685806334019,
0.02170637436211109,
-0.04694440960884094,
0.09134577214717865,
0.036465421319007874,
-0.06559900939464569,
-0.03378460556268692,
-0.023496126756072044,
-0.02004254050552845,
0.06511145085096359,
0.03507804498076439,
0.06680990755558014,
0.01219040434807539,
0.062140755355358124,
-0.044819485396146774,
-0.04163234680891037,
0.04587818309664726,
0.019160838797688484,
0.04156790301203728,
0.04538017138838768,
-0.007225163280963898,
-0.006996511947363615,
0.07970786094665527,
0.030163073912262917,
0.014809730462729931,
-0.013685940764844418,
0.023527100682258606,
-0.004284791648387909,
0.08158203959465027,
0.040193792432546616,
-0.05544804036617279,
-0.0022687644232064486,
0.0024602278135716915,
-0.08446189761161804,
-0.025816412642598152,
-0.03575732931494713,
2.011516769715645e-33,
0.03150162473320961,
-0.0726257786154747,
0.017508255317807198,
-0.0344504788517952,
0.0029181719291955233,
-0.07335585355758667,
-0.02037007547914982,
0.05234396457672119,
-0.06968807429075241,
0.010655052028596401,
-0.05356740579009056,
0.009374169632792473,
0.008765071630477905,
0.05304373428225517,
-0.004861579276621342,
-0.06680489331483841,
-0.05315040796995163,
0.02930588088929653,
0.107928566634655,
0.02582773193717003,
0.05407730117440224,
-0.075899638235569,
-0.08783750236034393,
0.022148597985506058,
-0.013537686318159103,
0.0007799030863679945,
0.03409980982542038,
-0.11418226361274719,
-0.05362752079963684,
0.034464627504348755,
-0.050281308591365814,
-0.022280622273683548,
0.0017828675918281078,
-0.006570618133991957,
-0.08392307162284851,
-0.04597058147192001,
0.061161793768405914,
0.016653433442115784,
-0.08336585760116577,
-0.061839353293180466,
0.05835440754890442,
0.006414719857275486,
0.029902368783950806,
-0.06569661945104599,
-0.030777979642152786,
-0.023536110296845436,
0.031172212213277817,
-0.08319921046495438,
-0.04178311303257942,
0.09947118163108826,
0.027736326679587364,
-0.03367793187499046,
0.021894829347729683,
0.009223980829119682,
0.08712215721607208,
-0.019291771575808525,
0.10410910844802856,
0.028540367260575294,
0.034777410328388214,
0.0729421004652977,
-0.024351248517632484,
-0.01507964264601469,
-0.0020711373072117567,
0.011427689343690872,
0.016160476952791214,
0.0730736032128334,
-0.044751089066267014,
0.07710438966751099,
-0.010081229731440544,
0.09625376760959625,
-0.06220076233148575,
0.0139901889488101,
0.05053967610001564,
0.0004968861467204988,
-0.04004848748445511,
-0.05538226291537285,
0.022699112072587013,
-0.012509070336818695,
-0.16656748950481415,
0.00806279107928276,
0.024662379175424576,
0.015740999951958656,
-0.018801309168338776,
-0.010231341235339642,
-0.08352126181125641,
-0.012993908487260342,
-0.0011026777792721987,
0.06475263088941574,
-0.05600587651133537,
0.06448516994714737,
0.016750620678067207,
0.00610830495133996,
-0.09393777698278427,
-0.033779047429561615,
-0.14122913777828217,
-2.638559068235847e-33,
0.03906581550836563,
-0.019161442294716835,
-0.04721114784479141,
0.04281020537018776,
0.049636438488960266,
-0.009496139362454414,
0.0273530762642622,
0.025188162922859192,
-0.05254651606082916,
-0.09262433648109436,
-0.06913668662309647,
-0.09143071621656418,
0.040469828993082047,
0.041090335696935654,
-0.07936053723096848,
-0.02070561796426773,
-0.08448689430952072,
-0.02517014741897583,
0.027078576385974884,
0.042600683867931366,
-0.08546297252178192,
0.028931409120559692,
0.13939303159713745,
0.03082079440355301,
0.0032292669638991356,
0.0026071600150316954,
-0.00020366444368846714,
-0.002702916506677866,
0.04887831583619118,
-0.050915371626615524,
0.031969744712114334,
-0.12344139069318771,
-0.016141051426529884,
0.05668462812900543,
0.00895716156810522,
-0.04034760594367981,
-0.022184647619724274,
0.07185178995132446,
0.017168859019875526,
0.003550252877175808,
0.0557878240942955,
0.010845226235687733,
-0.039902303367853165,
-0.016985192894935608,
-0.04069948196411133,
-0.04042482376098633,
-0.0059292190708220005,
-0.031178368255496025,
0.03548174723982811,
-0.12619204819202423,
0.049523551017045975,
-0.0017954849172383547,
-0.046015992760658264,
0.125690758228302,
-0.01785285584628582,
-0.04864028841257095,
0.00620928592979908,
0.03780877962708473,
-0.0005435668863356113,
-0.029561443254351616,
0.08041974157094955,
-0.04176655784249306,
0.015206805430352688,
-0.017339641228318214,
0.031104134395718575,
-0.059966329485177994,
-0.0072717005386948586,
0.027268119156360626,
-0.023893333971500397,
0.057128582149744034,
0.07148358970880508,
0.024973105639219284,
0.07237368822097778,
0.0868682861328125,
-0.03709646314382553,
0.02762032300233841,
-0.030300382524728775,
-0.016306402161717415,
0.05357468128204346,
0.009203238412737846,
-0.07931938022375107,
0.13328026235103607,
-0.028453834354877472,
0.029047373682260513,
0.03264176845550537,
0.05348319932818413,
0.03474164754152298,
0.057311948388814926,
-0.019411569461226463,
0.03851958364248276,
0.027611980214715004,
-0.0043203989043831825,
-0.03736834600567818,
0.08968936651945114,
-0.015702610835433006,
-4.459673519363605e-8,
0.12613411247730255,
-0.022492198273539543,
0.023249242454767227,
0.07963908463716507,
0.06948183476924896,
-0.023083047941327095,
0.026042096316814423,
0.019087526947259903,
-0.01209725346416235,
0.039584312587976456,
0.03790850564837456,
0.005285914987325668,
-0.0949491560459137,
0.026694241911172867,
0.09094120562076569,
-0.014430091716349125,
-0.016923444345593452,
0.06543464213609695,
0.016715867444872856,
-0.10095752030611038,
-0.07711990922689438,
-0.0537908636033535,
-0.033834122121334076,
-0.028493184596300125,
-0.01223271805793047,
0.05423489585518837,
0.09961628168821335,
0.050435926765203476,
0.0018148914678022265,
-0.06745414435863495,
-0.058605924248695374,
-0.02074783481657505,
-0.10117482393980026,
-0.012743365950882435,
0.007061637472361326,
-0.008077021688222885,
-0.15291625261306763,
0.058618512004613876,
0.008016462437808514,
0.04737001657485962,
-0.0696989968419075,
-0.08932825177907944,
-0.02329140529036522,
-0.0008964889566414058,
0.017994852736592293,
0.03890935704112053,
-0.06830945611000061,
0.033704448491334915,
-0.009858645498752594,
0.04090093821287155,
0.022470029070973396,
-0.016740962862968445,
-0.012361363507807255,
0.0867675393819809,
-0.033036284148693085,
0.03177275508642197,
-0.02339250221848488,
-0.03941218927502632,
-0.06913772225379944,
-0.0033128969371318817,
0.07036750018596649,
0.03834211453795433,
-0.013962313532829285,
0.019711934030056
] | 0.16549
|
```yaml ... containers: name: pod-resources-demo-ctr-1 resources: requests: cpu: 500m memory: 50Mi limits: cpu: 500m memory: 100Mi ... name: pod-resources-demo-ctr-2 resources: {} resources: limits: cpu: 1 memory: 200Mi requests: cpu: 1 memory: 100Mi ... ``` Since pod-level requests and limits are specified, the request guarantees for both containers in the pod will be equal 1 core or CPU and 100Mi of memory. Additionally, both containers together won't be able to use more resources than specified in the pod-level limits, ensuring they cannot exceed a combined total of 200 MiB of memory and 1 core of CPU. ## Clean up Delete your namespace: ```shell kubectl delete namespace pod-resources-example ``` ## {{% heading "whatsnext" %}} ### For application developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-pod-level-resources.md
|
[
0.07599086314439774,
0.02270389162003994,
-0.007518932223320007,
-0.00007635030488017946,
-0.03917114809155464,
-0.0987541452050209,
-0.02885672077536583,
0.00658615306019783,
0.05771230533719063,
0.0388345792889595,
-0.032972898334264755,
-0.049093153327703476,
-0.016924472525715828,
-0.04538220167160034,
0.056932710111141205,
-0.004274980165064335,
0.07206562906503677,
0.032608047127723694,
-0.06857997924089432,
-0.01450504269450903,
0.08456633239984512,
0.010872903279960155,
0.023948004469275475,
-0.02642064541578293,
-0.050787318497896194,
0.014432388357818127,
-0.08168844133615494,
-0.04766375944018364,
0.027430614456534386,
-0.04898802936077118,
0.005577185656875372,
-0.01666898839175701,
-0.020024435594677925,
0.0483233779668808,
0.07824783027172089,
0.11860855668783188,
-0.026218246668577194,
-0.10087665915489197,
-0.03320136293768883,
-0.022009920328855515,
-0.008737112395465374,
0.011540964245796204,
-0.10843227058649063,
0.039987556636333466,
-0.03894512727856636,
0.04343476891517639,
-0.06450839340686798,
-0.02706218883395195,
0.022442203015089035,
-0.037582360208034515,
-0.012977803125977516,
-0.06295254081487656,
0.05754290148615837,
0.010554873384535313,
0.07621946930885315,
0.03897888958454132,
-0.006721696350723505,
0.03706895560026169,
0.03643113747239113,
0.046872373670339584,
-0.029353199526667595,
-0.022824395447969437,
0.04376739636063576,
-0.06901101768016815,
0.06576378643512726,
-0.06728284060955048,
0.051950372755527496,
0.042689766734838486,
-0.044151272624731064,
0.042795222252607346,
0.08146315813064575,
-0.0014332778519019485,
-0.008734681643545628,
-0.029643861576914787,
-0.03536367788910866,
-0.004086051136255264,
-0.05709711089730263,
0.05310763418674469,
-0.036520298570394516,
-0.021220512688159943,
-0.010881053283810616,
0.04646681249141693,
0.029663650318980217,
-0.12899145483970642,
-0.06273344159126282,
0.0009675784385763109,
0.010322793386876583,
-0.015492982231080532,
-0.009543588384985924,
0.005349917337298393,
0.06020285561680794,
-0.014246167615056038,
0.05491189658641815,
-0.044991493225097656,
0.08797842264175415,
0.004346082918345928,
-0.026742566376924515,
-0.009441688656806946,
-0.006533407140523195,
-0.045496683567762375,
0.07077217102050781,
0.04109037667512894,
0.06388416141271591,
0.008312543854117393,
0.06531290709972382,
-0.05386129021644592,
-0.04974895715713501,
0.01290097739547491,
0.010245543904602528,
0.05649794265627861,
0.02782585844397545,
0.028690503910183907,
0.013616478070616722,
0.0637715682387352,
0.013617600314319134,
0.00446727592498064,
-0.016872582957148552,
-0.013963314704596996,
0.04721938446164131,
0.05466165766119957,
0.05487774685025215,
-0.0856616199016571,
0.011343471705913544,
0.017364056780934334,
-0.05161251127719879,
-0.03520522639155388,
-0.06263886392116547,
5.007469283284662e-33,
-0.00614247377961874,
-0.09466676414012909,
-0.001365986536256969,
-0.014739136211574078,
0.02322441153228283,
-0.08405071496963501,
-0.03725002706050873,
0.05820932984352112,
-0.07965150475502014,
-0.01485949382185936,
-0.04932874068617821,
0.04195088520646095,
-0.046376828104257584,
0.012357181869447231,
0.007528184913098812,
-0.04861115664243698,
-0.0302868839353323,
0.04261288791894913,
0.08601216226816177,
0.001505073276348412,
0.030470706522464752,
-0.06112431734800339,
-0.07192716747522354,
0.028669042512774467,
0.02835368923842907,
-0.026310870423913002,
0.04491521790623665,
-0.12533746659755707,
-0.012464785017073154,
0.00883194524794817,
-0.043284740298986435,
-0.001330023631453514,
0.0206909142434597,
0.05288366973400116,
-0.06471704691648483,
-0.022254806011915207,
0.049562256783246994,
0.047901976853609085,
-0.11303810030221939,
-0.04443886876106262,
0.030095569789409637,
0.03342878818511963,
0.03947555273771286,
-0.058246344327926636,
0.00040128911496140063,
-0.05442475154995918,
0.06346124410629272,
-0.07132934033870697,
-0.0715380311012268,
0.059574805200099945,
0.020037271082401276,
-0.029675547033548355,
-0.03603512421250343,
0.014732259325683117,
0.0758008360862732,
-0.027176519855856895,
0.06086722016334534,
0.0251813605427742,
-0.01904762163758278,
0.04423348605632782,
-0.091093048453331,
-0.029845908284187317,
0.01562783308327198,
0.03327907249331474,
0.061026208102703094,
0.0696665495634079,
-0.019854247570037842,
0.08075478672981262,
-0.0029318646993488073,
0.12928546965122223,
-0.043552909046411514,
0.004357732832431793,
0.04231724143028259,
0.0323217511177063,
-0.016596384346485138,
-0.061136648058891296,
0.03696826472878456,
-0.012769313529133797,
-0.17041294276714325,
0.025295130908489227,
0.0264345221221447,
0.03656492009758949,
-0.032181158661842346,
0.028396807610988617,
-0.09143928438425064,
-0.03495652973651886,
0.007365843281149864,
0.052683763206005096,
-0.05592408776283264,
0.07296853512525558,
0.01926552876830101,
0.0018379867542535067,
-0.04448573291301727,
-0.06291160732507706,
-0.13177143037319183,
-5.382311656558842e-33,
0.06697173416614532,
-0.015519649721682072,
-0.027407290413975716,
0.0648811012506485,
0.0220163706690073,
-0.012193948030471802,
0.014772468246519566,
0.017557604238390923,
-0.034866418689489365,
-0.10576903074979782,
-0.09492559731006622,
-0.07493732869625092,
0.049698032438755035,
0.05853407829999924,
-0.08548829704523087,
0.01404668390750885,
-0.03381897509098053,
-0.021896731108427048,
-0.014936069957911968,
0.02269895374774933,
-0.07539968937635422,
0.045971401035785675,
0.11133510619401932,
0.028313856571912766,
0.008123328909277916,
0.0066161323338747025,
-0.011969082057476044,
-0.009759456850588322,
0.005033939611166716,
-0.023138338699936867,
0.015325726941227913,
-0.12169509381055832,
-0.020110148936510086,
0.023467818275094032,
-0.0033955806866288185,
-0.049363136291503906,
-0.04024560749530792,
0.0699467584490776,
-0.0032762351911514997,
-0.003508208552375436,
0.07746621966362,
-0.010922055691480637,
-0.0574566051363945,
-0.05525530129671097,
-0.07810577005147934,
-0.029999034479260445,
-0.02099638804793358,
-0.06287681311368942,
0.019984740763902664,
-0.1031862124800682,
0.039204537868499756,
-0.007533090654760599,
-0.07869840413331985,
0.08104874193668365,
0.015522626228630543,
-0.05728160962462425,
0.02965235710144043,
0.03417433798313141,
-0.022010382264852524,
-0.018840989097952843,
0.07818370312452316,
-0.02655767649412155,
-0.0022346898913383484,
0.00648220581933856,
0.022718656808137894,
-0.06391894817352295,
-0.024363193660974503,
0.0017328377580270171,
0.007242374122142792,
0.04898355156183243,
0.05111144855618477,
0.04129276052117348,
0.05581827089190483,
0.08289340138435364,
-0.04509371146559715,
0.0009653325541876256,
-0.004367581102997065,
-0.030125347897410393,
0.0831826850771904,
0.03877662867307663,
-0.10636895149946213,
0.14910367131233215,
-0.03384850546717644,
-0.008443227969110012,
-0.009130493737757206,
0.09869235754013062,
0.041216857731342316,
0.09026788175106049,
-0.014278705231845379,
0.03159598261117935,
0.045588698238134384,
-0.008960871025919914,
-0.015329744666814804,
0.08629211783409119,
-0.03305244445800781,
-4.379775120355589e-8,
0.10245593637228012,
-0.018632778897881508,
-0.015687547624111176,
0.0619448758661747,
0.024935508146882057,
-0.05404546484351158,
0.042827971279621124,
0.06236783042550087,
-0.001473919372074306,
0.08018142729997635,
0.005351426545530558,
0.03519764170050621,
-0.08434775471687317,
0.019623931497335434,
0.07109538465738297,
-0.015274749137461185,
0.025014327839016914,
0.04226228594779968,
0.009928311221301556,
-0.11912032216787338,
-0.06442373245954514,
-0.03925001248717308,
-0.0399664044380188,
0.001562962424941361,
0.012270303443074226,
0.06389288604259491,
0.1116284430027008,
0.03392897918820381,
0.018356025218963623,
-0.045597564429044724,
-0.04502742737531662,
-0.03302854672074318,
-0.11415912210941315,
0.021075716242194176,
0.04815752059221268,
-0.05083504691720009,
-0.13392479717731476,
0.0905371755361557,
0.006842396687716246,
0.05507940798997879,
-0.04434221610426903,
-0.07302895933389664,
-0.024605102837085724,
0.021196797490119934,
0.01729341223835945,
0.039659835398197174,
-0.05651605874300003,
0.05767236649990082,
0.00527181988582015,
0.02440115436911583,
0.023150984197854996,
-0.011143742129206657,
0.0038218654226511717,
0.07206909358501434,
-0.002755975117906928,
0.02600487694144249,
-0.0026791084092110395,
0.007164589129388332,
-0.03908029571175575,
-0.012844928540289402,
0.060044065117836,
-0.00335073284804821,
-0.015909040346741676,
0.008706113323569298
] | 0.131718
|
{{< feature-state feature\_gate\_name="DynamicResourceAllocation" >}} This page shows you how to configure \_dynamic resource allocation (DRA)\_ in a Kubernetes cluster by enabling API groups and configuring classes of devices. These instructions are for cluster administrators. ## About DRA {#about-dra} {{< glossary\_definition term\_id="dra" length="all" >}} Ensure that you're familiar with how DRA works and with DRA terminology like {{< glossary\_tooltip text="DeviceClasses" term\_id="deviceclass" >}}, {{< glossary\_tooltip text="ResourceClaims" term\_id="resourceclaim" >}}, and {{< glossary\_tooltip text="ResourceClaimTemplates" term\_id="resourceclaimtemplate" >}}. For details, see [Dynamic Resource Allocation (DRA)](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/). ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* Directly or indirectly attach devices to your cluster. To avoid potential issues with drivers, wait until you set up the DRA feature for your cluster before you install drivers. ## Optional: enable additional DRA API groups {#enable-dra} DRA overall is a stable feature in Kubernetes; however, aspects of it may still be alpha or beta. If you want to use any aspect of DRA that is not yet stable, and the associated feature relies on a dedicated API kind, then you must enable the associated alpha or beta API groups. Some older DRA drivers or workloads might still need the v1beta1 API from Kubernetes 1.30 or v1beta2 from Kubernetes 1.32. If and only if support for those is desired, then enable the following {{< glossary\_tooltip text="API groups" term\_id="api-group" >}}: \* `resource.k8s.io/v1beta1` \* `resource.k8s.io/v1beta2` Alpha features with separate API types need: \* `resource.k8s.io/v1alpha3` For more information, see [Enabling or disabling API groups](/docs/reference/using-api/#enabling-or-disabling). ## Verify that DRA is enabled {#verify} To verify that the cluster is configured correctly, try to list DeviceClasses: ```shell kubectl get deviceclasses ``` If the component configuration was correct, the output is similar to the following: ``` No resources found ``` If DRA isn't correctly configured, the output of the preceding command is similar to the following: ``` error: the server doesn't have a resource type "deviceclasses" ``` For example, this can occur when the resource.k8s.io API group was disabled. A similar check is applicable to alpha or beta quality top-level types. Try the following troubleshooting steps: 1. Reconfigure and restart the `kube-apiserver` component. 1. If the complete `.spec.resourceClaims` field gets removed from Pods, or if Pods get scheduled without considering the ResourceClaims, then verify that the `DynamicResourceAllocation` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is not turned off for kube-apiserver, kube-controller-manager, kube-scheduler or the kubelet. ## Install device drivers {#install-drivers} After you enable DRA for your cluster, you can install the drivers for your attached devices. For instructions, check the documentation of your device owner or the project that maintains the device drivers. The drivers that you install must be compatible with DRA. To verify that your installed drivers are working as expected, list ResourceSlices in your cluster: ```shell kubectl get resourceslices ``` The output is similar to the following: ``` NAME NODE DRIVER POOL AGE cluster-1-device-pool-1-driver.example.com-lqx8x cluster-1-node-1 driver.example.com cluster-1-device-pool-1-r1gc 7s cluster-1-device-pool-2-driver.example.com-29t7b cluster-1-node-2 driver.example.com cluster-1-device-pool-2-446z 8s ``` Try the following troubleshooting steps: 1. Check the health of the DRA driver and look for error messages about publishing ResourceSlices in its log output. The vendor of the driver may have further instructions about installation and troubleshooting. ## Create DeviceClasses {#create-deviceclasses} You can define categories of devices that your application operators can claim in workloads by creating {{< glossary\_tooltip text="DeviceClasses" term\_id="deviceclass" >}}. Some device driver providers might also instruct you to create DeviceClasses during driver installation. The ResourceSlices that your driver publishes contain information about the devices that the driver manages, such as capacity, metadata, and attributes. You can use {{< glossary\_tooltip term\_id="cel" >}} to filter for properties in your DeviceClasses, which can make finding devices easier for your workload operators. 1.
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster.md
|
[
-0.06388653069734573,
0.019401829689741135,
0.05752440169453621,
0.018308693543076515,
-0.09521273523569107,
-0.010610740631818771,
0.06109265610575676,
-0.04136587306857109,
0.048828672617673874,
0.014929140917956829,
-0.049257032573223114,
-0.10468550771474838,
-0.03739374503493309,
-0.0023493014741688967,
-0.0036862981505692005,
0.035762373358011246,
0.03188059851527214,
-0.027276720851659775,
-0.08691710978746414,
-0.014028146862983704,
0.1386449933052063,
0.06538700312376022,
0.03393847495317459,
0.009961243718862534,
-0.030290530994534492,
0.020171862095594406,
-0.012641899287700653,
-0.004854504484683275,
0.08094143867492676,
0.00805880781263113,
-0.03766164183616638,
0.00037355287349782884,
-0.06537693738937378,
0.05098981410264969,
0.09974829107522964,
0.05558568611741066,
-0.04020943492650986,
-0.02864622138440609,
-0.05985885113477707,
0.05403520166873932,
0.051514752209186554,
-0.007221165578812361,
-0.08249782770872116,
-0.030052900314331055,
-0.002454967936500907,
0.02262687310576439,
-0.04841435328125954,
0.041662801057100296,
0.005579278338700533,
-0.01244202721863985,
0.05583477020263672,
-0.08268317580223083,
-0.0022713870275765657,
0.03317047283053398,
0.04258918762207031,
0.04737681522965431,
0.0184218417853117,
0.022494344040751457,
0.09833117574453354,
0.00766192190349102,
0.03159309923648834,
0.0004316616978030652,
0.04489831626415253,
0.000465564604382962,
0.009055480360984802,
-0.008669828996062279,
0.04051133245229721,
0.03692727908492088,
-0.04315536096692085,
-0.04574374854564667,
0.012739424593746662,
-0.028642993420362473,
0.018985988572239876,
-0.012511021457612514,
0.052252087742090225,
0.04024985432624817,
-0.05739197880029678,
0.08796975016593933,
0.033059682697057724,
-0.13775736093521118,
0.039070211350917816,
0.0761139839887619,
0.10354217886924744,
0.0680931955575943,
-0.015886010602116585,
-0.04435356706380844,
0.0000810759884188883,
-0.06834223121404648,
0.10410154610872269,
-0.022838393226265907,
0.014159508049488068,
-0.056937482208013535,
0.0191769078373909,
-0.10820119082927704,
0.057829760015010834,
0.003068811260163784,
-0.01389048621058464,
-0.09855642914772034,
-0.0003323570126667619,
-0.01761072501540184,
-0.0011650682426989079,
-0.041829902678728104,
-0.00543332751840353,
0.001289564766921103,
-0.0250512957572937,
-0.0005795732722617686,
-0.12012127041816711,
-0.012788232415914536,
-0.03919471055269241,
0.02433549426496029,
0.02486107498407364,
0.12409428507089615,
-0.02506072260439396,
0.02664373442530632,
-0.03186677023768425,
-0.07558545470237732,
-0.0038281723391264677,
-0.03908684477210045,
0.08250515162944794,
0.037127535790205,
-0.02170643024146557,
-0.12620463967323303,
-0.040129002183675766,
-0.028809677809476852,
-0.017230696976184845,
0.018564652651548386,
-0.07846524566411972,
2.7410713591771663e-33,
0.04451380670070648,
-0.09850361198186874,
-0.06358455866575241,
-0.01994899846613407,
-0.05771911144256592,
-0.09231981635093689,
-0.03513956815004349,
0.0013503790833055973,
-0.08201105147600174,
-0.05706750601530075,
-0.021367991343140602,
0.15176792442798615,
-0.017482705414295197,
-0.04704480618238449,
0.007931790314614773,
0.00520001444965601,
0.04886539280414581,
0.08445633202791214,
0.08987942337989807,
-0.027923591434955597,
0.026994997635483742,
-0.009431624785065651,
0.0420098640024662,
-0.08107700943946838,
0.041824452579021454,
0.024279523640871048,
0.0054837861098349094,
-0.05118587985634804,
0.0044497158378362656,
0.005733753554522991,
-0.016010655090212822,
-0.042439673095941544,
0.047634050250053406,
-0.0064452881924808025,
-0.1128849908709526,
0.004775519482791424,
-0.08093354105949402,
-0.013707743026316166,
-0.006694655399769545,
-0.015229973010718822,
0.023014074191451073,
-0.03918604180216789,
0.01379731297492981,
-0.12442070245742798,
0.03849942982196808,
0.056764889508485794,
0.04861791059374809,
-0.12395020574331284,
0.048382703214883804,
0.006578514352440834,
0.001183614251203835,
-0.0582585446536541,
0.009687022306025028,
-0.009143272414803505,
0.029881810769438744,
0.015926523134112358,
0.017668087035417557,
-0.04687060788273811,
0.009996620006859303,
0.004779546521604061,
-0.09170501679182053,
0.045178208500146866,
-0.050853971391916275,
-0.004218112677335739,
0.029136521741747856,
-0.0413908027112484,
0.007372675929218531,
0.10248319804668427,
-0.01583126373589039,
-0.03640473634004593,
-0.00047606148291379213,
-0.02705470100045204,
0.047859445214271545,
0.09010209888219833,
0.011239598505198956,
-0.07176267355680466,
0.015267517417669296,
0.04013340547680855,
-0.15597759187221527,
0.02120574377477169,
0.006335764657706022,
-0.0435708612203598,
-0.01656240038573742,
0.03750695660710335,
0.02746102400124073,
-0.047560058534145355,
0.03186257183551788,
-0.06757641583681107,
-0.06062395125627518,
0.037685710936784744,
-0.03203285485506058,
-0.06710880249738693,
-0.07026267051696777,
0.007503941189497709,
-0.06841336935758591,
-4.883069654873016e-33,
0.09992801398038864,
-0.020783258602023125,
0.038759760558605194,
0.02654143236577511,
0.02989298477768898,
-0.009334487840533257,
-0.002674961229786277,
0.07300582528114319,
0.012304392643272877,
-0.010964790359139442,
-0.022517815232276917,
0.024350011721253395,
0.016427183523774147,
0.06207815557718277,
-0.03865902125835419,
0.06843744218349457,
-0.07157666981220245,
0.015124506317079067,
-0.024141361936926842,
0.03972136229276657,
0.021220803260803223,
0.0031937970779836178,
0.026861045509576797,
0.010981790721416473,
0.01374767255038023,
-0.04949898272752762,
0.06042154133319855,
0.04337109252810478,
-0.01720365695655346,
-0.054802004247903824,
-0.028722938150167465,
-0.026950230821967125,
-0.10214819014072418,
-0.02385726384818554,
0.00442712614312768,
-0.09289823472499847,
-0.0036341126542538404,
-0.034964028745889664,
0.0038714411202818155,
0.06964060664176941,
0.10072541981935501,
-0.019939517602324486,
-0.0013800428714603186,
-0.06530142575502396,
0.007376801688224077,
0.03614116460084915,
0.012440886348485947,
-0.036719102412462234,
-0.024838989600539207,
-0.07477723062038422,
0.0818156823515892,
-0.028846919536590576,
-0.017712019383907318,
0.05922143533825874,
-0.07296912372112274,
0.06488198786973953,
0.11545135080814362,
-0.02373003587126732,
-0.03749861195683479,
0.019716400653123856,
0.04597216472029686,
-0.11025573313236237,
0.03230530396103859,
0.03681511804461479,
-0.008277863264083862,
-0.05467589572072029,
-0.0014132210053503513,
-0.03922894224524498,
-0.012964194640517235,
0.0011323151411488652,
-0.06937345117330551,
-0.029324933886528015,
0.006695087067782879,
-0.018683988600969315,
-0.030668718740344048,
0.05452190339565277,
0.04643824324011803,
-0.07518833130598068,
0.07544293254613876,
-0.045390963554382324,
-0.03670240193605423,
0.03802656754851341,
0.012051403522491455,
0.008686191402375698,
0.016560649499297142,
0.05848054215312004,
0.04191223531961441,
0.11665093153715134,
0.009628896601498127,
0.09605230391025543,
-0.03105522133409977,
-0.05791277065873146,
0.028233828023076057,
0.1553342342376709,
-0.06101203337311745,
-4.5807755810756134e-8,
0.018712535500526428,
0.1158728376030922,
0.04039502516388893,
0.023491598665714264,
0.000575478479731828,
-0.05806291103363037,
0.06445266306400299,
0.026644624769687653,
-0.005174675490707159,
-0.015153458341956139,
0.004846685566008091,
0.07743703573942184,
-0.00428850669413805,
0.0640261322259903,
-0.028043804690241814,
0.06888414174318314,
-0.08997666090726852,
-0.023295681923627853,
0.015565798617899418,
-0.07440638542175293,
0.04500769451260567,
-0.04699883982539177,
0.04070614278316498,
0.044065672904253006,
0.009889200329780579,
-0.009237224236130714,
0.028116567060351372,
0.009694743901491165,
-0.02483779564499855,
0.02214283123612404,
-0.01785593293607235,
0.0298426765948534,
-0.0635935440659523,
0.06863612681627274,
-0.006796152330935001,
-0.053484074771404266,
-0.09241192787885666,
0.02262534201145172,
0.06830716133117676,
0.06215602904558182,
0.02964184433221817,
-0.009347397834062576,
-0.060741350054740906,
0.0132718151435256,
0.06683196872472763,
0.07512407749891281,
-0.026033788919448853,
0.0512152723968029,
-0.01727328822016716,
0.0014250681269913912,
-0.044002652168273926,
-0.0376446507871151,
-0.030934523791074753,
0.05376451089978218,
-0.026150669902563095,
-0.03863043710589409,
-0.00825593527406454,
-0.009468981996178627,
0.02656007744371891,
0.0025256092194467783,
-0.008330482058227062,
0.011786766350269318,
-0.010007418692111969,
-0.00637368019670248
] | 0.06745
|
DeviceClasses during driver installation. The ResourceSlices that your driver publishes contain information about the devices that the driver manages, such as capacity, metadata, and attributes. You can use {{< glossary\_tooltip term\_id="cel" >}} to filter for properties in your DeviceClasses, which can make finding devices easier for your workload operators. 1. To find the device properties that you can select in DeviceClasses by using CEL expressions, get the specification of a ResourceSlice: ```shell kubectl get resourceslice -o yaml ``` The output is similar to the following: ```yaml apiVersion: resource.k8s.io/v1 kind: ResourceSlice # lines omitted for clarity spec: devices: - attributes: type: string: gpu capacity: memory: value: 64Gi name: gpu-0 - attributes: type: string: gpu capacity: memory: value: 64Gi name: gpu-1 driver: driver.example.com nodeName: cluster-1-node-1 # lines omitted for clarity ``` You can also check the driver provider's documentation for available properties and values. 1. Review the following example DeviceClass manifest, which selects any device that's managed by the `driver.example.com` device driver: {{% code\_sample file="dra/deviceclass.yaml" %}} 1. Create the DeviceClass in your cluster: ```shell kubectl apply -f https://k8s.io/examples/dra/deviceclass.yaml ``` ## Clean up {#clean-up} To delete the DeviceClass that you created in this task, run the following command: ```shell kubectl delete -f https://k8s.io/examples/dra/deviceclass.yaml ``` ## {{% heading "whatsnext" %}} \* [Learn more about DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation) \* [Allocate Devices to Workloads with DRA](/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster.md
|
[
0.027419578284025192,
0.035426732152700424,
0.023255225270986557,
0.02860262803733349,
0.013411848805844784,
-0.04742431640625,
0.03232375532388687,
-0.020863186568021774,
0.04727626591920853,
-0.04776982218027115,
-0.015251271426677704,
-0.11729562282562256,
-0.01451694592833519,
-0.021588647738099098,
0.014984285458922386,
-0.024475721642374992,
0.06842964887619019,
-0.011593712493777275,
-0.018154602497816086,
-0.038640156388282776,
0.12552504241466522,
0.03335842490196228,
0.02893330529332161,
-0.01788887195289135,
-0.0621689110994339,
-0.04417619854211807,
0.04823211580514908,
-0.003724152222275734,
0.04702068865299225,
-0.06273656338453293,
-0.04100402444601059,
0.06795280426740646,
0.010235014371573925,
0.018783459439873695,
0.11156632751226425,
0.035848621279001236,
0.03912748768925667,
-0.07838015258312225,
-0.08620268106460571,
-0.020691916346549988,
0.033186644315719604,
-0.06625600159168243,
-0.03642614558339119,
0.013885934837162495,
0.00021112972171977162,
0.007430686615407467,
-0.05823865905404091,
-0.04080692306160927,
0.014493179507553577,
-0.08149678260087967,
0.023489322513341904,
-0.07036476582288742,
-0.0012095345882698894,
0.008883724920451641,
0.06078539043664932,
-0.02376950904726982,
-0.027331607416272163,
0.0434187576174736,
0.11040250211954117,
0.057065997272729874,
0.028056329116225243,
-0.03756839781999588,
0.030584663152694702,
-0.004846577066928148,
-0.03889686241745949,
0.0071726455353200436,
0.039757974445819855,
-0.04520511254668236,
-0.045139361172914505,
-0.010277257300913334,
0.045469045639038086,
-0.016227856278419495,
-0.002656978089362383,
-0.005486318375915289,
0.006155899725854397,
0.046475935727357864,
0.019682126119732857,
0.08605252951383591,
0.017410648986697197,
-0.12676884233951569,
-0.036602046340703964,
0.034238073974847794,
0.06020025536417961,
-0.0007144844857975841,
0.0010513196466490626,
-0.020423026755452156,
-0.024417689070105553,
-0.005587780848145485,
0.044871095567941666,
0.019792897626757622,
0.008044246584177017,
-0.02835780568420887,
-0.03994873911142349,
-0.09202302992343903,
0.06653257459402084,
0.04462004080414772,
-0.04434850066900253,
-0.056493327021598816,
-0.01952391304075718,
0.007864679209887981,
-0.01782328076660633,
0.0368586927652359,
0.0473114550113678,
0.08319373428821564,
-0.05653678625822067,
0.034225620329380035,
-0.09343282133340836,
0.045309748500585556,
-0.04406196251511574,
0.04479260742664337,
0.046974655240774155,
0.06324146687984467,
-0.07158870995044708,
0.007797827012836933,
0.03515699878334999,
-0.017916101962327957,
-0.007363526150584221,
0.022529825568199158,
0.05238834768533707,
0.04680453985929489,
-0.0439457930624485,
-0.08721595257520676,
-0.02922556921839714,
-0.02207433059811592,
-0.054438285529613495,
0.038697756826877594,
-0.06521417945623398,
2.6589728133348222e-33,
0.09644020348787308,
-0.06221546232700348,
0.00902004074305296,
-0.0343216210603714,
-0.05730735883116722,
-0.09826160222291946,
-0.031535614281892776,
0.008387863636016846,
-0.015504155308008194,
-0.02160792052745819,
-0.09096668660640717,
0.09856164455413818,
-0.07728340476751328,
-0.011633981950581074,
0.05091660097241402,
0.03173457086086273,
-0.05315978825092316,
0.056264981627464294,
0.04965567961335182,
0.012443560175597668,
0.053957272320985794,
-0.042236316949129105,
-0.025452639907598495,
0.013240782544016838,
0.030223002657294273,
0.028385059908032417,
-0.002229922916740179,
-0.10703283548355103,
0.004053586162626743,
0.039607781916856766,
-0.006088370457291603,
-0.07557161897420883,
-0.019687741994857788,
-0.01793689653277397,
-0.10910507291555405,
0.007840698584914207,
-0.053459227085113525,
0.029109477996826172,
-0.0738392099738121,
0.005006845109164715,
0.04800540953874588,
-0.01466642040759325,
-0.0027595662977546453,
-0.08659979701042175,
-0.04029441624879837,
-0.03603158891201019,
-0.0011454271152615547,
-0.10039105266332626,
0.051656968891620636,
0.041443292051553726,
-0.06347813457250595,
-0.0379430316388607,
0.03252002224326134,
-0.06764040142297745,
0.06529540568590164,
-0.008332635276019573,
0.09951277077198029,
0.038726236671209335,
0.007835714146494865,
0.010515491478145123,
-0.059319790452718735,
0.0057595097459852695,
0.010631943121552467,
0.025844646617770195,
0.006048102397471666,
-0.009838604368269444,
-0.04404962807893753,
0.014511044137179852,
-0.1084589883685112,
0.01825552247464657,
-0.05083927884697914,
0.03997208923101425,
0.020253736525774002,
0.01716107316315174,
0.048724085092544556,
-0.08028609305620193,
-0.028857938945293427,
-0.03116748109459877,
-0.15688252449035645,
0.07554454356431961,
-0.02999153733253479,
-0.01268770545721054,
-0.009562801569700241,
0.034725088626146317,
-0.036644648760557175,
-0.09740717709064484,
0.009294810704886913,
-0.005637936294078827,
-0.02803364023566246,
0.025704653933644295,
-0.03884913772344589,
-0.02921237237751484,
-0.1086767390370369,
-0.006029952317476273,
-0.13559862971305847,
-4.575339192823157e-33,
0.07776733487844467,
-0.024008728563785553,
0.12500019371509552,
-0.007039141375571489,
0.02261246182024479,
-0.03291519731283188,
0.02652086317539215,
0.03266831487417221,
0.004230090882629156,
-0.04965512827038765,
0.022854076698422432,
0.0027316345367580652,
0.02344382181763649,
-0.02360890991985798,
-0.026479648426175117,
0.048045121133327484,
-0.13744361698627472,
-0.03244302049279213,
0.01688866689801216,
0.039040762931108475,
-0.08451388776302338,
0.04345273599028587,
0.11613908410072327,
0.017559386789798737,
-0.01260613463819027,
-0.036511827260255814,
0.0407966747879982,
0.023555560037493706,
-0.061525553464889526,
-0.02725125476717949,
0.04282510653138161,
-0.06216231733560562,
-0.07914336770772934,
0.06892286241054535,
-0.0007404099451377988,
-0.034909602254629135,
-0.001973486738279462,
0.034739430993795395,
-0.017602985724806786,
0.022070957347750664,
0.0329875722527504,
0.039377495646476746,
-0.041658610105514526,
0.021827224642038345,
-0.029740381985902786,
-0.03104901872575283,
0.07544328272342682,
-0.07255683839321136,
0.05222655087709427,
-0.10226882249116898,
0.09610156714916229,
0.0397571362555027,
-0.06705617904663086,
0.07323458045721054,
-0.04075762629508972,
0.02966635301709175,
0.07964671403169632,
0.06583232432603836,
-0.07389902323484421,
-0.017579102888703346,
0.05347883701324463,
-0.0905611664056778,
0.013930870220065117,
0.0054688360542058945,
-0.026266606524586678,
-0.053399279713630676,
0.0024363230913877487,
0.010057691484689713,
-0.012053227983415127,
0.010511377826333046,
-0.04596602916717529,
-0.0408327616751194,
0.00345014245249331,
0.03371618688106537,
-0.026477279141545296,
0.019217822700738907,
-0.000052789837354794145,
-0.0115669509395957,
0.07242899388074875,
-0.0002858896041288972,
0.0021944560576230288,
0.0337873175740242,
-0.027139997109770775,
0.020312078297138214,
0.048855338245630264,
0.043177083134651184,
0.04606066271662712,
0.07870849967002869,
0.09632377326488495,
0.04200219362974167,
-0.05677447468042374,
0.029438737779855728,
-0.08666147291660309,
0.14686612784862518,
-0.09572204947471619,
-5.078630849197907e-8,
0.05824653059244156,
0.0019280887208878994,
-0.013055340386927128,
0.033481840044260025,
0.05753174051642418,
-0.023343464359641075,
0.03294597566127777,
0.031320180743932724,
-0.03203832730650902,
0.020643092691898346,
0.0450858436524868,
0.0017348892288282514,
-0.019895656034350395,
0.053234416991472244,
0.07860706746578217,
0.030614230781793594,
-0.036803968250751495,
0.09172000735998154,
0.029963521286845207,
-0.05254508927464485,
0.02111409418284893,
-0.05395043268799782,
0.015756651759147644,
0.004208959173411131,
0.06024087592959404,
0.0026414450258016586,
-0.00024732828023843467,
-0.016078948974609375,
0.015483006834983826,
-0.012128063477575779,
-0.02028588391840458,
0.018684741109609604,
-0.07730682939291,
0.048077210783958435,
0.07058362662792206,
0.01133209653198719,
-0.0796036645770073,
0.09831041097640991,
0.08476443588733673,
0.12216430902481079,
-0.005626835860311985,
-0.01960298791527748,
-0.06596116721630096,
0.023197568953037262,
0.032117873430252075,
0.08044242858886719,
-0.0557231530547142,
0.07058118283748627,
-0.0450228787958622,
0.04763173311948776,
-0.020336663350462914,
-0.082198865711689,
-0.059686627238988876,
0.07225263118743896,
-0.11503402143716812,
0.012994843535125256,
-0.015064644627273083,
-0.037388481199741364,
-0.010984571650624275,
-0.04352974519133568,
0.018027590587735176,
0.021564846858382225,
0.05948431417346001,
-0.0038403638172894716
] | 0.127017
|
{{< feature-state feature\_gate\_name="DynamicResourceAllocation" >}} This page shows you how to allocate devices to your Pods by using \_dynamic resource allocation (DRA)\_. These instructions are for workload operators. Before reading this page, familiarize yourself with how DRA works and with DRA terminology like {{< glossary\_tooltip text="ResourceClaims" term\_id="resourceclaim" >}} and {{< glossary\_tooltip text="ResourceClaimTemplates" term\_id="resourceclaimtemplate" >}}. For more information, see [Dynamic Resource Allocation (DRA)](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/). ## About device allocation with DRA {#about-device-allocation-dra} As a workload operator, you can \_claim\_ devices for your workloads by creating ResourceClaims or ResourceClaimTemplates. When you deploy your workload, Kubernetes and the device drivers find available devices, allocate them to your Pods, and place the Pods on nodes that can access those devices. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* Ensure that your cluster admin has set up DRA, attached devices, and installed drivers. For more information, see [Set Up DRA in a Cluster](/docs/tasks/configure-pod-container/assign-resources/set-up-dra-cluster). ## Identify devices to claim {#identify-devices} Your cluster administrator or the device drivers create \_{{< glossary\_tooltip term\_id="deviceclass" text="DeviceClasses" >}}\_ that define categories of devices. You can claim devices by using {{< glossary\_tooltip term\_id="cel" >}} to filter for specific device properties. Get a list of DeviceClasses in the cluster: ```shell kubectl get deviceclasses ``` The output is similar to the following: ``` NAME AGE driver.example.com 16m ``` If you get a permission error, you might not have access to get DeviceClasses. Check with your cluster administrator or with the driver provider for available device properties. ## Claim resources {#claim-resources} You can request resources from a DeviceClass by using {{< glossary\_tooltip text="ResourceClaims" term\_id="resourceclaim" >}}. To create a ResourceClaim, do one of the following: \* Manually create a ResourceClaim if you want multiple Pods to share access to the same devices, or if you want a claim to exist beyond the lifetime of a Pod. \* Use a {{< glossary\_tooltip text="ResourceClaimTemplate" term\_id="resourceclaimtemplate" >}} to let Kubernetes generate and manage per-Pod ResourceClaims. Create a ResourceClaimTemplate if you want every Pod to have access to separate devices that have similar configurations. For example, you might want simultaneous access to devices for Pods in a Job that uses [parallel execution](/docs/concepts/workloads/controllers/job/#parallel-jobs). If you directly reference a specific ResourceClaim in a Pod, that ResourceClaim must already exist in the cluster. If a referenced ResourceClaim doesn't exist, the Pod remains in a pending state until the ResourceClaim is created. You can reference an auto-generated ResourceClaim in a Pod, but this isn't recommended because auto-generated ResourceClaims are bound to the lifetime of the Pod that triggered the generation. To create a workload that claims resources, select one of the following options: {{< tabs name="claim-resources" >}} {{% tab name="ResourceClaimTemplate" %}} Review the following example manifest: {{% code\_sample file="dra/resourceclaimtemplate.yaml" %}} This manifest creates a ResourceClaimTemplate that requests devices in the `example-device-class` DeviceClass that match both of the following parameters: \* Devices that have a `driver.example.com/type` attribute with a value of `gpu`. \* Devices that have `64Gi` of capacity. To create the ResourceClaimTemplate, run the following command: ```shell kubectl apply -f https://k8s.io/examples/dra/resourceclaimtemplate.yaml ``` {{% /tab %}} {{% tab name="ResourceClaim" %}} Review the following example manifest: {{% code\_sample file="dra/resourceclaim.yaml" %}} This manifest creates ResourceClaim that requests devices in the `example-device-class` DeviceClass that match both of the following parameters: \* Devices that have a `driver.example.com/type` attribute with a value of `gpu`. \* Devices that have `64Gi` of capacity. To create the ResourceClaim, run the following command: ```shell kubectl apply -f https://k8s.io/examples/dra/resourceclaim.yaml ``` {{% /tab %}} {{< /tabs >}} ## Request devices in workloads using DRA {#request-devices-workloads} To request device allocation, specify a ResourceClaim or a ResourceClaimTemplate in the `resourceClaims` field of the Pod specification. Then,
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra.md
|
[
-0.02262764237821102,
0.022683318704366684,
0.08692771941423416,
0.01390944141894579,
-0.044874802231788635,
-0.03597693517804146,
0.07480800896883011,
-0.02067461796104908,
0.06787221878767014,
0.03464052081108093,
-0.019209638237953186,
-0.052580785006284714,
-0.010172720067203045,
-0.007040354423224926,
-0.010574937798082829,
0.02303587645292282,
0.03722817823290825,
-0.0016971699660643935,
-0.0668160542845726,
0.012376343831419945,
0.14042620360851288,
0.04195171222090721,
0.017283296212553978,
0.013652212917804718,
-0.011916019022464752,
0.03543461859226227,
-0.009851811453700066,
-0.024841012433171272,
0.07648301869630814,
0.0023820544593036175,
-0.04914000630378723,
0.003518741810694337,
-0.027218936011195183,
0.03246550261974335,
0.09501516819000244,
0.02669552154839039,
-0.05100049823522568,
-0.06055918708443642,
-0.08150975406169891,
0.013369540683925152,
0.03934576362371445,
-0.05331411957740784,
-0.10456172376871109,
0.03131888061761856,
-0.022692587226629257,
0.03509033843874931,
-0.00911014899611473,
0.012502149678766727,
0.030002938583493233,
-0.03510889410972595,
0.043512698262929916,
-0.07158216089010239,
0.019943611696362495,
0.05741658806800842,
0.03866987302899361,
0.025580115616321564,
0.04554971680045128,
0.03826990723609924,
0.12038391083478928,
0.03398340567946434,
0.05788843333721161,
-0.02345043420791626,
0.026411281898617744,
-0.001290657906793058,
0.05251540243625641,
-0.043279699981212616,
0.030108029022812843,
0.04001050069928169,
-0.05406242609024048,
-0.03940759599208832,
0.041257016360759735,
-0.0019378470024093986,
0.016135964542627335,
-0.04259241744875908,
0.047409556806087494,
0.022049542516469955,
-0.02052520588040352,
0.07936888933181763,
0.0322616882622242,
-0.11909753084182739,
0.04696870967745781,
0.0708812028169632,
0.08765064924955368,
-0.0021525039337575436,
-0.020134110003709793,
-0.03960616514086723,
-0.0034522477071732283,
-0.05406377837061882,
0.07214105129241943,
0.010134615935385227,
0.03095368668437004,
-0.06828632205724716,
0.00034464028431102633,
-0.0867728441953659,
0.04985097423195839,
-0.01770908385515213,
-0.0063337343744933605,
-0.0474126897752285,
0.008061752654612064,
-0.018547996878623962,
0.006003012415021658,
-0.017409684136509895,
0.004251866135746241,
0.004139333497732878,
0.009920238517224789,
-0.03482937812805176,
-0.13022670149803162,
-0.03797987848520279,
0.001179297687485814,
0.02879362739622593,
0.06146269291639328,
0.06470194458961487,
-0.05158505216240883,
0.06339261680841446,
-0.011567746289074421,
-0.026603862643241882,
-0.05638740584254265,
0.0119669483974576,
0.0591721348464489,
0.01409416738897562,
-0.029828963801264763,
-0.11298087984323502,
-0.007259497884660959,
-0.04155030474066734,
-0.04216920956969261,
0.019239844754338264,
-0.06745655834674835,
3.905449574202506e-33,
0.04882163554430008,
-0.10096756368875504,
-0.06415721029043198,
0.021542945876717567,
-0.05400175601243973,
-0.09977235645055771,
-0.04053768515586853,
0.037515901029109955,
-0.053352463990449905,
-0.036402322351932526,
-0.0445113405585289,
0.15023525059223175,
-0.042680371552705765,
0.013978537172079086,
0.005102439317852259,
-0.043348249047994614,
-0.0166022852063179,
0.07617455720901489,
0.12990283966064453,
0.0009609602857381105,
0.031295932829380035,
-0.044581081718206406,
0.00045152936945669353,
-0.05531524866819382,
0.07319500297307968,
0.008188553154468536,
0.002355164149776101,
-0.08720380067825317,
-0.008865168318152428,
0.03507588803768158,
-0.06638757884502411,
-0.032570235431194305,
0.06454931944608688,
0.011856652796268463,
-0.1024446040391922,
0.009153823368251324,
-0.0825340747833252,
-0.033778589218854904,
-0.02789945714175701,
-0.020382337272167206,
0.033994972705841064,
-0.054196298122406006,
-0.018541663885116577,
-0.11192427575588226,
-0.01190252136439085,
-0.01115766353905201,
0.04442514106631279,
-0.10398659110069275,
0.03655998408794403,
0.038852471858263016,
-0.0016910332487896085,
-0.06645315140485764,
0.005984840914607048,
-0.041238509118556976,
0.03038017265498638,
-0.03144555538892746,
0.0033214129507541656,
-0.06985701620578766,
0.02229033224284649,
-0.0010016764281317592,
-0.09112681448459625,
0.01874041184782982,
-0.025913378223776817,
0.020502282306551933,
0.03134353086352348,
0.01880033314228058,
0.011067853309214115,
0.09197095036506653,
0.009104745462536812,
0.0017054452328011394,
-0.015344439074397087,
-0.006232889834791422,
0.041951727122068405,
0.03887579217553139,
-0.0029391853604465723,
-0.05609855428338051,
-0.006826812867075205,
0.037264592945575714,
-0.21459712088108063,
0.039379239082336426,
0.0031601928640156984,
0.008313944563269615,
-0.03538312762975693,
0.05449705943465233,
-0.0037717309314757586,
-0.019529014825820923,
0.005573188420385122,
-0.08575094491243362,
-0.07737910747528076,
0.039121586829423904,
-0.010439448989927769,
-0.044113028794527054,
-0.08012644946575165,
-0.0117219602689147,
-0.10205342620611191,
-5.858084178846532e-33,
0.07057778537273407,
-0.00905029196292162,
0.03227457404136658,
-0.01607067883014679,
0.004297703038901091,
-0.017259862273931503,
-0.015222229063510895,
0.03948572278022766,
-0.02138795331120491,
-0.03125298395752907,
-0.09414985775947571,
-0.006986926309764385,
-0.012775922194123268,
0.04421120136976242,
-0.0631355494260788,
0.04054972156882286,
-0.08931634575128555,
-0.04446053132414818,
-0.034792352467775345,
0.02208540216088295,
-0.0109080346301198,
0.03999560698866844,
0.0890183374285698,
0.014271965250372887,
0.003465712070465088,
-0.030652359127998352,
0.023613927885890007,
0.036549679934978485,
0.0268180500715971,
-0.061127033084630966,
-0.020776931196451187,
-0.0914769321680069,
-0.0811522901058197,
-0.04584368318319321,
0.038027048110961914,
-0.03941385820508003,
-0.030524615198373795,
0.0421084426343441,
0.015475168824195862,
0.02993803098797798,
0.08799676597118378,
-0.030619585886597633,
-0.02254568785429001,
-0.032027386128902435,
0.001712436438538134,
-0.00567482877522707,
-0.012285150587558746,
-0.02730635181069374,
-0.002114993752911687,
-0.10659084469079971,
0.11322631686925888,
0.016049740836024284,
-0.07523561269044876,
0.08461205661296844,
-0.0717618465423584,
0.06222845986485481,
0.12194158136844635,
-0.016294259577989578,
-0.0284445621073246,
0.015739712864160538,
0.07012606412172318,
-0.1084560751914978,
0.0375349223613739,
0.028765849769115448,
-0.06506148725748062,
-0.05940897390246391,
0.023384733125567436,
-0.03383879363536835,
-0.01441697496920824,
0.008561864495277405,
-0.03726143389940262,
-0.017476193606853485,
0.019590238109230995,
-0.0066697848960757256,
-0.03306683152914047,
0.028480328619480133,
0.027864966541528702,
-0.0801023468375206,
0.08138982951641083,
-0.012220521457493305,
-0.0363616906106472,
0.05901698023080826,
0.0009700688533484936,
0.006954245734959841,
0.026318693533539772,
0.009905911982059479,
0.07396259903907776,
0.08849794417619705,
0.026326483115553856,
0.11558736860752106,
-0.031069740653038025,
0.019437870010733604,
-0.024605419486761093,
0.15350835025310516,
-0.04913405328989029,
-4.9889216313658835e-8,
0.054259732365608215,
0.10121438652276993,
0.05750120058655739,
0.024833019822835922,
-0.025605669245123863,
-0.09484146535396576,
0.09279260039329529,
0.041367411613464355,
-0.012841282412409782,
-0.012751595117151737,
0.025045350193977356,
0.02581370808184147,
-0.015404261648654938,
0.051661375910043716,
0.024571014568209648,
0.08648768067359924,
-0.025863241404294968,
-0.008656119927763939,
-0.015606461092829704,
-0.09872718900442123,
-0.005360765382647514,
-0.04733089730143547,
0.04951225966215134,
0.028116732835769653,
0.02614632062613964,
0.03583553060889244,
0.049821887165308,
0.01091098878532648,
-0.0020437883213162422,
0.01126231998205185,
-0.029043640941381454,
0.02149743214249611,
-0.08003902435302734,
0.06869690120220184,
0.009653308428823948,
-0.0034200316295027733,
-0.11051420122385025,
0.008955131284892559,
0.06528159230947495,
0.08262760192155838,
-0.03876027837395668,
-0.04485134407877922,
-0.019353248178958893,
0.028835779055953026,
0.028248049318790436,
0.055659741163253784,
-0.08031223714351654,
0.05898222699761391,
-0.029091332107782364,
0.026626259088516235,
-0.0436905138194561,
-0.055657196789979935,
-0.013578144833445549,
0.08024492859840393,
-0.01776527613401413,
-0.021487323567271233,
0.023945285007357597,
-0.012311648577451706,
0.03246292471885681,
0.01650363579392433,
-0.01634642481803894,
0.03438540920615196,
0.008967448025941849,
-0.012537413276731968
] | 0.135411
|
`64Gi` of capacity. To create the ResourceClaim, run the following command: ```shell kubectl apply -f https://k8s.io/examples/dra/resourceclaim.yaml ``` {{% /tab %}} {{< /tabs >}} ## Request devices in workloads using DRA {#request-devices-workloads} To request device allocation, specify a ResourceClaim or a ResourceClaimTemplate in the `resourceClaims` field of the Pod specification. Then, request a specific claim by name in the `resources.claims` field of a container in that Pod. You can specify multiple entries in the `resourceClaims` field and use specific claims in different containers. 1. Review the following example Job: {{% code\_sample file="dra/dra-example-job.yaml" %}} Each Pod in this Job has the following properties: \* Makes a ResourceClaimTemplate named `separate-gpu-claim` and a ResourceClaim named `shared-gpu-claim` available to containers. \* Runs the following containers: \* `container0` requests the devices from the `separate-gpu-claim` ResourceClaimTemplate. \* `container1` and `container2` share access to the devices from the `shared-gpu-claim` ResourceClaim. 1. Create the Job: ```shell kubectl apply -f https://k8s.io/examples/dra/dra-example-job.yaml ``` Try the following troubleshooting steps: 1. When the workload does not start as expected, drill down from Job to Pods to ResourceClaims and check the objects at each level with `kubectl describe` to see whether there are any status fields or events which might explain why the workload is not starting. 1. When creating a Pod fails with `must specify one of: resourceClaimName, resourceClaimTemplateName`, check that all entries in `pod.spec.resourceClaims` have exactly one of those fields set. If they do, then it is possible that the cluster has a mutating Pod webhook installed which was built against APIs from Kubernetes < 1.32. Work with your cluster administrator to check this. ## Clean up {#clean-up} To delete the Kubernetes objects that you created in this task, follow these steps: 1. Delete the example Job: ```shell kubectl delete -f https://k8s.io/examples/dra/dra-example-job.yaml ``` 1. To delete your resource claims, run one of the following commands: \* Delete the ResourceClaimTemplate: ```shell kubectl delete -f https://k8s.io/examples/dra/resourceclaimtemplate.yaml ``` \* Delete the ResourceClaim: ```shell kubectl delete -f https://k8s.io/examples/dra/resourceclaim.yaml ``` ## {{% heading "whatsnext" %}} \* [Learn more about DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation)
| null |
./vendor/kubernetes/content/en/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra.md
|
[
-0.039584431797266006,
0.04470536857843399,
-0.004720737691968679,
0.00195035757496953,
-0.018948111683130264,
-0.048989005386829376,
0.008754847571253777,
-0.010892830789089203,
0.05429718270897865,
0.02629469335079193,
-0.0616406686604023,
-0.09453501552343369,
0.0098918741568923,
0.033402927219867706,
0.012784034945070744,
-0.05641607567667961,
0.02019348554313183,
0.014296399429440498,
-0.037626538425683975,
-0.007470055017620325,
0.13085435330867767,
0.0010290223872289062,
0.023454105481505394,
0.001013989676721394,
-0.03935007005929947,
-0.029875803738832474,
0.0026717339642345905,
-0.005598591174930334,
0.041975826025009155,
-0.08173763006925583,
0.019123030826449394,
0.018868349492549896,
-0.0029602095019072294,
-0.03312094137072563,
0.1394481658935547,
0.09072033315896988,
-0.05863078311085701,
-0.1100289523601532,
-0.08277059346437454,
0.009281552396714687,
0.04818875342607498,
-0.024710379540920258,
-0.13040974736213684,
0.006658370140939951,
-0.03525608777999878,
-0.022386571392416954,
0.01736859418451786,
0.04590079188346863,
0.047466158866882324,
-0.007405368611216545,
0.06537166982889175,
-0.0544380359351635,
0.029099490493535995,
0.05687282979488373,
0.023774083703756332,
-0.04036030173301697,
0.020231012254953384,
-0.009262301959097385,
0.04935840144753456,
0.03631831333041191,
0.016183460131287575,
-0.039502665400505066,
0.08819453418254852,
-0.025923950597643852,
0.061928313225507736,
0.002541665453463793,
0.0006339651299640536,
0.037282854318618774,
-0.05594433844089508,
-0.004056408070027828,
0.08412522077560425,
-0.007966158911585808,
-0.024462461471557617,
-0.01662643998861313,
-0.01975417695939541,
0.021415280178189278,
-0.06588330864906311,
0.04655950516462326,
0.005745860282331705,
-0.09602048248052597,
-0.03576149046421051,
0.03993532061576843,
0.06926597654819489,
-0.07861281931400299,
-0.029740765690803528,
0.00022116527543403208,
-0.01758083514869213,
-0.017777293920516968,
0.05094130337238312,
-0.02330589108169079,
0.062324993312358856,
-0.010290086269378662,
0.025978103280067444,
-0.09173457324504852,
0.11721006780862808,
-0.04265488684177399,
-0.03667601943016052,
-0.022765720263123512,
0.04505819454789162,
-0.014283113181591034,
0.010724203661084175,
0.017311854287981987,
0.03084115870296955,
0.008043020032346249,
0.061812154948711395,
-0.016349710524082184,
-0.08693110197782516,
-0.023330215364694595,
-0.029610028490424156,
0.03808935731649399,
0.03557969629764557,
0.027625974267721176,
-0.03955651819705963,
0.06296370923519135,
0.03143874183297157,
-0.00072863680543378,
-0.03001953475177288,
0.02248404733836651,
0.015511038713157177,
-0.00027194604626856744,
0.017697608098387718,
-0.0886741653084755,
-0.013730423524975777,
0.011370961554348469,
-0.0620637983083725,
0.00807869527488947,
-0.08035988360643387,
3.517057424483191e-33,
0.09156478196382523,
-0.07831896096467972,
0.035979051142930984,
-0.03974615037441254,
0.010592370294034481,
-0.083639957010746,
-0.007535920478403568,
0.021484648808836937,
-0.018036700785160065,
-0.007486179005354643,
-0.08344091475009918,
0.12229660898447037,
-0.013418429531157017,
-0.05100142955780029,
-0.0401129424571991,
0.010298892855644226,
-0.05786622315645218,
0.06263603270053864,
0.12934762239456177,
0.030610142275691032,
0.05111735686659813,
-0.04813773185014725,
-0.015359343960881233,
-0.01311891246587038,
0.04231524094939232,
-0.015388592146337032,
0.018980467692017555,
-0.09605173766613007,
0.009545614942908287,
0.011794372461736202,
0.0340890996158123,
-0.09135257452726364,
0.018636375665664673,
0.060872361063957214,
-0.10996987670660019,
-0.028494756668806076,
-0.016933225095272064,
0.03580639883875847,
-0.09883171319961548,
-0.018520744517445564,
0.035143762826919556,
-0.0320991650223732,
0.05457224324345589,
-0.06454573571681976,
-0.029322290793061256,
-0.03351212665438652,
0.035406604409217834,
-0.08850421756505966,
-0.00007733670645393431,
0.09664309024810791,
0.016045182943344116,
-0.06823121011257172,
0.032926104962825775,
-0.06000775843858719,
0.06891133636236191,
-0.04813804477453232,
0.010637108236551285,
0.000053371470130514354,
0.07821974903345108,
0.02237400785088539,
-0.10055910050868988,
-0.011225243099033833,
-0.046372924000024796,
0.028744524344801903,
-0.029220229014754295,
0.059114210307598114,
-0.01566755212843418,
0.048493560403585434,
-0.017673447728157043,
0.02536364644765854,
-0.04067546874284744,
0.003891940927132964,
-0.00797319132834673,
0.004059444181621075,
-0.03239515423774719,
-0.09766045957803726,
0.042007967829704285,
0.019444448873400688,
-0.18360361456871033,
0.052094630897045135,
-0.01853751204907894,
0.011278582736849785,
-0.04966188222169876,
0.029852164909243584,
-0.06545162200927734,
0.012971661053597927,
-0.011392946355044842,
-0.03325192257761955,
-0.0681556761264801,
-0.010446249507367611,
-0.014032033272087574,
0.0012918602442368865,
-0.02405747026205063,
-0.007911339402198792,
-0.037743017077445984,
-4.385663995768365e-33,
0.07146308571100235,
-0.0033861917909234762,
0.09208541363477707,
0.028639912605285645,
0.0599106103181839,
-0.014879468828439713,
0.02901259995996952,
0.052407193928956985,
0.005678798537701368,
-0.01922406256198883,
-0.0784962996840477,
-0.056884244084358215,
0.03867979347705841,
0.020600203424692154,
-0.08489636331796646,
0.021810997277498245,
-0.05173506215214729,
0.004994033370167017,
-0.032635290175676346,
0.039286091923713684,
-0.02730759233236313,
0.04540476202964783,
0.1107863336801529,
0.02077486179769039,
0.03618508204817772,
0.006845279596745968,
-0.005665950942784548,
-0.0404958613216877,
-0.0040304833091795444,
-0.0514562763273716,
0.023563263937830925,
-0.09484846889972687,
-0.1018713116645813,
-0.006859020795673132,
-0.01815381646156311,
-0.10759162157773972,
-0.024338435381650925,
0.12152542918920517,
-0.007364856079220772,
0.05184876546263695,
0.10115987807512283,
-0.0417749285697937,
-0.01415619533509016,
0.05669434741139412,
-0.057367198169231415,
-0.025253484025597572,
0.06344687193632126,
-0.08592522144317627,
0.028709638863801956,
-0.09109553694725037,
0.024339713156223297,
-0.016391627490520477,
-0.06333726644515991,
0.12277697026729584,
-0.017214644700288773,
-0.019347522407770157,
0.07007399201393127,
0.05383189022541046,
-0.049009598791599274,
0.02434816025197506,
0.09964507073163986,
-0.08013086020946503,
0.07476360350847244,
0.05445074290037155,
-0.039133064448833466,
-0.11173807084560394,
0.01929020881652832,
-0.024836834520101547,
-0.01189279556274414,
0.09454357624053955,
0.0019567073322832584,
-0.01789809763431549,
0.0005027090664952993,
0.03033214434981346,
-0.014629061333835125,
-0.009518023580312729,
-0.02323136106133461,
-0.07924965023994446,
0.03493493050336838,
0.057758886367082596,
-0.046334583312273026,
0.035452742129564285,
0.000779448717366904,
-0.02256127819418907,
0.07760000228881836,
0.08047985285520554,
0.08606746792793274,
0.05826878547668457,
0.03744003549218178,
0.1325259655714035,
-0.028251806274056435,
0.013532455079257488,
-0.014423282817006111,
0.0858667641878128,
-0.061491526663303375,
-4.292431654562279e-8,
0.07517711073160172,
0.005761357489973307,
0.042908359318971634,
0.022875070571899414,
-0.006762407254427671,
-0.10188299417495728,
0.03273765742778778,
0.012808576226234436,
-0.019537722691893578,
-0.011485781520605087,
0.026784837245941162,
0.008861164562404156,
-0.04294028505682945,
-0.018959395587444305,
0.017925864085555077,
0.02158650942146778,
-0.0005398407229222357,
0.05209696292877197,
0.01747322268784046,
-0.0730879008769989,
-0.005788588430732489,
-0.04550518840551376,
0.03673960641026497,
0.012827574275434017,
0.004934550262987614,
0.08190160989761353,
0.059368643909692764,
-0.060867492109537125,
0.022612595930695534,
-0.008226541802287102,
-0.018086159601807594,
0.006903143133968115,
-0.0636141449213028,
0.018309397622942924,
0.029685599729418755,
-0.04703174903988838,
-0.06278785318136215,
0.06866157054901123,
-0.013527716509997845,
0.04357266426086426,
-0.06077507510781288,
-0.01989547349512577,
-0.01548908744007349,
-0.011237923055887222,
0.0444968119263649,
0.05660734325647354,
-0.0895686000585556,
0.04336569458246231,
-0.042235031723976135,
0.02855103462934494,
0.008635173551738262,
-0.08063807338476181,
0.005151556339114904,
0.12481223791837692,
-0.0005766251706518233,
0.013570542447268963,
-0.014052297919988632,
-0.04645536094903946,
0.025933265686035156,
-0.009855253621935844,
0.0704936683177948,
-0.00516793318092823,
0.03160650655627251,
-0.009473170153796673
] | 0.146363
|
{{< feature-state feature\_gate\_name="HugePages" >}} Kubernetes supports the allocation and consumption of pre-allocated huge pages by applications in a Pod. This page describes how users can consume huge pages. ## {{% heading "prerequisites" %}} Kubernetes nodes must [pre-allocate huge pages](https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html) in order for the node to report its huge page capacity. A node can pre-allocate huge pages for multiple sizes, for instance, the following line in `/etc/default/grub` allocates `2\*1GiB` of 1 GiB and `512\*2 MiB` of 2 MiB pages: ``` GRUB\_CMDLINE\_LINUX="hugepagesz=1G hugepages=2 hugepagesz=2M hugepages=512" ``` The nodes will automatically discover and report all huge page resources as schedulable resources. When you describe the Node, you should see something similar to the following in the following in the `Capacity` and `Allocatable` sections: ``` Capacity: cpu: ... ephemeral-storage: ... hugepages-1Gi: 2Gi hugepages-2Mi: 1Gi memory: ... pods: ... Allocatable: cpu: ... ephemeral-storage: ... hugepages-1Gi: 2Gi hugepages-2Mi: 1Gi memory: ... pods: ... ``` {{< note >}} For dynamically allocated pages (after boot), the Kubelet needs to be restarted for the new allocations to be refrelected. {{< /note >}} ## API Huge pages can be consumed via container level resource requirements using the resource name `hugepages-`, where `` is the most compact binary notation using integer values supported on a particular node. For example, if a node supports 2048KiB and 1048576KiB page sizes, it will expose a schedulable resources `hugepages-2Mi` and `hugepages-1Gi`. Unlike CPU or memory, huge pages do not support overcommit. Note that when requesting hugepage resources, either memory or CPU resources must be requested as well. A pod may consume multiple huge page sizes in a single pod spec. In this case it must use `medium: HugePages-` notation for all volume mounts. ```yaml apiVersion: v1 kind: Pod metadata: name: huge-pages-example spec: containers: - name: example image: fedora:latest command: - sleep - inf volumeMounts: - mountPath: /hugepages-2Mi name: hugepage-2mi - mountPath: /hugepages-1Gi name: hugepage-1gi resources: limits: hugepages-2Mi: 100Mi hugepages-1Gi: 2Gi memory: 100Mi requests: memory: 100Mi volumes: - name: hugepage-2mi emptyDir: medium: HugePages-2Mi - name: hugepage-1gi emptyDir: medium: HugePages-1Gi ``` A pod may use `medium: HugePages` only if it requests huge pages of one size. ```yaml apiVersion: v1 kind: Pod metadata: name: huge-pages-example spec: containers: - name: example image: fedora:latest command: - sleep - inf volumeMounts: - mountPath: /hugepages name: hugepage resources: limits: hugepages-2Mi: 100Mi memory: 100Mi requests: memory: 100Mi volumes: - name: hugepage emptyDir: medium: HugePages ``` - Huge page requests must equal the limits. This is the default if limits are specified, but requests are not. - Huge pages are isolated at a container scope, so each container has own limit on their cgroup sandbox as requested in a container spec. - EmptyDir volumes backed by huge pages may not consume more huge page memory than the pod request. - Applications that consume huge pages via `shmget()` with `SHM\_HUGETLB` must run with a supplemental group that matches `proc/sys/vm/hugetlb\_shm\_group`. - Huge page usage in a namespace is controllable via ResourceQuota similar to other compute resources like `cpu` or `memory` using the `hugepages-` token.
| null |
./vendor/kubernetes/content/en/docs/tasks/manage-hugepages/scheduling-hugepages.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/manage-hugepages/scheduling-hugepages.md
|
[
0.026992961764335632,
0.041662175208330154,
0.02692723274230957,
0.048236943781375885,
0.01710578426718712,
-0.017869118601083755,
-0.04160958528518677,
-0.015302550047636032,
0.012243034318089485,
0.09880835562944412,
-0.031203769147396088,
0.037225328385829926,
-0.0028219991363584995,
-0.027584649622440338,
-0.0683361366391182,
-0.022643862292170525,
0.06652683019638062,
-0.017655247822403908,
-0.013323438353836536,
-0.052554186433553696,
0.10194379836320877,
0.02407645806670189,
0.0005701618501916528,
-0.0056921509094536304,
-0.0328974612057209,
-0.0007704177405685186,
-0.1273135542869568,
-0.030398478731513023,
0.05321093276143074,
-0.017175206914544106,
0.01557309553027153,
0.05689200758934021,
0.020481733605265617,
0.03794180974364281,
0.06564423441886902,
0.09919415414333344,
-0.07232914119958878,
-0.05527978390455246,
-0.05153432860970497,
-0.0035562689881771803,
0.0999193862080574,
0.004728259518742561,
-0.056902408599853516,
0.034688666462898254,
0.025681735947728157,
0.008343326859176159,
-0.08980803936719894,
-0.027394399046897888,
-0.030840320512652397,
-0.044835854321718216,
0.004467668943107128,
-0.07561255246400833,
0.04941360279917717,
0.013051681220531464,
0.08882192522287369,
-0.0001030205748975277,
-0.04654723033308983,
-0.021551238372921944,
0.029272856190800667,
0.05863523855805397,
0.03464987501502037,
-0.036680202931165695,
0.020366497337818146,
-0.03779638558626175,
0.05291052162647247,
0.050542715936899185,
0.0033553552348166704,
-0.011334878392517567,
-0.006487844046205282,
-0.02218349277973175,
0.08116982877254486,
0.04540157690644264,
-0.029297640547156334,
0.032827071845531464,
0.02754954993724823,
-0.06979460269212723,
-0.05217250809073448,
0.062239691615104675,
-0.022518983110785484,
-0.0708848312497139,
-0.04294333606958389,
0.03308100998401642,
0.05990120768547058,
-0.0617709644138813,
-0.06934377551078796,
0.0009774488862603903,
-0.026546144858002663,
-0.02567317895591259,
0.013030078262090683,
0.04040718823671341,
0.01981087028980255,
-0.03050871565937996,
-0.0030089854262769222,
-0.06922513246536255,
-0.016647974029183388,
0.027399377897381783,
-0.07667692005634308,
-0.03464636579155922,
0.03361738100647926,
-0.026962285861372948,
0.056093811988830566,
0.04029183089733124,
0.1019691526889801,
0.002975115552544594,
0.02700193226337433,
-0.07987736910581589,
-0.022281624376773834,
0.057271867990493774,
-0.011166214942932129,
0.0639406070113182,
0.01614648662507534,
0.06576086580753326,
-0.018120869994163513,
0.027753394097089767,
0.017834629863500595,
0.005593760870397091,
0.07901590317487717,
-0.0047477837651968,
0.06958676874637604,
0.07950764149427414,
0.04822854325175285,
-0.004341349005699158,
-0.03881027549505234,
-0.008614531718194485,
-0.04180656373500824,
0.04548260197043419,
-0.09404104202985764,
5.273147536959807e-33,
0.05037209764122963,
-0.026154525578022003,
0.016654182225465775,
-0.016713568940758705,
-0.045427367091178894,
-0.04663164168596268,
-0.022522276267409325,
-0.014712654985487461,
-0.0348106324672699,
0.015576058067381382,
-0.10740046948194504,
0.08316738903522491,
0.024841424077749252,
0.047686513513326645,
0.02973184362053871,
-0.026410195976495743,
-0.05066598206758499,
0.057774800807237625,
0.10804140567779541,
-0.050293050706386566,
0.05273214727640152,
-0.08410858362913132,
-0.019467413425445557,
-0.010799610055983067,
0.08075527846813202,
-0.06426312029361725,
0.03169187158346176,
-0.069184809923172,
-0.06327078491449356,
0.021491805091500282,
-0.050449106842279434,
0.006806465797126293,
0.014848711900413036,
0.00414047809317708,
-0.10809703916311264,
-0.05034079775214195,
-0.03587085008621216,
-0.010257687419652939,
-0.07210297882556915,
-0.03913241624832153,
-0.022107243537902832,
0.008104829117655754,
-0.019685393199324608,
-0.08235470950603485,
-0.050385236740112305,
-0.019242949783802032,
-0.01328075397759676,
-0.05643366277217865,
-0.003235430922359228,
0.059284381568431854,
0.04516678303480148,
-0.039815373718738556,
0.07554258406162262,
0.052067384123802185,
0.0463130846619606,
0.04638485610485077,
0.1576201617717743,
-0.03322676941752434,
0.028731180354952812,
0.10267707705497742,
-0.026108259335160255,
-0.07668866962194443,
-0.016409985721111298,
0.0201459638774395,
-0.00922117568552494,
0.026035942137241364,
-0.007149148732423782,
0.10351923108100891,
-0.05276630073785782,
-0.018011828884482384,
-0.023930706083774567,
-0.03081497922539711,
0.07911503314971924,
-0.02205580472946167,
-0.06597999483346939,
-0.06371654570102692,
-0.02153296209871769,
-0.010266786441206932,
-0.16389617323875427,
0.06724759936332703,
0.043982405215501785,
-0.04671662300825119,
0.058174971491098404,
0.01694716326892376,
0.006760424003005028,
-0.04525101184844971,
0.0318978875875473,
0.0068411631509661674,
-0.02310091257095337,
0.029808679595589638,
0.0446239709854126,
0.019267093390226364,
-0.0061222766526043415,
-0.006820883601903915,
-0.11926998198032379,
-4.521853097834789e-33,
0.01726529560983181,
0.047775108367204666,
0.0011813703458756208,
0.042000774294137955,
0.01610834151506424,
-0.025105008855462074,
-0.06953427195549011,
0.04877406731247902,
-0.027522454038262367,
-0.07771161943674088,
-0.0403183251619339,
-0.03340859338641167,
0.033527396619319916,
-0.02564508654177189,
-0.06309180706739426,
-0.0023212418891489506,
0.0227038711309433,
-0.053997959941625595,
-0.010846136137843132,
0.052755922079086304,
-0.04561712592840195,
0.019820954650640488,
0.04519009217619896,
-0.03669450059533119,
0.019631750881671906,
-0.0036419362295418978,
0.03586174547672272,
0.06576919555664062,
-0.07308581471443176,
0.007536113262176514,
0.010656610131263733,
-0.1646455079317093,
-0.060922544449567795,
0.07039517164230347,
0.05001796782016754,
-0.03864619508385658,
-0.029204927384853363,
0.0723799392580986,
0.008070874959230423,
0.03310677036643028,
0.05148099735379219,
0.03696732968091965,
-0.047177400439977646,
-0.01879069022834301,
-0.09754399210214615,
0.0068376814015209675,
0.030082885175943375,
-0.030114464461803436,
0.02463672310113907,
-0.11011702567338943,
-0.029360730201005936,
0.004808973055332899,
-0.009014839306473732,
0.07850879430770874,
-0.07191193848848343,
0.009476478211581707,
-0.014400715939700603,
0.09804318100214005,
0.0016244577709585428,
-0.02094435878098011,
0.04384709522128105,
-0.08668944984674454,
-0.019870741292834282,
0.036108870059251785,
-0.004685060121119022,
-0.08448431640863419,
-0.00393480621278286,
-0.014990774914622307,
-0.015196295455098152,
0.07342015951871872,
-0.04605900123715401,
0.018395978957414627,
0.03105331026017666,
0.0656106173992157,
-0.048801079392433167,
0.016092441976070404,
0.04127635061740875,
-0.01262617763131857,
0.06729916483163834,
0.003556321607902646,
-0.07369204610586166,
0.10643693059682846,
-0.03302844241261482,
-0.03813673555850983,
0.06186262518167496,
0.056178003549575806,
-0.021432926878333092,
0.05369121581315994,
0.005098522640764713,
0.0295932088047266,
-0.003946456126868725,
0.03547179326415062,
-0.0996192991733551,
0.09776971489191055,
-0.0013384969206526875,
-4.672844866604464e-8,
0.030712915584445,
0.02097221650183201,
-0.006056510843336582,
0.03274619206786156,
0.10092559456825256,
-0.11644219607114792,
0.14631198346614838,
0.132071390748024,
-0.02791570872068405,
0.051858920603990555,
0.025295298546552658,
0.02633000910282135,
-0.02881508134305477,
-0.05228441581130028,
0.06938856840133667,
-0.03563286364078522,
-0.00787062756717205,
-0.0062364134937524796,
-0.038475021719932556,
-0.0818038061261177,
-0.0420224629342556,
-0.05128071829676628,
0.013395174406468868,
0.017475834116339684,
0.04535236954689026,
-0.0042903306894004345,
0.03992264345288277,
0.07944808900356293,
0.0030251657590270042,
0.002512221224606037,
-0.030007919296622276,
0.00013483142538461834,
-0.12471482902765274,
0.007895811460912228,
0.04908674582839012,
0.03579689934849739,
-0.13728944957256317,
0.04375718906521797,
0.04716438055038452,
0.06485692411661148,
-0.0376296229660511,
-0.03772277012467384,
-0.008097253739833832,
0.041403550654649734,
0.009214193560183048,
0.043829064816236496,
-0.09331177175045013,
0.06920386850833893,
0.021451743319630623,
-0.015215030871331692,
0.031108787283301353,
-0.0343736968934536,
0.02379838563501835,
0.08005404472351074,
-0.01020106952637434,
-0.002519056433811784,
0.02079625613987446,
-0.048642996698617935,
0.01704924739897251,
0.031413640826940536,
-0.002984461607411504,
-0.010083702392876148,
-0.025921327993273735,
-0.012560831382870674
] | 0.179587
|
This page shows how to change the access mode on an existing PersistentVolume to use `ReadWriteOncePod`. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} {{< note >}} The `ReadWriteOncePod` access mode graduated to stable in the Kubernetes v1.29 release. If you are running a version of Kubernetes older than v1.29, you might need to enable a feature gate. Check the documentation for your version of Kubernetes. {{< /note >}} {{< note >}} The `ReadWriteOncePod` access mode is only supported for {{< glossary\_tooltip text="CSI" term\_id="csi" >}} volumes. To use this volume access mode you will need to update the following [CSI sidecars](https://kubernetes-csi.github.io/docs/sidecar-containers.html) to these versions or greater: \* [csi-provisioner:v3.0.0+](https://github.com/kubernetes-csi/external-provisioner/releases/tag/v3.0.0) \* [csi-attacher:v3.3.0+](https://github.com/kubernetes-csi/external-attacher/releases/tag/v3.3.0) \* [csi-resizer:v1.3.0+](https://github.com/kubernetes-csi/external-resizer/releases/tag/v1.3.0) {{< /note >}} ## Why should I use `ReadWriteOncePod`? Prior to Kubernetes v1.22, the `ReadWriteOnce` access mode was commonly used to restrict PersistentVolume access for workloads that required single-writer access to storage. However, this access mode had a limitation: it restricted volume access to a single \*node\*, allowing multiple pods on the same node to read from and write to the same volume simultaneously. This could pose a risk for applications that demand strict single-writer access for data safety. If ensuring single-writer access is critical for your workloads, consider migrating your volumes to `ReadWriteOncePod`. ## Migrating existing PersistentVolumes If you have existing PersistentVolumes, they can be migrated to use `ReadWriteOncePod`. Only migrations from `ReadWriteOnce` to `ReadWriteOncePod` are supported. In this example, there is already a `ReadWriteOnce` "cat-pictures-pvc" PersistentVolumeClaim that is bound to a "cat-pictures-pv" PersistentVolume, and a "cat-pictures-writer" Deployment that uses this PersistentVolumeClaim. {{< note >}} If your storage plugin supports [Dynamic provisioning](/docs/concepts/storage/dynamic-provisioning/), the "cat-picutres-pv" will be created for you, but its name may differ. To get your PersistentVolume's name run: ```shell kubectl get pvc cat-pictures-pvc -o jsonpath='{.spec.volumeName}' ``` {{< /note >}} And you can view the PVC before you make changes. Either view the manifest locally, or run `kubectl get pvc -o yaml`. The output is similar to: ```yaml # cat-pictures-pvc.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata: name: cat-pictures-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi ``` Here's an example Deployment that relies on that PersistentVolumeClaim: ```yaml # cat-pictures-writer-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: cat-pictures-writer spec: replicas: 3 selector: matchLabels: app: cat-pictures-writer template: metadata: labels: app: cat-pictures-writer spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 volumeMounts: - name: cat-pictures mountPath: /mnt volumes: - name: cat-pictures persistentVolumeClaim: claimName: cat-pictures-pvc readOnly: false ``` As a first step, you need to edit your PersistentVolume's `spec.persistentVolumeReclaimPolicy` and set it to `Retain`. This ensures your PersistentVolume will not be deleted when you delete the corresponding PersistentVolumeClaim: ```shell kubectl patch pv cat-pictures-pv -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}' ``` Next you need to stop any workloads that are using the PersistentVolumeClaim bound to the PersistentVolume you want to migrate, and then delete the PersistentVolumeClaim. Avoid making any other changes to the PersistentVolumeClaim, such as volume resizes, until after the migration is complete. Once that is done, you need to clear your PersistentVolume's `spec.claimRef.uid` to ensure PersistentVolumeClaims can bind to it upon recreation: ```shell kubectl scale --replicas=0 deployment cat-pictures-writer kubectl delete pvc cat-pictures-pvc kubectl patch pv cat-pictures-pv -p '{"spec":{"claimRef":{"uid":""}}}' ``` After that, replace the PersistentVolume's list of valid access modes to be (only) `ReadWriteOncePod`: ```shell kubectl patch pv cat-pictures-pv -p '{"spec":{"accessModes":["ReadWriteOncePod"]}}' ``` {{< note >}} The `ReadWriteOncePod` access mode cannot be combined with other access modes. Make sure `ReadWriteOncePod` is the only access mode on the PersistentVolume when updating, otherwise the request will fail. {{< /note >}} Next you need to modify your PersistentVolumeClaim to set `ReadWriteOncePod` as the only access mode. You should also set the PersistentVolumeClaim's `spec.volumeName` to
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/change-pv-access-mode-readwriteoncepod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/change-pv-access-mode-readwriteoncepod.md
|
[
0.005634520202875137,
-0.019108599051833153,
0.07742004841566086,
0.0020438169594854116,
-0.07468494772911072,
0.027951689437031746,
-0.007431414443999529,
-0.055605269968509674,
0.03673810884356499,
0.07078031450510025,
-0.02825956605374813,
0.024517176672816277,
0.0024063389282673597,
-0.008057516999542713,
0.009724077768623829,
0.0054898313246667385,
0.051304858177900314,
-0.015583906322717667,
-0.00627586804330349,
0.005241211503744125,
0.005933576263487339,
0.07751051336526871,
0.050443135201931,
-0.0043449318036437035,
0.012095528654754162,
-0.019990945234894753,
-0.10302815586328506,
0.00012529842206276953,
0.03988564386963844,
0.01341463066637516,
-0.019093673676252365,
0.013924259692430496,
-0.0322212353348732,
0.04159431532025337,
0.07687230408191681,
0.01867104507982731,
0.007162407040596008,
-0.03037864714860916,
-0.05451180413365364,
0.04398051276803017,
0.01752915419638157,
-0.005431023426353931,
-0.0942075327038765,
0.009055727161467075,
-0.02670658566057682,
0.0058791362680494785,
0.014034787192940712,
-0.10288698226213455,
0.07439417392015457,
0.08082501590251923,
-0.03392252326011658,
-0.13519224524497986,
0.06481523811817169,
-0.0038601537235081196,
0.051043007522821426,
0.06150559335947037,
-0.033141911029815674,
0.10529343038797379,
0.07449038326740265,
-0.02524741366505623,
-0.008922317065298557,
-0.04300682246685028,
0.05482585355639458,
-0.06398217380046844,
-0.04808122292160988,
0.025753602385520935,
0.009101377800107002,
0.029311344027519226,
-0.0011669700033962727,
-0.019837165251374245,
0.0675785019993782,
0.07391980290412903,
-0.009830398485064507,
-0.0540495440363884,
0.027150366455316544,
0.010946880094707012,
-0.06649022549390793,
0.05116261914372444,
0.03981843963265419,
-0.08497283607721329,
0.05305539816617966,
0.06427831947803497,
0.05201196298003197,
-0.011291100643575191,
-0.027530336752533913,
-0.03429055213928223,
0.013561809435486794,
-0.034790992736816406,
0.026719840243458748,
-0.02153608575463295,
0.043829306960105896,
-0.14864134788513184,
0.021503571420907974,
-0.11215020716190338,
0.034920185804367065,
-0.07181605696678162,
-0.015129968523979187,
0.02093406952917576,
0.050576351583004,
-0.03388824313879013,
-0.000008984403393696994,
-0.03743448853492737,
-0.018741393461823463,
0.05646029859781265,
0.04259137436747551,
-0.07056386023759842,
0.006073238793760538,
0.012474452145397663,
-0.02539915218949318,
0.07093216478824615,
0.03088848851621151,
0.06013859808444977,
0.018054842948913574,
0.04235580563545227,
0.007018267642706633,
-0.018322808668017387,
-0.0414867140352726,
0.03302903100848198,
0.061151280999183655,
0.06291230022907257,
0.05019792169332504,
-0.10228141397237778,
0.006700178142637014,
0.014398244209587574,
-0.01113209966570139,
0.00945593323558569,
-0.034048374742269516,
3.959146890832037e-33,
0.05594589561223984,
-0.05977024883031845,
0.007418683730065823,
-0.04133542254567146,
-0.0481937900185585,
-0.12710988521575928,
0.00825380440801382,
0.00936453603208065,
-0.10159329324960709,
-0.10236623138189316,
-0.015443161129951477,
0.10530834645032883,
-0.029686233028769493,
-0.030629891902208328,
-0.010494695045053959,
0.03033152036368847,
-0.03782009333372116,
0.026591625064611435,
0.07801514863967896,
-0.027754848822951317,
0.0031535234302282333,
-0.05836951360106468,
-0.01952979899942875,
-0.05229431390762329,
0.043135352432727814,
0.002769760088995099,
0.027525393292307854,
-0.03463825583457947,
-0.020320236682891846,
0.03120897337794304,
-0.07312056422233582,
-0.024048252031207085,
0.06712555140256882,
-0.0195627398788929,
-0.18271511793136597,
-0.05959613621234894,
-0.01798410527408123,
-0.0007863109349273145,
-0.028937669470906258,
-0.07703124731779099,
0.04892757162451744,
-0.087141253054142,
0.0014355747262015939,
-0.08793678879737854,
-0.001770103583112359,
0.014849208295345306,
0.029237961396574974,
0.012317855842411518,
0.09468212723731995,
0.040526051074266434,
-0.06281863152980804,
-0.03145664557814598,
-0.07629457861185074,
-0.04235796257853508,
0.04321971908211708,
-0.022136056795716286,
0.028752464801073074,
-0.04353012517094612,
-0.017646431922912598,
-0.06209765374660492,
-0.018099140375852585,
0.09656699001789093,
0.06557442247867584,
0.0109883276745677,
0.0019441593904048204,
0.015272761695086956,
-0.05579020455479622,
0.041009657084941864,
0.05653604492545128,
-0.06297454982995987,
-0.10415922105312347,
-0.030999325215816498,
-0.0655791237950325,
0.04170246794819832,
-0.05549001321196556,
-0.07429027557373047,
-0.028737405315041542,
-0.005515800788998604,
-0.0030485945753753185,
0.04364515095949173,
0.022879846394062042,
-0.052151188254356384,
-0.026017948985099792,
0.11893001943826675,
0.000681391276884824,
-0.040584784001111984,
0.020307283848524094,
-0.06996434181928635,
-0.04907503351569176,
0.027182428166270256,
0.014327416196465492,
-0.09343569725751877,
-0.0709843561053276,
0.03964774310588837,
-0.10826022922992706,
-4.904268593464142e-33,
0.14375156164169312,
-0.021181605756282806,
-0.019371110945940018,
-0.011343244463205338,
-0.04502977803349495,
0.026640113443136215,
0.033781614154577255,
0.04835100099444389,
0.021427473053336143,
-0.0870569497346878,
-0.016804231330752373,
-0.004567760042846203,
-0.027502063661813736,
0.010956598445773125,
-0.019018372520804405,
-0.01624731905758381,
-0.09126067161560059,
0.01149076595902443,
-0.010651600547134876,
0.05423438549041748,
-0.015424014069139957,
-0.05869109556078911,
0.04023832082748413,
0.02924829162657261,
-0.019098348915576935,
-0.04096168279647827,
0.09776842594146729,
0.02542656660079956,
-0.023825399577617645,
-0.05395909771323204,
-0.01724865660071373,
-0.054695166647434235,
-0.01791590079665184,
-0.022161932662129402,
0.03284556791186333,
-0.057232532650232315,
0.0036801998503506184,
-0.0506303533911705,
-0.07697880268096924,
-0.0006551818223670125,
0.09604692459106445,
0.04062173515558243,
-0.002116338349878788,
-0.08950261026620865,
-0.025361616164445877,
0.03164658695459366,
0.06316808611154556,
-0.019319063052535057,
-0.013246030546724796,
-0.04839572310447693,
0.07135854661464691,
-0.01789562962949276,
0.0007538712816312909,
0.02001086436212063,
-0.05450114607810974,
0.08541962504386902,
0.06368659436702728,
-0.015530407428741455,
-0.018776841461658478,
-0.031780365854501724,
0.08054632693529129,
-0.08467986434698105,
0.018227173015475273,
0.0015522630419582129,
0.017547842115163803,
-0.060073524713516235,
0.003598171519115567,
0.06351595371961594,
-0.003955494612455368,
0.035248205065727234,
-0.08186674118041992,
-0.08293930441141129,
0.1314993053674698,
-0.01730651967227459,
0.10604402422904968,
0.018601786345243454,
-0.013270039111375809,
-0.04451220482587814,
0.03392177075147629,
-0.012890278361737728,
-0.014208686538040638,
0.06090850383043289,
-0.049514707177877426,
0.03244626894593239,
0.10555737465620041,
0.07590328902006149,
0.0124424509704113,
0.09207062423229218,
0.0250172708183527,
0.0683901458978653,
-0.012517052702605724,
0.002438995987176895,
0.028556233271956444,
0.14531707763671875,
-0.03551385551691055,
-6.130873231313672e-8,
0.036003537476062775,
0.1138540655374527,
-0.0342538021504879,
0.051453836262226105,
0.03332971781492233,
-0.09433866292238235,
0.010640573687851429,
0.005459470674395561,
-0.058429520577192307,
0.019195228815078735,
-0.015587366186082363,
0.038362547755241394,
-0.05034937709569931,
-0.014303091913461685,
-0.01448780857026577,
0.011201724410057068,
-0.022806789726018906,
-0.027879513800144196,
0.008824700489640236,
-0.10490149259567261,
-0.03425287827849388,
-0.05393509939312935,
0.016383107751607895,
-0.006397223100066185,
0.005889278836548328,
0.06960593163967133,
-0.0002750343701336533,
0.006506992969661951,
0.034148816019296646,
0.021205464377999306,
-0.04035972058773041,
-0.013230890035629272,
-0.06090424954891205,
0.10867831110954285,
-0.007991518825292587,
0.00938533153384924,
-0.04016588255763054,
0.09139823913574219,
0.049900639802217484,
0.037039972841739655,
0.035881251096725464,
-0.021759672090411186,
-0.0595301128923893,
0.006261011585593224,
0.0011767380638048053,
0.05428425967693329,
0.045358892530202866,
0.08012455701828003,
-0.013363211415708065,
0.0010551593732088804,
-0.0334029346704483,
-0.00730556296184659,
-0.017241157591342926,
0.09078902006149292,
0.0172371044754982,
0.039394114166498184,
0.03220159932971001,
0.004131746478378773,
-0.009962370619177818,
0.027981258928775787,
0.0797172337770462,
0.031932294368743896,
-0.010261939838528633,
0.04887556657195091
] | 0.013943
|
be combined with other access modes. Make sure `ReadWriteOncePod` is the only access mode on the PersistentVolume when updating, otherwise the request will fail. {{< /note >}} Next you need to modify your PersistentVolumeClaim to set `ReadWriteOncePod` as the only access mode. You should also set the PersistentVolumeClaim's `spec.volumeName` to the name of your PersistentVolume to ensure it binds to this specific PersistentVolume. Once this is done, you can recreate your PersistentVolumeClaim and start up your workloads: ```shell # IMPORTANT: Make sure to edit your PVC in cat-pictures-pvc.yaml before applying. You need to: # - Set ReadWriteOncePod as the only access mode # - Set spec.volumeName to "cat-pictures-pv" kubectl apply -f cat-pictures-pvc.yaml kubectl apply -f cat-pictures-writer-deployment.yaml ``` Lastly you may edit your PersistentVolume's `spec.persistentVolumeReclaimPolicy` and set to it back to `Delete` if you previously changed it. ```shell kubectl patch pv cat-pictures-pv -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}' ``` ## {{% heading "whatsnext" %}} \* Learn more about [PersistentVolumes](/docs/concepts/storage/persistent-volumes/). \* Learn more about [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims). \* Learn more about [Configuring a Pod to Use a PersistentVolume for Storage](/docs/tasks/configure-pod-container/configure-persistent-volume-storage/)
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/change-pv-access-mode-readwriteoncepod.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/change-pv-access-mode-readwriteoncepod.md
|
[
0.03173369541764259,
-0.047158244997262955,
0.03519802540540695,
0.014933946542441845,
-0.08152038604021072,
-0.013926881365478039,
-0.06925241649150848,
0.011271732859313488,
0.03303635120391846,
0.0667533427476883,
0.019230708479881287,
-0.013682199642062187,
0.012286565266549587,
0.027116160839796066,
0.04093199223279953,
0.002328010741621256,
0.02418701909482479,
0.00895876158028841,
-0.011396960355341434,
0.08020205050706863,
-0.04034668579697609,
-0.004429865628480911,
0.06546003371477127,
-0.025084683671593666,
0.04932067170739174,
-0.022799618542194366,
-0.059759657829999924,
-0.05527937784790993,
0.00987932551652193,
-0.07999391108751297,
0.0074060773476958275,
-0.0018854287918657064,
-0.07376313954591751,
-0.01761000044643879,
0.12532030045986176,
0.09126142412424088,
-0.0001948061544680968,
-0.10695786029100418,
-0.06645273417234421,
-0.001178688951767981,
0.050857603549957275,
-0.04574017599225044,
-0.060761213302612305,
-0.03716693073511124,
-0.07429400831460953,
0.02341613359749317,
0.026534736156463623,
-0.03794018551707268,
0.07889172434806824,
0.03215394914150238,
-0.05649883672595024,
-0.1237487643957138,
0.05180252343416214,
0.020259056240320206,
0.034011125564575195,
0.017193228006362915,
0.03170099854469299,
0.10306880623102188,
0.0957266166806221,
-0.024617532268166542,
-0.007867248728871346,
-0.004585149697959423,
0.06320326030254364,
-0.013293277472257614,
-0.0073425909504294395,
0.008485903963446617,
0.03787707909941673,
0.0051918127574026585,
0.043840184807777405,
-0.03394069895148277,
0.04551219195127487,
0.12818877398967743,
-0.0853993222117424,
-0.04216040298342705,
-0.03783240169286728,
-0.03758653998374939,
-0.00988109689205885,
0.038697730749845505,
0.05809187516570091,
-0.028407325968146324,
0.10423077642917633,
0.025893518701195717,
0.012621325440704823,
-0.05554095655679703,
-0.0010240753181278706,
-0.017569413408637047,
0.007061402779072523,
0.023362701758742332,
-0.026386065408587456,
-0.004614737816154957,
0.013010768219828606,
-0.0745086669921875,
-0.009605414234101772,
-0.07541585713624954,
0.02050114795565605,
-0.06446238607168198,
0.00023247986973728985,
0.009121894836425781,
0.043081048876047134,
-0.00394014036282897,
0.04247719794511795,
-0.015494662337005138,
-0.026847928762435913,
0.07159680128097534,
0.08933669328689575,
-0.09131588041782379,
0.03513190150260925,
0.041787903755903244,
-0.04168632999062538,
0.07417391985654831,
-0.017651651054620743,
0.028573868796229362,
-0.03730873763561249,
0.020638830959796906,
0.0017567661125212908,
0.07518887519836426,
-0.03510287404060364,
0.05994036793708801,
-0.055931322276592255,
-0.027757834643125534,
0.07457762211561203,
-0.0981360599398613,
0.002633351366966963,
0.008542374707758427,
-0.030610425397753716,
-0.032235950231552124,
0.009827757254242897,
4.465566754897572e-33,
0.06884187459945679,
-0.0992174819111824,
0.020729266107082367,
0.033739082515239716,
0.02397407591342926,
-0.07171209156513214,
0.033598657697439194,
0.011369564570486546,
-0.08884274214506149,
-0.1743742674589157,
-0.03106991946697235,
0.03349008038640022,
-0.030885474756360054,
0.03485662490129471,
-0.024087609723210335,
-0.039388950914144516,
-0.043010324239730835,
0.015077914111316204,
0.10218770802021027,
0.037899576127529144,
0.03644964098930359,
-0.04776635766029358,
-0.012322359718382359,
0.037166230380535126,
-0.04741184040904045,
-0.002960706129670143,
0.04223381727933884,
-0.030819086357951164,
-0.03007812611758709,
0.03120310977101326,
-0.011060424149036407,
0.006744768004864454,
0.08509699255228043,
0.019137559458613396,
-0.1329907774925232,
-0.10271259397268295,
-0.07963868230581284,
0.0006716762436553836,
-0.0991022065281868,
-0.030158651992678642,
0.06423940509557724,
-0.061701271682977676,
-0.04230552539229393,
-0.028621401637792587,
-0.02391439862549305,
0.0017731653060764074,
0.022537872195243835,
0.03525516018271446,
0.009473223239183426,
0.08826149255037308,
-0.0017628077184781432,
-0.008673110045492649,
-0.06976717710494995,
-0.07541107386350632,
0.02198396436870098,
-0.021283721551299095,
-0.010737011209130287,
-0.08570623397827148,
-0.06537283211946487,
-0.08938873559236526,
0.05589524284005165,
0.12802180647850037,
0.05002535879611969,
0.029112141579389572,
0.017756028100848198,
0.044109027832746506,
-0.05511588603258133,
0.003970745950937271,
0.0359770730137825,
-0.03902836889028549,
-0.029583392664790154,
-0.015544062480330467,
-0.06863516569137573,
-0.03979222849011421,
0.013086499646306038,
-0.05135348439216614,
-0.02412569336593151,
0.006496895104646683,
-0.1126706600189209,
0.07582234591245651,
0.010734782554209232,
0.014870736747980118,
-0.06280699372291565,
0.0749981477856636,
0.0016191897448152304,
0.024410510435700417,
0.04806942120194435,
-0.02773253247141838,
-0.13795606791973114,
0.03524838387966156,
0.04590366780757904,
-0.02585201896727085,
-0.001186433364637196,
-0.027966903522610664,
-0.044533658772706985,
-4.7573663297579116e-33,
0.08644665777683258,
0.0034938917960971594,
-0.03004460781812668,
-0.006326147820800543,
-0.00868821982294321,
0.016104700043797493,
0.0019515756284818053,
0.05648576840758324,
0.009941262193024158,
-0.042057767510414124,
-0.05615396425127983,
0.017503611743450165,
-0.10588085651397705,
-0.03056369535624981,
-0.09675108641386032,
-0.04245174303650856,
-0.06401273608207703,
-0.04662580043077469,
-0.019179943948984146,
0.03700029477477074,
-0.016756605356931686,
0.022332414984703064,
0.05974944680929184,
0.07421968132257462,
0.03522373363375664,
0.01923171617090702,
0.010264419950544834,
0.02092099003493786,
-0.04472479969263077,
-0.0746396854519844,
0.028173448517918587,
-0.053004615008831024,
-0.06037692353129387,
-0.06334947794675827,
0.04921434447169304,
-0.03606949746608734,
0.0041648708283901215,
0.018034925684332848,
-0.07911127805709839,
-0.007990163750946522,
0.06718955934047699,
-0.009984460659325123,
-0.0681472048163414,
-0.056873369961977005,
-0.04262736439704895,
-0.05187060683965683,
0.03313279524445534,
-0.05381151661276817,
0.011569444090127945,
0.007483537774533033,
-0.003788774600252509,
-0.020110774785280228,
0.0011671199463307858,
0.07074085623025894,
0.03730998933315277,
0.08238223195075989,
0.032680854201316833,
0.03652659058570862,
-0.02982719987630844,
0.016012093052268028,
0.06032245606184006,
-0.045548733323812485,
0.01615200564265251,
-0.0016106866532936692,
-0.05286097899079323,
-0.03736335039138794,
0.05211249738931656,
0.05077458545565605,
-0.0295819453895092,
0.07287810742855072,
-0.03291343152523041,
0.023617427796125412,
0.10773304104804993,
0.020687276497483253,
0.11038096249103546,
-0.03850364685058594,
-0.044244855642318726,
-0.05570468679070473,
0.05297648534178734,
0.011634121648967266,
-0.027728812769055367,
0.048460498452186584,
-0.06441601365804672,
0.020233189687132835,
0.09333141148090363,
0.03256138041615486,
0.03286576643586159,
0.030239738523960114,
0.05278918147087097,
0.047051120549440384,
-0.007609186228364706,
0.016190018504858017,
0.029232462868094444,
0.038170307874679565,
0.015183592215180397,
-4.8559595455799354e-8,
0.0272452961653471,
0.05792691558599472,
-0.021163182333111763,
0.07659000903367996,
0.038011640310287476,
-0.0962095856666565,
0.03719470649957657,
-0.016295528039336205,
-0.015123611316084862,
-0.04705068841576576,
0.004520271439105272,
0.017461812123656273,
0.00871384609490633,
0.004499077331274748,
-0.023055855184793472,
-0.010671503841876984,
0.06768882274627686,
-0.01611902378499508,
-0.0006266033160500228,
-0.09309198707342148,
-0.08518537133932114,
-0.10397426038980484,
0.013004708103835583,
-0.01838216558098793,
0.020611140877008438,
0.09190112352371216,
0.07209235429763794,
-0.04036213457584381,
0.031608372926712036,
-0.010189839638769627,
0.0016759898280724883,
-0.024223312735557556,
-0.03470205143094063,
0.050982631742954254,
-0.07028626650571823,
-0.01003891322761774,
-0.0286063551902771,
0.022765962406992912,
-0.01945016160607338,
0.03535081818699837,
0.012305335141718388,
0.019843002781271935,
0.05030031502246857,
-0.008073780685663223,
0.019619641825556755,
0.03717869520187378,
0.06632878631353378,
0.08512017130851746,
-0.08255375176668167,
0.1007055938243866,
-0.06069149821996689,
-0.006765508558601141,
-0.03549448773264885,
0.12389516830444336,
0.05469512194395065,
-0.023260919377207756,
0.08375068008899689,
0.005240642931312323,
-0.010016575455665588,
0.10143740475177765,
0.08408098667860031,
-0.0025382505264133215,
-0.00368808233179152,
0.02184540405869484
] | 0.006467
|
This page shows how to safely drain a {{< glossary\_tooltip text="node" term\_id="node" >}}, optionally respecting the PodDisruptionBudget you have defined. ## {{% heading "prerequisites" %}} This task assumes that you have met the following prerequisites: 1. You do not require your applications to be highly available during the node drain, or 1. You have read about the [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) concept, and have [configured PodDisruptionBudgets](/docs/tasks/run-application/configure-pdb/) for applications that need them. ## (Optional) Configure a disruption budget {#configure-poddisruptionbudget} To ensure that your workloads remain available during maintenance, you can configure a [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/). If availability is important for any applications that run or could run on the node(s) that you are draining, [configure a PodDisruptionBudgets](/docs/tasks/run-application/configure-pdb/) first and then continue following this guide. 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. ## Use `kubectl drain` to remove a node from service You can use `kubectl drain` to safely evict all of your pods from a node before you perform maintenance on the node (e.g. kernel upgrade, hardware maintenance, etc.). Safe evictions allow the pod's containers to [gracefully terminate](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) and will respect the PodDisruptionBudgets you have specified. {{< note >}} By default `kubectl drain` ignores certain system pods on the node that cannot be killed; see the [kubectl drain](/docs/reference/generated/kubectl/kubectl-commands/#drain) documentation for more details. {{< /note >}} When `kubectl drain` returns successfully, that indicates that all of the pods (except the ones excluded as described in the previous paragraph) have been safely evicted (respecting the desired graceful termination period, and respecting the PodDisruptionBudget you have defined). It is then safe to bring down the node by powering down its physical machine or, if running on a cloud platform, deleting its virtual machine. {{< note >}} If any new Pods tolerate the `node.kubernetes.io/unschedulable` taint, then those Pods might be scheduled to the node you have drained. Avoid tolerating that taint other than for DaemonSets. If you or another API user directly set the [`nodeName`](/docs/concepts/scheduling-eviction/assign-pod-node/#nodename) field for a Pod (bypassing the scheduler), then the Pod is bound to the specified node and will run there, even though you have drained that node and marked it unschedulable. {{< /note >}} First, identify the name of the node you wish to drain. You can list all of the nodes in your cluster with ```shell kubectl get nodes ``` Next, tell Kubernetes to drain the node: ```shell kubectl drain --ignore-daemonsets ``` If there are pods managed by a DaemonSet, you will need to specify `--ignore-daemonsets` with `kubectl` to successfully drain the node. The `kubectl drain` subcommand on its own does not actually drain a node of its DaemonSet pods: the DaemonSet controller (part of the control plane) immediately replaces missing Pods with new equivalent Pods. The DaemonSet controller also creates Pods that ignore unschedulable taints, which allows the new Pods to launch onto a node that you are draining. Once it returns (without giving an error), you can power down the node (or equivalently, if on a cloud platform, delete the virtual machine backing the node). If you leave the node in the cluster during the maintenance operation, you need to run ```shell kubectl uncordon ``` afterwards to tell Kubernetes that it can resume scheduling new pods onto the node. ## Draining multiple nodes in parallel The `kubectl drain` command should only be issued to a single node at a time. However, you can run multiple `kubectl drain` commands for different nodes in parallel, in different terminals or in
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/safely-drain-node.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/safely-drain-node.md
|
[
-0.03700926899909973,
0.03888896480202675,
0.0952935665845871,
0.0007174903876148164,
0.010125056840479374,
-0.023993490263819695,
0.00989153329282999,
-0.023767225444316864,
0.006767600309103727,
0.006265719421207905,
-0.025144381448626518,
-0.013748843222856522,
-0.030668608844280243,
-0.057495441287755966,
0.0011415734188631177,
-0.0036352830938994884,
0.0326862558722496,
-0.06352348625659943,
-0.012141397222876549,
-0.06682463735342026,
0.025529375299811363,
0.0274727251380682,
0.02686653472483158,
0.06318604946136475,
-0.04714333266019821,
0.006449521519243717,
-0.052667293697595596,
-0.031544096767902374,
0.015813931822776794,
0.0530313178896904,
-0.026379354298114777,
0.05774728208780289,
-0.07177096605300903,
0.015423054806888103,
0.10051290690898895,
0.0913786068558693,
-0.0017902557738125324,
-0.0177368875592947,
-0.024493088945746422,
0.0014926993753761053,
0.02929525077342987,
-0.015029486268758774,
-0.10155078768730164,
0.027752144262194633,
-0.02291163243353367,
-0.029842877760529518,
-0.07062827795743942,
-0.06843364238739014,
0.011394675821065903,
0.07330809533596039,
0.07771480083465576,
-0.06853518635034561,
0.06306110322475433,
0.07231473177671432,
0.08602884411811829,
0.05038293078541756,
0.02639884315431118,
-0.025286396965384483,
0.023006625473499298,
0.036387983709573746,
-0.0011322194477543235,
-0.005357614252716303,
0.012269670143723488,
-0.04577111825346947,
0.08266311138868332,
0.05768919736146927,
-0.018627602607011795,
0.01997201517224312,
0.02199828252196312,
0.05389774218201637,
0.010957120917737484,
-0.041330959647893906,
-0.01907975599169731,
-0.05128442123532295,
-0.045351192355155945,
-0.003373249201104045,
-0.024535557255148888,
0.02313387021422386,
-0.020009730011224747,
-0.07540780305862427,
0.02912556566298008,
0.09976141899824142,
0.07160984724760056,
0.03340702876448631,
-0.041272640228271484,
0.011439559049904346,
-0.0036425066646188498,
-0.042595334351062775,
0.052499450743198395,
0.0030525079928338528,
0.022839633747935295,
-0.08896489441394806,
0.10755490511655807,
-0.05368060991168022,
0.01542107854038477,
-0.014417977072298527,
0.019727474078536034,
-0.042500000447034836,
-0.05310874059796333,
0.0013851323164999485,
0.013140486553311348,
-0.09179368615150452,
0.06429323554039001,
-0.05029018595814705,
0.005613325629383326,
-0.01897517219185829,
-0.06529130041599274,
-0.039116691797971725,
0.009129948914051056,
0.05118805542588234,
0.00766461668536067,
0.01875072903931141,
0.0050478060729801655,
0.04580210894346237,
-0.044613175094127655,
-0.024043308570981026,
-0.02049092948436737,
-0.0005615171394310892,
0.010394982993602753,
0.046829771250486374,
-0.005351605825126171,
0.022948183119297028,
0.03987445682287216,
-0.04743781313300133,
-0.04369240999221802,
0.0017033845651894808,
0.008367364294826984,
4.031567261076275e-33,
0.05736236274242401,
-0.07353019714355469,
-0.044801775366067886,
0.002115743700414896,
-0.03766384720802307,
-0.04772238805890083,
-0.022563984617590904,
0.03234277665615082,
-0.05241904407739639,
-0.01689835824072361,
-0.004946667701005936,
0.10339395701885223,
-0.05309819057583809,
-0.0425984263420105,
0.006199662107974291,
-0.10203344374895096,
0.040562231093645096,
0.10977533459663391,
0.07495158910751343,
-0.07683834433555603,
0.0343296192586422,
-0.07197578996419907,
-0.060456015169620514,
-0.008838239125907421,
0.10028520226478577,
0.03701251000165939,
0.009650607593357563,
-0.0733262151479721,
0.017628813162446022,
0.049093738198280334,
-0.05581546202301979,
0.05143515020608902,
0.0015717927599325776,
-0.016707533970475197,
-0.1745258867740631,
-0.060254111886024475,
-0.11879871785640717,
-0.027745267376303673,
-0.011851024813950062,
-0.06985143572092056,
0.008507407270371914,
-0.00510192709043622,
0.013064439408481121,
-0.03926998749375343,
0.07182306051254272,
-0.002460386138409376,
0.09272844344377518,
-0.09155532717704773,
0.007867678068578243,
-0.03282080218195915,
0.005208896938711405,
-0.03758508339524269,
-0.0002544702438171953,
-0.026678647845983505,
-0.013864000327885151,
-0.0270034521818161,
0.027266742661595345,
-0.09231403470039368,
0.027454476803541183,
-0.017751187086105347,
-0.04279559850692749,
-0.008448855020105839,
-0.035107117146253586,
-0.03778163716197014,
0.03243432566523552,
0.0759144201874733,
-0.0633237212896347,
0.025158336386084557,
-0.0019485953962430358,
-0.008245921693742275,
-0.07734490185976028,
0.009949523024260998,
0.019956985488533974,
0.06179947778582573,
0.008043961599469185,
-0.02315141074359417,
0.016228409484028816,
-0.03443799912929535,
-0.11017156392335892,
-0.013142070733010769,
-0.01479948591440916,
-0.0656101182103157,
0.01770077645778656,
0.06285586208105087,
0.1235065832734108,
-0.07386944442987442,
0.09041336923837662,
-0.05485554039478302,
-0.12773820757865906,
0.07209554314613342,
-0.043388012796640396,
-0.010327130556106567,
-0.144127756357193,
-0.020041335374116898,
-0.08040004223585129,
-6.253525621250934e-33,
0.11234944313764572,
-0.011799361556768417,
-0.028634121641516685,
0.025025418028235435,
0.01945815607905388,
-0.018539058044552803,
-0.02318127639591694,
0.016261659562587738,
0.0019010440446436405,
-0.0052444166503846645,
-0.08752226084470749,
0.01531738881021738,
-0.006816012319177389,
0.033310629427433014,
-0.04817663133144379,
0.03822476789355278,
-0.09503234922885895,
-0.023505862802267075,
-0.02896733768284321,
0.03202199563384056,
-0.013250923715531826,
-0.0377226322889328,
0.03278825432062149,
0.004220138769596815,
-0.04375920817255974,
-0.0388212651014328,
0.0453883521258831,
-0.010510954074561596,
0.008756798692047596,
-0.05174547806382179,
-0.0034786611795425415,
-0.023287145420908928,
-0.0715550109744072,
-0.031074034050107002,
0.006345229223370552,
-0.023875592276453972,
-0.031130559742450714,
0.0116196870803833,
-0.07925491034984589,
0.030887268483638763,
0.13715773820877075,
0.020333072170615196,
-0.10000532120466232,
-0.014886339195072651,
-0.01740613766014576,
-0.022269831970334053,
-0.003661384806036949,
-0.0038312936667352915,
-0.0346602201461792,
-0.05536778271198273,
0.03928856924176216,
-0.04092568904161453,
0.02036195620894432,
0.10688278824090958,
-0.06567429006099701,
0.047544561326503754,
0.11590541899204254,
-0.020229294896125793,
-0.057299286127090454,
0.007412346545606852,
0.06056898087263107,
-0.017954887822270393,
0.03752242401242256,
0.013188512995839119,
0.037157945334911346,
-0.11542399227619171,
0.0188182033598423,
0.06521007418632507,
0.04612056910991669,
-0.027638355270028114,
0.05823695287108421,
0.029261915013194084,
0.05755682289600372,
-0.05354033410549164,
0.025828246027231216,
0.06320914626121521,
0.02731110341846943,
-0.13094371557235718,
0.032946955412626266,
-0.03466382995247841,
-0.05424885079264641,
0.0946972519159317,
0.01575348898768425,
0.04722873866558075,
0.004953006748110056,
0.004921936895698309,
0.020955076441168785,
0.06184244528412819,
0.03861512988805771,
0.1074417307972908,
-0.008920880034565926,
-0.013644899241626263,
-0.03620762750506401,
0.1491108387708664,
-0.04445841535925865,
-5.509748390863933e-8,
-0.005484841298311949,
0.14318792521953583,
-0.011719903908669949,
0.006809641141444445,
0.06061422452330589,
-0.026284513995051384,
0.05174729973077774,
0.1006007120013237,
0.010864786803722382,
0.012712473049759865,
0.022921022027730942,
0.003418735461309552,
-0.08308547735214233,
0.0906279981136322,
0.011647725477814674,
0.018006473779678345,
0.022668583318591118,
0.022878684103488922,
-0.06184645742177963,
-0.03288821130990982,
-0.06978455930948257,
-0.010996531695127487,
-0.007185729686170816,
0.06998170167207718,
-0.021445028483867645,
-0.007275672629475594,
0.08846821635961533,
0.01805170066654682,
-0.0003486712812446058,
0.025769151747226715,
-0.019274985417723656,
-0.0007682498544454575,
-0.07904661446809769,
0.0339851975440979,
-0.019745077937841415,
0.05401510372757912,
-0.10488034784793854,
-0.004924016073346138,
0.06526544690132141,
0.10570818185806274,
-0.03043067455291748,
-0.009308099746704102,
-0.058967527002096176,
0.017811646685004234,
-0.011701824143528938,
0.00044319345033727586,
-0.05247556045651436,
0.048191361129283905,
-0.0005295771406963468,
0.03306470811367035,
-0.10819923132658005,
-0.030113983899354935,
-0.022165387868881226,
0.07413502037525177,
0.009570818394422531,
0.010236099362373352,
0.023102857172489166,
0.000003822024609689834,
-0.006976093165576458,
-0.01608692854642868,
0.046708736568689346,
-0.021576672792434692,
0.03827129304409027,
0.04238905385136604
] | 0.090159
|
Kubernetes that it can resume scheduling new pods onto the node. ## Draining multiple nodes in parallel The `kubectl drain` command should only be issued to a single node at a time. However, you can run multiple `kubectl drain` commands for different nodes in parallel, in different terminals or in the background. Multiple drain commands running concurrently will still respect the PodDisruptionBudget you specify. For example, if you have a StatefulSet with three replicas and have set a PodDisruptionBudget for that set specifying `minAvailable: 2`, `kubectl drain` only evicts a pod from the StatefulSet if all three replicas pods are [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod); if then you issue multiple drain commands in parallel, Kubernetes respects the PodDisruptionBudget and ensures that only 1 (calculated as `replicas - minAvailable`) Pod is unavailable at any given time. Any drains that would cause the number of [healthy](/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod) replicas to fall below the specified budget are blocked. ## The Eviction API {#eviction-api} If you prefer not to use [kubectl drain](/docs/reference/generated/kubectl/kubectl-commands/#drain) (such as to avoid calling to an external command, or to get finer control over the pod eviction process), you can also programmatically cause evictions using the eviction API. For more information, see [API-initiated eviction](/docs/concepts/scheduling-eviction/api-eviction/). ## {{% heading "whatsnext" %}} \* Follow steps to protect your application by [configuring a Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/safely-drain-node.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/safely-drain-node.md
|
[
0.013875209726393223,
-0.022848475724458694,
0.02590649388730526,
-0.0035421019420027733,
-0.05589510127902031,
-0.03036987967789173,
-0.05827062204480171,
-0.06382174789905548,
0.07632430642843246,
0.05002046376466751,
-0.08387219905853271,
0.007141884882003069,
0.013394410721957684,
-0.04781452938914299,
0.01243225485086441,
-0.01449738722294569,
-0.01926538720726967,
0.04207567870616913,
-0.04779769480228424,
-0.06366267055273056,
0.10024971514940262,
-0.05386701226234436,
0.05503859370946884,
0.004787066951394081,
-0.09382522851228714,
0.006317909806966782,
-0.04510388895869255,
-0.0818074643611908,
0.012180052697658539,
-0.020540371537208557,
-0.05454430356621742,
-0.01379780936986208,
-0.038563329726457596,
-0.027290061116218567,
0.06567303836345673,
0.08688433468341827,
-0.08391323685646057,
-0.03523440659046173,
-0.08835825324058533,
0.04133157059550285,
0.08454027026891708,
-0.0773208886384964,
-0.07933711260557175,
-0.0443730466067791,
-0.046951934695243835,
-0.019544586539268494,
-0.14510640501976013,
-0.04596589878201485,
0.034663379192352295,
-0.016962412744760513,
0.09651787579059601,
-0.04975081980228424,
0.0785919576883316,
0.0967496782541275,
0.10515883564949036,
0.038383208215236664,
0.004843553528189659,
-0.04277113080024719,
0.032751843333244324,
0.00196743942797184,
0.03751562908291817,
0.024599513038992882,
0.02152407169342041,
-0.025626203045248985,
0.11118987947702408,
0.015308836475014687,
-0.020320802927017212,
0.02118881791830063,
-0.012777814641594887,
0.029627671465277672,
0.030018841847777367,
-0.02522798255085945,
-0.0060935309156775475,
-0.018942374736070633,
-0.022072071209549904,
-0.014575838111341,
0.029369942843914032,
0.03428301587700844,
-0.05870917811989784,
-0.05798352509737015,
-0.018391534686088562,
0.03412626311182976,
0.03731438145041466,
-0.06180644780397415,
-0.07080870866775513,
-0.02340959571301937,
-0.051986392587423325,
-0.04374891147017479,
0.0233667753636837,
0.05035090446472168,
0.000025575356630724855,
0.059559524059295654,
0.0568283386528492,
-0.05332346260547638,
0.031001217663288116,
0.0024277532938867807,
-0.018970921635627747,
0.02493567392230034,
0.039062149822711945,
-0.011065359227359295,
0.02597132697701454,
0.0026721253525465727,
0.07156400382518768,
0.025746412575244904,
0.0929962545633316,
-0.07021723687648773,
-0.04345422238111496,
-0.043502938002347946,
-0.02928389422595501,
-0.006003585644066334,
0.04283444583415985,
0.043330878019332886,
0.11060091853141785,
0.11414390057325363,
0.011486060917377472,
0.07089639455080032,
0.02631084807217121,
0.0078118545934557915,
0.014189299196004868,
0.08674958348274231,
-0.0035320022143423557,
-0.04076538607478142,
0.08655443042516708,
-0.022290321066975594,
0.0012655151076614857,
0.00766707630828023,
0.056551676243543625,
5.390060001040684e-33,
0.014273267239332199,
-0.1285071223974228,
0.04520039260387421,
-0.056512534618377686,
0.014726035296916962,
-0.03859885036945343,
-0.06532206386327744,
0.0008125050226226449,
-0.03655475005507469,
-0.08141167461872101,
-0.0516672246158123,
0.012991257943212986,
-0.013238898478448391,
-0.02198082022368908,
-0.06574119627475739,
-0.07162774354219437,
0.016549600288271904,
0.038282305002212524,
0.08138244599103928,
-0.03591945022344589,
0.08481007069349289,
-0.10120651870965958,
-0.06788234412670135,
0.030557338148355484,
-0.0012572910636663437,
-0.05595199391245842,
0.03697241097688675,
-0.04573103040456772,
-0.040754448622465134,
0.045525193214416504,
-0.050099194049835205,
0.026591511443257332,
-0.004402164835482836,
-0.0004380352038424462,
-0.12733131647109985,
-0.024906110018491745,
-0.0017684397753328085,
0.049692969769239426,
-0.08513952791690826,
-0.050198785960674286,
-0.05991736054420471,
0.007543032988905907,
0.05891743674874306,
-0.050662316381931305,
0.055561359971761703,
-0.04071606695652008,
0.010407574474811554,
-0.08037678897380829,
-0.01651686802506447,
0.0595664381980896,
0.020360693335533142,
-0.005494748707860708,
0.010707972571253777,
-0.07471880316734314,
0.04994557425379753,
-0.007483467925339937,
0.059933215379714966,
-0.02790263295173645,
-0.000006437271622417029,
0.08187665790319443,
-0.04989691823720932,
0.031129203736782074,
-0.0630207434296608,
-0.027347365394234657,
0.041560448706150055,
0.10700491815805435,
-0.03603450953960419,
0.05097923427820206,
0.00634520361199975,
0.023969797417521477,
-0.060952842235565186,
0.03187548369169235,
-0.029144419357180595,
-0.008929814212024212,
-0.01668996922671795,
-0.03874455764889717,
0.06366182863712311,
-0.026145214214920998,
-0.1480681151151657,
0.04369857907295227,
-0.043834246695041656,
-0.019882002845406532,
-0.07450203597545624,
0.049939095973968506,
0.008219083771109581,
0.036085136234760284,
0.025745177641510963,
-0.0592740960419178,
-0.058989640325307846,
0.029054680839180946,
0.006416090298444033,
0.01645801216363907,
-0.03231716901063919,
-0.02891983464360237,
-0.05707443878054619,
-5.0698568092446314e-33,
0.07936931401491165,
0.011012676171958447,
0.01848686672747135,
0.0422157384455204,
0.0682549849152565,
-0.010496857576072216,
-0.019675662741065025,
-0.0028997145127505064,
-0.03439362347126007,
-0.048658423125743866,
-0.07397032529115677,
-0.019563963636755943,
-0.03271375596523285,
0.0025579556822776794,
-0.0485771968960762,
0.03600752726197243,
0.018686039373278618,
-0.08250726759433746,
-0.021836159750819206,
0.05452601611614227,
0.008674100041389465,
-0.009811554104089737,
0.022051356732845306,
0.007427986245602369,
-0.02956986054778099,
0.027928268536925316,
0.012457961216568947,
0.025440191850066185,
-0.020277420058846474,
-0.006531060673296452,
0.029679283499717712,
-0.09899521619081497,
-0.04232407361268997,
0.07887522131204605,
0.03229786455631256,
-0.042125772684812546,
-0.0419362336397171,
0.08908553421497345,
-0.004863775800913572,
0.030432915315032005,
0.09991466253995895,
-0.03577336668968201,
-0.10068216174840927,
-0.0055738273076713085,
-0.024419398978352547,
0.016372520476579666,
-0.018446309491991997,
-0.035467810928821564,
-0.013606579974293709,
-0.06245582178235054,
-0.025184400379657745,
-0.014082872308790684,
-0.04369373247027397,
0.21362078189849854,
-0.004042481537908316,
-0.023656263947486877,
0.06818047910928726,
0.0527329184114933,
-0.023326922208070755,
-0.012268328107893467,
0.02710375003516674,
-0.025411516427993774,
0.051126256585121155,
0.020369768142700195,
0.029643887653946877,
-0.04552384093403816,
0.04501479119062424,
0.025208070874214172,
0.025378242135047913,
0.01797526329755783,
0.015243892557919025,
0.05735539644956589,
0.03659580275416374,
-0.007599920500069857,
0.021394701674580574,
0.018630951642990112,
-0.039252396672964096,
-0.0771421492099762,
-0.00953840184956789,
0.05476487800478935,
-0.12573254108428955,
0.09529221802949905,
-0.032482944428920746,
-0.0002621242019813508,
-0.024831319227814674,
0.02651277370750904,
0.04289460927248001,
0.05598253011703491,
0.0778883770108223,
0.08451525866985321,
0.054232582449913025,
0.06789998710155487,
-0.08388201147317886,
0.07212553173303604,
-0.055980414152145386,
-4.516294893619488e-8,
0.0597064271569252,
-0.02326691895723343,
-0.017215484753251076,
0.059272076934576035,
0.017146214842796326,
-0.09307722002267838,
0.01518439594656229,
0.029126891866326332,
-0.023897552862763405,
0.02684118039906025,
0.02744096890091896,
0.06703943014144897,
0.02154584601521492,
0.03444049134850502,
0.07393992692232132,
-0.0289531908929348,
0.04805514216423035,
-0.00016965492977760732,
-0.023148968815803528,
-0.06147657334804535,
-0.08564339578151703,
-0.04572538658976555,
-0.029230685904622078,
0.05614934116601944,
-0.03410100191831589,
0.07146573811769485,
0.06852281093597412,
-0.0475008450448513,
-0.009885095991194248,
-0.03699404373764992,
-0.01520445290952921,
0.004408126696944237,
-0.06354928016662598,
0.08225839585065842,
0.04586777836084366,
0.02967795543372631,
-0.11426166445016861,
0.009165758267045021,
-0.0022817726712673903,
0.09257608652114868,
0.015609964728355408,
-0.01099404226988554,
-0.02701997011899948,
0.05460353195667267,
0.03220469877123833,
0.024536048993468285,
-0.07422400265932083,
0.07299105077981949,
0.029222695156931877,
0.0036823716945946217,
-0.08520855009555817,
-0.04659759998321533,
0.04068508371710777,
0.07562396675348282,
-0.009699368849396706,
-0.017270999029278755,
0.024563871324062347,
-0.048635657876729965,
0.025478113442659378,
0.021552443504333496,
0.053262341767549515,
-0.020818132907152176,
0.008739753626286983,
-0.03130670636892319
] | 0.095727
|
This page guides you through configuring {{< glossary\_tooltip text="Node" term\_id="node" >}} overprovisioning in your Kubernetes cluster. Node overprovisioning is a strategy that proactively reserves a portion of your cluster's compute resources. This reservation helps reduce the time required to schedule new pods during scaling events, enhancing your cluster's responsiveness to sudden spikes in traffic or workload demands. By maintaining some unused capacity, you ensure that resources are immediately available when new pods are created, preventing them from entering a pending state while the cluster scales up. ## {{% heading "prerequisites" %}} - You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. - You should already have a basic understanding of [Deployments](/docs/concepts/workloads/controllers/deployment/), Pod {{< glossary\_tooltip text="priority" term\_id="pod-priority" >}}, and {{< glossary\_tooltip text="PriorityClasses" term\_id="priority-class" >}}. - Your cluster must be set up with an [autoscaler](/docs/concepts/cluster-administration/cluster-autoscaling/) that manages nodes based on demand. ## Create a PriorityClass Begin by defining a PriorityClass for the placeholder Pods. First, create a PriorityClass with a negative priority value, that you will shortly assign to the placeholder pods. Later, you will set up a Deployment that uses this PriorityClass {{% code\_sample language="yaml" file="priorityclass/low-priority-class.yaml" %}} Then create the PriorityClass: ```shell kubectl apply -f https://k8s.io/examples/priorityclass/low-priority-class.yaml ``` You will next define a Deployment that uses the negative-priority PriorityClass and runs a minimal container. When you add this to your cluster, Kubernetes runs those placeholder pods to reserve capacity. Any time there is a capacity shortage, the control plane will pick one these placeholder pods as the first candidate to {{< glossary\_tooltip text="preempt" term\_id="preemption" >}}. ## Run Pods that request node capacity Review the sample manifest: {{% code\_sample language="yaml" file="deployments/deployment-with-capacity-reservation.yaml" %}} ### Pick a namespace for the placeholder pods You should select, or create, a {{< glossary\_tooltip term\_id="namespace" text="namespace">}} that the placeholder Pods will go into. ### Create the placeholder deployment Create a Deployment based on that manifest: ```shell # Change the namespace name "example" kubectl --namespace example apply -f https://k8s.io/examples/deployments/deployment-with-capacity-reservation.yaml ``` ## Adjust placeholder resource requests Configure the resource requests and limits for the placeholder pods to define the amount of overprovisioned resources you want to maintain. This reservation ensures that a specific amount of CPU and memory is kept available for new pods. To edit the Deployment, modify the `resources` section in the Deployment manifest file to set appropriate requests and limits. You can download that file locally and then edit it with whichever text editor you prefer. You can also edit the Deployment using kubectl: ```shell kubectl edit deployment capacity-reservation ``` For example, to reserve a total of a 0.5 CPU and 1GiB of memory across 5 placeholder pods, define the resource requests and limits for a single placeholder pod as follows: ```yaml resources: requests: cpu: "100m" memory: "200Mi" limits: cpu: "100m" ``` ## Set the desired replica count ### Calculate the total reserved resources For example, with 5 replicas each reserving 0.1 CPU and 200MiB of memory: Total CPU reserved: 5 × 0.1 = 0.5 (in the Pod specification, you'll write the quantity `500m`) Total memory reserved: 5 × 200MiB = 1GiB (in the Pod specification, you'll write `1 Gi`) To scale the Deployment, adjust the number of replicas based on your cluster's size and expected workload: ```shell kubectl scale deployment capacity-reservation --replicas=5 ``` Verify the scaling: ```shell kubectl get deployment capacity-reservation ``` The output should reflect the updated number of replicas: ```none NAME READY UP-TO-DATE AVAILABLE AGE capacity-reservation 5/5 5 5 2m ``` {{< note >}} Some autoscalers, notably [Karpenter](/docs/concepts/cluster-administration/cluster-autoscaling/#autoscaler-karpenter), treat preferred affinity rules as hard rules when considering node scaling. If you use Karpenter or
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/node-overprovisioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/node-overprovisioning.md
|
[
-0.0073205893859267235,
-0.02102709375321865,
0.07515932619571686,
0.05021394416689873,
-0.03895801678299904,
0.001900448463857174,
0.012485501356422901,
-0.035820528864860535,
-0.0007097938214428723,
0.07406215369701385,
-0.04713578149676323,
-0.0774417370557785,
-0.030532103031873703,
-0.037722717970609665,
0.0022347276099026203,
-0.011906315572559834,
0.06800147145986557,
-0.06316608190536499,
-0.04468649998307228,
-0.08168333768844604,
0.0468730591237545,
0.006607121787965298,
0.0427311472594738,
0.04024910554289818,
-0.04748434200882912,
0.010744230821728706,
-0.05201399698853493,
-0.023777207359671593,
0.033651724457740784,
0.03463716804981232,
-0.03748895227909088,
0.004573880694806576,
0.02366541512310505,
0.05591635778546333,
0.052944835275411606,
0.08146607130765915,
0.0205380879342556,
-0.01258867047727108,
-0.04846302419900894,
0.019179677590727806,
0.05115235224366188,
-0.03683703392744064,
-0.10944456607103348,
-0.011631977744400501,
0.024941228330135345,
0.012076769955456257,
-0.042536087334156036,
-0.008031735196709633,
0.011864282190799713,
-0.008091052994132042,
0.0310526043176651,
-0.1538558006286621,
0.03396180272102356,
-0.003745476482436061,
0.04643142968416214,
0.05135810747742653,
0.0076935989782214165,
-0.001139613101258874,
0.09463011473417282,
-0.037062741816043854,
-0.02449117600917816,
-0.034324727952480316,
0.025029581040143967,
-0.04426508769392967,
0.021347252652049065,
0.003178171580657363,
0.04875035583972931,
0.038275495171546936,
-0.018628409132361412,
0.03358162194490433,
0.08814135193824768,
0.01816493272781372,
0.015430228784680367,
-0.01589411497116089,
-0.00637147668749094,
0.00786998588591814,
-0.06061927229166031,
0.0610118992626667,
0.03474949672818184,
-0.043052781373262405,
0.02681802026927471,
0.0622575618326664,
0.08988684415817261,
0.05210207775235176,
-0.056273218244314194,
-0.0783248171210289,
0.027164233848452568,
-0.05481074005365372,
0.025961684063076973,
-0.04066728800535202,
0.0066691068932414055,
-0.03623751550912857,
0.013503169640898705,
-0.08848627656698227,
0.010804095305502415,
0.030936911702156067,
-0.03046029806137085,
-0.05115664377808571,
0.0012234060559421778,
-0.010253245010972023,
0.058442968875169754,
-0.03032376989722252,
0.017989233136177063,
-0.009614434093236923,
-0.0023841033689677715,
0.0022642691619694233,
-0.09614294767379761,
0.001524824183434248,
0.035978175699710846,
0.048481546342372894,
0.04073813557624817,
0.08254681527614594,
-0.03523241728544235,
0.036585483700037,
-0.043768495321273804,
0.01641746237874031,
0.03204498812556267,
-0.015101531520485878,
0.03705377131700516,
0.05793309584259987,
0.009888011030852795,
-0.0985776036977768,
-0.01414552703499794,
-0.018507054075598717,
-0.013578645884990692,
0.05154848471283913,
-0.03878892958164215,
3.952040292797347e-33,
0.01722337119281292,
-0.07783836871385574,
-0.045774538069963455,
-0.02998684160411358,
-0.01706000044941902,
-0.07699405401945114,
-0.049761369824409485,
-0.022358745336532593,
-0.10973075777292252,
-0.07044188678264618,
-0.015042533166706562,
0.10263973474502563,
0.01955311745405197,
-0.020547663792967796,
0.008170527406036854,
-0.08768724650144577,
-0.007185985799878836,
0.07777600735425949,
0.10698556154966354,
-0.0382055900990963,
0.020984869450330734,
-0.09656122326850891,
-0.03422531858086586,
-0.021352684125304222,
0.059335023164749146,
0.015432133339345455,
0.0350571945309639,
-0.10589338093996048,
-0.015422338619828224,
0.03224782645702362,
-0.033181726932525635,
0.0043986085802316666,
0.013613278977572918,
-0.009102039970457554,
-0.1743655949831009,
0.006766616832464933,
-0.03810536488890648,
-0.025498459115624428,
0.004124567378312349,
-0.03907589614391327,
-0.004912267904728651,
-0.01874244213104248,
-0.00644071027636528,
-0.07200824469327927,
0.06523381173610687,
0.06300521641969681,
0.07050203531980515,
-0.12247102707624435,
0.04931844398379326,
0.006575122009962797,
0.008071338757872581,
-0.09638027101755142,
0.013635369017720222,
-0.03234464302659035,
-0.009752101264894009,
0.05222402885556221,
0.06708283722400665,
-0.0837988629937172,
-0.004690142348408699,
-0.023732386529445648,
-0.06218065321445465,
-0.05000830814242363,
-0.05444224551320076,
0.01618412509560585,
0.033502642065286636,
-0.003052663756534457,
-0.033856187015771866,
0.08644183725118637,
0.03162118047475815,
0.01124734990298748,
-0.038989413529634476,
0.008314398117363453,
0.025578543543815613,
0.04419955238699913,
0.010713959112763405,
-0.01687568426132202,
0.01777738705277443,
0.032447200268507004,
-0.13027237355709076,
0.06077675521373749,
-0.017342668026685715,
-0.04130551218986511,
-0.024543387815356255,
0.0725422278046608,
0.08414413779973984,
-0.06924853473901749,
0.018523896113038063,
0.0189418476074934,
-0.07595255225896835,
0.04138374701142311,
-0.034802693873643875,
-0.05447007715702057,
-0.06934857368469238,
0.03108753077685833,
-0.1188063845038414,
-4.707712713695209e-33,
0.13639184832572937,
-0.006678978446871042,
0.004134988412261009,
0.06231061741709709,
0.04716083034873009,
-0.0064224605448544025,
-0.0024782861582934856,
0.03194369003176689,
0.007277199067175388,
-0.06343113631010056,
-0.041187528520822525,
-0.00637342594563961,
0.026103975251317024,
0.05788996070623398,
-0.09957925975322723,
0.013276400975883007,
-0.0856320708990097,
0.015572593547403812,
0.0195632241666317,
0.01879875175654888,
0.021232470870018005,
-0.07710114866495132,
0.05127006024122238,
-0.0014818330528214574,
0.009531456977128983,
-0.007665650919079781,
0.0135933393612504,
0.02436164580285549,
-0.01009383611381054,
-0.03301450237631798,
-0.04494792968034744,
-0.05891833081841469,
-0.004372682888060808,
-0.04061105474829674,
0.07806617766618729,
-0.03080502524971962,
0.005448381882160902,
-0.026022398844361305,
-0.008407221175730228,
0.04433261603116989,
0.06705368310213089,
0.01161442045122385,
-0.0831327810883522,
-0.11978363245725632,
0.004433015361428261,
0.03674260526895523,
0.03932072967290878,
-0.002617329591885209,
-0.06461785733699799,
-0.07093505561351776,
0.022559143602848053,
-0.012660924345254898,
-0.04534798488020897,
0.08016103506088257,
-0.06210575997829437,
0.029921945184469223,
0.0423094816505909,
0.011089561507105827,
-0.06781971454620361,
0.00985137652605772,
0.03872210904955864,
-0.08146660029888153,
0.055661752820014954,
-0.0007867997046560049,
0.013541276566684246,
-0.0545475110411644,
0.016821522265672684,
0.028566280379891396,
-0.01063760556280613,
0.018086984753608704,
-0.07586921006441116,
-0.013893021270632744,
0.051036857068538666,
0.020245781168341637,
-0.014789203181862831,
-0.01682197116315365,
0.04783088341355324,
-0.05697663500905037,
0.09126732498407364,
-0.025356987491250038,
-0.01601032167673111,
0.09450478851795197,
-0.04762616008520126,
0.02407083660364151,
0.05506349727511406,
0.11512603610754013,
0.052968911826610565,
0.14151188731193542,
0.054081860929727554,
0.10344065725803375,
-0.05271109938621521,
-0.0240336824208498,
-0.020770667120814323,
0.12956461310386658,
-0.06423336267471313,
-5.618874254764705e-8,
0.01140633411705494,
0.13864372670650482,
-0.011869687587022781,
0.05434497445821762,
0.04060335084795952,
-0.04548675939440727,
0.015328414738178253,
0.01942061446607113,
-0.016940440982580185,
-0.015956534072756767,
0.043937139213085175,
0.04334142059087753,
-0.02635512873530388,
0.06808808445930481,
0.01052134856581688,
0.04161306098103523,
-0.04676075279712677,
-0.030645158141851425,
0.0012871231883764267,
-0.08575773239135742,
-0.0463244691491127,
-0.03613033518195152,
0.014083427377045155,
0.04848961532115936,
0.004192004445940256,
-0.003721385495737195,
0.0433071069419384,
0.038203198462724686,
-0.004228196572512388,
-0.03409994766116142,
-0.0618334636092186,
0.0004811693506781012,
-0.10121924430131912,
0.07887048274278641,
0.029394008219242096,
-0.031614236533641815,
-0.14454887807369232,
0.06139905005693436,
0.11701072752475739,
0.0800238698720932,
0.005367097444832325,
0.005483344197273254,
-0.050409864634275436,
0.0071540228091180325,
0.023326247930526733,
0.09445531666278839,
-0.030481306836009026,
0.09103181213140488,
-0.03851986676454544,
0.008808489888906479,
-0.037645142525434494,
-0.029114918783307076,
-0.007842082530260086,
0.09584295749664307,
-0.006595723330974579,
-0.011253150179982185,
-0.014576183632016182,
-0.002895154058933258,
0.019319213926792145,
-0.0008596861734986305,
0.043476056307554245,
-0.017992636188864708,
-0.06836819648742676,
0.014246812090277672
] | 0.094656
|
```shell kubectl get deployment capacity-reservation ``` The output should reflect the updated number of replicas: ```none NAME READY UP-TO-DATE AVAILABLE AGE capacity-reservation 5/5 5 5 2m ``` {{< note >}} Some autoscalers, notably [Karpenter](/docs/concepts/cluster-administration/cluster-autoscaling/#autoscaler-karpenter), treat preferred affinity rules as hard rules when considering node scaling. If you use Karpenter or another node autoscaler that uses the same heuristic, the replica count you set here also sets a minimum node count for your cluster. {{< /note >}} ## {{% heading "whatsnext" %}} - Learn more about [PriorityClasses](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) and how they affect pod scheduling. - Explore [node autoscaling](/docs/concepts/cluster-administration/cluster-autoscaling/) to dynamically adjust your cluster's size based on workload demands. - Understand [Pod preemption](/docs/concepts/scheduling-eviction/pod-priority-preemption/), a key mechanism for Kubernetes to handle resource contention. The same page covers \_eviction\_, which is less relevant to the placeholder Pod approach, but is also a mechanism for Kubernetes to react when resources are contended.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/node-overprovisioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/node-overprovisioning.md
|
[
0.07260944694280624,
0.022571420297026634,
0.027711957693099976,
0.06488518416881561,
-0.05208872631192207,
-0.022984372451901436,
-0.03043198399245739,
0.016237551346421242,
-0.01581748202443123,
0.07069946825504303,
-0.024546083062887192,
-0.08631397783756256,
-0.022142892703413963,
-0.03201967477798462,
-0.006642269901931286,
-0.03374342992901802,
0.030461130663752556,
-0.03435702621936798,
-0.024655740708112717,
-0.12292809784412384,
0.04572505131363869,
-0.035840876400470734,
0.029851147904992104,
0.006262750364840031,
-0.021563652902841568,
-0.0022395949345082045,
-0.09262106567621231,
-0.04588819667696953,
0.0341329351067543,
-0.05021718144416809,
-0.029585152864456177,
0.045515354722738266,
0.1000269278883934,
0.027560822665691376,
0.06099899113178253,
0.07146844267845154,
-0.021639550104737282,
-0.07515373826026917,
-0.0488809198141098,
-0.00479512382298708,
0.050479184836149216,
-0.015219069086015224,
-0.10523619502782822,
-0.019509559497237206,
0.008833774365484715,
0.033741556107997894,
-0.08912156522274017,
0.06073897331953049,
-0.04063471034169197,
0.0024488531053066254,
0.020499058067798615,
-0.08057751506567001,
0.02644628845155239,
-0.013062884099781513,
0.005768897011876106,
0.0577113963663578,
0.02236420102417469,
0.0048978254199028015,
0.08253810554742813,
-0.0077967229299247265,
0.03231135755777359,
-0.04635300114750862,
0.028779562562704086,
-0.05139633268117905,
0.004626378417015076,
-0.02699550986289978,
0.044778212904930115,
-0.002683166414499283,
0.010521391406655312,
0.09242010116577148,
0.10373151302337646,
0.0035643165465444326,
0.008444332517683506,
-0.0009548610541969538,
0.00927470438182354,
-0.02214004099369049,
-0.05865659564733505,
0.03669428080320358,
0.018518639728426933,
0.009972733445465565,
-0.06487492471933365,
-0.01783650368452072,
-0.018144279718399048,
-0.025701124221086502,
-0.09107890725135803,
-0.00965762697160244,
-0.008815712295472622,
-0.014070187695324421,
-0.0014997600810602307,
0.0042062243446707726,
0.04100494086742401,
0.032179515808820724,
-0.04966356232762337,
-0.04282365366816521,
0.01704966276884079,
0.0021138256415724754,
-0.07387016713619232,
0.020327942445874214,
0.030332621186971664,
-0.015979725867509842,
0.0976153239607811,
0.02845609560608864,
0.0631563663482666,
0.04706544801592827,
0.03133678436279297,
-0.01912883296608925,
-0.03712081536650658,
0.03362150862812996,
0.024591559544205666,
0.06741094589233398,
0.04280668869614601,
0.1198602244257927,
-0.026462549343705177,
0.026614006608724594,
-0.022958222776651382,
0.06278795003890991,
0.06053520366549492,
-0.05270352214574814,
0.025449393317103386,
0.09496822208166122,
0.070465087890625,
-0.05563158169388771,
-0.02024111896753311,
-0.003821984399110079,
-0.022393904626369476,
0.028785809874534607,
-0.027015242725610733,
4.510877286675971e-33,
-0.01756931282579899,
-0.06021463871002197,
0.010046254843473434,
-0.05407305061817169,
-0.010173494927585125,
-0.06831089407205582,
-0.03654973953962326,
-0.032255664467811584,
-0.07150990515947342,
-0.09346780925989151,
-0.053979478776454926,
0.037885285913944244,
0.026695536449551582,
-0.00043781049316748977,
-0.02005164697766304,
-0.09879196435213089,
-0.011152135208249092,
0.08422000706195831,
0.0701928585767746,
-0.04039641469717026,
0.039976224303245544,
-0.12059598416090012,
-0.1168041005730629,
0.03674580156803131,
0.0532662570476532,
-0.020366689190268517,
0.03452339023351669,
-0.06490746885538101,
-0.08675070106983185,
0.007022118661552668,
-0.00687143811956048,
-0.019642073661088943,
0.03754645586013794,
-0.017715727910399437,
-0.0980360209941864,
-0.03899959474802017,
0.010083012282848358,
0.014502612873911858,
-0.09424002468585968,
-0.05590219423174858,
0.03268641233444214,
0.015237163752317429,
0.03289517015218735,
-0.04352192580699921,
0.0006949834059923887,
-0.015107890591025352,
0.06491822004318237,
-0.03023022972047329,
-0.01549694873392582,
0.017978273332118988,
0.03496885299682617,
-0.06741686165332794,
0.06570545583963394,
-0.03478896990418434,
0.04247598350048065,
0.04292731732130051,
0.08123492449522018,
-0.019376587122678757,
0.004079004749655724,
0.024997657164931297,
-0.016340922564268112,
-0.06934235990047455,
0.011158076114952564,
0.02864990569651127,
0.060789257287979126,
0.08376963436603546,
-0.0034462790936231613,
0.016476372256875038,
0.006068956572562456,
0.10641352832317352,
-0.01968974620103836,
0.06029514595866203,
-0.0058645764365792274,
0.04746163263916969,
-0.04600775986909866,
-0.06426314264535904,
0.024841098114848137,
0.008037474006414413,
-0.14931730926036835,
0.11556744575500488,
0.01762767881155014,
0.03369412571191788,
-0.01902100443840027,
0.04031374678015709,
0.014827133156359196,
-0.06802422553300858,
0.04263666272163391,
0.028776930645108223,
-0.04537709057331085,
0.0012063245521858335,
0.040518175810575485,
-0.07526096701622009,
-0.03383982926607132,
0.021537119522690773,
-0.07513360679149628,
-3.4142358315908116e-33,
0.09553574025630951,
0.021065065637230873,
0.06386584788560867,
0.08230578899383545,
0.06554802507162094,
-0.020262764766812325,
-0.017748724669218063,
0.08444208651781082,
0.019661935046315193,
-0.07705925405025482,
-0.060622647404670715,
-0.0033546919003129005,
0.03188147023320198,
0.011235050857067108,
-0.09967289865016937,
0.04203683137893677,
-0.029636399820446968,
-0.027850670740008354,
0.05584121122956276,
0.0531579926609993,
-0.024447187781333923,
-0.058892831206321716,
0.05408201366662979,
0.040597282350063324,
0.06585346162319183,
-0.004567320458590984,
0.012797088362276554,
0.013803929090499878,
-0.02323600836098194,
-0.05144386738538742,
0.011752205900847912,
-0.10546941310167313,
0.003815096104517579,
0.03543374314904213,
0.05927898734807968,
-0.05106278508901596,
-0.05248255282640457,
0.08993235975503922,
0.04618110507726669,
0.07680653780698776,
0.05034589022397995,
0.031431060284376144,
-0.06114530563354492,
-0.07672137022018433,
-0.029210645705461502,
0.003921217750757933,
0.08292662352323532,
0.0198922548443079,
-0.014250318519771099,
-0.11163824051618576,
-0.02451433800160885,
-0.032669007778167725,
0.005656861700117588,
0.12646795809268951,
0.013578069396317005,
0.02273346669971943,
-0.0032752917613834143,
0.09237349778413773,
-0.016402289271354675,
-0.013597127981483936,
0.01617961749434471,
-0.08355105668306351,
0.05080745741724968,
-0.01686609722673893,
-0.02392890304327011,
-0.09656701236963272,
-0.0022716624662280083,
-0.03320949152112007,
-0.09933867305517197,
0.05244951695203781,
0.0008033061749301851,
0.029167987406253815,
0.02240966260433197,
0.0682174488902092,
-0.07207399606704712,
-0.06165119633078575,
0.0006900126463733613,
0.011362838558852673,
0.06914003193378448,
0.008057912811636925,
-0.08748088777065277,
0.09050024300813675,
-0.059666212648153305,
0.05953945592045784,
-0.01946824975311756,
0.08186093717813492,
0.055902522057294846,
0.08406107127666473,
0.0400698147714138,
0.13676141202449799,
-0.031136393547058105,
-0.010564278811216354,
-0.06616280972957611,
0.05182506516575813,
-0.08278381824493408,
-5.114774381809184e-8,
0.043429113924503326,
-0.006281075067818165,
-0.0528186559677124,
0.05593489110469818,
0.0684211328625679,
-0.013079479336738586,
0.02271370217204094,
0.0013374885311350226,
-0.020003948360681534,
0.04385825991630554,
0.02733345329761505,
-0.012879929505288601,
-0.0486542247235775,
0.01689210906624794,
0.032420627772808075,
-0.008077153004705906,
0.003489990485832095,
0.005449058022350073,
-0.011162436567246914,
-0.07186448574066162,
-0.05639464035630226,
-0.007345087826251984,
0.030860535800457,
-0.006191573571413755,
0.028778400272130966,
0.020423652604222298,
0.07498978823423386,
0.046482380479574203,
0.032345645129680634,
-0.059344589710235596,
-0.07803316414356232,
0.007381143979728222,
-0.07964009791612625,
-0.00727441580966115,
-0.003349534934386611,
0.010375982150435448,
-0.16620276868343353,
0.059157442301511765,
0.020760342478752136,
0.10568936169147491,
0.013324190862476826,
0.002542471047490835,
-0.03411075472831726,
0.009441441856324673,
0.012917366810142994,
0.06294827908277512,
-0.07081450521945953,
0.04464295506477356,
-0.009726752527058125,
-0.04356878623366356,
0.03930427134037018,
-0.08365498483181,
-0.018543856218457222,
0.040137648582458496,
-0.027474477887153625,
0.022795328870415688,
0.02363007143139839,
-0.0343172587454319,
0.0836457759141922,
-0.0032502496615052223,
0.028625499457120895,
0.0046579171903431416,
-0.0739002451300621,
-0.024439197033643723
] | 0.134258
|
## {{% heading "prerequisites" %}} Some steps in this page use the `jq` tool. If you don't have `jq`, you can install it via your operating system's software sources, or fetch it from [https://jqlang.github.io/jq/](https://jqlang.github.io/jq/). Some steps also involve installing `curl`, which can be installed via your operating system's software sources. A subset of the kubelet's configuration parameters may be set via an on-disk config file, as a substitute for command-line flags. Providing parameters via a config file is the recommended approach because it simplifies node deployment and configuration management. ## Create the config file The subset of the kubelet's configuration that can be configured via a file is defined by the [`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/) struct. The configuration file must be a JSON or YAML representation of the parameters in this struct. Make sure the kubelet has read permissions on the file. Here is an example of what this file might look like: ```yaml apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration address: "192.168.0.8" port: 20250 serializeImagePulls: false evictionHard: memory.available: "100Mi" nodefs.available: "10%" nodefs.inodesFree: "5%" imagefs.available: "15%" imagefs.inodesFree: "5%" ``` In this example, the kubelet is configured with the following settings: 1. `address`: The kubelet will serve on IP address `192.168.0.8`. 1. `port`: The kubelet will serve on port `20250`. 1. `serializeImagePulls`: Image pulls will be done in parallel. 1. `evictionHard`: The kubelet will evict Pods under one of the following conditions: - When the node's available memory drops below 100MiB. - When the node's main filesystem's available space is less than 10%. - When the image filesystem's available space is less than 15%. - When more than 95% of the node's main filesystem's inodes are in use. {{< note >}} In the example, by changing the default value of only one parameter for evictionHard, the default values of other parameters will not be inherited and will be set to zero. In order to provide custom values, you should provide all the threshold values respectively. Alternatively, you can set the MergeDefaultEvictionSettings to true in the kubelet configuration file, if any parameter is changed then the other parameters will inherit their default values instead of 0. {{< /note >}} The `imagefs` is an optional filesystem that container runtimes use to store container images and container writable layers. ## Start a kubelet process configured via the config file {{< note >}} If you use kubeadm to initialize your cluster, use the kubelet-config while creating your cluster with `kubeadm init`. See [configuring kubelet using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/) for details. {{< /note >}} Start the kubelet with the `--config` flag set to the path of the kubelet's config file. The kubelet will then load its config from this file. Note that command line flags which target the same value as a config file will override that value. This helps ensure backwards compatibility with the command-line API. Note that relative file paths in the kubelet config file are resolved relative to the location of the kubelet config file, whereas relative paths in command line flags are resolved relative to the kubelet's current working directory. Note that some default values differ between command-line flags and the kubelet config file. If `--config` is provided and the values are not specified via the command line, the defaults for the `KubeletConfiguration` version apply. In the above example, this version is `kubelet.config.k8s.io/v1beta1`. ## Drop-in directory for kubelet configuration files {#kubelet-conf-d} You can specify a drop-in configuration directory for the kubelet. By default, the kubelet does not look for drop-in configuration files anywhere - you must specify a path. For example: `--config-dir=/etc/kubernetes/kubelet.conf.d` For Kubernetes v1.28 to v1.29, you can only specify `--config-dir` if you also set the environment variable `KUBELET\_CONFIG\_DROPIN\_DIR\_ALPHA`
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
[
-0.0004995845374651253,
0.05457393452525139,
0.02475721947848797,
-0.013412754982709885,
-0.09681305289268494,
0.033136628568172455,
-0.032764460891485214,
0.018085584044456482,
0.014819969423115253,
-0.06526404619216919,
-0.020247962325811386,
-0.10131677985191345,
0.045660048723220825,
-0.027103109285235405,
0.07244550436735153,
0.01620970107614994,
-0.003415918443351984,
0.027744660153985023,
-0.01550120860338211,
-0.10305213183164597,
-0.0007147083524614573,
0.027415983378887177,
0.06460123509168625,
-0.04246837645769119,
-0.03341842442750931,
-0.09921540319919586,
0.009231895208358765,
0.0017628929344937205,
0.027599427849054337,
-0.03956160694360733,
-0.030867384746670723,
0.0652700737118721,
-0.030321799218654633,
0.03293120115995407,
0.05151291936635971,
0.09996099770069122,
0.043811362236738205,
-0.04734041169285774,
-0.05953729525208473,
-0.006582186557352543,
0.01723504811525345,
0.06225193664431572,
-0.06954322010278702,
-0.03958981856703758,
-0.004467022139579058,
0.019076192751526833,
-0.10220992565155029,
0.021811027079820633,
-0.05316458269953728,
-0.020488528534770012,
-0.03618529811501503,
-0.11765333265066147,
0.06624752283096313,
-0.025258075445890427,
0.07384329289197922,
0.06699390709400177,
-0.06391797959804535,
0.04001735523343086,
0.0479343943297863,
0.01714666374027729,
-0.01334140170365572,
0.057017531245946884,
0.011286867782473564,
-0.0061358301900327206,
-0.07068342715501785,
0.00709168054163456,
-0.033131543546915054,
0.05946167930960655,
0.04930899292230606,
0.05154114589095116,
0.006955437362194061,
-0.02925027720630169,
-0.07492214441299438,
-0.04213517904281616,
-0.02855604700744152,
0.001943012815900147,
-0.03341064974665642,
0.05281303822994232,
-0.07277002185583115,
-0.06533007323741913,
0.013010883703827858,
0.047096021473407745,
0.04643341898918152,
0.04066461697220802,
-0.05129983276128769,
-0.01752481237053871,
-0.03202679753303528,
0.006610075943171978,
0.05172023922204971,
0.04717837646603584,
0.014155995100736618,
-0.13708141446113586,
-0.018074654042720795,
-0.09058982133865356,
0.051899150013923645,
0.09427987784147263,
0.0016762252198532224,
0.04379471391439438,
0.030020572245121002,
-0.002212238498032093,
0.011342570185661316,
-0.04823947325348854,
0.04020361229777336,
0.054245222359895706,
0.04169521480798721,
-0.047500524669885635,
-0.003099606605246663,
0.006335883401334286,
0.04070918262004852,
-0.021196402609348297,
0.011568439193069935,
0.015339910052716732,
-0.026419607922434807,
-0.07456030696630478,
0.0036395287606865168,
0.05000368878245354,
0.10808257758617401,
0.011948863044381142,
0.08886469155550003,
0.02505399100482464,
0.0541091188788414,
-0.005887300707399845,
-0.033979322761297226,
0.01353688444942236,
0.00979529693722725,
-0.0006925337947905064,
-0.030373407527804375,
2.6237223091475543e-33,
0.11063233017921448,
-0.024602975696325302,
0.0776984840631485,
0.0028916969895362854,
-0.05278782546520233,
-0.09545587748289108,
0.014795191586017609,
-0.04447626695036888,
-0.10896257311105728,
-0.02212134748697281,
-0.04498963803052902,
0.041110750287771225,
-0.07021282613277435,
0.012307033874094486,
0.004817725159227848,
-0.034802891314029694,
-0.08991085737943649,
0.03194500505924225,
0.05327470228075981,
-0.03380804508924484,
0.025151658803224564,
-0.031170247122645378,
-0.03337205573916435,
0.06822293251752853,
0.02270222082734108,
0.015958476811647415,
0.05498099699616432,
-0.03439360857009888,
-0.04971332475543022,
-0.0008443809347227216,
0.04201248660683632,
-0.005816834978759289,
-0.03960493579506874,
0.025883594527840614,
-0.1422872394323349,
0.035776786506175995,
-0.08952992409467697,
0.03034212626516819,
-0.05995463952422142,
-0.02374712936580181,
0.03610481321811676,
0.018486425280570984,
-0.028450537472963333,
-0.039881832897663116,
0.014772508293390274,
-0.07286917418241501,
0.0020334655418992043,
-0.07393782585859299,
0.15464109182357788,
-0.0012276008492335677,
-0.051292646676301956,
-0.022373825311660767,
0.086992047727108,
-0.0038157713133841753,
0.10806283354759216,
0.029456572607159615,
0.11551794409751892,
-0.033894605934619904,
-0.0635855421423912,
0.03373836353421211,
-0.042522937059402466,
-0.0174518171697855,
0.005233848933130503,
0.07478990405797958,
0.07058146595954895,
-0.0014541205018758774,
-0.054546236991882324,
-0.01158607192337513,
-0.037997666746377945,
-0.0021333328913897276,
-0.058705128729343414,
-0.013459299691021442,
-0.04947376251220703,
-0.007907101884484291,
-0.009137609973549843,
-0.06112527847290039,
-0.05366605892777443,
0.020756907761096954,
-0.09855971485376358,
0.014271212741732597,
0.027977924793958664,
-0.03569112345576286,
-0.040945615619421005,
0.10278770327568054,
0.10050076991319656,
-0.05805331468582153,
0.08855853974819183,
0.07521135360002518,
-0.009410840459167957,
-0.011947226710617542,
-0.017894607037305832,
0.012142343446612358,
-0.047671716660261154,
-0.0013580138329416513,
-0.06701351702213287,
-3.977844965191789e-33,
0.0826493427157402,
0.0244479700922966,
0.06074925884604454,
0.03621809557080269,
-0.030483238399028778,
0.0015307298162952065,
-0.002236141823232174,
0.015857670456171036,
0.05236627534031868,
-0.00024152702826540917,
-0.10912247747182846,
0.005231097806245089,
0.04047925025224686,
-0.023171542212367058,
-0.0540580227971077,
0.026956258341670036,
-0.12653522193431854,
0.028267070651054382,
0.016791652888059616,
0.04274105280637741,
-0.0843169093132019,
-0.02468332089483738,
0.03642350062727928,
0.02518041990697384,
-0.005331017076969147,
-0.037783585488796234,
0.07047221809625626,
0.040308721363544464,
-0.0930531769990921,
-0.020860489457845688,
0.008825902827084064,
-0.04430646076798439,
-0.05715238302946091,
-0.010389869101345539,
-0.03197629377245903,
-0.08710809051990509,
0.023174945265054703,
0.10642056912183762,
-0.0019696434028446674,
0.04651537165045738,
0.024304712191224098,
0.06538241356611252,
-0.0669260174036026,
0.008382711559534073,
-0.034028999507427216,
0.059530843049287796,
0.06266790628433228,
-0.027669120579957962,
-0.04647338017821312,
-0.08507874608039856,
-0.048744481056928635,
-0.019019102677702904,
0.04562460631132126,
0.07116537541151047,
-0.051131319254636765,
0.010594458319246769,
-0.022171344608068466,
0.11215540021657944,
0.02381766401231289,
-0.006658576894551516,
0.005323759280145168,
-0.09530293196439743,
0.07021824270486832,
-0.05211329460144043,
-0.04240216687321663,
-0.08296333253383636,
-0.023907873779535294,
0.034962378442287445,
-0.032452259212732315,
-0.024725796654820442,
-0.10087861120700836,
-0.03073011338710785,
0.05763634294271469,
0.016325246542692184,
-0.007856656797230244,
-0.000153577042510733,
-0.013960015960037708,
-0.005318071693181992,
0.09291300177574158,
0.04744673892855644,
0.03525250777602196,
0.03298831358551979,
-0.07815180718898773,
0.0008867979049682617,
0.07580381631851196,
-0.02115129493176937,
0.03478202596306801,
0.08254154026508331,
0.03876699507236481,
0.018086059018969536,
0.023644546046853065,
0.025758087635040283,
0.019478676840662956,
0.07096387445926666,
-0.08906583487987518,
-5.540232450584881e-8,
0.027083376422524452,
-0.06990458816289902,
-0.10911721736192703,
-0.013438046909868717,
0.04399826005101204,
0.04916233941912651,
0.0026385714299976826,
0.001600936520844698,
-0.014549794606864452,
0.029770733788609505,
0.006799719296395779,
0.07851435244083405,
-0.031272586435079575,
0.01360356155782938,
-0.05053744465112686,
-0.04655509069561958,
-0.000010818784176080953,
0.08297982811927795,
0.008443004451692104,
0.030747415497899055,
-0.04278149455785751,
0.01441771350800991,
0.0188369732350111,
0.020811019465327263,
0.0866919457912445,
0.07287123799324036,
0.05907326191663742,
0.015016129240393639,
0.05961637943983078,
0.019721996039152145,
-0.013236604630947113,
0.022590385749936104,
-0.046500276774168015,
0.011559697799384594,
-0.027761857956647873,
-0.00638930220156908,
-0.1309806853532791,
0.020382866263389587,
0.0916660875082016,
0.020342934876680374,
0.004365772940218449,
0.0042427899315953255,
-0.0963374674320221,
0.0136001231148839,
-0.045317552983760834,
-0.012006770819425583,
-0.011950445361435413,
0.05067018046975136,
-0.005050170700997114,
-0.016996441408991814,
-0.05275597795844078,
-0.0660209134221077,
0.00282350298948586,
0.03002096153795719,
-0.03918202221393585,
0.1042652577161789,
0.021561644971370697,
-0.05008343607187271,
0.04582066088914871,
-0.04179387539625168,
-0.0021345154382288456,
0.027364039793610573,
0.05740117281675339,
-0.006964567117393017
] | 0.094413
|
{#kubelet-conf-d} You can specify a drop-in configuration directory for the kubelet. By default, the kubelet does not look for drop-in configuration files anywhere - you must specify a path. For example: `--config-dir=/etc/kubernetes/kubelet.conf.d` For Kubernetes v1.28 to v1.29, you can only specify `--config-dir` if you also set the environment variable `KUBELET\_CONFIG\_DROPIN\_DIR\_ALPHA` for the kubelet process (the value of that variable does not matter). {{< note >}} The suffix of a valid kubelet drop-in configuration file \*\*must\*\* be `.conf`. For instance: `99-kubelet-address.conf` {{< /note >}} The kubelet processes files in its config drop-in directory by sorting the \*\*entire file name\*\* alphanumerically. For instance, `00-kubelet.conf` is processed first, and then overridden with a file named `01-kubelet.conf`. These files may contain partial configurations but should not be invalid and must include type metadata, specifically `apiVersion` and `kind`. Validation is only performed on the final resulting configuration structure stored internally in the kubelet. This offers flexibility in managing and merging kubelet configurations from different sources while preventing undesirable configurations. However, it is important to note that behavior varies based on the data type of the configuration fields. Different data types in the kubelet configuration structure merge differently. See the [reference document](/docs/reference/node/kubelet-config-directory-merging/) for more information. ### Kubelet configuration merging order On startup, the kubelet merges configuration from: \* Feature gates specified over the command line (lowest precedence). \* The kubelet configuration. \* Drop-in configuration files, according to sort order. \* Command line arguments excluding feature gates (highest precedence). {{< note >}} The config drop-in dir mechanism for the kubelet is similar but different from how the `kubeadm` tool allows you to patch configuration. The `kubeadm` tool uses a specific [patching strategy](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#patches) for its configuration, whereas the only patch strategy for kubelet configuration drop-in files is `replace`. The kubelet determines the order of merges based on sorting the \*\*suffixes\*\* alphanumerically, and replaces every field present in a higher priority file. {{< /note >}} ## Viewing the kubelet configuration Since the configuration could now be spread over multiple files with this feature, if someone wants to inspect the final actuated configuration, they can follow these steps to inspect the kubelet configuration: 1. Start a proxy server using [`kubectl proxy`](/docs/reference/kubectl/generated/kubectl\_proxy/) in your terminal. ```bash kubectl proxy ``` Which gives output like: ```none Starting to serve on 127.0.0.1:8001 ``` 1. Open another terminal window and use `curl` to fetch the kubelet configuration. Replace `` with the actual name of your node: ```bash curl -X GET http://127.0.0.1:8001/api/v1/nodes//proxy/configz | jq . ``` ```json { "kubeletconfig": { "enableServer": true, "staticPodPath": "/var/run/kubernetes/static-pods", "syncFrequency": "1m0s", "fileCheckFrequency": "20s", "httpCheckFrequency": "20s", "address": "192.168.1.16", "port": 10250, "readOnlyPort": 10255, "tlsCertFile": "/var/lib/kubelet/pki/kubelet.crt", "tlsPrivateKeyFile": "/var/lib/kubelet/pki/kubelet.key", "rotateCertificates": true, "authentication": { "x509": { "clientCAFile": "/var/run/kubernetes/client-ca.crt" }, "webhook": { "enabled": true, "cacheTTL": "2m0s" }, "anonymous": { "enabled": true } }, "authorization": { "mode": "AlwaysAllow", "webhook": { "cacheAuthorizedTTL": "5m0s", "cacheUnauthorizedTTL": "30s" } }, "registryPullQPS": 5, "registryBurst": 10, "eventRecordQPS": 50, "eventBurst": 100, "enableDebuggingHandlers": true, "healthzPort": 10248, "healthzBindAddress": "127.0.0.1", "oomScoreAdj": -999, "clusterDomain": "cluster.local", "clusterDNS": [ "10.0.0.10" ], "streamingConnectionIdleTimeout": "4h0m0s", "nodeStatusUpdateFrequency": "10s", "nodeStatusReportFrequency": "5m0s", "nodeLeaseDurationSeconds": 40, "imageMinimumGCAge": "2m0s", "imageMaximumGCAge": "0s", "imageGCHighThresholdPercent": 85, "imageGCLowThresholdPercent": 80, "volumeStatsAggPeriod": "1m0s", "cgroupsPerQOS": true, "cgroupDriver": "systemd", "cpuManagerPolicy": "none", "cpuManagerReconcilePeriod": "10s", "memoryManagerPolicy": "None", "topologyManagerPolicy": "none", "topologyManagerScope": "container", "runtimeRequestTimeout": "2m0s", "hairpinMode": "promiscuous-bridge", "maxPods": 110, "podPidsLimit": -1, "resolvConf": "/run/systemd/resolve/resolv.conf", "cpuCFSQuota": true, "cpuCFSQuotaPeriod": "100ms", "nodeStatusMaxImages": 50, "maxOpenFiles": 1000000, "contentType": "application/vnd.kubernetes.protobuf", "kubeAPIQPS": 50, "kubeAPIBurst": 100, "serializeImagePulls": true, "evictionHard": { "imagefs.available": "15%", "memory.available": "100Mi", "nodefs.available": "10%", "nodefs.inodesFree": "5%", "imagefs.inodesFree": "5%" }, "evictionPressureTransitionPeriod": "1m0s", "mergeDefaultEvictionSettings": false, "enableControllerAttachDetach": true, "makeIPTablesUtilChains": true, "iptablesMasqueradeBit": 14, "iptablesDropBit": 15, "featureGates": { "AllAlpha": false }, "failSwapOn": false, "memorySwap": {}, "containerLogMaxSize": "10Mi", "containerLogMaxFiles": 5, "configMapAndSecretChangeDetectionStrategy": "Watch", "enforceNodeAllocatable": [ "pods" ], "volumePluginDir": "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", "logging": { "format": "text", "flushFrequency": "5s",
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
[
0.0435338020324707,
0.007211821153759956,
0.04065227136015892,
-0.03274783119559288,
-0.021359959617257118,
-0.009372851811349392,
0.0373234860599041,
0.0006044355686753988,
0.06488166004419327,
-0.04096955806016922,
0.01797237992286682,
-0.0807095468044281,
-0.012241131626069546,
-0.02534695342183113,
0.05001301318407059,
0.039183277636766434,
-0.045089349150657654,
-0.005803882144391537,
-0.028898553922772408,
-0.018959758803248405,
-0.04948500171303749,
0.018002795055508614,
0.027866940945386887,
0.015411986038088799,
-0.011717011220753193,
-0.09439835697412491,
-0.01506295707076788,
0.02176404744386673,
0.003650239435955882,
-0.036123309284448624,
0.016680806875228882,
0.13054117560386658,
-0.030071530491113663,
0.07211334258317947,
0.10655268281698227,
0.1132325828075409,
0.029995841905474663,
-0.020753832533955574,
-0.042660851031541824,
0.0706547349691391,
0.08888869732618332,
0.024003243073821068,
-0.039044637233018875,
-0.01553665567189455,
-0.08210243284702301,
0.058341871947050095,
-0.08684144169092178,
0.005190177354961634,
-0.0050151958130300045,
-0.04068518057465553,
0.014870950020849705,
-0.04932060092687607,
0.0656871572136879,
-0.0038190134800970554,
0.056200508028268814,
0.06095757335424423,
-0.024494914337992668,
0.014538492076098919,
0.06420792639255524,
0.00911997351795435,
0.06975044310092926,
0.00015782906848471612,
-0.04430605098605156,
-0.023211384192109108,
-0.08438307046890259,
0.0063106645829975605,
-0.03278405964374542,
0.03513228893280029,
0.003495511831715703,
0.027816591784358025,
0.020959200337529182,
0.007058967836201191,
-0.06296171247959137,
0.01202674675732851,
0.012904874049127102,
-0.02528257481753826,
-0.0700683519244194,
-0.005122259724885225,
-0.06379988044500351,
-0.12443546950817108,
0.07590131461620331,
0.015270746313035488,
0.07615497708320618,
-0.0461077056825161,
-0.08370059728622437,
-0.037700723856687546,
-0.025556758046150208,
-0.050500061362981796,
0.07429575175046921,
-0.009454414248466492,
0.017736421898007393,
-0.12473226338624954,
0.001686412375420332,
-0.11519137769937515,
0.05394624173641205,
0.06448006629943848,
0.011985895223915577,
0.05566154420375824,
-0.0013095898320898414,
0.0038830102421343327,
-0.009079997427761555,
0.0062330723740160465,
-0.0036410342436283827,
0.05701452121138573,
0.02908969298005104,
-0.0877108946442604,
0.008934536948800087,
-0.0016165187116712332,
-0.027791988104581833,
-0.013585126027464867,
-0.030605031177401543,
-0.013171347789466381,
0.07498011738061905,
-0.008082541637122631,
0.020957063883543015,
0.030824309214949608,
0.06124980002641678,
0.03534518927335739,
0.03266940265893936,
0.08374057710170746,
-0.0043094344437122345,
-0.031345684081315994,
-0.023731455206871033,
0.04458214342594147,
-0.060697250068187714,
0.027933983132243156,
-0.04714867100119591,
3.088301737492516e-33,
0.06259611994028091,
-0.07927092909812927,
0.001894431421533227,
-0.0157915111631155,
0.0069782487116754055,
-0.12153569608926773,
-0.08109623193740845,
-0.06156087666749954,
-0.07099960744380951,
-0.005986736621707678,
-0.03940952941775322,
-0.05243070423603058,
-0.05128943547606468,
-0.00533938966691494,
0.015634866431355476,
0.0028092502616345882,
0.007578049320727587,
0.06607744842767715,
0.06707355380058289,
-0.02918015420436859,
0.056228652596473694,
0.016425495967268944,
-0.06674027442932129,
0.055745892226696014,
0.03793847933411598,
-0.03431690111756325,
0.017731664702296257,
-0.004627418704330921,
-0.02528388239443302,
-0.02402707189321518,
-0.006097625941038132,
0.0406094565987587,
0.013305329717695713,
0.05331359803676605,
-0.16257593035697937,
0.0135164400562644,
-0.06172898784279823,
0.032216060906648636,
-0.08701351284980774,
-0.012123197317123413,
0.016163688153028488,
0.05946262925863266,
-0.07469211518764496,
-0.04605802148580551,
0.04891005903482437,
-0.057232461869716644,
0.07882769405841827,
-0.004386720713227987,
0.09129953384399414,
0.02023007534444332,
-0.036268316209316254,
0.04252103343605995,
0.022543001919984818,
0.014616483822464943,
0.06422573328018188,
0.016077764332294464,
0.0784214437007904,
-0.07413289695978165,
0.008392701856791973,
-0.01438393909484148,
-0.04599151387810707,
0.026224175468087196,
-0.008430039510130882,
0.023235756903886795,
0.08174227178096771,
-0.03614335134625435,
-0.0367833748459816,
0.04175540804862976,
-0.04001283645629883,
0.00429203175008297,
-0.13290050625801086,
0.0013434977736324072,
-0.04814400151371956,
-0.05528271943330765,
0.01923149637877941,
-0.058356303721666336,
-0.02336038649082184,
-0.038792721927165985,
-0.14421133697032928,
0.003303715493530035,
0.04757386073470116,
-0.021851323544979095,
-0.021892843768000603,
0.053036581724882126,
0.06404908001422882,
-0.030067801475524902,
0.05214982479810715,
-0.010756053030490875,
-0.027387259528040886,
-0.03387972339987755,
-0.023870743811130524,
-0.03188301622867584,
-0.06308303028345108,
-0.005143014248460531,
-0.06096126511693001,
-4.575648862116202e-33,
0.08089921623468399,
0.03402410075068474,
0.0424552746117115,
-0.008553721942007542,
-0.01509371679276228,
0.08549503982067108,
0.05252078175544739,
0.03974089026451111,
0.028393760323524475,
-0.06315946578979492,
-0.04189474135637283,
0.0019314023666083813,
0.01046681497246027,
-0.04101032391190529,
-0.06867270916700363,
0.02043554000556469,
-0.09990087151527405,
0.04047474265098572,
0.005171429831534624,
0.009871220216155052,
-0.034885089844465256,
-0.035103943198919296,
0.01885867863893509,
0.01355487760156393,
-0.027972476556897163,
-0.03012195974588394,
0.04474610462784767,
0.057772234082221985,
-0.08624749630689621,
-0.016840703785419464,
-0.003696194151416421,
0.014235656708478928,
-0.0576060488820076,
0.07962656021118164,
-0.020729821175336838,
-0.08736960589885712,
-0.01576448604464531,
0.07908334583044052,
-0.04080779105424881,
0.05610927939414978,
0.040433336049318314,
0.09738323092460632,
-0.047094907611608505,
-0.01678195223212242,
-0.048452604562044144,
0.07083025574684143,
0.08658866584300995,
-0.05042966082692146,
-0.005398747511208057,
-0.11280506104230881,
-0.01051747053861618,
-0.06486524641513824,
-0.02880549430847168,
0.04815295338630676,
-0.0180427934974432,
0.0684535875916481,
0.03554746136069298,
0.09612156450748444,
-0.04366547241806984,
-0.0260159894824028,
0.006234371569007635,
-0.10845528542995453,
0.031880613416433334,
-0.027288274839520454,
-0.018660202622413635,
-0.08057021349668503,
-0.029582280665636063,
0.10662046819925308,
0.020565923303365707,
0.009221849031746387,
-0.07015775144100189,
-0.018919048830866814,
0.016168231144547462,
0.023026593029499054,
-0.000130327302031219,
-0.006302238442003727,
0.015919923782348633,
-0.009688178077340126,
0.0768035277724266,
0.08934804052114487,
-0.05233445018529892,
0.019373247399926186,
-0.1103503406047821,
-0.035509143024683,
0.025117184966802597,
0.027638748288154602,
-0.00021451478824019432,
0.09458872675895691,
0.060207854956388474,
0.06591134518384933,
-0.00234489724971354,
0.02503126859664917,
0.09394016861915588,
0.1008274182677269,
-0.06692583858966827,
-5.1744478923865245e-8,
0.07621832937002182,
-0.05678638443350792,
-0.10228127986192703,
0.01821817457675934,
0.028881460428237915,
0.0074206129647791386,
0.030366919934749603,
-0.02938951551914215,
-0.034808170050382614,
-0.00369041389785707,
-0.05139803886413574,
0.07022886723279953,
-0.06026355177164078,
0.06044686213135719,
-0.01502618845552206,
-0.09684862196445465,
0.012735119089484215,
0.04058093577623367,
0.01843148097395897,
0.009454944171011448,
0.021677782759070396,
-0.02552785910665989,
0.019118696451187134,
0.04450099542737007,
0.07296854257583618,
0.050422828644514084,
0.03433184325695038,
0.02614801749587059,
-0.02509170211851597,
0.082956463098526,
0.009753149002790451,
0.02042725309729576,
-0.08014383912086487,
-0.004566607531160116,
-0.005915212444961071,
0.0562095083296299,
-0.14159974455833435,
0.029407471418380737,
0.06361434608697891,
0.0516006238758564,
0.022043081000447273,
-0.01746365614235401,
-0.0957879051566124,
-0.016891323029994965,
-0.0644398182630539,
-0.04014291614294052,
0.050515785813331604,
0.038218963891267776,
0.04406490549445152,
-0.006211668252944946,
-0.06281188875436783,
0.029560361057519913,
0.011708050034940243,
0.0698193684220314,
0.008719056844711304,
0.065577432513237,
-0.014483082108199596,
-0.038825441151857376,
0.006076721008867025,
-0.04329053312540054,
-0.03950100019574165,
-0.06102669611573219,
0.008763641119003296,
-0.0366077721118927
] | 0.075123
|
"imagefs.available": "15%", "memory.available": "100Mi", "nodefs.available": "10%", "nodefs.inodesFree": "5%", "imagefs.inodesFree": "5%" }, "evictionPressureTransitionPeriod": "1m0s", "mergeDefaultEvictionSettings": false, "enableControllerAttachDetach": true, "makeIPTablesUtilChains": true, "iptablesMasqueradeBit": 14, "iptablesDropBit": 15, "featureGates": { "AllAlpha": false }, "failSwapOn": false, "memorySwap": {}, "containerLogMaxSize": "10Mi", "containerLogMaxFiles": 5, "configMapAndSecretChangeDetectionStrategy": "Watch", "enforceNodeAllocatable": [ "pods" ], "volumePluginDir": "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", "logging": { "format": "text", "flushFrequency": "5s", "verbosity": 3, "options": { "json": { "infoBufferSize": "0" } } }, "enableSystemLogHandler": true, "enableSystemLogQuery": false, "shutdownGracePeriod": "0s", "shutdownGracePeriodCriticalPods": "0s", "enableProfilingHandler": true, "enableDebugFlagsHandler": true, "seccompDefault": false, "memoryThrottlingFactor": 0.9, "registerNode": true, "localStorageCapacityIsolation": true, "containerRuntimeEndpoint": "unix:///var/run/crio/crio.sock" } } ``` ## {{% heading "whatsnext" %}} - Learn more about kubelet configuration by checking the [`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/) reference. - Learn more about kubelet configuration merging in the [reference document](/docs/reference/node/kubelet-config-directory-merging).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubelet-config-file.md
|
[
0.07927321642637253,
-0.013011887669563293,
-0.03385213389992714,
-0.0008962014107964933,
0.09043107181787491,
-0.028419997543096542,
-0.012094243429601192,
0.05366130545735359,
0.004017859697341919,
0.07991576194763184,
0.09077825397253036,
-0.030392447486519814,
0.024113653227686882,
-0.015032528899610043,
-0.017092248424887657,
0.03392810747027397,
-0.01242404617369175,
-0.022055326029658318,
-0.01872483268380165,
-0.005706509575247765,
-0.01557959895581007,
-0.025435814633965492,
0.016558896750211716,
-0.05418698862195015,
-0.022389886900782585,
-0.016045385971665382,
-0.06632441282272339,
-0.03343825787305832,
-0.006377629470080137,
-0.0703079104423523,
-0.0256176944822073,
-0.013492859899997711,
-0.016677457839250565,
-0.01855727843940258,
0.08471765369176865,
0.09898578375577927,
0.022862257435917854,
-0.09546051919460297,
-0.10527336597442627,
-0.0780516192317009,
0.04068038985133171,
-0.014931348152458668,
-0.021883321925997734,
-0.012415430508553982,
-0.05152597278356552,
0.01374882273375988,
-0.04443373158574104,
-0.055419519543647766,
0.004550102632492781,
-0.05551660805940628,
-0.002097055781632662,
0.04715571179986,
0.05113520100712776,
0.051814597100019455,
0.08470866829156876,
0.028428800404071808,
-0.042204663157463074,
0.08818844705820084,
0.0997946560382843,
0.09836577624082565,
0.01543805655092001,
-0.04072684049606323,
0.013884657993912697,
-0.0279465951025486,
0.006931744981557131,
0.05191872641444206,
0.03171536698937416,
-0.07210367172956467,
-0.054390061646699905,
-0.017487840726971626,
0.00221422640606761,
0.08680049329996109,
0.0033385043498128653,
0.01625397615134716,
-0.0011053351918235421,
0.0477549210190773,
-0.02459084987640381,
0.08317061513662338,
-0.027222290635108948,
-0.08808436989784241,
-0.003771007526665926,
0.010914606042206287,
0.00349209806881845,
-0.007792471442371607,
-0.04911399632692337,
-0.009621717035770416,
-0.0868786945939064,
-0.06495119631290436,
0.030839761719107628,
-0.006204838398844004,
-0.01918846368789673,
0.02510303072631359,
-0.026623833924531937,
-0.012393927201628685,
0.029138362035155296,
-0.03959546238183975,
-0.039317838847637177,
-0.013939816504716873,
-0.05348208174109459,
0.020562799647450447,
-0.04743553325533867,
-0.009578928351402283,
-0.07104430347681046,
0.05657266825437546,
0.0668829008936882,
-0.09061034023761749,
0.024647898972034454,
-0.004152799490839243,
-0.0275662150233984,
0.05351101979613304,
0.018568499013781548,
0.05836784839630127,
-0.028637303039431572,
0.006937037687748671,
0.014695568941533566,
-0.024130728095769882,
-0.0482134185731411,
-0.0523468516767025,
0.02438078261911869,
-0.007430884521454573,
0.025095155462622643,
-0.016968896612524986,
-0.0774853453040123,
-0.0513533391058445,
-0.09432654827833176,
-0.019856642931699753,
0.010708783753216267,
8.132529831153344e-33,
0.029166635125875473,
-0.10707882791757584,
0.03420919552445412,
0.012829737737774849,
0.09547653794288635,
-0.0839611142873764,
0.044925205409526825,
-0.01438466738909483,
-0.05788952112197876,
-0.0553877130150795,
-0.06586933881044388,
-0.06463292986154556,
-0.0379289947450161,
0.03744444251060486,
-0.004746941849589348,
-0.11241774260997772,
-0.055195875465869904,
0.06894361972808838,
0.055902592837810516,
-0.014314491301774979,
-0.011034292168915272,
0.01033861842006445,
-0.021137457340955734,
-0.021062146872282028,
-0.010217664763331413,
-0.05355232581496239,
0.04896051809191704,
-0.07223351299762726,
0.0813838392496109,
0.02363302931189537,
-0.039266809821128845,
0.0871550440788269,
0.020348962396383286,
-0.026489127427339554,
-0.06972728669643402,
-0.05693589895963669,
-0.025499794632196426,
0.027621356770396233,
-0.10165716707706451,
-0.04713708534836769,
-0.05713249370455742,
-0.02001192420721054,
-0.07157079130411148,
-0.0568275973200798,
-0.03200775012373924,
-0.0494767427444458,
0.020573357120156288,
-0.04302959889173508,
0.028478501364588737,
0.06725580245256424,
-0.01894950121641159,
-0.006706933490931988,
-0.04814421758055687,
-0.03795279935002327,
0.015541027300059795,
-0.0033871580380946398,
-0.02295399270951748,
0.007725418545305729,
-0.015344549901783466,
0.05475834012031555,
-0.010886695235967636,
0.07016967236995697,
0.04889412596821785,
-0.047112200409173965,
0.016946641728281975,
0.08795911073684692,
-0.017958635464310646,
-0.03512648865580559,
-0.01784738153219223,
-0.04016970470547676,
-0.05378013476729393,
0.014226117171347141,
0.04030593857169151,
0.03323938697576523,
-0.008234134875237942,
-0.04661122336983681,
0.0079587297514081,
-0.004319907631725073,
-0.11645341664552689,
-0.003339155111461878,
-0.0035263767931610346,
-0.014063275419175625,
0.013775892555713654,
0.020914550870656967,
-0.004214078187942505,
-0.0804278776049614,
0.028849011287093163,
0.0414121150970459,
-0.0029069785960018635,
0.04758936166763306,
0.06645950675010681,
0.015084417536854744,
0.01923559419810772,
-0.03539343550801277,
-0.11562953889369965,
-8.202495254914287e-33,
0.06363049149513245,
-0.005373567808419466,
-0.019595028832554817,
-0.030320508405566216,
0.03236106038093567,
0.020474014803767204,
-0.018253404647111893,
0.05895569920539856,
0.0047028278931975365,
-0.09283307194709778,
-0.003600700292736292,
0.023724915459752083,
-0.04547818750143051,
-0.042575012892484665,
-0.1237669438123703,
-0.041565123945474625,
-0.03652384504675865,
-0.0800209492444992,
0.016777604818344116,
0.06633487343788147,
-0.015190469101071358,
0.07608760893344879,
0.055578481405973434,
0.07699167728424072,
-0.033655524253845215,
0.007492244243621826,
0.04629985988140106,
0.08709991723299026,
-0.07836562395095825,
-0.033240996301174164,
-0.008823245763778687,
0.00521827582269907,
-0.08148679882287979,
0.03822324797511101,
0.08210320770740509,
-0.07480789721012115,
0.004281983710825443,
0.02393769845366478,
-0.05809377506375313,
-0.011941851116716862,
0.01853790506720543,
-0.03786591812968254,
-0.05232013016939163,
0.000435845140600577,
-0.012012971565127373,
-0.03895437344908714,
0.08472052961587906,
-0.03511737287044525,
0.01273205503821373,
-0.034249722957611084,
0.008843871764838696,
-0.03334827721118927,
0.02964188903570175,
0.13430386781692505,
0.02068118005990982,
0.03183336555957794,
0.06723665446043015,
0.03358391672372818,
0.03719233721494675,
0.012183859013020992,
0.10817205905914307,
-0.05655841901898384,
0.0019585967529565096,
-0.030339187011122704,
0.08851375430822372,
-0.026863276958465576,
-0.07238046079874039,
0.03815678879618645,
-0.030241284519433975,
0.08364301919937134,
-0.027811432257294655,
-0.002260009991005063,
0.09433336555957794,
0.08082675188779831,
0.05605802685022354,
-0.004424850922077894,
0.014762716367840767,
-0.04251786693930626,
0.013355918228626251,
0.03982352465391159,
-0.052033815532922745,
0.10779644548892975,
-0.07887694984674454,
0.016246827319264412,
0.06838983297348022,
0.050831276923418045,
0.01108467299491167,
0.0240821223706007,
0.04988933354616165,
0.061207640916109085,
-0.07004818320274353,
0.021937936544418335,
-0.037713855504989624,
0.12609967589378357,
0.03648891672492027,
-6.063993396310252e-8,
-0.009140499867498875,
0.029874399304389954,
-0.01609649509191513,
0.015133644454181194,
0.05249771848320961,
-0.021072369068861008,
0.08552027493715286,
0.03954150900244713,
-0.042317457497119904,
-0.07313437759876251,
0.06630761176347733,
0.09903858602046967,
-0.05864778906106949,
-0.05053769424557686,
0.0009553378913551569,
-0.07658033072948456,
-0.009036065079271793,
0.06457901746034622,
0.03191749379038811,
-0.04109923169016838,
-0.0795903354883194,
-0.09927370399236679,
-0.040366146713495255,
-0.017029980197548866,
0.023380298167467117,
0.0010917698964476585,
0.12766146659851074,
0.021012727171182632,
-0.013637647032737732,
0.022144291549921036,
-0.03328116610646248,
-0.02476264163851738,
0.007770072668790817,
-0.017874157056212425,
-0.007689796853810549,
0.12660332024097443,
-0.08261387050151825,
0.023638667538762093,
0.031168943271040916,
-0.017103081569075584,
-0.06005579233169556,
0.08054693788290024,
-0.010030535981059074,
-0.039082348346710205,
0.031629521399736404,
0.06117082014679909,
-0.04838939756155014,
0.23006248474121094,
0.010768231935799122,
0.038301192224025726,
-0.027140924707055092,
-0.028830137103796005,
-0.020611271262168884,
0.04110289365053177,
0.019538549706339836,
-0.022213013842701912,
0.005104961805045605,
-0.03747957944869995,
-0.017673039808869362,
0.08058757334947586,
0.06441928446292877,
-0.0029559226240962744,
0.04973679780960083,
0.045128002762794495
] | 0.056335
|
This page shows how to enable and configure autoscaling of the DNS service in your Kubernetes cluster. ## {{% heading "prerequisites" %}} \* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* This guide assumes your nodes use the AMD64 or Intel 64 CPU architecture. \* Make sure [Kubernetes DNS](/docs/concepts/services-networking/dns-pod-service/) is enabled. ## Determine whether DNS horizontal autoscaling is already enabled {#determining-whether-dns-horizontal-autoscaling-is-already-enabled} List the {{< glossary\_tooltip text="Deployments" term\_id="deployment" >}} in your cluster in the kube-system {{< glossary\_tooltip text="namespace" term\_id="namespace" >}}: ```shell kubectl get deployment --namespace=kube-system ``` The output is similar to this: NAME READY UP-TO-DATE AVAILABLE AGE ... kube-dns-autoscaler 1/1 1 1 ... ... If you see "kube-dns-autoscaler" in the output, DNS horizontal autoscaling is already enabled, and you can skip to [Tuning autoscaling parameters](#tuning-autoscaling-parameters). ## Get the name of your DNS Deployment {#find-scaling-target} List the DNS deployments in your cluster in the kube-system namespace: ```shell kubectl get deployment -l k8s-app=kube-dns --namespace=kube-system ``` The output is similar to this: NAME READY UP-TO-DATE AVAILABLE AGE ... coredns 2/2 2 2 ... ... If you don't see a Deployment for DNS services, you can also look for it by name: ```shell kubectl get deployment --namespace=kube-system ``` and look for a deployment named `coredns` or `kube-dns`. Your scale target is Deployment/ where `` is the name of your DNS Deployment. For example, if the name of your Deployment for DNS is coredns, your scale target is Deployment/coredns. {{< note >}} CoreDNS is the default DNS service for Kubernetes. CoreDNS sets the label `k8s-app=kube-dns` so that it can work in clusters that originally used kube-dns. {{< /note >}} ## Enable DNS horizontal autoscaling {#enablng-dns-horizontal-autoscaling} In this section, you create a new Deployment. The Pods in the Deployment run a container based on the `cluster-proportional-autoscaler-amd64` image. Create a file named `dns-horizontal-autoscaler.yaml` with this content: {{% code\_sample file="admin/dns/dns-horizontal-autoscaler.yaml" %}} In the file, replace `` with your scale target. Go to the directory that contains your configuration file, and enter this command to create the Deployment: ```shell kubectl apply -f dns-horizontal-autoscaler.yaml ``` The output of a successful command is: deployment.apps/kube-dns-autoscaler created DNS horizontal autoscaling is now enabled. ## Tune DNS autoscaling parameters {#tuning-autoscaling-parameters} Verify that the kube-dns-autoscaler {{< glossary\_tooltip text="ConfigMap" term\_id="configmap" >}} exists: ```shell kubectl get configmap --namespace=kube-system ``` The output is similar to this: NAME DATA AGE ... kube-dns-autoscaler 1 ... ... Modify the data in the ConfigMap: ```shell kubectl edit configmap kube-dns-autoscaler --namespace=kube-system ``` Look for this line: ```yaml linear: '{"coresPerReplica":256,"min":1,"nodesPerReplica":16}' ``` Modify the fields according to your needs. The "min" field indicates the minimal number of DNS backends. The actual number of backends is calculated using this equation: replicas = max( ceil( cores × 1/coresPerReplica ) , ceil( nodes × 1/nodesPerReplica ) ) Note that the values of both `coresPerReplica` and `nodesPerReplica` are floats. The idea is that when a cluster is using nodes that have many cores, `coresPerReplica` dominates. When a cluster is using nodes that have fewer cores, `nodesPerReplica` dominates. There are other supported scaling patterns. For details, see [cluster-proportional-autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler). ## Disable DNS horizontal autoscaling There are a few options for tuning DNS horizontal autoscaling. Which option to use depends on different conditions. ### Option 1: Scale down the kube-dns-autoscaler deployment to 0 replicas This option works for all situations. Enter this command: ```shell kubectl scale deployment --replicas=0 kube-dns-autoscaler --namespace=kube-system ``` The output is: deployment.apps/kube-dns-autoscaler scaled Verify that the replica count is zero: ```shell kubectl get rs --namespace=kube-system ``` The output displays 0 in the DESIRED and CURRENT columns: NAME DESIRED CURRENT READY AGE ... kube-dns-autoscaler-6b59789fc8 0 0 0 ... ... ### Option 2: Delete the kube-dns-autoscaler deployment This option works if kube-dns-autoscaler
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/dns-horizontal-autoscaling.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/dns-horizontal-autoscaling.md
|
[
-0.018195711076259613,
-0.03942080959677696,
0.06661593168973923,
-0.007392326835542917,
-0.132334902882576,
-0.003973320126533508,
-0.05320249870419502,
-0.04914045333862305,
0.03852468729019165,
0.04516023024916649,
-0.054062504321336746,
-0.07399250566959381,
-0.06716587394475937,
-0.04142555594444275,
-0.016714157536625862,
-0.025391533970832825,
0.010417752899229527,
-0.03996621444821358,
-0.03053543157875538,
-0.09239150583744049,
0.04922228679060936,
0.06323276460170746,
0.0025524934753775597,
-0.017734605818986893,
-0.005263064987957478,
-0.032117124646902084,
-0.06215190142393112,
0.01035693846642971,
0.04428893327713013,
0.0062331766821444035,
-0.02110028639435768,
0.014127512462437153,
0.013654394075274467,
0.049627237021923065,
0.08154810965061188,
0.05413113906979561,
-0.013892135582864285,
0.040156442672014236,
-0.08165033161640167,
0.0047635179944336414,
0.10097163170576096,
-0.024831874296069145,
0.007437200751155615,
0.006739056669175625,
0.04079059138894081,
0.05770266056060791,
0.002065525157377124,
0.05292914807796478,
0.0036061257123947144,
-0.0721130222082138,
0.040449924767017365,
-0.1231784075498581,
0.06548427790403366,
-0.010262275114655495,
0.05581704154610634,
0.05090869963169098,
-0.010745905339717865,
0.021446870639920235,
0.052937526255846024,
0.031400710344314575,
-0.015474090352654457,
0.003003382822498679,
0.04751785472035408,
-0.0681714117527008,
-0.017532089725136757,
0.04050489515066147,
0.0823134183883667,
-0.025848226621747017,
-0.021594692021608353,
0.07005855441093445,
0.048067428171634674,
0.038588620722293854,
-0.017985887825489044,
-0.03663421794772148,
0.0006628308910876513,
0.015969891101121902,
-0.07469390332698822,
0.032394781708717346,
0.010030732490122318,
-0.07712450623512268,
0.03998998552560806,
0.06856022030115128,
0.08244810253381729,
0.06583096832036972,
-0.1053265854716301,
-0.055666036903858185,
0.01132164802402258,
-0.09699662029743195,
0.03756934404373169,
-0.04620470106601715,
-0.018116449937224388,
-0.09120824933052063,
-0.05248182266950607,
-0.07546143978834152,
0.038189224898815155,
0.0018101350869983435,
-0.018859419971704483,
-0.03622296452522278,
0.012487520463764668,
-0.023634474724531174,
0.07243150472640991,
0.0004321794549468905,
0.027007142081856728,
-0.008334293961524963,
0.00023880667868070304,
0.0017640817677602172,
-0.04074994847178459,
0.05561094731092453,
0.06780879199504852,
0.10108435899019241,
0.0061696600168943405,
0.11019786447286606,
0.024287991225719452,
-0.0023498856462538242,
-0.0398469977080822,
-0.06309030950069427,
0.0483674630522728,
-0.033004820346832275,
0.0852937325835228,
0.02588309906423092,
-0.028266238048672676,
-0.10936655104160309,
-0.06923079490661621,
-0.026179691776633263,
-0.01424188818782568,
0.07797099649906158,
-0.0402936153113842,
4.845355020652837e-33,
0.05351636931300163,
-0.05914606899023056,
0.016520913690328598,
-0.011482094414532185,
-0.034024927765131,
-0.1133456602692604,
-0.03301292657852173,
-0.009459679946303368,
-0.09317921847105026,
-0.04278755933046341,
-0.07275073975324631,
0.05778427794575691,
0.030290616676211357,
-0.0018160869367420673,
-0.016875235363841057,
0.011506389826536179,
0.023807313293218613,
0.010992536321282387,
0.11748464405536652,
-0.004339903127402067,
0.028761431574821472,
-0.06594318896532059,
-0.011922812089323997,
-0.008219168521463871,
0.002195298671722412,
-0.027152230963110924,
0.011609991081058979,
-0.06606841832399368,
-0.04717159643769264,
-0.03074744902551174,
0.009886886924505234,
-0.07884225994348526,
0.028997721150517464,
-0.0067593930289149284,
-0.09425237029790878,
-0.014058293774724007,
0.020464595407247543,
0.04316474497318268,
-0.0734008178114891,
-0.02285039983689785,
0.08016753196716309,
0.006677588447928429,
-0.04849136620759964,
-0.04923223704099655,
0.08060123026371002,
0.03073509782552719,
0.05221934616565704,
-0.11353179067373276,
0.03929572179913521,
0.019130853936076164,
0.08040985465049744,
-0.07157687097787857,
0.020540226250886917,
-0.041089463979005814,
0.10113629698753357,
0.07765738666057587,
0.09787091612815857,
-0.026043619960546494,
-0.018072133883833885,
0.0007840458420105278,
-0.07573884725570679,
-0.10302906483411789,
-0.03599818795919418,
0.010183526203036308,
0.08328577876091003,
-0.030902663245797157,
0.029233593493700027,
0.10187745839357376,
-0.03762473911046982,
-0.011161047033965588,
-0.02002716436982155,
0.009011468850076199,
0.026107344776391983,
0.0705949068069458,
-0.019444968551397324,
-0.030290795490145683,
-0.05374341830611229,
-0.029408467933535576,
-0.09083952754735947,
0.05750934034585953,
0.01234578900039196,
0.004242586903274059,
-0.037549812346696854,
0.05884319916367531,
0.045525144785642624,
-0.01627984456717968,
0.023535901680588722,
-0.029731279239058495,
-0.01953013427555561,
0.03232911601662636,
0.026821497827768326,
-0.07382255792617798,
-0.051424529403448105,
0.05635927617549896,
-0.11722160130739212,
-5.5658357120809716e-33,
0.05178181082010269,
0.004559972323477268,
-0.061695411801338196,
0.05265367031097412,
0.003991583827883005,
0.010550210252404213,
0.007274127099663019,
0.13838063180446625,
-0.01417241245508194,
-0.12479626387357712,
0.00336666963994503,
-0.059731096029281616,
0.02890346385538578,
-0.010779050178825855,
-0.04718340188264847,
0.04105294123291969,
-0.07200954109430313,
0.019293809309601784,
0.03787587210536003,
0.08455636352300644,
-0.012964729219675064,
-0.012241019867360592,
0.004446723498404026,
0.02375938557088375,
0.01889079622924328,
-0.047301772981882095,
0.03124108724296093,
0.0744779109954834,
-0.033146701753139496,
-0.029205679893493652,
0.01768319495022297,
-0.027473440393805504,
0.022035332396626472,
0.007479675579816103,
0.020899321883916855,
-0.02392168901860714,
0.00387489958666265,
-0.020314853638410568,
0.049150850623846054,
-0.01957111991941929,
0.02773241698741913,
0.00039073886000551283,
-0.07901176810264587,
-0.07402479648590088,
-0.01408172957599163,
0.01601276732981205,
0.02932692877948284,
0.0037525766529142857,
-0.052760444581508636,
-0.05340436473488808,
0.005080571863800287,
-0.0523516908288002,
-0.05566941946744919,
0.08860582113265991,
-0.0307374969124794,
0.10133747011423111,
0.054629627615213394,
0.05020870640873909,
-0.03062688373029232,
0.0752045214176178,
0.06117028743028641,
-0.18053941428661346,
0.007867684587836266,
0.04467820003628731,
0.005233643110841513,
0.001325291465036571,
-0.020671220496296883,
0.06849037855863571,
-0.014687786810100079,
0.02272130735218525,
-0.05115281045436859,
0.013788364827632904,
0.03835086151957512,
0.03464941680431366,
-0.02981523796916008,
-0.06085919961333275,
0.09113079309463501,
0.04263905808329582,
0.02006886899471283,
-0.0068765729665756226,
-0.04912746325135231,
0.06007784605026245,
-0.07000160962343216,
0.01720925234258175,
0.0017099346732720733,
0.06486588716506958,
0.10896165668964386,
0.09659676253795624,
0.01249077171087265,
0.09659824520349503,
0.005703360307961702,
-0.055201899260282516,
-0.02516099065542221,
0.0625661313533783,
-0.09790974110364914,
-5.2898055713512804e-8,
0.030679697170853615,
0.07079680263996124,
-0.0689387321472168,
0.028619050979614258,
0.025046875700354576,
0.045455966144800186,
0.058411695063114166,
0.030866285786032677,
-0.07890480011701584,
-0.004994492046535015,
0.0022498846519738436,
0.02240743115544319,
-0.09012067317962646,
0.03427370265126228,
0.037644755095243454,
-0.010805831290781498,
0.016476284712553024,
0.020564045757055283,
0.009226847440004349,
-0.08142346888780594,
-0.06117192655801773,
-0.013518698513507843,
-0.011522774584591389,
-0.05487372353672981,
0.017854325473308563,
0.030741959810256958,
0.05122677609324455,
-0.0005768452538177371,
0.028100023046135902,
0.01859443075954914,
-0.08649611473083496,
0.020593080669641495,
-0.0696345716714859,
0.05917768552899361,
-0.004218390677124262,
0.030308010056614876,
-0.07914331555366516,
0.06150301173329353,
0.0483148954808712,
0.019863255321979523,
0.002227276796475053,
0.012896722182631493,
-0.061771463602781296,
-0.017923971638083458,
0.007440438959747553,
0.08465225994586945,
-0.038869649171829224,
0.11239849776029587,
0.013025619089603424,
-0.018264198675751686,
0.00814844574779272,
-0.038613952696323395,
0.0011115451343357563,
0.034145865589380264,
-0.05602443590760231,
0.005193005315959454,
-0.008478728123009205,
-0.04634301736950874,
-0.028084510937333107,
0.03176958113908768,
0.011410444974899292,
0.0018204313237220049,
-0.04677724838256836,
0.01123888697475195
] | 0.09985
|
is: deployment.apps/kube-dns-autoscaler scaled Verify that the replica count is zero: ```shell kubectl get rs --namespace=kube-system ``` The output displays 0 in the DESIRED and CURRENT columns: NAME DESIRED CURRENT READY AGE ... kube-dns-autoscaler-6b59789fc8 0 0 0 ... ... ### Option 2: Delete the kube-dns-autoscaler deployment This option works if kube-dns-autoscaler is under your own control, which means no one will re-create it: ```shell kubectl delete deployment kube-dns-autoscaler --namespace=kube-system ``` The output is: deployment.apps "kube-dns-autoscaler" deleted ### Option 3: Delete the kube-dns-autoscaler manifest file from the master node This option works if kube-dns-autoscaler is under control of the (deprecated) [Addon Manager](https://git.k8s.io/kubernetes/cluster/addons/README.md), and you have write access to the master node. Sign in to the master node and delete the corresponding manifest file. The common path for this kube-dns-autoscaler is: /etc/kubernetes/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml After the manifest file is deleted, the Addon Manager will delete the kube-dns-autoscaler Deployment. ## Understanding how DNS horizontal autoscaling works \* The cluster-proportional-autoscaler application is deployed separately from the DNS service. \* An autoscaler Pod runs a client that polls the Kubernetes API server for the number of nodes and cores in the cluster. \* A desired replica count is calculated and applied to the DNS backends based on the current schedulable nodes and cores and the given scaling parameters. \* The scaling parameters and data points are provided via a ConfigMap to the autoscaler, and it refreshes its parameters table every poll interval to be up to date with the latest desired scaling parameters. \* Changes to the scaling parameters are allowed without rebuilding or restarting the autoscaler Pod. \* The autoscaler provides a controller interface to support two control patterns: \*linear\* and \*ladder\*. ## {{% heading "whatsnext" %}} \* Read about [Guaranteed Scheduling For Critical Add-On Pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/). \* Learn more about the [implementation of cluster-proportional-autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/dns-horizontal-autoscaling.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/dns-horizontal-autoscaling.md
|
[
-0.029688317328691483,
-0.01801496371626854,
0.020166052505373955,
-0.028703123331069946,
-0.0867164134979248,
-0.026630133390426636,
-0.042387865483760834,
-0.04981471225619316,
0.05842976272106171,
0.05538933351635933,
0.014175176620483398,
-0.09062845259904861,
-0.024519087746739388,
-0.0372961051762104,
-0.043025970458984375,
0.0051600318402051926,
-0.013933967798948288,
-0.02313239686191082,
-0.010628766380250454,
-0.07961154729127884,
0.0019135266775265336,
0.011589120142161846,
-0.017237579450011253,
-0.0034880759194493294,
0.013125685974955559,
-0.06789543479681015,
-0.06328006833791733,
0.035199329257011414,
0.009686150588095188,
-0.054149799048900604,
0.005691844504326582,
0.06967984139919281,
0.003373796120285988,
-0.008206164464354515,
0.10992471873760223,
0.054613083600997925,
-0.042165786027908325,
0.03573107719421387,
-0.07630004733800888,
-0.04937015101313591,
0.11703166365623474,
-0.012970564886927605,
-0.0019805594347417355,
-0.004625977482646704,
0.026666879653930664,
0.07959648221731186,
-0.03732709586620331,
0.02189333736896515,
0.002631757641211152,
-0.07905416935682297,
0.07402105629444122,
-0.054601047188043594,
0.046966250985860825,
-0.042224664241075516,
0.07028264552354813,
0.03818029537796974,
-0.04205988720059395,
0.020205194130539894,
0.06194444000720978,
0.04207175225019455,
0.010217972099781036,
0.054061710834503174,
0.006419075187295675,
-0.04877236485481262,
-0.021648887544870377,
0.05415213480591774,
0.036223404109478,
-0.03003755584359169,
-0.016798077151179314,
0.12782594561576843,
0.041851066052913666,
0.04740162193775177,
-0.03444378823041916,
-0.045789994299411774,
-0.033641841262578964,
-0.018122289329767227,
-0.12304668128490448,
0.03440670296549797,
-0.0034716979134827852,
-0.04973693564534187,
0.012591920793056488,
0.01209145225584507,
0.009474523365497589,
0.009403292089700699,
-0.13968800008296967,
-0.038997821509838104,
0.0021197202149778605,
-0.07620488852262497,
0.08269842714071274,
0.021028880029916763,
-0.025328200310468674,
-0.0698840469121933,
0.009074117988348007,
-0.04232080280780792,
-0.0013605332933366299,
-0.024240601807832718,
0.005834902636706829,
0.07759814709424973,
-0.011430629529058933,
-0.0081880958750844,
0.07092605531215668,
0.018405944108963013,
0.0336899533867836,
0.021273069083690643,
0.00664904061704874,
-0.027551693841814995,
-0.03866302967071533,
0.07830480486154556,
0.04978914558887482,
0.1103692427277565,
0.003030948108062148,
0.08418811857700348,
0.021166177466511726,
0.0007710017962381244,
-0.01673327572643757,
0.02419036440551281,
0.05937366560101509,
-0.010861043818295002,
0.04984350502490997,
0.026218337938189507,
0.024437202140688896,
-0.07665344327688217,
-0.0717792958021164,
-0.02719925157725811,
-0.07449623942375183,
0.08131309598684311,
0.0009709846344776452,
3.7368032363999555e-33,
0.05020561069250107,
-0.08685635775327682,
0.019876694306731224,
0.005134514067322016,
0.03294156864285469,
-0.04523150995373726,
-0.033355966210365295,
0.006899361032992601,
-0.0825425237417221,
-0.0652347281575203,
-0.039204053580760956,
0.04838786646723747,
-0.005763519089668989,
-0.02415994554758072,
0.007368084974586964,
-0.002135657239705324,
0.0009572876151651144,
0.06541584432125092,
0.10802650451660156,
-0.01699686609208584,
0.06780318170785904,
-0.03780098631978035,
-0.06670407205820084,
-0.011186565272510052,
0.025637930259108543,
-0.04710753634572029,
0.031432636082172394,
-0.03354884684085846,
-0.07999399304389954,
-0.042490288615226746,
-0.00139230873901397,
-0.01361780520528555,
0.0077138422057032585,
0.03962375596165657,
-0.07487820088863373,
-0.06953346729278564,
0.04359155520796776,
0.02540390007197857,
-0.1269366294145584,
-0.002838895656168461,
0.08200063556432724,
0.00950904656201601,
-0.08710487931966782,
0.003666528034955263,
0.0837642028927803,
-0.05127253383398056,
0.1266520917415619,
-0.07317594438791275,
0.031435102224349976,
0.022407539188861847,
0.07064974308013916,
-0.045081332325935364,
0.023085832595825195,
-0.10960213840007782,
0.049125801771879196,
0.047038398683071136,
0.09000349789857864,
-0.04120904207229614,
-0.033138297498226166,
-0.07153256982564926,
-0.0281775314360857,
-0.04519011080265045,
-0.024821404367685318,
0.04407963529229164,
0.1081148236989975,
0.0037495833821594715,
0.023723801597952843,
0.00642075901851058,
-0.052868470549583435,
-0.01988445781171322,
-0.02173239178955555,
0.009875372052192688,
-0.010996226221323013,
-0.009803463704884052,
-0.005068923346698284,
-0.050110071897506714,
-0.020966174080967903,
-0.024426260963082314,
-0.11161885410547256,
0.06771624088287354,
0.07649587094783783,
0.011917505413293839,
-0.06566929817199707,
0.052825260907411575,
0.02569901943206787,
-0.005831427872180939,
0.03466758877038956,
-0.02377127669751644,
-0.021184448152780533,
0.007411000318825245,
0.03931329771876335,
-0.09941554069519043,
-0.0683121457695961,
0.04764982685446739,
-0.09820584952831268,
-4.0046488077844295e-33,
0.05889135226607323,
-0.015257052145898342,
0.029417870566248894,
0.042375653982162476,
0.02748694457113743,
0.01103625912219286,
0.011387967504560947,
0.1603812575340271,
0.019795047119259834,
-0.1400686800479889,
0.02403777465224266,
-0.03101186640560627,
0.0522119514644146,
-0.005173514597117901,
-0.02641267143189907,
0.07617498189210892,
-0.05458870157599449,
0.015761123970150948,
-0.02490854077041149,
0.058246612548828125,
-0.021682292222976685,
0.03927498310804367,
0.022965628653764725,
0.07400958985090256,
-0.014897463843226433,
-0.0464007668197155,
-0.021654460579156876,
0.09432429075241089,
-0.028472110629081726,
-0.02643192932009697,
0.0652209222316742,
-0.02867681346833706,
0.0013366491766646504,
0.011919554322957993,
-0.002930799499154091,
-0.007467637769877911,
0.01427797507494688,
0.058170489966869354,
0.024173881858587265,
-0.017567947506904602,
-0.026864830404520035,
0.014570820145308971,
-0.08961600810289383,
-0.015085768885910511,
-0.014946362003684044,
0.02135787345468998,
0.10248006880283356,
-0.013597501441836357,
0.006890776567161083,
-0.06835774332284927,
-0.007661625277251005,
-0.07145161181688309,
-0.024829264730215073,
0.08314085751771927,
0.0028825344052165747,
0.09667117148637772,
0.05339713767170906,
0.08113409578800201,
-0.018343526870012283,
0.00480633182451129,
0.07742125540971756,
-0.1529739499092102,
0.024120161309838295,
0.022182760760188103,
-0.01788969151675701,
0.023094618692994118,
-0.01760871522128582,
0.080215685069561,
0.005332116968929768,
0.01568034291267395,
0.0168068315833807,
0.004509122110903263,
-0.026497960090637207,
0.018274612724781036,
0.0013573234900832176,
-0.05108511075377464,
0.07460015267133713,
0.02634119801223278,
-0.03356756642460823,
0.04928260296583176,
-0.08580770343542099,
0.02927965670824051,
-0.06232517212629318,
-0.024073710665106773,
-0.004261038266122341,
-0.0012341538676992059,
0.05358553305268288,
0.07301264256238937,
0.05062630772590637,
0.144969180226326,
-0.01368621550500393,
-0.052631184458732605,
-0.04807155206799507,
0.034228719770908356,
-0.1048043817281723,
-4.250529528349034e-8,
0.033311933279037476,
0.02159237302839756,
-0.09330299496650696,
0.025351962074637413,
0.06072898954153061,
0.024396192282438278,
0.07777535170316696,
0.01344076544046402,
-0.06458853930234909,
-0.0196525976061821,
-0.03580300509929657,
0.034462619572877884,
-0.13336233794689178,
0.05606170371174812,
0.04159940406680107,
-0.06301648169755936,
0.052874963730573654,
0.05043209344148636,
0.022325659170746803,
-0.05428893119096756,
-0.0655723512172699,
-0.004467509221285582,
0.0036246576346457005,
-0.05481334403157234,
0.028920486569404602,
0.04001805558800697,
0.06702844053506851,
0.0038459422066807747,
0.04820307344198227,
0.060033004730939865,
-0.026909703388810158,
0.026377277448773384,
-0.04837997630238533,
0.03830351307988167,
0.0004448183171916753,
0.02029689960181713,
-0.07255122065544128,
0.06623213738203049,
0.024369800463318825,
-0.006127467378973961,
-0.011723946779966354,
0.050995245575904846,
-0.08080735802650452,
0.020765000954270363,
-0.017070133239030838,
0.053686290979385376,
-0.039426177740097046,
0.058338042348623276,
0.011056222952902317,
-0.0691608116030693,
0.041378628462553024,
-0.038645271211862564,
-0.03422913700342178,
0.00287645123898983,
-0.05803058296442032,
0.029568182304501534,
0.021725373342633247,
-0.023582056164741516,
-0.008785305544734001,
0.03266404941678047,
0.026652680709958076,
-0.006290561519563198,
-0.04637402668595314,
-0.006816689856350422
] | 0.079195
|
This page shows how to configure a Key Management Service (KMS) provider and plugin to enable secret data encryption. In Kubernetes {{< skew currentVersion >}} there are two versions of KMS at-rest encryption. You should use KMS v2 if feasible because KMS v1 is deprecated (since Kubernetes v1.28) and disabled by default (since Kubernetes v1.29). KMS v2 offers significantly better performance characteristics than KMS v1. {{< caution >}} This documentation is for the generally available implementation of KMS v2 (and for the deprecated version 1 implementation). If you are using any control plane components older than Kubernetes v1.29, please check the equivalent page in the documentation for the version of Kubernetes that your cluster is running. Earlier releases of Kubernetes had different behavior that may be relevant for information security. {{< /caution >}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} The version of Kubernetes that you need depends on which KMS API version you have selected. Kubernetes recommends using KMS v2. - If you selected KMS API v1 to support clusters prior to version v1.27 or if you have a legacy KMS plugin that only supports KMS v1, any supported Kubernetes version will work. This API is deprecated as of Kubernetes v1.28. Kubernetes does not recommend the use of this API. {{< version-check >}} ### KMS v1 {{< feature-state for\_k8s\_version="v1.28" state="deprecated" >}} \* Kubernetes version 1.10.0 or later is required \* For version 1.29 and later, the v1 implementation of KMS is disabled by default. To enable the feature, set `--feature-gates=KMSv1=true` to configure a KMS v1 provider. \* Your cluster must use etcd v3 or later ### KMS v2 {{< feature-state for\_k8s\_version="v1.29" state="stable" >}} \* Your cluster must use etcd v3 or later ## KMS encryption and per-object encryption keys The KMS encryption provider uses an envelope encryption scheme to encrypt data in etcd. The data is encrypted using a data encryption key (DEK). The DEKs are encrypted with a key encryption key (KEK) that is stored and managed in a remote KMS. If you use the (deprecated) v1 implementation of KMS, a new DEK is generated for each encryption. With KMS v2, a new DEK is generated \*\*per encryption\*\*: the API server uses a \_key derivation function\_ to generate single use data encryption keys from a secret seed combined with some random data. The seed is rotated whenever the KEK is rotated (see the \_Understanding key\_id and Key Rotation\_ section below for more details). The KMS provider uses gRPC to communicate with a specific KMS plugin over a UNIX domain socket. The KMS plugin, which is implemented as a gRPC server and deployed on the same host(s) as the Kubernetes control plane, is responsible for all communication with the remote KMS. ## Configuring the KMS provider To configure a KMS provider on the API server, include a provider of type `kms` in the `providers` array in the encryption configuration file and set the following properties: ### KMS v1 {#configuring-the-kms-provider-kms-v1} \* `apiVersion`: API Version for KMS provider. Leave this value empty or set it to `v1`. \* `name`: Display name of the KMS plugin. Cannot be changed once set. \* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket. \* `cachesize`: Number of data encryption keys (DEKs) to be cached in the clear. When cached, DEKs can be used without another call to the KMS; whereas DEKs that are not cached require a call to the KMS to unwrap. \* `timeout`: How long should `kube-apiserver` wait for kms-plugin to respond before returning an error (default is 3 seconds). ### KMS v2
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
0.021926460787653923,
0.02503839135169983,
0.014831183478236198,
-0.010852727107703686,
-0.009937912225723267,
0.04998379200696945,
0.02064325101673603,
-0.02990398183465004,
0.08423309773206711,
0.09467566013336182,
-0.015499225817620754,
0.010499399155378342,
0.041668374091386795,
-0.037601787596940994,
0.013233888894319534,
-0.01228275801986456,
0.04883754253387451,
-0.04223709553480148,
-0.030134543776512146,
-0.06679193675518036,
0.018640629947185516,
-0.09355398267507553,
0.025488054379820824,
0.021817926317453384,
-0.06921481341123581,
-0.003922068513929844,
0.008975237607955933,
0.015599136240780354,
-0.039883267134428024,
-0.019360441714525223,
-0.015407263301312923,
-0.05002088472247124,
0.058581434190273285,
0.04654327780008316,
-0.05279694125056267,
-0.00954783521592617,
0.055809952318668365,
0.014030328020453453,
-0.10300858318805695,
0.04134345427155495,
-0.007226628717035055,
-0.029557188972830772,
-0.1119261309504509,
-0.02968682162463665,
-0.044686656445264816,
0.05701867491006851,
0.006456001196056604,
-0.03193986043334007,
-0.0642583966255188,
-0.02608090080320835,
0.02021689899265766,
-0.059351954609155655,
0.004477803595364094,
0.0007173422491177917,
-0.09809376299381256,
0.008124921470880508,
-0.087888702750206,
0.09042543917894363,
0.0804658904671669,
-0.056788843125104904,
0.0762026458978653,
-0.02808687649667263,
0.03911612182855606,
-0.014524312689900398,
-0.08133547008037567,
0.06541108340024948,
0.039720550179481506,
-0.007163874339312315,
0.05397620424628258,
-0.0010561689268797636,
0.07164548337459564,
-0.024127285927534103,
-0.03031662292778492,
-0.006600261200219393,
-0.010644841939210892,
-0.001712723053060472,
-0.05189763382077217,
-0.025284571573138237,
0.010447158478200436,
-0.07410523295402527,
0.04248691350221634,
0.006964055821299553,
0.0027364848647266626,
-0.002149338601157069,
-0.06919872760772705,
0.020292190834879875,
-0.05483267083764076,
-0.06979189813137054,
0.014983395114541054,
-0.042200278490781784,
0.029942285269498825,
-0.08561304211616516,
0.04769132658839226,
-0.05984949693083763,
0.08625470101833344,
-0.004148533102124929,
-0.04978868365287781,
-0.00812512170523405,
-0.04651796072721481,
-0.0687221959233284,
-0.004385761450976133,
-0.000027131060051033273,
-0.015337159857153893,
-0.020803360268473625,
0.08375433087348938,
0.018382322043180466,
0.009792594239115715,
-0.04970075935125351,
-0.016055166721343994,
0.14792636036872864,
0.016568360850214958,
0.12057626992464066,
-0.035297367721796036,
-0.014666556380689144,
0.03628271818161011,
0.025259733200073242,
0.0027310263831168413,
-0.014523826539516449,
0.021696943789720535,
0.11776158958673477,
0.03418636694550514,
-0.07126341015100479,
-0.007513103540986776,
0.051450129598379135,
-0.049649275839328766,
0.02339758537709713,
-0.037038404494524,
8.890142552414032e-33,
-0.02268444374203682,
-0.00510947173461318,
0.021973250433802605,
-0.04274321347475052,
-0.032167479395866394,
-0.07317617535591125,
0.03067409060895443,
-0.018630998209118843,
-0.03790818899869919,
-0.006123835686594248,
-0.1356692910194397,
-0.006608197465538979,
0.03370611369609833,
-0.11358660459518433,
0.019223090261220932,
0.04031992703676224,
0.021571585908532143,
0.0012681877706199884,
0.11759932339191437,
-0.0016652379417791963,
0.050837382674217224,
-0.034481339156627655,
0.08253230154514313,
-0.007701507303863764,
0.08047031611204147,
-0.031115347519516945,
0.05428891256451607,
-0.03925608843564987,
0.037326980382204056,
0.000751009036321193,
-0.05819405987858772,
-0.038679882884025574,
0.05664655193686485,
-0.011764556169509888,
-0.10158932954072952,
0.031266506761312485,
-0.019473953172564507,
-0.007777582388371229,
-0.039603814482688904,
-0.07969198375940323,
0.005771956872195005,
-0.025051381438970566,
0.004119275603443384,
-0.08620984107255936,
0.0338839590549469,
0.030660223215818405,
0.03202017769217491,
0.03175858035683632,
0.11029350012540817,
0.059954334050416946,
-0.04565093293786049,
-0.023925483226776123,
-0.03167906776070595,
-0.05233030766248703,
0.044932905584573746,
-0.0033710598945617676,
0.12532486021518707,
-0.04062330722808838,
-0.03488048166036606,
0.01622340828180313,
-0.07089299708604813,
-0.06483237445354462,
0.03275755047798157,
-0.005871861707419157,
0.03627561777830124,
-0.014728750102221966,
-0.015500086359679699,
0.04928479716181755,
-0.042921457439661026,
-0.049081575125455856,
-0.08231507241725922,
0.014003521762788296,
0.0237417109310627,
0.04186087101697922,
0.0246893297880888,
-0.02870350517332554,
-0.00886468030512333,
0.018748100847005844,
0.0033243540674448013,
0.04342087730765343,
0.03548893332481384,
-0.018899008631706238,
-0.016220498830080032,
0.10154340416193008,
-0.008198156952857971,
-0.008553373627364635,
-0.017757393419742584,
0.07252758741378784,
-0.003820237470790744,
0.07868938148021698,
0.06650203466415405,
-0.025693615898489952,
0.02571621909737587,
0.06159733235836029,
-0.08337526023387909,
-8.148332148648242e-33,
0.03908465802669525,
-0.01992502436041832,
-0.023561948910355568,
0.060491837561130524,
0.060119643807411194,
0.08877439051866531,
-0.05239546298980713,
0.07483741641044617,
-0.04372301325201988,
-0.0225913655012846,
-0.008738827891647816,
-0.08692143112421036,
0.07872871309518814,
-0.03689466789364815,
0.010164226405322552,
-0.011474138125777245,
0.00438126502558589,
0.057383544743061066,
0.026744481176137924,
-0.013454013504087925,
-0.0700211450457573,
-0.02173503115773201,
-0.0397651381790638,
0.03295408934354782,
0.03572394326329231,
0.020000463351607323,
-0.00905697513371706,
0.10713672637939453,
-0.010676810517907143,
-0.007500689011067152,
-0.02176138572394848,
-0.06026173010468483,
0.04171530157327652,
-0.011628137901425362,
-0.03765309974551201,
-0.11844801157712936,
0.019934795796871185,
-0.010254460386931896,
-0.043136779218912125,
-0.09436887502670288,
0.005932938307523727,
0.02697395160794258,
-0.009917003102600574,
-0.015581480227410793,
-0.019777031615376472,
-0.0431479848921299,
0.0740448385477066,
-0.014852697029709816,
0.011669183149933815,
-0.09364974498748779,
-0.025042932480573654,
-0.06645497679710388,
-0.05650939792394638,
0.0254470556974411,
-0.02483731508255005,
0.06528608500957489,
0.0011751513229683042,
0.1276574283838272,
-0.03667755797505379,
0.013401978649199009,
0.034749358892440796,
-0.07916823774576187,
0.08550063520669937,
0.06413476914167404,
0.06003457307815552,
-0.014043348841369152,
0.026473956182599068,
0.028553443029522896,
-0.04008444398641586,
0.06180928274989128,
-0.05440510809421539,
-0.042750678956508636,
0.0670112818479538,
0.04352005943655968,
0.015595446340739727,
-0.08513081818819046,
0.01507484819740057,
0.016512548550963402,
0.013565718196332455,
-0.00460343761369586,
0.05233898013830185,
-0.042389728128910065,
-0.0855754017829895,
0.08739138394594193,
0.13191184401512146,
0.08198069781064987,
0.09519331902265549,
0.03287483751773834,
-0.002374043222516775,
0.032166752964258194,
-0.05577559024095535,
-0.04060821980237961,
-0.08933836221694946,
0.1323266476392746,
0.060429997742176056,
-6.002874641808376e-8,
0.05045049637556076,
0.032371487468481064,
-0.05392882227897644,
-0.022101128473877907,
0.000736235233489424,
0.010576366446912289,
-0.00542930793017149,
-0.026419317349791527,
-0.0828028991818428,
-0.05670071393251419,
0.03824378177523613,
0.019701581448316574,
-0.031092097982764244,
-0.022331729531288147,
0.051681894809007645,
-0.05330924689769745,
-0.014135228469967842,
-0.01731821522116661,
0.043054696172475815,
-0.07047108560800552,
0.0035008732229471207,
-0.0781347006559372,
-0.05367003381252289,
-0.003423059359192848,
0.07677021622657776,
0.09656346589326859,
-0.02191198617219925,
0.04341578856110573,
0.05815064162015915,
0.028813300654292107,
-0.09096995741128922,
-0.09845288097858429,
0.014840138144791126,
0.08031302690505981,
-0.01763656735420227,
-0.015156312845647335,
-0.06266855448484421,
0.061863407492637634,
0.07030264288187027,
0.08772893249988556,
0.015326918102800846,
0.02511797845363617,
-0.053138092160224915,
0.02043786272406578,
-0.0336749404668808,
0.11219488084316254,
0.0517372190952301,
0.04223455861210823,
-0.03722377121448517,
0.011596850119531155,
-0.025547737255692482,
-0.0658087357878685,
-0.04471628740429878,
0.04726554825901985,
0.0013767738128080964,
0.044887423515319824,
-0.00024948985083028674,
-0.07440769672393799,
0.06188104674220085,
-0.009763592854142189,
0.00441398611292243,
0.005233928095549345,
-0.07054544985294342,
-0.017758505418896675
] | 0.054546
|
the clear. When cached, DEKs can be used without another call to the KMS; whereas DEKs that are not cached require a call to the KMS to unwrap. \* `timeout`: How long should `kube-apiserver` wait for kms-plugin to respond before returning an error (default is 3 seconds). ### KMS v2 {#configuring-the-kms-provider-kms-v2} \* `apiVersion`: API Version for KMS provider. Set this to `v2`. \* `name`: Display name of the KMS plugin. Cannot be changed once set. \* `endpoint`: Listen address of the gRPC server (KMS plugin). The endpoint is a UNIX domain socket. \* `timeout`: How long should `kube-apiserver` wait for kms-plugin to respond before returning an error (default is 3 seconds). KMS v2 does not support the `cachesize` property. All data encryption keys (DEKs) will be cached in the clear once the server has unwrapped them via a call to the KMS. Once cached, DEKs can be used to perform decryption indefinitely without making a call to the KMS. See [Understanding the encryption at rest configuration](/docs/tasks/administer-cluster/encrypt-data). ## Implementing a KMS plugin To implement a KMS plugin, you can develop a new plugin gRPC server or enable a KMS plugin already provided by your cloud provider. You then integrate the plugin with the remote KMS and deploy it on the Kubernetes control plane. ### Enabling the KMS supported by your cloud provider Refer to your cloud provider for instructions on enabling the cloud provider-specific KMS plugin. ### Developing a KMS plugin gRPC server You can develop a KMS plugin gRPC server using a stub file available for Go. For other languages, you use a proto file to create a stub file that you can use to develop the gRPC server code. #### KMS v1 {#developing-a-kms-plugin-gRPC-server-kms-v1} \* Using Go: Use the functions and data structures in the stub file: [api.pb.go](https://github.com/kubernetes/kms/blob/release-{{< skew currentVersion >}}/apis/v1beta1/api.pb.go) to develop the gRPC server code \* Using languages other than Go: Use the protoc compiler with the proto file: [api.proto](https://github.com/kubernetes/kms/blob/release-{{< skew currentVersion >}}/apis/v1beta1/api.proto) to generate a stub file for the specific language #### KMS v2 {#developing-a-kms-plugin-gRPC-server-kms-v2} \* Using Go: A high level [library](https://github.com/kubernetes/kms/blob/release-{{< skew currentVersion >}}/pkg/service/interface.go) is provided to make the process easier. Low level implementations can use the functions and data structures in the stub file: [api.pb.go](https://github.com/kubernetes/kms/blob/release-{{< skew currentVersion >}}/apis/v2/api.pb.go) to develop the gRPC server code \* Using languages other than Go: Use the protoc compiler with the proto file: [api.proto](https://github.com/kubernetes/kms/blob/release-{{< skew currentVersion >}}/apis/v2/api.proto) to generate a stub file for the specific language Then use the functions and data structures in the stub file to develop the server code. #### Notes ##### KMS v1 {#developing-a-kms-plugin-gRPC-server-notes-kms-v1} \* kms plugin version: `v1beta1` In response to procedure call Version, a compatible KMS plugin should return `v1beta1` as `VersionResponse.version`. \* message version: `v1beta1` All messages from KMS provider have the version field set to `v1beta1`. \* protocol: UNIX domain socket (`unix`) The plugin is implemented as a gRPC server that listens at UNIX domain socket. The plugin deployment should create a file on the file system to run the gRPC unix domain socket connection. The API server (gRPC client) is configured with the KMS provider (gRPC server) unix domain socket endpoint in order to communicate with it. An abstract Linux socket may be used by starting the endpoint with `/@`, i.e. `unix:///@foo`. Care must be taken when using this type of socket as they do not have concept of ACL (unlike traditional file based sockets). However, they are subject to Linux networking namespace, so will only be accessible to containers within the same pod unless host networking is used. ##### KMS v2 {#developing-a-kms-plugin-gRPC-server-notes-kms-v2} \* KMS plugin version: `v2` In response to
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
-0.03451186418533325,
0.05814618617296219,
0.0035027924459427595,
-0.03205819055438042,
-0.007556063588708639,
-0.07830064743757248,
-0.0036482196301221848,
-0.022263651713728905,
0.058942653238773346,
0.07809300720691681,
0.021089233458042145,
-0.014771738089621067,
-0.015006503090262413,
-0.07032045722007751,
0.0075417375192046165,
-0.03426065668463707,
0.04014964774250984,
-0.005077387671917677,
-0.038662414997816086,
-0.042537443339824677,
-0.0048950971104204655,
-0.08967491239309311,
-0.040322210639715195,
0.025193283334374428,
-0.06216426193714142,
-0.017816714942455292,
0.012449651956558228,
0.015007663518190384,
0.010481215082108974,
0.0004623621061909944,
-0.06797777116298676,
-0.06703795492649078,
-0.020868424326181412,
0.008686795830726624,
-0.002136790659278631,
0.13105523586273193,
-0.048362862318754196,
0.010441521182656288,
-0.10895578563213348,
0.029385242611169815,
0.06594306975603104,
-0.007743327412754297,
-0.08942429721355438,
0.035678017884492874,
0.025286132469773293,
0.05044311285018921,
0.006954297423362732,
-0.0489039421081543,
-0.11012613773345947,
-0.08978605270385742,
0.08041618764400482,
0.010805506259202957,
-0.029344001784920692,
0.03523927927017212,
-0.0308323223143816,
-0.03003033436834812,
-0.12523441016674042,
0.13578742742538452,
0.027398129925131798,
0.06091196835041046,
0.058460723608732224,
-0.061973586678504944,
0.007802567444741726,
-0.005967336241155863,
-0.03700201213359833,
0.03495526686310768,
0.11164667457342148,
-0.039461880922317505,
0.05244806036353111,
0.02550656720995903,
-0.0233023539185524,
-0.002236382570117712,
-0.026894573122262955,
-0.020659197121858597,
-0.020072482526302338,
0.047881219536066055,
-0.0491149015724659,
0.018240388482809067,
0.0169526357203722,
-0.13143528997898102,
0.03320072218775749,
0.029484104365110397,
-0.012514258734881878,
0.024584369733929634,
-0.08403796702623367,
-0.013505577109754086,
-0.010812495835125446,
-0.06798336654901505,
0.012475214898586273,
-0.0696277767419815,
0.0851220190525055,
-0.06895481795072556,
0.03838067874312401,
-0.029312413185834885,
-0.028780436143279076,
0.06623397767543793,
-0.020348062738776207,
0.09531229734420776,
-0.02017316408455372,
-0.0011126776225864887,
0.013613875955343246,
0.04621177911758423,
-0.09170722216367722,
-0.00829432811588049,
0.052912380546331406,
-0.08051194995641708,
-0.014545964077115059,
0.057240765541791916,
-0.02790714241564274,
0.1009448915719986,
-0.0364774651825428,
0.05752919614315033,
0.02748703956604004,
0.015120972879230976,
0.004235474392771721,
0.051288578659296036,
0.027521392330527306,
0.0013622809201478958,
0.0705934390425682,
0.07641761004924774,
0.06913124769926071,
-0.04413124918937683,
-0.01809769868850708,
-0.02943762205541134,
-0.06877103447914124,
0.06085512787103653,
0.1238933801651001,
5.4131419346450335e-33,
-0.032640453428030014,
-0.05772070586681366,
0.01985543593764305,
0.0040746829472482204,
-0.038447994738817215,
-0.09452945739030838,
-0.0044233608059585094,
0.01753213070333004,
-0.09025352448225021,
0.013739661313593388,
-0.023817194625735283,
0.025786569342017174,
-0.017480168491601944,
-0.04068143665790558,
-0.012140315026044846,
0.1065870001912117,
0.031927935779094696,
0.003926732577383518,
0.0833943784236908,
0.029302965849637985,
0.057324957102537155,
-0.03609335422515869,
0.0074533736333251,
-0.07078348845243454,
0.038386743515729904,
-0.023319322615861893,
0.03497552499175072,
-0.038598693907260895,
-0.04959163814783096,
0.00041623678407631814,
-0.013036346063017845,
-0.03096252679824829,
0.03361326456069946,
0.09610147029161453,
-0.10253822803497314,
-0.02142939902842045,
-0.00468862010166049,
-0.00567289674654603,
-0.09453891962766647,
-0.0801037847995758,
0.0010017562890425324,
0.030737541615962982,
-0.06748711317777634,
-0.033388495445251465,
0.023387553170323372,
0.010825580917298794,
0.021796815097332,
-0.0026294738054275513,
0.07054691761732101,
-0.001678840140812099,
0.05193694308400154,
0.056722644716501236,
-0.002612469717860222,
-0.023708736523985863,
0.08543512225151062,
0.04008118063211441,
0.1703765094280243,
-0.0975404903292656,
-0.045473821461200714,
0.00028306202148087323,
-0.006849312223494053,
-0.027751095592975616,
0.015337027609348297,
0.021456558257341385,
0.07287373393774033,
0.02325369231402874,
-0.06995141506195068,
0.045459479093551636,
-0.06426572054624557,
-0.07881369441747665,
-0.06197499856352806,
0.022539889439940453,
0.07100637257099152,
-0.013841773383319378,
-0.0993918851017952,
-0.04620037600398064,
-0.0024294874165207148,
-0.013703247532248497,
-0.06800748407840729,
0.0855623185634613,
0.05842087045311928,
-0.02612261474132538,
-0.08425108343362808,
0.0416489839553833,
-0.01058597955852747,
-0.043733030557632446,
-0.03673025220632553,
0.006929085589945316,
0.039750006049871445,
0.05598073825240135,
-0.04268185794353485,
0.05303535237908363,
-0.009089396335184574,
-0.027097346261143684,
-0.0607944093644619,
-5.624105701735202e-33,
0.022713756188750267,
-0.02333792671561241,
-0.028150733560323715,
0.09002313762903214,
0.05141930282115936,
0.03937239572405815,
-0.02058633603155613,
0.11180856078863144,
0.025069016963243484,
0.012639601714909077,
0.023750461637973785,
-0.07899954169988632,
0.0034648668952286243,
-0.0005689055542461574,
-0.0074359336867928505,
0.08295919746160507,
-0.08551306277513504,
-0.024750547483563423,
-0.010310851037502289,
-0.004736034199595451,
0.0046326578594744205,
0.05242964252829552,
-0.0040554869920015335,
0.023615892976522446,
0.014887118712067604,
0.014989171177148819,
-0.03861796110868454,
0.10713091492652893,
-0.07090754061937332,
-0.02504480816423893,
0.05516321584582329,
-0.04329627752304077,
-0.04911911487579346,
0.003335335059091449,
-0.003103136783465743,
-0.04118078202009201,
-0.014858814887702465,
0.05236754193902016,
-0.041538406163454056,
-0.06182863563299179,
0.008279329165816307,
0.01717551425099373,
-0.022972242906689644,
0.005341540090739727,
0.03913738578557968,
-0.0338059738278389,
0.034302983433008194,
-0.01985824666917324,
0.04243802651762962,
-0.06885866820812225,
0.015591605566442013,
-0.03208691254258156,
-0.05945517495274544,
0.08804923295974731,
0.0312140341848135,
0.07113620638847351,
-0.02739039994776249,
0.07040128111839294,
-0.019089682027697563,
-0.03561890870332718,
0.06900445371866226,
-0.17803452908992767,
0.041790854185819626,
0.07531610876321793,
-0.023494847118854523,
0.03239580616354942,
-0.02766856551170349,
0.019439684227108955,
0.011253138072788715,
0.020879000425338745,
-0.013557449914515018,
-0.08017052710056305,
-0.03705471754074097,
-0.035228531807661057,
-0.003838674630969763,
0.0070223016664385796,
0.0032373631838709116,
0.01239387784153223,
-0.0011159644927829504,
0.011318515054881573,
-0.059565622359514236,
0.04982724413275719,
-0.0885014533996582,
0.07958970963954926,
0.07455006241798401,
0.0013647631276398897,
-0.009033994749188423,
0.04206320270895958,
0.04082079976797104,
0.0382857583463192,
-0.01611221581697464,
-0.02761601284146309,
-0.11818613111972809,
0.07935253530740738,
-0.05209796130657196,
-4.8041325584335937e-8,
0.007951253093779087,
-0.018443411216139793,
-0.06739634275436401,
0.06666785478591919,
-0.0028627438005059958,
-0.022376423701643944,
-0.022405114024877548,
0.04865502566099167,
-0.046023234724998474,
-0.04730616882443428,
0.07975941151380539,
0.04957360029220581,
-0.06964077800512314,
0.0425034798681736,
0.007543164771050215,
0.005686270538717508,
0.028583034873008728,
0.01947180926799774,
0.0105133643373847,
-0.047268617898225784,
-0.039018768817186356,
-0.03826002776622772,
-0.003652868326753378,
-0.03868158534169197,
0.03131259232759476,
0.05750454589724541,
0.07545771449804306,
0.0732671245932579,
0.05313340574502945,
-0.009498121216893196,
-0.024728095158934593,
-0.03367075324058533,
-0.007375780493021011,
0.05992688611149788,
0.034290578216314316,
-0.013194811530411243,
-0.11338678747415543,
0.06620848178863525,
0.035636384040117264,
0.09662245213985443,
0.004782626871019602,
0.009165368974208832,
-0.05603689327836037,
0.06663699448108673,
-0.019361630082130432,
0.029550055041909218,
0.008162790909409523,
0.0659695640206337,
-0.03722091391682625,
0.08850029110908508,
-0.02646535634994507,
-0.08136548101902008,
-0.03730716183781624,
0.013357093557715416,
0.053036388009786606,
-0.0221987534314394,
0.022306613624095917,
-0.0509788878262043,
0.03200938552618027,
0.026537101715803146,
-0.03993120789527893,
-0.008558022789657116,
0.0023793440777808428,
0.005002620629966259
] | 0.119271
|
socket as they do not have concept of ACL (unlike traditional file based sockets). However, they are subject to Linux networking namespace, so will only be accessible to containers within the same pod unless host networking is used. ##### KMS v2 {#developing-a-kms-plugin-gRPC-server-notes-kms-v2} \* KMS plugin version: `v2` In response to the `Status` remote procedure call, a compatible KMS plugin should return its KMS compatibility version as `StatusResponse.version`. That status response should also include "ok" as `StatusResponse.healthz` and a `key\_id` (remote KMS KEK ID) as `StatusResponse.key\_id`. The Kubernetes project recommends you make your plugin compatible with the stable `v2` KMS API. Kubernetes {{< skew currentVersion >}} also supports the `v2beta1` API for KMS; future Kubernetes releases are likely to continue supporting that beta version. The API server polls the `Status` procedure call approximately every minute when everything is healthy, and every 10 seconds when the plugin is not healthy. Plugins must take care to optimize this call as it will be under constant load. \* Encryption The `EncryptRequest` procedure call provides the plaintext and a UID for logging purposes. The response must include the ciphertext, the `key\_id` for the KEK used, and, optionally, any metadata that the KMS plugin needs to aid in future `DecryptRequest` calls (via the `annotations` field). The plugin must guarantee that any distinct plaintext results in a distinct response `(ciphertext, key\_id, annotations)`. If the plugin returns a non-empty `annotations` map, all map keys must be fully qualified domain names such as `example.com`. An example use case of `annotation` is `{"kms.example.io/remote-kms-auditid":""}` The API server does not perform the `EncryptRequest` procedure call at a high rate. Plugin implementations should still aim to keep each request's latency at under 100 milliseconds. \* Decryption The `DecryptRequest` procedure call provides the `(ciphertext, key\_id, annotations)` from `EncryptRequest` and a UID for logging purposes. As expected, it is the inverse of the `EncryptRequest` call. Plugins must verify that the `key\_id` is one that they understand - they must not attempt to decrypt data unless they are sure that it was encrypted by them at an earlier time. The API server may perform thousands of `DecryptRequest` procedure calls on startup to fill its watch cache. Thus plugin implementations must perform these calls as quickly as possible, and should aim to keep each request's latency at under 10 milliseconds. \* Understanding `key\_id` and Key Rotation The `key\_id` is the public, non-secret name of the remote KMS KEK that is currently in use. It may be logged during regular operation of the API server, and thus must not contain any private data. Plugin implementations are encouraged to use a hash to avoid leaking any data. The KMS v2 metrics take care to hash this value before exposing it via the `/metrics` endpoint. The API server considers the `key\_id` returned from the `Status` procedure call to be authoritative. Thus, a change to this value signals to the API server that the remote KEK has changed, and data encrypted with the old KEK should be marked stale when a no-op write is performed (as described below). If an `EncryptRequest` procedure call returns a `key\_id` that is different from `Status`, the response is thrown away and the plugin is considered unhealthy. Thus implementations must guarantee that the `key\_id` returned from `Status` will be the same as the one returned by `EncryptRequest`. Furthermore, plugins must ensure that the `key\_id` is stable and does not flip-flop between values (i.e. during a remote KEK rotation). Plugins must not re-use `key\_id`s, even in situations where a previously used remote KEK has been reinstated. For example, if a plugin was using `key\_id=A`, switched to `key\_id=B`,
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
-0.043576862663030624,
0.013166221790015697,
-0.05716753378510475,
-0.02789844386279583,
-0.06504599750041962,
-0.007542508188635111,
0.007100374903529882,
-0.012036382220685482,
0.05340157449245453,
0.04881627485156059,
0.01976848393678665,
-0.002757358830422163,
-0.002468489808961749,
-0.021952692419290543,
0.02129216492176056,
-0.040138646960258484,
0.06666301190853119,
-0.07751686871051788,
-0.04555564746260643,
-0.025498783215880394,
-0.027606317773461342,
-0.03375495597720146,
0.01511820312589407,
-0.010312945581972599,
-0.09230312705039978,
0.002325205598026514,
0.031081343069672585,
0.027123110368847847,
0.0326404795050621,
0.006945331580936909,
-0.02455146051943302,
-0.07141775637865067,
-0.019162412732839584,
0.027673427015542984,
0.025430025532841682,
0.08977318555116653,
0.049390193074941635,
-0.07670664042234421,
-0.17007119953632355,
0.043548583984375,
0.0863950252532959,
-0.09412609040737152,
-0.08458064496517181,
0.011510239914059639,
0.04799136519432068,
-0.018213171511888504,
-0.06744169443845749,
-0.06592853367328644,
-0.017582949250936508,
-0.007169649936258793,
0.027419742196798325,
-0.05735468491911888,
0.047091562300920486,
0.08121808618307114,
0.057857315987348557,
-0.03083360195159912,
-0.13789699971675873,
0.06492119282484055,
0.04179992154240608,
0.008512644097208977,
0.05517682805657387,
-0.04656879976391792,
0.022317390888929367,
-0.04100396856665611,
-0.1183602586388588,
0.017925038933753967,
0.013397318311035633,
-0.006373430602252483,
0.013623722828924656,
-0.03574573993682861,
-0.037683892995119095,
-0.05855097249150276,
-0.0324532613158226,
-0.01836910843849182,
-0.010829838924109936,
0.023383306339383125,
-0.039686210453510284,
-0.03614633530378342,
-0.03464581072330475,
-0.09097056835889816,
0.04457259923219681,
0.06455190479755402,
-0.017099544405937195,
0.011807284317910671,
-0.1032714918255806,
0.021743029356002808,
-0.034948915243148804,
-0.03192122280597687,
-0.04021608084440231,
-0.03708897903561592,
0.029951881617307663,
-0.04170909523963928,
0.056556910276412964,
-0.09434708952903748,
0.03215750306844711,
0.063211590051651,
-0.028228716924786568,
-0.0314873643219471,
0.013088705018162727,
0.01696518063545227,
0.038150396198034286,
0.04702318087220192,
-0.08983185887336731,
-0.0512106716632843,
0.06970585882663727,
-0.04639170691370964,
-0.10562504827976227,
0.026565387845039368,
-0.010238240472972393,
0.08425339311361313,
-0.060258809477090836,
0.06650184094905853,
0.02290496602654457,
-0.0023115400690585375,
0.011619938537478447,
-0.03530970215797424,
0.010721627622842789,
-0.01491954643279314,
0.07773055136203766,
0.06402942538261414,
0.07068854570388794,
-0.08672946691513062,
-0.04693674296140671,
0.04748380556702614,
0.016034267842769623,
0.04384909197688103,
0.0173130314797163,
6.020603252345421e-33,
-0.00057397031923756,
-0.04502623528242111,
0.04048683121800423,
0.008687644265592098,
0.007588861044496298,
-0.05798666179180145,
-0.008027351461350918,
-0.012052304111421108,
-0.031269822269678116,
-0.03538672998547554,
-0.07989350706338882,
0.03776984289288521,
0.0344260111451149,
-0.060506660491228104,
-0.05164751783013344,
0.09060316532850266,
-0.03832976520061493,
0.008107948116958141,
0.12530718743801117,
0.057316478341817856,
-0.011999879963696003,
-0.10512971132993698,
0.002476069610565901,
0.014778892509639263,
0.07625152170658112,
0.02950194664299488,
0.027667591348290443,
-0.09676267206668854,
0.01519143395125866,
-0.02099442668259144,
0.0012425711611285806,
-0.0396764799952507,
0.080836221575737,
0.02849576063454151,
-0.13163934648036957,
-0.0053107282146811485,
-0.0006713002803735435,
0.008878173306584358,
-0.11648089438676834,
-0.0499345101416111,
-0.002242737216874957,
-0.01432253047823906,
-0.08143483102321625,
0.0329328253865242,
0.056906502693891525,
0.03670984506607056,
-0.02381627820432186,
0.0012647212715819478,
0.1133008524775505,
-0.019957784563302994,
0.01560237817466259,
-0.031074751168489456,
0.020309926941990852,
0.0015157791785895824,
0.07851378619670868,
0.016369856894016266,
0.04727005213499069,
0.022659646347165108,
-0.06187092140316963,
-0.030344439670443535,
-0.04189889505505562,
0.007754391524940729,
-0.011747599579393864,
-0.023960601538419724,
0.08293390274047852,
0.0368330217897892,
-0.1307363659143448,
0.021562954410910606,
-0.04843796417117119,
-0.027891719713807106,
-0.02255783975124359,
0.0786111056804657,
-0.01539281290024519,
0.042875662446022034,
-0.07878655195236206,
-0.024756139144301414,
0.007960262708365917,
-0.006561385001987219,
-0.05905548855662346,
0.06771305203437805,
-0.029735157266259193,
-0.022228453308343887,
-0.04577824845910072,
0.06898900121450424,
0.008581120520830154,
-0.018754787743091583,
-0.03207266703248024,
0.009854445233941078,
-0.02753652073442936,
0.015974847599864006,
-0.026110799983143806,
0.06302225589752197,
0.0031348424963653088,
0.00691535510122776,
-0.0723692998290062,
-7.108304705550592e-33,
0.017811182886362076,
0.002418753458186984,
-0.07035675644874573,
0.020301198586821556,
0.055440180003643036,
0.0023604172747582197,
-0.011679678224027157,
0.020697422325611115,
-0.011867002584040165,
0.03769912198185921,
0.03683564439415932,
-0.03864412009716034,
0.03248369321227074,
0.006766031961888075,
-0.010286225005984306,
0.00899126473814249,
-0.11148876696825027,
-0.05873047187924385,
-0.00557000283151865,
0.043903183192014694,
-0.07389593869447708,
0.03430914133787155,
0.10414200276136398,
0.053657080978155136,
-0.012306256219744682,
0.033072032034397125,
-0.011919986456632614,
0.033240824937820435,
-0.08038963377475739,
-0.022788334637880325,
0.05592530220746994,
-0.08468224853277206,
-0.053642529994249344,
0.01723027229309082,
0.0016774715622887015,
-0.07755711674690247,
-0.03635415434837341,
0.02226879633963108,
-0.03894931077957153,
-0.044466350227594376,
0.08171446621417999,
0.012066199444234371,
-0.068668432533741,
0.041104961186647415,
-0.0242807324975729,
0.018285425379872322,
0.026498474180698395,
-0.05971762537956238,
-0.006892414763569832,
-0.1640056073665619,
0.007443904411047697,
-0.011731014586985111,
-0.03704017028212547,
0.1425793468952179,
-0.01149324793368578,
0.10828544944524765,
0.009707859717309475,
0.037084005773067474,
-0.03151797875761986,
-0.04120895266532898,
0.10212412476539612,
-0.1751890331506729,
0.053633928298950195,
0.06605786830186844,
-0.008621412329375744,
-0.038793232291936874,
0.02415545843541622,
0.022388726472854614,
0.007146309595555067,
0.0628785490989685,
-0.01782086305320263,
0.008577448315918446,
0.03797603398561478,
0.01690192148089409,
0.05047430470585823,
0.01972191594541073,
-0.0006324090645648539,
-0.018486687913537025,
-0.0016529459971934557,
0.045033130794763565,
-0.09569840133190155,
0.07342404872179031,
-0.07785411179065704,
0.06610262393951416,
0.05667930096387863,
0.03160088509321213,
0.08152443915605545,
0.04837305098772049,
0.057169970124959946,
0.02918020822107792,
-0.0035235199611634016,
0.06520658731460571,
-0.10531093925237656,
0.04313273727893829,
-0.022358739748597145,
-5.571637018420006e-8,
0.03699451684951782,
-0.009542089886963367,
-0.07359196245670319,
0.007898963056504726,
-0.03027789108455181,
0.02032761089503765,
-0.031029127538204193,
-0.05779799446463585,
0.0005441219545900822,
0.0413772389292717,
-0.012796067632734776,
0.027884788811206818,
-0.01892952248454094,
0.007247619796544313,
0.06361309438943863,
0.026615742594003677,
0.04087497293949127,
0.07178539782762527,
0.02932317554950714,
-0.03965814411640167,
-0.023915236815810204,
-0.014471263624727726,
-0.0003347390447743237,
0.020472439005970955,
-0.003972962498664856,
0.034850429743528366,
0.09655409306287766,
0.03586991876363754,
-0.025809329003095627,
-0.010587982833385468,
-0.048596497625112534,
-0.049973178654909134,
-0.027385028079152107,
0.09752203524112701,
0.03512463718652725,
0.013375961221754551,
-0.06451824307441711,
0.06566473841667175,
0.004856739658862352,
0.07494696974754333,
-0.02183244191110134,
-0.02292925864458084,
-0.1019263043999672,
0.018953630700707436,
-0.008626945316791534,
0.018304474651813507,
0.07306303083896637,
0.02002202905714512,
0.0025669727474451065,
0.07916142046451569,
-0.012802443467080593,
-0.07143250852823257,
0.03492791950702667,
-0.014690686017274857,
0.031536854803562164,
0.03796326369047165,
-1.4656795599421457e-7,
-0.024400580674409866,
-0.021358750760555267,
0.003973346669226885,
-0.016637830063700676,
0.078338623046875,
0.015444410033524036,
0.05376271530985832
] | 0.161587
|
`EncryptRequest`. Furthermore, plugins must ensure that the `key\_id` is stable and does not flip-flop between values (i.e. during a remote KEK rotation). Plugins must not re-use `key\_id`s, even in situations where a previously used remote KEK has been reinstated. For example, if a plugin was using `key\_id=A`, switched to `key\_id=B`, and then went back to `key\_id=A` - instead of reporting `key\_id=A` the plugin should report some derivative value such as `key\_id=A\_001` or use a new value such as `key\_id=C`. Since the API server polls `Status` about every minute, `key\_id` rotation is not immediate. Furthermore, the API server will coast on the last valid state for about three minutes. Thus if a user wants to take a passive approach to storage migration (i.e. by waiting), they must schedule a migration to occur at `3 + N + M` minutes after the remote KEK has been rotated (`N` is how long it takes the plugin to observe the `key\_id` change and `M` is the desired buffer to allow config changes to be processed - a minimum `M` of five minutes is recommend). Note that no API server restart is required to perform KEK rotation. {{< caution >}} Because you don't control the number of writes performed with the DEK, the Kubernetes project recommends rotating the KEK at least every 90 days. {{< /caution >}} \* protocol: UNIX domain socket (`unix`) The plugin is implemented as a gRPC server that listens at UNIX domain socket. The plugin deployment should create a file on the file system to run the gRPC unix domain socket connection. The API server (gRPC client) is configured with the KMS provider (gRPC server) unix domain socket endpoint in order to communicate with it. An abstract Linux socket may be used by starting the endpoint with `/@`, i.e. `unix:///@foo`. Care must be taken when using this type of socket as they do not have concept of ACL (unlike traditional file based sockets). However, they are subject to Linux networking namespace, so will only be accessible to containers within the same pod unless host networking is used. ### Integrating a KMS plugin with the remote KMS The KMS plugin can communicate with the remote KMS using any protocol supported by the KMS. All configuration data, including authentication credentials the KMS plugin uses to communicate with the remote KMS, are stored and managed by the KMS plugin independently. The KMS plugin can encode the ciphertext with additional metadata that may be required before sending it to the KMS for decryption (KMS v2 makes this process easier by providing a dedicated `annotations` field). ### Deploying the KMS plugin Ensure that the KMS plugin runs on the same host(s) as the Kubernetes API server(s). ## Encrypting your data with the KMS provider To encrypt the data: 1. Create a new `EncryptionConfiguration` file using the appropriate properties for the `kms` provider to encrypt resources like Secrets and ConfigMaps. If you want to encrypt an extension API that is defined in a CustomResourceDefinition, your cluster must be running Kubernetes v1.26 or newer. 1. Set the `--encryption-provider-config` flag on the kube-apiserver to point to the location of the configuration file. 1. `--encryption-provider-config-automatic-reload` boolean argument determines if the file set by `--encryption-provider-config` should be [automatically reloaded](/docs/tasks/administer-cluster/encrypt-data/#configure-automatic-reloading) if the disk contents change. 1. Restart your API server. ### KMS v1 {#encrypting-your-data-with-the-kms-provider-kms-v1} ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets - configmaps - pandas.awesome.bears.example providers: - kms: name: myKmsPluginFoo endpoint: unix:///tmp/socketfile-foo.sock cachesize: 100 timeout: 3s - kms: name: myKmsPluginBar endpoint: unix:///tmp/socketfile-bar.sock cachesize: 100 timeout: 3s ``` ### KMS v2 {#encrypting-your-data-with-the-kms-provider-kms-v2} ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources:
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
-0.11847496032714844,
0.039466191083192825,
-0.03248137980699539,
0.02239769883453846,
-0.04517524316906929,
-0.06129135936498642,
-0.05770878121256828,
-0.02147376537322998,
0.07341642677783966,
0.08022104203701019,
0.01946130208671093,
0.0052884407341480255,
0.05648462846875191,
-0.010760817676782608,
0.03997417166829109,
0.04065219685435295,
-0.014968565665185452,
0.004788484424352646,
-0.14985758066177368,
-0.04004430025815964,
-0.04687398672103882,
-0.025925135239958763,
-0.030119648203253746,
0.03218582272529602,
-0.045913953334093094,
-0.07384005934000015,
0.053684648126363754,
0.01169603317975998,
-0.00018219185585621744,
-0.00018076511332765222,
-0.031178681179881096,
0.005864915903657675,
-0.17937974631786346,
-0.017671503126621246,
0.00523139163851738,
0.11898183822631836,
0.018559908494353294,
-0.11135771125555038,
0.053256988525390625,
-0.07510325312614441,
0.1234295442700386,
-0.04459179565310478,
-0.10486824065446854,
0.02058074064552784,
-0.03485025838017464,
0.013765820302069187,
-0.011689981445670128,
-0.030401045456528664,
-0.056636907160282135,
-0.022446686401963234,
-0.04044589027762413,
0.02413836121559143,
-0.054850928485393524,
0.10090049356222153,
-0.04271196946501732,
-0.030750324949622154,
-0.008555085398256779,
0.029331546276807785,
0.011973077431321144,
0.051600269973278046,
0.06586333364248276,
0.0010625171707943082,
0.07243553549051285,
-0.004938623867928982,
-0.07054053992033005,
0.026951825246214867,
0.04800717532634735,
-0.08655098080635071,
0.07660116255283356,
0.03631102666258812,
-0.01961524225771427,
-0.010704101994633675,
-0.15798431634902954,
-0.034115344285964966,
0.023359492421150208,
-0.04464662820100784,
-0.03650672361254692,
-0.05925293266773224,
-0.036450449377298355,
-0.08446601778268814,
0.05066310614347458,
-0.00624848110601306,
-0.013917701318860054,
0.0533551387488842,
0.0050925142131745815,
-0.00503563741222024,
-0.02094966173171997,
-0.010845281183719635,
-0.00011072500637965277,
0.015957796946167946,
0.06737583130598068,
-0.0020880347583442926,
0.03206745535135269,
-0.02677103318274021,
0.06810622662305832,
0.050586771219968796,
-0.022833751514554024,
-0.0007137968786992133,
-0.017842432484030724,
0.02513786219060421,
-0.021356049925088882,
-0.008070435374975204,
-0.06491848081350327,
-0.0259026437997818,
0.057886816561222076,
-0.05624716356396675,
0.016442066058516502,
-0.0063917445950210094,
-0.07650826126337051,
0.0552709698677063,
0.005374346859753132,
0.08751063793897629,
0.06889661401510239,
0.04154076427221298,
-0.03495512157678604,
0.1475416123867035,
-0.049422454088926315,
0.0006487116334028542,
0.00981368962675333,
0.0406763069331646,
0.06327231228351593,
-0.026664208620786667,
0.01798810251057148,
0.0019044509390369058,
-0.057122256606817245,
0.07213786989450455,
0.046091433614492416,
4.215584289541781e-33,
0.004071960225701332,
-0.101435586810112,
0.04658757522702217,
0.011446349322795868,
-0.050355441868305206,
-0.02935347892343998,
0.0318332239985466,
0.03605559468269348,
-0.023426512256264687,
-0.08061188459396362,
-0.0361897349357605,
0.017176644876599312,
-0.00395995145663619,
-0.042002949863672256,
-0.00581015832722187,
-0.042561888694763184,
0.03592599928379059,
0.05323074012994766,
0.03842015564441681,
-0.001965505303815007,
0.04711098596453667,
-0.07313410937786102,
0.0038798318710178137,
0.005726709496229887,
0.05195259675383568,
0.01575077325105667,
-0.013682341203093529,
-0.018405605107545853,
-0.008614839054644108,
0.006495567504316568,
-0.05436000972986221,
0.007917976938188076,
-0.04463616758584976,
0.0344398058950901,
-0.002429041313007474,
0.031192848458886147,
0.024731339886784554,
-0.023577114567160606,
-0.07079929113388062,
-0.06004662811756134,
0.005020037293434143,
0.07687073945999146,
-0.11678847670555115,
0.02336111292243004,
-0.021975234150886536,
-0.020381256937980652,
-0.021517766639590263,
-0.007418429013341665,
0.019554464146494865,
-0.008210179395973682,
0.019336195662617683,
0.07590364664793015,
-0.029054073616862297,
-0.0492393784224987,
-0.015832317993044853,
-0.1092870682477951,
0.06522204726934433,
-0.0459018312394619,
-0.02453925833106041,
-0.003595760790631175,
-0.018979571759700775,
-0.060851894319057465,
-0.0023664897307753563,
0.05702783539891243,
0.08080808073282242,
0.04244375601410866,
-0.017163928598165512,
0.05953700840473175,
-0.03462240844964981,
-0.01697278395295143,
0.004266086500138044,
0.047300953418016434,
-0.012203576974570751,
-0.043903518468141556,
-0.033796630799770355,
-0.08461470901966095,
-0.014386211521923542,
-0.0067197722382843494,
0.008838728070259094,
-0.025077611207962036,
0.1489984095096588,
0.012278318405151367,
-0.09895702451467514,
0.002610038034617901,
-0.02856731228530407,
0.020360080525279045,
-0.040540412068367004,
-0.012732408940792084,
-0.060321953147649765,
-0.04599279165267944,
0.03835863620042801,
0.04415740445256233,
-0.019742609933018684,
-0.04772353917360306,
-0.014861352741718292,
-6.296789690832948e-33,
0.0063561201095581055,
-0.10045674443244934,
-0.015136875212192535,
0.08103244751691818,
0.027473485097289085,
-0.009620529599487782,
0.013165057636797428,
0.055464375764131546,
0.009196626953780651,
-0.004027334041893482,
-0.04298287630081177,
-0.03169412165880203,
0.08792628347873688,
-0.005033133085817099,
0.06370936334133148,
-0.03465401008725166,
-0.1263233721256256,
-0.05321387201547623,
0.04882190003991127,
0.05960682034492493,
-0.011529972776770592,
0.07054149359464645,
-0.052423328161239624,
0.07200833410024643,
0.0057089547626674175,
0.03442969545722008,
-0.1406346708536148,
0.10647107660770416,
-0.026935242116451263,
-0.058249711990356445,
0.06252196431159973,
-0.0755787193775177,
-0.09567664563655853,
0.02456739917397499,
-0.04957693815231323,
0.008834611624479294,
-0.007260942831635475,
0.11151713877916336,
-0.05927512049674988,
0.0620797835290432,
0.03205016627907753,
-0.037020158022642136,
-0.0007893096189945936,
0.06583775579929352,
0.013257374055683613,
-0.02015903778374195,
-0.03912585601210594,
-0.006138046272099018,
-0.027884788811206818,
-0.0057521420530974865,
0.025869565084576607,
0.06545618921518326,
0.0000909021109691821,
0.021073218435049057,
0.051768019795417786,
0.0024982865434139967,
-0.05101184546947479,
0.017310377210378647,
-0.030272267758846283,
0.01211352739483118,
0.05172599479556084,
-0.026018433272838593,
0.0706217959523201,
0.06796348839998245,
-0.04111478477716446,
-0.03788384795188904,
0.023336773738265038,
-0.09090178459882736,
0.036502476781606674,
0.020449930801987648,
0.0861128643155098,
0.00726874265819788,
-0.03320823609828949,
-0.0022030766122043133,
0.04370015487074852,
-0.050247181206941605,
-0.011261473409831524,
-0.03942551091313362,
-0.004167081788182259,
0.05123450234532356,
-0.09838183969259262,
0.010143611580133438,
-0.0027808458544313908,
0.04722271487116814,
-0.03996570035815239,
-0.0536419078707695,
0.07102291285991669,
0.04560001939535141,
0.01104208268225193,
0.027472425252199173,
-0.025534845888614655,
-0.026646707206964493,
-0.1724879890680313,
0.02842780575156212,
0.05634603276848793,
-6.025307186519058e-8,
0.0185785461217165,
0.07502913475036621,
-0.029912054538726807,
0.09178169071674347,
0.016277030110359192,
-0.04391230270266533,
0.02813212387263775,
-0.010711531154811382,
0.0040011839009821415,
-0.04986906796693802,
0.04532641917467117,
0.002624278422445059,
0.045429106801748276,
0.000044882002839585766,
-0.07050152122974396,
0.02119511365890503,
-0.02333744987845421,
-0.039170827716588974,
-0.0008638652507215738,
-0.019896825775504112,
-0.07747248560190201,
-0.007489153183996677,
0.00015943207836244255,
-0.04646432027220726,
0.012393704615533352,
0.03160114586353302,
0.11553635448217392,
0.08085530251264572,
0.0037954598665237427,
-0.003377247601747513,
-0.08481390029191971,
-0.07027918845415115,
0.07416435331106186,
0.049716413021087646,
-0.04963323473930359,
0.04930710047483444,
-0.027190174907445908,
0.01386017631739378,
-0.028028808534145355,
0.02087734453380108,
0.022830912843346596,
-0.007835122756659985,
-0.08547934144735336,
0.0306279007345438,
0.0019239661050960422,
0.03249095752835274,
0.01633952371776104,
0.04624830186367035,
0.015959404408931732,
0.0731528177857399,
-0.0458345040678978,
-0.09243322163820267,
-0.015626970678567886,
0.08675971627235413,
0.012402579188346863,
0.02879282273352146,
-0.02298883907496929,
0.011632020585238934,
0.07859458029270172,
0.011708859354257584,
0.0517091266810894,
0.02039380557835102,
-0.04491904750466347,
-0.031783949583768845
] | 0.086802
|
v1 {#encrypting-your-data-with-the-kms-provider-kms-v1} ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets - configmaps - pandas.awesome.bears.example providers: - kms: name: myKmsPluginFoo endpoint: unix:///tmp/socketfile-foo.sock cachesize: 100 timeout: 3s - kms: name: myKmsPluginBar endpoint: unix:///tmp/socketfile-bar.sock cachesize: 100 timeout: 3s ``` ### KMS v2 {#encrypting-your-data-with-the-kms-provider-kms-v2} ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets - configmaps - pandas.awesome.bears.example providers: - kms: apiVersion: v2 name: myKmsPluginFoo endpoint: unix:///tmp/socketfile-foo.sock timeout: 3s - kms: apiVersion: v2 name: myKmsPluginBar endpoint: unix:///tmp/socketfile-bar.sock timeout: 3s ``` Setting `--encryption-provider-config-automatic-reload` to `true` collapses all health checks to a single health check endpoint. Individual health checks are only available when KMS v1 providers are in use and the encryption config is not auto-reloaded. The following table summarizes the health check endpoints for each KMS version: | KMS configurations | Without Automatic Reload | With Automatic Reload | | ------------------ | ------------------------ | --------------------- | | KMS v1 only | Individual Healthchecks | Single Healthcheck | | KMS v2 only | Single Healthcheck | Single Healthcheck | | Both KMS v1 and v2 | Individual Healthchecks | Single Healthcheck | | No KMS | None | Single Healthcheck | `Single Healthcheck` means that the only health check endpoint is `/healthz/kms-providers`. `Individual Healthchecks` means that each KMS plugin has an associated health check endpoint based on its location in the encryption config: `/healthz/kms-provider-0`, `/healthz/kms-provider-1` etc. These healthcheck endpoint paths are hard coded and generated/controlled by the server. The indices for individual healthchecks corresponds to the order in which the KMS encryption config is processed. Until the steps defined in [Ensuring all secrets are encrypted](#ensuring-all-secrets-are-encrypted) are performed, the `providers` list should end with the `identity: {}` provider to allow unencrypted data to be read. Once all resources are encrypted, the `identity` provider should be removed to prevent the API server from honoring unencrypted data. For details about the `EncryptionConfiguration` format, please check the [API server encryption API reference](/docs/reference/config-api/apiserver-config.v1/). ## Verifying that the data is encrypted When encryption at rest is correctly configured, resources are encrypted on write. After restarting your `kube-apiserver`, any newly created or updated Secret or other resource types configured in `EncryptionConfiguration` should be encrypted when stored. To verify, you can use the `etcdctl` command line program to retrieve the contents of your secret data. 1. Create a new secret called `secret1` in the `default` namespace: ```shell kubectl create secret generic secret1 -n default --from-literal=mykey=mydata ``` 1. Using the `etcdctl` command line, read that secret out of etcd: ```shell ETCDCTL\_API=3 etcdctl get /kubernetes.io/secrets/default/secret1 [...] | hexdump -C ``` where `[...]` contains the additional arguments for connecting to the etcd server. 1. Verify the stored secret is prefixed with `k8s:enc:kms:v1:` for KMS v1 or prefixed with `k8s:enc:kms:v2:` for KMS v2, which indicates that the `kms` provider has encrypted the resulting data. 1. Verify that the secret is correctly decrypted when retrieved via the API: ```shell kubectl describe secret secret1 -n default ``` The Secret should contain `mykey: mydata` ## Ensuring all secrets are encrypted When encryption at rest is correctly configured, resources are encrypted on write. Thus we can perform an in-place no-op update to ensure that data is encrypted. The following command reads all secrets and then updates them to apply server side encryption. If an error occurs due to a conflicting write, retry the command. For larger clusters, you may wish to subdivide the secrets by namespace or script an update. ```shell kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` ## Switching from a local encryption provider to the KMS provider To switch from a local encryption provider to the `kms` provider and re-encrypt all of the
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
-0.029723402112722397,
0.028920084238052368,
-0.016863973811268806,
-0.022335493937134743,
0.04628898203372955,
-0.06495308876037598,
-0.01043159794062376,
-0.025793064385652542,
0.027796287089586258,
0.04281486198306084,
0.03232447803020477,
-0.02078009769320488,
0.0016908934339880943,
-0.01776328682899475,
0.05486137792468071,
0.001829013112001121,
-0.03389449045062065,
-0.014256208203732967,
-0.020458074286580086,
-0.10379369556903839,
0.02265685796737671,
-0.033242348581552505,
0.022254973649978638,
-0.044641707092523575,
-0.041137900203466415,
-0.021103937178850174,
-0.03806167095899582,
0.05042950436472893,
-0.011588015593588352,
-0.006323411129415035,
-0.007598963100463152,
-0.0114229004830122,
-0.027140436694025993,
0.032453231513500214,
0.016865815967321396,
0.07858078926801682,
0.03567897155880928,
-0.045447688549757004,
-0.06608793884515762,
0.03575240448117256,
0.061624348163604736,
-0.02643626555800438,
-0.09910348057746887,
-0.0466393418610096,
-0.06349902600049973,
0.029876936227083206,
0.014465459622442722,
-0.013069553300738335,
-0.022966092452406883,
-0.04601367190480232,
0.01756918989121914,
-0.03754790127277374,
-0.06401846557855606,
0.053657207638025284,
-0.04203423485159874,
-0.039142947643995285,
-0.1258116513490677,
0.0902271568775177,
0.06171238794922829,
0.04673272743821144,
0.06870995461940765,
0.05485643818974495,
0.006937628146260977,
-0.006359838880598545,
-0.044773779809474945,
0.05128862336277962,
0.01651730202138424,
0.03454134613275528,
0.023721715435385704,
0.025808123871684074,
-0.009327159263193607,
-0.0031330937054008245,
-0.09439052641391754,
0.021930387243628502,
-0.015252931974828243,
-0.022102054208517075,
-0.006185551173985004,
-0.008171307854354382,
0.019405178725719452,
-0.09890667349100113,
-0.04046618938446045,
-0.006432981230318546,
0.009543381631374359,
0.053764186799526215,
-0.07968605309724808,
0.025048188865184784,
0.014068043790757656,
-0.06314382702112198,
0.05080457404255867,
-0.0006300687091425061,
0.04564345255494118,
-0.0784982219338417,
-0.006771445274353027,
-0.018475256860256195,
0.05885794386267662,
0.07667554169893265,
-0.03950343653559685,
0.046488381922245026,
-0.0843319371342659,
0.015421624295413494,
-0.021309869363904,
-0.008085381239652634,
0.010224508121609688,
-0.0380251519382,
0.08333943784236908,
0.0129785668104887,
-0.03704694285988808,
0.0357530377805233,
-0.028469521552324295,
0.11338644474744797,
0.014810558408498764,
0.04772261530160904,
0.0370817556977272,
-0.006108148489147425,
-0.013257013633847237,
0.05750934034585953,
-0.058179743587970734,
0.03987668827176094,
0.044472966343164444,
0.09672568738460541,
0.09323525428771973,
0.00936279445886612,
0.004898335784673691,
0.02374929003417492,
-0.09861461818218231,
0.0016971764853224158,
0.06478588283061981,
8.037525643035918e-33,
0.04965702444314957,
-0.023076437413692474,
-0.02528994530439377,
0.032125767320394516,
-0.0216277576982975,
-0.04196125641465187,
0.015895379707217216,
0.03367890045046806,
-0.08604658395051956,
0.03739354759454727,
-0.07718155533075333,
0.0016882630297914147,
-0.01539918314665556,
-0.06944666057825089,
-0.024796832352876663,
0.00509492726996541,
0.032066985964775085,
0.009289118461310863,
0.12006308138370514,
0.0816388875246048,
0.05148844048380852,
0.0023948373273015022,
0.04300303012132645,
-0.04681447520852089,
0.0404789000749588,
0.0065826233476400375,
0.06310460716485977,
-0.06146632507443428,
0.001042990479618311,
0.010714685544371605,
0.023206917569041252,
-0.057431768625974655,
-0.00606195442378521,
0.025449490174651146,
-0.029862655326724052,
-0.024300454184412956,
0.03857287019491196,
-0.0345466174185276,
-0.11630795150995255,
-0.052652280777692795,
0.08318126201629639,
0.03220347315073013,
-0.07861147820949554,
-0.04913793131709099,
-0.022706763818860054,
0.004558198153972626,
-0.008814558386802673,
-0.035835932940244675,
0.0945211797952652,
0.044275958091020584,
-0.045056167989969254,
0.01018883753567934,
-0.023137163370847702,
-0.07805880904197693,
0.06315259635448456,
-0.037631481885910034,
0.10110531002283096,
0.016177453100681305,
-0.03143410384654999,
-0.03305722773075104,
-0.07898902893066406,
-0.027822444215416908,
0.015818830579519272,
-0.020845184102654457,
0.07762361317873001,
-0.019423728808760643,
-0.07341457903385162,
0.004652077332139015,
-0.06205957382917404,
0.03572026640176773,
-0.09958489239215851,
0.010935229249298573,
0.06640703976154327,
0.03899624943733215,
-0.017824241891503334,
-0.08109389245510101,
-0.035365380346775055,
0.04165638983249664,
-0.10577721893787384,
0.0045027779415249825,
0.002835924969986081,
-0.014225001446902752,
-0.01834319531917572,
0.10227803140878677,
-0.045664262026548386,
-0.021117322146892548,
0.037776850163936615,
0.019097991287708282,
-0.005992634687572718,
-0.009160544723272324,
-0.05388883128762245,
0.0068250917829573154,
0.0046084122732281685,
-0.0997362807393074,
-0.10980109870433807,
-7.542568318258839e-33,
-0.02420879527926445,
-0.053648777306079865,
-0.013945194892585278,
0.0513695664703846,
0.04687061160802841,
0.009412526153028011,
0.027015073224902153,
0.09473368525505066,
-0.017481962218880653,
0.06612859666347504,
-0.015374619513750076,
-0.05498465895652771,
0.12983378767967224,
-0.06754738092422485,
0.03331614285707474,
0.03693773224949837,
-0.05453186482191086,
0.009015446528792381,
0.017387673258781433,
-0.024429934099316597,
-0.12372152507305145,
0.09294341504573822,
0.06210727244615555,
0.04830913990736008,
0.024423561990261078,
0.03327539190649986,
-0.027055544778704643,
0.09101821482181549,
-0.07274425029754639,
-0.04674116149544716,
0.04587697237730026,
-0.048576317727565765,
-0.10507062822580338,
-0.037598345428705215,
-0.07076597958803177,
-0.04659949243068695,
-0.0017361294012516737,
0.06922673434019089,
-0.05284777656197548,
-0.07936502248048782,
0.06977830082178116,
-0.030323931947350502,
-0.07204478979110718,
-0.005982218310236931,
-0.027066022157669067,
-0.050669509917497635,
0.05549199879169464,
-0.021714985370635986,
-0.0314752496778965,
-0.06545714288949966,
0.03223082423210144,
-0.0005054663633927703,
-0.06216126307845116,
0.06417907029390335,
0.022684922441840172,
0.056218355894088745,
0.07771153748035431,
0.10253340005874634,
-0.019973911345005035,
-0.03957560285925865,
0.07704584300518036,
-0.11609800159931183,
0.04507916793227196,
0.054329242557287216,
0.04001222178339958,
-0.019385753199458122,
-0.05458635464310646,
-0.0018298745853826404,
0.02127096988260746,
0.014397797174751759,
-0.021687302738428116,
-0.032307229936122894,
0.019057391211390495,
-0.04352043569087982,
0.03910736367106438,
-0.017595911398530006,
0.031700316816568375,
-0.05079174414277077,
0.020077325403690338,
0.058300990611314774,
-0.06735508143901825,
0.011516440659761429,
-0.051116447895765305,
0.08212927728891373,
0.1111004427075386,
0.0030599778983742,
0.03404320031404495,
0.10572018474340439,
0.03314230591058731,
0.06412642449140549,
-0.05837463214993477,
-0.012075193226337433,
-0.10697095841169357,
0.11454110592603683,
0.07150080800056458,
-4.9385707967530834e-8,
0.008010606281459332,
0.012274966575205326,
-0.09094942361116409,
0.0867091491818428,
0.016398493200540543,
0.05071518197655678,
-0.010520212352275848,
0.00845858920365572,
-0.04447340592741966,
-0.005805400665849447,
0.044369008392095566,
0.022201037034392357,
-0.06988262385129929,
0.04317329078912735,
0.030924197286367416,
-0.03173123300075531,
-0.050097912549972534,
0.036601174622774124,
-0.019839627668261528,
-0.08492470532655716,
-0.028992552310228348,
-0.014108206145465374,
-0.062197454273700714,
-0.029498301446437836,
0.06698478758335114,
0.060771360993385315,
0.08698490262031555,
0.03336038812994957,
0.0117471469566226,
0.01736343652009964,
-0.09856344759464264,
-0.075173020362854,
0.008634015917778015,
-0.04606115072965622,
-0.03451599180698395,
0.02980361320078373,
-0.14051443338394165,
0.06557343900203705,
0.029935622587800026,
0.058052364736795425,
0.013437781482934952,
0.005334378685802221,
-0.0007108227582648396,
0.07407102733850479,
-0.021124737337231636,
0.014009552076458931,
0.02664102241396904,
0.10015171766281128,
0.022402161732316017,
0.0667225793004036,
-0.020809466019272804,
-0.09431471675634384,
-0.020934758707880974,
0.02502990886569023,
-0.014542754739522934,
-0.02086854912340641,
-0.012208409607410431,
-0.06847812235355377,
0.013115196488797665,
-0.01997666247189045,
0.00893483217805624,
-0.018796216696500778,
0.02714630775153637,
-0.030948542058467865
] | 0.063556
|
to subdivide the secrets by namespace or script an update. ```shell kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` ## Switching from a local encryption provider to the KMS provider To switch from a local encryption provider to the `kms` provider and re-encrypt all of the secrets: 1. Add the `kms` provider as the first entry in the configuration file as shown in the following example. ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets providers: - kms: apiVersion: v2 name : myKmsPlugin endpoint: unix:///tmp/socketfile.sock - aescbc: keys: - name: key1 secret: ``` 1. Restart all `kube-apiserver` processes. 1. Run the following command to force all secrets to be re-encrypted using the `kms` provider. ```shell kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` ## {{% heading "whatsnext" %}} If you no longer want to use encryption for data persisted in the Kubernetes API, read [decrypt data that are already stored at rest](/docs/tasks/administer-cluster/decrypt-data/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kms-provider.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kms-provider.md
|
[
-0.04111883044242859,
0.029601486399769783,
0.03887241333723068,
-0.004639679566025734,
-0.026870273053646088,
-0.005249434616416693,
-0.04167395457625389,
-0.02355552650988102,
0.06867591291666031,
0.05722230300307274,
-0.03122583217918873,
-0.06555140763521194,
0.03157425299286842,
-0.020808784291148186,
0.03252190724015236,
-0.014997928403317928,
-0.024807779118418694,
0.052386291325092316,
-0.05180458351969719,
-0.1054757833480835,
0.03728913143277168,
-0.07420065253973007,
0.03892916440963745,
-0.0370200090110302,
-0.05058453977108002,
-0.005457902792841196,
0.03619476780295372,
0.010750475339591503,
-0.03794202581048012,
-0.01983471028506756,
-0.018923165276646614,
-0.012459411285817623,
-0.009164604358375072,
-0.011150536127388477,
0.007440819405019283,
0.08242200314998627,
-0.0319390743970871,
-0.0037219738587737083,
-0.03329256922006607,
0.03359667956829071,
0.018993044272065163,
-0.04079723730683327,
-0.10539419203996658,
-0.024353258311748505,
-0.08849599212408066,
0.02814474143087864,
0.009831857867538929,
-0.030805470421910286,
-0.04144943505525589,
-0.03677966073155403,
0.053453315049409866,
-0.04531596973538399,
-0.021674001589417458,
0.03483358025550842,
-0.022660311311483383,
-0.009678483940660954,
-0.12477617710828781,
0.09290805459022522,
0.10486817359924316,
0.04304245114326477,
0.06884084641933441,
0.05401008948683739,
0.06980060040950775,
0.011621289886534214,
-0.08127118647098541,
0.10176655650138855,
0.04463634639978409,
0.04052789509296417,
0.036740049719810486,
0.028987599536776543,
0.06508394330739975,
0.0029787037055939436,
-0.046970997005701065,
-0.01876911334693432,
-0.015639275312423706,
0.0037533268332481384,
-0.05398358777165413,
0.0026617504190653563,
-0.05005071312189102,
-0.06000131368637085,
0.03553594648838043,
0.02192046493291855,
0.0027658219914883375,
0.0069534191861748695,
-0.0758829340338707,
-0.035663675516843796,
-0.0014716584701091051,
-0.09310291707515717,
0.03573716804385185,
-0.02265939675271511,
0.012982751242816448,
-0.11951308697462082,
0.02531224675476551,
-0.08097783476114273,
0.0715552419424057,
-0.009662371128797531,
-0.03529048338532448,
0.05159016326069832,
-0.050492387264966965,
-0.05630362406373024,
-0.03516436740756035,
0.024302979931235313,
-0.02483883500099182,
-0.04265039041638374,
0.07529108971357346,
0.03513514995574951,
-0.027419475838541985,
-0.016899297013878822,
-0.011050419881939888,
0.13300162553787231,
-0.013888254761695862,
0.06343653053045273,
-0.018175717443227768,
-0.008817481808364391,
0.03489253297448158,
0.07276366651058197,
-0.030023489147424698,
0.02117333561182022,
0.031797345727682114,
0.15480612218379974,
0.05355563387274742,
-0.015639735385775566,
0.013278193771839142,
0.05423182621598244,
-0.06692667305469513,
0.06283216923475266,
0.011323236860334873,
3.9422304250977506e-33,
0.028483591973781586,
-0.0069884490221738815,
0.02155216783285141,
-0.013049413450062275,
-0.06037124991416931,
-0.08391209691762924,
0.046601802110672,
0.006588790100067854,
-0.04878294840455055,
0.0008324508089572191,
-0.04896564781665802,
0.023128684610128403,
-0.017080018296837807,
-0.09392131865024567,
-0.019020147621631622,
0.0651116743683815,
0.011515962891280651,
-0.01216761115938425,
0.11087460070848465,
0.05222652107477188,
0.06508655846118927,
0.012254041619598866,
0.052603580057621,
-0.055120132863521576,
0.01791887916624546,
-0.03357720747590065,
0.0814569890499115,
-0.06253179162740707,
-0.004557969514280558,
-0.002932047238573432,
0.02985382452607155,
-0.05077769234776497,
0.032267529517412186,
0.020093537867069244,
-0.12686876952648163,
-0.01399577409029007,
0.006677589844912291,
0.040267061442136765,
-0.08939060568809509,
-0.042968057096004486,
0.0593431293964386,
-0.01016046293079853,
-0.022171754390001297,
-0.05698781460523605,
0.07403958588838577,
0.01309401635080576,
-0.05199591815471649,
-0.05640871077775955,
0.10959652811288834,
-0.005818880163133144,
-0.026416219770908356,
-0.004765039309859276,
-0.038886480033397675,
-0.09529032558202744,
0.06771404296159744,
-0.03491856902837753,
0.09563957154750824,
-0.023700984194874763,
-0.04989980533719063,
-0.05750074237585068,
-0.052624329924583435,
-0.02649027481675148,
-0.0014731556875631213,
0.011627411469817162,
0.033798862248659134,
-0.006793591193854809,
-0.07014239579439163,
-0.011939646676182747,
-0.10870204865932465,
-0.0022997232154011726,
-0.12279531359672546,
0.019310304895043373,
0.02458968572318554,
0.03286752849817276,
-0.05870576947927475,
-0.02789127826690674,
-0.028950460255146027,
0.022768570110201836,
-0.0763683021068573,
0.026054583489894867,
0.04277946427464485,
0.008526849560439587,
0.004117559641599655,
0.09711552411317825,
0.010251070372760296,
-0.014086748473346233,
-0.009112508967518806,
0.02258606255054474,
-0.0210132896900177,
0.022423308342695236,
0.055888399481773376,
-0.005628615617752075,
0.009730739519000053,
-0.04545784741640091,
-0.10742034763097763,
-5.400141701808908e-33,
0.05823734775185585,
-0.007564268074929714,
-0.011730683967471123,
0.05950060486793518,
0.059976112097501755,
0.06218031048774719,
-0.01643884927034378,
0.11690864711999893,
-0.022016843780875206,
0.01888490654528141,
-0.0685073584318161,
-0.04634161666035652,
0.10757465660572052,
-0.053350817412137985,
0.027145253494381905,
0.018515022471547127,
-0.017125196754932404,
0.0715990737080574,
-0.0017219994915649295,
-0.0066004227846860886,
-0.08449020236730576,
0.01156658586114645,
0.030144497752189636,
0.008690353482961655,
0.06858789920806885,
0.010107467882335186,
-0.0257884431630373,
0.125959575176239,
-0.06078863516449928,
-0.020791178569197655,
0.0037240548990666866,
-0.03342652693390846,
-0.06425158679485321,
0.003506522160023451,
-0.05998162552714348,
-0.07564624398946762,
-0.05659472197294235,
0.018103739246726036,
-0.02948879264295101,
-0.05030222237110138,
-0.004369376692920923,
-0.04505535960197449,
-0.05448409169912338,
-0.009476279839873314,
-0.0361567847430706,
-0.035347018390893936,
0.053639452904462814,
-0.07481314241886139,
-0.03697195276618004,
-0.08283299952745438,
0.01676693931221962,
-0.006811279803514481,
-0.1030334085226059,
0.037546541541814804,
0.005687831901013851,
0.09855501353740692,
-0.020782487466931343,
0.10113909095525742,
-0.012316715903580189,
0.004602286498993635,
0.058585282415151596,
-0.07699890434741974,
0.10811161249876022,
0.08196443319320679,
0.003692842787131667,
0.00909588672220707,
-0.07219423353672028,
0.031849224120378494,
0.013678213581442833,
0.024241216480731964,
-0.012729320675134659,
-0.05053183063864708,
0.010329199954867363,
0.015328221954405308,
0.057152777910232544,
-0.048203349113464355,
-0.011221972294151783,
-0.023566165938973427,
0.04245533421635628,
0.04118506237864494,
0.01083240658044815,
-0.03257368132472038,
-0.0721113532781601,
0.03386674448847771,
0.11644935607910156,
0.03744667395949364,
0.06138576567173004,
0.08638355135917664,
0.0389169305562973,
0.051519472151994705,
-0.057152923196554184,
-0.03746631741523743,
-0.024577239528298378,
0.04825883358716965,
0.07418515533208847,
-4.40109175769976e-8,
0.05059140548110008,
-0.005158699117600918,
-0.0663163885474205,
0.08784639090299606,
0.03466261550784111,
-0.0055093951523303986,
-0.04138435795903206,
0.03008158877491951,
-0.08401550352573395,
-0.02062828652560711,
0.019644007086753845,
0.038477908819913864,
-0.015333441086113453,
0.05026952177286148,
0.009159574285149574,
-0.013955773785710335,
-0.0027992113027721643,
0.05410821735858917,
0.0319676399230957,
-0.06877487152814865,
-0.015643414109945297,
-0.03598661348223686,
-0.036506909877061844,
0.004542732145637274,
0.06442605704069138,
0.05163915827870369,
0.06234555318951607,
-0.006614520214498043,
0.07666386663913727,
0.06706603616476059,
-0.08907780796289444,
-0.12344009429216385,
0.007305421866476536,
0.047991544008255005,
-0.030144155025482178,
0.008229739964008331,
-0.11206301301717758,
0.058748215436935425,
0.021256551146507263,
0.08300984650850296,
-0.006315299309790134,
-0.014806829392910004,
-0.0523780919611454,
0.058652427047491074,
-0.0380740724503994,
0.021724049001932144,
0.06256242096424103,
0.08491867780685425,
-0.04629921913146973,
0.037881579250097275,
-0.051114171743392944,
-0.06302879750728607,
-0.04109012708067894,
0.01735183596611023,
0.003271840512752533,
0.0031967186369001865,
-0.03396059200167656,
-0.04407519847154617,
-0.004410352557897568,
-0.038838036358356476,
-0.06954709440469742,
-0.013882390223443508,
-0.0009586205123923719,
-0.039277683943510056
] | 0.038301
|
This page shows how to configure quotas for API objects, including PersistentVolumeClaims and Services. A quota restricts the number of objects, of a particular type, that can be created in a namespace. You specify quotas in a [ResourceQuota](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#resourcequota-v1-core) object. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Create a namespace Create a namespace so that the resources you create in this exercise are isolated from the rest of your cluster. ```shell kubectl create namespace quota-object-example ``` ## Create a ResourceQuota Here is the configuration file for a ResourceQuota object: {{% code\_sample file="admin/resource/quota-objects.yaml" %}} Create the ResourceQuota: ```shell kubectl apply -f https://k8s.io/examples/admin/resource/quota-objects.yaml --namespace=quota-object-example ``` View detailed information about the ResourceQuota: ```shell kubectl get resourcequota object-quota-demo --namespace=quota-object-example --output=yaml ``` The output shows that in the quota-object-example namespace, there can be at most one PersistentVolumeClaim, at most two Services of type LoadBalancer, and no Services of type NodePort. ```yaml status: hard: persistentvolumeclaims: "1" services.loadbalancers: "2" services.nodeports: "0" used: persistentvolumeclaims: "0" services.loadbalancers: "0" services.nodeports: "0" ``` ## Create a PersistentVolumeClaim Here is the configuration file for a PersistentVolumeClaim object: {{% code\_sample file="admin/resource/quota-objects-pvc.yaml" %}} Create the PersistentVolumeClaim: ```shell kubectl apply -f https://k8s.io/examples/admin/resource/quota-objects-pvc.yaml --namespace=quota-object-example ``` Verify that the PersistentVolumeClaim was created: ```shell kubectl get persistentvolumeclaims --namespace=quota-object-example ``` The output shows that the PersistentVolumeClaim exists and has status Pending: ``` NAME STATUS pvc-quota-demo Pending ``` ## Attempt to create a second PersistentVolumeClaim Here is the configuration file for a second PersistentVolumeClaim: {{% code\_sample file="admin/resource/quota-objects-pvc-2.yaml" %}} Attempt to create the second PersistentVolumeClaim: ```shell kubectl apply -f https://k8s.io/examples/admin/resource/quota-objects-pvc-2.yaml --namespace=quota-object-example ``` The output shows that the second PersistentVolumeClaim was not created, because it would have exceeded the quota for the namespace. ``` persistentvolumeclaims "pvc-quota-demo-2" is forbidden: exceeded quota: object-quota-demo, requested: persistentvolumeclaims=1, used: persistentvolumeclaims=1, limited: persistentvolumeclaims=1 ``` ## Notes These are the strings used to identify API resources that can be constrained by quotas: | String | API Object | | --- | --- | | "pods" | Pod | | "services" | Service | | "replicationcontrollers" | ReplicationController | | "resourcequotas" | ResourceQuota | | "secrets" | Secret | | "configmaps" | ConfigMap | | "persistentvolumeclaims" | PersistentVolumeClaim | | "services.nodeports" | Service of type NodePort | | "services.loadbalancers" | Service of type LoadBalancer | ## Clean up Delete your namespace: ```shell kubectl delete namespace quota-object-example ``` ## {{% heading "whatsnext" %}} ### For cluster administrators \* [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) \* [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) \* [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) \* [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) \* [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) \* [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/) ### For app developers \* [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) \* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) \* [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/) \* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/quota-api-object.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/quota-api-object.md
|
[
-0.01216197945177555,
0.003709649434313178,
-0.012143485248088837,
0.002086938126012683,
-0.07577414810657501,
0.002258522203192115,
0.006130082067102194,
-0.006057923659682274,
0.08097387850284576,
0.06534316390752792,
-0.07555694878101349,
-0.12330475449562073,
0.05067303031682968,
-0.005876346491277218,
0.01819441094994545,
0.013533242978155613,
0.04070600867271423,
-0.05245058611035347,
-0.046448368579149246,
-0.08967059850692749,
0.0892726480960846,
0.021037716418504715,
0.028899386525154114,
0.013615531846880913,
-0.0004140351084060967,
-0.038526542484760284,
-0.052766166627407074,
-0.04851089045405388,
0.02622838132083416,
0.0011165633331984282,
0.021295512095093727,
-0.057774730026721954,
0.012780766934156418,
0.008386049419641495,
0.09534644335508347,
0.11678917706012726,
0.0054823122918605804,
-0.03809046745300293,
-0.035452600568532944,
0.04819970205426216,
0.024331815540790558,
0.010882909409701824,
-0.09666042029857635,
-0.058048930019140244,
-0.018297623842954636,
0.01627117395401001,
-0.036097101867198944,
-0.029324069619178772,
0.009864689782261848,
0.032148610800504684,
0.03047396056354046,
-0.08965296298265457,
0.06643516570329666,
0.006607764400541782,
0.025868941098451614,
0.0005393320461735129,
0.03053179755806923,
0.1059466078877449,
0.054771121591329575,
0.006116822827607393,
0.013411961495876312,
-0.06059905141592026,
0.051448073238134384,
-0.023433180525898933,
-0.03786720335483551,
0.017628716304898262,
-0.010973852127790451,
0.04399074614048004,
0.009074770845472813,
0.02637052722275257,
0.04727984964847565,
0.09502683579921722,
-0.08077014982700348,
-0.0126976128667593,
-0.00706794997677207,
0.06516526639461517,
-0.0009833353105932474,
0.07973432540893555,
0.01667037606239319,
-0.06611776351928711,
-0.032318115234375,
-0.002469742437824607,
0.005940494127571583,
-0.03407585248351097,
-0.08326718956232071,
-0.004628585185855627,
-0.01500835083425045,
-0.013215907849371433,
0.021114127710461617,
-0.040395162999629974,
0.013514772057533264,
-0.07635852694511414,
0.0398964062333107,
-0.06524970382452011,
0.07408580929040909,
-0.01889013685286045,
-0.09100793302059174,
0.02351788617670536,
0.03690597414970398,
-0.01813686266541481,
0.0011657725553959608,
-0.03229498863220215,
0.012861644849181175,
0.0316104032099247,
0.042285818606615067,
-0.01803225837647915,
-0.04149759188294411,
-0.013922789134085178,
-0.0438799113035202,
0.11204510182142258,
-0.00004653978976421058,
0.06898185610771179,
-0.0277036651968956,
0.023916948586702347,
0.03720305487513542,
0.0248215664178133,
0.03709970787167549,
-0.06817520409822464,
0.0323166623711586,
0.045798953622579575,
0.07428579032421112,
-0.06531916558742523,
-0.01716412417590618,
-0.010960272513329983,
0.01950187049806118,
-0.02262840047478676,
-0.024551521986722946,
3.0399499814233487e-33,
0.048965033143758774,
-0.07439287006855011,
0.1050897166132927,
-0.011163204908370972,
0.01576027274131775,
-0.04851328581571579,
0.022192932665348053,
0.05587777495384216,
-0.05984858050942421,
-0.08481307327747345,
-0.0409495048224926,
0.06000664457678795,
0.0026702897157520056,
-0.09505724906921387,
-0.016748648136854172,
-0.03370514139533043,
-0.027357401326298714,
0.06403875350952148,
0.12830285727977753,
-0.049157414585351944,
0.03492031618952751,
-0.04579773545265198,
-0.05339454859495163,
0.029616812244057655,
0.021266689524054527,
-0.028231682255864143,
0.062049247324466705,
-0.11178875714540482,
-0.03674019128084183,
0.025953063741326332,
-0.057681821286678314,
-0.012557268142700195,
0.043482862412929535,
0.01449416670948267,
-0.10888858884572983,
-0.003887475933879614,
-0.026883147656917572,
0.09562395513057709,
-0.06369814276695251,
-0.05765647813677788,
0.049900151789188385,
0.0003071502724196762,
0.0550822950899601,
-0.07109537720680237,
-0.03591052442789078,
-0.02960146963596344,
0.07855057716369629,
-0.07165096700191498,
0.0301769208163023,
0.0715695321559906,
-0.016248533502221107,
-0.04879534989595413,
0.02976563572883606,
-0.008308003656566143,
0.08795244246721268,
-0.04308152198791504,
0.07726459950208664,
-0.031717751175165176,
0.012166284024715424,
-0.08062969893217087,
-0.02604832872748375,
-0.02263866737484932,
0.009334257803857327,
0.07884529232978821,
0.057058338075876236,
0.020266257226467133,
0.016758451238274574,
0.05425531789660454,
0.0033078372944146395,
-0.0032464624382555485,
-0.058605827391147614,
-0.007620897144079208,
-0.07769284397363663,
0.0425291508436203,
-0.06433717161417007,
-0.10074705630540848,
0.04943540692329407,
0.015172804705798626,
-0.11915669590234756,
0.04534989967942238,
-0.004813092760741711,
-0.07928497344255447,
-0.06352197378873825,
0.011247084476053715,
-0.03769277408719063,
-0.014676287770271301,
0.01681285724043846,
-0.007012895308434963,
-0.0558624267578125,
-0.030695777386426926,
0.05711767449975014,
-0.05503498762845993,
-0.0761793702840805,
0.029563598334789276,
-0.051548659801483154,
-4.353171862543699e-33,
0.12263383716344833,
0.07814761996269226,
0.006764460355043411,
0.022160019725561142,
0.08341111242771149,
0.0586792454123497,
0.019808631390333176,
0.09986350685358047,
-0.0432809479534626,
-0.03746924549341202,
-0.13473524153232574,
-0.046522341668605804,
0.002223370363935828,
0.05698314681649208,
-0.10713785141706467,
-0.02001388929784298,
-0.06744255870580673,
0.0025527223479002714,
0.020225433632731438,
0.005110560916364193,
-0.06916596740484238,
0.005420043133199215,
0.057294249534606934,
-0.003558758646249771,
0.03167290240526199,
0.005986058618873358,
-0.055056288838386536,
-0.01382478792220354,
-0.013600937090814114,
0.022959474474191666,
-0.05747121945023537,
-0.09096384793519974,
-0.09629590809345245,
-0.03964295610785484,
-0.019841110333800316,
-0.1282345950603485,
-0.0013660407857969403,
0.11596501618623734,
0.004953914321959019,
0.05610201880335808,
0.037621915340423584,
0.009357699193060398,
-0.012379615567624569,
-0.04289902374148369,
-0.04451029375195503,
-0.02447805181145668,
0.06530807912349701,
-0.10451219230890274,
-0.061255209147930145,
-0.10360138863325119,
-0.03155990317463875,
-0.014429931528866291,
-0.060026999562978745,
0.10141757875680923,
-0.011131832376122475,
0.016176767647266388,
0.05339411646127701,
0.09101758152246475,
-0.008243693970143795,
-0.06705668568611145,
0.019204439595341682,
-0.03579998016357422,
0.010038875974714756,
0.02181609347462654,
0.0019486007513478398,
-0.07044132798910141,
0.0002985954633913934,
0.02942487597465515,
-0.05422110855579376,
0.024182789027690887,
-0.05385598540306091,
0.022405501455068588,
0.04009370878338814,
0.073157899081707,
-0.010740707628428936,
0.0024690604768693447,
0.0020817823242396116,
-0.057242441922426224,
0.07782597839832306,
0.054530154913663864,
-0.03954758122563362,
0.030692601576447487,
-0.019277239218354225,
0.03739104047417641,
0.02919277921319008,
0.011895246803760529,
0.06283614039421082,
0.061669353395700455,
-0.007440987043082714,
0.12350955605506897,
-0.06519056856632233,
0.028005102649331093,
0.001234087161719799,
0.08390536159276962,
-0.04726734012365341,
-4.9194785134432095e-8,
0.04000737890601158,
0.05791499465703964,
-0.021008770912885666,
0.08322753757238388,
0.006167667452245951,
-0.07058430463075638,
-0.018218854442238808,
0.05515047907829285,
-0.019033323973417282,
0.04395968094468117,
0.015377632342278957,
0.06655831634998322,
-0.022241968661546707,
0.014958332292735577,
-0.07291337847709656,
-0.00446832412853837,
-0.006675344426184893,
0.004791897721588612,
0.027314715087413788,
-0.026294313371181488,
-0.008226972073316574,
-0.03725813701748848,
-0.017092466354370117,
-0.04609637334942818,
0.05334969982504845,
0.0593305304646492,
0.02811693213880062,
0.06092729791998863,
0.022966424003243446,
0.01869380474090576,
-0.040330853313207626,
-0.009555990807712078,
-0.07056983560323715,
-0.0011803931556642056,
-0.04996688663959503,
-0.019751396030187607,
-0.12030655890703201,
0.04158516228199005,
-0.016411274671554565,
0.07617942988872528,
-0.02268495410680771,
0.0025679972022771835,
-0.04394702985882759,
-0.005231755785644054,
0.049793194979429245,
0.13155344128608704,
-0.055048730224370956,
0.07835675776004791,
-0.05508293956518173,
-0.0020828922279179096,
-0.04456715285778046,
-0.03981294482946396,
0.01505460124462843,
0.07296682894229889,
-0.014098439365625381,
0.005496154073625803,
0.022123295813798904,
0.009367586113512516,
0.017361696809530258,
-0.0004975816118530929,
0.020255157724022865,
0.04866478219628334,
0.02363821119070053,
-0.0038098441436886787
] | 0.099301
|
This page shows you how to specify the type of [cascading deletion](/docs/concepts/architecture/garbage-collection/#cascading-deletion) to use in your cluster during {{}}. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You also need to [create a sample Deployment](/docs/tasks/run-application/run-stateless-application-deployment/#creating-and-exploring-an-nginx-deployment) to experiment with the different types of cascading deletion. You will need to recreate the Deployment for each type. ## Check owner references on your pods Check that the `ownerReferences` field is present on your pods: ```shell kubectl get pods -l app=nginx --output=yaml ``` The output has an `ownerReferences` field similar to this: ```yaml apiVersion: v1 ... ownerReferences: - apiVersion: apps/v1 blockOwnerDeletion: true controller: true kind: ReplicaSet name: nginx-deployment-6b474476c4 uid: 4fdcd81c-bd5d-41f7-97af-3a3b759af9a7 ... ``` ## Use foreground cascading deletion {#use-foreground-cascading-deletion} By default, Kubernetes uses [background cascading deletion](/docs/concepts/architecture/garbage-collection/#background-deletion) to delete dependents of an object. You can switch to foreground cascading deletion using either `kubectl` or the Kubernetes API, depending on the Kubernetes version your cluster runs. {{}} You can delete objects using foreground cascading deletion using `kubectl` or the Kubernetes API. \*\*Using kubectl\*\* Run the following command: ```shell kubectl delete deployment nginx-deployment --cascade=foreground ``` \*\*Using the Kubernetes API\*\* 1. Start a local proxy session: ```shell kubectl proxy --port=8080 ``` 1. Use `curl` to trigger deletion: ```shell curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/deployments/nginx-deployment \ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \ -H "Content-Type: application/json" ``` The output contains a `foregroundDeletion` {{}} like this: ``` "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "nginx-deployment", "namespace": "default", "uid": "d1ce1b02-cae8-4288-8a53-30e84d8fa505", "resourceVersion": "1363097", "creationTimestamp": "2021-07-08T20:24:37Z", "deletionTimestamp": "2021-07-08T20:27:39Z", "finalizers": [ "foregroundDeletion" ] ... ``` ## Use background cascading deletion {#use-background-cascading-deletion} 1. [Create a sample Deployment](/docs/tasks/run-application/run-stateless-application-deployment/#creating-and-exploring-an-nginx-deployment). 1. Use either `kubectl` or the Kubernetes API to delete the Deployment, depending on the Kubernetes version your cluster runs. {{}} You can delete objects using background cascading deletion using `kubectl` or the Kubernetes API. Kubernetes uses background cascading deletion by default, and does so even if you run the following commands without the `--cascade` flag or the `propagationPolicy` argument. \*\*Using kubectl\*\* Run the following command: ```shell kubectl delete deployment nginx-deployment --cascade=background ``` \*\*Using the Kubernetes API\*\* 1. Start a local proxy session: ```shell kubectl proxy --port=8080 ``` 1. Use `curl` to trigger deletion: ```shell curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/deployments/nginx-deployment \ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Background"}' \ -H "Content-Type: application/json" ``` The output is similar to this: ``` "kind": "Status", "apiVersion": "v1", ... "status": "Success", "details": { "name": "nginx-deployment", "group": "apps", "kind": "deployments", "uid": "cc9eefb9-2d49-4445-b1c1-d261c9396456" } ``` ## Delete owner objects and orphan dependents {#set-orphan-deletion-policy} By default, when you tell Kubernetes to delete an object, the {{}} also deletes dependent objects. You can make Kubernetes \*orphan\* these dependents using `kubectl` or the Kubernetes API, depending on the Kubernetes version your cluster runs. {{}} \*\*Using kubectl\*\* Run the following command: ```shell kubectl delete deployment nginx-deployment --cascade=orphan ``` \*\*Using the Kubernetes API\*\* 1. Start a local proxy session: ```shell kubectl proxy --port=8080 ``` 1. Use `curl` to trigger deletion: ```shell curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/deployments/nginx-deployment \ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Orphan"}' \ -H "Content-Type: application/json" ``` The output contains `orphan` in the `finalizers` field, similar to this: ``` "kind": "Deployment", "apiVersion": "apps/v1", "namespace": "default", "uid": "6f577034-42a0-479d-be21-78018c466f1f", "creationTimestamp": "2021-07-09T16:46:37Z", "deletionTimestamp": "2021-07-09T16:47:08Z", "deletionGracePeriodSeconds": 0, "finalizers": [ "orphan" ], ... ``` You can check that the Pods managed by the Deployment are still running: ```shell kubectl get pods -l app=nginx ``` ## {{% heading "whatsnext" %}} \* Learn about [owners and dependents](/docs/concepts/overview/working-with-objects/owners-dependents/) in Kubernetes. \* Learn about Kubernetes [finalizers](/docs/concepts/overview/working-with-objects/finalizers/). \* Learn about [garbage collection](/docs/concepts/architecture/garbage-collection/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/use-cascading-deletion.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/use-cascading-deletion.md
|
[
0.004668952897191048,
-0.025255203247070312,
0.07595294713973999,
-0.022679753601551056,
-0.027321306988596916,
-0.044652339071035385,
-0.03138161078095436,
-0.08823145180940628,
0.03594589605927467,
0.0372893251478672,
-0.025515589863061905,
-0.04858008772134781,
0.03281791880726814,
0.026972994208335876,
0.055757880210876465,
-0.010662191547453403,
-0.04364040121436119,
0.0008476495277136564,
-0.003461990039795637,
-0.02679583616554737,
-0.008790048770606518,
-0.00439775176346302,
-0.0010184813290834427,
0.05010441318154335,
0.002313761506229639,
0.0065659149549901485,
-0.007007499225437641,
-0.02739342488348484,
0.0500384159386158,
0.01183776929974556,
-0.022056687623262405,
0.008697099052369595,
0.004920246545225382,
-0.01750216819345951,
0.07946628332138062,
0.15247003734111786,
0.012156904675066471,
-0.0724630355834961,
-0.02292501926422119,
-0.023181812837719917,
0.08483759313821793,
0.04361804947257042,
-0.0762094035744667,
-0.08214229345321655,
-0.03024895302951336,
-0.011944187805056572,
-0.1021089106798172,
-0.05186775326728821,
-0.01995028182864189,
-0.045695576816797256,
0.004591079428792,
-0.0732424259185791,
0.02347872219979763,
0.05574128031730652,
0.045253653079271317,
0.03996839001774788,
-0.0049792383797466755,
0.019651101902127266,
0.04346108436584473,
-0.029865063726902008,
0.026720328256487846,
-0.05835423618555069,
0.026110488921403885,
-0.07470583915710449,
0.02756301313638687,
0.060693368315696716,
-0.025221087038517,
-0.004135678056627512,
0.05545606091618538,
0.02488117292523384,
0.08352858573198318,
0.000324551307130605,
-0.014340396970510483,
-0.024158423766493797,
-0.05576999485492706,
0.07769913971424103,
0.000956354255322367,
0.05383770540356636,
-0.06930336356163025,
-0.020374836400151253,
0.033413589000701904,
0.017513183876872063,
0.014595098793506622,
0.01683865487575531,
-0.07876861840486526,
-0.02477530762553215,
0.0345848947763443,
-0.09756717830896378,
0.07166565954685211,
-0.007189169526100159,
-0.0003553058486431837,
-0.03302983567118645,
0.07638778537511826,
-0.08565603941679001,
0.03738022595643997,
0.03368353843688965,
0.013565633445978165,
0.08173474669456482,
0.032221704721450806,
0.04445214942097664,
0.010389244183897972,
-0.0747029185295105,
0.01906224712729454,
-0.004296878818422556,
-0.0037157030310481787,
0.04626696929335594,
-0.09970755875110626,
-0.009376334957778454,
0.010174010880291462,
0.05243662744760513,
-0.056868355721235275,
0.04619600996375084,
-0.059784647077322006,
0.07059324532747269,
-0.0545983724296093,
0.06751484423875809,
0.03523515909910202,
0.0205960925668478,
0.01696893759071827,
0.09678754955530167,
0.04621608927845955,
-0.10436862707138062,
0.026693617925047874,
0.013527926988899708,
-0.0035289861261844635,
0.0044737933203577995,
-0.04365481808781624,
1.558127680248527e-33,
0.037109825760126114,
-0.09326096624135971,
-0.031513623893260956,
0.00043255393393337727,
0.09267354011535645,
-0.06574081629514694,
-0.05767711624503136,
0.011789172887802124,
-0.032905835658311844,
-0.019244754686951637,
-0.015811040997505188,
0.061396293342113495,
-0.06981714069843292,
-0.023059353232383728,
0.012508618645370007,
-0.05010652914643288,
-0.03729497641324997,
0.020089542493224144,
0.05940227583050728,
-0.04873571917414665,
0.0627129077911377,
0.024672482162714005,
-0.09205689281225204,
0.06484637409448624,
0.009238519705832005,
-0.0057658483274281025,
0.05162742733955383,
-0.09651656448841095,
-0.06104952469468117,
0.009377929382026196,
0.0002865247952286154,
0.009671218693256378,
-0.027359597384929657,
0.02784067764878273,
-0.15367472171783447,
0.036537401378154755,
-0.04709563031792641,
0.03511973097920418,
-0.08335402607917786,
-0.01710769347846508,
0.04230862110853195,
-0.0007544040563516319,
-0.05193430185317993,
-0.0661899670958519,
0.03454151749610901,
-0.08242545276880264,
0.0702877789735794,
-0.10856292396783829,
0.09808383136987686,
0.016569998115301132,
0.024887505918741226,
-0.09841259568929672,
0.04456600919365883,
-0.030001576989889145,
0.03427259624004364,
0.0021039650309830904,
0.09157167375087738,
-0.016349678859114647,
0.029934268444776535,
-0.051634255796670914,
-0.005926722660660744,
-0.022243648767471313,
-0.021583134308457375,
0.07987520098686218,
0.015349246561527252,
0.04175899550318718,
0.01841522380709648,
0.04044192284345627,
0.020644603297114372,
-0.0363631397485733,
-0.07130824774503708,
0.07589639723300934,
-0.08858831971883774,
0.007349036633968353,
0.0012640038039535284,
-0.07577941566705704,
0.05414014682173729,
0.03843197226524353,
-0.08319486677646637,
0.007953006774187088,
0.03490060940384865,
-0.018547475337982178,
-0.09432302415370941,
0.11158084124326706,
0.010230743326246738,
-0.024230921640992165,
0.004951195325702429,
-0.02627546899020672,
-0.06991644203662872,
0.03314439579844475,
0.013990034349262714,
0.018779288977384567,
-0.07906227558851242,
0.010066084563732147,
-0.05960923433303833,
-2.9775104765725535e-33,
0.10590682178735733,
-0.022677991539239883,
0.034125715494155884,
-0.04846799001097679,
-0.009442981332540512,
-0.0293811596930027,
0.015024500899016857,
0.08369548618793488,
-0.03733157366514206,
-0.057664673775434494,
-0.06955850124359131,
-0.05051175877451897,
0.04627984017133713,
0.06758137792348862,
-0.14632511138916016,
0.01283237710595131,
-0.026527272537350655,
-0.09271195530891418,
-0.0375804640352726,
0.0017009060829877853,
-0.019348181784152985,
0.03289821743965149,
0.06469842791557312,
0.04763207584619522,
0.0007618251838721335,
0.00284406915307045,
0.026034878566861153,
0.027403278276324272,
0.02631460875272751,
-0.011614622548222542,
-0.02862420119345188,
-0.05646710470318794,
0.01890469528734684,
-0.021331192925572395,
0.009271743707358837,
-0.06631037592887878,
-0.048396795988082886,
0.09518316388130188,
-0.011507831513881683,
-0.09408361464738846,
0.007358400151133537,
0.049389250576496124,
-0.0827532708644867,
-0.0002435330970911309,
-0.0247697401791811,
0.003643571399152279,
0.060371458530426025,
-0.012811764143407345,
0.01554297935217619,
-0.01649872213602066,
-0.024681665003299713,
0.021807078272104263,
-0.08147991448640823,
0.047741446644067764,
-0.045462898910045624,
0.016329463571310043,
0.08946027606725693,
0.011026035062968731,
-0.027789918705821037,
0.003011200577020645,
0.04169628769159317,
-0.019681427627801895,
0.05238189175724983,
0.03386011719703674,
0.02018442377448082,
-0.07901346683502197,
-0.047262564301490784,
0.015683915466070175,
-0.0327509380877018,
0.04489411413669586,
-0.004751412197947502,
0.05436228588223457,
-0.020711882039904594,
0.02216077782213688,
0.03274716064333916,
-0.013942583464086056,
-0.004096154123544693,
0.014152596704661846,
0.07398465275764465,
-0.02019573748111725,
-0.022854313254356384,
0.07337037473917007,
-0.07931472361087799,
0.01033709105104208,
-0.0008340039639733732,
0.0669965147972107,
0.03881274536252022,
0.07891647517681122,
0.08275699615478516,
0.0952722430229187,
0.004823281895369291,
-0.027285998687148094,
0.011712687090039253,
0.022247085347771645,
-0.10581845045089722,
-5.1068617779037595e-8,
0.04320717602968216,
0.046750180423259735,
-0.05752156302332878,
0.0716366246342659,
0.0031690048053860664,
-0.08712650835514069,
0.04586692154407501,
0.09833885729312897,
-0.00031826808117330074,
-0.028589406982064247,
-0.03825107589364052,
0.08117922395467758,
-0.16294148564338684,
0.05137580260634422,
-0.005430556833744049,
-0.07191118597984314,
0.00983178149908781,
0.07214848697185516,
-0.00485082296654582,
-0.03913068771362305,
-0.07872550189495087,
-0.048065267503261566,
0.020064227283000946,
0.04380517080426216,
0.06071136146783829,
0.06525780260562897,
0.05450844392180443,
0.019491666927933693,
0.022918622940778732,
-0.0009506027563475072,
-0.034844934940338135,
-0.02623911201953888,
-0.012972427532076836,
0.01028458122164011,
-0.04277518019080162,
0.014546481892466545,
-0.1324186772108078,
0.06244272366166115,
0.04296932741999626,
-0.0019674068316817284,
-0.030777523294091225,
0.060507237911224365,
-0.047324083745479584,
-0.011317198164761066,
-0.025761179625988007,
0.019576311111450195,
-0.008849325589835644,
0.04369071498513222,
0.03847229480743408,
0.014389554038643837,
-0.048228684812784195,
-0.07344753295183182,
-0.08585155755281448,
0.0488976314663887,
-0.04230877757072449,
0.0725928544998169,
0.06233563274145126,
-0.011706516146659851,
0.05587860569357872,
-0.0546230748295784,
0.10234181582927704,
-0.036705415695905685,
0.04306327551603317,
-0.04662054032087326
] | 0.106094
|
Kubernetes [finalizers](/docs/concepts/overview/working-with-objects/finalizers/). \* Learn about [garbage collection](/docs/concepts/architecture/garbage-collection/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/use-cascading-deletion.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/use-cascading-deletion.md
|
[
0.016998711973428726,
0.0362696498632431,
0.05248395353555679,
-0.05714127793908119,
0.00242994143627584,
-0.02763110026717186,
0.0139376325532794,
0.013128796592354774,
0.06230993568897247,
0.03755825757980347,
-0.010332238860428333,
0.003585194004699588,
-0.06838242709636688,
-0.016700994223356247,
-0.054328445345163345,
0.024185340851545334,
0.030482739210128784,
0.0575767420232296,
-0.040589042007923126,
-0.03879944607615471,
0.05091534182429314,
0.03050566092133522,
0.021701520308852196,
0.00996346864849329,
-0.07091406732797623,
0.047980427742004395,
-0.03821000084280968,
-0.06493891775608063,
0.04889245703816414,
-0.08587424457073212,
-0.040594495832920074,
0.033537305891513824,
-0.03087172657251358,
-0.009548828937113285,
0.02461322583258152,
0.09070654213428497,
0.050843384116888046,
-0.08078420162200928,
-0.016938120126724243,
-0.0021840007975697517,
0.002364428946748376,
0.03061411902308464,
-0.10385093837976456,
0.0011825630208477378,
-0.01697305589914322,
-0.020090842619538307,
-0.05987084284424782,
-0.10019697993993759,
0.00006839509296696633,
-0.11781696230173111,
0.04300099238753319,
-0.06269797682762146,
0.046322472393512726,
0.06609746813774109,
0.08778642863035202,
-0.040844373404979706,
-0.048776235431432724,
-0.02767259255051613,
-0.0006457677227444947,
0.04570415988564491,
0.0526154488325119,
-0.005413001868873835,
-0.05951815843582153,
0.010341590270400047,
0.06493867188692093,
0.009503128007054329,
0.07092525064945221,
0.075453981757164,
0.05043701454997063,
-0.045493289828300476,
-0.0032321878243237734,
-0.026148898527026176,
-0.05031700059771538,
0.021862847730517387,
-0.027340825647115707,
0.04176388680934906,
-0.047960635274648666,
0.004487209487706423,
-0.031812455505132675,
-0.05416591465473175,
0.02627648040652275,
0.020474722608923912,
0.023796474561095238,
-0.061974525451660156,
-0.021481189876794815,
0.0101295942440629,
0.005185682792216539,
-0.0013487128308042884,
0.04583865404129028,
0.04313613846898079,
-0.0017227355856448412,
0.0012696050107479095,
0.10838468372821808,
-0.07119818031787872,
-0.0038424551021307707,
0.023306826129555702,
0.028163356706500053,
-0.06234756484627724,
0.041560132056474686,
0.028346717357635498,
-0.03827390447258949,
-0.0011502971174195409,
0.07008104771375656,
-0.009189632721245289,
0.045335061848163605,
-0.04300164058804512,
-0.030656173825263977,
0.06318912655115128,
-0.003009958192706108,
-0.00936986692249775,
-0.060700614005327225,
0.003966350108385086,
-0.06228680536150932,
0.015247096307575703,
0.04899274930357933,
-0.00018422365246806294,
0.05225129798054695,
-0.009820318780839443,
0.04266553372144699,
0.07587304711341858,
0.0015890792710706592,
-0.07598349452018738,
-0.03098548948764801,
0.04116101562976837,
0.0014912373153492808,
0.07095429301261902,
-0.05790456384420395,
-3.6957296270723016e-33,
0.08637569099664688,
-0.0595669262111187,
-0.004327498842030764,
0.017743300646543503,
0.03147890791296959,
-0.12502650916576385,
0.0013559943763539195,
-0.003354093059897423,
-0.010542433708906174,
-0.004688762128353119,
-0.007282764185220003,
0.036270443350076675,
-0.04477595537900925,
0.021310560405254364,
0.07217846810817719,
-0.07997029274702072,
-0.05960698798298836,
0.0836205780506134,
0.06452960520982742,
-0.02537059597671032,
0.029758131131529808,
0.02728804014623165,
-0.020004861056804657,
-0.0005501005216501653,
0.07515931874513626,
-0.010237975046038628,
0.024118397384881973,
-0.02004515379667282,
-0.028381740674376488,
0.018849728628993034,
-0.020936651155352592,
-0.0030191235709935427,
0.022544659674167633,
0.03156878426671028,
-0.10497565567493439,
0.0420147143304348,
-0.11086130142211914,
0.028992172330617905,
-0.03758605569601059,
-0.08922392874956131,
0.008663241751492023,
0.013554883189499378,
-0.0712643638253212,
-0.06098392233252525,
0.03892320394515991,
-0.08452551811933517,
0.0214470773935318,
-0.06362100690603256,
0.0721612200140953,
0.045861925929784775,
0.02293342351913452,
-0.020887341350317,
0.015207625925540924,
0.04800105467438698,
0.010451248846948147,
0.04628400504589081,
0.1575016975402832,
-0.062376849353313446,
-0.04602675139904022,
0.07240798324346542,
-0.04857427999377251,
0.05197041109204292,
-0.09129836410284042,
-0.01742592081427574,
0.04712506756186485,
-0.00041955019696615636,
-0.03685172274708748,
0.05448879301548004,
-0.032888904213905334,
-0.06353366374969482,
-0.08411619067192078,
-0.003612775355577469,
0.05165676772594452,
0.054865140467882156,
-0.02515137754380703,
-0.07369224727153778,
-0.03553641960024834,
-0.02342630736529827,
-0.11073893308639526,
-0.01569909229874611,
0.04028722643852234,
-0.02563399262726307,
-0.060804784297943115,
0.04897104203701019,
-0.06113819032907486,
0.03372148051857948,
0.04031972587108612,
-0.020051078870892525,
0.012426836416125298,
0.0708032175898552,
-0.02075704000890255,
0.002456061076372862,
-0.023599328473210335,
0.00695258192718029,
-0.11808665841817856,
2.478401820027149e-33,
0.09527060389518738,
0.009417368099093437,
-0.05488361418247223,
0.1037050187587738,
0.010098553262650967,
0.010672365315258503,
-0.03801407292485237,
0.06561944633722305,
-0.052390046417713165,
-0.0706440880894661,
-0.02049543708562851,
-0.014755328185856342,
0.0867779552936554,
0.03435320407152176,
-0.049526602029800415,
-0.05333949998021126,
-0.026854759082198143,
-0.1289789229631424,
-0.04969945549964905,
-0.004473892506211996,
-0.024550477042794228,
0.03510133549571037,
0.05990610271692276,
-0.06163094565272331,
-0.00898788683116436,
0.018152745440602303,
-0.035806525498628616,
0.03325110301375389,
0.006977780722081661,
-0.054777853190898895,
0.03206701949238777,
-0.1004774197936058,
0.050509825348854065,
-0.014436165802180767,
-0.00918005220592022,
-0.08204405754804611,
0.031095830723643303,
0.05610951408743858,
0.015800807625055313,
-0.060143083333969116,
0.07853984087705612,
0.029666202142834663,
-0.01638012006878853,
0.02453092858195305,
-0.02481697127223015,
-0.028822192922234535,
-0.05806638300418854,
0.007359105162322521,
0.029321083799004555,
-0.12731339037418365,
-0.008617778308689594,
0.00927805621176958,
-0.05978754535317421,
0.04550573602318764,
-0.04950016736984253,
0.03544701635837555,
0.10441447794437408,
0.026605274528265,
0.049771565943956375,
0.03998763486742973,
-0.0005526735913008451,
-0.07664874941110611,
0.06091718003153801,
0.012418720871210098,
0.0294145829975605,
-0.08508653193712234,
0.0055741118267178535,
0.06523904204368591,
-0.05821148678660393,
0.03628034144639969,
0.026458563283085823,
0.02796127088367939,
-0.03496992960572243,
0.057067714631557465,
0.025926945731043816,
-0.07626859098672867,
0.001285105012357235,
-0.026516607031226158,
0.09020521491765976,
0.0050217765383422375,
-0.04232608526945114,
0.05169253796339035,
-0.03706645220518112,
0.0663456916809082,
0.1009591817855835,
0.01572435349225998,
-0.019559022039175034,
0.004894649609923363,
0.007465854752808809,
0.05133533105254173,
-0.030933868139982224,
0.030087048187851906,
-0.0007224911241792142,
0.1354021579027176,
-0.027666088193655014,
-3.006796944760026e-8,
0.023779617622494698,
0.014517956413328648,
0.01496447529643774,
0.07691442221403122,
-0.0056908829137682915,
-0.06843731552362442,
0.04197314754128456,
0.10603053122758865,
0.02806396782398224,
-0.028655873611569405,
-0.009750879369676113,
0.028402607887983322,
-0.10864496231079102,
0.0032635743264108896,
0.04546859860420227,
-0.033249687403440475,
-0.008898801170289516,
0.07459874451160431,
-0.02675452083349228,
-0.07828108221292496,
-0.07256000488996506,
-0.026205845177173615,
-0.007821894250810146,
-0.05577581748366356,
0.03087542951107025,
0.08227032423019409,
0.11822151392698288,
0.10964993387460709,
0.028422169387340546,
-0.011745958589017391,
0.009059660136699677,
0.06161530688405037,
-0.026293298229575157,
-0.004738533403724432,
0.017412561923265457,
0.10127845406532288,
-0.09943609684705734,
0.01532304659485817,
-0.03676483780145645,
0.09211275726556778,
-0.031404297798871994,
-0.026255721226334572,
-0.08540292829275131,
0.041847798973321915,
0.04922289401292801,
0.04015308618545532,
-0.03577393293380737,
0.034381501376628876,
-0.03747496381402016,
-0.00954215507954359,
0.01908237487077713,
-0.07005323469638824,
-0.053501252084970474,
0.09420358389616013,
-0.03462434187531471,
0.030198808759450912,
0.04413815215229988,
-0.06467297673225403,
0.03710327669978142,
0.028013985604047775,
0.0746990367770195,
0.03356599435210228,
-0.01257338933646679,
0.08625125139951706
] | 0.242339
|
This document helps you get started using the Kubernetes [NetworkPolicy API](/docs/concepts/services-networking/network-policies/) to declare network policies that govern how pods communicate with each other. {{% thirdparty-content %}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} Make sure you've configured a network provider with network policy support. There are a number of network providers that support NetworkPolicy, including: \* [Antrea](/docs/tasks/administer-cluster/network-policy-provider/antrea-network-policy/) \* [Calico](/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/) \* [Cilium](/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/) \* [Kube-router](/docs/tasks/administer-cluster/network-policy-provider/kube-router-network-policy/) \* [Romana](/docs/tasks/administer-cluster/network-policy-provider/romana-network-policy/) \* [Weave Net](/docs/tasks/administer-cluster/network-policy-provider/weave-network-policy/) ## Create an `nginx` deployment and expose it via a service To see how Kubernetes network policy works, start off by creating an `nginx` Deployment. ```console kubectl create deployment nginx --image=nginx ``` ```none deployment.apps/nginx created ``` Expose the Deployment through a Service called `nginx`. ```console kubectl expose deployment nginx --port=80 ``` ```none service/nginx exposed ``` The above commands create a Deployment with an nginx Pod and expose the Deployment through a Service named `nginx`. The `nginx` Pod and Deployment are found in the `default` namespace. ```console kubectl get svc,pod ``` ```none NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes 10.100.0.1 443/TCP 46m service/nginx 10.100.0.16 80/TCP 33s NAME READY STATUS RESTARTS AGE pod/nginx-701339712-e0qfq 1/1 Running 0 35s ``` ## Test the service by accessing it from another Pod You should be able to access the new `nginx` service from other Pods. To access the `nginx` Service from another Pod in the `default` namespace, start a busybox container: ```console kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` In your shell, run the following command: ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) remote file exists ``` ## Limit access to the `nginx` service To limit the access to the `nginx` service so that only Pods with the label `access: true` can query it, create a NetworkPolicy object as follows: {{% code\_sample file="service/networking/nginx-policy.yaml" %}} The name of a NetworkPolicy object must be a valid [DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). {{< note >}} NetworkPolicy includes a `podSelector` which selects the grouping of Pods to which the policy applies. You can see this policy selects Pods with the label `app=nginx`. The label was automatically added to the Pod in the `nginx` Deployment. An empty `podSelector` selects all pods in the namespace. {{< /note >}} ## Assign the policy to the service Use kubectl to create a NetworkPolicy from the above `nginx-policy.yaml` file: ```console kubectl apply -f https://k8s.io/examples/service/networking/nginx-policy.yaml ``` ```none networkpolicy.networking.k8s.io/access-nginx created ``` ## Test access to the service when access label is not defined When you attempt to access the `nginx` Service from a Pod without the correct labels, the request times out: ```console kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` In your shell, run the command: ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) wget: download timed out ``` ## Define access label and test again You can create a Pod with the correct labels to see that the request is allowed: ```console kubectl run busybox --rm -ti --labels="access=true" --image=busybox -- /bin/sh ``` In your shell, run the command: ```shell wget --spider --timeout=1 nginx ``` ```none Connecting to nginx (10.100.0.16:80) remote file exists ```
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/declare-network-policy.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/declare-network-policy.md
|
[
0.012318824417889118,
-0.0428912527859211,
0.019378816708922386,
-0.04393291473388672,
-0.04524053633213043,
-0.006006781943142414,
-0.04367824271321297,
-0.028694545850157738,
-0.017440520226955414,
0.045881375670433044,
-0.02282826602458954,
-0.03882146254181862,
-0.036995965987443924,
-0.03820623457431793,
0.05749482288956642,
-0.006125368643552065,
0.05878496170043945,
-0.05642949789762497,
0.007908610627055168,
-0.11467864364385605,
0.03453396260738373,
-0.04024786502122879,
0.030750205740332603,
-0.03956442326307297,
-0.05525112524628639,
-0.006128250155597925,
-0.015691721811890602,
-0.029033079743385315,
-0.04728897288441658,
0.04465125873684883,
-0.029816918075084686,
-0.04458588734269142,
0.00548678170889616,
-0.024924559518694878,
0.021743230521678925,
0.03375423327088356,
-0.04170669987797737,
-0.05855057016015053,
-0.04495236277580261,
-0.016766782850027084,
0.06484600156545639,
-0.008564538322389126,
-0.0899864211678505,
0.01957046240568161,
-0.04226888716220856,
-0.03831058368086815,
-0.02277478016912937,
-0.025721190497279167,
0.013517175801098347,
-0.03929256647825241,
-0.022750068455934525,
-0.1030094176530838,
0.07320210337638855,
0.015120015479624271,
0.057625435292720795,
0.049750398844480515,
-0.009431273676455021,
0.08917516469955444,
0.09421227872371674,
-0.018679238855838776,
0.018081003800034523,
-0.051878660917282104,
-0.010356354527175426,
-0.027616718783974648,
-0.057987090200185776,
0.020818909630179405,
-0.027737287804484367,
0.05818517878651619,
0.014876728877425194,
-0.012609869241714478,
-0.006045117508620024,
0.06489384919404984,
-0.04655752331018448,
0.019212836399674416,
0.011383108794689178,
0.07435503602027893,
0.04421592876315117,
0.09543365240097046,
0.021969569846987724,
-0.08443303406238556,
-0.00461028516292572,
0.06353841722011566,
0.04435039684176445,
-0.001082530478015542,
-0.04470110312104225,
-0.04487384855747223,
0.014331771992146969,
-0.031284596771001816,
0.06089065223932266,
-0.01837833970785141,
0.044675782322883606,
-0.01573551818728447,
-0.012406246736645699,
-0.06888500601053238,
0.03422548621892929,
0.013308688066899776,
-0.04272002354264259,
-0.02609267458319664,
-0.04947526752948761,
0.039904262870550156,
0.000008831568266032264,
-0.024691037833690643,
0.014015985652804375,
0.03201771527528763,
0.06285741180181503,
-0.020776648074388504,
-0.0343022495508194,
0.028211988508701324,
0.06843739002943039,
0.1172638013958931,
-0.055094800889492035,
0.008153838105499744,
0.0019261810230091214,
0.03713078424334526,
0.02390180341899395,
0.007929651997983456,
0.07245610654354095,
0.02806391753256321,
0.0904533639550209,
0.059127259999513626,
-0.005761061795055866,
-0.14051713049411774,
-0.014054719358682632,
-0.057829100638628006,
-0.002515279222279787,
-0.0018477191915735602,
-0.021117685362696648,
1.0941516111133237e-33,
0.03504486382007599,
-0.03712210804224014,
0.013307207264006138,
-0.037250179797410965,
0.08867576718330383,
-0.09917999804019928,
-0.0013374632690101862,
-0.05383653566241264,
-0.04547622799873352,
-0.029332630336284637,
-0.0914827212691307,
0.08416491001844406,
0.014934304170310497,
-0.03020283579826355,
-0.015295317396521568,
-0.00404859334230423,
-0.05934453010559082,
-0.0010245752055197954,
0.19994431734085083,
0.02930116467177868,
0.03536437451839447,
-0.084651879966259,
-0.0042450204491615295,
-0.009935162961483002,
-0.009416509419679642,
0.0222153402864933,
0.022809691727161407,
-0.07856428623199463,
-0.001985606737434864,
0.024045314639806747,
-0.013271048665046692,
-0.009443333372473717,
0.02338799275457859,
0.01682199537754059,
-0.12829521298408508,
0.008350496180355549,
-0.02578703500330448,
-0.009827537462115288,
-0.08655839413404465,
-0.002946848049759865,
0.023972099646925926,
-0.07484954595565796,
0.045876648277044296,
-0.05251716449856758,
0.006685266271233559,
-0.042169783264398575,
0.016188669949769974,
-0.01112825982272625,
0.11476748436689377,
0.05916133522987366,
-0.05111387372016907,
-0.08454394340515137,
0.020946990698575974,
-0.06463473290205002,
0.08326618373394012,
0.01897367648780346,
0.026465006172657013,
0.06072741374373436,
-0.025358179584145546,
-0.04619466885924339,
0.02858554758131504,
-0.007251720875501633,
-0.0015724559780210257,
0.031059907749295235,
0.029227646067738533,
0.09364958107471466,
-0.14194969832897186,
0.044626880437135696,
0.084297776222229,
-0.04327711462974548,
-0.12211880087852478,
0.051492467522621155,
-0.0026437207125127316,
0.02744124084711075,
-0.012753600254654884,
0.0006748617743141949,
-0.06397181004285812,
-0.023821761831641197,
-0.0687522441148758,
0.0708003118634224,
-0.03214646875858307,
-0.010766344144940376,
-0.038269877433776855,
0.10632549226284027,
-0.00223441980779171,
-0.05320723354816437,
-0.004743152763694525,
0.035830091685056686,
-0.026109840720891953,
0.09604566544294357,
0.01936502382159233,
-0.003653901629149914,
-0.05171829089522362,
0.12983942031860352,
-0.035324301570653915,
-2.5183783625176995e-33,
0.07795199006795883,
0.01819740980863571,
0.020379019901156425,
-0.014125097543001175,
0.01652246154844761,
0.017652887850999832,
0.024054326117038727,
-0.006782087497413158,
-0.011467566713690758,
-0.03523704409599304,
-0.041762690991163254,
-0.05692233517765999,
0.06697314977645874,
-0.03270678594708443,
-0.03911808133125305,
0.01818268559873104,
0.007717113476246595,
-0.015284477733075619,
-0.001013828325085342,
-0.0015417300164699554,
-0.05313148349523544,
0.053915608674287796,
-0.03645426034927368,
0.011402186006307602,
0.004301577806472778,
-0.010789209976792336,
0.07500894367694855,
0.0026218791026622057,
-0.054465509951114655,
-0.019040681421756744,
-0.030042175203561783,
-0.07416550815105438,
-0.008056641556322575,
0.020234916359186172,
0.03130454942584038,
0.030511517077684402,
-0.013959642499685287,
0.07771492004394531,
0.0028244946151971817,
0.0035624068696051836,
0.1185469850897789,
-0.04655209183692932,
-0.0800664871931076,
0.0009599225595593452,
-0.03602379187941551,
-0.002941644284874201,
0.0537017323076725,
-0.014116799458861351,
-0.12453608959913254,
-0.021831801161170006,
-0.0011455074418336153,
-0.029566364362835884,
-0.06860021501779556,
0.08231297880411148,
-0.031408168375492096,
0.10957666486501694,
0.08640913665294647,
0.04069928824901581,
-0.007121534552425146,
0.06997699290513992,
0.061871692538261414,
-0.15017399191856384,
0.027395077049732208,
0.08070981502532959,
0.03680938482284546,
-0.07068192958831787,
-0.030190424993634224,
0.06185879558324814,
0.05278141424059868,
0.06410311162471771,
-0.002148101106286049,
0.04433387145400047,
0.05210820212960243,
0.022561222314834595,
0.06366416066884995,
-0.04332955181598663,
0.018252719193696976,
0.03613504022359848,
-0.06508634984493256,
0.031295713037252426,
-0.03757319226861,
0.10221713036298752,
-0.06977058947086334,
0.012358447536826134,
0.04343128204345703,
0.07327578961849213,
0.07031974196434021,
0.06711144745349884,
0.03832358866930008,
0.05867772549390793,
-0.02207394503057003,
0.004544803872704506,
-0.010324347764253616,
0.07424144446849823,
-0.09417475759983063,
-5.042632977847461e-8,
0.05056367442011833,
0.03994935005903244,
-0.040706221014261246,
0.04669676721096039,
0.03782152384519577,
0.06785692274570465,
-0.002013865625485778,
-0.05235947668552399,
-0.08204423636198044,
0.01912100426852703,
-0.03302689269185066,
0.11083240807056427,
-0.0760430097579956,
0.022672273218631744,
-0.0009498128201812506,
-0.03584301844239235,
0.041813258081674576,
0.011867504566907883,
0.011476200073957443,
-0.04888446256518364,
-0.08631672710180283,
-0.08721686154603958,
-0.021350707858800888,
0.028846245259046555,
0.005139246582984924,
0.07359929382801056,
0.04127814993262291,
-0.02743087150156498,
0.030670203268527985,
0.0653771311044693,
-0.09465295076370239,
-0.025305353105068207,
-0.07668302953243256,
-0.0074519626796245575,
-0.06595829874277115,
0.0531315952539444,
-0.06771782040596008,
0.01768837310373783,
0.046639297157526016,
0.017935043200850487,
-0.001167252310551703,
0.025696484372019768,
-0.03207116574048996,
0.0020425838883966208,
0.07503564655780792,
0.06249906122684479,
-0.10234104096889496,
0.0334782749414444,
0.045652974396944046,
-0.05347829684615135,
-0.058563847094774246,
-0.024342212826013565,
-0.03194928169250488,
0.03989233449101448,
0.004842217080295086,
-0.022473705932497978,
-0.005936334375292063,
-0.05803639069199562,
-0.01480722427368164,
0.041967812925577164,
-0.017801061272621155,
0.055023565888404846,
0.00822883564978838,
-0.04785982519388199
] | 0.189702
|
This page shows how to specify extended resources for a Node. Extended resources allow cluster administrators to advertise node-level resources that would otherwise be unknown to Kubernetes. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Get the names of your Nodes ```shell kubectl get nodes ``` Choose one of your Nodes to use for this exercise. ## Advertise a new extended resource on one of your Nodes To advertise a new extended resource on a Node, send an HTTP PATCH request to the Kubernetes API server. For example, suppose one of your Nodes has four dongles attached. Here's an example of a PATCH request that advertises four dongle resources for your Node. ``` PATCH /api/v1/nodes//status HTTP/1.1 Accept: application/json Content-Type: application/json-patch+json Host: k8s-master:8080 [ { "op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4" } ] ``` Note that Kubernetes does not need to know what a dongle is or what a dongle is for. The preceding PATCH request tells Kubernetes that your Node has four things that you call dongles. Start a proxy, so that you can easily send requests to the Kubernetes API server: ```shell kubectl proxy ``` In another command window, send the HTTP PATCH request. Replace `` with the name of your Node: ```shell curl --header "Content-Type: application/json-patch+json" \ --request PATCH \ --data '[{"op": "add", "path": "/status/capacity/example.com~1dongle", "value": "4"}]' \ http://localhost:8001/api/v1/nodes//status ``` {{< note >}} In the preceding request, `~1` is the encoding for the character / in the patch path. The operation path value in JSON-Patch is interpreted as a JSON-Pointer. For more details, see [IETF RFC 6901](https://tools.ietf.org/html/rfc6901), section 3. {{< /note >}} The output shows that the Node has a capacity of 4 dongles: ``` "capacity": { "cpu": "2", "memory": "2049008Ki", "example.com/dongle": "4", ``` Describe your Node: ``` kubectl describe node ``` Once again, the output shows the dongle resource: ```yaml Capacity: cpu: 2 memory: 2049008Ki example.com/dongle: 4 ``` Now, application developers can create Pods that request a certain number of dongles. See [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/). ## Discussion Extended resources are similar to memory and CPU resources. For example, just as a Node has a certain amount of memory and CPU to be shared by all components running on the Node, it can have a certain number of dongles to be shared by all components running on the Node. And just as application developers can create Pods that request a certain amount of memory and CPU, they can create Pods that request a certain number of dongles. Extended resources are opaque to Kubernetes; Kubernetes does not know anything about what they are. Kubernetes knows only that a Node has a certain number of them. Extended resources must be advertised in integer amounts. For example, a Node can advertise four dongles, but not 4.5 dongles. ### Storage example Suppose a Node has 800 GiB of a special kind of disk storage. You could create a name for the special storage, say example.com/special-storage. Then you could advertise it in chunks of a certain size, say 100 GiB. In that case, your Node would advertise that it has eight resources of type example.com/special-storage. ```yaml Capacity: ... example.com/special-storage: 8 ``` If you want to allow arbitrary requests for special storage, you could advertise special storage in chunks of size 1 byte. In that case, you would advertise 800Gi resources of type example.com/special-storage. ```yaml Capacity: ... example.com/special-storage: 800Gi ``` Then a Container could request any number of bytes of special storage, up to 800Gi. ## Clean up Here is a PATCH request that removes the dongle advertisement from a Node. ``` PATCH /api/v1/nodes//status HTTP/1.1 Accept:
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/extended-resource-node.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/extended-resource-node.md
|
[
-0.026060964912176132,
0.042433127760887146,
0.06604042649269104,
0.03719605877995491,
0.0075471061281859875,
-0.00389226246625185,
-0.004902060609310865,
-0.03455876559019089,
-0.019361289218068123,
0.06733164191246033,
-0.04629860818386078,
-0.06308995932340622,
0.06432943791151047,
-0.025908175855875015,
0.09921735525131226,
0.010012521408498287,
0.0578140914440155,
0.02675343118607998,
0.007911098189651966,
-0.10705339163541794,
0.03332063928246498,
0.008117526769638062,
0.04639975354075432,
-0.0498851016163826,
-0.04275244474411011,
-0.040388502180576324,
-0.05409499630331993,
-0.05229255557060242,
0.0565447136759758,
0.014555232599377632,
-0.0012275895569473505,
0.009457063861191273,
-0.0430409237742424,
0.014663669280707836,
0.0479312427341938,
0.08097249269485474,
-0.03294873237609863,
-0.011173246428370476,
-0.047933317720890045,
0.06904055923223495,
0.08854367583990097,
0.032404523342847824,
-0.04274813458323479,
-0.05175117775797844,
-0.0008785899262875319,
-0.027689727023243904,
-0.059109706431627274,
-0.026768220588564873,
-0.01281291339546442,
-0.04058515280485153,
0.09987573325634003,
-0.13283319771289825,
0.056084562093019485,
0.023096682503819466,
0.013562728650867939,
-0.04685109853744507,
-0.055479373782873154,
0.06106644123792648,
0.08965320140123367,
0.07308066636323929,
0.06771513819694519,
-0.07614562660455704,
-0.01055218931287527,
-0.07458842545747757,
-0.03809623047709465,
0.017104564234614372,
-0.020205317065119743,
0.05273110046982765,
-0.04935435578227043,
-0.029570192098617554,
0.06481560319662094,
0.017362404614686966,
-0.04301193729043007,
-0.052542850375175476,
0.050083406269550323,
0.05597701668739319,
-0.02478719875216484,
0.08911784738302231,
-0.01898506097495556,
-0.08467897027730942,
-0.044711384922266006,
0.00045122214942239225,
0.03821955993771553,
-0.026392148807644844,
-0.04379941150546074,
0.020775185897946358,
-0.042008984833955765,
-0.013416022062301636,
0.07473379373550415,
0.015205375850200653,
0.01026897318661213,
-0.06974313408136368,
-0.07643196731805801,
-0.08274619281291962,
0.06832774728536606,
0.04143078625202179,
-0.05138136073946953,
-0.009388207457959652,
0.012309335172176361,
0.018464798107743263,
0.0017309744143858552,
-0.02851683273911476,
-0.001307760365307331,
0.015275065787136555,
0.06331203877925873,
-0.03612075746059418,
-0.1132601648569107,
0.06013491377234459,
0.018569091334939003,
0.06990395486354828,
-0.03096422739326954,
0.050178755074739456,
0.01472755428403616,
-0.03309515118598938,
-0.021132895722985268,
0.004595758393406868,
0.108455590903759,
-0.03188932687044144,
0.003207524074241519,
0.012036306783556938,
0.07962152361869812,
-0.09306246042251587,
0.03324489668011665,
-0.011625968851149082,
0.017086977139115334,
-0.05514572188258171,
-0.05453770235180855,
5.30276374978679e-33,
0.061276886612176895,
-0.0071716574020683765,
0.09652785956859589,
0.013518989086151123,
0.0463794469833374,
-0.08841138333082199,
0.0007812695694155991,
-0.04254446551203728,
-0.05454184114933014,
-0.08400500565767288,
-0.05477175489068031,
0.14071686565876007,
-0.009188316762447357,
0.00798018742352724,
-0.10429972410202026,
-0.03032858669757843,
-0.003258355427533388,
0.07614501565694809,
0.15156598389148712,
0.04022020846605301,
0.00831529125571251,
-0.07244329899549484,
-0.024938305839896202,
0.040743667632341385,
0.018773294985294342,
-0.007840268313884735,
0.02146603912115097,
-0.060373302549123764,
-0.0002305053494637832,
-0.0009696674533188343,
-0.007314478978514671,
-0.018288936465978622,
-0.001707772957161069,
-0.00942300260066986,
-0.15246178209781647,
-0.03460551053285599,
0.016310516744852066,
0.034593820571899414,
-0.09572044759988785,
-0.022790709510445595,
0.056897666305303574,
-0.009159646928310394,
0.023628102615475655,
-0.06245897710323334,
0.05574123561382294,
-0.03163301944732666,
0.03814373537898064,
-0.12031596899032593,
0.05794631689786911,
0.00025260046822950244,
0.03584591671824455,
-0.0530453622341156,
0.027548136189579964,
-0.09571649134159088,
0.059357497841119766,
0.010128739289939404,
0.0696590319275856,
-0.013493634760379791,
-0.0007805577479302883,
0.020184854045510292,
0.017852913588285446,
-0.05087703466415405,
-0.006409767083823681,
0.04133879393339157,
0.03480507433414459,
-0.019599277526140213,
-0.007599222473800182,
0.02708747237920761,
-0.014287713915109634,
-0.0072618089616298676,
-0.026300016790628433,
0.024890445172786713,
-0.010638073086738586,
0.04918324574828148,
-0.04825128987431526,
-0.06243668496608734,
0.004516869783401489,
0.0786421149969101,
-0.0805695503950119,
0.04532831907272339,
-0.020852599292993546,
-0.11337203532457352,
-0.022967960685491562,
0.05282590538263321,
-0.005215682554990053,
-0.04995814338326454,
-0.003667938057333231,
-0.0200742669403553,
0.010618671774864197,
-0.02236351929605007,
-0.012025468982756138,
0.0019036366138607264,
-0.09963511675596237,
-0.00013901563943363726,
-0.014675388112664223,
-5.4314745037300764e-33,
0.0992526039481163,
0.027463901787996292,
0.019975677132606506,
-0.023897631093859673,
0.058003537356853485,
0.01035372819751501,
0.002145812613889575,
0.05423193797469139,
-0.001479826751165092,
-0.035059861838817596,
-0.04545040801167488,
-0.07309074699878693,
0.011616135016083717,
0.004619691055268049,
-0.15056566894054413,
-0.004993773996829987,
-0.07050810754299164,
0.012998474761843681,
-0.00048634977429173887,
0.06219213828444481,
-0.072307288646698,
-0.0021014506928622723,
0.08842777460813522,
-0.01772928051650524,
0.0636906623840332,
-0.00841712299734354,
-0.009109033271670341,
0.03682433441281319,
-0.08339306712150574,
0.009884114377200603,
-0.033032335340976715,
-0.15249057114124298,
-0.006914476398378611,
0.010674054734408855,
0.06242189556360245,
-0.01743505150079727,
-0.012246372178196907,
0.10762950032949448,
0.03076387196779251,
-0.0162790659815073,
0.05540413409471512,
-0.04450898617506027,
-0.04581403732299805,
0.043512411415576935,
-0.018355293199419975,
-0.040925607085227966,
0.015899747610092163,
-0.06826584786176682,
-0.06752189248800278,
-0.08855495601892471,
0.016247974708676338,
-0.002405105624347925,
-0.02388112246990204,
0.06200037896633148,
-0.030588416382670403,
0.022859107702970505,
0.02592373825609684,
0.0735098123550415,
0.006219414062798023,
-0.025141121819615364,
0.07770639657974243,
-0.11420340836048126,
0.03819802403450012,
-0.0007090662256814539,
0.02474355325102806,
-0.07768575102090836,
0.0363527350127697,
-0.002445999998599291,
-0.05380311980843544,
0.007655581925064325,
-0.029378414154052734,
0.022792957723140717,
0.022601770237088203,
0.048440203070640564,
0.05978630855679512,
-0.019670940935611725,
0.029536111280322075,
-0.024534717202186584,
0.041044462472200394,
0.03802953660488129,
-0.12154281139373779,
0.003765545319765806,
-0.0831761360168457,
-0.006635917350649834,
0.056576311588287354,
0.07141732424497604,
0.0703517347574234,
0.10737039148807526,
0.04498086869716644,
0.03246920555830002,
-0.06495422124862671,
0.029835840687155724,
-0.029905473813414574,
0.08561496436595917,
-0.07400403916835785,
-5.714791484479065e-8,
0.015754161402583122,
0.047154780477285385,
-0.09235907346010208,
0.012810545042157173,
0.05422272905707359,
0.012718448415398598,
-0.04845159128308296,
0.013078906573355198,
-0.012847810052335262,
0.02528212033212185,
-0.01879301108419895,
0.0587364137172699,
0.044674426317214966,
0.029498016461730003,
0.04406196251511574,
-0.027906186878681183,
0.018138960003852844,
0.0213818047195673,
0.012267114594578743,
-0.008725197054445744,
-0.05205165594816208,
0.05028793588280678,
0.04222105070948601,
-0.028080731630325317,
0.06872601807117462,
0.07617035508155823,
0.02321326732635498,
0.002580946311354637,
-0.00827535055577755,
-0.0000885121917235665,
-0.01868346333503723,
-0.04852093383669853,
-0.08320196717977524,
0.07407429814338684,
-0.025532633066177368,
-0.011697502806782722,
-0.09826837480068207,
0.06052956357598305,
0.009792887605726719,
0.11358325928449631,
-0.0009594308794476092,
0.014720786362886429,
-0.069255031645298,
0.011417192406952381,
0.015762489289045334,
0.08950618654489517,
-0.052947837859392166,
0.042409710586071014,
-0.05814807489514351,
-0.00015009412891231477,
0.01074211485683918,
-0.0673481747508049,
0.015319861471652985,
0.03195798769593239,
-0.07645769417285919,
0.013633046299219131,
-0.02203289233148098,
0.012940114364027977,
0.018122036010026932,
0.008029565215110779,
-0.01650162972509861,
-0.01749507151544094,
-0.00019001557666342705,
0.050073523074388504
] | 0.108057
|
you would advertise 800Gi resources of type example.com/special-storage. ```yaml Capacity: ... example.com/special-storage: 800Gi ``` Then a Container could request any number of bytes of special storage, up to 800Gi. ## Clean up Here is a PATCH request that removes the dongle advertisement from a Node. ``` PATCH /api/v1/nodes//status HTTP/1.1 Accept: application/json Content-Type: application/json-patch+json Host: k8s-master:8080 [ { "op": "remove", "path": "/status/capacity/example.com~1dongle", } ] ``` Start a proxy, so that you can easily send requests to the Kubernetes API server: ```shell kubectl proxy ``` In another command window, send the HTTP PATCH request. Replace `` with the name of your Node: ```shell curl --header "Content-Type: application/json-patch+json" \ --request PATCH \ --data '[{"op": "remove", "path": "/status/capacity/example.com~1dongle"}]' \ http://localhost:8001/api/v1/nodes//status ``` Verify that the dongle advertisement has been removed: ``` kubectl describe node | grep dongle ``` (you should not see any output) ## {{% heading "whatsnext" %}} ### For application developers - [Assign Extended Resources to a Container](/docs/tasks/configure-pod-container/extended-resource/) - [Extended Resource allocation by DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource) ### For cluster administrators - [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) - [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) - [Extended Resource allocation by DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource)
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/extended-resource-node.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/extended-resource-node.md
|
[
-0.02377893030643463,
0.0971037968993187,
0.019917720928788185,
0.024133268743753433,
-0.03388394042849541,
-0.025756772607564926,
-0.012477470561861992,
0.013019758276641369,
0.016081811860203743,
0.10036438703536987,
-0.06065256521105766,
-0.02188844420015812,
0.030183129012584686,
-0.03522486239671707,
0.061265092343091965,
0.03165486082434654,
0.07143118977546692,
0.04999588802456856,
-0.03174807131290436,
-0.04568444937467575,
0.03773363679647446,
0.005269874818623066,
0.035106293857097626,
-0.05543443188071251,
-0.06577941030263901,
-0.032882362604141235,
-0.04138484224677086,
-0.01640622690320015,
0.034364476799964905,
-0.0324811153113842,
-0.037447381764650345,
0.029740171507000923,
-0.05758458748459816,
-0.01947552151978016,
0.07521770894527435,
0.06192292273044586,
-0.0370233878493309,
-0.059348415583372116,
-0.06565097719430923,
0.027375157922506332,
0.1269807666540146,
0.015379165299236774,
-0.049742426723241806,
-0.03900019824504852,
0.022699184715747833,
-0.0016845919890329242,
-0.048936787992715836,
0.033840835094451904,
0.028771355748176575,
-0.0710362046957016,
0.055658239871263504,
-0.08515961468219757,
0.011017348617315292,
0.05847881734371185,
0.024025840684771538,
-0.10468285530805588,
-0.03874586895108223,
0.08063514530658722,
0.07345468550920486,
0.12455034255981445,
0.03137743100523949,
-0.012565277516841888,
0.05460978299379349,
-0.05168524757027626,
-0.044217031449079514,
-0.005751245189458132,
-0.027013840153813362,
0.018285609781742096,
-0.06106666103005409,
0.03320574015378952,
0.05011604726314545,
0.04958055168390274,
-0.10166670382022858,
-0.017790749669075012,
0.018036676570773125,
0.00878678448498249,
-0.043188247829675674,
0.07143264263868332,
-0.02002791315317154,
-0.006758901756256819,
-0.003540621604770422,
-0.022933296859264374,
0.020996222272515297,
-0.01404235977679491,
-0.09889965504407883,
-0.0543748177587986,
-0.030139287933707237,
0.001837652875110507,
0.031109951436519623,
-0.03353417292237282,
-0.0014375409809872508,
0.037270478904247284,
0.0019783172756433487,
-0.04628550261259079,
0.03597366809844971,
0.06189520284533501,
-0.026638468727469444,
0.02688358537852764,
-0.04032082483172417,
0.018894551321864128,
0.05514603480696678,
0.04984735697507858,
-0.018151886761188507,
-0.004564967006444931,
0.031831905245780945,
-0.08573958277702332,
-0.05471492558717728,
0.059392064809799194,
0.026467034593224525,
0.07184890657663345,
-0.057019300758838654,
0.01151077076792717,
-0.03210414573550224,
-0.001405326183885336,
-0.03603674843907356,
0.0168377086520195,
0.048800814896821976,
0.007140421308577061,
0.029615260660648346,
-0.003144719172269106,
0.09046795964241028,
-0.07443588227033615,
-0.02647784724831581,
-0.0007212416967377067,
0.0016988958232104778,
0.00500888517126441,
0.03759052976965904,
2.5217856430961533e-33,
0.07233401387929916,
-0.008439705707132816,
0.06323657929897308,
0.01848348043859005,
0.04551669582724571,
-0.10010923445224762,
0.029065163806080818,
0.007947949692606926,
-0.013315962627530098,
-0.044658832252025604,
-0.08190382272005081,
0.05635424703359604,
-0.044116463512182236,
0.04991264268755913,
-0.027532871812582016,
-0.010148902423679829,
-0.019271481782197952,
0.015551025979220867,
0.10223051905632019,
0.01055640447884798,
0.07122121006250381,
-0.1265222430229187,
-0.016050977632403374,
0.016974620521068573,
0.01756862737238407,
-0.04488607123494148,
0.03593619912862778,
-0.08960619568824768,
0.019320448860526085,
-0.00646262988448143,
0.002596654463559389,
-0.008776846341788769,
-0.0065361554734408855,
-0.009012238122522831,
-0.07216325402259827,
-0.07531297951936722,
-0.03265030309557915,
0.025617284700274467,
-0.13847564160823822,
-0.036509089171886444,
0.03766806423664093,
-0.01217528898268938,
-0.06188536435365677,
-0.03822684288024902,
0.0033157668076455593,
-0.036390263587236404,
0.035608939826488495,
-0.15190866589546204,
0.042677346616983414,
0.021327480673789978,
0.06860097497701645,
-0.03762933239340782,
-0.02646285854279995,
-0.021031899377703667,
0.0520513691008091,
0.03384781256318092,
0.09449377655982971,
-0.04480088874697685,
-0.02455209754407406,
-0.0015718736685812473,
-0.030254604294896126,
-0.060076236724853516,
0.06027979776263237,
0.03562416881322861,
0.02725169248878956,
0.012893147766590118,
-0.005537813995033503,
0.025081191211938858,
-0.09587512165307999,
0.00984840840101242,
0.0072281816974282265,
0.04716276377439499,
0.00923646055161953,
-0.015782969072461128,
-0.08693274110555649,
-0.05877989903092384,
0.01988968253135681,
0.05905275419354439,
-0.10602351278066635,
0.04508316144347191,
0.057418692857027054,
-0.1380624622106552,
-0.006893394980579615,
0.05675903707742691,
0.010262907482683659,
-0.10023148357868195,
0.050397999584674835,
0.031974490731954575,
-0.010787754319608212,
0.015468552708625793,
-0.03202678635716438,
0.03333001211285591,
-0.0638449415564537,
-0.08924814313650131,
-0.09624377638101578,
-4.09350075234324e-33,
0.0321999192237854,
0.021943533793091774,
0.02132219262421131,
0.026576824486255646,
0.017671504989266396,
0.0015455735847353935,
0.028458895161747932,
0.13580146431922913,
0.014666450209915638,
-0.0022094009909778833,
-0.07583993673324585,
-0.05126412585377693,
0.0769079402089119,
-0.03216994181275368,
-0.14168135821819305,
-0.015082675032317638,
-0.07058821618556976,
-0.032262224704027176,
-0.027159297838807106,
0.07374215871095657,
-0.07738970220088959,
-0.008718573488295078,
0.12671929597854614,
0.025773290544748306,
-0.0049728211015462875,
-0.02687378227710724,
0.017957761883735657,
0.027886321768164635,
-0.12957943975925446,
0.0014461582759395242,
0.0004373611300252378,
-0.09844314306974411,
-0.02542327716946602,
0.03296634182333946,
0.027837609872221947,
-0.05903949961066246,
0.039396341890096664,
0.14567065238952637,
0.015165051445364952,
-0.024991018697619438,
0.012903410010039806,
-0.05277544632554054,
-0.053576353937387466,
0.01080838032066822,
-0.010540107265114784,
-0.08560086041688919,
-0.04317009821534157,
-0.08025287091732025,
-0.010394668206572533,
-0.07476195693016052,
0.023755917325615883,
0.04510718956589699,
-0.061964262276887894,
0.0910390168428421,
-0.01721421629190445,
0.029308395460247993,
-0.0037491116672754288,
0.05698371306061745,
0.013497631996870041,
-0.004463701043277979,
0.058487601578235626,
-0.10855831205844879,
0.003159729763865471,
0.011118009686470032,
0.014478960074484348,
-0.04145563393831253,
0.01093553937971592,
0.010029398836195469,
-0.048648569732904434,
0.03548086807131767,
0.037924930453300476,
0.018756313249468803,
0.03988607972860336,
0.08122510462999344,
0.006499701179563999,
-0.06257912516593933,
0.03359845280647278,
0.0012470975052565336,
0.08631041646003723,
0.07685869932174683,
-0.02961673215031624,
0.09521190822124481,
-0.03430121764540672,
-0.06346987187862396,
0.044844213873147964,
0.01382184773683548,
0.04361220449209213,
0.06278564780950546,
0.040488436818122864,
0.025257552042603493,
-0.06050379201769829,
0.03792000561952591,
-0.06251058727502823,
0.06128552183508873,
-0.03469027578830719,
-5.0101402138125195e-8,
0.0338977612555027,
-0.0003560474142432213,
-0.06478551030158997,
0.03830767422914505,
-0.015923641622066498,
-0.04759494215250015,
-0.027823029085993767,
0.045266494154930115,
-0.00835101492702961,
0.002946207532659173,
0.007455046288669109,
0.05413748323917389,
-0.0942801758646965,
0.04551587998867035,
0.009754366241395473,
-0.0580868236720562,
-0.01556799653917551,
0.006188425235450268,
0.026807760819792747,
-0.031122887507081032,
-0.03353917971253395,
0.04103381186723709,
0.029253948479890823,
-0.016337713226675987,
0.10111012309789658,
0.05268996208906174,
0.10399166494607925,
0.012196186929941177,
0.01614370569586754,
-0.06233679875731468,
-0.0033709146082401276,
-0.044562771916389465,
-0.06820223480463028,
0.04311886429786682,
-0.017522387206554413,
-0.01090500969439745,
-0.12309226393699646,
0.05316746607422829,
0.0062396833673119545,
0.05772949382662773,
-0.009881654754281044,
-0.012912716716527939,
-0.01997634954750538,
-0.02564200945198536,
0.02302911877632141,
0.03649124875664711,
-0.02453402802348137,
0.08151550590991974,
-0.04291333258152008,
0.04334021359682083,
0.0815206989645958,
-0.08254753053188324,
-0.006470277439802885,
0.027477364987134933,
-0.05568670481443405,
-0.02354457974433899,
-0.021231479942798615,
-0.020130353048443794,
-0.04676094651222229,
0.020624587312340736,
-0.000344166619470343,
0.031449008733034134,
0.034909214824438095,
0.046527665108442307
] | 0.070395
|
Kubernetes nodes can be scheduled to `Capacity`. Pods can consume all the available capacity on a node by default. This is an issue because nodes typically run quite a few system daemons that power the OS and Kubernetes itself. Unless resources are set aside for these system daemons, pods and system daemons compete for resources and lead to resource starvation issues on the node. The `kubelet` exposes a feature named 'Node Allocatable' that helps to reserve compute resources for system daemons. Kubernetes recommends cluster administrators to configure 'Node Allocatable' based on their workload density on each node. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You can configure below kubelet [configuration settings](/docs/reference/config-api/kubelet-config.v1beta1/) using the [kubelet configuration file](/docs/tasks/administer-cluster/kubelet-config-file/). ## Node Allocatable  'Allocatable' on a Kubernetes node is defined as the amount of compute resources that are available for pods. The scheduler does not over-subscribe 'Allocatable'. 'CPU', 'memory' and 'ephemeral-storage' are supported as of now. Node Allocatable is exposed as part of `v1.Node` object in the API and as part of `kubectl describe node` in the CLI. Resources can be reserved for two categories of system daemons in the `kubelet`. ### Enabling QoS and Pod level cgroups To properly enforce node allocatable constraints on the node, you must enable the new cgroup hierarchy via the `cgroupsPerQOS` setting. This setting is enabled by default. When enabled, the `kubelet` will parent all end-user pods under a cgroup hierarchy managed by the `kubelet`. ### Configuring a cgroup driver The `kubelet` supports manipulation of the cgroup hierarchy on the host using a cgroup driver. The driver is configured via the `cgroupDriver` setting. The supported values are the following: \* `cgroupfs` is the default driver that performs direct manipulation of the cgroup filesystem on the host in order to manage cgroup sandboxes. \* `systemd` is an alternative driver that manages cgroup sandboxes using transient slices for resources that are supported by that init system. Depending on the configuration of the associated container runtime, operators may have to choose a particular cgroup driver to ensure proper system behavior. For example, if operators use the `systemd` cgroup driver provided by the `containerd` runtime, the `kubelet` must be configured to use the `systemd` cgroup driver. ### Kube Reserved - \*\*KubeletConfiguration Setting\*\*: `kubeReserved: {}`. Example value `{cpu: 100m, memory: 100Mi, ephemeral-storage: 1Gi, pid=1000}` - \*\*KubeletConfiguration Setting\*\*: `kubeReservedCgroup: ""` `kubeReserved` is meant to capture resource reservation for kubernetes system daemons like the `kubelet`, `container runtime`, etc. It is not meant to reserve resources for system daemons that are run as pods. `kubeReserved` is typically a function of `pod density` on the nodes. In addition to `cpu`, `memory`, and `ephemeral-storage`, `pid` may be specified to reserve the specified number of process IDs for kubernetes system daemons. To optionally enforce `kubeReserved` on kubernetes system daemons, specify the parent control group for kube daemons as the value for `kubeReservedCgroup` setting, and [add `kube-reserved` to `enforceNodeAllocatable`](#enforcing-node-allocatable). It is recommended that the kubernetes system daemons are placed under a top level control group (`runtime.slice` on systemd machines for example). Each system daemon should ideally run within its own child control group. Refer to [the design proposal](https://git.k8s.io/design-proposals-archive/node/node-allocatable.md#recommended-cgroups-setup) for more details on recommended control group hierarchy. Note that Kubelet \*\*does not\*\* create `kubeReservedCgroup` if it doesn't exist. The kubelet will fail to start if an invalid cgroup is specified. With `systemd` cgroup driver, you should follow a specific pattern for the name of the cgroup you define: the name should be the value you set for `kubeReservedCgroup`, with `.slice` appended. ### System Reserved - \*\*KubeletConfiguration Setting\*\*: `systemReserved: {}`. Example value `{cpu: 100m, memory: 100Mi, ephemeral-storage: 1Gi,
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
[
0.05625496432185173,
0.01957990974187851,
0.01530461199581623,
0.043568577617406845,
-0.02374107949435711,
-0.0005097153480164707,
-0.05020895227789879,
-0.015688743442296982,
0.0637318342924118,
0.05978244170546532,
-0.0822245255112648,
-0.009731565602123737,
-0.002165831858292222,
-0.03536810353398323,
0.007824142463505268,
-0.019381025806069374,
0.06307244300842285,
-0.03914046287536621,
-0.009079753421247005,
-0.06897884607315063,
0.030083486810326576,
-0.008115679025650024,
0.012302063405513763,
0.010553809814155102,
-0.012079432606697083,
-0.01415308378636837,
-0.0641411691904068,
-0.08137187361717224,
0.015362345613539219,
-0.00962483137845993,
-0.04019271209836006,
-0.05237271264195442,
0.014465881511569023,
0.05872558057308197,
0.031527530401945114,
0.12402581423521042,
-0.027939042076468468,
-0.042721714824438095,
-0.05809738487005234,
0.07635293155908585,
0.016705874353647232,
0.02308039553463459,
-0.1099243089556694,
0.041939906775951385,
-0.005345731507986784,
0.029933646321296692,
-0.09513496607542038,
-0.07618207484483719,
0.005267870146781206,
-0.022032126784324646,
0.04575648903846741,
-0.08482791483402252,
0.11272317171096802,
0.01886429637670517,
0.08849979937076569,
0.07486376166343689,
0.023837635293602943,
-0.0029565789736807346,
0.08041936159133911,
0.024549545720219612,
-0.037775713950395584,
-0.04524067044258118,
0.037030674517154694,
-0.08463161438703537,
0.03563999757170677,
0.04897453635931015,
0.00020199584832880646,
0.0439312607049942,
-0.0006447421619668603,
0.011882031336426735,
0.1125171035528183,
0.02785850316286087,
-0.007101553492248058,
0.029788274317979813,
-0.009005856700241566,
-0.0006994209252297878,
-0.02245674841105938,
0.04521231725811958,
-0.02195967547595501,
-0.016191331669688225,
-0.029648950323462486,
0.05167342349886894,
0.04158429801464081,
-0.06538470834493637,
-0.07217564433813095,
-0.003065013326704502,
-0.05013155937194824,
-0.015725573524832726,
0.052434440702199936,
-0.017030883580446243,
0.032326772809028625,
0.013380825519561768,
-0.030806750059127808,
-0.09201354533433914,
0.017258232459425926,
0.020311469212174416,
-0.03285255655646324,
-0.03492381051182747,
0.017663244158029556,
-0.05313359573483467,
0.07720434665679932,
0.00730470847338438,
0.04979037120938301,
0.03368566557765007,
0.01994706131517887,
-0.06163699924945831,
-0.03261310234665871,
0.0433458536863327,
0.0018732261378318071,
0.021569188684225082,
0.02699897065758705,
0.03756231069564819,
0.001769484020769596,
0.0719929113984108,
0.014335204847157001,
0.039703018963336945,
0.06286142766475677,
-0.04414815455675125,
0.040282998234033585,
0.10721468180418015,
0.045541007071733475,
-0.0467253103852272,
-0.0007500607753172517,
-0.021713370457291603,
-0.024325748905539513,
-0.03479369357228279,
-0.05021228268742561,
5.065049037349768e-33,
0.020091906189918518,
-0.08445350080728531,
0.09066494554281235,
-0.0628146305680275,
-0.028750576078891754,
-0.11029601842164993,
-0.04529879614710808,
0.025089049711823463,
-0.05198458582162857,
-0.08308862894773483,
-0.05690774321556091,
0.07654482126235962,
-0.044087328016757965,
-0.0026203421875834465,
0.03358915448188782,
-0.04666167125105858,
0.006563557777553797,
0.05147936940193176,
0.11144299060106277,
-0.05566191300749779,
0.031340342015028,
-0.1041109561920166,
-0.054538581520318985,
0.03263720124959946,
0.01766839437186718,
-0.027257859706878662,
0.07622872292995453,
-0.018861282616853714,
-0.007512253243476152,
0.010672181844711304,
-0.038329772651195526,
0.026613006368279457,
-0.03651319816708565,
0.012029096484184265,
-0.16136281192302704,
0.014438232406973839,
-0.035158656537532806,
0.07381217181682587,
-0.03760823607444763,
-0.04106549173593521,
-0.0026441379450261593,
0.048352696001529694,
0.07036654651165009,
-0.06324499100446701,
-0.006627954542636871,
-0.02970806322991848,
0.06427452713251114,
-0.0824788510799408,
-0.020999491214752197,
0.07533097267150879,
-0.009280307218432426,
-0.0629911869764328,
0.006940573453903198,
-0.00045598132419399917,
0.017781587317585945,
0.05530591309070587,
0.11223195493221283,
-0.02191815711557865,
0.012541087344288826,
0.02043253742158413,
-0.02529197558760643,
-0.09557053446769714,
-0.004682422615587711,
0.043610695749521255,
0.056317444890737534,
0.0495443120598793,
-0.031735144555568695,
0.06331793963909149,
0.005247803404927254,
0.03301209956407547,
-0.06196361035108566,
-0.02302039973437786,
0.035765815526247025,
0.0036055375821888447,
-0.03171558678150177,
-0.04971685633063316,
-0.004569200798869133,
-0.0516229048371315,
-0.18716298043727875,
0.06044158339500427,
0.012243087403476238,
-0.05081895738840103,
-0.01551404595375061,
0.02812134474515915,
0.03268565982580185,
-0.0654199942946434,
0.013585559092462063,
0.044874317944049835,
-0.041698575019836426,
0.05389988794922829,
0.043870437890291214,
-0.01713438704609871,
-0.06755127012729645,
0.014284511096775532,
-0.1001792922616005,
-5.0728451362896125e-33,
0.09074998646974564,
0.01625944674015045,
-0.005061574280261993,
0.029331989586353302,
0.0952526107430458,
0.033986106514930725,
-0.08110320568084717,
0.03777759522199631,
-0.04641247168183327,
-0.050750732421875,
-0.09671103209257126,
-0.09872367978096008,
0.0094929663464427,
0.03793701156973839,
-0.11914803087711334,
-0.00786307267844677,
-0.046087171882390976,
0.03534305468201637,
0.028334401547908783,
0.0172649584710598,
-0.07132025808095932,
-0.02796200104057789,
0.06388691812753677,
-0.018632471561431885,
0.023543091490864754,
0.02017713524401188,
-0.021730370819568634,
0.056721169501543045,
-0.0512663833796978,
0.026927698403596878,
-0.007553343661129475,
-0.13906483352184296,
-0.023956015706062317,
0.02447216585278511,
0.04340048506855965,
-0.04290930926799774,
-0.062122758477926254,
0.11864840984344482,
0.005046210251748562,
0.06206657364964485,
0.09415179491043091,
-0.012891707941889763,
-0.03134126216173172,
-0.03876762464642525,
-0.025016216561198235,
0.020470263436436653,
0.014005075208842754,
-0.0787145271897316,
-0.03722967952489853,
-0.07994712144136429,
-0.023619845509529114,
-0.032311636954545975,
-0.012809967622160912,
0.09294551610946655,
-0.017022904008626938,
-0.012200484052300453,
0.031246265396475792,
0.0941542312502861,
0.026343081146478653,
-0.05555407702922821,
0.04819668456912041,
-0.05868611857295036,
0.016958236694335938,
0.002648336812853813,
-0.0009412367362529039,
-0.10383825749158859,
0.009220492094755173,
0.03670641779899597,
-0.010275333188474178,
0.057180482894182205,
-0.029420925304293633,
0.05267895385622978,
0.043607838451862335,
0.06693287938833237,
-0.06886709481477737,
0.0040889461524784565,
-0.03816310688853264,
-0.052011504769325256,
0.030063850805163383,
-0.003559509292244911,
-0.0712459459900856,
0.047276243567466736,
-0.05067826062440872,
-0.007128601893782616,
0.015732329338788986,
0.0694064050912857,
0.07360301911830902,
0.052796099334955215,
0.013883478008210659,
0.05983317270874977,
0.011613387614488602,
0.009229774586856365,
-0.03142227604985237,
0.08750148862600327,
-0.05339689552783966,
-5.1265221401308736e-8,
0.08634283393621445,
0.021540779620409012,
-0.0406453013420105,
0.04143749922513962,
0.0581875778734684,
-0.09722486138343811,
0.05898421257734299,
0.06887611746788025,
-0.010516428388655186,
0.08506783843040466,
0.028178751468658447,
0.02766406163573265,
-0.01159745641052723,
-0.0552399680018425,
0.04528336599469185,
0.0070471023209393024,
0.02886393666267395,
-0.010943193919956684,
0.010129068046808243,
-0.05609633028507233,
-0.020881803706288338,
-0.040240880101919174,
-0.012607377022504807,
0.019691381603479385,
0.028192590922117233,
0.025359515100717545,
0.06009046733379364,
0.03618355840444565,
0.000661039084661752,
0.003929258324205875,
-0.04692833498120308,
-0.02596389502286911,
-0.08407101035118103,
0.02400125190615654,
0.013518736697733402,
-0.0016917125321924686,
-0.17417563498020172,
0.004442528355866671,
0.04348248615860939,
0.058091334998607635,
-0.0021240036003291607,
-0.051762860268354416,
-0.03615522012114525,
0.016051819548010826,
0.005651258863508701,
0.08422710746526718,
-0.08459395915269852,
0.10569547116756439,
0.03141041845083237,
-0.017161885276436806,
0.0014354828745126724,
-0.05910361558198929,
-0.021373284980654716,
0.04958301782608032,
-0.007210893090814352,
0.04594799503684044,
0.03154854476451874,
-0.03863127529621124,
0.007003897801041603,
-0.0034525373484939337,
0.011439338326454163,
0.017697110772132874,
0.0015374987851828337,
-0.0037070659454911947
] | 0.130208
|
cgroup is specified. With `systemd` cgroup driver, you should follow a specific pattern for the name of the cgroup you define: the name should be the value you set for `kubeReservedCgroup`, with `.slice` appended. ### System Reserved - \*\*KubeletConfiguration Setting\*\*: `systemReserved: {}`. Example value `{cpu: 100m, memory: 100Mi, ephemeral-storage: 1Gi, pid=1000}` - \*\*KubeletConfiguration Setting\*\*: `systemReservedCgroup: ""` `systemReserved` is meant to capture resource reservation for OS system daemons like `sshd`, `udev`, etc. `systemReserved` should reserve `memory` for the `kernel` too since `kernel` memory is not accounted to pods in Kubernetes at this time. Reserving resources for user login sessions is also recommended (`user.slice` in systemd world). In addition to `cpu`, `memory`, and `ephemeral-storage`, `pid` may be specified to reserve the specified number of process IDs for OS system daemons. To optionally enforce `systemReserved` on system daemons, specify the parent control group for OS system daemons as the value for `systemReservedCgroup` setting, and [add `system-reserved` to `enforceNodeAllocatable`](#enforcing-node-allocatable). It is recommended that the OS system daemons are placed under a top level control group (`system.slice` on systemd machines for example). Note that `kubelet` \*\*does not\*\* create `systemReservedCgroup` if it doesn't exist. `kubelet` will fail if an invalid cgroup is specified. With `systemd` cgroup driver, you should follow a specific pattern for the name of the cgroup you define: the name should be the value you set for `systemReservedCgroup`, with `.slice` appended. ### Explicitly Reserved CPU List {{< feature-state for\_k8s\_version="v1.17" state="stable" >}} \*\*KubeletConfiguration Setting\*\*: `reservedSystemCPUs:`. Example value `0-3` `reservedSystemCPUs` is meant to define an explicit CPU set for OS system daemons and kubernetes system daemons. `reservedSystemCPUs` is for systems that do not intend to define separate top level cgroups for OS system daemons and kubernetes system daemons with regard to cpuset resource. If the Kubelet \*\*does not\*\* have `kubeReservedCgroup` and `systemReservedCgroup`, the explicit cpuset provided by `reservedSystemCPUs` will take precedence over the CPUs defined by `kubeReservedCgroup` and `systemReservedCgroup` options. This option is specifically designed for Telco/NFV use cases where uncontrolled interrupts/timers may impact the workload performance. you can use this option to define the explicit cpuset for the system/kubernetes daemons as well as the interrupts/timers, so the rest CPUs on the system can be used exclusively for workloads, with less impact from uncontrolled interrupts/timers. To move the system daemon, kubernetes daemons and interrupts/timers to the explicit cpuset defined by this option, other mechanism outside Kubernetes should be used. For example: in Centos, you can do this using the tuned toolset. ### Eviction Thresholds \*\*KubeletConfiguration Setting\*\*: `evictionHard: {memory.available: "100Mi", nodefs.available: "10%", nodefs.inodesFree: "5%", imagefs.available: "15%"}`. Example value: `{memory.available: "<500Mi"}` Memory pressure at the node level leads to System OOMs which affects the entire node and all pods running on it. Nodes can go offline temporarily until memory has been reclaimed. To avoid (or reduce the probability of) system OOMs kubelet provides [out of resource](/docs/concepts/scheduling-eviction/node-pressure-eviction/) management. Evictions are supported for `memory` and `ephemeral-storage` only. By reserving some memory via `evictionHard` setting, the `kubelet` attempts to evict pods whenever memory availability on the node drops below the reserved value. Hypothetically, if system daemons did not exist on a node, pods cannot use more than `capacity - eviction-hard`. For this reason, resources reserved for evictions are not available for pods. ### Enforcing Node Allocatable \*\*KubeletConfiguration setting\*\*: `enforceNodeAllocatable: [pods]`. Example value: `[pods,system-reserved,kube-reserved]` The scheduler treats 'Allocatable' as the available `capacity` for pods. `kubelet` enforce 'Allocatable' across pods by default. Enforcement is performed by evicting pods whenever the overall usage across all pods exceeds 'Allocatable'. More details on eviction policy can be found on the [node pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/) page. This enforcement is controlled by specifying `pods` value to the KubeletConfiguration
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
[
0.0009175231098197401,
0.012694241479039192,
-0.04146772623062134,
-0.017086796462535858,
-0.07355129718780518,
0.028979146853089333,
0.035895347595214844,
0.06154990941286087,
0.04232616722583771,
0.006793726235628128,
0.004986824467778206,
-0.1147303432226181,
-0.02231922373175621,
-0.03682231903076172,
0.00547070661559701,
-0.08006459474563599,
0.046863481402397156,
0.01674356684088707,
-0.0580131821334362,
-0.06610370427370071,
0.027474436908960342,
-0.013677597045898438,
-0.0003589477564673871,
0.06099976599216461,
0.008711345493793488,
-0.08298074454069138,
-0.010657544247806072,
-0.06175187975168228,
0.052285414189100266,
-0.02268953248858452,
-0.004542970564216375,
0.014667751267552376,
0.04848209396004677,
0.017850568518042564,
0.07365404069423676,
0.14319586753845215,
0.054787568747997284,
-0.08636640757322311,
-0.11734922230243683,
-0.002393876202404499,
-0.007985410280525684,
0.015655791386961937,
-0.09320268779993057,
0.02315494418144226,
-0.00003355127773829736,
0.04890098050236702,
-0.05075458809733391,
-0.03056720457971096,
-0.02072186954319477,
0.005906431470066309,
0.08165133744478226,
-0.013568717986345291,
0.07089091092348099,
0.056089647114276886,
0.04000246152281761,
0.031716179102659225,
-0.0074384091421961784,
0.03986531123518944,
0.09290497750043869,
-0.02762424759566784,
-0.010797628201544285,
-0.0665799230337143,
0.03956911340355873,
-0.0191835667937994,
-0.03537999093532562,
-0.03687571734189987,
0.039461396634578705,
-0.012252246960997581,
0.0038295735139399767,
-0.052846603095531464,
0.0431649424135685,
-0.005529073998332024,
0.026810986921191216,
-0.015520326793193817,
-0.01990584470331669,
-0.011267615482211113,
0.007438110187649727,
-0.004437905270606279,
-0.019697129726409912,
-0.0956919938325882,
0.0217265821993351,
0.07454798370599747,
-0.024360867217183113,
-0.055932700634002686,
-0.05490067973732948,
-0.023994656279683113,
-0.03559228777885437,
-0.031517740339040756,
-0.0019267629832029343,
-0.0005877101793885231,
0.03829585388302803,
0.01862887665629387,
0.009996072389185429,
-0.11688994616270065,
0.059108179062604904,
-0.008179929107427597,
0.0170477032661438,
0.03035045601427555,
0.03834812343120575,
-0.02756476029753685,
0.019254563376307487,
0.07658590376377106,
0.028144776821136475,
0.06939823925495148,
0.008893681690096855,
-0.09389860928058624,
-0.03882969915866852,
0.023784160614013672,
-0.04529493302106857,
-0.015657344833016396,
0.03720776364207268,
0.09117846935987473,
-0.04701072722673416,
0.0683756172657013,
0.0701339989900589,
-0.040161482989788055,
0.04411984235048294,
-0.06005825474858284,
0.06589169800281525,
0.030713684856891632,
0.03669203072786331,
-0.04427119344472885,
0.03028373047709465,
0.04222631826996803,
-0.00002634341399243567,
0.04376146197319031,
0.022469401359558105,
2.249780291077707e-33,
0.008822633884847164,
-0.08816869556903839,
0.03249400481581688,
-0.0239725224673748,
-0.004263856448233128,
-0.08938432484865189,
-0.07726576179265976,
0.0019646757282316685,
-0.07913942635059357,
-0.07387571781873703,
-0.11920718103647232,
0.007300899364054203,
0.017239203676581383,
0.0013855523429811,
0.00952869188040495,
-0.009438385255634785,
-0.060064297169446945,
0.015344158746302128,
0.13400541245937347,
-0.022958023473620415,
0.01750113256275654,
0.054615456610918045,
-0.026781614869832993,
-0.0032758547458797693,
-0.00878143310546875,
-0.055991631001234055,
-0.025734279304742813,
-0.052618056535720825,
0.00453556701540947,
0.009341621771454811,
0.0016269529005512595,
0.03474965691566467,
-0.02907881699502468,
0.021111376583576202,
-0.08525120466947556,
0.054279524832963943,
0.023860078305006027,
0.06205303221940994,
-0.09384585916996002,
-0.03813797980546951,
0.0346866101026535,
0.006306139752268791,
0.022534292191267014,
-0.10934075713157654,
0.031577397137880325,
-0.10405857861042023,
0.0038297211285680532,
-0.05726638063788414,
0.01961686462163925,
0.0868929997086525,
-0.03952053189277649,
-0.004359710495918989,
0.02800954505801201,
-0.031658731400966644,
0.03191795200109482,
-0.02255507931113243,
0.08553487807512283,
-0.033985283225774765,
-0.02696332335472107,
0.022264743223786354,
-0.02838161773979664,
0.0014558769762516022,
0.03073224052786827,
0.04324202239513397,
0.025446854531764984,
-0.016087520867586136,
0.03806594759225845,
0.04072187468409538,
-0.06596407294273376,
-0.003052773419767618,
-0.059653233736753464,
-0.044186629354953766,
0.018801959231495857,
0.11344330757856369,
-0.013903222978115082,
-0.033886607736349106,
0.04877449944615364,
0.03667845204472542,
-0.2238970249891281,
0.007272293791174889,
0.05544747784733772,
-0.01621926575899124,
-0.0539102777838707,
-0.009517270140349865,
-0.034866586327552795,
-0.011118589900434017,
0.0051324632950127125,
0.014518522657454014,
-0.07251343131065369,
0.012307101860642433,
-0.036914125084877014,
-0.057971369475126266,
0.037502191960811615,
0.10391160100698471,
-0.14331714808940887,
-5.3591397241682577e-33,
0.090826615691185,
0.028177309781312943,
0.03400540351867676,
-0.05588831007480621,
0.051764097064733505,
0.05593102425336838,
0.029075751081109047,
0.015912862494587898,
-0.08547643572092056,
-0.0825796127319336,
-0.037733979523181915,
-0.024419564753770828,
0.021194003522396088,
0.07616184651851654,
-0.08554986864328384,
0.07405545562505722,
-0.061023056507110596,
-0.04999250918626785,
-0.02560085617005825,
0.014523571357131004,
-0.08934323489665985,
0.03236312046647072,
0.08188077062368393,
0.072349913418293,
0.02049846760928631,
0.05432252213358879,
-0.021195242181420326,
0.013876277022063732,
-0.034028034657239914,
-0.010315559804439545,
0.056852370500564575,
-0.10770784318447113,
-0.0945870578289032,
0.05601857230067253,
-0.007213444449007511,
-0.06103223189711571,
-0.026247519999742508,
0.06710213422775269,
-0.047027185559272766,
0.05748981237411499,
0.038117602467536926,
0.029288996011018753,
-0.06487194448709488,
0.01607842743396759,
0.004770784173160791,
0.0555683895945549,
0.0828774943947792,
-0.069368876516819,
-0.03625647723674774,
-0.03337414562702179,
-0.0029689266812056303,
-0.003786207642406225,
0.03211008757352829,
0.10231001675128937,
-0.026853300631046295,
0.0446605421602726,
0.046810995787382126,
-0.012545430101454258,
0.006935330107808113,
-0.06856669485569,
0.03693809360265732,
-0.10985041409730911,
0.0008563918527215719,
-0.0066613368690013885,
-0.02661486156284809,
-0.10312442481517792,
-0.014391799457371235,
0.024204814806580544,
-0.005458887666463852,
-0.004721101839095354,
-0.005900917574763298,
-0.029538512229919434,
0.029967142269015312,
0.04751836881041527,
-0.0775124728679657,
-0.016772111877799034,
0.008956936188042164,
-0.010645161382853985,
0.06667172163724899,
0.048940084874629974,
-0.04089830443263054,
-0.004429923836141825,
-0.03888872265815735,
0.026135418564081192,
-0.027915190905332565,
-0.021233312785625458,
0.06308590620756149,
0.04922988638281822,
0.0072631328366696835,
-0.007414194289594889,
-0.04743539169430733,
0.031701017171144485,
0.006667558569461107,
0.08622715622186661,
0.005278446711599827,
-4.7498399879941644e-8,
0.11817505210638046,
-0.014476568438112736,
-0.02967362105846405,
0.06932712346315384,
0.021834488958120346,
-0.10663079470396042,
-0.005922221578657627,
-0.019737347960472107,
-0.05195929482579231,
-0.01762348785996437,
-0.059823065996170044,
0.06815111637115479,
-0.03268428146839142,
0.0005369142163544893,
0.014025522395968437,
-0.023386258631944656,
-0.05730738863348961,
0.048252563923597336,
0.023527123034000397,
-0.029208669438958168,
-0.0132651561871171,
-0.091328926384449,
-0.020773617550730705,
-0.06881606578826904,
0.008140875957906246,
0.0851663276553154,
0.0822724774479866,
0.06371438503265381,
-0.014778737910091877,
0.03681599721312523,
-0.01069809403270483,
0.009445089846849442,
-0.08011376112699509,
0.08246853947639465,
0.02583441697061062,
-0.007066507823765278,
-0.07663679867982864,
0.06311522424221039,
0.05444975942373276,
0.04561242461204529,
-0.03537452965974808,
0.0008718784083612263,
-0.03062712401151657,
0.022644929587841034,
0.008416295982897282,
0.06277215480804443,
-0.0774969682097435,
0.112403005361557,
0.01924760639667511,
0.008905445225536823,
-0.0062467376701533794,
-0.020694859325885773,
-0.025959229096770287,
0.09123261272907257,
0.0021434875670820475,
-0.011194168590009212,
-0.022975744679570198,
-0.042814433574676514,
0.06706185638904572,
-0.017299259081482887,
-0.01978323422372341,
0.0367971695959568,
-0.06711655855178833,
-0.03630541265010834
] | 0.137096
|
`capacity` for pods. `kubelet` enforce 'Allocatable' across pods by default. Enforcement is performed by evicting pods whenever the overall usage across all pods exceeds 'Allocatable'. More details on eviction policy can be found on the [node pressure eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/) page. This enforcement is controlled by specifying `pods` value to the KubeletConfiguration setting `enforceNodeAllocatable`. Optionally, `kubelet` can be made to enforce `kubeReserved` and `systemReserved` by specifying `kube-reserved` & `system-reserved` values in the same setting. Note that to enforce `kubeReserved` or `systemReserved`, `kubeReservedCgroup` or `systemReservedCgroup` needs to be specified respectively. ## General Guidelines System daemons are expected to be treated similar to [Guaranteed pods](/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-guaranteed). System daemons can burst within their bounding control groups and this behavior needs to be managed as part of kubernetes deployments. For example, `kubelet` should have its own control group and share `kubeReserved` resources with the container runtime. However, Kubelet cannot burst and use up all available Node resources if `kubeReserved` is enforced. Be extra careful while enforcing `systemReserved` reservation since it can lead to critical system services being CPU starved, OOM killed, or unable to fork on the node. The recommendation is to enforce `systemReserved` only if a user has profiled their nodes exhaustively to come up with precise estimates and is confident in their ability to recover if any process in that group is oom-killed. \* To begin with enforce 'Allocatable' on `pods`. \* Once adequate monitoring and alerting is in place to track kube system daemons, attempt to enforce `kubeReserved` based on usage heuristics. \* If absolutely necessary, enforce `systemReserved` over time. The resource requirements of kube system daemons may grow over time as more and more features are added. Over time, kubernetes project will attempt to bring down utilization of node system daemons, but that is not a priority as of now. So expect a drop in `Allocatable` capacity in future releases. ## Example Scenario Here is an example to illustrate Node Allocatable computation: \* Node has `32Gi` of `memory`, `16 CPUs` and `100Gi` of `Storage` \* `kubeReserved` is set to `{cpu: 1000m, memory: 2Gi, ephemeral-storage: 1Gi}` \* `systemReserved` is set to `{cpu: 500m, memory: 1Gi, ephemeral-storage: 1Gi}` \* `evictionHard` is set to `{memory.available: "<500Mi", nodefs.available: "<10%"}` Under this scenario, 'Allocatable' will be 14.5 CPUs, 28.5Gi of memory and `88Gi` of local storage. Scheduler ensures that the total memory `requests` across all pods on this node does not exceed 28.5Gi and storage doesn't exceed 88Gi. Kubelet evicts pods whenever the overall memory usage across pods exceeds 28.5Gi, or if overall disk usage exceeds 88Gi. If all processes on the node consume as much CPU as they can, pods together cannot consume more than 14.5 CPUs. If `kubeReserved` and/or `systemReserved` is not enforced and system daemons exceed their reservation, `kubelet` evicts pods whenever the overall node memory usage is higher than 31.5Gi or `storage` is greater than 90Gi.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/reserve-compute-resources.md
|
[
-0.015385116450488567,
-0.00542457727715373,
0.0226211529225111,
0.011338992044329643,
-0.041019052267074585,
-0.010931016877293587,
-0.012528425082564354,
-0.021884098649024963,
0.03521325811743736,
0.03933167830109596,
-0.008202789351344109,
-0.04518571123480797,
0.030291248112916946,
-0.04832589253783226,
0.011109577491879463,
-0.04997912049293518,
0.08074736595153809,
0.020619522780179977,
-0.04542984813451767,
-0.02156369388103485,
0.04471081122756004,
-0.015019717626273632,
0.009313585236668587,
0.021154625341296196,
-0.031351517885923386,
-0.04080578684806824,
-0.069023996591568,
-0.021729137748479843,
0.05796206742525101,
-0.07409284263849258,
-0.05840735882520676,
-0.0247055497020483,
0.04314766451716423,
0.0031739831902086735,
0.0878891870379448,
0.07755765318870544,
-0.022981641814112663,
-0.0984649658203125,
-0.09390019625425339,
0.023278716951608658,
0.0016123849200084805,
-0.0058443681336939335,
-0.11354489624500275,
0.03180788829922676,
-0.023602083325386047,
-0.0009672789019532502,
-0.031673189252614975,
-0.04163086786866188,
-0.060994457453489304,
-0.03278963640332222,
0.07247287780046463,
-0.04655616730451584,
0.08753502368927002,
0.07537771016359329,
0.08559968322515488,
0.023022307083010674,
0.01060539297759533,
0.027409933507442474,
0.098434679210186,
0.00727044465020299,
0.008510383777320385,
-0.023942166939377785,
0.031652238219976425,
-0.01908962056040764,
-0.01002519205212593,
0.03410466015338898,
-0.010147725231945515,
0.04032836854457855,
-0.00968554150313139,
0.036640480160713196,
0.07752193510532379,
-0.0006326420116238296,
-0.0012950280215591192,
0.0015147215453907847,
-0.007751989644020796,
0.014606560580432415,
-0.03164641186594963,
0.02455897070467472,
-0.018928375095129013,
-0.039100006222724915,
-0.022513896226882935,
0.010391212068498135,
0.03877260535955429,
-0.08636020869016647,
-0.08604821562767029,
-0.04294048249721527,
-0.033225078135728836,
-0.01915007084608078,
0.05729595571756363,
0.03025534376502037,
0.05599811673164368,
0.008210116997361183,
0.03456408530473709,
-0.09073106944561005,
0.058438315987586975,
-0.04424749314785004,
0.014834491536021233,
-0.026993917301297188,
0.033921994268894196,
-0.023281628265976906,
0.03197119012475014,
-0.000031584841053700075,
-0.048977673053741455,
0.0540793314576149,
0.11362385749816895,
-0.0693783313035965,
-0.05440815910696983,
-0.0453701913356781,
-0.0018764936830848455,
0.06459084898233414,
0.010981534607708454,
0.04893975332379341,
0.01825775019824505,
0.038175392895936966,
-0.021454868838191032,
0.033187635242938995,
-0.010995479300618172,
-0.04221692681312561,
0.02835693210363388,
0.00628785090520978,
0.022245993837714195,
-0.026103638112545013,
0.026195520535111427,
-0.0032246040645986795,
-0.030206967145204544,
0.02228778600692749,
0.026167774572968483,
3.0710860717117463e-33,
0.013476102612912655,
-0.12090475857257843,
0.018282374367117882,
-0.0657409280538559,
-0.004239153116941452,
-0.06543481349945068,
-0.05904028192162514,
0.04474155604839325,
-0.026542363688349724,
-0.08073072135448456,
-0.06465445458889008,
0.02139560505747795,
-0.059383001178503036,
-0.033683277666568756,
0.05251108109951019,
-0.004844325128942728,
-0.0817432552576065,
0.07217090576887131,
0.10095912218093872,
-0.012711460702121258,
0.05245693773031235,
-0.046613991260528564,
-0.05090058594942093,
0.024097811430692673,
-0.014608828350901604,
-0.051107008010149,
0.057218775153160095,
-0.07892492413520813,
-0.002829120261594653,
0.03437226265668869,
0.00036095839459449053,
0.06674448400735855,
0.050065550953149796,
0.043236758559942245,
-0.1506216675043106,
0.040876735001802444,
-0.04894872009754181,
0.06415616720914841,
-0.0836091861128807,
-0.056495584547519684,
0.035281069576740265,
0.026098305359482765,
0.005848878063261509,
-0.07918908447027206,
0.06064588576555252,
-0.08426542580127716,
0.05097441002726555,
-0.08923045545816422,
0.003525890177115798,
0.061481986194849014,
0.007768783252686262,
-0.01720288209617138,
-0.006009999196976423,
-0.01869817078113556,
0.00013823152403347194,
-0.011237462982535362,
0.08292808383703232,
-0.022900287061929703,
-0.02661336585879326,
0.030574537813663483,
-0.02953309565782547,
-0.04873914644122124,
0.057387739419937134,
-0.015539275482296944,
0.05354371294379234,
0.09167319536209106,
-0.027642957866191864,
0.005619523115456104,
-0.019422497600317,
0.010635743848979473,
-0.06129562854766846,
-0.03925660625100136,
-0.039866477251052856,
0.06711070984601974,
-0.08973747491836548,
-0.06980036944150925,
0.017755620181560516,
-0.009071446023881435,
-0.17761288583278656,
0.010308287106454372,
0.025839686393737793,
-0.02961532585322857,
-0.017439130693674088,
0.031555935740470886,
-0.0009339090902358294,
-0.06941568106412888,
0.013218141160905361,
0.06616348773241043,
-0.07119805365800858,
0.004526268690824509,
0.026826057583093643,
-0.02231062762439251,
-0.004005467519164085,
0.026760252192616463,
-0.07178179174661636,
-4.854088208995477e-33,
0.08152826875448227,
0.02470366284251213,
-0.032636791467666626,
0.052431557327508926,
0.013321452774107456,
0.03711952269077301,
-0.08885227143764496,
0.045822035521268845,
-0.005655498243868351,
-0.02469695173203945,
-0.1021326407790184,
-0.057274721562862396,
0.07922162860631943,
0.056281428784132004,
-0.14918990433216095,
0.0028663191478699446,
-0.09402966499328613,
-0.06033511087298393,
-0.025744708254933357,
0.041340675204992294,
-0.04191801697015762,
-0.013683789409697056,
0.05742369964718819,
0.08427542448043823,
0.04288501664996147,
0.030072463676333427,
-0.03491736203432083,
0.05796385183930397,
-0.06263163685798645,
-0.05593981221318245,
0.0007707842160016298,
-0.13551703095436096,
-0.05566781759262085,
0.03128085285425186,
0.03222106024622917,
-0.10889878869056702,
-0.028116658329963684,
0.12138845771551132,
-0.027227437123656273,
0.06425216048955917,
0.06549741327762604,
-0.005948289763182402,
-0.09234816581010818,
-0.008144105784595013,
-0.025632955133914948,
0.0436202771961689,
0.032590195536613464,
-0.10765879601240158,
0.006461989600211382,
-0.08003952354192734,
-0.001779333921149373,
-0.012709884904325008,
0.000035664015740621835,
0.16636723279953003,
-0.010990438051521778,
-0.008751236833631992,
0.034255750477313995,
0.06477955728769302,
0.005154401995241642,
0.0005518384859897196,
0.066000796854496,
-0.050756245851516724,
0.05502760782837868,
-0.006051205564290285,
0.006777032744139433,
-0.06985287368297577,
0.017082415521144867,
-0.019462190568447113,
0.010348946787416935,
0.006622217129915953,
0.061764515936374664,
0.03299988433718681,
0.02448141947388649,
0.06578980386257172,
-0.0119386687874794,
-0.013266554102301598,
0.0037563713267445564,
-0.060710325837135315,
0.04394037649035454,
-0.00898753758519888,
-0.07515374571084976,
0.07369272410869598,
-0.004284854978322983,
0.03608279302716255,
-0.015682343393564224,
0.05674333870410919,
0.09590271860361099,
0.00982389971613884,
0.0559452585875988,
0.10108745098114014,
-0.0198453851044178,
0.013117964379489422,
-0.05745114013552666,
0.015110489912331104,
-0.052994709461927414,
-4.7998735652754476e-8,
0.08063837885856628,
-0.0007579869125038385,
-0.02598019503057003,
0.09648222476243973,
0.028607051819562912,
-0.10247936844825745,
0.0555504709482193,
0.02366156131029129,
-0.02925785444676876,
0.008047497831285,
0.015792474150657654,
0.07007717341184616,
-0.006789836101233959,
-0.062341976910829544,
0.057949114590883255,
-0.044732555747032166,
0.024727988988161087,
0.04905544966459274,
-0.024384023621678352,
-0.03414864465594292,
-0.03925304114818573,
-0.05779692530632019,
0.014236162416636944,
-0.03882269561290741,
0.025217330083251,
0.06031472608447075,
0.08440032601356506,
0.024909891188144684,
0.09315642714500427,
0.04312411695718765,
-0.028018157929182053,
-0.029817193746566772,
-0.03135179728269577,
-0.010631981305778027,
-0.05356833338737488,
0.039020974189043045,
-0.16487662494182587,
0.008750482462346554,
0.04827827215194702,
0.06502161920070648,
-0.010740398429334164,
-0.022263117134571075,
-0.045677199959754944,
-0.008950178511440754,
-0.000512078229803592,
0.0707700103521347,
-0.06795055419206619,
0.07981248199939728,
-0.0019353422103449702,
0.018174342811107635,
-0.006239903159439564,
-0.04146953299641609,
-0.0022124345414340496,
0.08135019987821579,
-0.004463729914277792,
-0.003194448072463274,
0.009888876229524612,
-0.02606138400733471,
0.04876955598592758,
0.0034689411986619234,
-0.003130651079118252,
0.004371302668005228,
0.007437852676957846,
-0.006072638556361198
] | 0.151332
|
This page describes the CoreDNS upgrade process and how to install CoreDNS instead of kube-dns. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## About CoreDNS [CoreDNS](https://coredns.io) is a flexible, extensible DNS server that can serve as the Kubernetes cluster DNS. Like Kubernetes, the CoreDNS project is hosted by the {{< glossary\_tooltip text="CNCF" term\_id="cncf" >}}. You can use CoreDNS instead of kube-dns in your cluster by replacing kube-dns in an existing deployment, or by using tools like kubeadm that will deploy and upgrade the cluster for you. ## Installing CoreDNS For manual deployment or replacement of kube-dns, see the documentation at the [CoreDNS website](https://coredns.io/manual/installation/). ## Migrating to CoreDNS ### Upgrading an existing cluster with kubeadm In Kubernetes version 1.21, kubeadm removed its support for `kube-dns` as a DNS application. For `kubeadm` v{{< skew currentVersion >}}, the only supported cluster DNS application is CoreDNS. You can move to CoreDNS when you use `kubeadm` to upgrade a cluster that is using `kube-dns`. In this case, `kubeadm` generates the CoreDNS configuration ("Corefile") based upon the `kube-dns` ConfigMap, preserving configurations for stub domains, and upstream name server. ## Upgrading CoreDNS You can check the version of CoreDNS that kubeadm installs for each version of Kubernetes in the page [CoreDNS version in Kubernetes](https://github.com/coredns/deployment/blob/master/kubernetes/CoreDNS-k8s\_version.md). CoreDNS can be upgraded manually in case you want to only upgrade CoreDNS or use your own custom image. There is a helpful [guideline and walkthrough](https://github.com/coredns/deployment/blob/master/kubernetes/Upgrading\_CoreDNS.md) available to ensure a smooth upgrade. Make sure the existing CoreDNS configuration ("Corefile") is retained when upgrading your cluster. If you are upgrading your cluster using the `kubeadm` tool, `kubeadm` can take care of retaining the existing CoreDNS configuration automatically. ## Tuning CoreDNS When resource utilisation is a concern, it may be useful to tune the configuration of CoreDNS. For more details, check out the [documentation on scaling CoreDNS](https://github.com/coredns/deployment/blob/master/kubernetes/Scaling\_CoreDNS.md). ## {{% heading "whatsnext" %}} You can configure [CoreDNS](https://coredns.io) to support many more use cases than kube-dns does by modifying the CoreDNS configuration ("Corefile"). For more information, see the [documentation](https://coredns.io/plugins/kubernetes/) for the `kubernetes` CoreDNS plugin, or read the [Custom DNS Entries for Kubernetes](https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/). in the CoreDNS blog.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/coredns.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/coredns.md
|
[
-0.06017486751079559,
-0.08634030818939209,
0.05818427726626396,
-0.0777784213423729,
-0.10015828162431717,
0.012550505809485912,
-0.0797208920121193,
-0.02503196708858013,
0.03556455299258232,
0.062168680131435394,
-0.043797560036182404,
-0.10944449156522751,
-0.018907900899648666,
-0.04236272722482681,
0.013745354488492012,
-0.007894713431596756,
0.032250747084617615,
-0.04219018667936325,
0.01864517480134964,
-0.036798521876335144,
-0.017690233886241913,
0.08171340078115463,
0.013466906733810902,
-0.04408027231693268,
-0.032655633985996246,
-0.03248783200979233,
-0.06410270929336548,
0.0007341474993154407,
0.017263000831007957,
0.036211151629686356,
0.03377964720129967,
0.024273565039038658,
-0.025957690551877022,
0.06601672619581223,
0.101678267121315,
0.05137983709573746,
0.007588295266032219,
0.06651075929403305,
-0.09918545931577682,
0.015202939510345459,
0.10071918368339539,
-0.026291899383068085,
-0.009173089638352394,
0.01689383015036583,
0.014134500175714493,
0.09870882332324982,
-0.022125447168946266,
0.01373088639229536,
0.02813650295138359,
-0.05227618291974068,
0.0551193431019783,
-0.1315230429172516,
0.013901795260608196,
-0.03359387442469597,
0.05583294481039047,
0.11260191351175308,
-0.02258659154176712,
-0.008537054993212223,
0.0644332617521286,
0.04594976082444191,
0.048957500606775284,
0.02055720053613186,
0.07903150469064713,
-0.05865763500332832,
0.008326513692736626,
-0.026590660214424133,
0.07448211312294006,
0.035739704966545105,
0.005316461436450481,
0.019324224442243576,
0.05085683614015579,
0.011836006306111813,
-0.01628267765045166,
-0.10309111326932907,
-0.03974628821015358,
0.035327810794115067,
-0.057312533259391785,
0.012780537828803062,
0.006737834308296442,
-0.08260738849639893,
0.035889506340026855,
0.10877350717782974,
0.12067411839962006,
0.018266240134835243,
-0.08786989003419876,
-0.06504431366920471,
0.04838811606168747,
-0.0853583961725235,
-0.026236973702907562,
-0.02161293849349022,
-0.007934095337986946,
-0.1273067593574524,
0.02301677316427231,
-0.09195815026760101,
0.01384930219501257,
0.07369481772184372,
-0.02203614078462124,
0.025933274999260902,
-0.005079061724245548,
-0.020734205842018127,
0.025538401678204536,
-0.0036920576822012663,
-0.037195105105638504,
-0.06087715923786163,
-0.06911687552928925,
-0.015050620771944523,
-0.02971288003027439,
0.0718763992190361,
0.058998726308345795,
0.0573287308216095,
-0.014130175113677979,
0.0892876461148262,
0.004743106663227081,
-0.044599227607250214,
-0.03934961184859276,
-0.08312268555164337,
0.06435982882976532,
-0.046320460736751556,
0.08794816583395004,
0.02426980622112751,
0.002465436002239585,
-0.11063174903392792,
-0.06106524541974068,
-0.012868411839008331,
-0.051806237548589706,
0.04640491306781769,
-0.03310976177453995,
4.9415707026355796e-33,
0.07057049870491028,
0.017259106040000916,
0.014259524643421173,
-0.04685432091355324,
-0.039000965654850006,
-0.11402316391468048,
-0.024689635261893272,
-0.0359966903924942,
-0.06884539127349854,
-0.060958173125982285,
-0.03624483942985535,
0.0389135368168354,
0.014051745645701885,
-0.0225373487919569,
-0.0021724794059991837,
-0.008225344121456146,
-0.010831796564161777,
-0.02448129840195179,
0.12165743857622147,
0.006523692049086094,
-0.017816834151744843,
0.00003295117858215235,
-0.006880064960569143,
0.036186620593070984,
0.03096655383706093,
-0.02836042083799839,
0.014638316817581654,
-0.03886180371046066,
0.03310418874025345,
-0.03518548607826233,
-0.0036289594136178493,
-0.07006874680519104,
0.0016831309767439961,
0.01650121435523033,
-0.12394726276397705,
0.0018156827427446842,
0.022701967507600784,
0.0028110952116549015,
-0.09073974192142487,
-0.03771192952990532,
0.061130132526159286,
0.030059553682804108,
-0.08134766668081284,
-0.003237181343138218,
0.13496379554271698,
0.052883706986904144,
0.04584836587309837,
-0.11096490174531937,
0.10154341906309128,
-0.02424078807234764,
0.03183707222342491,
-0.11354484409093857,
0.05574170500040054,
-0.04028687626123428,
0.05216697230935097,
0.08195371180772781,
0.10814955830574036,
-0.0472104586660862,
-0.047647617757320404,
-0.05122319236397743,
-0.042922474443912506,
-0.0930689200758934,
-0.033999595791101456,
-0.004543116316199303,
0.06134376674890518,
-0.05027693882584572,
-0.008162903599441051,
0.08314017951488495,
0.015522755682468414,
-0.04097205027937889,
-0.053377915173769,
0.03277318552136421,
0.007343385834246874,
0.0641445517539978,
-0.013445112854242325,
-0.048813845962285995,
-0.07362601161003113,
0.00007811836985638365,
-0.08946135640144348,
0.030897991731762886,
0.06799130886793137,
-0.003276551142334938,
-0.05064648017287254,
0.07367370277643204,
0.10847535729408264,
0.018548179417848587,
-0.008761772885918617,
0.0106459129601717,
-0.0010817566653713584,
0.02175501547753811,
0.02972605638206005,
-0.05382590368390083,
-0.02015010453760624,
0.0627257376909256,
-0.11193671077489853,
-4.987613714331335e-33,
0.022082217037677765,
0.012990695424377918,
-0.09114660322666168,
0.08529847860336304,
-0.009948603808879852,
0.04165152832865715,
0.01523065660148859,
0.09875956177711487,
-0.01369506400078535,
-0.12208771705627441,
0.007105678785592318,
-0.06127253919839859,
0.07869698107242584,
-0.0020462265238165855,
-0.05373623967170715,
0.05110090970993042,
-0.0730927437543869,
-0.014029040932655334,
-0.039098192006349564,
0.033418115228414536,
-0.019150085747241974,
-0.03387908637523651,
-0.037240203469991684,
0.00010295045649399981,
-0.019911006093025208,
0.025949323549866676,
-0.006751703098416328,
0.057640448212623596,
-0.0192452073097229,
-0.0031449003145098686,
0.009923242963850498,
-0.02519187144935131,
-0.03736938536167145,
0.00683013629168272,
-0.037990354001522064,
-0.008922267705202103,
0.03816300630569458,
-0.0653381496667862,
-0.04732885584235191,
-0.03371460735797882,
-0.019579950720071793,
0.025331445038318634,
-0.03600476309657097,
-0.04954608902335167,
-0.008172574453055859,
0.02978791855275631,
0.04348032921552658,
-0.010783766396343708,
-0.031660012900829315,
-0.04186296835541725,
0.0385407917201519,
-0.056291159242391586,
-0.041832197457551956,
0.03954807668924332,
-0.024161232635378838,
0.07270621508359909,
0.08330602943897247,
0.03960491344332695,
0.006540675647556782,
0.03732302412390709,
0.036419376730918884,
-0.11374559998512268,
0.04404807835817337,
0.046440813690423965,
0.025809800252318382,
0.0307486429810524,
-0.026039868593215942,
0.0699332132935524,
-0.04991493001580238,
-0.0021843460854142904,
-0.06623021513223648,
-0.004032396711409092,
0.016923386603593826,
-0.01568695157766342,
0.0008895705104805529,
-0.022606534883379936,
0.08267990499734879,
0.04653369262814522,
0.0014203761238604784,
0.005338617600500584,
-0.03024320863187313,
0.0318327471613884,
-0.05934256687760353,
-0.025195783004164696,
0.0636802464723587,
0.07695827633142471,
0.13359564542770386,
0.0369889959692955,
-0.009622634388506413,
0.03426685929298401,
-0.0046365754678845406,
-0.006344842258840799,
0.024309203028678894,
0.05699887499213219,
-0.04646136984229088,
-4.787733942634986e-8,
0.04420284181833267,
0.056603942066431046,
-0.0909818634390831,
-0.019183244556188583,
0.0855332538485527,
0.03805657476186752,
0.03349871188402176,
0.0035297994036227465,
-0.012592407874763012,
0.004297560080885887,
-0.04339509829878807,
0.04496796056628227,
-0.045960500836372375,
0.04347047209739685,
0.002604243578389287,
0.021148821339011192,
0.026435792446136475,
0.03220216557383537,
0.03364313021302223,
-0.041398633271455765,
-0.08450012654066086,
0.0072844987735152245,
0.002977013122290373,
-0.038641542196273804,
0.01145084947347641,
0.010079752653837204,
0.08345724642276764,
-0.02946115843951702,
0.07226313650608063,
0.009834041818976402,
-0.07656889408826828,
0.012539212591946125,
-0.03189476206898689,
0.03739439696073532,
0.0203302763402462,
0.03566863387823105,
-0.059121306985616684,
0.061909157782793045,
0.04905400425195694,
0.06984496861696243,
0.027791442349553108,
0.04130737483501434,
-0.048025038093328476,
-0.0022484499495476484,
0.03825787082314491,
0.040062323212623596,
-0.02441178448498249,
0.047643546015024185,
-0.01692161150276661,
-0.02001405879855156,
-0.00603235000744462,
-0.03967989981174469,
-0.023493049666285515,
0.035611342638731,
-0.03697044402360916,
0.027241291478276253,
-0.019795026630163193,
-0.045088030397892,
0.02683212421834469,
-0.004582231864333153,
-0.012814277783036232,
-0.005495099350810051,
-0.027164276689291,
0.04690210148692131
] | 0.109195
|
This page shows how to enable or disable feature gates to control specific Kubernetes features in your cluster. Enabling feature gates allows you to test and use Alpha or Beta features before they become generally available. {{< note >}} For some stable (GA) gates, you can also disable them, usually for one minor release after GA; however if you do that, your cluster may not be conformant as Kubernetes. {{< /note >}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You also need: \* Administrative access to your cluster \* Knowledge of which feature gate you want to enable (see the [Feature Gates reference](/docs/reference/command-line-tools-reference/feature-gates/)) {{< note >}} GA (stable) features are always enabled by default. You typically configure gates for Alpha or Beta features. {{< /note >}} ## Understand feature gate maturity Before enabling a feature gate, check the [Feature Gates reference](/docs/reference/command-line-tools-reference/feature-gates/) for the feature's maturity level: - \*\*Alpha\*\*: Disabled by default, may be buggy. Use only in test clusters. - \*\*Beta\*\*: Usually enabled by default, well-tested. - \*\*GA\*\*: Always enabled by default; can sometimes be disabled for one release after GA. ## Identify which components need the feature gate Different feature gates affect different Kubernetes components: - Some features require enabling the gate on \*\*multiple components\*\* (e.g., API server and controller manager) - Other features only need the gate on a \*\*single component\*\* (e.g., only kubelet) The [Feature Gates reference](/docs/reference/command-line-tools-reference/feature-gates/) typically indicates which components are affected by each gate. All Kubernetes components share the same feature gate definitions, so all gates appear in help output, but only relevant gates affect each component's behavior. ## Configuration ### During cluster initialization Create a configuration file to enable feature gates across relevant components: ```yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: extraArgs: feature-gates: "FeatureName=true" controllerManager: extraArgs: feature-gates: "FeatureName=true" scheduler: extraArgs: feature-gates: "FeatureName=true" --- apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration featureGates: FeatureName: true ``` Initialize the cluster: ```shell kubeadm init --config kubeadm-config.yaml ``` ### On an existing cluster For kubeadm clusters, feature gate configuration can be set in several locations including manifest files, configuration files, and kubeadm configuration. Edit control plane component manifests in `/etc/kubernetes/manifests/`: 1. For kube-apiserver, kube-controller-manager, or kube-scheduler, add the flag to the command: ```yaml spec: containers: - command: - kube-apiserver - --feature-gates=FeatureName=true # ... other flags ``` Save the file. The pod restarts automatically. 2. For kubelet, edit `/var/lib/kubelet/config.yaml`: ```yaml apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration featureGates: FeatureName: true ``` Restart kubelet: ```shell sudo systemctl restart kubelet ``` 3. For kube-proxy, edit the ConfigMap: ```shell kubectl -n kube-system edit configmap kube-proxy ``` Add feature gates to the configuration: ```yaml featureGates: FeatureName: true ``` Restart the DaemonSet: ```shell kubectl -n kube-system rollout restart daemonset kube-proxy ``` ## Configure multiple feature gates Use comma-separated lists for command-line flags: ```shell --feature-gates=FeatureA=true,FeatureB=false,FeatureC=true ``` For components that support configuration files (kubelet, kube-proxy): ```yaml featureGates: FeatureA: true FeatureB: false FeatureC: true ``` {{< note >}} In kubeadm clusters, control plane components (kube-apiserver, kube-controller-manager, and kube-scheduler) are typically configured via command-line flags in their static pod manifests located at `/etc/kubernetes/manifests/`. While these components support configuration files via the `--config` flag, kubeadm primarily uses command-line flags. {{< /note >}} ## Verify feature gate configuration After configuring, verify the feature gates are active. The following methods apply to kubeadm clusters where control plane components run as static pods. ### Check control plane component manifests View the feature gates configured in the static pod manifest: ```shell kubectl -n kube-system get pod kube-apiserver- -o yaml | grep feature-gates ``` ### Check kubelet configuration Use the kubelet's configz endpoint: ```shell kubectl proxy --port=8001 & curl -sSL "http://localhost:8001/api/v1/nodes//proxy/configz" | grep featureGates -A 5 ``` Or check the
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/configure-feature-gates.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/configure-feature-gates.md
|
[
0.05530380830168724,
-0.038721486926078796,
0.013681250624358654,
0.04167451709508896,
-0.02228185534477234,
0.025714967399835587,
-0.02022853121161461,
-0.10036426037549973,
-0.03272968903183937,
0.06119609251618385,
-0.04049244150519371,
-0.033696673810482025,
-0.053110986948013306,
0.014056351035833359,
0.013111692853271961,
0.014746139757335186,
0.06373222172260284,
-0.05789598450064659,
-0.006787439808249474,
-0.11308638751506805,
-0.026150520890951157,
-0.05559725686907768,
-0.018615474924445152,
0.06014289706945419,
-0.07783512771129608,
-0.04559427499771118,
-0.04831722751259804,
-0.011681471951305866,
0.06655459851026535,
-0.004751534201204777,
-0.0787728875875473,
-0.003713741200044751,
0.027587193995714188,
0.021221712231636047,
0.0071239955723285675,
0.07734542340040207,
0.011964262463152409,
-0.02295644022524357,
-0.06243421509861946,
-0.01873522251844406,
0.010672221891582012,
-0.04008809104561806,
-0.06528986245393753,
-0.0993453785777092,
0.034061651676893234,
0.01609603501856327,
-0.056615591049194336,
-0.08127433806657791,
-0.01951257884502411,
-0.028316017240285873,
0.049257516860961914,
-0.042136356234550476,
0.02013811096549034,
-0.02618684060871601,
0.06470414251089096,
0.06023044139146805,
0.008631440810859203,
0.022948389872908592,
0.07036370038986206,
-0.019409531727433205,
-0.0020463501568883657,
-0.057574402540922165,
-0.0061841863207519054,
-0.031016642227768898,
-0.0691148117184639,
0.08722523599863052,
0.04445960745215416,
-0.026505131274461746,
0.031248271465301514,
-0.041811440140008926,
0.03828691691160202,
-0.014405493624508381,
-0.041529785841703415,
-0.06704604625701904,
0.029915552586317062,
0.019336260855197906,
-0.012823902070522308,
0.041181426495313644,
0.08456622064113617,
-0.04807672277092934,
-0.00044225651072338223,
0.016910597681999207,
0.03440659120678902,
-0.0019960401114076376,
-0.08935768902301788,
0.05623362213373184,
-0.04998283460736275,
-0.06966359913349152,
0.07031477242708206,
0.010482755489647388,
0.047586556524038315,
-0.08234589546918869,
0.042992278933525085,
-0.1061307042837143,
0.02738029696047306,
-0.021059751510620117,
-0.039294008165597916,
-0.08211492747068405,
-0.00676979124546051,
0.00975148007273674,
-0.005175244063138962,
-0.028007259592413902,
0.04611470177769661,
0.06104740500450134,
0.03181612864136696,
0.02549765445291996,
0.040082287043333054,
-0.01034452673047781,
0.02668428234755993,
0.0490301251411438,
-0.011423286981880665,
0.10514608025550842,
0.05954048037528992,
0.015100708231329918,
-0.04319838806986809,
-0.008372119627892971,
0.03078674152493477,
0.020045585930347443,
0.00646564643830061,
0.08324512094259262,
0.051390040665864944,
-0.06606584042310715,
0.004488654900342226,
-0.0024962511379271746,
-0.018539398908615112,
0.026857612654566765,
-0.1161792203783989,
3.6769312683507454e-33,
0.06200336664915085,
-0.06288892030715942,
0.02536637894809246,
-0.07453732937574387,
0.006067827343940735,
-0.0008704813080839813,
-0.0012049468932673335,
-0.04358147084712982,
-0.04695800691843033,
0.001471830066293478,
-0.029799986630678177,
0.001777822501026094,
-0.030088679865002632,
-0.07738493382930756,
0.04973548278212547,
-0.01229857001453638,
-0.013470737263560295,
-0.016685210168361664,
0.11384668201208115,
-0.021990900859236717,
0.050935231149196625,
-0.09267085790634155,
-0.054458219558000565,
-0.021532662212848663,
0.031380608677864075,
-0.04052388668060303,
-0.03039594367146492,
-0.04591837525367737,
-0.04541392624378204,
0.048056039959192276,
-0.03897635266184807,
-0.011500741355121136,
-0.025767384096980095,
0.08359388262033463,
-0.16186602413654327,
-0.02395022287964821,
-0.07128772884607315,
-0.020451044663786888,
0.029680998995900154,
-0.018178733065724373,
0.011937803588807583,
-0.021161435171961784,
0.010785043239593506,
-0.061317555606365204,
0.07682954519987106,
0.0037954349536448717,
0.09942549467086792,
-0.08227802067995071,
0.08574782311916351,
-0.007712280843406916,
-0.07157307863235474,
-0.012221579439938068,
0.03195967897772789,
-0.06381760537624359,
0.023732388392090797,
0.023452680557966232,
0.09336940944194794,
-0.07028861343860626,
-0.059344541281461716,
0.01784052886068821,
-0.033096615225076675,
-0.0011404319666326046,
-0.029861316084861755,
-0.010988478548824787,
-0.010766499675810337,
-0.01944083534181118,
-0.028716616332530975,
0.04816433787345886,
-0.04317363724112511,
-0.011000484228134155,
-0.08381665498018265,
-0.016520263627171516,
-0.03899447247385979,
-0.004028338473290205,
-0.04359981045126915,
-0.0767291858792305,
0.0789429098367691,
0.0381467230618,
-0.0671505555510521,
0.07084888219833374,
0.004183241166174412,
-0.009496206417679787,
-0.052793629467487335,
0.11331485956907272,
0.131161630153656,
-0.04415521025657654,
0.02158009074628353,
0.020429452881217003,
-0.0018901313887909055,
-0.007513722870498896,
0.01757638528943062,
0.009925940074026585,
0.019538385793566704,
0.07520585507154465,
-0.09653290361166,
-4.4352672859791734e-33,
0.04565482586622238,
0.009950594045221806,
0.001404859242029488,
-0.02194390445947647,
-0.017338406294584274,
0.016717832535505295,
0.005244523286819458,
-0.014788058586418629,
-0.03471393510699272,
-0.10650347173213959,
0.02763879857957363,
-0.013290958479046822,
-0.03327671438455582,
-0.06785305589437485,
-0.04862521216273308,
-0.001867195824161172,
-0.054620787501335144,
0.043582212179899216,
0.021420540288090706,
0.06513918936252594,
-0.032046765089035034,
-0.025843029841780663,
-0.02449672482907772,
0.02570047788321972,
-0.03925440460443497,
-0.05229848623275757,
0.022539811208844185,
0.0520365908741951,
0.055017199367284775,
0.015400893986225128,
0.0012231972068548203,
-0.000753084197640419,
-0.02049635350704193,
0.027561552822589874,
0.025028837844729424,
-0.08643153309822083,
0.0371444933116436,
-0.03198216110467911,
-0.0300284493714571,
0.036759939044713974,
0.05781003087759018,
0.050879985094070435,
-0.015744594857096672,
0.02590283751487732,
0.0018386777956038713,
0.15075719356536865,
0.09498810768127441,
-0.010588215664029121,
-0.05707249045372009,
-0.07189060002565384,
-0.06562629342079163,
-0.003503053914755583,
-0.00830062199383974,
0.07499576359987259,
-0.09839680790901184,
0.0473015196621418,
0.07089163362979889,
0.06689821928739548,
0.02838127687573433,
0.0020036634523421526,
0.058014895766973495,
-0.07568280398845673,
0.07925806939601898,
0.01593843288719654,
0.034736938774585724,
-0.042151063680648804,
0.05351424217224121,
0.16074737906455994,
-0.015688437968492508,
0.03884188458323479,
-0.11958375573158264,
-0.015818731859326363,
0.04176390543580055,
0.006271881517022848,
0.005307714454829693,
0.012007270008325577,
-0.04177307337522507,
-0.06135420873761177,
0.06418783217668533,
-0.03786884993314743,
0.006904301233589649,
0.08195941150188446,
-0.09884750843048096,
0.0006148130632936954,
0.08003450185060501,
0.03499254211783409,
0.04980909079313278,
0.09788016229867935,
0.07722929865121841,
0.048819269984960556,
-0.03808019310235977,
0.02777276188135147,
-0.00962065625935793,
0.11611742526292801,
-0.05441172793507576,
-5.49046994535729e-8,
0.06439000368118286,
-0.055696792900562286,
-0.045790642499923706,
-0.01635991595685482,
0.07035187631845474,
0.008741894736886024,
-0.02277027815580368,
0.016644269227981567,
-0.09184113889932632,
-0.0649292841553688,
-0.029024817049503326,
0.1233682930469513,
-0.06099896505475044,
-0.018087174743413925,
0.069586843252182,
-0.007520626299083233,
-0.050108544528484344,
0.04610227420926094,
0.029490096494555473,
-0.051087673753499985,
-0.012747923843562603,
-0.08936494588851929,
0.022212212905287743,
0.01036257203668356,
-0.021842392161488533,
-0.0145441684871912,
0.056123338639736176,
0.017577437683939934,
0.01228359341621399,
0.024564336985349655,
-0.007387735415250063,
-0.025172201916575432,
-0.01645040139555931,
0.062428101897239685,
0.05492841452360153,
0.024144157767295837,
-0.04800114408135414,
0.06913866847753525,
0.05904562026262283,
0.055576667189598083,
0.05175255611538887,
0.039489131420850754,
-0.07777294516563416,
0.009318511001765728,
-0.04078584909439087,
0.08600667864084244,
0.013420694507658482,
0.020509038120508194,
0.06835722178220749,
0.020545484498143196,
0.031214993447065353,
-0.011059228330850601,
-0.013722402043640614,
0.102512426674366,
-0.003608807921409607,
0.046806853264570236,
-0.010349591262638569,
-0.05361771956086159,
0.05452261492609978,
0.0152398981153965,
0.05241147801280022,
0.056132927536964417,
0.008220392279326916,
-0.07994012534618378
] | 0.094321
|
manifests View the feature gates configured in the static pod manifest: ```shell kubectl -n kube-system get pod kube-apiserver- -o yaml | grep feature-gates ``` ### Check kubelet configuration Use the kubelet's configz endpoint: ```shell kubectl proxy --port=8001 & curl -sSL "http://localhost:8001/api/v1/nodes//proxy/configz" | grep featureGates -A 5 ``` Or check the configuration file directly on the node: ```shell cat /var/lib/kubelet/config.yaml | grep -A 10 featureGates ``` ### Check via metrics endpoint Feature gate status is exposed in Prometheus-style metrics by Kubernetes components (available in Kubernetes 1.26+). Query the metrics endpoint to verify which feature gates are enabled: ```shell kubectl get --raw /metrics | grep kubernetes\_feature\_enabled ``` To check a specific feature gate: ```shell kubectl get --raw /metrics | grep kubernetes\_feature\_enabled | grep FeatureName ``` The metric shows `1` for enabled gates and `0` for disabled gates. {{< note >}} In kubeadm clusters, verify all relevant locations where feature gates might be configured, as the configuration is distributed across multiple files and locations. {{< /note >}} ### Check via /flagz endpoint If you have access to a component's debugging endpoints, and the `ComponentFlagz` feature gate is enabled for that component, you can inspect the command-line flags that were used to start the component by visiting the `/flagz` endpoint. Feature gates configured using command-line flags appear in this output. The `/flagz` endpoint is part of Kubernetes \*z-pages\*, which provide human-readable runtime debugging information for core components. For more information, see the [z-pages documentation](/docs/reference/instrumentation/zpages/). ## Understanding component-specific requirements Some examples of component-specific feature gates: - \*\*API server-focused\*\*: Features like `StructuredAuthenticationConfiguration` primarily affect kube-apiserver - \*\*Kubelet-focused\*\*: Features like `GracefulNodeShutdown` primarily affect kubelet - \*\*Multiple components\*\*: Some features require coordination between components {{< caution >}} When a feature requires multiple components, you must enable the gate on all relevant components. Enabling it on only some components may result in unexpected behavior or errors. {{< /caution >}} Always test feature gates in non-production environments first. Alpha features may be removed without notice. ## {{% heading "whatsnext" %}} \* Read the [Feature Gates reference](/docs/reference/command-line-tools-reference/feature-gates/) \* Learn about [Feature Stages](/docs/reference/command-line-tools-reference/feature-gates/#feature-stages) \* Review [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/)
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/configure-feature-gates.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/configure-feature-gates.md
|
[
0.051136553287506104,
-0.03332844004034996,
0.031026532873511314,
-0.00379749177955091,
-0.04008391126990318,
-0.040948137640953064,
-0.06679906696081161,
-0.03316764906048775,
0.035373661667108536,
0.008670961484313011,
-0.02716626226902008,
-0.0728052631020546,
-0.04601563885807991,
-0.03765036538243294,
0.05666511505842209,
0.010275464504957199,
0.0566096231341362,
-0.03537142276763916,
-0.010402429848909378,
-0.11791055649518967,
0.03284810483455658,
-0.04022650420665741,
-0.01724991202354431,
-0.00846198108047247,
-0.06516525894403458,
-0.06996743381023407,
-0.03533180430531502,
-0.011785699985921383,
0.019899830222129822,
-0.041295964270830154,
-0.10458604991436005,
0.07015550136566162,
-0.027818972244858742,
0.0030531189404428005,
-0.002939088735729456,
0.08968299627304077,
0.05650896206498146,
-0.06464510411024094,
-0.01893576979637146,
-0.041574448347091675,
0.04923173412680626,
-0.06129254400730133,
-0.042069971561431885,
-0.0498935729265213,
-0.007993865758180618,
0.010705560445785522,
-0.04553662985563278,
-0.039723630994558334,
-0.005861466284841299,
-0.0876520499587059,
0.07141045480966568,
-0.017048226669430733,
0.07338983565568924,
0.04027533531188965,
0.06940717995166779,
0.005755777470767498,
-0.00855005532503128,
0.04916316270828247,
0.09186641871929169,
0.022586114704608917,
0.018139319494366646,
-0.017351647838950157,
-0.040731169283390045,
0.007528550457209349,
-0.07653625309467316,
0.013189060613512993,
0.010133188217878342,
-0.02823931910097599,
0.035962168127298355,
-0.0497361421585083,
0.03365136310458183,
-0.04906875640153885,
-0.06227712705731392,
-0.05472743511199951,
0.01880628801882267,
0.009562116116285324,
0.012396263889968395,
0.06212329864501953,
0.009008940309286118,
-0.13012047111988068,
-0.00871275831013918,
0.053586989641189575,
0.030464738607406616,
0.026020975783467293,
-0.034101683646440506,
0.01542389765381813,
-0.06201774999499321,
-0.011381369084119797,
0.003366767428815365,
0.062148723751306534,
0.060981642454862595,
-0.1028822660446167,
-0.06157023087143898,
-0.11205704510211945,
0.024578023701906204,
0.024422617629170418,
-0.004230617545545101,
-0.019371461123228073,
-0.019895322620868683,
0.004769757855683565,
0.007592848967760801,
-0.011115094646811485,
0.012685640715062618,
0.02215936966240406,
0.0873703584074974,
0.04003522917628288,
0.01706796884536743,
0.008532476611435413,
0.08270516991615295,
0.05880984291434288,
-0.012294607236981392,
-0.0038141445256769657,
0.058964889496564865,
0.017156315967440605,
-0.025128867477178574,
0.0260668583214283,
-0.03348585218191147,
0.011498954147100449,
0.0410323292016983,
0.040091805160045624,
0.02975030057132244,
-0.04515092819929123,
0.02278302051126957,
0.01922403648495674,
-0.05676109343767166,
0.07909262925386429,
-0.037633221596479416,
5.333297950233368e-33,
0.08885529637336731,
-0.07287891209125519,
0.03543471172451973,
-0.024593444541096687,
-0.01373312808573246,
-0.021381152793765068,
-0.020629940554499626,
0.001964969327673316,
-0.005403496790677309,
-0.0020675677806138992,
-0.10401380062103271,
-0.007249582093209028,
-0.05700162425637245,
-0.05485221743583679,
0.04482303187251091,
-0.010604058392345905,
-0.09376027435064316,
-0.002158777555450797,
0.056552305817604065,
0.005527867935597897,
0.0549280159175396,
-0.09762130677700043,
-0.045369479805231094,
0.005316093098372221,
0.05675673857331276,
-0.03182511776685715,
0.00009468140342505649,
-0.051162078976631165,
-0.08321190625429153,
0.06673361361026764,
-0.01685059443116188,
-0.011937580071389675,
0.03851829469203949,
0.037906721234321594,
-0.11092173308134079,
-0.017661603167653084,
-0.013652121648192406,
-0.02521112933754921,
-0.021979596465826035,
-0.05514879897236824,
0.013531286269426346,
-0.031102662906050682,
-0.0544646792113781,
-0.06379485875368118,
0.0008661178289912641,
-0.05673878267407417,
0.03558720648288727,
-0.06565269082784653,
0.10820189118385315,
0.03189791738986969,
-0.031797949224710464,
0.025785470381379128,
0.04004419595003128,
-0.08349904417991638,
0.06288240849971771,
0.03173885866999626,
0.09618446975946426,
-0.013327560387551785,
-0.050946835428476334,
0.05613149330019951,
-0.021400872617959976,
0.020531607791781425,
-0.002108045155182481,
0.003885671030730009,
0.03427363932132721,
0.06942766159772873,
-0.03308172896504402,
0.06084566190838814,
-0.06733538210391998,
0.06813999265432358,
-0.10236769169569016,
-0.0010005783988162875,
-0.02893371880054474,
-0.00775112072005868,
-0.013919265940785408,
-0.07013271003961563,
0.05404215678572655,
-0.030172254890203476,
-0.05596347898244858,
0.031040921807289124,
-0.002481595380231738,
-0.01009126752614975,
-0.05057349428534508,
0.07357972860336304,
0.04854993894696236,
0.00011164221359649673,
0.019151000306010246,
0.02153703384101391,
-0.02921142615377903,
0.01971830427646637,
-0.010891854763031006,
0.03814518451690674,
-0.02700042724609375,
0.03235187008976936,
-0.11215505003929138,
-7.693734687722677e-33,
0.018620213493704796,
0.010240414179861546,
0.04894198104739189,
-0.03221562132239342,
-0.046956099569797516,
0.005127676762640476,
-0.02014295384287834,
0.03996259346604347,
-0.02629934251308441,
-0.04578801244497299,
0.009431060403585434,
0.04838016629219055,
0.010212735272943974,
-0.054530058056116104,
-0.051767297089099884,
0.05970306694507599,
-0.098310686647892,
-0.023980721831321716,
0.01985403522849083,
0.053326837718486786,
-0.027224641293287277,
0.02725236676633358,
0.027863645926117897,
0.03926472365856171,
-0.08558420836925507,
-0.04106949642300606,
0.001813746290281415,
0.04673608019948006,
-0.030158676207065582,
-0.06342850625514984,
0.0688377320766449,
-0.030498022213578224,
-0.08028311282396317,
0.10328767448663712,
-0.024404237046837807,
-0.07271955162286758,
0.00865564588457346,
0.03412766754627228,
-0.00851418823003769,
0.011026326566934586,
0.0504533089697361,
0.0369705930352211,
-0.036356259137392044,
0.04063965380191803,
-0.038757771253585815,
0.06645737588405609,
0.05598783493041992,
0.008594688028097153,
-0.003091030288487673,
-0.1337881088256836,
-0.021100731566548347,
0.013048743829131126,
-0.006425635889172554,
0.1634720116853714,
-0.08798675239086151,
0.060527920722961426,
0.01761014200747013,
0.09428762644529343,
-0.030550450086593628,
-0.03933243080973625,
0.029075682163238525,
-0.06210954859852791,
0.08176583051681519,
0.0361417718231678,
0.016966568306088448,
-0.02446482516825199,
0.009849711321294308,
0.1016380786895752,
-0.024973295629024506,
0.03729592263698578,
-0.016331687569618225,
-0.061452966183423996,
-0.03300034999847412,
-0.0027037211693823338,
-0.037545621395111084,
0.048048000782728195,
-0.03157665580511093,
-0.10750308632850647,
-0.007219165563583374,
0.0110376738011837,
-0.01412377692759037,
0.0714656338095665,
-0.07124898582696915,
-0.04446433112025261,
0.04714401438832283,
0.02068895474076271,
0.018322832882404327,
0.12239740043878555,
0.12102315574884415,
0.07018840312957764,
-0.03942388668656349,
0.04425506666302681,
-0.11616534739732742,
0.05620000511407852,
-0.01541833020746708,
-5.085606247234864e-8,
0.03975836560130119,
-0.05102990195155144,
-0.05125265568494797,
-0.024832382798194885,
0.022460931912064552,
0.025200141593813896,
0.026018282398581505,
0.022418908774852753,
-0.13073919713497162,
-0.04750131070613861,
-0.014910983853042126,
0.0683281272649765,
-0.13801608979701996,
0.009191031567752361,
0.10334670543670654,
-0.045618243515491486,
-0.03327356278896332,
0.09791048616170883,
0.002026413334533572,
-0.0476592518389225,
-0.052555233240127563,
-0.059928491711616516,
0.011988780461251736,
-0.022751014679670334,
-0.03432338312268257,
0.03982952609658241,
0.043773844838142395,
0.0007836251170374453,
0.037225283682346344,
0.01293183583766222,
0.007580542005598545,
0.01597130484879017,
-0.03894637152552605,
0.014959003776311874,
0.04555528238415718,
0.08662761002779007,
-0.11701541393995285,
0.06441375613212585,
0.04262327402830124,
0.0718403086066246,
0.0398278683423996,
-0.002499100286513567,
-0.049570366740226746,
0.06307271867990494,
-0.061440229415893555,
0.0660896748304367,
0.026494337245821953,
0.11195989698171616,
0.052487872540950775,
0.04006671532988548,
0.037066638469696045,
-0.08359468728303909,
-0.00012971521937288344,
0.03290329873561859,
-0.07988550513982773,
0.056632090359926224,
-0.0564926452934742,
-0.06370525807142258,
0.020600680261850357,
-0.004746448714286089,
0.02865923009812832,
0.0030897767283022404,
0.0375436395406723,
-0.04911157488822937
] | 0.138086
|
All of the APIs in Kubernetes that let you write persistent API resource data support at-rest encryption. For example, you can enable at-rest encryption for {{< glossary\_tooltip text="Secrets" term\_id="secret" >}}. This at-rest encryption is additional to any system-level encryption for the etcd cluster or for the filesystem(s) on hosts where you are running the kube-apiserver. This page shows how to enable and configure encryption of API data at rest. {{< note >}} This task covers encryption for resource data stored using the {{< glossary\_tooltip text="Kubernetes API" term\_id="kubernetes-api" >}}. For example, you can encrypt Secret objects, including the key-value data they contain. If you want to encrypt data in filesystems that are mounted into containers, you instead need to either: - use a storage integration that provides encrypted {{< glossary\_tooltip text="volumes" term\_id="volume" >}} - encrypt the data within your own application {{< /note >}} ## {{% heading "prerequisites" %}} \* {{< include "task-tutorial-prereqs.md" >}} \* This task assumes that you are running the Kubernetes API server as a {{< glossary\_tooltip text="static pod" term\_id="static-pod" >}} on each control plane node. \* Your cluster's control plane \*\*must\*\* use etcd v3.x (major version 3, any minor version). \* To encrypt a custom resource, your cluster must be running Kubernetes v1.26 or newer. \* To use a wildcard to match resources, your cluster must be running Kubernetes v1.27 or newer. {{< version-check >}} ## Determine whether encryption at rest is already enabled {#determining-whether-encryption-at-rest-is-already-enabled} By default, the API server stores plain-text representations of resources into etcd, with no at-rest encryption. The `kube-apiserver` process accepts an argument `--encryption-provider-config` that specifies a path to a configuration file. The contents of that file, if you specify one, control how Kubernetes API data is encrypted in etcd. If you are running the kube-apiserver without the `--encryption-provider-config` command line argument, you do not have encryption at rest enabled. If you are running the kube-apiserver with the `--encryption-provider-config` command line argument, and the file that it references specifies the `identity` provider as the first encryption provider in the list, then you do not have at-rest encryption enabled (\*\*the default `identity` provider does not provide any confidentiality protection.\*\*) If you are running the kube-apiserver with the `--encryption-provider-config` command line argument, and the file that it references specifies a provider other than `identity` as the first encryption provider in the list, then you already have at-rest encryption enabled. However, that check does not tell you whether a previous migration to encrypted storage has succeeded. If you are not sure, see [ensure all relevant data are encrypted](#ensure-all-secrets-are-encrypted). ## Understanding the encryption at rest configuration {{< highlight yaml "linenos=false,hl\_lines=2-5" >}} --- # # CAUTION: this is an example configuration. # Do not use this for your own cluster! # apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets - configmaps - pandas.awesome.bears.example # a custom resource API providers: # This configuration does not provide data confidentiality. The first # configured provider is specifying the "identity" mechanism, which # stores resources as plain text. # - identity: {} # plain text, in other words NO encryption - aesgcm: keys: - name: key1 secret: c2VjcmV0IGlzIHNlY3VyZQ== - name: key2 secret: dGhpcyBpcyBwYXNzd29yZA== - aescbc: keys: - name: key1 secret: c2VjcmV0IGlzIHNlY3VyZQ== - name: key2 secret: dGhpcyBpcyBwYXNzd29yZA== - secretbox: keys: - name: key1 secret: YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY= - resources: - events providers: - identity: {} # do not encrypt Events even though \*.\* is specified below - resources: - '\*.apps' # wildcard match requires Kubernetes 1.27 or later providers: - aescbc: keys: - name: key2 secret: c2VjcmV0IGlzIHNlY3VyZSwgb3IgaXMgaXQ/Cg== - resources: - '\*.\*' # wildcard match requires Kubernetes 1.27 or later providers: - aescbc: keys: -
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.04791028052568436,
0.07255518436431885,
0.023015271872282028,
-0.012593831866979599,
-0.015703223645687103,
-0.007530693430453539,
0.011829034425318241,
-0.05073567479848862,
0.1194869875907898,
0.03007875569164753,
-0.046088483184576035,
-0.06725169718265533,
0.02810000441968441,
-0.012146827764809132,
0.02097429893910885,
-0.00504058413207531,
0.013090763241052628,
0.027220040559768677,
-0.05768554285168648,
-0.0750296413898468,
0.10082773119211197,
0.025427833199501038,
0.060326799750328064,
-0.004415436647832394,
-0.007259072735905647,
-0.01766185276210308,
0.03427538275718689,
0.014543689787387848,
-0.013008472509682178,
0.03193148225545883,
-0.005278370343148708,
-0.05969667434692383,
-0.07334840297698975,
0.055359818041324615,
-0.0028123706579208374,
0.007668655831366777,
0.03027275949716568,
-0.0292753204703331,
-0.05861329659819603,
0.01905037835240364,
0.005733081139624119,
-0.06423096358776093,
-0.14375817775726318,
0.0008806406403891742,
-0.03284316882491112,
0.004725518636405468,
0.02291121520102024,
-0.05240490287542343,
-0.041314322501420975,
-0.009051547385752201,
0.022265248000621796,
-0.04268963634967804,
-0.020142382010817528,
0.04922090843319893,
-0.07251622527837753,
-0.038694899529218674,
-0.08334717154502869,
0.06661473959684372,
0.07992412149906158,
0.007828029803931713,
0.05357731133699417,
0.0022535105235874653,
0.05121225863695145,
0.04789523407816887,
-0.02525467239320278,
0.05243661254644394,
0.021839158609509468,
0.03850733861327171,
0.006321303080767393,
-0.03155788779258728,
0.08846241980791092,
-0.024460691958665848,
0.0036861367989331484,
-0.031176820397377014,
0.020253989845514297,
0.004042753949761391,
-0.0804038718342781,
0.011488759890198708,
0.006889235693961382,
-0.05676627159118652,
0.07024598121643066,
0.04026142880320549,
0.11230020970106125,
0.05450044199824333,
-0.10274507105350494,
-0.020055627450346947,
0.03350112587213516,
0.00472019100561738,
-0.004599323496222496,
-0.029379071667790413,
0.0369611419737339,
-0.09664130210876465,
0.00752369686961174,
-0.08152805268764496,
0.08261089026927948,
-0.021721579134464264,
-0.021493948996067047,
-0.051365043967962265,
-0.023446688428521156,
-0.08828644454479218,
-0.023667406290769577,
-0.023734552785754204,
-0.029438579455018044,
-0.013256783597171307,
0.05472306162118912,
0.020372768864035606,
-0.01866808719933033,
-0.03198449686169624,
-0.029115881770849228,
0.12596553564071655,
0.00879742857068777,
0.1020817905664444,
-0.04928357154130936,
0.052017033100128174,
-0.011380241252481937,
-0.013962946832180023,
-0.08889149129390717,
-0.022611381486058235,
0.03966759890317917,
0.0658465176820755,
0.025507887825369835,
-0.0493401475250721,
-0.032589007169008255,
0.0711340606212616,
-0.05658852681517601,
0.027602730318903923,
-0.009052124805748463,
5.0589386707774e-33,
0.06936854869127274,
-0.08238967508077621,
0.029789680615067482,
-0.027513673529028893,
-0.06487606465816498,
-0.08291793614625931,
0.01692706160247326,
0.0006673331372439861,
-0.02939762733876705,
0.02505430020391941,
-0.05355753004550934,
0.05132006108760834,
-0.012401499785482883,
-0.062074366956949234,
0.03475543484091759,
0.0474528931081295,
-0.014106214977800846,
0.01069104764610529,
0.09684929251670837,
0.004011365585029125,
0.07317959517240524,
0.01889178156852722,
0.07600121200084686,
-0.019406814128160477,
0.042290929704904556,
-0.03351610153913498,
0.029560787603259087,
-0.0729157105088234,
0.014897312968969345,
0.017146814614534378,
-0.04544436186552048,
-0.06053345277905464,
0.078501395881176,
0.001725224545225501,
-0.0921211838722229,
0.02216486632823944,
-0.0008287724922411144,
-0.0009328271844424307,
-0.015821106731891632,
-0.03999100252985954,
0.11020651459693909,
-0.03982266038656235,
0.03540646284818649,
-0.08116478472948074,
0.04122218117117882,
0.05417738854885101,
0.018403807654976845,
-0.039441872388124466,
0.040312234312295914,
0.0776071771979332,
-0.04636332020163536,
0.0028109021950513124,
-0.09292583167552948,
-0.07084835320711136,
0.007943487726151943,
0.022432219237089157,
0.06540992110967636,
-0.06540359556674957,
-0.055380694568157196,
-0.029062611982226372,
-0.13584983348846436,
-0.028598438948392868,
0.026507878676056862,
-0.03838098421692848,
-0.02805687114596367,
-0.006807910278439522,
-0.020374855026602745,
0.006113407202064991,
-0.05308346450328827,
-0.013703982345759869,
-0.07632273435592651,
0.010770273394882679,
0.04966134950518608,
0.03245558962225914,
0.02252328209578991,
-0.018657933920621872,
-0.034114621579647064,
0.02010928839445114,
-0.011403517797589302,
-0.026436857879161835,
0.0705462172627449,
-0.05348715931177139,
-0.01658424735069275,
0.08837028592824936,
-0.020992107689380646,
-0.016565795987844467,
-0.003894129069522023,
-0.015401131473481655,
-0.029965119436383247,
0.050566043704748154,
0.05300525203347206,
-0.04387906566262245,
-0.03261041268706322,
-0.04283980652689934,
-0.1150105819106102,
-6.641782589119904e-33,
0.08586013317108154,
-0.07907566428184509,
-0.012020804919302464,
0.07137802988290787,
0.030421216040849686,
0.07941702753305435,
0.0099186385050416,
0.09939911961555481,
0.013708421029150486,
-0.029943466186523438,
-0.052833426743745804,
-0.0017361616482958198,
0.05405125021934509,
0.044172633439302444,
0.027001312002539635,
0.021307144314050674,
-0.0809008851647377,
0.035545602440834045,
0.017018523067235947,
0.02252906933426857,
-0.05162467807531357,
-0.02322874777019024,
0.003982128109782934,
0.044595714658498764,
0.06912873685359955,
-0.01422828994691372,
-0.003444028552621603,
0.03584219515323639,
0.007679927162826061,
-0.03662973269820213,
-0.018857566639780998,
-0.01728208363056183,
-0.017265144735574722,
-0.07169584929943085,
-0.04563979431986809,
-0.11459426581859589,
0.0780755802989006,
-0.015276430174708366,
-0.07247024774551392,
-0.006930404342710972,
0.004505888093262911,
-0.03581680357456207,
-0.05206196755170822,
-0.08484441787004471,
-0.0025892448611557484,
-0.05504914000630379,
0.011249884031713009,
-0.04291538894176483,
0.0004856223240494728,
-0.06076966971158981,
0.05828423798084259,
-0.01911005936563015,
-0.045275576412677765,
-0.011296109296381474,
-0.012865290977060795,
0.030115775763988495,
0.016541194170713425,
0.012489734217524529,
-0.07458986341953278,
0.005620683543384075,
0.040138427168130875,
-0.026221660897135735,
0.07371160387992859,
0.07466267794370651,
0.021137582138180733,
0.0010981318773701787,
-0.06368115544319153,
-0.034556858241558075,
-0.06771434843540192,
0.05415012314915657,
-0.004885886795818806,
-0.12535178661346436,
0.0744565948843956,
0.01570560596883297,
0.043271731585264206,
-0.04691028967499733,
0.042713794857263565,
-0.11267292499542236,
0.05466155707836151,
0.011621668003499508,
0.01792435348033905,
0.005553134251385927,
-0.04720110073685646,
0.11440088599920273,
0.0786869078874588,
-0.010323408991098404,
0.05881212279200554,
0.06380046904087067,
-0.009380100294947624,
0.07456587255001068,
-0.061856597661972046,
-0.027761202305555344,
-0.048429936170578,
0.14534726738929749,
0.08772149682044983,
-4.511671392037897e-8,
0.023844726383686066,
0.11288309842348099,
-0.02862180583178997,
0.0805940330028534,
-0.03277268633246422,
-0.026708398014307022,
0.06624891608953476,
-0.021353432908654213,
-0.045284710824489594,
-0.04420565441250801,
0.038082774728536606,
0.022485993802547455,
-0.024615870788693428,
0.014382622204720974,
0.003787718713283539,
0.04763996601104736,
0.010876400396227837,
-0.07085984945297241,
0.03617037832736969,
-0.08230406790971756,
-0.03197868913412094,
-0.019772455096244812,
-0.06898435950279236,
-0.005191505420953035,
0.08180885016918182,
0.07598551362752914,
0.034455910325050354,
0.030925948172807693,
0.034249935299158096,
0.09755001962184906,
-0.10750264674425125,
-0.11986513435840607,
-0.012407396920025349,
0.0661965012550354,
-0.008270804770290852,
-0.01290435716509819,
-0.0617617703974247,
0.03401540592312813,
0.0946752205491066,
0.0578681156039238,
0.011759474873542786,
-0.02136324904859066,
-0.018588894978165627,
0.012571359053254128,
0.0538773387670517,
0.10809826105833054,
0.032946232706308365,
0.07530341297388077,
-0.05861953645944595,
0.03529907390475273,
-0.08215415477752686,
-0.04572032392024994,
-0.04094111546874046,
0.04096049815416336,
-0.036250945180654526,
0.015311804600059986,
-0.014984402805566788,
-0.024886274710297585,
0.054476626217365265,
-0.037432942539453506,
0.021431514993309975,
-0.005184130277484655,
-0.0019291641656309366,
-0.024222463369369507
] | 0.002034
|
{} # do not encrypt Events even though \*.\* is specified below - resources: - '\*.apps' # wildcard match requires Kubernetes 1.27 or later providers: - aescbc: keys: - name: key2 secret: c2VjcmV0IGlzIHNlY3VyZSwgb3IgaXMgaXQ/Cg== - resources: - '\*.\*' # wildcard match requires Kubernetes 1.27 or later providers: - aescbc: keys: - name: key3 secret: c2VjcmV0IGlzIHNlY3VyZSwgSSB0aGluaw== {{< /highlight >}} Each `resources` array item is a separate config and contains a complete configuration. The `resources.resources` field is an array of Kubernetes resource names (`resource` or `resource.group`) that should be encrypted like Secrets, ConfigMaps, or other resources. If custom resources are added to `EncryptionConfiguration` and the cluster version is 1.26 or newer, any newly created custom resources mentioned in the `EncryptionConfiguration` will be encrypted. Any custom resources that existed in etcd prior to that version and configuration will be unencrypted until they are next written to storage. This is the same behavior as built-in resources. See the [Ensure all secrets are encrypted](#ensure-all-secrets-are-encrypted) section. The `providers` array is an ordered list of the possible encryption providers to use for the APIs that you listed. Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider is the first provider, the first key is used for encryption. Only one provider type may be specified per entry (`identity` or `aescbc` may be provided, but not both in the same item). The first provider in the list is used to encrypt resources written into the storage. When reading resources from storage, each provider that matches the stored data attempts in order to decrypt the data. If no provider can read the stored data due to a mismatch in format or secret key, an error is returned which prevents clients from accessing that resource. `EncryptionConfiguration` supports the use of wildcards to specify the resources that should be encrypted. Use '`\*.`' to encrypt all resources within a group (for eg '`\*.apps`' in above example) or '`\*.\*`' to encrypt all resources. '`\*.`' can be used to encrypt all resource in the core group. '`\*.\*`' will encrypt all resources, even custom resources that are added after API server start. {{< note >}} Use of wildcards that overlap within the same resource list or across multiple entries are not allowed since part of the configuration would be ineffective. The `resources` list's processing order and precedence are determined by the order it's listed in the configuration. {{< /note >}} If you have a wildcard covering resources and want to opt out of at-rest encryption for a particular kind of resource, you achieve that by adding a separate `resources` array item with the name of the resource that you want to exempt, followed by a `providers` array item where you specify the `identity` provider. You add this item to the list so that it appears earlier than the configuration where you do specify encryption (a provider that is not `identity`). For example, if '`\*.\*`' is enabled and you want to opt out of encryption for Events and ConfigMaps, add a new \*\*earlier\*\* item to the `resources`, followed by the providers array item with `identity` as the provider. The more specific entry must come before the wildcard entry. The new item would look similar to: ```yaml ... - resources: - configmaps. # specifically from the core API group, # because of trailing "." - events providers: - identity: {} # and then other entries in resources ``` Ensure that the exemption is listed \_before\_ the wildcard '`\*.\*`' item in the resources array to give it precedence. For more detailed information about the `EncryptionConfiguration` struct, please refer to the [encryption
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.01176865492016077,
0.04864560067653656,
0.051459524780511856,
0.015543930232524872,
0.03956313803792,
0.011233649216592312,
0.08381239324808121,
-0.0632200613617897,
0.12043198943138123,
0.008540702983736992,
-0.05455300211906433,
-0.12112828344106674,
0.01927381195127964,
0.007771586999297142,
0.022359853610396385,
0.007559200283139944,
-0.034207798540592194,
-0.0132523775100708,
-0.08874766528606415,
-0.06785443425178528,
0.04790661856532097,
-0.06839948147535324,
0.026565860956907272,
-0.03849814832210541,
-0.04652784392237663,
0.0002741426869761199,
-0.008066952228546143,
0.02034079283475876,
0.03982403501868248,
0.002036088379099965,
0.004173132125288248,
-0.025005118921399117,
0.015182649716734886,
0.04348810017108917,
0.09493472427129745,
0.06229620799422264,
-0.01223519816994667,
-0.0832650363445282,
-0.07550658285617828,
0.006147286389023066,
0.06339139491319656,
-0.047594811767339706,
-0.11578747630119324,
0.0419115349650383,
-0.06697314232587814,
-0.018025213852524757,
-0.008478743955492973,
-0.06122753396630287,
-0.08655227720737457,
0.00318077951669693,
0.052892815321683884,
-0.05095305293798447,
0.007629129104316235,
-0.007085744291543961,
0.0052365693263709545,
0.011007796041667461,
-0.0794842541217804,
0.03647290915250778,
0.12034406512975693,
-0.04032384604215622,
0.10714755207300186,
-0.03106394223868847,
0.0037958717439323664,
-0.017195193096995354,
-0.06856271624565125,
0.054015230387449265,
0.012594078667461872,
0.0620146244764328,
0.040445275604724884,
-0.012423019856214523,
0.02692512422800064,
0.009819327853620052,
-0.011951742693781853,
-0.01522119902074337,
0.01036324817687273,
0.04012177884578705,
-0.09361987560987473,
0.0003492018149700016,
-0.04205438494682312,
-0.1190163642168045,
0.025303242728114128,
-0.06264910101890564,
0.04956867918372154,
-0.016667447984218597,
-0.014945556409657001,
0.025340376421809196,
-0.04080122336745262,
-0.13923481106758118,
0.07353509217500687,
0.03121551126241684,
0.008217386901378632,
-0.1090666651725769,
-0.0011663916520774364,
-0.06547365337610245,
0.052763719111680984,
0.02203207276761532,
-0.06741316616535187,
-0.02937099151313305,
-0.03592320904135704,
-0.0174206905066967,
-0.03571602329611778,
0.0020232750102877617,
0.038298968225717545,
-0.013237662613391876,
0.1061081662774086,
0.005764542613178492,
-0.059961482882499695,
-0.013956758193671703,
-0.05998765304684639,
0.12366365641355515,
0.015332666225731373,
0.051965102553367615,
0.03588628023862839,
-0.006090770475566387,
0.019765516743063927,
0.0891953706741333,
0.018856888636946678,
0.018776915967464447,
0.011536559090018272,
0.13924846053123474,
0.08885415643453598,
-0.050595276057720184,
-0.004080339800566435,
0.0478578619658947,
-0.07462852448225021,
0.0009386867750436068,
-0.046071428805589676,
9.920486126112814e-33,
0.10815071314573288,
-0.07220330089330673,
-0.012237823568284512,
-0.030628712847828865,
-0.034380339086055756,
-0.01970985159277916,
-0.0030995735432952642,
-0.011382289230823517,
-0.05549951642751694,
0.018208324909210205,
-0.050258249044418335,
0.049225814640522,
0.020344264805316925,
-0.05105997994542122,
-0.004410654306411743,
0.03257187455892563,
0.0039780936203897,
0.029535014182329178,
0.08708135783672333,
0.015094833448529243,
0.017086418345570564,
0.03769068419933319,
-0.01204815786331892,
-0.0360787957906723,
-0.006129156332463026,
-0.01883293315768242,
0.04359249398112297,
-0.0405849888920784,
0.022959880530834198,
0.006693907082080841,
-0.019615719094872475,
-0.03153479844331741,
0.04311291128396988,
0.007431585341691971,
-0.02394222840666771,
0.0328928679227829,
0.029449984431266785,
-0.00812713336199522,
-0.04321815073490143,
-0.03486326336860657,
0.025132521986961365,
-0.012028929777443409,
-0.0005213015829212964,
-0.11745502799749374,
0.05081433057785034,
-0.05090015381574631,
0.04910470172762871,
-0.0623173788189888,
0.04820256307721138,
0.013467958196997643,
-0.025162488222122192,
0.029044561088085175,
-0.020846284925937653,
-0.13033047318458557,
0.05104962736368179,
-0.024573249742388725,
0.09701734781265259,
0.04789988324046135,
-0.011816619895398617,
-0.006892531644552946,
-0.08207648247480392,
-0.03575955703854561,
-0.0023290696553885937,
-0.030999893322587013,
0.00287762563675642,
0.01665744185447693,
-0.016752032563090324,
0.028164908289909363,
-0.08409895747900009,
0.003635731525719166,
-0.08144816011190414,
0.04440692439675331,
0.05364660546183586,
0.0261329784989357,
-0.005036649759858847,
-0.03035026043653488,
-0.033476296812295914,
0.05791795253753662,
-0.08513031154870987,
-0.01074556540697813,
0.009801835753023624,
-0.007024381775408983,
-0.001326333382166922,
0.10419222712516785,
-0.08869577944278717,
0.020662784576416016,
-0.01118297129869461,
-0.008760356344282627,
-0.0028958856128156185,
-0.0256255641579628,
0.08079425245523453,
-0.007263398263603449,
-0.0650840625166893,
-0.05535899102687836,
-0.1382487714290619,
-1.0956044486625432e-32,
0.09617041051387787,
0.03261052444577217,
-0.02389390952885151,
-0.013409116305410862,
0.03688180819153786,
0.05009465664625168,
0.033983636647462845,
0.038870830088853836,
0.021509068086743355,
-0.05768165737390518,
0.013843218795955181,
-0.031853802502155304,
0.04610321298241615,
-0.036981843411922455,
0.02740723080933094,
0.002023888286203146,
-0.062055546790361404,
0.05398445948958397,
0.0030722192022949457,
-0.014037738554179668,
-0.06011180207133293,
0.016290578991174698,
-0.01122900191694498,
0.0882953479886055,
0.03327970579266548,
-0.01672859489917755,
-0.009746409021317959,
0.032484691590070724,
-0.031937163323163986,
-0.0018295476911589503,
-0.016867144033312798,
-0.021273702383041382,
-0.07973496615886688,
0.03026982583105564,
-0.05151559039950371,
-0.11493268609046936,
-0.028764715418219566,
0.056874409317970276,
-0.037126243114471436,
-0.06778693944215775,
0.0366615355014801,
0.008787534199655056,
0.010214520618319511,
0.020133549347519875,
-0.04451674222946167,
-0.02611292526125908,
0.10076061636209488,
-0.08271542191505432,
-0.010323155671358109,
-0.07694227993488312,
0.015044757165014744,
-0.07797112315893173,
-0.06770604103803635,
0.031101766973733902,
-0.0007061867509037256,
0.08227422833442688,
0.013165283016860485,
0.06395633518695831,
-0.07560577243566513,
0.022396598011255264,
0.046550966799259186,
-0.00983644463121891,
0.0766838788986206,
0.04264514520764351,
0.04542470723390579,
-0.019206495955586433,
-0.04785299673676491,
-0.008024861104786396,
0.00511705270037055,
0.002346471417695284,
0.0012271658051759005,
-0.046126823872327805,
-0.015756884589791298,
0.020807772874832153,
0.0011459514498710632,
-0.012125466018915176,
0.04708458483219147,
-0.07313843071460724,
0.03431769460439682,
0.0656166821718216,
-0.04564974084496498,
-0.004134754650294781,
-0.078170545399189,
0.046402983367443085,
0.09285978227853775,
0.022462772205471992,
-0.004548313561826944,
0.06990746408700943,
0.003009352134540677,
0.07885205745697021,
-0.09240572154521942,
0.004338678438216448,
-0.04074137285351753,
0.11788196861743927,
0.028271455317735672,
-5.4864148779643074e-8,
0.006723801139742136,
0.06314115971326828,
-0.10937045514583588,
0.03366701677441597,
0.0010832622647285461,
-0.03669603914022446,
0.003148421412333846,
-0.05412290617823601,
-0.05430283397436142,
-0.025359846651554108,
0.007049428764730692,
0.008396740071475506,
-0.04840582609176636,
0.008809893392026424,
0.009245333261787891,
0.014553463086485863,
-0.024558188393712044,
0.015641700476408005,
0.008074715733528137,
-0.05021714046597481,
-0.04036044329404831,
-0.019024191424250603,
-0.09541680663824081,
0.008665412664413452,
0.06877782195806503,
0.10852828621864319,
-0.0025823605246841908,
0.08800847083330154,
0.03808847814798355,
0.09559988975524902,
0.004138226620852947,
-0.09305527806282043,
-0.0039787027053534985,
0.049423348158597946,
-0.06723430752754211,
0.038912877440452576,
-0.12120885401964188,
0.03684801235795021,
0.06880877912044525,
0.10392110794782639,
0.0299522802233696,
-0.006894872989505529,
-0.04238881543278694,
0.04388736933469772,
-0.04877157881855965,
0.09741467982530594,
0.01812375709414482,
0.0517437681555748,
-0.0014829166466370225,
0.0102427639067173,
-0.05441667139530182,
-0.058128777891397476,
-0.05161689221858978,
0.06749537587165833,
-0.035606395453214645,
0.037284646183252335,
0.00924182590097189,
-0.02860167995095253,
0.0738358423113823,
-0.02502640336751938,
0.04527616873383522,
-0.06081977114081383,
-0.03703710809350014,
-0.0463971383869648
] | 0.087428
|
because of trailing "." - events providers: - identity: {} # and then other entries in resources ``` Ensure that the exemption is listed \_before\_ the wildcard '`\*.\*`' item in the resources array to give it precedence. For more detailed information about the `EncryptionConfiguration` struct, please refer to the [encryption configuration API](/docs/reference/config-api/apiserver-config.v1/). {{< caution >}} If any resource is not readable via the encryption configuration (because keys were changed), and you cannot restore a working configuration, your only recourse is to delete that entry from the underlying etcd directly. Any calls to the Kubernetes API that attempt to read that resource will fail until it is deleted or a valid decryption key is provided. {{< /caution >}} ### Available providers {#providers} Before you configure encryption-at-rest for data in your cluster's Kubernetes API, you need to select which provider(s) you will use. The following table describes each available provider. Providers for Kubernetes encryption at rest | Name | Encryption | Strength | Speed | Key length | | --- | --- | --- | --- | --- | | identity | **None** | N/A | N/A | N/A | | Resources written as-is without encryption. When set as the first provider, the resource will be decrypted as new values are written. Existing encrypted resources are **not** automatically overwritten with the plaintext data. The identity provider is the default if you do not specify otherwise. | | | | | aescbc | AES-CBC with [PKCS#7](https://datatracker.ietf.org/doc/html/rfc2315) padding | Weak | Fast | 16, 24, or 32-byte | | Not recommended due to CBC's vulnerability to padding oracle attacks. Key material accessible from control plane host. | | | | | aesgcm | AES-GCM with random nonce | Must be rotated every 200,000 writes | Fastest | 16, 24, or 32-byte | | Not recommended for use except when an automated key rotation scheme is implemented. Key material accessible from control plane host. | | | | | kms v1 *(deprecated since Kubernetes v1.28)* | Uses envelope encryption scheme with DEK per resource. | Strongest | Slow (*compared to kms version 2*) | 32-bytes | | Data is encrypted by data encryption keys (DEKs) using AES-GCM; DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS). Simple key rotation, with a new DEK generated for each encryption, and KEK rotation controlled by the user. Read how to [configure the KMS V1 provider](/docs/tasks/administer-cluster/kms-provider#configuring-the-kms-provider-kms-v1). | | | | | kms v2 | Uses envelope encryption scheme with DEK per API server. | Strongest | Fast | 32-bytes | | Data is encrypted by data encryption keys (DEKs) using AES-GCM; DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS). Kubernetes generates a new DEK per encryption from a secret seed. The seed is rotated whenever the KEK is rotated. A good choice if using a third party tool for key management. Available as stable from Kubernetes v1.29. Read how to [configure the KMS V2 provider](/docs/tasks/administer-cluster/kms-provider#configuring-the-kms-provider-kms-v2). | | | | | secretbox | XSalsa20 and Poly1305 | Strong | Faster | 32-byte | | Uses relatively new encryption technologies that may not be considered acceptable in environments that require high levels of review. Key material accessible from control plane host. | | | | The `identity` provider is the default if you do not specify otherwise. \*\*The `identity` provider does not encrypt stored data and provides \_no\_ additional confidentiality protection.\*\* ### Key storage #### Local key storage Encrypting secret data with a locally managed key protects against an etcd compromise, but it fails to protect
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.03414032608270645,
0.08134514093399048,
0.06739308685064316,
-0.0028823385946452618,
0.0524752214550972,
0.028775718063116074,
0.022080576047301292,
-0.06603638082742691,
0.09121482819318771,
0.001741105574183166,
-0.0012804423458874226,
-0.012705747969448566,
0.03850730136036873,
0.02785913273692131,
0.0194252822548151,
0.009450008161365986,
-0.025027530267834663,
0.025651680305600166,
-0.08464324474334717,
-0.01970009133219719,
0.03894827514886856,
-0.043312594294548035,
0.06016649305820465,
-0.00048537662951275706,
-0.017047595232725143,
0.018659450113773346,
0.029373273253440857,
0.04667805880308151,
0.00073756102938205,
0.011297225020825863,
-0.004921669606119394,
-0.03140351176261902,
-0.017174288630485535,
-0.005078345537185669,
0.01787523552775383,
0.05313068628311157,
0.058312010020017624,
-0.07856911420822144,
-0.06236223876476288,
0.03723640739917755,
0.04771266132593155,
-0.02739761769771576,
-0.15333852171897888,
0.018130816519260406,
-0.060803163796663284,
0.006191824562847614,
-0.00950535200536251,
-0.05968785285949707,
-0.045557651668787,
-0.058817289769649506,
0.09319009631872177,
0.03093554824590683,
-0.01711638830602169,
-0.01851815916597843,
-0.03976460546255112,
-0.019614731892943382,
-0.04390296712517738,
0.07846848666667938,
0.08526259660720825,
-0.08772412687540054,
0.07598229497671127,
-0.0061990791000425816,
0.0491488017141819,
0.030152371153235435,
-0.08415000140666962,
0.08656769245862961,
0.029208015650510788,
0.023580685257911682,
0.022666020318865776,
-0.01118179690092802,
0.09691757708787918,
0.000638728030025959,
-0.009432234801352024,
0.02964426763355732,
0.04022529348731041,
0.013236944563686848,
-0.06298354268074036,
0.022707119584083557,
-0.021329840645194054,
-0.07679134607315063,
0.05374513939023018,
-0.039505381137132645,
0.06964994221925735,
0.016173526644706726,
-0.0490427240729332,
-0.018925433978438377,
-0.025480760261416435,
-0.12766101956367493,
0.08042479306459427,
0.009387071244418621,
-0.0006667044945061207,
-0.10301826149225235,
-0.007423009257763624,
-0.038327284157276154,
0.08722679316997528,
0.02216426283121109,
-0.011880489066243172,
-0.05497761815786362,
-0.01874598115682602,
-0.049407899379730225,
-0.04889785125851631,
0.0013343289028853178,
-0.03191224858164787,
-0.0037367295008152723,
0.06201697885990143,
0.02927960269153118,
-0.059798214584589005,
-0.003641257295385003,
-0.04658931866288185,
0.0998726338148117,
0.030951226130127907,
0.033968470990657806,
0.015804700553417206,
0.036124568432569504,
0.002933486830443144,
0.10519000887870789,
-0.05887027084827423,
0.05291619524359703,
0.005292532499879599,
0.06611622124910355,
0.0242170337587595,
-0.0710565522313118,
0.010335033759474754,
0.10826794058084488,
-0.04573242738842964,
0.055229708552360535,
-0.030240710824728012,
2.281976897675737e-33,
0.07577308267354965,
-0.07030363380908966,
-0.03353675827383995,
-0.024577701464295387,
-0.010480460710823536,
-0.013295509852468967,
0.05148201808333397,
0.0071907867677509785,
-0.006625799462199211,
-0.016971614211797714,
-0.027485528960824013,
0.0037022088654339314,
-0.012804139405488968,
-0.06651119142770767,
-0.015410887077450752,
0.009315372444689274,
0.06724324077367783,
0.003990450408309698,
0.10446708649396896,
0.015745950862765312,
0.04645330458879471,
0.10570661723613739,
0.05350164324045181,
-0.020686877891421318,
-0.001891554449684918,
-0.005714557133615017,
0.04316749423742294,
-0.007235536351799965,
0.020112590864300728,
-0.017189882695674896,
-0.02471521869301796,
-0.04498100280761719,
0.06311973929405212,
-0.010070652700960636,
-0.07078307121992111,
0.03704247996211052,
0.0343000628054142,
0.005699298344552517,
-0.10193312913179398,
-0.028502637520432472,
0.07044067233800888,
0.020467862486839294,
-0.026203349232673645,
-0.1091613844037056,
0.04289763793349266,
-0.05649007111787796,
0.03524888679385185,
0.013014650903642178,
0.012992613017559052,
0.04670260101556778,
-0.06923403590917587,
0.032930389046669006,
-0.006250787992030382,
-0.11920900642871857,
-0.0016257825773209333,
-0.06359582394361496,
0.06821342557668686,
-0.0046130595728755,
-0.04933665320277214,
-0.038552239537239075,
-0.019094815477728844,
-0.03667113557457924,
0.014456763863563538,
0.006203357595950365,
0.031400468200445175,
-0.02272636815905571,
-0.025097360834479332,
-0.024824244901537895,
-0.052799854427576065,
-0.002895937068387866,
-0.07513775676488876,
0.03333503380417824,
-0.004826027434319258,
0.03863713517785072,
0.03321157023310661,
-0.05957300215959549,
-0.03704823926091194,
0.06253574043512344,
-0.002289386233314872,
-0.044258590787649155,
0.06779764592647552,
0.04662705212831497,
-0.012447240762412548,
0.06993726640939713,
-0.07671571522951126,
-0.0045707859098911285,
-0.01113796140998602,
-0.014716136269271374,
-0.020123913884162903,
-0.012382125481963158,
0.10702309012413025,
-0.025467175990343094,
0.03528348356485367,
-0.029712995514273643,
-0.07473267614841461,
-3.4445128926481474e-33,
0.0791696086525917,
-0.06068195402622223,
0.02891593798995018,
-0.007701815105974674,
0.05643605440855026,
0.05467511713504791,
0.004833710379898548,
0.09140995144844055,
0.02566281519830227,
-0.07083608955144882,
-0.022410854697227478,
-0.07721500843763351,
0.08994125574827194,
-0.04273873195052147,
0.015235747210681438,
0.06443451344966888,
-0.06212395802140236,
0.00985498446971178,
0.012414774857461452,
0.026411006227135658,
-0.02867848612368107,
0.02672499418258667,
0.007555051241070032,
0.056615427136421204,
0.0702386200428009,
0.0235430970788002,
-0.023014532402157784,
0.04603118449449539,
-0.01873566396534443,
-0.06167391687631607,
-0.010471588931977749,
-0.00481807254254818,
-0.01905645802617073,
0.028983432799577713,
-0.04163593053817749,
-0.08643870055675507,
-0.004957548342645168,
0.056109268218278885,
-0.05993661656975746,
-0.08636645972728729,
-0.019527755677700043,
0.008990416303277016,
-0.040535010397434235,
0.004857909400016069,
0.008905290625989437,
-0.04990185797214508,
0.06268373131752014,
-0.05607892945408821,
0.005943408701568842,
-0.04022159427404404,
-0.01522295456379652,
-0.0686374306678772,
-0.015789492055773735,
0.010158317163586617,
0.013715374283492565,
0.05654771998524666,
0.05840642750263214,
0.06770486384630203,
-0.01938796415925026,
0.01565122976899147,
0.04680050536990166,
0.007042101118713617,
0.05684725195169449,
0.1008777841925621,
0.016942478716373444,
0.013731046579778194,
-0.07690971344709396,
-0.07328354567289352,
-0.02220589853823185,
-0.018389973789453506,
-0.027379648759961128,
-0.0731845572590828,
-0.022784560918807983,
0.020338915288448334,
-0.0068733268417418,
-0.042585525661706924,
-0.008382597006857395,
-0.020456336438655853,
0.02738756313920021,
0.0835006982088089,
-0.05436582863330841,
-0.01359188836067915,
-0.11738286912441254,
0.0845196545124054,
0.050958987325429916,
0.04940399155020714,
0.06421845406293869,
0.07124213874340057,
-0.004147261846810579,
0.08360866457223892,
-0.0735919177532196,
-0.059792034327983856,
-0.039755143225193024,
0.16195762157440186,
0.0704183280467987,
-4.989237112340561e-8,
0.02183963917195797,
0.023590166121721268,
-0.10641060769557953,
0.06724204868078232,
0.0546053871512413,
-0.08347821980714798,
0.032156262546777725,
-0.05653584375977516,
-0.07716578990221024,
-0.07140149176120758,
-0.0038289250805974007,
0.03918135166168213,
-0.009284304454922676,
0.001592426560819149,
0.02963935397565365,
-0.034098006784915924,
0.0052316379733383656,
0.011422164738178253,
0.00404448714107275,
-0.06936949491500854,
-0.019070405513048172,
-0.058260004967451096,
-0.10644696652889252,
-0.005075110122561455,
0.0964844599366188,
0.09908060729503632,
0.06571852415800095,
0.05407435819506645,
0.0642610490322113,
0.09120342135429382,
-0.10835155844688416,
-0.14208845794200897,
0.026215488091111183,
0.028346991166472435,
-0.07060609012842178,
0.009481921792030334,
-0.06217784807085991,
0.01750919036567211,
0.09040208905935287,
0.045338574796915054,
0.0026050095912069082,
0.006515225861221552,
-0.012332363054156303,
0.011700152419507504,
0.011001236736774445,
0.014992774464190006,
0.025403732433915138,
0.06365463137626648,
-0.049570418894290924,
0.030192719772458076,
-0.07295931130647659,
-0.07697843760251999,
-0.062087588012218475,
-0.0034051716793328524,
-0.01406888384371996,
0.033538784831762314,
-0.015221447683870792,
-0.08280777186155319,
0.025929974392056465,
0.004407602362334728,
-0.006002515554428101,
-0.05122409760951996,
-0.03724193945527077,
-0.08109400421380997
] | -0.033405
|
`identity` provider is the default if you do not specify otherwise. \*\*The `identity` provider does not encrypt stored data and provides \_no\_ additional confidentiality protection.\*\* ### Key storage #### Local key storage Encrypting secret data with a locally managed key protects against an etcd compromise, but it fails to protect against a host compromise. Since the encryption keys are stored on the host in the EncryptionConfiguration YAML file, a skilled attacker can access that file and extract the encryption keys. #### Managed (KMS) key storage {#kms-key-storage} The KMS provider uses \_envelope encryption\_: Kubernetes encrypts resources using a data key, and then encrypts that data key using the managed encryption service. Kubernetes generates a unique data key for each resource. The API server stores an encrypted version of the data key in etcd alongside the ciphertext; when reading the resource, the API server calls the managed encryption service and provides both the ciphertext and the (encrypted) data key. Within the managed encryption service, the provider use a \_key encryption key\_ to decipher the data key, deciphers the data key, and finally recovers the plain text. Communication between the control plane and the KMS requires in-transit protection, such as TLS. Using envelope encryption creates dependence on the key encryption key, which is not stored in Kubernetes. In the KMS case, an attacker who intends to get unauthorised access to the plaintext values would need to compromise etcd \*\*and\*\* the third-party KMS provider. ### Protection for encryption keys You should take appropriate measures to protect the confidential information that allows decryption, whether that is a local encryption key, or an authentication token that allows the API server to call KMS. Even when you rely on a provider to manage the use and lifecycle of the main encryption key (or keys), you are still responsible for making sure that access controls and other security measures for the managed encryption service are appropriate for your security needs. ## Encrypt your data {#encrypting-your-data} ### Generate the encryption key {#generate-key-no-kms} The following steps assume that you are not using KMS, and therefore the steps also assume that you need to generate an encryption key. If you already have an encryption key, skip to [Write an encryption configuration file](#write-an-encryption-configuration-file). {{< caution >}} Storing the raw encryption key in the EncryptionConfig only moderately improves your security posture, compared to no encryption. For additional secrecy, consider using the `kms` provider as this relies on keys held outside your Kubernetes cluster. Implementations of `kms` can work with hardware security modules or with encryption services managed by your cloud provider. To learn about setting up encryption at rest using KMS, see [Using a KMS provider for data encryption](/docs/tasks/administer-cluster/kms-provider/). The KMS provider plugin that you use may also come with additional specific documentation. {{< /caution >}} Start by generating a new encryption key, and then encode it using base64: {{< tabs name="generate\_encryption\_key" >}} {{% tab name="Linux" %}} Generate a 32-byte random key and base64 encode it. You can use this command: ```shell head -c 32 /dev/urandom | base64 ``` You can use `/dev/hwrng` instead of `/dev/urandom` if you want to use your PC's built-in hardware entropy source. Not all Linux devices provide a hardware random generator. {{% /tab %}} {{% tab name="macOS" %}} Generate a 32-byte random key and base64 encode it. You can use this command: ```shell head -c 32 /dev/urandom | base64 ``` {{% /tab %}} {{% tab name="Windows" %}} Generate a 32-byte random key and base64 encode it. You can use this command: ```powershell # Do not run this in a session where you have set a random number #
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.041786935180425644,
0.09812814742326736,
0.0766577273607254,
-0.008912939578294754,
0.02419225312769413,
0.01593632809817791,
0.05400737747550011,
-0.028195397928357124,
0.12238197773694992,
0.049158576875925064,
-0.0063478099182248116,
-0.008721929974853992,
0.0798204094171524,
-0.04734271764755249,
0.028514960780739784,
0.008989091031253338,
-0.0023831718135625124,
0.037545155733823776,
-0.09172175079584122,
-0.02807680517435074,
0.040004488080739975,
-0.05177821218967438,
0.022736553102731705,
-0.010916972532868385,
-0.04375029355287552,
0.001892706612125039,
0.0736449658870697,
0.06674649566411972,
0.03340749815106392,
-0.025581015273928642,
-0.033085897564888,
-0.07893460243940353,
0.018349891528487206,
0.04873024299740791,
-0.03721027448773384,
0.04150541126728058,
0.0612015426158905,
-0.016192255541682243,
-0.125313401222229,
0.04586845263838768,
0.02677167020738125,
-0.04945230856537819,
-0.1492817997932434,
-0.019911697134375572,
-0.02537308633327484,
0.046940408647060394,
-0.024204149842262268,
-0.054396141320466995,
-0.07446243613958359,
-0.03646355867385864,
0.04273556172847748,
0.004861666355282068,
-0.010536552406847477,
0.049046773463487625,
-0.07372282445430756,
-0.014947645366191864,
-0.08542439341545105,
0.07023263722658157,
0.07111717015504837,
0.02839907817542553,
0.05344934016466141,
0.0014877759385854006,
0.037006307393312454,
0.05822445824742317,
-0.040477454662323,
0.07129552960395813,
0.015818720683455467,
0.005140481051057577,
0.013371076434850693,
-0.0843389630317688,
0.09638911485671997,
-0.0680769830942154,
-0.02437531016767025,
0.003215003991499543,
0.07010407745838165,
-0.026826761662960052,
-0.07658138126134872,
0.019865212962031364,
0.02815745398402214,
-0.06285489350557327,
0.04432019218802452,
0.062090836465358734,
0.0509176068007946,
0.016895590350031853,
-0.08614335209131241,
-0.004434289410710335,
-0.00005303742000251077,
-0.03721063956618309,
-0.003857176285237074,
-0.011551602743566036,
-0.00398252485319972,
-0.0803486779332161,
-0.008318631909787655,
-0.06803081929683685,
0.10298722237348557,
0.038974568247795105,
-0.05723545327782631,
-0.023121992126107216,
0.020437758415937424,
-0.06883473694324493,
-0.017962973564863205,
0.04583103954792023,
-0.07169947028160095,
-0.029596054926514626,
0.06573863327503204,
-0.009545098058879375,
-0.02751448005437851,
-0.02113174833357334,
0.007904411293566227,
0.14336611330509186,
0.02456481009721756,
0.02943325974047184,
-0.009565852582454681,
0.04119139909744263,
0.013332685455679893,
0.016442561522126198,
-0.06018299609422684,
0.017361637204885483,
0.0762733668088913,
0.05111920088529587,
0.027468688786029816,
-0.10407357662916183,
0.009135443717241287,
0.05903785303235054,
-0.10520681738853455,
0.08300389349460602,
-0.021154016256332397,
6.55847456979316e-33,
0.013313014060258865,
-0.04375924915075302,
0.03656638786196709,
-0.03628725931048393,
-0.08790919929742813,
-0.05384267866611481,
-0.011443478055298328,
0.017245417460799217,
-0.058759648352861404,
-0.014849895611405373,
-0.06842488795518875,
0.022806646302342415,
0.01710442081093788,
-0.03439110144972801,
-0.00605827197432518,
0.05470891296863556,
-0.026351159438490868,
0.038169655948877335,
0.10783208161592484,
0.043959811329841614,
0.015643950551748276,
0.05532127991318703,
0.06441711634397507,
0.022976668551564217,
0.0615851990878582,
-0.01711457595229149,
0.04170815274119377,
-0.05600610747933388,
0.033148907124996185,
-0.007944338023662567,
-0.03535504639148712,
-0.06109245494008064,
0.0194515623152256,
0.016191361472010612,
-0.07101700454950333,
0.10190972685813904,
-0.007867657579481602,
0.003560759127140045,
-0.1027427464723587,
-0.027850773185491562,
0.03544282168149948,
-0.010020100511610508,
-0.026798991486430168,
-0.04119662940502167,
-0.03854192793369293,
-0.012187969870865345,
0.006134953815490007,
-0.0015967492945492268,
0.03232854604721069,
0.027836589142680168,
-0.05862133949995041,
-0.0016730723436921835,
-0.036692965775728226,
-0.03415410965681076,
0.051993418484926224,
-0.008917218074202538,
0.1025138646364212,
-0.07565981894731522,
-0.05980994179844856,
0.007784769870340824,
-0.08927774429321289,
-0.06464706361293793,
0.030239298939704895,
0.06051107496023178,
0.07636968046426773,
-0.0759599506855011,
-0.007131613790988922,
-0.04061378538608551,
-0.07392897456884384,
-0.016945190727710724,
-0.06668797135353088,
0.03387589752674103,
0.036453742533922195,
0.012043657712638378,
-0.05088718608021736,
-0.05679849535226822,
-0.01702462136745453,
0.04561169445514679,
-0.031989261507987976,
0.011293123476207256,
0.049473002552986145,
0.0012871911749243736,
0.007206126116216183,
0.07055912911891937,
-0.0926339402794838,
0.008249607868492603,
-0.004893109668046236,
-0.010084683075547218,
0.026279190555214882,
0.010298552922904491,
0.042161792516708374,
-0.015338770113885403,
-0.024824464693665504,
0.005509336479008198,
-0.0988088846206665,
-6.291354498828334e-33,
0.04129515960812569,
-0.04709937050938606,
-0.012800322845578194,
0.02759357914328575,
0.027478326112031937,
0.08455131947994232,
0.025063782930374146,
0.1108413115143776,
0.009006720036268234,
-0.03230532258749008,
0.0011956547386944294,
-0.06151370331645012,
0.09736005961894989,
-0.009053950197994709,
0.06943099945783615,
0.014077862724661827,
-0.046525463461875916,
0.020193450152873993,
0.0014864711556583643,
0.02621895633637905,
-0.06000297889113426,
-0.007264924701303244,
0.0220891535282135,
0.07991890609264374,
0.05430138111114502,
0.049461640417575836,
-0.037165481597185135,
0.0969742089509964,
-0.047871898859739304,
-0.05726425722241402,
0.06677883863449097,
-0.03789577633142471,
-0.03929883614182472,
-0.045609284192323685,
-0.0672910213470459,
-0.0884568989276886,
-0.0099929329007864,
0.024454265832901,
-0.053327467292547226,
-0.0487603023648262,
-0.059897348284721375,
0.008509252220392227,
-0.024280119687318802,
0.013690455816686153,
-0.007923069410026073,
-0.07210376858711243,
0.05076489597558975,
-0.012390460819005966,
0.03205348178744316,
-0.08409813791513443,
0.005775578785687685,
-0.03539326786994934,
-0.028308941051363945,
0.034377943724393845,
-0.035334303975105286,
0.059908799827098846,
0.04217556491494179,
0.100960373878479,
-0.020313197746872902,
-0.04312640056014061,
0.08031139522790909,
-0.06416644901037216,
0.07829735428094864,
0.10097458213567734,
-0.043357525020837784,
-0.0029021913651376963,
0.008048754185438156,
-0.07213860750198364,
-0.06492650508880615,
0.02373584918677807,
-0.030734220519661903,
-0.10918714851140976,
0.02493107132613659,
-0.01842869073152542,
-0.009628988802433014,
-0.034443482756614685,
0.01871477998793125,
-0.019985275343060493,
0.0233309343457222,
0.025134369730949402,
0.003973395563662052,
-0.009552860632538795,
-0.07252836972475052,
0.08859509974718094,
0.07174643874168396,
-0.006228884216398001,
0.09228691458702087,
0.047749947756528854,
-0.0014694957062602043,
0.05699500814080238,
-0.06557455658912659,
-0.004053759388625622,
-0.1538035273551941,
0.0830945372581482,
0.05856369063258171,
-4.9076696484462445e-8,
0.020264368504285812,
-0.0012993158306926489,
-0.0571596585214138,
0.020838676020503044,
-0.027030928060412407,
-0.06203385815024376,
0.03228386119008064,
-0.020505521446466446,
-0.06421317905187607,
-0.057298701256513596,
0.050255145877599716,
0.02097279764711857,
-0.07685534656047821,
-0.022776544094085693,
0.028350893408060074,
0.016495663672685623,
0.029411476105451584,
0.024723198264837265,
0.012012642808258533,
-0.056722741574048996,
-0.039714764803647995,
-0.023148059844970703,
-0.04741424694657326,
-0.03098229505121708,
0.07083296030759811,
0.10675396025180817,
0.06358172744512558,
0.05377303063869476,
0.07521042227745056,
0.08119161427021027,
-0.07372964918613434,
-0.09999926388263702,
0.018463866785168648,
0.02692803367972374,
-0.035569097846746445,
0.05467582494020462,
-0.03793226182460785,
0.0300101637840271,
0.025863634422421455,
0.049507685005664825,
-0.018995508551597595,
-0.03821520507335663,
-0.013940764591097832,
0.044887252151966095,
-0.0004776380374096334,
0.05149335414171219,
0.02548973448574543,
0.06784997135400772,
-0.050322163850069046,
0.04528855159878731,
-0.05496864765882492,
-0.09281883388757706,
-0.01844611205160618,
0.0388488806784153,
-0.03896389156579971,
0.011071422137320042,
-0.03281015157699585,
-0.03127575293183327,
0.055009812116622925,
0.026495181024074554,
-0.04400373995304108,
-0.0030107481870800257,
0.0357089526951313,
-0.02968852035701275
] | 0.093134
|
can use this command: ```shell head -c 32 /dev/urandom | base64 ``` {{% /tab %}} {{% tab name="Windows" %}} Generate a 32-byte random key and base64 encode it. You can use this command: ```powershell # Do not run this in a session where you have set a random number # generator seed. [Convert]::ToBase64String((1..32|%{[byte](Get-Random -Max 256)})) ``` {{% /tab %}} {{< /tabs >}} {{< note >}} Keep the encryption key confidential, including while you generate it and ideally even after you are no longer actively using it. {{< /note >}} ### Replicate the encryption key Using a secure mechanism for file transfer, make a copy of that encryption key available to every other control plane host. At a minimum, use encryption in transit - for example, secure shell (SSH). For more security, use asymmetric encryption between hosts, or change the approach you are using so that you're relying on KMS encryption. ### Write an encryption configuration file {{< caution >}} The encryption configuration file may contain keys that can decrypt content in etcd. If the configuration file contains any key material, you must properly restrict permissions on all your control plane hosts so only the user who runs the kube-apiserver can read this configuration. {{< /caution >}} Create a new encryption configuration file. The contents should be similar to: ```yaml --- apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets - configmaps - pandas.awesome.bears.example providers: - aescbc: keys: - name: key1 # See the following text for more details about the secret value secret: - identity: {} # this fallback allows reading unencrypted secrets; # for example, during initial migration ``` To create a new encryption key (that does not use KMS), see [Generate the encryption key](#generate-key-no-kms). ### Use the new encryption configuration file You will need to mount the new encryption config file to the `kube-apiserver` static pod. Here is an example on how to do that: 1. Save the new encryption config file to `/etc/kubernetes/enc/enc.yaml` on the control-plane node. 1. Edit the manifest for the `kube-apiserver` static pod: `/etc/kubernetes/manifests/kube-apiserver.yaml` so that it is similar to: ```yaml --- # # This is a fragment of a manifest for a static Pod. # Check whether this is correct for your cluster and for your API server. # apiVersion: v1 kind: Pod metadata: annotations: kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 10.20.30.40:443 creationTimestamp: null labels: app.kubernetes.io/component: kube-apiserver tier: control-plane name: kube-apiserver namespace: kube-system spec: containers: - command: - kube-apiserver ... - --encryption-provider-config=/etc/kubernetes/enc/enc.yaml # add this line volumeMounts: ... - name: enc # add this line mountPath: /etc/kubernetes/enc # add this line readOnly: true # add this line ... volumes: ... - name: enc # add this line hostPath: # add this line path: /etc/kubernetes/enc # add this line type: DirectoryOrCreate # add this line ... ``` 1. Restart your API server. {{< caution >}} Your config file contains keys that can decrypt the contents in etcd, so you must properly restrict permissions on your control-plane nodes so only the user who runs the `kube-apiserver` can read it. {{< /caution >}} You now have encryption in place for \*\*one\*\* control plane host. A typical Kubernetes cluster has multiple control plane hosts, so there is more to do. ### Reconfigure other control plane hosts {#api-server-config-update-more} If you have multiple API servers in your cluster, you should deploy the changes in turn to each API server. {{< caution >}} For cluster configurations with two or more control plane nodes, the encryption configuration should be identical across each control plane node. If there is a difference in the encryption provider configuration between control plane nodes, this difference may mean that the kube-apiserver
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
0.04527755454182625,
0.04870530590415001,
-0.12910379469394684,
0.03481572866439819,
-0.019408369436860085,
0.02329397201538086,
0.023333212360739708,
-0.033860448747873306,
0.013056900352239609,
0.08910577744245529,
-0.06004316732287407,
-0.020869038999080658,
0.07010546326637268,
-0.027195017784833908,
-0.014220375567674637,
-0.004863765090703964,
-0.06143280118703842,
0.02490967884659767,
-0.047098223119974136,
-0.05095546692609787,
0.04497978836297989,
-0.05147029832005501,
0.07081116735935211,
-0.04983675852417946,
-0.06137662008404732,
-0.04074699059128761,
0.06515630334615707,
0.03238285332918167,
0.013482892885804176,
-0.0026235657278448343,
0.04643364995718002,
0.011338330805301666,
-0.04459596425294876,
-0.0010659241816028953,
0.06341171264648438,
0.012593256309628487,
-0.02725006826221943,
-0.0018000869313254952,
0.016262071207165718,
-0.03397589921951294,
0.033576223999261856,
-0.031009342521429062,
-0.0837697982788086,
0.0313442088663578,
-0.07526730746030807,
-0.026986006647348404,
0.021608645096421242,
0.01413598470389843,
-0.06673687696456909,
0.005885987542569637,
-0.029043713584542274,
0.03827126696705818,
-0.07594183832406998,
-0.011332212947309017,
-0.09785942733287811,
-0.05148763582110405,
-0.05151316523551941,
-0.0012705031549558043,
-0.024690881371498108,
-0.07301533222198486,
-0.025969335809350014,
-0.043582577258348465,
-0.008032819256186485,
-0.03631711006164551,
-0.09130417555570602,
0.07432632148265839,
0.06774017214775085,
0.05891791358590126,
0.07294847071170807,
0.04240857809782028,
-0.03547921031713486,
-0.059680234640836716,
-0.03353900462388992,
0.06285475194454193,
-0.023899126797914505,
0.005274113733321428,
-0.012056986801326275,
0.011224880814552307,
-0.016538240015506744,
-0.04253526031970978,
-0.008400428108870983,
-0.09378380328416824,
0.07856328040361404,
0.013210179284214973,
0.000294532161206007,
0.08569043129682541,
0.06156368926167488,
0.04423556104302406,
0.06544215977191925,
0.0223667174577713,
-0.0332738533616066,
0.017459772527217865,
0.012954032979905605,
0.0000635303949820809,
0.044993892312049866,
-0.0006845758180133998,
0.06849644333124161,
-0.057691846042871475,
-0.033140555024147034,
-0.010009778663516045,
-0.001026483136229217,
-0.0010695564560592175,
0.09645627439022064,
0.01346068736165762,
0.022192612290382385,
0.0369284488260746,
-0.0075087770819664,
0.03641084209084511,
0.05373384431004524,
0.02202039211988449,
-0.0010247011668980122,
0.1005299985408783,
-0.032839518040418625,
-0.012529769912362099,
0.016497785225510597,
0.041389964520931244,
-0.058253079652786255,
0.05634657293558121,
0.02011563628911972,
0.10758531838655472,
0.02251729927957058,
0.0032682556193321943,
-0.0627671480178833,
0.025204790756106377,
-0.1223217025399208,
-0.0055290223099291325,
0.02441371977329254,
4.004302036950937e-33,
0.04380107671022415,
-0.008964892476797104,
-0.0010986544657498598,
0.02022952400147915,
0.09491443634033203,
0.07298806309700012,
0.10338753461837769,
0.03673765808343887,
-0.050873056054115295,
0.042052868753671646,
-0.12456105649471283,
-0.08380752801895142,
0.00625306461006403,
-0.08553864061832428,
0.042247336357831955,
0.013546690344810486,
-0.04599388688802719,
0.0011713081039488316,
0.07022266834974289,
0.01920725591480732,
0.00413192342966795,
0.03561429679393768,
0.020409338176250458,
-0.04394080862402916,
0.08110447227954865,
-0.054582495242357254,
-0.02758266218006611,
-0.011060143820941448,
0.040631089359521866,
-0.005878652911633253,
0.01909618079662323,
0.06038312986493111,
0.021460236981511116,
-0.10458478331565857,
-0.025326671078801155,
-0.058576468378305435,
-0.02984861098229885,
0.02192506194114685,
-0.0012119499733671546,
-0.0007273062947206199,
0.13940441608428955,
-0.02734386920928955,
0.07194625586271286,
0.04636659100651741,
0.004840708803385496,
-0.027367444708943367,
-0.002251545898616314,
0.0175421554595232,
0.02152206003665924,
0.07552749663591385,
0.02460404299199581,
0.01943982020020485,
-0.0367165245115757,
-0.06965092569589615,
-0.012850127182900906,
-0.09118778258562088,
-0.018581807613372803,
-0.019219117239117622,
0.018308723345398903,
0.010742117650806904,
-0.06666158884763718,
-0.0568423755466938,
0.0339638888835907,
0.04180033132433891,
0.01976328156888485,
-0.045272018760442734,
0.027063656598329544,
-0.007777737453579903,
-0.09495916962623596,
0.003435898572206497,
-0.05229648947715759,
-0.0405840240418911,
0.017325541004538536,
-0.03355865925550461,
-0.057367924600839615,
-0.05065454542636871,
-0.020946454256772995,
0.008131355047225952,
0.0448867492377758,
0.0025534576270729303,
0.05237265303730965,
0.11579962819814682,
-0.08469973504543304,
-0.06055675446987152,
-0.03106530010700226,
0.05187685415148735,
-0.012098205275833607,
-0.044036805629730225,
-0.032888397574424744,
0.014323781244456768,
0.08805277943611145,
-0.05189723148941994,
0.06312315911054611,
-0.1037590503692627,
-0.05680171400308609,
-5.547619590405057e-33,
-0.003984426613897085,
-0.05369539186358452,
0.005850554909557104,
0.08262024819850922,
0.039094824343919754,
0.07259543985128403,
0.022065134719014168,
-0.017015498131513596,
-0.08695091307163239,
-0.09132607281208038,
-0.033067502081394196,
0.04284702241420746,
0.10094399750232697,
-0.04673866555094719,
0.018721414729952812,
0.0017969695618376136,
-0.04983494430780411,
0.03785119578242302,
0.03622753545641899,
-0.015495114959776402,
-0.03245975449681282,
0.006855067331343889,
-0.01812935620546341,
0.10672113299369812,
0.1028556227684021,
-0.024204937741160393,
-0.019574621692299843,
0.08841393142938614,
0.0951116755604744,
-0.011926593258976936,
-0.03894861042499542,
0.08682778477668762,
-0.01848488301038742,
-0.06354784220457077,
-0.027869144454598427,
-0.020707203075289726,
0.09093527495861053,
0.03779982402920723,
-0.013590562157332897,
0.05673433840274811,
-0.04255036264657974,
-0.07130558788776398,
-0.0734185203909874,
0.044481635093688965,
0.03840513527393341,
0.00634734844788909,
0.06350717693567276,
0.010413392446935177,
-0.04991469904780388,
0.05642731115221977,
0.015449956059455872,
-0.05823503062129021,
-0.10133814811706543,
-0.04980074614286423,
0.007883988320827484,
-0.06139644607901573,
-0.15091441571712494,
0.04910098761320114,
-0.07510218024253845,
-0.02516835369169712,
0.019595379009842873,
-0.013017014600336552,
0.040645379573106766,
0.06117833033204079,
-0.028600215911865234,
0.03375133126974106,
-0.029992181807756424,
0.0005052380729466677,
-0.031233765184879303,
0.08173707127571106,
0.022211512550711632,
-0.06677861511707306,
0.01860305294394493,
0.023685019463300705,
0.054265134036540985,
-0.10447316616773605,
0.04978777840733528,
-0.0231446772813797,
-0.05382104218006134,
0.01905442215502262,
0.0685243085026741,
0.07108598202466965,
-0.023306988179683685,
0.02481512539088726,
-0.020992062985897064,
-0.034188494086265564,
0.06068482622504234,
0.011794733814895153,
-0.01535700261592865,
0.04809251055121422,
-0.05938786640763283,
-0.029492609202861786,
-0.03288295492529869,
0.08946577459573746,
0.11473802477121353,
-5.106863909531967e-8,
0.05602608621120453,
0.013412396423518658,
-0.04705645143985748,
0.04378952458500862,
-0.04454168304800987,
0.020255018025636673,
-0.026000795885920525,
-0.05858724191784859,
-0.058361973613500595,
-0.1272006779909134,
0.0462723933160305,
-0.02960333786904812,
0.03079197183251381,
0.015524926595389843,
-0.035303834825754166,
0.1053403913974762,
-0.017873885110020638,
-0.058763839304447174,
0.017759155482053757,
-0.035535480827093124,
0.0011129993945360184,
0.01977447234094143,
-0.002510270569473505,
0.028040561825037003,
0.05998450890183449,
0.047013841569423676,
0.004579570144414902,
0.011895798146724701,
-0.05452874302864075,
0.001023781020194292,
-0.06499795615673065,
-0.14771461486816406,
0.0031920664478093386,
0.019083142280578613,
-0.012934890575706959,
-0.04009133577346802,
-0.012405476532876492,
-0.08402189612388611,
0.02625366486608982,
0.006601016502827406,
0.11139678955078125,
-0.016900544986128807,
-0.04759770631790161,
0.008962379768490791,
-0.08593803644180298,
-0.004555884283035994,
-0.013167592696845531,
0.03208848088979721,
-0.0031774600502103567,
0.03628389909863472,
-0.008336227387189865,
-0.0039153327234089375,
-0.015720706433057785,
0.05367749556899071,
-0.02914055995643139,
0.045194149017333984,
-0.027889607474207878,
0.02292996272444725,
0.08856254816055298,
0.031128276139497757,
-0.0016049107071012259,
0.05280531942844391,
-0.031750958412885666,
-0.08679130673408508
] | -0.046451
|
turn to each API server. {{< caution >}} For cluster configurations with two or more control plane nodes, the encryption configuration should be identical across each control plane node. If there is a difference in the encryption provider configuration between control plane nodes, this difference may mean that the kube-apiserver can't decrypt data. {{< /caution >}} When you are planning to update the encryption configuration of your cluster, plan this so that the API servers in your control plane can always decrypt the stored data (even part way through rolling out the change). Make sure that you use the \*\*same\*\* encryption configuration on each control plane host. ### Verify that newly written data is encrypted {#verifying-that-data-is-encrypted} Data is encrypted when written to etcd. After restarting your `kube-apiserver`, any newly created or updated Secret (or other resource kinds configured in `EncryptionConfiguration`) should be encrypted when stored. To check this, you can use the `etcdctl` command line program to retrieve the contents of your secret data. This example shows how to check this for encrypting the Secret API. 1. Create a new Secret called `secret1` in the `default` namespace: ```shell kubectl create secret generic secret1 -n default --from-literal=mykey=mydata ``` 1. Using the `etcdctl` command line tool, read that Secret out of etcd: ``` ETCDCTL\_API=3 etcdctl get /registry/secrets/default/secret1 [...] | hexdump -C ``` where `[...]` must be the additional arguments for connecting to the etcd server. For example: ```shell ETCDCTL\_API=3 etcdctl \ --cacert=/etc/kubernetes/pki/etcd/ca.crt \ --cert=/etc/kubernetes/pki/etcd/server.crt \ --key=/etc/kubernetes/pki/etcd/server.key \ get /registry/secrets/default/secret1 | hexdump -C ``` The output is similar to this (abbreviated): ```hexdump 00000000 2f 72 65 67 69 73 74 72 79 2f 73 65 63 72 65 74 |/registry/secret| 00000010 73 2f 64 65 66 61 75 6c 74 2f 73 65 63 72 65 74 |s/default/secret| 00000020 31 0a 6b 38 73 3a 65 6e 63 3a 61 65 73 63 62 63 |1.k8s:enc:aescbc| 00000030 3a 76 31 3a 6b 65 79 31 3a c7 6c e7 d3 09 bc 06 |:v1:key1:.l.....| 00000040 25 51 91 e4 e0 6c e5 b1 4d 7a 8b 3d b9 c2 7c 6e |%Q...l..Mz.=..|n| 00000050 b4 79 df 05 28 ae 0d 8e 5f 35 13 2c c0 18 99 3e |.y..(...\_5.,...>| [...] 00000110 23 3a 0d fc 28 ca 48 2d 6b 2d 46 cc 72 0b 70 4c |#:..(.H-k-F.r.pL| 00000120 a5 fc 35 43 12 4e 60 ef bf 6f fe cf df 0b ad 1f |..5C.N`..o......| 00000130 82 c4 88 53 02 da 3e 66 ff 0a |...S..>f..| 0000013a ``` 1. Verify the stored Secret is prefixed with `k8s:enc:aescbc:v1:` which indicates the `aescbc` provider has encrypted the resulting data. Confirm that the key name shown in `etcd` matches the key name specified in the `EncryptionConfiguration` mentioned above. In this example, you can see that the encryption key named `key1` is used in `etcd` and in `EncryptionConfiguration`. 1. Verify the Secret is correctly decrypted when retrieved via the API: ```shell kubectl get secret secret1 -n default -o yaml ``` The output should contain `mykey: bXlkYXRh`, with contents of `mydata` encoded using base64; read [decoding a Secret](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#decoding-secret) to learn how to completely decode the Secret. ### Ensure all relevant data are encrypted {#ensure-all-secrets-are-encrypted} It's often not enough to make sure that new objects get encrypted: you also want that encryption to apply to the objects that are already stored. For this example, you have configured your cluster so that Secrets are encrypted on write. Performing a replace operation for each Secret will encrypt that content at rest, where the objects are unchanged. You can make this change across all Secrets in your cluster: ```shell
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
0.009716770611703396,
0.021729199215769768,
0.025293009355664253,
-0.015376443974673748,
0.004424688406288624,
0.0020756220910698175,
-0.06428360193967819,
-0.05513157695531845,
0.07736138999462128,
0.029489055275917053,
-0.04171700403094292,
-0.040611349046230316,
0.04629385471343994,
-0.04443373531103134,
0.03770703822374344,
0.011250559240579605,
-0.025028154253959656,
0.02177710272371769,
-0.05595165863633156,
-0.07304294407367706,
0.03144355118274689,
-0.05993982404470444,
0.019555561244487762,
0.007850535213947296,
-0.08184154331684113,
0.041578758507966995,
0.0523066408932209,
0.022000126540660858,
-0.026640422642230988,
-0.015032663941383362,
-0.035840608179569244,
-0.039562586694955826,
-0.05928138643503189,
0.039320703595876694,
-0.02847348153591156,
0.011236690916121006,
0.05167727172374725,
-0.038271766155958176,
-0.022921856492757797,
0.018679212778806686,
0.04689982905983925,
-0.02887025475502014,
-0.15505994856357574,
-0.01660757325589657,
-0.06426156312227249,
0.018340377137064934,
-0.036633994430303574,
-0.01685943454504013,
-0.005536323878914118,
-0.04502304270863533,
0.05807192251086235,
-0.006684481166303158,
-0.0016058651963248849,
0.023508546873927116,
-0.07761343568563461,
-0.03271869942545891,
0.003906861413270235,
0.09105425328016281,
0.10200364142656326,
-0.0659402385354042,
0.06005261838436127,
0.023955894634127617,
0.05474202334880829,
0.0674072727560997,
-0.0733121931552887,
0.0732346922159195,
0.050602175295352936,
0.022019632160663605,
0.022203899919986725,
-0.018210645765066147,
0.06242835521697998,
-0.010968462564051151,
-0.02151399292051792,
-0.006242614239454269,
0.03686286881566048,
0.009770546108484268,
-0.0651116818189621,
0.01072105672210455,
0.0050361789762973785,
-0.07511232048273087,
0.04971890151500702,
0.02069598250091076,
0.02673838660120964,
0.015248158946633339,
-0.12341214716434479,
-0.007446086034178734,
0.0037993353325873613,
-0.0454070121049881,
0.017795013263821602,
-0.028168810531497,
0.04633127152919769,
-0.045895062386989594,
-0.011949244886636734,
-0.0659986287355423,
0.029238924384117126,
0.02159186825156212,
-0.0313619039952755,
-0.035750921815633774,
0.01028899010270834,
-0.06393798440694809,
-0.026157915592193604,
-0.009260726161301136,
-0.04472027346491814,
0.011180011555552483,
0.058582503348588943,
0.03137421980500221,
0.03751631826162338,
-0.045128099620342255,
-0.015172366984188557,
0.129483163356781,
0.006236543413251638,
0.09099534153938293,
-0.018736155703663826,
0.06256198137998581,
0.0004609182069543749,
0.06718756258487701,
-0.0646396055817604,
-0.002219326561316848,
-0.05018128082156181,
0.06856025010347366,
0.021115779876708984,
-0.08355230838060379,
0.01923932507634163,
0.0772232785820961,
-0.07411127537488937,
0.011493364349007607,
-0.019007446244359016,
5.86235783549574e-33,
0.0467575378715992,
-0.0951392874121666,
0.03093595989048481,
0.0023138783872127533,
-0.044134460389614105,
0.00683580944314599,
0.00970159936696291,
0.013041595928370953,
-0.02357456274330616,
-0.0478985495865345,
-0.041792698204517365,
-0.04927710071206093,
0.0198820810765028,
-0.10728584975004196,
0.024351807311177254,
0.007887043990194798,
0.025722529739141464,
-0.021820062771439552,
0.10457687824964523,
0.03548343479633331,
0.06040365993976593,
0.017174910753965378,
0.039353448897600174,
0.001876558642834425,
-0.00800958089530468,
0.00809131283313036,
0.012519383803009987,
-0.031993716955184937,
-0.022452015429735184,
-0.018144894391298294,
-0.011121736839413643,
-0.04401203244924545,
0.03946783021092415,
0.049803316593170166,
-0.11465359479188919,
0.04690350964665413,
0.057241156697273254,
-0.004818078596144915,
-0.06287010759115219,
-0.036096151918172836,
0.07184567302465439,
-0.031549662351608276,
0.041384272277355194,
-0.10259731858968735,
0.044447846710681915,
0.011857178993523121,
-0.009792511351406574,
0.02201170288026333,
0.011358189396560192,
0.07082026451826096,
-0.08100760728120804,
0.020051345229148865,
-0.030345141887664795,
-0.07694094628095627,
0.024853747338056564,
-0.006001522298902273,
0.09180478751659393,
-0.08330053091049194,
-0.046760473400354385,
0.006397769320756197,
-0.050707727670669556,
-0.08412834256887436,
-0.014462585560977459,
0.0010772401001304388,
0.027701422572135925,
0.03625161200761795,
-0.01407569833099842,
-0.004869159311056137,
-0.0435057133436203,
0.03302402421832085,
-0.11028505116701126,
0.04819528013467789,
0.06264428794384003,
0.047547660768032074,
-0.0024701710790395737,
-0.05218752101063728,
-0.09749996662139893,
0.0003276099741924554,
-0.024023963138461113,
-0.0024060301948338747,
0.07129352539777756,
0.018233295530080795,
-0.043405402451753616,
0.06598860025405884,
-0.011609645560383797,
-0.009359893389046192,
-0.02728869393467903,
0.02465783804655075,
-0.03275998681783676,
0.05227847024798393,
0.07441243529319763,
0.005533302202820778,
0.06867440044879913,
-0.03365377336740494,
-0.05804312601685524,
-6.155509963543495e-33,
0.015426228754222393,
-0.04286716505885124,
0.010493471287190914,
0.0409381277859211,
0.068633534014225,
0.07288571447134018,
-0.03015831857919693,
0.1347077190876007,
-0.007819203659892082,
-0.0300606656819582,
-0.01318199560046196,
-0.09002994000911713,
0.06583470851182938,
-0.04308804124593735,
0.007992497645318508,
0.06633210182189941,
-0.0030502071604132652,
0.05466047301888466,
0.0556512326002121,
0.020030640065670013,
-0.06435652077198029,
-0.000027443455110187642,
-0.013821997679769993,
0.026966268196702003,
0.059253182262182236,
0.04496656730771065,
-0.04220861569046974,
0.10220051556825638,
-0.005836497060954571,
-0.012772789224982262,
0.06047222763299942,
-0.04114395007491112,
-0.004080114420503378,
0.034305308014154434,
-0.06124543026089668,
-0.0942670926451683,
0.046099141240119934,
0.011292976327240467,
-0.052350230515003204,
-0.04456047713756561,
-0.0491398461163044,
-0.026410426944494247,
-0.0828373059630394,
-0.008660271763801575,
-0.0021070572547614574,
-0.05252183601260185,
0.0016057705506682396,
-0.009881392121315002,
-0.037229448556900024,
-0.04903193190693855,
-0.04191132262349129,
-0.04500444978475571,
-0.007119712885469198,
0.03520751744508743,
0.021076204255223274,
0.07537766546010971,
0.06206004321575165,
0.10128854960203171,
0.0040217116475105286,
0.018960323184728622,
0.05374688655138016,
-0.039722394198179245,
0.06746626645326614,
0.1311054825782776,
0.0015821431297808886,
0.026090141385793686,
0.009176609106361866,
-0.014479751698672771,
-0.019413679838180542,
0.08428408950567245,
-0.033099863678216934,
-0.06144663691520691,
0.011468465439975262,
0.01762542687356472,
0.04051239788532257,
-0.06556951999664307,
0.011033467948436737,
-0.046751171350479126,
0.03318038955330849,
0.08769909292459488,
-0.03288981691002846,
-0.03594198450446129,
-0.11312449723482132,
0.09183160960674286,
0.05542714521288872,
0.04007953777909279,
0.07547507435083389,
0.053222328424453735,
-0.009970053099095821,
0.06260032951831818,
-0.08787126839160919,
-0.03704167157411575,
-0.07021969556808472,
0.09281586855649948,
0.09981349855661392,
-4.451443302855296e-8,
0.028103630989789963,
-0.004515360109508038,
-0.0366266593337059,
0.07516758888959885,
0.0338955894112587,
-0.022014828398823738,
-0.011776115745306015,
-0.0634475126862526,
-0.10422788560390472,
-0.09096736460924149,
0.017177145928144455,
0.02629528008401394,
-0.025010816752910614,
0.0015530192758888006,
0.042655766010284424,
-0.011540527455508709,
0.015795797109603882,
-0.04045781493186951,
0.02302524447441101,
-0.0764758512377739,
-0.07600966840982437,
-0.0527241975069046,
-0.06678424775600433,
-0.02300846390426159,
0.08260340988636017,
0.07764555513858795,
0.0838533565402031,
0.025181498378515244,
0.02290630154311657,
0.08492939919233322,
-0.147136852145195,
-0.11893902719020844,
0.02465597540140152,
0.022882813587784767,
-0.03642147779464722,
0.004154721740633249,
-0.030956478789448738,
0.039773356169462204,
0.09623195976018906,
0.10159946233034134,
0.02752545289695263,
0.011849083937704563,
-0.01571655087172985,
0.02658989652991295,
0.07266279309988022,
0.054586250334978104,
0.06014842912554741,
0.05564127862453461,
-0.030661674216389656,
-0.028301768004894257,
-0.06882036477327347,
-0.06069360300898552,
-0.02209560200572014,
0.014110532589256763,
-0.04509053751826286,
0.008747546933591366,
-0.08834443986415863,
-0.04132913053035736,
0.06605382263660431,
0.011596926487982273,
-0.02226809412240982,
-0.0032392560970038176,
-0.033833716064691544,
-0.10148809105157852
] | -0.002161
|
objects that are already stored. For this example, you have configured your cluster so that Secrets are encrypted on write. Performing a replace operation for each Secret will encrypt that content at rest, where the objects are unchanged. You can make this change across all Secrets in your cluster: ```shell # Run this as an administrator that can read and write all Secrets kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` The command above reads all Secrets and then updates them with the same data, in order to apply server side encryption. {{< note >}} If an error occurs due to a conflicting write, retry the command. It is safe to run that command more than once. For larger clusters, you may wish to subdivide the Secrets by namespace, or script an update. {{< /note >}} ## Prevent plain text retrieval {#cleanup-all-secrets-encrypted} If you want to make sure that the only access to a particular API kind is done using encryption, you can remove the API server's ability to read that API's backing data as plaintext. {{< warning >}} Making this change prevents the API server from retrieving resources that are marked as encrypted at rest, but are actually stored in the clear. When you have configured encryption at rest for an API (for example: the API kind `Secret`, representing `secrets` resources in the core API group), you \*\*must\*\* ensure that all those resources in this cluster really are encrypted at rest. Check this before you carry on with the next steps. {{< /warning >}} Once all Secrets in your cluster are encrypted, you can remove the `identity` part of the encryption configuration. For example: {{< highlight yaml "linenos=false,hl\_lines=12" >}} --- apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets providers: - aescbc: keys: - name: key1 secret: - identity: {} # REMOVE THIS LINE {{< /highlight >}} …and then restart each API server in turn. This change prevents the API server from accessing a plain-text Secret, even by accident. ## Rotate a decryption key {#rotating-a-decryption-key} Changing an encryption key for Kubernetes without incurring downtime requires a multi-step operation, especially in the presence of a highly-available deployment where multiple `kube-apiserver` processes are running. 1. Generate a new key and add it as the second key entry for the current provider on all control plane nodes. 1. Restart \*\*all\*\* `kube-apiserver` processes, to ensure each server can decrypt any data that are encrypted with the new key. 1. Make a secure backup of the new encryption key. If you lose all copies of this key you would need to delete all the resources were encrypted under the lost key, and workloads may not operate as expected during the time that at-rest encryption is broken. 1. Make the new key the first entry in the `keys` array so that it is used for encryption-at-rest for new writes 1. Restart all `kube-apiserver` processes to ensure each control plane host now encrypts using the new key 1. As a privileged user, run `kubectl get secrets --all-namespaces -o json | kubectl replace -f -` to encrypt all existing Secrets with the new key 1. After you have updated all existing Secrets to use the new key and have made a secure backup of the new key, remove the old decryption key from the configuration. ## Decrypt all data {#decrypting-all-data} This example shows how to stop encrypting the Secret API at rest. If you are encrypting other API kinds, adjust the steps to match. To disable encryption at rest, place the `identity` provider as the first entry in your encryption configuration file: ```yaml
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.0029008579440414906,
0.04158787429332733,
0.009816206060349941,
0.07047426700592041,
-0.03152789920568466,
-0.04079536348581314,
-0.08252287656068802,
-0.06592059135437012,
0.10513456165790558,
0.03572942689061165,
-0.03466828167438507,
-0.04305550083518028,
0.02208658494055271,
-0.06158524379134178,
0.052040744572877884,
-0.00930867437273264,
0.0008750985725782812,
0.04616942256689072,
-0.06872396916151047,
-0.10271846503019333,
0.014650432392954826,
-0.007669941056519747,
0.02400321513414383,
0.033242277801036835,
-0.10003508627414703,
0.00389883853495121,
0.019222773611545563,
-0.04875355586409569,
-0.04076744243502617,
-0.053831908851861954,
-0.02943052165210247,
-0.024575036019086838,
-0.02120053768157959,
0.03936119005084038,
0.029498837888240814,
0.10908419638872147,
-0.021985579282045364,
-0.04701530933380127,
0.003572087036445737,
-0.016929201781749725,
0.03337015584111214,
-0.02208396978676319,
-0.15957893431186676,
-0.01720799319446087,
-0.105451300740242,
-0.004883150104433298,
-0.058998409658670425,
-0.05506967380642891,
-0.04851558804512024,
-0.0348660834133625,
0.03971141576766968,
-0.01113312877714634,
-0.05633433535695076,
0.03801100701093674,
0.008434882387518883,
-0.010803943499922752,
-0.05726727098226547,
0.07353120297193527,
0.0677778497338295,
-0.0164303220808506,
0.09242276102304459,
0.021140307188034058,
0.09360481798648834,
0.0055306521244347095,
-0.05094850808382034,
0.04189786687493324,
0.026640744879841805,
0.027504993602633476,
0.08685260266065598,
-0.002599215367808938,
0.07642892003059387,
0.004165477119386196,
-0.05597320571541786,
-0.05092419311404228,
-0.02803703024983406,
0.026380550116300583,
-0.05395261570811272,
-0.005420191213488579,
-0.01533164270222187,
-0.0003532763512339443,
-0.006136650685220957,
-0.012071888893842697,
0.011455325409770012,
0.0143058430403471,
-0.07553791999816895,
0.01336680818349123,
0.020228050649166107,
-0.06447873264551163,
0.05690612643957138,
-0.010422508232295513,
0.0010945458197966218,
-0.10150013118982315,
0.09099499136209488,
-0.10444479435682297,
0.05917751416563988,
0.0025288595352321863,
-0.036001406610012054,
-0.018852289766073227,
-0.006319325417280197,
-0.016296979039907455,
0.000054776755860075355,
-0.02225560136139393,
0.0047601661644876,
-0.009721700102090836,
0.07355060428380966,
0.023495113477110863,
-0.01320754736661911,
-0.06757030636072159,
0.009941613301634789,
0.10099728405475616,
0.01450760755687952,
0.12788613140583038,
-0.05242278426885605,
0.040395885705947876,
0.015262404456734657,
0.06224115192890167,
0.04675287380814552,
0.028766144067049026,
-0.01521300245076418,
0.14775870740413666,
0.08379481732845306,
-0.04813022166490555,
0.04208330810070038,
0.05935460701584816,
-0.07265445590019226,
-0.005705551244318485,
-0.01275374460965395,
3.0306826778350535e-33,
0.05563872307538986,
-0.06554444879293442,
0.05772942304611206,
-0.011846828274428844,
-0.017406195402145386,
-0.03637690842151642,
0.03168154135346413,
-0.0032555244397372007,
-0.03505106642842293,
-0.023278912529349327,
-0.02037905715405941,
0.03397959843277931,
0.003937633242458105,
-0.07836949825286865,
0.023771101608872414,
0.031003238633275032,
0.022722477093338966,
0.026042969897389412,
0.11111065000295639,
-0.003478461876511574,
0.0850144475698471,
0.00875990279018879,
-0.015273230150341988,
0.004321638960391283,
-0.008448086678981781,
-0.03040517307817936,
0.03625493496656418,
-0.05046524852514267,
-0.00591307645663619,
0.0065049962140619755,
-0.007622072007507086,
-0.024673352017998695,
0.04627096652984619,
0.07447291910648346,
-0.11006017029285431,
0.01708914153277874,
0.013543270528316498,
-0.00605454295873642,
-0.05608009174466133,
-0.09643537551164627,
0.05497393384575844,
0.004234939813613892,
0.02040703035891056,
-0.09682413935661316,
0.08521189540624619,
0.016811322420835495,
-0.047067560255527496,
-0.021523624658584595,
0.043252475559711456,
0.023286614567041397,
-0.05608338117599487,
0.024630261585116386,
0.000055433276429539546,
-0.06354086846113205,
0.04111851379275322,
-0.028739014640450478,
0.11736630648374557,
-0.07900602370500565,
-0.022298768162727356,
-0.02106473036110401,
-0.010496558621525764,
-0.023392101749777794,
-0.01949751377105713,
0.04199537634849548,
-0.0029850807040929794,
0.0036809511948376894,
-0.004194292239844799,
0.02388657070696354,
-0.07405125349760056,
-0.008206041529774666,
-0.09474539011716843,
0.0430511049926281,
-0.018414856866002083,
-0.005475225858390331,
-0.050952594727277756,
-0.06529564410448074,
0.011228596791625023,
0.004305215086787939,
-0.0628601685166359,
-0.011238370090723038,
0.09440550208091736,
-0.039893776178359985,
-0.06638143211603165,
0.11723268032073975,
-0.05853097885847092,
-0.004196409601718187,
-0.035780470818281174,
0.035467639565467834,
-0.022925324738025665,
0.08809452503919601,
0.054556749761104584,
-0.020541781559586525,
0.02330056019127369,
-0.052588723599910736,
-0.12658491730690002,
-4.5729084909108475e-33,
0.08996133506298065,
-0.04374611750245094,
0.010010679252445698,
0.06037537753582001,
0.009752588346600533,
0.0304619912058115,
-0.06625062972307205,
0.07473238557577133,
-0.03457054868340492,
-0.05702323839068413,
-0.08706820011138916,
-0.017559532076120377,
0.05374620854854584,
-0.036343012005090714,
-0.011896111071109772,
0.055871330201625824,
-0.001554017304442823,
0.020492270588874817,
-0.011902024038136005,
0.015466664917767048,
-0.09146204590797424,
-0.022109273821115494,
0.029327262192964554,
0.062071364372968674,
0.052572112530469894,
0.023716643452644348,
-0.06663578748703003,
0.044857703149318695,
-0.07200484722852707,
-0.02013223245739937,
-0.011650183238089085,
-0.05469810962677002,
-0.028144342824816704,
0.00023268342192750424,
-0.01208510808646679,
-0.12739571928977966,
-0.014270404353737831,
0.037533700466156006,
-0.020935462787747383,
-0.011928952299058437,
-0.003859062446281314,
0.00863555632531643,
-0.045275695621967316,
0.013027756474912167,
-0.015456732362508774,
-0.045227617025375366,
0.008060388267040253,
-0.055638596415519714,
-0.028130793944001198,
-0.03841607645153999,
0.00507776765152812,
-0.044156402349472046,
-0.07222328335046768,
0.019864290952682495,
-0.004037623759359121,
0.07603857666254044,
-0.026625873520970345,
0.08192708343267441,
-0.01822565495967865,
0.026754790917038918,
0.04068078100681305,
-0.04344441369175911,
0.04163527861237526,
0.10013402998447418,
-0.024049412459135056,
-0.04239650443196297,
-0.03668198734521866,
-0.012753688730299473,
-0.0046463580802083015,
0.07485052198171616,
0.02393162250518799,
-0.016287911683321,
-0.011774946935474873,
0.03660237416625023,
0.022532589733600616,
-0.04888232424855232,
-0.03807755187153816,
-0.10000141710042953,
0.037606749683618546,
0.12456049770116806,
0.0186877753585577,
-0.01735679805278778,
-0.05007166042923927,
0.07027561217546463,
0.07496726512908936,
0.021956905722618103,
0.0698176845908165,
0.07212375849485397,
0.011069918982684612,
0.09490670263767242,
-0.07649040222167969,
-0.005963548552244902,
-0.05141432210803032,
0.06988076865673065,
0.042372435331344604,
-5.226686994319607e-8,
0.06002617999911308,
-0.02033018320798874,
-0.04808562621474266,
0.08822113275527954,
0.02897106111049652,
-0.03791586682200432,
-0.0333799347281456,
-0.0018855500966310501,
-0.056832488626241684,
-0.03670532628893852,
0.0393805131316185,
0.03995782136917114,
-0.03539961948990822,
0.019622383639216423,
0.02108243852853775,
0.011396508663892746,
-0.018760474398732185,
-0.0020404206588864326,
0.02951059862971306,
-0.06014072149991989,
-0.05774027854204178,
-0.036058682948350906,
-0.02619868330657482,
-0.027369342744350433,
0.05564941465854645,
0.050579048693180084,
0.08525562286376953,
0.06326854974031448,
-0.0069357468746602535,
0.070187047123909,
-0.06392496824264526,
-0.12881410121917725,
0.03960790857672691,
0.09537654370069504,
-0.04121461138129234,
0.009523042477667332,
-0.059047821909189224,
0.026641597971320152,
0.045807354152202606,
0.12152574956417084,
0.0278322771191597,
0.04521438479423523,
-0.02710474468767643,
0.06919116526842117,
0.01626158133149147,
0.032003793865442276,
0.0755401998758316,
0.06145240738987923,
-0.039168789982795715,
-0.012880605645477772,
-0.07321735471487045,
-0.02712010219693184,
-0.078973688185215,
0.11232128739356995,
-0.037294864654541016,
0.019930798560380936,
-0.02679167129099369,
-0.02186208963394165,
0.05013609677553177,
-0.022953743115067482,
-0.018090371042490005,
0.009560574777424335,
-0.02052467130124569,
-0.0588051863014698
] | 0.095173
|
the configuration. ## Decrypt all data {#decrypting-all-data} This example shows how to stop encrypting the Secret API at rest. If you are encrypting other API kinds, adjust the steps to match. To disable encryption at rest, place the `identity` provider as the first entry in your encryption configuration file: ```yaml --- apiVersion: apiserver.config.k8s.io/v1 kind: EncryptionConfiguration resources: - resources: - secrets # list any other resources here that you previously were # encrypting at rest providers: - identity: {} # add this line - aescbc: keys: - name: key1 secret: # keep this in place # make sure it comes after "identity" ``` Then run the following command to force decryption of all Secrets: ```shell kubectl get secrets --all-namespaces -o json | kubectl replace -f - ``` Once you have replaced all existing encrypted resources with backing data that don't use encryption, you can remove the encryption settings from the `kube-apiserver`. ## Configure automatic reloading You can configure automatic reloading of encryption provider configuration. That setting determines whether the {{< glossary\_tooltip text="API server" term\_id="kube-apiserver" >}} should load the file you specify for `--encryption-provider-config` only once at startup, or automatically whenever you change that file. Enabling this option allows you to change the keys for encryption at rest without restarting the API server. To allow automatic reloading, configure the API server to run with: `--encryption-provider-config-automatic-reload=true`. When enabled, file changes are polled every minute to observe the modifications. The `apiserver\_encryption\_config\_controller\_automatic\_reload\_last\_timestamp\_seconds` metric identifies when the new config becomes effective. This allows encryption keys to be rotated without restarting the API server. ## {{% heading "whatsnext" %}} \* Read about [decrypting data that are already stored at rest](/docs/tasks/administer-cluster/decrypt-data/) \* Learn more about the [EncryptionConfiguration configuration API (v1)](/docs/reference/config-api/apiserver-config.v1/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/encrypt-data.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/encrypt-data.md
|
[
-0.007554684765636921,
0.08574491739273071,
0.0345168299973011,
-0.012160468846559525,
-0.005146331619471312,
-0.023987626656889915,
-0.05493622273206711,
-0.03446631133556366,
0.09267525374889374,
0.053958866745233536,
-0.03336154669523239,
-0.04849806800484657,
-0.00855474453419447,
-0.032647572457790375,
0.017310068011283875,
-0.008794710971415043,
-0.018540045246481895,
0.020420540124177933,
-0.044579312205314636,
-0.06943903863430023,
0.025503143668174744,
-0.05079926177859306,
0.04425954446196556,
-0.03561466187238693,
-0.01979650929570198,
0.016941621899604797,
0.02972404845058918,
0.024382466450333595,
-0.04662907123565674,
-0.09149018675088882,
0.002540907822549343,
-0.032173387706279755,
-0.02229933626949787,
0.009784791618585587,
-0.005814603995531797,
0.05973257124423981,
0.024788156151771545,
-0.041320495307445526,
-0.01094706729054451,
0.027927327901124954,
-0.010658321902155876,
-0.01878063753247261,
-0.16759240627288818,
-0.008120610378682613,
-0.02373715303838253,
0.02426210418343544,
-0.01261321734637022,
-0.05385073646903038,
-0.008570101112127304,
-0.018698345869779587,
0.040860939770936966,
-0.01706100068986416,
-0.040605999529361725,
0.02628961205482483,
-0.005558741744607687,
-0.018538568168878555,
-0.08794520795345306,
0.07796706259250641,
0.11700901389122009,
-0.01577986590564251,
0.06361740082502365,
0.059776488691568375,
0.08119538426399231,
0.02664947137236595,
-0.08955050259828568,
0.061171676963567734,
0.039694350212812424,
0.014116314239799976,
0.041012298315763474,
0.05841483548283577,
0.0824875608086586,
-0.0347430557012558,
-0.018294407054781914,
-0.007188834715634584,
0.02015354484319687,
0.009446780197322369,
-0.06438958644866943,
-0.011809851042926311,
-0.005861623212695122,
-0.013531164266169071,
0.021176019683480263,
-0.01605457253754139,
0.02430891804397106,
0.012071670033037663,
-0.09596262872219086,
-0.011617524549365044,
-0.00962881837040186,
-0.07917129248380661,
0.03469276800751686,
0.024818534031510353,
0.05847097188234329,
-0.10363536328077316,
0.05108325183391571,
-0.07058419287204742,
0.10005922615528107,
-0.010439887642860413,
-0.05118919163942337,
0.02022622339427471,
-0.06398895382881165,
-0.06083409860730171,
-0.03897874057292938,
0.001040769275277853,
0.0318896546959877,
0.029688887298107147,
0.061550695449113846,
-0.008637935854494572,
0.00011198322317795828,
-0.021333782002329826,
-0.05012619122862816,
0.08220501989126205,
-0.008143682032823563,
0.05879690870642662,
-0.04958047345280647,
0.038353126496076584,
0.02915595844388008,
0.08030927181243896,
-0.008799991570413113,
0.05284060165286064,
-0.003507191315293312,
0.11537496745586395,
0.06258401274681091,
0.01696256548166275,
-0.021123379468917847,
0.0740341991186142,
-0.098752960562706,
0.04862676188349724,
-0.00030024602892808616,
5.1224925075385764e-33,
0.05871684104204178,
-0.02849109284579754,
0.018177079036831856,
-0.059000689536333084,
-0.013925793580710888,
-0.0759456679224968,
0.020723696798086166,
0.005590355023741722,
-0.06997387111186981,
0.02919812873005867,
-0.03924331068992615,
0.016442811116576195,
-0.008110630325973034,
-0.06412845104932785,
-0.008114399388432503,
0.05086670443415642,
0.010704481974244118,
-0.02756919153034687,
0.08797605335712433,
0.0186973474919796,
0.11495810747146606,
-0.0007180473185144365,
0.05474057421088219,
-0.012764768674969673,
-0.027626553550362587,
-0.007743046153336763,
0.0709933266043663,
-0.0510871522128582,
-0.03416631370782852,
-0.004929402377456427,
-0.03609257563948631,
-0.03464088216423988,
0.0353405587375164,
0.02480129711329937,
-0.09933731704950333,
-0.03489666059613228,
0.030700836330652237,
0.028862664476037025,
-0.08425632119178772,
-0.027938758954405785,
0.036923881620168686,
0.024163585156202316,
-0.024332532659173012,
-0.056441161781549454,
0.05113024637103081,
-0.0070997001603245735,
0.00997572299093008,
-0.05003156512975693,
0.0633537694811821,
0.05808469280600548,
-0.07473822683095932,
-0.01862587220966816,
-0.04833372309803963,
-0.07660267502069473,
0.0365065261721611,
-0.027637505903840065,
0.11020351946353912,
-0.019344545900821686,
-0.10560724139213562,
-0.07851874083280563,
-0.013269349001348019,
-0.053176116198301315,
0.020376620814204216,
-0.019068095833063126,
-0.0008016636129468679,
-0.003769716015085578,
-0.10561865568161011,
0.009165626950562,
-0.10987890511751175,
0.017963329330086708,
-0.1042201891541481,
0.02028195559978485,
0.03579968586564064,
0.004072970245033503,
0.011646079830825329,
-0.05776108428835869,
-0.039516180753707886,
0.016202019527554512,
-0.0463472381234169,
0.030676275491714478,
0.09195899218320847,
0.0600941926240921,
0.0033606586512178183,
0.044091083109378815,
-0.011800127103924751,
-0.02140696346759796,
0.00809114146977663,
0.04505061358213425,
-0.01103142462670803,
0.061300210654735565,
0.037654977291822433,
0.02291055954992771,
0.0032116486690938473,
-0.05065489560365677,
-0.13022513687610626,
-6.509064134124283e-33,
0.07102656364440918,
-0.04402150213718414,
0.01742650754749775,
0.030054889619350433,
0.04292723536491394,
0.09650722146034241,
0.011580078862607479,
0.09638096392154694,
0.0015738998772576451,
-0.02522195875644684,
0.00871229451149702,
-0.06438647955656052,
0.11523975431919098,
-0.039039067924022675,
0.021592795848846436,
0.029935507103800774,
-0.049665261059999466,
0.0740562230348587,
-0.012994082644581795,
-0.025155039504170418,
-0.07698380202054977,
0.010324015282094479,
0.03565966337919235,
0.02897515520453453,
0.05541316419839859,
-0.023110035806894302,
-0.010251614265143871,
0.12613001465797424,
-0.014199457131326199,
-0.041588470339775085,
0.0487457774579525,
-0.016570257022976875,
-0.021370425820350647,
-0.014256030321121216,
-0.06955140829086304,
-0.07615514099597931,
-0.028669042512774467,
0.039005301892757416,
-0.05788424238562584,
-0.05490460619330406,
0.0008570650825276971,
-0.045487988740205765,
-0.03379059582948685,
0.006306648254394531,
-0.02212669886648655,
-0.009720668196678162,
0.04049602150917053,
-0.06341426819562912,
0.008610147051513195,
-0.06122276559472084,
0.022781630977988243,
0.0077379727736115456,
-0.0683254823088646,
0.025406694039702415,
-0.0023088897578418255,
0.05493823066353798,
-0.0005236388533376157,
0.07640521973371506,
-0.03844815865159035,
0.012208397500216961,
0.05508369207382202,
-0.012010948732495308,
0.08218418806791306,
0.07646423578262329,
0.0554911233484745,
-0.019046377390623093,
-0.034877631813287735,
0.030679069459438324,
0.00684729078784585,
0.011498340405523777,
0.010773008689284325,
-0.06041794642806053,
0.0035199306439608335,
0.0078089055605232716,
0.08646178990602493,
-0.0583539679646492,
-0.08449101448059082,
-0.048174984753131866,
0.03532710298895836,
0.03844128176569939,
0.005810377653688192,
-0.028116457164287567,
-0.07273939251899719,
0.0713396817445755,
0.09297376871109009,
-0.001575611298903823,
0.049630288034677505,
0.07188730686903,
-0.016246283426880836,
0.11171775311231613,
-0.041721511632204056,
-0.08585281670093536,
-0.05249372497200966,
0.13284657895565033,
0.07736615836620331,
-4.245179852091496e-8,
0.050538621842861176,
-0.032767318189144135,
-0.05684395506978035,
0.07540573179721832,
0.04299335181713104,
-0.026509348303079605,
-0.011700477451086044,
0.01741926558315754,
-0.08516304194927216,
-0.09807194024324417,
0.0195103008300066,
0.054006967693567276,
-0.017710980027914047,
0.07138960808515549,
0.03744926676154137,
-0.02700699493288994,
-0.014222552068531513,
0.009055184200406075,
0.061150871217250824,
-0.1101226732134819,
-0.047871582210063934,
-0.06656496971845627,
-0.05249610170722008,
-0.047324616461992264,
0.0894002914428711,
0.10642564296722412,
0.048486147075891495,
0.022524449974298477,
0.042761094868183136,
0.031852465122938156,
-0.09218995273113251,
-0.12415093928575516,
0.011137902736663818,
0.017201833426952362,
-0.049993548542261124,
0.002130193402990699,
-0.07548757642507553,
0.03066326305270195,
0.028803303837776184,
0.05682976916432381,
0.0020147347822785378,
0.008303317241370678,
-0.06426908820867538,
0.05460580065846443,
-0.025840487331151962,
0.05093318596482277,
0.07069415599107742,
0.10399247705936432,
-0.04721488803625107,
0.013725562952458858,
-0.024415213614702225,
-0.06857761740684509,
-0.046719882637262344,
0.014946049079298973,
-0.01931716687977314,
0.00897851213812828,
-0.011310669593513012,
-0.04847998917102814,
0.004343915265053511,
-0.014259271323680878,
0.01327348779886961,
-0.060129038989543915,
-0.01992478035390377,
-0.0646764412522316
] | 0.006339
|
This page shows how to view, work in, and delete {{< glossary\_tooltip text="namespaces" term\_id="namespace" >}}. The page also shows how to use Kubernetes namespaces to subdivide your cluster. ## {{% heading "prerequisites" %}} \* Have an [existing Kubernetes cluster](/docs/setup/). \* You have a basic understanding of Kubernetes {{< glossary\_tooltip text="Pods" term\_id="pod" >}}, {{< glossary\_tooltip term\_id="service" text="Services" >}}, and {{< glossary\_tooltip text="Deployments" term\_id="deployment" >}}. ## Viewing namespaces List the current namespaces in a cluster using: ```shell kubectl get namespaces ``` ```console NAME STATUS AGE default Active 11d kube-node-lease Active 11d kube-public Active 11d kube-system Active 11d ``` Kubernetes starts with four initial namespaces: \* `default` The default namespace for objects with no other namespace \* `kube-node-lease` This namespace holds [Lease](/docs/concepts/architecture/leases/) objects associated with each node. Node leases allow the kubelet to send [heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane can detect node failure. \* `kube-public` This namespace is created automatically and is readable by all users (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement. \* `kube-system` The namespace for objects created by the Kubernetes system You can also get the summary of a specific namespace using: ```shell kubectl get namespaces ``` Or you can get detailed information with: ```shell kubectl describe namespaces ``` ```console Name: default Labels: Annotations: Status: Active No resource quota. Resource Limits Type Resource Min Max Default ---- -------- --- --- --- Container cpu - - 100m ``` Note that these details show both resource quota (if present) as well as resource limit ranges. Resource quota tracks aggregate usage of resources in the Namespace and allows cluster operators to define \*Hard\* resource usage limits that a Namespace may consume. A limit range defines min/max constraints on the amount of resources a single entity can consume in a Namespace. See [Admission control: Limit Range](https://git.k8s.io/design-proposals-archive/resource-management/admission\_control\_limit\_range.md) A namespace can be in one of two phases: \* `Active` the namespace is in use \* `Terminating` the namespace is being deleted, and can not be used for new objects For more details, see [Namespace](/docs/reference/kubernetes-api/cluster-resources/namespace-v1/) in the API reference. ## Creating a new namespace {{< note >}} Avoid creating namespace with prefix `kube-`, since it is reserved for Kubernetes system namespaces. {{< /note >}} Create a new YAML file called `my-namespace.yaml` with the contents: ```yaml apiVersion: v1 kind: Namespace metadata: name: ``` Then run: ```shell kubectl create -f ./my-namespace.yaml ``` Alternatively, you can create namespace using below command: ```shell kubectl create namespace ``` The name of your namespace must be a valid [DNS label](/docs/concepts/overview/working-with-objects/names#dns-label-names). There's an optional field `finalizers`, which allows observables to purge resources whenever the namespace is deleted. Keep in mind that if you specify a nonexistent finalizer, the namespace will be created but will get stuck in the `Terminating` state if the user tries to delete it. More information on `finalizers` can be found in the namespace [design doc](https://git.k8s.io/design-proposals-archive/architecture/namespaces.md#finalizers). ## Deleting a namespace Delete a namespace with ```shell kubectl delete namespaces ``` {{< warning >}} This deletes \_everything\_ under the namespace! {{< /warning >}} This delete is asynchronous, so for a time you will see the namespace in the `Terminating` state. ## Subdividing your cluster using Kubernetes namespaces By default, a Kubernetes cluster will instantiate a default namespace when provisioning the cluster to hold the default set of Pods, Services, and Deployments used by the cluster. Assuming you have a fresh cluster, you can introspect the available namespaces by doing the following: ```shell kubectl get namespaces ``` ```console NAME STATUS
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/namespaces.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/namespaces.md
|
[
-0.023872433230280876,
-0.0396500863134861,
0.05466427654027939,
0.010206317529082298,
-0.02791980840265751,
-0.00014727334200870246,
0.050903573632240295,
-0.09120292961597443,
0.05065402388572693,
0.04822442680597305,
0.004747828934341669,
-0.09290482103824615,
0.0036596409045159817,
-0.03778073936700821,
-0.026000525802373886,
-0.0007222574786283076,
-0.009524498134851456,
-0.04791438207030296,
-0.023928755894303322,
-0.08018945157527924,
0.08810863643884659,
0.060347385704517365,
0.02467583864927292,
0.016583098098635674,
-0.008934537880122662,
0.05951029062271118,
-0.06359097361564636,
0.021724622696638107,
0.011694719083607197,
0.0218929685652256,
-0.034669093787670135,
0.057849835604429245,
0.0075804702937603,
0.05360992252826691,
0.09996464848518372,
0.046736203134059906,
0.005323043558746576,
0.0363398939371109,
-0.024745723232626915,
0.024215545505285263,
0.04706239327788353,
-0.020877866074442863,
-0.07093475013971329,
-0.07141225785017014,
-0.016157330945134163,
0.017340809106826782,
-0.11344920843839645,
-0.04125704988837242,
0.015200222842395306,
0.021895449608564377,
-0.005125405266880989,
-0.12240475416183472,
-0.006983509287238121,
0.025666369125247,
0.05205150321125984,
0.03464256599545479,
-0.04059844836592674,
0.0001740408770274371,
0.03321399167180061,
-0.023815955966711044,
0.03618182614445686,
0.004720392171293497,
0.012150769121944904,
-0.006279673893004656,
0.01427531149238348,
0.029424700886011124,
0.0038128939922899008,
0.04434247314929962,
-0.002559733809903264,
-0.027734708040952682,
0.02017168514430523,
0.0010890879202634096,
0.0019800898153334856,
-0.056021276861429214,
-0.029432568699121475,
0.017738111317157745,
-0.026322634890675545,
0.06420212984085083,
0.004382770042866468,
-0.11957356333732605,
0.05088925361633301,
0.10237680375576019,
0.07139182835817337,
0.10522978752851486,
-0.07973261177539825,
-0.056611910462379456,
0.0039595202542841434,
-0.0805051177740097,
0.011998793110251427,
-0.05446198955178261,
-0.041993800550699234,
-0.0969485491514206,
0.053371358662843704,
-0.09841436892747879,
0.03935939818620682,
0.013794957660138607,
-0.011164681054651737,
-0.033947739750146866,
0.02012505941092968,
0.0018758483929559588,
0.00725360494107008,
-0.06609588116407394,
0.01816324144601822,
-0.057384368032217026,
-0.08434104174375534,
0.04552920535206795,
-0.12622582912445068,
-0.0072549800388514996,
0.02945645898580551,
0.059967901557683945,
-0.023688042536377907,
0.11543368548154831,
-0.11056067049503326,
0.03298603370785713,
-0.024248866364359856,
-0.05641879886388779,
0.05493547394871712,
-0.008570598438382149,
0.06517431885004044,
0.07895202189683914,
0.004462444223463535,
-0.10494314134120941,
-0.02936176396906376,
0.020449522882699966,
-0.0065041640773415565,
0.025983931496739388,
-0.0194268636405468,
2.3073234946153426e-33,
0.0561298206448555,
-0.09862463921308517,
-0.03808018937706947,
-0.0009190612472593784,
0.0007289458299055696,
-0.03782827407121658,
-0.04382935166358948,
0.026971768587827682,
-0.05333130061626434,
-0.017746297642588615,
0.002851946512237191,
0.12158164381980896,
0.027510175481438637,
-0.05663440376520157,
0.026472801342606544,
0.030823180451989174,
-0.0035568440798670053,
0.08643563836812973,
0.03865336999297142,
-0.07226181030273438,
0.020640764385461807,
0.02631618268787861,
-0.01532217301428318,
-0.03229646757245064,
0.052792806178331375,
0.006573834922164679,
0.032859139144420624,
-0.09750323742628098,
-0.027953241020441055,
0.006891325581818819,
-0.027424151077866554,
0.015364591963589191,
0.027151405811309814,
-0.03572256118059158,
-0.1310330182313919,
0.04623601213097572,
-0.006793355569243431,
-0.038603346794843674,
-0.007636083289980888,
-0.02595529332756996,
-0.02368999272584915,
-0.03931884840130806,
0.008923586457967758,
-0.039330825209617615,
0.04269663617014885,
0.05978348106145859,
0.03603765740990639,
-0.11427159607410431,
0.10399883985519409,
0.0035119238309562206,
0.01910649798810482,
-0.09665434062480927,
0.011752787046134472,
0.03205268830060959,
0.020076153799891472,
0.0956636369228363,
0.04940361902117729,
-0.026574594900012016,
-0.0102517269551754,
-0.030693940818309784,
-0.06745319068431854,
0.000034508197131799534,
-0.024006685242056847,
-0.0032084558624774218,
0.02757531777024269,
0.013410606421530247,
-0.0215141661465168,
0.11002134531736374,
0.0066635808907449245,
-0.0010387853253632784,
-0.09146419167518616,
0.007887360639870167,
0.019709844142198563,
0.09063960611820221,
0.06384371966123581,
-0.04368019849061966,
-0.009476990438997746,
0.005984650459140539,
-0.08756192028522491,
0.008279215544462204,
0.038766831159591675,
-0.09407174587249756,
-0.049056943506002426,
0.0775870531797409,
0.07544319331645966,
-0.06384381651878357,
0.062282733619213104,
-0.04302556440234184,
-0.03857427462935448,
0.02175987884402275,
-0.04982493817806244,
-0.045927513390779495,
-0.08912800997495651,
-0.00026138295652344823,
-0.12084289640188217,
-4.8796247217411375e-33,
0.13290028274059296,
0.03664848953485489,
-0.01249916572123766,
-0.013018636032938957,
0.012451124377548695,
-0.0019792751409113407,
0.02182123437523842,
0.09978300333023071,
-0.007431558333337307,
-0.01093388069421053,
0.0038064182735979557,
0.024404658004641533,
0.0350751169025898,
0.09716299921274185,
-0.04151709005236626,
0.05640510097146034,
-0.06122207269072533,
0.018939334899187088,
-0.05125732719898224,
-0.008214459754526615,
-0.010481607168912888,
-0.05245329067111015,
0.037950705736875534,
0.004863676615059376,
-0.016659284010529518,
-0.026419220492243767,
0.01866762340068817,
0.015008837915956974,
-0.00019960905774496496,
-0.004751491826027632,
-0.00657763984054327,
0.007419495843350887,
-0.029194431379437447,
-0.012226597405970097,
0.04284687340259552,
-0.06371226161718369,
0.003251775400713086,
-0.04145028069615364,
-0.028394881635904312,
-0.011002655141055584,
0.022137271240353584,
-0.0038311555981636047,
-0.07423685491085052,
-0.10674604773521423,
-0.01357934158295393,
0.0006521737668663263,
0.04050443693995476,
0.010958167724311352,
-0.01785510592162609,
-0.06614973396062851,
0.03093493916094303,
-0.0749492272734642,
-0.07669699192047119,
0.032682184129953384,
-0.07450840622186661,
0.061963122338056564,
0.03534622862935066,
-0.006452200934290886,
-0.08116481453180313,
-0.030099116265773773,
0.06396176666021347,
-0.07094233483076096,
-0.008120238780975342,
0.060868680477142334,
0.026341741904616356,
-0.09068631380796432,
-0.02038108929991722,
0.00984103512018919,
-0.054877717047929764,
-0.03388722240924835,
-0.09523198753595352,
-0.008243894204497337,
0.04004228487610817,
-0.0267015527933836,
0.027433644980192184,
0.04016399383544922,
0.09633154422044754,
-0.05883592739701271,
0.060513585805892944,
-0.06067446246743202,
0.03931057080626488,
0.027209581807255745,
-0.021283911541104317,
0.014605746604502201,
-0.0013669668696820736,
0.07947352528572083,
0.037553172558546066,
0.12472861260175705,
0.02522040158510208,
0.03165816143155098,
-0.035385653376579285,
-0.03691546991467476,
0.04879530519247055,
0.12135888636112213,
-0.02257724292576313,
-4.5704034334903554e-8,
-0.00005797823905595578,
0.1366274356842041,
-0.022475043311715126,
0.028522932901978493,
-0.011596249416470528,
0.005279941949993372,
0.03251568228006363,
0.07859914749860764,
-0.020172080025076866,
-0.042175907641649246,
0.01581433415412903,
0.07921640574932098,
-0.09632051736116409,
0.03331347927451134,
-0.019342396408319473,
0.03527132794260979,
-0.051787544041872025,
-0.015008594840765,
0.030569802969694138,
-0.021187933161854744,
-0.013960428535938263,
-0.025174621492624283,
0.030157573521137238,
0.04479452222585678,
-0.03102857433259487,
-0.005579799879342318,
0.03865807503461838,
0.01914333552122116,
0.0007299836142919958,
-0.011270931921899319,
-0.010454134084284306,
0.02732338197529316,
-0.08413820713758469,
0.09759274125099182,
0.011772505939006805,
-0.02413628250360489,
-0.10266347974538803,
0.0869721844792366,
0.09308841079473495,
0.10857980698347092,
-0.028937865048646927,
0.021276075392961502,
-0.09490012377500534,
0.0012206528335809708,
0.03290988877415657,
0.06452930718660355,
0.033879369497299194,
0.05781092494726181,
-0.017465827986598015,
-0.03004048764705658,
-0.09569334983825684,
0.003798355581238866,
-0.05797908455133438,
0.0630304291844368,
-0.06328128278255463,
-0.021601643413305283,
-0.02118339017033577,
0.0023481370881199837,
0.018736371770501137,
-0.023896262049674988,
-0.0102765504270792,
-0.00845915637910366,
0.017239896580576897,
0.027463076636195183
] | 0.087968
|
a Kubernetes cluster will instantiate a default namespace when provisioning the cluster to hold the default set of Pods, Services, and Deployments used by the cluster. Assuming you have a fresh cluster, you can introspect the available namespaces by doing the following: ```shell kubectl get namespaces ``` ```console NAME STATUS AGE default Active 13m ``` ### Create new namespaces For this exercise, we will create two additional Kubernetes namespaces to hold our content. In a scenario where an organization is using a shared Kubernetes cluster for development and production use cases: - The development team would like to maintain a space in the cluster where they can get a view on the list of Pods, Services, and Deployments they use to build and run their application. In this space, Kubernetes resources come and go, and the restrictions on who can or cannot modify resources are relaxed to enable agile development. - The operations team would like to maintain a space in the cluster where they can enforce strict procedures on who can or cannot manipulate the set of Pods, Services, and Deployments that run the production site. One pattern this organization could follow is to partition the Kubernetes cluster into two namespaces: `development` and `production`. Let's create two new namespaces to hold our work. Create the `development` namespace using kubectl: ```shell kubectl create -f https://k8s.io/examples/admin/namespace-dev.json ``` And then let's create the `production` namespace using kubectl: ```shell kubectl create -f https://k8s.io/examples/admin/namespace-prod.json ``` To be sure things are right, list all of the namespaces in our cluster. ```shell kubectl get namespaces --show-labels ``` ```console NAME STATUS AGE LABELS default Active 32m development Active 29s name=development production Active 23s name=production ``` ### Create pods in each namespace A Kubernetes namespace provides the scope for Pods, Services, and Deployments in the cluster. Users interacting with one namespace do not see the content in another namespace. To demonstrate this, let's spin up a simple Deployment and Pods in the `development` namespace. ```shell kubectl create deployment snowflake \ --image=registry.k8s.io/serve\_hostname \ -n=development --replicas=2 ``` We have created a deployment whose replica size is 2 that is running the pod called `snowflake` with a basic container that serves the hostname. ```shell kubectl get deployment -n=development ``` ```console NAME READY UP-TO-DATE AVAILABLE AGE snowflake 2/2 2 2 2m ``` ```shell kubectl get pods -l app=snowflake -n=development ``` ```console NAME READY STATUS RESTARTS AGE snowflake-3968820950-9dgr8 1/1 Running 0 2m snowflake-3968820950-vgc4n 1/1 Running 0 2m ``` And this is great, developers are able to do what they want, and they do not have to worry about affecting content in the `production` namespace. Let's switch to the `production` namespace and show how resources in one namespace are hidden from the other. The `production` namespace should be empty, and the following commands should return nothing. ```shell kubectl get deployment -n=production kubectl get pods -n=production ``` Production likes to run cattle, so let's create some cattle pods. ```shell kubectl create deployment cattle --image=registry.k8s.io/serve\_hostname -n=production kubectl scale deployment cattle --replicas=5 -n=production kubectl get deployment -n=production ``` ```console NAME READY UP-TO-DATE AVAILABLE AGE cattle 5/5 5 5 10s ``` ```shell kubectl get pods -l app=cattle -n=production ``` ```console NAME READY STATUS RESTARTS AGE cattle-2263376956-41xy6 1/1 Running 0 34s cattle-2263376956-kw466 1/1 Running 0 34s cattle-2263376956-n4v97 1/1 Running 0 34s cattle-2263376956-p5p3i 1/1 Running 0 34s cattle-2263376956-sxpth 1/1 Running 0 34s ``` At this point, it should be clear that the resources users create in one namespace are hidden from the other namespace. As the policy support in Kubernetes evolves, we will extend this scenario to show how you can provide different authorization rules for each namespace. ## Understanding
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/namespaces.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/namespaces.md
|
[
0.006117400713264942,
-0.05517582595348358,
-0.0041367593221366405,
-0.006784210447221994,
-0.03812548890709877,
-0.003007472725585103,
0.014705193229019642,
-0.06456778198480606,
0.058182645589113235,
0.07390899956226349,
-0.002631976269185543,
-0.05563198775053024,
0.03874967619776726,
0.004344824235886335,
0.025064721703529358,
-0.04397108033299446,
0.07336541265249252,
-0.020870264619588852,
-0.026027830317616463,
-0.026508878916502,
0.0832173153758049,
-0.04763834923505783,
-0.027011685073375702,
-0.007688859477639198,
-0.08265494555234909,
0.03684816136956215,
-0.07874618470668793,
-0.009875723160803318,
0.01851707510650158,
-0.06792938709259033,
0.0066360835917294025,
0.012059135362505913,
0.0766863226890564,
0.03753197193145752,
0.08739405125379562,
0.060431163758039474,
-0.016356902197003365,
-0.009633335284888744,
-0.06436369568109512,
0.004394992254674435,
-0.022316940128803253,
-0.03504472225904465,
-0.07670198380947113,
-0.033659014850854874,
-0.06705370545387268,
0.017794093117117882,
-0.024750519543886185,
-0.10079420357942581,
0.013300971128046513,
-0.019124997779726982,
0.034175992012023926,
-0.10737323760986328,
0.058665648102760315,
0.023482641205191612,
0.051243856549263,
0.04722912237048149,
-0.0034754909574985504,
0.0027412890922278166,
0.05861073359847069,
-0.033857669681310654,
0.08843664824962616,
-0.0037602856755256653,
0.01516054943203926,
-0.015957219526171684,
-0.035910941660404205,
0.03780060261487961,
0.02458862029016018,
0.07899302989244461,
0.0052411905489861965,
-0.003996370360255241,
0.031189193949103355,
0.03996826335787773,
-0.020631927996873856,
-0.046395447105169296,
-0.0391874685883522,
0.04735907167196274,
-0.03133276477456093,
0.07036291062831879,
-0.016720464453101158,
-0.08532421290874481,
0.027817558497190475,
0.09340596944093704,
-0.014211427420377731,
-0.03696256875991821,
-0.1377333253622055,
0.049769122153520584,
-0.08126217126846313,
-0.002159371506422758,
0.05147228017449379,
-0.026802439242601395,
-0.052206795662641525,
-0.05584418401122093,
0.0827585831284523,
-0.08737357705831528,
0.029984088614583015,
-0.033407751470804214,
0.012361974455416203,
-0.004371414426714182,
0.05445670336484909,
-0.0029650649521499872,
-0.00679220212623477,
-0.010815960355103016,
0.050466060638427734,
-0.004426669329404831,
0.009240670129656792,
0.009607575833797455,
-0.06162369251251221,
-0.040521129965782166,
0.03518286347389221,
0.08337589353322983,
-0.007671278435736895,
0.10924996435642242,
-0.08084388077259064,
0.01044620480388403,
0.010466902516782284,
-0.011102059856057167,
0.05084792524576187,
-0.03982166200876236,
0.06431795656681061,
0.05575091764330864,
0.08450739830732346,
-0.07867276668548584,
0.07846573740243912,
0.025499805808067322,
0.035715147852897644,
0.053753212094306946,
-0.07982495427131653,
2.4002804858524152e-33,
0.030441569164395332,
-0.067919060587883,
-0.002742242068052292,
0.018236391246318817,
0.04036267101764679,
-0.034670211374759674,
-0.05051998421549797,
0.05687077343463898,
-0.02149268053472042,
-0.08305922895669937,
-0.026218749582767487,
0.06010729819536209,
0.046735670417547226,
-0.11558977514505386,
0.11243791878223419,
0.03416478633880615,
-0.01502804085612297,
0.10175321996212006,
0.09869265556335449,
0.0009462523157708347,
-0.023182174190878868,
-0.049850571900606155,
-0.06221587583422661,
0.009876522235572338,
0.044270534068346024,
-0.07789206504821777,
0.03319748491048813,
-0.1372358798980713,
-0.00773594668135047,
0.015125222504138947,
-0.06566677987575531,
-0.01570996269583702,
0.07186228781938553,
0.039399825036525726,
-0.08572051674127579,
0.06055232137441635,
-0.04014785960316658,
0.06200310215353966,
-0.05851176753640175,
-0.0077347224578261375,
-0.019728070124983788,
-0.029698211699724197,
0.011148283258080482,
0.027810292318463326,
0.079933300614357,
-0.024792728945612907,
0.0390632264316082,
-0.06589767336845398,
0.005225110799074173,
-0.03937298431992531,
0.04619633033871651,
-0.03151291608810425,
0.05617580562829971,
-0.03308766707777977,
0.0147771667689085,
0.043655313551425934,
0.08058468997478485,
-0.06147591397166252,
-0.006398388184607029,
-0.0038192307110875845,
-0.05190311744809151,
-0.04555333033204079,
-0.017718205228447914,
0.04499843716621399,
0.03633234649896622,
-0.01488354429602623,
0.01882423833012581,
0.038966208696365356,
0.03403889015316963,
-0.00009485027840128168,
-0.10838940739631653,
-0.023377440869808197,
-0.03686094284057617,
0.03739861398935318,
-0.0011761797359213233,
-0.028400253504514694,
-0.005354644265025854,
0.019126757979393005,
-0.12025640159845352,
0.03173312172293663,
0.07234176993370056,
-0.04380345344543457,
-0.04671785235404968,
0.08392293006181717,
-0.009608317166566849,
-0.04692606255412102,
0.032398197799921036,
0.006565222516655922,
-0.09109675884246826,
0.00888801645487547,
0.008933951146900654,
-0.06629826873540878,
-0.017225846648216248,
0.07134512811899185,
0.0056834230199456215,
-4.242633149238171e-33,
0.06154830381274223,
-0.011030549183487892,
-0.06664671748876572,
0.0009469450451433659,
0.0142466239631176,
0.04417376220226288,
-0.029520675539970398,
-0.012912970036268234,
-0.05745100975036621,
-0.07747003436088562,
-0.07950315624475479,
-0.06973805278539658,
0.007327365223318338,
0.025154007598757744,
-0.1379358172416687,
0.011916627176105976,
-0.0162317156791687,
-0.0069494228810071945,
-0.0072755697183310986,
0.04286478832364082,
0.007741733454167843,
-0.03214452415704727,
0.006577845197170973,
0.02943091280758381,
0.05931781604886055,
0.038867704570293427,
-0.08701066672801971,
-0.01153050921857357,
-0.010652473196387291,
0.04883844405412674,
-0.0709887444972992,
-0.10961063951253891,
0.006681776139885187,
-0.01946396566927433,
0.03336011990904808,
-0.06960541009902954,
-0.07621194422245026,
0.06923502683639526,
-0.015344105660915375,
-0.0037092589773237705,
0.042423468083143234,
0.02760404534637928,
-0.079368956387043,
0.018966656178236008,
-0.07428400218486786,
0.003954032901674509,
0.03448094427585602,
-0.0823867991566658,
-0.030253656208515167,
-0.10775530338287354,
-0.025218965485692024,
-0.05378509685397148,
-0.09693698585033417,
0.04585171863436699,
0.0003519956662785262,
0.06369727849960327,
0.017720263451337814,
0.08603856712579727,
-0.03539283201098442,
0.02155279740691185,
0.1256294995546341,
-0.07687009871006012,
-0.00904787890613079,
0.08030325919389725,
-0.03266645595431328,
-0.06819488853216171,
0.0018207690445706248,
0.03234586492180824,
-0.09413845092058182,
0.044968195259571075,
-0.018751265481114388,
-0.044284578412771225,
-0.0007283299928531051,
0.052591219544410706,
0.020562732592225075,
-0.004151587840169668,
0.10538476705551147,
-0.07629586011171341,
0.015944818034768105,
0.0858914852142334,
-0.041645683348178864,
0.023765847086906433,
-0.05143639072775841,
0.03286854177713394,
0.000388436543289572,
0.08224702626466751,
0.1002146378159523,
0.0840679332613945,
0.01602867618203163,
0.01513572409749031,
-0.031825222074985504,
0.028390541672706604,
-0.08038376271724701,
0.05309852212667465,
-0.050066109746694565,
-5.3299768154602134e-8,
0.0273037888109684,
-0.01562638394534588,
-0.013183748349547386,
0.03890040144324303,
-0.0020393473096191883,
-0.04929936304688454,
0.02855955995619297,
0.020558567717671394,
-0.0036470277700573206,
0.007582902442663908,
-0.03955230489373207,
0.07455611228942871,
-0.055248796939849854,
-0.0018702276283875108,
-0.014520812779664993,
0.05957955867052078,
0.00918666459619999,
0.018841179087758064,
-0.03388172760605812,
-0.003496018471196294,
-0.041065994650125504,
-0.021662849932909012,
-0.0007690265774726868,
-0.027690744027495384,
-0.036790233105421066,
-0.011398021131753922,
0.023956408724188805,
-0.01658862829208374,
0.07942166924476624,
0.06787580996751785,
0.012310773134231567,
-0.013674148358404636,
-0.08338949829339981,
0.0927504152059555,
-0.038224708288908005,
-0.038643497973680496,
-0.09236292541027069,
0.054411131888628006,
0.025942467153072357,
0.07624417543411255,
-0.05337947979569435,
0.018254246562719345,
-0.013586408458650112,
0.016051704064011574,
0.031916543841362,
0.10329350084066391,
-0.002894387347623706,
0.02981577441096306,
-0.03033822774887085,
-0.04785291850566864,
-0.046060286462306976,
-0.035263821482658386,
-0.020931318402290344,
0.12098981440067291,
-0.032723236829042435,
0.06752780824899673,
0.015194350853562355,
0.010062078945338726,
0.0506267175078392,
-0.0005111121572554111,
-0.06230247765779495,
0.012655535712838173,
0.048194896429777145,
0.03130219504237175
] | 0.150846
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.