content
stringlengths
3
20.5k
url
stringlengths
54
193
embeddings
listlengths
384
384
score
float64
-0.21
0.65
API group, use `count/widgets.example.com`. If you use [API aggregation](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) to add additional, custom APIs that are not defined as CustomResourceDefinitions, the core Kubernetes control plane does not enforce quota for the aggregated API. The extension API server is expected to provide quota enforcement if that's appropriate for the custom API. ##### Generic syntax {#resource-quota-object-count-generic} This is a list of common examples of object kinds that you may want to put under object count quota, listed by the configuration string that you would use. \* `count/pods` \* `count/persistentvolumeclaims` \* `count/services` \* `count/secrets` \* `count/configmaps` \* `count/deployments.apps` \* `count/replicasets.apps` \* `count/statefulsets.apps` \* `count/jobs.batch` \* `count/cronjobs.batch` ##### Specialized syntax {#resource-quota-object-count-specialized} There is another syntax only to set the same type of quota, that only works for certain API kinds. The following types are supported: | Resource Name | Description | | ------------- | ----------- | | `configmaps` | The total number of ConfigMaps that can exist in the namespace. | | `persistentvolumeclaims` | The total number of [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) that can exist in the namespace. | | `pods` | The total number of Pods in a non-terminal state that can exist in the namespace. A pod is in a terminal state if `.status.phase in (Failed, Succeeded)` is true. | | `replicationcontrollers` | The total number of ReplicationControllers that can exist in the namespace. | | `resourcequotas` | The total number of ResourceQuotas that can exist in the namespace. | | `services` | The total number of Services that can exist in the namespace. | | `services.loadbalancers` | The total number of Services of type `LoadBalancer` that can exist in the namespace. | | `services.nodeports` | The total number of `NodePorts` allocated to Services of type `NodePort` or `LoadBalancer` that can exist in the namespace. | | `secrets` | The total number of Secrets that can exist in the namespace. | For example, `pods` quota counts and enforces a maximum on the number of `pods` created in a single namespace that are not terminal. You might want to set a `pods` quota on a namespace to avoid the case where a user creates many small pods and exhausts the cluster's supply of Pod IPs. You can find more examples on [Viewing and Setting Quotas](#viewing-and-setting-quotas). ## Viewing and Setting Quotas kubectl supports creating, updating, and viewing quotas: ```shell kubectl create namespace myspace ``` ```shell cat < compute-resources.yaml apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources spec: hard: requests.cpu: "1" requests.memory: "1Gi" limits.cpu: "2" limits.memory: "2Gi" requests.nvidia.com/gpu: 4 EOF ``` ```shell kubectl create -f ./compute-resources.yaml --namespace=myspace ``` ```shell cat < object-counts.yaml apiVersion: v1 kind: ResourceQuota metadata: name: object-counts spec: hard: configmaps: "10" persistentvolumeclaims: "4" pods: "4" replicationcontrollers: "20" secrets: "10" services: "10" services.loadbalancers: "2" EOF ``` ```shell kubectl create -f ./object-counts.yaml --namespace=myspace ``` ```shell kubectl get quota --namespace=myspace ``` ```none NAME AGE compute-resources 30s object-counts 32s ``` ```shell kubectl describe quota compute-resources --namespace=myspace ``` ```none Name: compute-resources Namespace: myspace Resource Used Hard -------- ---- ---- limits.cpu 0 2 limits.memory 0 2Gi requests.cpu 0 1 requests.memory 0 1Gi requests.nvidia.com/gpu 0 4 ``` ```shell kubectl describe quota object-counts --namespace=myspace ``` ```none Name: object-counts Namespace: myspace Resource Used Hard -------- ---- ---- configmaps 0 10 persistentvolumeclaims 0 4 pods 0 4 replicationcontrollers 0 20 secrets 1 10 services 0 10 services.loadbalancers 0 2 ``` kubectl also supports object count quota for all standard namespaced resources using the syntax `count/.`: ```shell kubectl create namespace myspace ``` ```shell kubectl create quota test --hard=count/deployments.apps=2,count/replicasets.apps=4,count/pods=3,count/secrets=4 --namespace=myspace ``` ```shell kubectl create deployment nginx --image=nginx --namespace=myspace --replicas=2 ``` ```shell kubectl describe quota --namespace=myspace ``` ``` Name: test Namespace: myspace Resource Used Hard -------- ---- ---- count/deployments.apps 1
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/resource-quotas.md
[ -0.009531286545097828, -0.022546052932739258, 0.0006613577716052532, 0.04423561319708824, -0.08733142167329788, 0.04277648776769638, -0.0015339857200160623, 0.040919508785009384, 0.13078370690345764, 0.06402280926704407, -0.05995265021920204, -0.10811411589384079, 0.054398007690906525, 0.006521754898130894, -0.019314905628561974, -0.027374327182769775, 0.02373657561838627, -0.03621220216155052, -0.04663577303290367, -0.09264900535345078, 0.07587851583957672, 0.0008456638315692544, 0.05164046213030815, 0.000035245226172264665, -0.009845779277384281, -0.050747212022542953, -0.08218586444854736, -0.05404934659600258, 0.03674916550517082, 0.041529297828674316, -0.05247176066040993, 0.016663683578372, -0.005463524721562862, 0.035042647272348404, 0.11899755150079727, 0.02934957668185234, -0.03124590776860714, -0.07960169017314911, -0.006473178509622812, 0.050337374210357666, 0.03413473814725876, 0.004403832834213972, -0.07311445474624634, 0.013345921412110329, -0.004963193088769913, 0.03944837301969528, -0.0431276373565197, -0.043082136660814285, -0.02019287459552288, 0.08530595898628235, 0.07773815095424652, -0.03307563439011574, 0.032182980328798294, 0.028674684464931488, 0.07838862389326096, -0.01474676001816988, -0.04452970251441002, 0.07227667421102524, 0.04152221232652664, 0.029058381915092468, 0.05420341715216637, -0.08037374168634415, 0.029684992507100105, -0.05407946929335594, -0.05917501449584961, 0.02384292148053646, -0.024238508194684982, 0.09810446947813034, -0.015276185236871243, -0.010130209848284721, 0.049636803567409515, 0.04517526179552078, -0.02533615380525589, 0.016394156962633133, -0.007207037881016731, 0.001490553724579513, -0.014788222499191761, 0.07972948253154755, 0.015140756964683533, -0.07776327431201935, -0.07276969403028488, -0.011358383111655712, 0.038807597011327744, 0.0016571165760979056, -0.05142739787697792, -0.01760718785226345, -0.053430426865816116, -0.03440762683749199, -0.017297955229878426, -0.03825667127966881, 0.02374071441590786, -0.03488451987504959, 0.030851982533931732, -0.0567062683403492, 0.0449243038892746, 0.012971716932952404, -0.07937797904014587, 0.029489852488040924, 0.015550333075225353, -0.019160905852913857, 0.008695133030414581, -0.0029621256981045008, -0.006776468828320503, 0.014966454356908798, 0.05166218802332878, -0.00570056913420558, -0.049218203872442245, -0.004294048994779587, -0.057859472930431366, 0.06442098319530487, 0.02672000601887703, 0.05428178235888481, 0.022419393062591553, -0.002357254736125469, 0.08345840126276016, 0.013449933379888535, -0.0034523645881563425, -0.038672659546136856, 0.04439416900277138, 0.023354630917310715, 0.04152526706457138, -0.03967660665512085, 0.02243959531188011, 0.0053529622964560986, 0.010493190959095955, 0.06528282165527344, -0.019605761393904686, 1.0396262138149358e-33, 0.018593089655041695, -0.040779195725917816, 0.06223393976688385, -0.01386942807585001, -0.016747109591960907, -0.04160972312092781, 0.004866068251430988, 0.08100312948226929, -0.05062643438577652, -0.06801577657461166, -0.04128323495388031, 0.06412320584058762, -0.02205032669007778, -0.052743081003427505, 0.016744662076234818, -0.018467599526047707, -0.01843312196433544, 0.04996459186077118, 0.0749790295958519, -0.05995285511016846, 0.0153337512165308, -0.05529883876442909, -0.030701979994773865, 0.04592951387166977, -0.010140031576156616, -0.03209494799375534, 0.0025745038874447346, -0.06892018020153046, -0.041929833590984344, 0.024077042937278748, -0.02077355422079563, 0.008831733837723732, 0.042609136551618576, 0.010599001310765743, -0.09751524776220322, -0.04978717118501663, -0.02490779012441635, 0.061745669692754745, -0.061126746237277985, -0.031289778649806976, -0.010363610461354256, 0.011105680838227272, 0.0024220936466008425, -0.10254331678152084, -0.05918041244149208, 0.019709452986717224, 0.05173672363162041, -0.11608823388814926, 0.008257965557277203, 0.07313995063304901, -0.0247512049973011, -0.018649378791451454, 0.03322480246424675, 0.028962895274162292, 0.07195936143398285, -0.08014766126871109, 0.05139700695872307, -0.03599762171506882, 0.022032851353287697, 0.013765638694167137, -0.07347704470157623, -0.05249151214957237, 0.01788492128252983, 0.053588297218084335, 0.05757695063948631, 0.08052824437618256, 0.014555538073182106, 0.09381495416164398, -0.023607878014445305, 0.0258631631731987, -0.010152115486562252, 0.05561501905322075, -0.053151149302721024, 0.05989301577210426, -0.0414208360016346, -0.14509640634059906, 0.11699791252613068, 0.017955230548977852, -0.1750103384256363, 0.04649605229496956, 0.016324540600180626, -0.040876805782318115, -0.02251039445400238, 0.016565069556236267, -0.03755447641015053, -0.002209885511547327, 0.029897106811404228, 0.0013615594943985343, -0.0037804064340889454, -0.02815084345638752, 0.022100085392594337, -0.08748292177915573, -0.10593830049037933, -0.004647409077733755, -0.1085386872291565, -2.7135065676633606e-33, 0.08199816197156906, 0.10070890188217163, 0.004440266638994217, -0.029690278694033623, 0.07147777080535889, 0.016816403716802597, 0.043493662029504776, 0.05965344235301018, -0.004797912202775478, -0.06286424398422241, -0.06381510943174362, -0.0042750099673867226, 0.023701544851064682, 0.06732231378555298, -0.10307104885578156, -0.028640970587730408, -0.08380784094333649, -0.09483865648508072, 0.027700653299689293, -0.029268622398376465, -0.05035456269979477, -0.020696036517620087, 0.053672246634960175, 0.03760495409369469, -0.003684960538521409, 0.04960259050130844, -0.11745898425579071, -0.01494008768349886, 0.009147905744612217, 0.004443012643605471, 0.04259410873055458, -0.11304236948490143, -0.04531196877360344, -0.016356902197003365, 0.001308108796365559, -0.0980929434299469, 0.0035702737513929605, 0.13484416902065277, -0.021090183407068253, 0.019312627613544464, 0.041353821754455566, -0.06008687615394592, 0.025179481133818626, -0.0006683074170723557, -0.03580033779144287, -0.032911088317632675, 0.04709365591406822, -0.09454507380723953, -0.04777105897665024, -0.10872503370046616, -0.04086504876613617, 0.008488991297781467, -0.07311252504587173, 0.1332109421491623, -0.018719809129834175, -0.0066299280151724815, 0.0730634406208992, 0.0519305057823658, 0.01714469864964485, -0.0842905342578888, 0.006775109563022852, -0.03378566354513168, -0.020823488011956215, 0.008322060108184814, -0.005254908464848995, -0.06807202100753784, -0.0005023656412959099, 0.06796295940876007, -0.038999736309051514, 0.02581627294421196, -0.02454114519059658, -0.0013061591889709234, -0.001973458332940936, 0.059302084147930145, -0.06260563433170319, 0.01188422366976738, 0.04381893202662468, -0.032049696892499924, 0.05750010535120964, 0.10076989978551865, -0.08983554691076279, 0.017352156341075897, 0.04511738568544388, 0.02969132736325264, 0.00772396195679903, 0.003873314242810011, 0.05332992970943451, 0.06623026728630066, -0.020952532067894936, 0.12413819879293442, -0.06284923851490021, 0.013508711010217667, -0.015488737262785435, 0.07969027012586594, 0.005205897148698568, -4.6767418382387405e-8, -0.01443164050579071, 0.0052402750588953495, 0.0016933539882302284, 0.04551553726196289, 0.029180927202105522, -0.06490985304117203, -0.014488008804619312, 0.10706113278865814, -0.0689530000090599, 0.026225009933114052, 0.0019372019451111555, 0.04879298061132431, -0.06269708275794983, 0.04335322231054306, -0.0642048716545105, -0.03412051126360893, -0.036588430404663086, 0.0068064527586102486, 0.047521378844976425, -0.05268808826804161, -0.06871158629655838, -0.018679188564419746, 0.003385252319276333, -0.1122710332274437, 0.007360679563134909, 0.06053446978330612, 0.009844650514423847, 0.0543583519756794, -0.0005938183167017996, 0.0038404366932809353, 0.007850618101656437, -0.013676602393388748, -0.0670914426445961, 0.0015450501814484596, -0.026148073375225067, -0.000057110748457489535, -0.12327469885349274, 0.03693137690424919, -0.02695026993751526, 0.060515064746141434, -0.02944219671189785, 0.008528921753168106, -0.028515363112092018, 0.05903438478708267, 0.061504751443862915, 0.10628718137741089, -0.059716492891311646, 0.033337194472551346, 0.026462823152542114, -0.05136694386601448, -0.004614046774804592, -0.040848031640052795, 0.04035579413175583, 0.05849979445338249, -0.07183680683374405, 0.0333486869931221, -0.026678914204239845, -0.0023723833728581667, 0.020039459690451622, 0.018062563613057137, 0.008091180585324764, 0.015688017010688782, -0.0033465567976236343, -0.007605526130646467 ]
0.0919
all standard namespaced resources using the syntax `count/.`: ```shell kubectl create namespace myspace ``` ```shell kubectl create quota test --hard=count/deployments.apps=2,count/replicasets.apps=4,count/pods=3,count/secrets=4 --namespace=myspace ``` ```shell kubectl create deployment nginx --image=nginx --namespace=myspace --replicas=2 ``` ```shell kubectl describe quota --namespace=myspace ``` ``` Name: test Namespace: myspace Resource Used Hard -------- ---- ---- count/deployments.apps 1 2 count/pods 2 3 count/replicasets.apps 1 4 count/secrets 1 4 ``` ## Quota and Cluster Capacity ResourceQuotas are independent of the cluster capacity. They are expressed in absolute units. So, if you add nodes to your cluster, this does \*not\* automatically give each namespace the ability to consume more resources. Sometimes more complex policies may be desired, such as: - Proportionally divide total cluster resources among several teams. - Allow each tenant to grow resource usage as needed, but have a generous limit to prevent accidental resource exhaustion. - Detect demand from one namespace, add nodes, and increase quota. Such policies could be implemented using `ResourceQuotas` as building blocks, by writing a "controller" that watches the quota usage and adjusts the quota hard limits of each namespace according to other signals. Note that resource quota divides up aggregate cluster resources, but it creates no restrictions around nodes: pods from several namespaces may run on the same node. ## Quota scopes Each quota can have an associated set of `scopes`. A quota will only measure usage for a resource if it matches the intersection of enumerated scopes. When a scope is added to the quota, it limits the number of resources it supports to those that pertain to the scope. Resources specified on the quota outside of the allowed set results in a validation error. Kubernetes {{< skew currentVersion >}} supports the following scopes: | Scope | Description | | ----- | ----------- | | [`BestEffort`](#quota-scope-best-effort) | Match pods that have best effort quality of service. | | [`CrossNamespacePodAffinity`](#cross-namespace-pod-affinity-scope) | Match pods that have cross-namespace pod [(anti)affinity terms](/docs/concepts/scheduling-eviction/assign-pod-node). | | [`NotBestEffort`](#quota-scope-non-best-effort) | Match pods that do not have best effort quality of service. | | [`NotTerminating`](#quota-scope-non-terminating) | Match pods where `.spec.activeDeadlineSeconds` is `nil` | | [`PriorityClass`](#resource-quota-per-priorityclass) | Match pods that references the specified [priority class](/docs/concepts/scheduling-eviction/pod-priority-preemption). | | [`Terminating`](#quota-scope-terminating) | Match pods where `.spec.activeDeadlineSeconds` >= `0` | | [`VolumeAttributesClass`](#quota-scope-volume-attributes-class) | Match PersistentVolumeClaims that reference the specified [volume attributes class](/docs/concepts/storage/volume-attributes-classes). | ResourceQuotas with a scope set can also have a optional `scopeSelector` field. You define one or more \_match expressions\_ that specify an `operators` and, if relevant, a set of `values` to match. For example: ```yaml scopeSelector: matchExpressions: - scopeName: BestEffort # Match pods that have best effort quality of service operator: Exists # optional; "Exists" is implied for BestEffort scope ``` The `scopeSelector` supports the following values in the `operator` field: \* `In` \* `NotIn` \* `Exists` \* `DoesNotExist` If the `operator` is `In` or `NotIn`, the `values` field must have at least one value. For example: ```yaml scopeSelector: matchExpressions: - scopeName: PriorityClass operator: In values: - middle ``` If the `operator` is `Exists` or `DoesNotExist`, the `values` field must \*NOT\* be specified. ### Best effort Pods scope {#quota-scope-best-effort} This scope only tracks quota consumed by Pods. It only matches pods that have the [best effort](/docs/concepts/workloads/pods/pod-qos/#besteffort) [QoS class](/docs/concepts/workloads/pods/pod-qos/). The `operator` for a `scopeSelector` must be `Exists`. ### Not-best-effort Pods scope {#quota-scope-non-best-effort} This scope only tracks quota consumed by Pods. It only matches pods that have the [Guaranteed](/docs/concepts/workloads/pods/pod-qos/#guaranteed) or [Burstable](/docs/concepts/workloads/pods/pod-qos/#burstable) [QoS class](/docs/concepts/workloads/pods/pod-qos/). The `operator` for a `scopeSelector` must be `Exists`. ### Non-terminating Pods scope {#quota-scope-non-terminating} This scope only tracks quota consumed by Pods that are not terminating. The `operator` for a `scopeSelector` must be `Exists`. A Pod is not terminating if the `.spec.activeDeadlineSeconds`
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/resource-quotas.md
[ -0.007771472912281752, -0.03630514070391655, 0.0012532436521723866, 0.056559208780527115, -0.006621169857680798, -0.030700845643877983, 0.014903453178703785, -0.06388315558433533, 0.084536112844944, 0.05299955606460571, -0.03507975488901138, -0.09423931688070297, 0.06229748576879501, -0.009333240799605846, 0.02191145159304142, -0.03299926221370697, 0.03818490728735924, -0.0042832703329622746, -0.07782921940088272, -0.05297650396823883, 0.07260379940271378, -0.026030363515019417, 0.027036530897021294, -0.03504740074276924, 0.036581601947546005, 0.015177536755800247, -0.11841282248497009, -0.023698683828115463, 0.11983761191368103, -0.04742400720715523, 0.011250730603933334, 0.05749979242682457, 0.011327795684337616, 0.020676927641034126, 0.0652085542678833, 0.14046171307563782, -0.0034886098001152277, -0.05318543314933777, -0.07798027992248535, 0.013802438043057919, 0.0763787180185318, 0.03422714024782181, -0.03884577378630638, -0.04771837964653969, -0.08107127994298935, 0.002063445281237364, -0.07206212729215622, -0.051325056701898575, -0.025558730587363243, -0.07021042704582214, -0.00865229032933712, -0.06786316633224487, -0.019957909360527992, -0.009036346338689327, 0.03838161751627922, -0.015195793472230434, -0.017069919034838676, 0.060920603573322296, 0.040095992386341095, 0.018702305853366852, 0.03701313957571983, -0.06973284482955933, 0.04202241450548172, -0.03536523878574371, 0.037238750606775284, -0.007402074057608843, -0.054960817098617554, 0.03911333158612251, -0.03828820586204529, 0.02332223951816559, 0.026814917102456093, 0.03215654939413071, -0.04731551557779312, -0.005635674577206373, -0.0075392946600914, 0.008227323181927204, -0.05207597091794014, 0.08023218810558319, -0.00922681950032711, -0.06266272813081741, -0.002734586363658309, 0.042066216468811035, 0.03771958872675896, -0.0032589156180620193, -0.06265537440776825, 0.017142344266176224, 0.010109578259289265, -0.030484316870570183, 0.004793551750481129, -0.038336124271154404, 0.00007187642040662467, 0.015730643644928932, 0.013150363229215145, -0.010535599663853645, 0.04439757019281387, 0.0026832865551114082, -0.04888777807354927, 0.07213478535413742, 0.006600420922040939, -0.02069660648703575, -0.00027169057284481823, -0.0316632054746151, 0.09433839470148087, -0.01642296463251114, -0.02751034125685692, -0.03584522008895874, -0.04462365806102753, 0.031186169013381004, 0.042471349239349365, 0.08524121344089508, -0.009973330423235893, 0.06884826719760895, -0.07665831595659256, 0.02853783592581749, -0.019545696675777435, 0.003545372514054179, 0.045338474214076996, -0.10220662504434586, 0.07033898681402206, 0.11048851162195206, 0.08363957703113556, -0.05830547958612442, 0.02788616344332695, -0.003037241054698825, -0.017501723021268845, -0.017612308263778687, -0.04505833238363266, 1.4485676578255552e-33, 0.0035729685332626104, -0.08825535327196121, 0.02770822122693062, 0.009485197253525257, -0.006245487369596958, -0.040802497416734695, -0.09449927508831024, 0.02732962742447853, -0.03223712742328644, -0.06237998977303505, -0.024828504770994186, 0.08711595088243484, -0.048510465770959854, -0.0021623645443469286, 0.07139042019844055, -0.011768757365643978, 0.031133895739912987, 0.06357225775718689, 0.11321716755628586, -0.009431513957679272, 0.08779213577508926, -0.04411255940794945, -0.07177167385816574, 0.05034518986940384, 0.0634838417172432, -0.03432930260896683, 0.044074639678001404, -0.12095051258802414, -0.06431896239519119, -0.012869445607066154, 0.02915850654244423, -0.018807094544172287, 0.006101620849221945, -0.001936909044161439, -0.055385615676641464, 0.040376026183366776, 0.007503294851630926, 0.06519792973995209, -0.11187601089477539, -0.018475033342838287, -0.046541478484869, 0.019508210942149162, -0.014555194415152073, -0.02705536223948002, -0.00420109648257494, -0.03346095606684685, 0.015298839658498764, -0.1292351931333542, 0.006091865245252848, 0.038501180708408356, 0.039881717413663864, -0.041740234941244125, 0.04083598032593727, 0.02597588114440441, 0.0384255014359951, 0.012220836244523525, 0.0318826362490654, 0.008293090388178825, -0.02899778075516224, 0.029432175680994987, -0.06023632735013962, -0.06540161371231079, 0.025195863097906113, 0.07732954621315002, 0.08093483000993729, 0.05380374565720558, 0.05320307984948158, 0.05663643404841423, 0.014863100834190845, 0.066677026450634, -0.061843160539865494, 0.008339598774909973, -0.0013215345097705722, 0.04938192293047905, 0.008453912101686, -0.08073370903730392, 0.02707759290933609, -0.008033573627471924, -0.16539758443832397, 0.06630907952785492, 0.04755839332938194, -0.056362297385931015, -0.021296190097928047, 0.047766298055648804, -0.061707206070423126, -0.06800082325935364, 0.044699158519506454, -0.007776249665766954, -0.041528910398483276, -0.026187824085354805, 0.07247050106525421, -0.0018599292961880565, -0.0795368030667305, -0.024786965921521187, -0.14009419083595276, -2.559591929141498e-33, 0.06031952053308487, 0.05463481694459915, 0.04898114129900932, 0.01845960132777691, 0.002183386357501149, -0.009179201908409595, -0.02216341719031334, 0.04826372489333153, 0.005345180630683899, -0.010983776301145554, -0.03465254232287407, -0.04438845440745354, 0.020903710275888443, 0.058489516377449036, -0.08883605152368546, 0.020497575402259827, -0.0319945253431797, -0.07282373309135437, -0.003588081570342183, 0.016897346824407578, -0.06418696790933609, 0.011569460853934288, 0.05562366172671318, 0.040471501648426056, 0.03434029966592789, 0.054363738745450974, -0.0800706148147583, -0.005463914480060339, -0.000028805054171243683, 0.013604207895696163, 0.004432703834027052, -0.06266248226165771, -0.09519606083631516, 0.004521843511611223, 0.005774217192083597, -0.09072259813547134, -0.07591351866722107, 0.13923120498657227, 0.010828590020537376, -0.06005275249481201, 0.04552866518497467, 0.04098459333181381, -0.031915079802274704, -0.012319779954850674, -0.07314644753932953, -0.06134919449687004, 0.037341367453336716, -0.10252390801906586, 0.00018554995767772198, -0.08530209958553314, 0.02808566950261593, -0.031482234597206116, -0.06313703954219818, 0.07775699347257614, -0.00597806740552187, -0.008817456662654877, 0.014599713496863842, 0.11697980016469955, -0.04093663766980171, -0.030522074550390244, 0.07192230224609375, -0.027229158207774162, -0.04371420294046402, 0.05347250774502754, -0.0472964271903038, -0.06318586319684982, -0.07677756249904633, -0.030966801568865776, -0.03047839365899563, 0.05699313431978226, -0.015768123790621758, 0.04607723280787468, 0.00791508611291647, 0.07387922704219818, -0.06818319112062454, 0.08776158094406128, 0.100469671189785, -0.05643457919359207, 0.02245437540113926, 0.048764392733573914, -0.10688420385122299, 0.08112984895706177, -0.06594835966825485, -0.03923698887228966, 0.01753311976790428, 0.1054912805557251, 0.00902311597019434, 0.06908470392227173, 0.03157682716846466, 0.0732092410326004, -0.0009275597403757274, -0.0031735070515424013, -0.08416634798049927, 0.060151174664497375, -0.06171261891722679, -4.455444369000361e-8, -0.024755923077464104, -0.00881008431315422, -0.026841117069125175, 0.03423846513032913, 0.026021620258688927, -0.05727144703269005, 0.08712917566299438, 0.050818685442209244, 0.028452398255467415, 0.06919626146554947, 0.02035037986934185, 0.0419427827000618, -0.056838035583496094, 0.027285972610116005, -0.014078490436077118, 0.012637917883694172, 0.009656020440161228, 0.004791428335011005, 0.034847650676965714, -0.014305508695542812, -0.08634118735790253, -0.018359350040555, -0.06224436312913895, -0.007594944443553686, 0.02373472787439823, -0.01746678538620472, 0.04135774075984955, 0.055165018886327744, -0.0028094330336898565, 0.017483578994870186, 0.06360919028520584, 0.0004517156339716166, -0.053960807621479034, -0.006044053938239813, -0.04301424324512482, -0.02288822829723358, -0.11443333327770233, 0.03404874727129936, 0.0029553512576967478, 0.08531583845615387, 0.006269955541938543, -0.02224959060549736, 0.06209452822804451, 0.006961144041270018, 0.007668910548090935, 0.05821243301033974, -0.013207613490521908, 0.06643485277891159, 0.027348782867193222, -0.04936990514397621, -0.016373276710510254, -0.04921098053455353, -0.05678992345929146, -0.010190554894506931, -0.024581165984272957, 0.021282490342855453, 0.029682517051696777, 0.0725599005818367, 0.05525420233607292, -0.03933475539088249, -0.019203606992959976, -0.04545702785253525, 0.009267755784094334, -0.018973588943481445 ]
0.126334
pods that have the [Guaranteed](/docs/concepts/workloads/pods/pod-qos/#guaranteed) or [Burstable](/docs/concepts/workloads/pods/pod-qos/#burstable) [QoS class](/docs/concepts/workloads/pods/pod-qos/). The `operator` for a `scopeSelector` must be `Exists`. ### Non-terminating Pods scope {#quota-scope-non-terminating} This scope only tracks quota consumed by Pods that are not terminating. The `operator` for a `scopeSelector` must be `Exists`. A Pod is not terminating if the `.spec.activeDeadlineSeconds` field is unset. You can use a ResourceQuota with this scope to manage the following resources: \* `count.pods` \* `pods` \* `cpu` \* `memory` \* `requests.cpu` \* `requests.memory` \* `limits.cpu` \* `limits.memory` ### Terminating Pods scope {#quota-scope-terminating} This scope only tracks quota consumed by Pods that are terminating. The `operator` for a `scopeSelector` must be `Exists`. A Pod is considered as \_terminating\_ if the `.spec.activeDeadlineSeconds` field is set to any number. You can use a ResourceQuota with this scope to manage the following resources: \* `count.pods` \* `pods` \* `cpu` \* `memory` \* `requests.cpu` \* `requests.memory` \* `limits.cpu` \* `limits.memory` ### Cross-namespace pod affinity scope {{< feature-state for\_k8s\_version="v1.24" state="stable" >}} You can use `CrossNamespacePodAffinity` [quota scope](#quota-scopes) to limit which namespaces are allowed to have pods with affinity terms that cross namespaces. Specifically, it controls which pods are allowed to set `namespaces` or `namespaceSelector` fields in pod [(anti)affinity terms](/docs/concepts/scheduling-eviction/assign-pod-node). Preventing users from using cross-namespace affinity terms might be desired since a pod with anti-affinity constraints can block pods from all other namespaces from getting scheduled in a failure domain. Using this scope, you (as a cluster administrator) can prevent certain namespaces - such as `foo-ns` in the example below - from having pods that use cross-namespace pod affinity. You configure this creating a ResourceQuota object in that namespace with `CrossNamespacePodAffinity` scope and hard limit of 0: ```yaml apiVersion: v1 kind: ResourceQuota metadata: name: disable-cross-namespace-affinity namespace: foo-ns spec: hard: pods: "0" scopeSelector: matchExpressions: - scopeName: CrossNamespacePodAffinity operator: Exists ``` If you want to disallow using `namespaces` and `namespaceSelector` by default, and only allow it for specific namespaces, you could configure `CrossNamespacePodAffinity` as a limited resource by setting the kube-apiserver flag `--admission-control-config-file` to the path of the following configuration file: ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: AdmissionConfiguration plugins: - name: "ResourceQuota" configuration: apiVersion: apiserver.config.k8s.io/v1 kind: ResourceQuotaConfiguration limitedResources: - resource: pods matchScopes: - scopeName: CrossNamespacePodAffinity operator: Exists ``` With the above configuration, pods can use `namespaces` and `namespaceSelector` in pod affinity only if the namespace where they are created have a resource quota object with `CrossNamespacePodAffinity` scope and a hard limit greater than or equal to the number of pods using those fields. ### PriorityClass scope {#resource-quota-per-priorityclass} {{< feature-state for\_k8s\_version="v1.17" state="stable" >}} A ResourceQuota with a PriorityClass scope only matches Pods that have a particular [priority class](/docs/concepts/scheduling-eviction/pod-priority-preemption), and only if any `scopeSelector` in the quota spec selects a particular Pod. Pods can be created at a specific [priority](/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority). You can control a pod's consumption of system resources based on a pod's priority, by using the `scopeSelector` field in the quota spec. When quota is scoped for PriorityClass using the `scopeSelector` field, the ResourceQuota can only track (and limit) the following resources: \* `pods` \* `cpu` \* `memory` \* `ephemeral-storage` \* `limits.cpu` \* `limits.memory` \* `limits.ephemeral-storage` \* `requests.cpu` \* `requests.memory` \* `requests.ephemeral-storage` #### Example {#quota-scope-priorityclass-example} This example creates a ResourceQuota matches it with pods at specific priorities. The example works as follows: - Pods in the cluster have one of the three [PriorityClasses](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass), "low", "medium", "high". - If you want to try this out, use a testing cluster and set up those three PriorityClasses before you continue. - One quota object is created for each priority. Inspect this set of ResourceQuotas: {{% code\_sample file="policy/quota.yaml" %}} Apply the YAML using `kubectl create`. ```shell kubectl create -f https://k8s.io/examples/policy/quota.yaml ```
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/resource-quotas.md
[ -0.019895242527127266, 0.02308979257941246, -0.020326295867562294, 0.09049100428819656, -0.03559878468513489, -0.06949854642152786, 0.07824105769395828, 0.016057202592492104, 0.04688217490911484, 0.05157189071178436, -0.026400357484817505, -0.0414281003177166, -0.03492174670100212, 0.012571724131703377, 0.004876634106040001, -0.007945025339722633, 0.014102820307016373, -0.02584659308195114, -0.01346029993146658, -0.04357532039284706, 0.10759995132684708, 0.06789109110832214, 0.027971357107162476, 0.05139473080635071, 0.03255748748779297, -0.03375652804970741, -0.08732720464468002, -0.06163140386343002, 0.04274957627058029, -0.0008237612200900912, -0.02418416738510132, -0.005881811957806349, 0.011584674939513206, 0.018154200166463852, 0.11815233528614044, 0.09302818030118942, -0.023649754002690315, -0.0906965434551239, 0.0004164073907304555, -0.049269359558820724, 0.06253597885370255, -0.006242136005312204, -0.1202574297785759, 0.028349263593554497, -0.011548842303454876, 0.026419227942824364, -0.05373634025454521, -0.0015913104871287942, -0.018361791968345642, 0.009264773689210415, -0.03843501955270767, -0.10133464634418488, 0.08579275012016296, 0.07354443520307541, 0.05087890848517418, 0.04580207169055939, 0.010447189211845398, 0.05902864784002304, 0.05309969559311867, 0.054273463785648346, -0.044677283614873886, -0.08331332355737686, -0.0267680361866951, -0.048710428178310394, 0.07502123713493347, -0.006695969495922327, -0.007025124039500952, 0.027006002143025398, 0.01048381719738245, 0.024621551856398582, 0.05021357908844948, -0.006486499682068825, -0.028063761070370674, -0.02005726285278797, -0.041069719940423965, 0.029535021632909775, 0.024850409477949142, 0.037951529026031494, -0.020966816693544388, -0.05280180647969246, -0.010259801521897316, -0.08122865110635757, 0.046218857169151306, -0.02909003011882305, 0.0023168090265244246, 0.03342917934060097, -0.026145782321691513, -0.05543813481926918, 0.023959413170814514, -0.030983762815594673, -0.011686788871884346, -0.0401446633040905, 0.06496439129114151, -0.0569392554461956, 0.07060260325670242, -0.010858932510018349, -0.0071794758550822735, -0.014065008610486984, 0.0030204043723642826, 0.0016020904295146465, 0.011139549314975739, 0.007845677435398102, -0.0016501042991876602, -0.01840219274163246, 0.051266372203826904, -0.021015137434005737, -0.04556126147508621, 0.005109191872179508, -0.009003184735774994, 0.0481753833591938, 0.03084084391593933, 0.033135175704956055, 0.00005062706259195693, 0.03479919955134392, 0.01084921881556511, 0.04277428984642029, -0.028615815564990044, 0.011414644308388233, -0.0027813289780169725, 0.05556916818022728, 0.04484083876013756, -0.03195306286215782, 0.004902447108179331, -0.03228682279586792, -0.018165528774261475, -0.01806904748082161, 0.006019495893269777, 1.6776556192599837e-33, 0.053017597645521164, -0.13411454856395721, -0.014583619311451912, 0.01229322049766779, 0.002043686108663678, -0.014399955049157143, -0.0027477622497826815, 0.06092432141304016, -0.020241495221853256, 0.00020923084230162203, -0.04321499913930893, 0.03563031554222107, -0.03879537805914879, -0.031096167862415314, 0.04067506268620491, -0.08251697570085526, -0.007943777367472649, 0.05042540654540062, 0.07611359655857086, 0.03952854499220848, 0.026085151359438896, -0.11551809310913086, -0.0966489315032959, 0.023090731352567673, 0.042690303176641464, 0.019042307510972023, -0.0040693203918635845, -0.11895452439785004, -0.024494808167219162, 0.047743625938892365, -0.029401255771517754, 0.017226770520210266, -0.01118291262537241, 0.0300997793674469, -0.09436662495136261, -0.039232343435287476, -0.03454749658703804, 0.04217834025621414, -0.06533157825469971, -0.09821754693984985, 0.03763017803430557, 0.04985617846250534, 0.015783503651618958, -0.028268739581108093, -0.07799128443002701, -0.0891251415014267, -0.0033995734993368387, -0.07020346820354462, 0.01900181919336319, 0.10652412474155426, -0.019827410578727722, -0.031336721032857895, 0.020261364057660103, -0.0490875206887722, 0.09066884964704514, -0.06815528869628906, 0.0019057659665122628, 0.07259480655193329, 0.03196122497320175, 0.01400698907673359, 0.0007522806408815086, -0.026333758607506752, -0.04308563470840454, 0.009011948481202126, 0.033484358340501785, 0.12599878013134003, -0.01924760267138481, 0.020564666017889977, 0.019885383546352386, 0.11368554830551147, -0.052032213658094406, 0.053095102310180664, 0.038551054894924164, 0.03548102825880051, -0.04781004786491394, -0.08612796664237976, 0.01165758352726698, 0.014209960587322712, -0.15741683542728424, -0.005550114903599024, 0.023262029513716698, -0.03505312278866768, -0.04231216758489609, 0.07368948310613632, 0.018862692639231682, -0.009740540757775307, 0.008550981990993023, -0.009687644429504871, -0.09300597012042999, 0.005790082737803459, 0.016626471653580666, -0.030818164348602295, -0.09039463102817535, -0.02579137310385704, -0.11286863684654236, -2.8250569407945647e-33, 0.14282545447349548, 0.027887925505638123, 0.0005572530790232122, 0.02167043834924698, -0.0064491755329072475, -0.017811324447393417, -0.021946903318166733, 0.038747016340494156, 0.012691903859376907, -0.022256189957261086, -0.07360959053039551, 0.01630008965730667, 0.030238548293709755, 0.03798526152968407, -0.06649843603372574, 0.022572267800569534, -0.12080259621143341, -0.14422757923603058, 0.006639228202402592, 0.020648233592510223, -0.06462602317333221, 0.0058794948272407055, 0.07615034282207489, 0.030287375673651695, 0.018901914358139038, 0.010723507963120937, -0.021490557119250298, -0.03240459784865379, 0.004520463291555643, -0.05542903020977974, -0.01158198807388544, -0.12410276383161545, -0.08890827745199203, -0.01163090206682682, -0.0014204367762431502, -0.05579347163438797, -0.048173584043979645, 0.1535845547914505, 0.03618014231324196, 0.046889130026102066, 0.13069559633731842, 0.007578649092465639, -0.026179809123277664, -0.028231371194124222, -0.04208427295088768, -0.0673069879412651, 0.03274770453572273, 0.03471466526389122, -0.050250355154275894, -0.1037295013666153, 0.05674088001251221, 0.0002552056685090065, -0.07085670530796051, 0.12530753016471863, 0.0016392165562137961, -0.04275425896048546, 0.06310175359249115, -0.010035019367933273, -0.043558184057474136, -0.06251926720142365, 0.024577051401138306, -0.037930432707071304, -0.02932778187096119, -0.0038984629791229963, 0.005087036173790693, -0.0870736762881279, -0.030921725556254387, 0.005456536542624235, 0.008187160827219486, 0.00028219714295119047, 0.07590273767709732, 0.01845778338611126, 0.03082408383488655, 0.04556005820631981, -0.07080797851085663, 0.00846132542937994, -0.041042815893888474, -0.09468039125204086, 0.10816298425197601, 0.04886578768491745, -0.04836054518818855, 0.11653115600347519, 0.0023237988352775574, 0.058964572846889496, 0.013763501308858395, 0.06518633663654327, 0.005908693186938763, 0.060556843876838684, 0.0171333160251379, 0.05814187973737717, 0.004629186354577541, 0.0011186680058017373, -0.019396893680095673, 0.07746091485023499, -0.012008092366158962, -4.499468531093953e-8, 0.03595263510942459, 0.02710263803601265, -0.008292455226182938, 0.06460417062044144, 0.10244590044021606, -0.06307855993509293, 0.01768656075000763, 0.09357070922851562, -0.0355110689997673, 0.023810680955648422, 0.03829363361001015, 0.017924325540661812, -0.03622431680560112, 0.032195936888456345, 0.020842572674155235, -0.050612375140190125, 0.04628777876496315, 0.08172889798879623, -0.030151868239045143, -0.022640733048319817, -0.06413176655769348, -0.05450066924095154, -0.007970569655299187, -0.04280674457550049, -0.014579664915800095, 0.03651208430528641, 0.06300142407417297, 0.026628708466887474, 0.02387022040784359, -0.019737809896469116, -0.02717389538884163, 0.009913659654557705, -0.02850474789738655, -0.031009433791041374, -0.0577414445579052, 0.011320696212351322, -0.12508666515350342, -0.01588311791419983, -0.03001980297267437, 0.0669274553656578, -0.05318634957075119, -0.03143712505698204, 0.019933782517910004, 0.05308806523680687, -0.04168083891272545, 0.02346360683441162, -0.043526582419872284, 0.05656743049621582, 0.008224563673138618, 0.022968914359807968, -0.025818003341555595, -0.06677696853876114, 0.02923901006579399, 0.06208334118127823, -0.08278635889291763, -0.020755594596266747, 0.03845084086060524, -0.04751373454928398, -0.03424564376473427, 0.0019498434849083424, 0.10792165249586105, 0.0036134866531938314, -0.005626526195555925, 0.013702723197638988 ]
0.206413
If you want to try this out, use a testing cluster and set up those three PriorityClasses before you continue. - One quota object is created for each priority. Inspect this set of ResourceQuotas: {{% code\_sample file="policy/quota.yaml" %}} Apply the YAML using `kubectl create`. ```shell kubectl create -f https://k8s.io/examples/policy/quota.yaml ``` ``` resourcequota/pods-high created resourcequota/pods-medium created resourcequota/pods-low created ``` Verify that `Used` quota is `0` using `kubectl describe quota`. ```shell kubectl describe quota ``` ``` Name: pods-high Namespace: default Resource Used Hard -------- ---- ---- cpu 0 1k memory 0 200Gi pods 0 10 Name: pods-low Namespace: default Resource Used Hard -------- ---- ---- cpu 0 5 memory 0 10Gi pods 0 10 Name: pods-medium Namespace: default Resource Used Hard -------- ---- ---- cpu 0 10 memory 0 20Gi pods 0 10 ``` Create a pod with priority "high". {{% code\_sample file="policy/high-priority-pod.yaml" %}} To create the Pod: ```shell kubectl create -f https://k8s.io/examples/policy/high-priority-pod.yaml ``` Verify that "Used" stats for "high" priority quota, `pods-high`, has changed and that the other two quotas are unchanged. ```shell kubectl describe quota ``` ``` Name: pods-high Namespace: default Resource Used Hard -------- ---- ---- cpu 500m 1k memory 10Gi 200Gi pods 1 10 Name: pods-low Namespace: default Resource Used Hard -------- ---- ---- cpu 0 5 memory 0 10Gi pods 0 10 Name: pods-medium Namespace: default Resource Used Hard -------- ---- ---- cpu 0 10 memory 0 20Gi pods 0 10 ``` #### Limiting PriorityClass consumption by default It may be desired that pods at a particular priority, such as "cluster-services", should be allowed in a namespace, if and only if, a matching quota object exists. With this mechanism, operators are able to restrict usage of certain high priority classes to a limited number of namespaces and not every namespace will be able to consume these priority classes by default. To enforce this, `kube-apiserver` flag `--admission-control-config-file` should be used to pass path to the following configuration file: ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: AdmissionConfiguration plugins: - name: "ResourceQuota" configuration: apiVersion: apiserver.config.k8s.io/v1 kind: ResourceQuotaConfiguration limitedResources: - resource: pods matchScopes: - scopeName: PriorityClass operator: In values: ["cluster-services"] ``` Then, create a resource quota object in the `kube-system` namespace: {{% code\_sample file="policy/priority-class-resourcequota.yaml" %}} ```shell kubectl apply -f https://k8s.io/examples/policy/priority-class-resourcequota.yaml -n kube-system ``` ```none resourcequota/pods-cluster-services created ``` In this case, a pod creation will be allowed if: 1. the Pod's `priorityClassName` is not specified. 1. the Pod's `priorityClassName` is specified to a value other than `cluster-services`. 1. the Pod's `priorityClassName` is set to `cluster-services`, it is to be created in the `kube-system` namespace, and it has passed the resource quota check. A Pod creation request is rejected if its `priorityClassName` is set to `cluster-services` and it is to be created in a namespace other than `kube-system`. ### VolumeAttributesClass scope {#quota-scope-volume-attributes-class} {{< feature-state feature\_gate\_name="VolumeAttributesClass" >}} This scope only tracks quota consumed by PersistentVolumeClaims. PersistentVolumeClaims can be created with a specific [VolumeAttributesClass](/docs/concepts/storage/volume-attributes-classes/), and might be modified after creation. You can control a PVC's consumption of storage resources based on the associated VolumeAttributesClasses, by using the `scopeSelector` field in the quota spec. The PVC references the associated VolumeAttributesClass by the following fields: \* `spec.volumeAttributesClassName` \* `status.currentVolumeAttributesClassName` \* `status.modifyVolumeStatus.targetVolumeAttributesClassName` A relevant ResourceQuota is matched and consumed only if the ResourceQuota has a `scopeSelector` that selects the PVC. When the quota is scoped for the volume attributes class using the `scopeSelector` field, the quota object is restricted to track only the following resources: \* `persistentvolumeclaims` \* `requests.storage` Read [Limit Storage Consumption](/docs/tasks/administer-cluster/limit-storage-consumption/) to learn more about this. ## {{% heading "whatsnext" %}} - See a [detailed example for how to use resource quota](/docs/tasks/administer-cluster/quota-api-object/). - Read the ResourceQuota [API reference](/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/) -
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/resource-quotas.md
[ 0.016202682629227638, 0.0029246294870972633, 0.0052658505737781525, -0.01564183458685875, -0.05234067142009735, -0.02010771818459034, 0.0026725339703261852, 0.015469524078071117, 0.03457145020365715, 0.0765378475189209, 0.008720357902348042, -0.11447198688983917, -0.0004167339648120105, -0.038588859140872955, 0.04287039116024971, 0.009997185319662094, 0.03836354613304138, -0.01199335791170597, -0.07632271200418472, -0.09414557367563248, 0.08677791059017181, 0.0178933534771204, 0.046056680381298065, -0.022298797965049744, -0.00923000369220972, -0.01721632480621338, -0.04837493598461151, 0.02986050397157669, 0.03826218098402023, -0.047679249197244644, -0.034402888268232346, -0.013579056598246098, 0.07680770009756088, 0.015144096687436104, 0.08847969025373459, 0.1142100915312767, 0.023014146834611893, -0.1300167739391327, -0.02527722902595997, 0.023915080353617668, -0.020819559693336487, 0.006769602186977863, -0.10642147809267044, -0.00043706889846362174, -0.009196541272103786, 0.011209111660718918, -0.0579589381814003, 0.01874484494328499, 0.013509813696146011, -0.04331307113170624, -0.00201818416826427, -0.087980717420578, 0.05181162804365158, -0.009025119245052338, 0.03537362813949585, 0.04705735296010971, 0.03655940666794777, 0.06629487127065659, 0.0578492134809494, -0.0037322924472391605, -0.03609047830104828, -0.051964789628982544, 0.02264365926384926, -0.024507641792297363, 0.02299552597105503, -0.017779283225536346, -0.048360906541347504, 0.04352889209985733, -0.020195376127958298, 0.04405783489346504, 0.06876427680253983, 0.0004328966897446662, -0.03513583540916443, -0.02708982490003109, -0.06684393435716629, 0.011989956721663475, 0.002153512556105852, 0.08173419535160065, -0.014723473228514194, -0.012085994705557823, -0.08217433094978333, -0.03368835523724556, 0.0143631212413311, -0.04381078854203224, -0.08435636013746262, -0.03982195258140564, 0.00011862331302836537, -0.01078420877456665, -0.026594610884785652, 0.009121694602072239, 0.03148091584444046, 0.005743863061070442, 0.036255400627851486, -0.06794240325689316, 0.050733841955661774, 0.05221819877624512, -0.026769492775201797, 0.04393017292022705, 0.014268706552684307, -0.005519970320165157, 0.008181118406355381, -0.024266043677926064, -0.013268851675093174, -0.01223787572234869, 0.07047009468078613, 0.005312466062605381, -0.04636821523308754, -0.02758113667368889, -0.040704961866140366, 0.039480168372392654, -0.016586529091000557, 0.044717129319906235, -0.06008900701999664, 0.03687962517142296, -0.028118472546339035, 0.04059407114982605, 0.023147227242588997, -0.05246378108859062, -0.021036269143223763, 0.06125359609723091, 0.04158492386341095, -0.04177245497703552, -0.00014040526002645493, -0.03244371339678764, -0.024867458269000053, 0.004612138960510492, -0.02762831747531891, 4.6480236819543456e-33, 0.04175696521997452, -0.12342420965433121, -0.008526059798896313, -0.07729675620794296, -0.018660832196474075, -0.04891939088702202, 0.010669399052858353, 0.01931874267756939, -0.10047779977321625, -0.043690040707588196, 0.0015815171645954251, 0.008239283226430416, -0.04021593928337097, -0.0607018768787384, 0.011347126215696335, -0.06131422892212868, -0.05341269075870514, 0.07025235146284103, 0.0827554389834404, -0.026726266369223595, 0.07004014402627945, -0.04003521800041199, -0.04681750386953354, -0.008792204782366753, 0.016903553158044815, -0.0036621750332415104, 0.08385933935642242, -0.1686326265335083, -0.006785322912037373, 0.03538475185632706, -0.010334302671253681, -0.0569722019135952, 0.003736110869795084, 0.014282414689660072, -0.10164401680231094, 0.004152878653258085, -0.015300669707357883, 0.08262868225574493, -0.09230783581733704, -0.04302637279033661, 0.026768237352371216, 0.004454050678759813, 0.03943976014852524, -0.07362779974937439, -0.00461434805765748, -0.007248257752507925, 0.06897146999835968, -0.07668396085500717, 0.0015750781167298555, 0.04129834845662117, -0.020966021344065666, -0.04524355009198189, 0.03246195986866951, 0.005169273354113102, 0.04427969828248024, -0.04017210379242897, 0.057493239641189575, 0.039384111762046814, -0.010662789456546307, -0.024663252755999565, -0.08450306206941605, 0.01249866746366024, 0.003826344618573785, 0.06271712481975555, 0.04428466036915779, 0.03312002122402191, -0.01296194177120924, 0.02671130746603012, 0.05040401592850685, 0.07555069774389267, -0.03363354876637459, 0.004233528394252062, -0.02480814978480339, 0.04830716922879219, -0.015387343242764473, -0.06805609166622162, 0.06695340573787689, 0.030262978747487068, -0.16384932398796082, 0.02035093493759632, -0.02223050408065319, -0.02239135652780533, -0.06911070644855499, 0.030242301523685455, -0.017511459067463875, -0.03437517583370209, 0.017344847321510315, 0.041294146329164505, -0.07217969745397568, 0.0037536320742219687, 0.013600262813270092, -0.017880422994494438, -0.054508794099092484, -0.04100596532225609, -0.05545350909233093, -5.632281264945171e-33, 0.0981210470199585, 0.07232392579317093, 0.08759857714176178, 0.07326038181781769, 0.03520029038190842, 0.011717219837009907, 0.012283622287213802, 0.03277132287621498, -0.016322823241353035, 0.04177073389291763, -0.10972196608781815, -0.032321747392416, 0.06947974115610123, 0.02744436077773571, -0.09251514822244644, 0.024530576542019844, -0.0695674866437912, -0.060857586562633514, 0.023526377975940704, 0.0015955428825691342, -0.05288626626133919, 0.06805700808763504, 0.06189374625682831, 0.06746560335159302, 0.06584110856056213, -0.004711813293397427, -0.05142192542552948, -0.006206042133271694, -0.021165892481803894, -0.0021754386834800243, -0.020722422748804092, -0.10060980170965195, -0.11231650412082672, 0.011042354628443718, -0.02630976215004921, -0.1293167620897293, -0.0265244971960783, 0.1200193539261818, 0.003518260084092617, 0.095121830701828, 0.058127254247665405, -0.0032563870772719383, -0.07814846932888031, -0.03234458714723587, -0.09534936398267746, -0.02826806530356407, 0.040943946689367294, -0.07476688176393509, -0.04218165948987007, -0.10829601436853409, -0.03627088665962219, 0.008134834468364716, -0.04057306796312332, 0.12273692339658737, 0.02717696875333786, -0.05548972636461258, 0.04427677392959595, 0.0520712286233902, -0.05649188533425331, -0.0064414506778120995, 0.026864290237426758, -0.013936816714704037, 0.03412069380283356, -0.02534923516213894, 0.02625332772731781, -0.10128797590732574, -0.022263968363404274, 0.0002678720629774034, -0.02502141147851944, 0.00993494875729084, 0.018283724784851074, 0.06592708826065063, 0.04209227114915848, 0.07238280028104782, 0.020470095798373222, 0.02158130146563053, 0.004389737267047167, -0.029488494619727135, 0.08454674482345581, 0.06233812868595123, -0.07759745419025421, 0.11823032796382904, -0.025510113686323166, 0.052464257925748825, 0.0215776264667511, 0.04163743183016777, 0.05471843481063843, 0.07666568458080292, 0.019897306337952614, 0.09758096188306808, -0.04986222833395004, 0.02807539887726307, 0.0048723672516644, 0.08537496626377106, -0.06668686121702194, -4.531853292633059e-8, 0.0256042517721653, -0.054830148816108704, 0.015300111845135689, 0.1177137941122055, 0.04737388342618942, -0.0682503879070282, -0.01180150918662548, 0.091445691883564, -0.026643820106983185, 0.006344890221953392, 0.030306721106171608, 0.09220830351114273, -0.08546179533004761, 0.00792613998055458, -0.04856963828206062, -0.06264889985322952, 0.03858504816889763, 0.06793321669101715, 0.008724447339773178, -0.05960774049162865, -0.038622837513685226, -0.027584794908761978, -0.013705112971365452, 0.025300221517682076, 0.03312535583972931, 0.06186259910464287, 0.061824996024370193, 0.022835716605186462, 0.0579189769923687, 0.010117607191205025, -0.006070989184081554, -0.014341801404953003, -0.07592231780290604, -0.05012018233537674, -0.006181643344461918, -0.034020036458969116, -0.11687491089105606, 0.08533716201782227, -0.001142580877058208, 0.05865108594298363, -0.028854506090283394, -0.024851631373167038, -0.06212129071354866, -0.0019001920009031892, -0.01162408571690321, 0.04631981998682022, -0.060788702219724655, 0.054534897208213806, -0.005433723796159029, -0.013415689580142498, 0.011444934643805027, -0.0902823880314827, 0.02028059959411621, 0.07526609301567078, -0.022702138870954514, 0.04561881721019745, 0.04134805127978325, -0.02239304594695568, -0.00016094620514195412, -0.029017319902777672, 0.08938930928707123, 0.01447899267077446, 0.02774348296225071, -0.020674915984272957 ]
0.110674
the `scopeSelector` field, the quota object is restricted to track only the following resources: \* `persistentvolumeclaims` \* `requests.storage` Read [Limit Storage Consumption](/docs/tasks/administer-cluster/limit-storage-consumption/) to learn more about this. ## {{% heading "whatsnext" %}} - See a [detailed example for how to use resource quota](/docs/tasks/administer-cluster/quota-api-object/). - Read the ResourceQuota [API reference](/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/) - Learn about [LimitRanges](/docs/concepts/policy/limit-range/) - You can read the historical [ResourceQuota design document](https://git.k8s.io/design-proposals-archive/resource-management/admission\_control\_resource\_quota.md) for more information. - You can also read the [Quota support for priority class design document](https://git.k8s.io/design-proposals-archive/scheduling/pod-priority-resourcequota.md).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/resource-quotas.md
[ -0.039066560566425323, 0.05993635579943657, 0.006638507358729839, 0.007684759330004454, -0.030896445736289024, 0.010623473674058914, 0.01995084062218666, 0.012897351756691933, 0.06925974786281586, 0.05081072822213173, -0.07655409723520279, -0.06360188871622086, 0.0002822635287884623, -0.015358353033661842, -0.05584012717008591, 0.0015537947183474898, 0.03929579257965088, -0.03125324472784996, -0.09083494544029236, -0.03648610785603523, 0.11391040682792664, 0.03021501749753952, 0.02972773276269436, 0.009349443949759007, -0.00626790476962924, 0.004256370011717081, -0.04401625692844391, -0.038013894110918045, 0.05114414915442467, 0.015828661620616913, -0.039583902806043625, -0.025226959958672523, 0.041958633810281754, 0.005513607058674097, 0.08863342553377151, 0.0746370479464531, 0.005004780367016792, -0.06535809487104416, -0.02921111509203911, 0.0329638235270977, 0.03578408062458038, 0.003198720049113035, -0.11365625262260437, 0.015468285419046879, 0.0035694886464625597, 0.04370514675974846, -0.049339715391397476, -0.005997146014124155, -0.048092070966959, 0.0469733290374279, 0.010005777701735497, -0.04550619795918465, 0.0663459375500679, 0.028243744745850563, 0.04710978642106056, 0.007891291752457619, 0.016505042091012, 0.09573236107826233, 0.0801064521074295, 0.028547629714012146, -0.041414257138967514, -0.08685585111379623, 0.023579640313982964, 0.0033617818262428045, -0.0045570009388029575, 0.014810211956501007, -0.010192076675593853, 0.035153817385435104, -0.031427524983882904, 0.0032302215695381165, 0.05074407905340195, 0.04868784174323082, -0.052332788705825806, -0.010134479030966759, 0.034025389701128006, 0.02745046652853489, -0.028865091502666473, 0.06056832894682884, 0.04492982476949692, -0.11009969562292099, -0.025048404932022095, -0.04800569266080856, 0.01306730043143034, -0.02055920846760273, -0.05519401654601097, -0.03840015456080437, -0.052820563316345215, -0.024881741032004356, 0.03975480794906616, -0.02473250962793827, 0.041556719690561295, -0.06706299632787704, 0.01919962652027607, -0.05176553875207901, 0.03952701389789581, 0.015743575990200043, -0.11309535801410675, 0.022903775796294212, 0.028943981975317, -0.04568955674767494, 0.013133433647453785, -0.032793816179037094, -0.02008563093841076, 0.02295263297855854, 0.016980817541480064, -0.06168704479932785, -0.0353756844997406, 0.020102351903915405, -0.06221380829811096, 0.07866855710744858, 0.015097050927579403, 0.08711739629507065, -0.030907217413187027, 0.006529240868985653, 0.06670103222131729, 0.020926250144839287, 0.03276525065302849, -0.062358662486076355, 0.0653696209192276, 0.07036349177360535, 0.029505373910069466, -0.061767272651195526, -0.05879068002104759, -0.018640274181962013, -0.010645201429724693, -0.005056648515164852, -0.030719928443431854, -7.373443058343825e-34, 0.06962048262357712, -0.06989603489637375, 0.0464630201458931, -0.0720343217253685, -0.06370555609464645, -0.05242319777607918, -0.0011448221048340201, 0.006248427089303732, -0.07735850661993027, -0.060455627739429474, -0.013901726342737675, 0.05273125693202019, 0.003453308017924428, -0.09635479003190994, 0.04328759387135506, -0.027196938171982765, -0.03552604094147682, 0.11456845700740814, 0.10363326221704483, -0.027613356709480286, 0.06726812571287155, -0.042199309915304184, -0.035551466047763824, 0.033469509333372116, 0.03912810608744621, 0.004059508442878723, 0.039942461997270584, -0.08610944449901581, -0.03200586140155792, 0.03742140159010887, -0.037813927978277206, 0.024871541187167168, 0.009299302473664284, -0.022619005292654037, -0.09307188540697098, 0.013709483668208122, -0.013407704420387745, 0.073714479804039, -0.08519396930932999, -0.08274718374013901, 0.004247715696692467, -0.02147289179265499, 0.05289756506681442, -0.06707671284675598, -0.08681770414113998, -0.06192474439740181, 0.07079922407865524, -0.0955914855003357, 0.01727196015417576, 0.09298266470432281, -0.03315110504627228, -0.035692766308784485, 0.017209574580192566, 0.01045463141053915, 0.10114091634750366, -0.03771030530333519, 0.09125835448503494, -0.014082556590437889, 0.02283972129225731, -0.02399970404803753, -0.03004884533584118, -0.04791565611958504, 0.020044950768351555, 0.06577158719301224, 0.04882276803255081, 0.049461480230093, -0.0007563543040305376, 0.03847893700003624, -0.00008431992318946868, -0.00882262084633112, -0.038505420088768005, 0.021695641800761223, -0.02774130553007126, 0.04365023598074913, -0.04891137778759003, -0.08537381887435913, 0.05344783887267113, 0.046327896416187286, -0.13202549517154694, 0.000894010066986084, -0.03507344052195549, -0.06648336350917816, -0.040477730333805084, 0.031029004603624344, -0.031133435666561127, -0.05736518278717995, 0.018202010542154312, 0.012558264657855034, -0.04756773263216019, -0.023678544908761978, 0.049907486885786057, -0.04938304051756859, -0.08580992370843887, -0.008716038428246975, -0.06845487654209137, -6.833018254925413e-34, 0.12676137685775757, 0.051354002207517624, 0.0449066124856472, 0.029317941516637802, 0.024758517742156982, -0.017193347215652466, -0.0033930304925888777, 0.11953816562891006, 0.0336216576397419, -0.03996845334768295, -0.07787719368934631, -0.011451510712504387, 0.057215508073568344, 0.037375155836343765, -0.08691426366567612, 0.0037750855553895235, -0.0500536672770977, -0.050001636147499084, 0.028514347970485687, -0.022487998008728027, -0.01749248243868351, -0.014789089560508728, 0.023097878322005272, 0.019038274884223938, -0.004985107108950615, 0.02203483134508133, -0.041889309883117676, -0.025462381541728973, 0.018482740968465805, -0.034363798797130585, -0.04859423637390137, -0.10611844807863235, -0.12599916756153107, 0.04646297171711922, -0.01420594658702612, -0.1409788280725479, -0.004792497027665377, 0.10444855690002441, -0.010148175992071629, 0.07946084439754486, 0.07735844701528549, 0.023137560114264488, 0.01600523665547371, -0.006426054053008556, -0.03320596367120743, -0.016788961365818977, 0.0637475848197937, -0.05294239521026611, 0.010110195726156235, -0.13029660284519196, -0.013364038430154324, -0.004428139887750149, -0.012837820686399937, 0.13264814019203186, 0.00016208265151362866, 0.022153833881020546, 0.07336653769016266, 0.036155980080366135, 0.027493281289935112, -0.0673493817448616, 0.06573870778083801, -0.01476410310715437, -0.035381998866796494, 0.0024755315389484167, -0.022649098187685013, -0.05078226700425148, 0.02353040874004364, 0.01175018772482872, -0.024207303300499916, 0.044406626373529434, 0.008026761002838612, -0.035690389573574066, 0.05558505654335022, 0.07423865050077438, -0.02158607728779316, 0.023804854601621628, 0.014889011159539223, -0.02351687289774418, 0.08328017592430115, 0.05037718638777733, -0.04336242005228996, 0.06671009212732315, -0.023821940645575523, 0.037188105285167694, 0.08435483276844025, 0.04172839596867561, 0.018393797799944878, 0.05713355913758278, 0.026184596121311188, 0.06260216981172562, -0.10711032897233963, -0.011880883015692234, -0.03553970530629158, 0.07068222761154175, -0.061948083341121674, -4.869425396236693e-8, -0.010951070114970207, 0.03586883097887039, -0.008367011323571205, 0.032938577234745026, 0.06742382049560547, -0.08675938844680786, 0.010983787477016449, 0.07097098976373672, -0.04598907381296158, 0.053404394537210464, 0.0638650506734848, 0.06996366381645203, -0.032086312770843506, -0.02448124624788761, -0.019529569894075394, -0.040684640407562256, 0.04688095301389694, -0.0314619354903698, 0.026120500639081, -0.01546285580843687, -0.03733465075492859, -0.05137346312403679, -0.027366099879145622, -0.05641229450702667, 0.0378999225795269, 0.06512805074453354, 0.005243808962404728, 0.0832013487815857, 0.05883316695690155, -0.0024623882491141558, -0.021944649517536163, 0.0375036895275116, -0.027705485001206398, -0.03538506105542183, -0.011667243205010891, 0.013008465059101582, -0.1434667706489563, 0.05279390886425972, 0.003435959108173847, 0.08162309229373932, -0.007249759044498205, -0.05152271315455437, -0.01986590586602688, 0.02884330414235592, 0.009662513621151447, 0.12470997869968414, -0.052333101630210876, 0.0828932523727417, -0.04113110154867172, -0.013286484405398369, -0.049383290112018585, -0.08717574179172516, -0.007429967634379864, 0.0915333479642868, -0.04001302272081375, 0.006442271173000336, 0.04160674288868904, -0.049230992794036865, -0.00397234782576561, -0.02400796115398407, 0.0760096088051796, 0.0723540261387825, -0.038127366453409195, 0.029140735045075417 ]
0.132481
In order to support latency-critical and high-throughput workloads, Kubernetes offers a suite of Resource Managers. The managers aim to co-ordinate and optimise the alignment of node's resources for pods configured with a specific requirement for CPUs, devices, and memory (hugepages) resources. ## Hardware topology alignment policies \_Topology Manager\_ is a kubelet component that aims to coordinate the set of components that are responsible for these optimizations. The overall resource management process is governed using the policy you specify. To learn more, read [Control Topology Management Policies on a Node](/docs/tasks/administer-cluster/topology-manager/). ## Policies for assigning CPUs to Pods {{< feature-state feature\_gate\_name="CPUManager" >}} Once a Pod is bound to a Node, the kubelet on that node may need to either multiplex the existing hardware (for example, sharing CPUs across multiple Pods) or allocate hardware by dedicating some resource (for example, assigning one of more CPUs for a Pod's exclusive use). By default, the kubelet uses [CFS quota](https://en.wikipedia.org/wiki/Completely\_Fair\_Scheduler) to enforce pod CPU limits. When the node runs many CPU-bound pods, the workload can move to different CPU cores depending on whether the pod is throttled and which CPU cores are available at scheduling time. Many workloads are not sensitive to this migration and thus work fine without any intervention. However, in workloads where CPU cache affinity and scheduling latency significantly affect workload performance, the kubelet allows alternative CPU management policies to determine some placement preferences on the node. This is implemented using the \_CPU Manager\_ and its policy. There are two available policies: - `none`: the `none` policy explicitly enables the existing default CPU affinity scheme, providing no affinity beyond what the OS scheduler does automatically. Limits on CPU usage for [Guaranteed pods](/docs/concepts/workloads/pods/pod-qos/) and [Burstable pods](/docs/concepts/workloads/pods/pod-qos/) are enforced using CFS quota. - `static`: the `static` policy allows containers in `Guaranteed` pods with integer CPU `requests` access to exclusive CPUs on the node. This exclusivity is enforced using the [cpuset cgroup controller](https://www.kernel.org/doc/Documentation/cgroup-v2.txt). {{< note >}} System services such as the container runtime and the kubelet itself can continue to run on these exclusive CPUs. The exclusivity only extends to other pods. {{< /note >}} CPU Manager doesn't support offlining and onlining of CPUs at runtime. ### Static policy The static policy enables finer-grained CPU management and exclusive CPU assignment. This policy manages a shared pool of CPUs that initially contains all CPUs in the node. The amount of exclusively allocatable CPUs is equal to the total number of CPUs in the node minus any CPU reservations set by the kubelet configuration. CPUs reserved by these options are taken, in integer quantity, from the initial shared pool in ascending order by physical core ID. This shared pool is the set of CPUs on which any containers in `BestEffort` and `Burstable` pods run. Containers in `Guaranteed` pods with fractional CPU `requests` also run on CPUs in the shared pool. Only containers that are part of a `Guaranteed` pod and have integer CPU `requests` are assigned exclusive CPUs. {{< note >}} The kubelet requires a CPU reservation greater than zero when the static policy is enabled. This is because a zero CPU reservation would allow the shared pool to become empty. {{< /note >}} As `Guaranteed` pods whose containers fit the requirements for being statically assigned are scheduled to the node, CPUs are removed from the shared pool and placed in the cpuset for the container. CFS quota is not used to bound the CPU usage of these containers as their usage is bound by the scheduling domain itself. In others words, the number of CPUs in the container cpuset is equal to the integer CPU `limit` specified
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/node-resource-managers.md
[ 0.05404923856258392, -0.024555742740631104, 0.006559279747307301, 0.011089924722909927, -0.04201142117381096, -0.02643747813999653, -0.025925887748599052, -0.0412735715508461, 0.09194868057966232, 0.0279656033962965, -0.0489441379904747, -0.032549191266298294, -0.02473045140504837, -0.08636628091335297, 0.01254509761929512, -0.033127833157777786, 0.07633304595947266, 0.02307894267141819, -0.044679440557956696, -0.07755246013402939, 0.031069546937942505, -0.05163320526480675, -0.00010683062282623723, -0.012457403354346752, -0.044393520802259445, -0.0013415717985481024, -0.0282759852707386, -0.02533375471830368, 0.02235264889895916, -0.07440174371004105, -0.04354013130068779, -0.042323969304561615, 0.020629772916436195, 0.03970220312476158, 0.03399576246738434, 0.08813644200563431, -0.044653844088315964, -0.08038919419050217, -0.06701809912919998, 0.03760363534092903, 0.018673300743103027, -0.027458123862743378, -0.08160652965307236, 0.010600687004625797, -0.028790773823857307, 0.06830289214849472, -0.04851406812667847, -0.0342361144721508, -0.013612685725092888, -0.09965997189283371, 0.009767001494765282, -0.11384780704975128, 0.0547058992087841, 0.04174564778804779, 0.05325714126229286, 0.11016236990690231, 0.04842768609523773, 0.022207697853446007, 0.06688492745161057, 0.018899330869317055, 0.0630042627453804, -0.06634330749511719, 0.011715435422956944, 0.01089841965585947, 0.07522091269493103, -0.029000867158174515, 0.07336310297250748, 0.04720386862754822, 0.015395602211356163, -0.012525920756161213, 0.11032150685787201, -0.02617216482758522, -0.02920420840382576, 0.0018805942963808775, -0.004230376798659563, 0.019019700586795807, -0.038682520389556885, 0.03446201607584953, 0.026115315034985542, -0.07347524166107178, 0.03970599174499512, 0.10295581817626953, 0.05265238508582115, -0.038706593215465546, -0.027300700545310974, -0.07494965940713882, -0.05597938224673271, -0.015363103710114956, 0.022515473887324333, -0.024889586493372917, 0.04142031818628311, -0.00520331971347332, 0.021404290571808815, -0.10351026803255081, 0.05935502052307129, 0.020007722079753876, -0.006066996604204178, -0.028254609555006027, 0.012843110598623753, -0.0223198514431715, 0.04648688808083534, 0.002888730261474848, 0.04263269156217575, 0.04775825887918472, 0.06431140750646591, -0.05852976068854332, -0.048858530819416046, 0.061555955559015274, 0.022464878857135773, -0.018327001482248306, 0.009934906847774982, 0.03773375600576401, -0.02349686436355114, 0.04825635254383087, 0.02046329155564308, 0.004650984425097704, 0.05052418261766434, -0.01908860169351101, 0.09388784319162369, 0.07990054786205292, -0.04848768189549446, -0.10049351304769516, 0.005031855311244726, -0.03844142705202103, -0.03597074747085571, 0.039490941911935806, -0.12007559090852737, 4.137115633520578e-33, 0.01659637689590454, -0.04623347520828247, 0.011147258803248405, -0.05132603645324707, -0.009910129941999912, -0.1167612075805664, -0.05922039970755577, -0.029751399531960487, -0.033166516572237015, -0.02722725085914135, -0.08579219877719879, 0.04395538195967674, -0.0030676659662276506, 0.032407693564891815, 0.04020535945892334, -0.07260800153017044, -0.07415837049484253, 0.07076648622751236, 0.1050097718834877, 0.018851876258850098, 0.06619306653738022, -0.05168137699365616, -0.045143596827983856, 0.03085913695394993, 0.037041548639535904, -0.025232208892703056, 0.021921148523688316, -0.08190397173166275, -0.06663371622562408, 0.020301099866628647, -0.03878581523895264, 0.021752854809165, -0.0043524992652237415, 0.02509048581123352, -0.07228823006153107, 0.02213943377137184, -0.0421903058886528, -0.01624082215130329, -0.03461014851927757, -0.021864844486117363, -0.005393511615693569, 0.018064575269818306, -0.004642257001250982, -0.08821851015090942, 0.013513760641217232, 0.004828185308724642, 0.01704064942896366, -0.07814981043338776, 0.013370614498853683, 0.0196999441832304, 0.01763884536921978, -0.004690326750278473, 0.08770053833723068, 0.004741720389574766, 0.07188839465379715, 0.0066163195297122, 0.13190197944641113, -0.041314661502838135, 0.031759098172187805, 0.13053208589553833, -0.03683556243777275, -0.06366042792797089, -0.03593244031071663, 0.0418885312974453, 0.06328340619802475, 0.018024468794465065, 0.0065727015025913715, 0.08566641062498093, -0.021193543449044228, 0.03388078510761261, -0.08452211320400238, 0.023633066564798355, 0.01986876130104065, -0.00020364957163110375, -0.00797412171959877, -0.03318876400589943, -0.02644369751214981, -0.019970597699284554, -0.21685902774333954, 0.004963978659361601, -0.014479839242994785, 0.04136056452989578, -0.022954251617193222, 0.03932585194706917, -0.03574768453836441, -0.08029518276453018, 0.03666160628199577, 0.039923105388879776, -0.028423475101590157, 0.07909416407346725, 0.03326672315597534, 0.0054154726676642895, 0.0007032130379229784, 0.07254749536514282, -0.1366036832332611, -3.4476139936824104e-33, 0.05482996627688408, -0.054291289299726486, 0.03329107165336609, 0.05506143718957901, 0.028179286047816277, 0.026734549552202225, -0.020746266469359398, -0.02544127218425274, -0.03687180206179619, -0.08269233256578445, -0.051398780196905136, -0.08613837510347366, 0.02401367574930191, -0.01181077491492033, -0.06349921226501465, 0.021555902436375618, -0.05631880834698677, -0.05089147761464119, 0.0006353803328238428, 0.0008017874206416309, -0.0004480851930566132, -0.0295861903578043, 0.00966053456068039, -0.026042712852358818, 0.028567126020789146, 0.02241676300764084, -0.00279546738602221, -0.00694845849648118, -0.01921362616121769, -0.009794920682907104, -0.02298947609961033, -0.11861435323953629, -0.017354406416416168, 0.06814534962177277, 0.0245739184319973, 0.011300631798803806, -0.02307301200926304, 0.08027967810630798, 0.030822239816188812, 0.006394482683390379, 0.055804263800382614, 0.024486513808369637, -0.033746685832738876, -0.024197455495595932, -0.00791797786951065, 0.06436052918434143, -0.07406142354011536, -0.05244021862745285, -0.06217833235859871, -0.09570376574993134, 0.009102328680455685, -0.03183658793568611, -0.010889982804656029, 0.07118423283100128, -0.01843106374144554, 0.015592943876981735, 0.006755806505680084, 0.0933755561709404, 0.005896319169551134, 0.0037737395614385605, 0.081760935485363, -0.1381390243768692, 0.04003327339887619, 0.018534833565354347, -0.007384315133094788, -0.027764512225985527, 0.05163151025772095, -0.006089475471526384, -0.028306907042860985, 0.04639033228158951, -0.042148493230342865, -0.01469014585018158, 0.02787443809211254, 0.0790298730134964, -0.06612523645162582, -0.01216927170753479, 0.062493953853845596, -0.03989585489034653, 0.03245168551802635, -0.009916840121150017, -0.07184884697198868, 0.07484623044729233, -0.05287802591919899, 0.01471773162484169, 0.008739344775676727, 0.07903821021318436, 0.1016400083899498, 0.07145540416240692, 0.04885317012667656, -0.004186222329735756, -0.011277684941887856, 0.0059383464977145195, -0.03604547306895256, 0.07477489858865738, -0.08164851367473602, -4.9983697181232856e-8, 0.08749575912952423, -0.06090572848916054, 0.01634523645043373, 0.030168229714035988, 0.015309273265302181, -0.04879671707749367, 0.054467614740133286, 0.02832564152777195, 0.008638584055006504, 0.034867968410253525, 0.05475228279829025, 0.05194097012281418, -0.02058052271604538, -0.021404186263680458, 0.09162355959415436, 0.01696500927209854, -0.010159906931221485, 0.04284355044364929, 0.012119420804083347, -0.08875041455030441, -0.06918773800134659, 0.025416847318410873, -0.011448433622717857, 0.015668846666812897, 0.04053596034646034, 0.057335641235113144, 0.07959611713886261, 0.06540536135435104, 0.026318924501538277, 0.002415176248177886, -0.06529375910758972, 0.018361475318670273, -0.061869919300079346, 0.03323690965771675, 0.02604750730097294, 0.055533554404973984, -0.14109215140342712, 0.08013884723186493, 0.03577006980776787, 0.06438598781824112, -0.007374753709882498, -0.07151344418525696, -0.04889550060033798, 0.02195541001856327, 0.03963497281074524, 0.055748336017131805, -0.0603359118103981, 0.1039009839296341, 0.01356713380664587, 0.004090798087418079, -0.01339426077902317, -0.021420162171125412, -0.0012131354305893183, 0.08625159412622452, -0.046883415430784225, -0.008043991401791573, 0.0043899486772716045, -0.08772308379411697, 0.04212690144777298, -0.00010022226342698559, -0.010505981743335724, -0.008257732726633549, -0.002989723812788725, -0.021536268293857574 ]
0.226856
and placed in the cpuset for the container. CFS quota is not used to bound the CPU usage of these containers as their usage is bound by the scheduling domain itself. In others words, the number of CPUs in the container cpuset is equal to the integer CPU `limit` specified in the pod spec. This static assignment increases CPU affinity and decreases context switches due to throttling for the CPU-bound workload. Consider the containers in the following pod specs: ```yaml spec: containers: - name: nginx image: nginx ``` The pod above runs in the `BestEffort` QoS class because no resource `requests` or `limits` are specified. It runs in the shared pool. ```yaml spec: containers: - name: nginx image: nginx resources: limits: memory: "200Mi" requests: memory: "100Mi" ``` The pod above runs in the `Burstable` QoS class because resource `requests` do not equal `limits` and the `cpu` quantity is not specified. It runs in the shared pool. ```yaml spec: containers: - name: nginx image: nginx resources: limits: memory: "200Mi" cpu: "2" requests: memory: "100Mi" cpu: "1" ``` The pod above runs in the `Burstable` QoS class because resource `requests` do not equal `limits`. It runs in the shared pool. ```yaml spec: containers: - name: nginx image: nginx resources: limits: memory: "200Mi" cpu: "2" requests: memory: "200Mi" cpu: "2" ``` The pod above runs in the `Guaranteed` QoS class because `requests` are equal to `limits`. And the container's resource limit for the CPU resource is an integer greater than or equal to one. The `nginx` container is granted 2 exclusive CPUs. ```yaml spec: containers: - name: nginx image: nginx resources: limits: memory: "200Mi" cpu: "1.5" requests: memory: "200Mi" cpu: "1.5" ``` The pod above runs in the `Guaranteed` QoS class because `requests` are equal to `limits`. But the container's resource limit for the CPU resource is a fraction. It runs in the shared pool. ```yaml spec: containers: - name: nginx image: nginx resources: limits: memory: "200Mi" cpu: "2" ``` The pod above runs in the `Guaranteed` QoS class because only `limits` are specified and `requests` are set equal to `limits` when not explicitly specified. And the container's resource limit for the CPU resource is an integer greater than or equal to one. The `nginx` container is granted 2 exclusive CPUs. #### Static policy options {#cpu-policy-static--options} Here are the available policy options for the static CPU management policy, listed in alphabetical order: `align-by-socket` (alpha, hidden by default) : Align CPUs by physical package / socket boundary, rather than logical NUMA boundaries (available since Kubernetes v1.25) `distribute-cpus-across-cores` (alpha, hidden by default) : Allocate virtual cores, sometimes called hardware threads, across different physical cores (available since Kubernetes v1.31) `distribute-cpus-across-numa` (beta, visible by default) : Spread CPUs across different NUMA domains, aiming for an even balance between the selected domains (available since Kubernetes v1.23) `full-pcpus-only` (GA, visible by default) : Always allocate full physical cores (available since Kubernetes v1.22, GA since Kubernetes v1.33) `strict-cpu-reservation` (GA, visible by default) : Prevent all the pods regardless of their Quality of Service class to run on reserved CPUs (available since Kubernetes v1.32, GA since Kubernetes v1.35) `prefer-align-cpus-by-uncorecache` (beta, visible by default) : Align CPUs by uncore (Last-Level) cache boundary on a best-effort way (available since Kubernetes v1.32) You can toggle groups of options on and off based upon their maturity level using the following feature gates: \* `CPUManagerPolicyBetaOptions` (default enabled). Disable to hide beta-level options. \* `CPUManagerPolicyAlphaOptions` (default disabled). Enable to show alpha-level options. You will still have to enable each option using the `cpuManagerPolicyOptions` field in the kubelet configuration file. For more detail about the individual options you
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/node-resource-managers.md
[ -0.005953097715973854, 0.04624499753117561, -0.027967995032668114, 0.01850525476038456, 0.04207473248243332, -0.04637285694479942, 0.03283026069402695, 0.01534847542643547, 0.07416132092475891, -0.015656176954507828, -0.026440121233463287, 0.008043563924729824, -0.024305203929543495, 0.0037036004941910505, 0.010363933630287647, -0.07251136004924774, 0.11028043180704117, -0.008193991146981716, -0.09722845256328583, -0.02314574457705021, 0.08323673903942108, 0.02388598769903183, -0.008570483885705471, 0.022227153182029724, -0.0011091664200648665, 0.04026690125465393, -0.11730827391147614, -0.022322073578834534, 0.12865161895751953, 0.011546976864337921, -0.04270445555448532, 0.008909429423511028, 0.06409905105829239, 0.018080640584230423, 0.03947868198156357, 0.10937941074371338, 0.0059648361057043076, -0.11852281540632248, -0.008755876682698727, 0.013510634191334248, -0.009431201964616776, 0.00008057901141000912, -0.06182089075446129, 0.03967340663075447, -0.04598921164870262, 0.007562853861600161, -0.006722893100231886, 0.017756491899490356, -0.03250620514154434, -0.04762637987732887, -0.053528375923633575, -0.07465263456106186, 0.02860812470316887, 0.0658201351761818, 0.00612539192661643, 0.04299071803689003, 0.010299749672412872, 0.020872414112091064, 0.034089215099811554, 0.059913270175457, -0.07950855791568756, -0.05728301778435707, 0.037745751440525055, 0.03497649356722832, 0.1153663769364357, -0.07020062208175659, -0.014181624166667461, -0.013166915625333786, -0.03349550813436508, -0.006445074919611216, 0.08729797601699829, 0.006330604199320078, -0.0053319791331887245, -0.01880558393895626, -0.030347969383001328, 0.0260811448097229, -0.0314522348344326, -0.003818771569058299, -0.025507351383566856, -0.021031538024544716, 0.041309285908937454, -0.04064943268895149, 0.0713392049074173, -0.07511136680841446, -0.03648259863257408, -0.019147999584674835, 0.035177577286958694, -0.02634189836680889, -0.007555908057838678, -0.025455664843320847, 0.054909925907850266, 0.02687159553170204, 0.04214652627706528, -0.02450990490615368, 0.1124260202050209, -0.008127305656671524, -0.0653395876288414, 0.05417000129818916, 0.004605663940310478, -0.011932303197681904, 0.015943355858325958, 0.007294117473065853, 0.05002057924866676, 0.048057783395051956, 0.03855191543698311, -0.035153042525053024, -0.03499603271484375, 0.03011488914489746, -0.011407106183469296, 0.01261230930685997, 0.01794138364493847, 0.026885664090514183, -0.007888955064117908, 0.006402621977031231, -0.04371211677789688, 0.009364713914692402, -0.02127750962972641, -0.027300933375954628, -0.0006322437548078597, 0.09899765253067017, -0.011556954123079777, -0.037879593670368195, -0.019454779103398323, -0.01936166174709797, -0.036746010184288025, 0.020519165322184563, -0.08278591185808182, 4.8046671204090465e-33, -0.02051354944705963, -0.0897526815533638, 0.020438652485609055, -0.08701542764902115, 0.019351325929164886, -0.036221910268068314, -0.022541392594575882, 0.007738867308944464, -0.05474332720041275, 0.032219551503658295, -0.012103816494345665, 0.015650972723960876, -0.031343426555395126, 0.06493521481752396, 0.04455363005399704, -0.06440110504627228, -0.005052961874753237, 0.0038757487200200558, 0.06594044715166092, 0.024420445784926414, 0.07414211332798004, -0.05181797593832016, -0.09363370388746262, 0.022742319852113724, 0.04634271562099457, 0.027435140684247017, 0.03165816143155098, -0.09123052656650543, -0.036919448524713516, 0.031054066494107246, -0.011178874410688877, 0.009811685420572758, -0.02159157767891884, 0.017152883112430573, -0.05889353156089783, -0.02111203968524933, 0.0008317374158650637, 0.04329010099172592, -0.059992797672748566, -0.05548681318759918, 0.06850096583366394, 0.03780180588364601, 0.006419328041374683, -0.05056678131222725, -0.06834215670824051, -0.07768047600984573, -0.02265004999935627, -0.07924650609493256, -0.015891531482338905, 0.06577229499816895, 0.032161612063646317, -0.018021589145064354, -0.014235180802643299, 0.004578017629683018, 0.08668309450149536, -0.056780338287353516, 0.01966041326522827, 0.011400383897125721, -0.007056239526718855, 0.0538724884390831, -0.04900764673948288, -0.048886023461818695, -0.0186774842441082, 0.03229115158319473, 0.029253745451569557, 0.10246436297893524, 0.024715952575206757, 0.0361705906689167, 0.014994771219789982, 0.13373605906963348, -0.0723080262541771, 0.030166611075401306, 0.0015128947561606765, 0.09731448441743851, -0.02662435919046402, -0.026180006563663483, 0.02896592766046524, 0.02012813463807106, -0.13261596858501434, -0.009923617355525494, -0.03246938809752464, 0.047395043075084686, -0.03400059789419174, 0.06543803960084915, -0.11586645990610123, -0.07820311188697815, -0.01778494194149971, 0.06559950113296509, -0.012781653553247452, -0.004289344418793917, 0.06079307571053505, -0.015136432833969593, -0.04231911897659302, -0.014225832186639309, -0.15813270211219788, -5.512106804040762e-33, 0.03710801154375076, 0.014775502495467663, -0.07670402526855469, 0.027867544442415237, 0.02514183335006237, 0.001663076225668192, 0.02058427594602108, 0.01766805350780487, -0.005463648121803999, -0.021804330870509148, -0.07459573447704315, -0.020309818908572197, 0.003899725154042244, 0.058296676725149155, -0.12703336775302887, -0.00854965765029192, -0.07547832280397415, -0.10183682292699814, 0.007219700142741203, -0.028220823034644127, -0.027351144701242447, 0.01259955670684576, 0.14530442655086517, 0.009325048886239529, 0.03865088149905205, 0.008866378106176853, -0.009905853308737278, -0.039906445890665054, 0.0016640154644846916, -0.028350241482257843, -0.002986535429954529, -0.11348860710859299, -0.07912997156381607, 0.009463289752602577, -0.04413946717977524, -0.0541701465845108, -0.09613273292779922, 0.09250643849372864, 0.01702229678630829, -0.00829460471868515, 0.0755886659026146, 0.015180990099906921, 0.016852783039212227, -0.000548630312550813, -0.07903482019901276, 0.006920241750776768, 0.02076529897749424, -0.10542149096727371, 0.03604854270815849, -0.08273058384656906, -0.0023033965844660997, 0.006690984591841698, 0.0026394627057015896, 0.1485137939453125, 0.007667465601116419, -0.06336928904056549, 0.022354235872626305, 0.062261391431093216, 0.0117535050958395, -0.01836060732603073, 0.12774810194969177, 0.0048848409205675125, -0.054901424795389175, 0.01290984358638525, 0.00825504120439291, -0.03266755864024162, -0.10110287368297577, -0.00390633475035429, 0.013504480011761189, 0.04336366429924965, 0.05269593372941017, 0.04330820590257645, 0.059957537800073624, 0.0807565450668335, -0.11448194831609726, 0.059181831777095795, 0.02203688956797123, -0.030449507758021355, 0.0648939311504364, -0.019325561821460724, -0.06518950313329697, 0.11509688198566437, -0.08006930351257324, -0.004514139611274004, 0.000828973890747875, 0.02310529723763466, 0.06004157289862633, -0.0064756907522678375, 0.026629680767655373, 0.01526879332959652, -0.015329348854720592, -0.018543532118201256, -0.06935743987560272, 0.051385361701250076, -0.020469099283218384, -4.682483734086418e-8, 0.03553211688995361, 0.0105204526335001, -0.008242489770054817, 0.031260374933481216, 0.05837839096784592, -0.05007437616586685, 0.08306527882814407, 0.03621838986873627, 0.0033801391255110502, 0.07813268899917603, 0.02240154705941677, 0.007641627918928862, -0.04281570762395859, -0.018560418859124184, 0.037762563675642014, 0.020401781424880028, -0.03521021082997322, 0.04222938418388367, 0.03846453130245209, -0.08933616429567337, -0.04486513510346413, -0.019682234153151512, -0.045092497020959854, -0.005225116387009621, -0.015295708552002907, 0.008346151560544968, 0.10480780154466629, 0.04383113980293274, 0.021202700212597847, -0.0015489167999476194, -0.05165063217282295, 0.02061113528907299, -0.04675431549549103, -0.07349754869937897, -0.025600550696253777, 0.010754424147307873, -0.21732035279273987, 0.005078999325633049, -0.005738276056945324, 0.0257369726896286, -0.049114156514406204, -0.10394211113452911, 0.020099643617868423, -0.02733960561454296, 0.014822541736066341, 0.027939729392528534, -0.020410966128110886, 0.08182624727487564, 0.009346745908260345, 0.0372670516371727, 0.045605696737766266, -0.047080542892217636, 0.00169552699662745, 0.06756234914064407, 0.03737271949648857, 0.015621243976056576, 0.0450686551630497, -0.04316098988056183, -0.028596101328730583, -0.06184455379843712, 0.04191501811146736, 0.0038686965126544237, 0.049380432814359665, 0.020469963550567627 ]
0.196665
maturity level using the following feature gates: \* `CPUManagerPolicyBetaOptions` (default enabled). Disable to hide beta-level options. \* `CPUManagerPolicyAlphaOptions` (default disabled). Enable to show alpha-level options. You will still have to enable each option using the `cpuManagerPolicyOptions` field in the kubelet configuration file. For more detail about the individual options you can configure, read on. ##### `full-pcpus-only` If the `full-pcpus-only` policy option is specified, the static policy will always allocate full physical cores. By default, without this option, the static policy allocates CPUs using a topology-aware best-fit allocation. On SMT enabled systems, the policy can allocate individual virtual cores, which correspond to hardware threads. This can lead to different containers sharing the same physical cores; this behaviour in turn contributes to the [noisy neighbours problem](https://en.wikipedia.org/wiki/Cloud\_computing\_issues#Performance\_interference\_and\_noisy\_neighbors). With the option enabled, the pod will be admitted by the kubelet only if the CPU request of all its containers can be fulfilled by allocating full physical cores. If the pod does not pass the admission, it will be put in Failed state with the message `SMTAlignmentError`. ##### `distribute-cpus-across-numa` If the `distribute-cpus-across-numa`policy option is specified, the static policy will evenly distribute CPUs across NUMA nodes in cases where more than one NUMA node is required to satisfy the allocation. By default, the `CPUManager` will pack CPUs onto one NUMA node until it is filled, with any remaining CPUs simply spilling over to the next NUMA node. This can cause undesired bottlenecks in parallel code relying on barriers (and similar synchronization primitives), as this type of code tends to run only as fast as its slowest worker (which is slowed down by the fact that fewer CPUs are available on at least one NUMA node). By distributing CPUs evenly across NUMA nodes, application developers can more easily ensure that no single worker suffers from NUMA effects more than any other, improving the overall performance of these types of applications. ##### `align-by-socket` If the `align-by-socket` policy option is specified, CPUs will be considered aligned at the socket boundary when deciding how to allocate CPUs to a container. By default, the `CPUManager` aligns CPU allocations at the NUMA boundary, which could result in performance degradation if CPUs need to be pulled from more than one NUMA node to satisfy the allocation. Although it tries to ensure that all CPUs are allocated from the \_minimum\_ number of NUMA nodes, there is no guarantee that those NUMA nodes will be on the same socket. By directing the `CPUManager` to explicitly align CPUs at the socket boundary rather than the NUMA boundary, we are able to avoid such issues. Note, this policy option is not compatible with `TopologyManager` `single-numa-node` policy and does not apply to hardware where the number of sockets is greater than number of NUMA nodes. ##### `distribute-cpus-across-cores` If the `distribute-cpus-across-cores` policy option is specified, the static policy will attempt to allocate virtual cores (hardware threads) across different physical cores. By default, the `CPUManager` tends to pack CPUs onto as few physical cores as possible, which can lead to contention among CPUs on the same physical core and result in performance bottlenecks. By enabling the `distribute-cpus-across-cores` policy, the static policy ensures that CPUs are distributed across as many physical cores as possible, reducing the contention on the same physical core and thereby improving overall performance. However, it is important to note that this strategy might be less effective when the system is heavily loaded. Under such conditions, the benefit of reducing contention diminishes. Conversely, default behavior can help in reducing inter-core communication overhead, potentially providing better performance under high load conditions. ##### `strict-cpu-reservation` The `reservedSystemCPUs` parameter in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/), or
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/node-resource-managers.md
[ 0.03002764843404293, 0.007986941374838352, 0.02439105696976185, 0.011996014043688774, -0.006720082368701696, -0.028872353956103325, -0.0431889146566391, -0.03821057453751564, -0.004737297538667917, 0.02214605174958706, 0.00727153429761529, -0.047916751354932785, -0.051538240164518356, -0.07574984431266785, -0.00898753572255373, 0.017431216314435005, 0.05452337861061096, -0.04232051223516464, -0.04079798236489296, -0.02476818487048149, -0.00965914223343134, -0.10637233406305313, -0.04802612215280533, 0.022656334564089775, 0.034598901867866516, -0.0040662833489477634, -0.03686909005045891, -0.0024305377155542374, 0.042590562254190445, -0.02504364587366581, 0.026691557839512825, -0.008689958602190018, 0.05705439671874046, 0.0805065780878067, 0.0782959833741188, 0.039220865815877914, -0.036136239767074585, -0.061067137867212296, -0.07729388028383255, 0.027016891166567802, 0.02612159214913845, -0.0777793899178505, -0.10328716039657593, 0.0160985104739666, -0.02700970694422722, 0.046793725341558456, -0.025051696226000786, -0.0695933923125267, -0.034251388162374496, -0.043071065098047256, 0.008436333388090134, -0.08496597409248352, 0.03390920162200928, 0.0056449538096785545, 0.023372657597064972, 0.046815790235996246, 0.049225810915231705, 0.00016719703853596002, 0.09117678552865982, 0.0040442063473165035, -0.001979167340323329, -0.06719043850898743, -0.006708343513309956, -0.006619584746658802, 0.018098624423146248, -0.005758482962846756, 0.06950733065605164, 0.04358614981174469, 0.011703003197908401, 0.06358648091554642, 0.09716304391622543, -0.019437452778220177, -0.03203849494457245, -0.017250800505280495, 0.063148632645607, 0.06111954525113106, -0.09083697199821472, -0.04147110506892204, 0.02178356423974037, -0.08021154254674911, 0.0497218482196331, 0.0347418338060379, 0.039055727422237396, -0.07432886213064194, -0.06201692670583725, -0.0339876227080822, -0.04727473855018616, -0.02893644943833351, 0.02891204133629799, -0.02112206257879734, 0.043440911918878555, 0.029333876445889473, 0.018409136682748795, -0.024321554228663445, 0.09413249045610428, -0.026539549231529236, -0.0500367097556591, -0.06360960751771927, 0.0009106509969569743, -0.012755244970321655, -0.011228070594370365, -0.04611458629369736, 0.034499600529670715, 0.09002730250358582, 0.018779149278998375, -0.05031900107860565, -0.025257479399442673, 0.025768475607037544, -0.057211630046367645, -0.02677224390208721, -0.0041580647230148315, 0.0930253341794014, 0.01824778877198696, 0.005348475184291601, 0.029324568808078766, 0.0032774698920547962, 0.07211761176586151, 0.02279745042324066, 0.027537738904356956, 0.026354268193244934, -0.014093457721173763, -0.07127738744020462, -0.029269494116306305, -0.03193628415465355, -0.03858040273189545, 0.06392767280340195, -0.13434886932373047, 3.5358833338535945e-33, 0.08223383128643036, -0.016380541026592255, 0.027149861678481102, -0.08216597884893417, -0.015836242586374283, -0.06144965812563896, -0.06379599124193192, -0.07563278824090958, -0.05674606189131737, 0.02232990600168705, -0.0331370010972023, -0.003864923259243369, 0.005566416773945093, 0.014319559559226036, 0.09714481234550476, -0.028536595404148102, -0.0067355758510529995, 0.12942147254943848, 0.07879913598299026, 0.029841290786862373, 0.0761227011680603, -0.01689748466014862, -0.0689576044678688, -0.008810022845864296, 0.06476900726556778, -0.046168722212314606, -0.002837190870195627, -0.0652112141251564, -0.049537185579538345, 0.01962246745824814, -0.039663851261138916, 0.05271757021546364, -0.0017317673191428185, 0.03082483820617199, -0.10496018826961517, 0.03017294593155384, -0.0624723844230175, 0.04564369469881058, -0.016194840893149376, 0.007255842909216881, 0.0544096864759922, -0.008260970935225487, 0.013887325301766396, -0.07184290140867233, 0.05033588781952858, 0.03830013424158096, 0.013580062426626682, -0.06997217983007431, -0.01739765889942646, 0.05336364731192589, 0.004804057069122791, 0.024953706189990044, -0.002495085122063756, 0.041364166885614395, 0.09659859538078308, 0.022419743239879608, 0.12140938639640808, -0.07138141989707947, 0.02473808079957962, 0.05981516093015671, -0.0019229240715503693, -0.06667120009660721, -0.030728762969374657, -0.01710289902985096, 0.005615533795207739, 0.01921582780778408, -0.032797008752822876, 0.03838270157575607, -0.07301793247461319, 0.005105593707412481, -0.05847043916583061, 0.05223756656050682, 0.022941937670111656, -0.038792550563812256, -0.0361250676214695, -0.010946202091872692, -0.04338033124804497, -0.025633320212364197, -0.18371346592903137, -0.024481337517499924, -0.029998790472745895, 0.046580828726291656, -0.00034692417830228806, 0.0057999673299491405, 0.025826573371887207, -0.07168276607990265, -0.00028477859450504184, 0.0497945137321949, -0.026317298412322998, 0.025690730661153793, 0.024025412276387215, -0.074644073843956, -0.0028781855944544077, 0.03578530624508858, -0.1738869547843933, -2.6636452197083485e-33, 0.0348937064409256, -0.03351470082998276, -0.02358207292854786, 0.07771977037191391, 0.012267003767192364, 0.060846347361803055, 0.01623544842004776, 0.04628642648458481, -0.03300679847598076, -0.0622977577149868, -0.003753970842808485, -0.07347366958856583, -0.006737401243299246, 0.014344239607453346, 0.02200145274400711, 0.013840076513588428, -0.046588458120822906, 0.012639856897294521, 0.02929173968732357, 0.03892869874835014, -0.005781987681984901, -0.040481507778167725, 0.010124409571290016, 0.0337117575109005, 0.06728141009807587, -0.0076964846812188625, -0.051834046840667725, 0.04312683641910553, 0.06152753159403801, -0.01811944507062435, -0.046053845435380936, -0.02032190002501011, -0.00984169915318489, 0.02201039344072342, 0.0641392320394516, -0.00046866582124494016, -0.029843000695109367, 0.06114676594734192, 0.03720267862081528, 0.11093267798423767, -0.025760605931282043, 0.03672194853425026, -0.029463695362210274, 0.014911867678165436, -0.0013124676188454032, 0.10486121475696564, 0.05607791990041733, -0.0763024315237999, -0.03499874472618103, -0.12052028626203537, 0.01480442937463522, -0.03394641354680061, 0.050557997077703476, 0.12037096917629242, -0.024388395249843597, 0.012077194638550282, 0.018879925832152367, 0.10697066783905029, 0.0051224008202552795, -0.0736670047044754, 0.1258065104484558, -0.15190887451171875, -0.010743454098701477, -0.020348142832517624, -0.04483674839138985, -0.026873832568526268, 0.042637623846530914, 0.03582853451371193, -0.017267009243369102, 0.031779397279024124, -0.04313614219427109, -0.02249664068222046, 0.02792043425142765, 0.008730944246053696, -0.030612420290708542, 0.03642138093709946, 0.02275164984166622, -0.008656257763504982, 0.07569560408592224, 0.014589576981961727, -0.11928976327180862, 0.046853434294462204, -0.03389100730419159, 0.0061661251820623875, 0.04003150388598442, -0.008496240712702274, 0.09733521193265915, 0.011792468838393688, 0.019780436530709267, -0.020383702591061592, -0.05707354098558426, -0.06232711672782898, -0.03098290041089058, 0.07816101610660553, -0.06293699890375137, -5.598074181989432e-8, 0.13612820208072662, -0.09877953678369522, -0.01261512003839016, 0.037243496626615524, 0.10237197577953339, -0.0706334263086319, 0.077541284263134, 0.00021884312445763499, -0.004285127390176058, 0.062305234372615814, 0.018050257116556168, 0.01789938099682331, 0.022787418216466904, -0.03179014101624489, 0.09162643551826477, 0.03854193538427353, -0.045802041888237, 0.07093053311109543, 0.006254484411329031, -0.025068864226341248, -0.06698236614465714, 0.03927963227033615, -0.0068467953242361546, 0.028503384441137314, -0.010487223975360394, 0.04852692037820816, 0.10379957407712936, 0.007289241533726454, 0.040865495800971985, 0.06542105227708817, -0.057258278131484985, -0.007762622553855181, -0.04659015312790871, -0.0240695271641016, -0.019635582342743874, 0.08006035536527634, -0.06184033676981926, 0.06213952600955963, 0.10000193119049072, 0.021049438044428825, -0.030692171305418015, -0.11107981950044632, -0.05207657814025879, 0.00411395775154233, 0.07311046868562698, 0.0647430419921875, -0.04303475841879845, 0.022224025800824165, -0.004814804531633854, -0.024293294176459312, -0.026878662407398224, 0.041359033435583115, -0.02355286478996277, 0.07269471138715744, -0.010458499193191528, 0.04162909835577011, -0.030599361285567284, -0.04463857412338257, 0.0472521036863327, 0.029324643313884735, 0.023006435483694077, 0.0038985912688076496, -0.020710192620754242, -0.018203867599368095 ]
0.104561
to note that this strategy might be less effective when the system is heavily loaded. Under such conditions, the benefit of reducing contention diminishes. Conversely, default behavior can help in reducing inter-core communication overhead, potentially providing better performance under high load conditions. ##### `strict-cpu-reservation` The `reservedSystemCPUs` parameter in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/), or the deprecated kubelet command line option `--reserved-cpus`, defines an explicit CPU set for OS system daemons and kubernetes system daemons. More details of this parameter can be found on the [Explicitly Reserved CPU List](/docs/tasks/administer-cluster/reserve-compute-resources/#explicitly-reserved-cpu-list) page. By default, this isolation is implemented only for guaranteed pods with integer CPU requests not for burstable and best-effort pods (and guaranteed pods with fractional CPU requests). Admission is only comparing the CPU requests against the allocatable CPUs. Since the CPU limit is higher than the request, the default behaviour allows burstable and best-effort pods to use up the capacity of `reservedSystemCPUs` and cause host OS services to starve in real life deployments. If the `strict-cpu-reservation` policy option is enabled, the static policy will not allow any workload to use the CPU cores specified in `reservedSystemCPUs`. ##### `prefer-align-cpus-by-uncorecache` If the `prefer-align-cpus-by-uncorecache` policy is specified, the static policy will allocate CPU resources for individual containers such that all CPUs assigned to a container share the same uncore cache block (also known as the Last-Level Cache or LLC). By default, the `CPUManager` will tightly pack CPU assignments which can result in containers being assigned CPUs from multiple uncore caches. This option enables the `CPUManager` to allocate CPUs in a way that maximizes the efficient use of the uncore cache. Allocation is performed on a best-effort basis, aiming to affine as many CPUs as possible within the same uncore cache. If the container's CPU requirement exceeds the CPU capacity of a single uncore cache, the `CPUManager` minimizes the number of uncore caches used in order to maintain optimal uncore cache alignment. Specific workloads can benefit in performance from the reduction of inter-cache latency and noisy neighbors at the cache level. If the `CPUManager` cannot align optimally while the node has sufficient resources, the container will still be admitted using the default packed behavior. ## Policies for assigning memory to Pods {#memory-management-policies} {{< feature-state feature\_gate\_name="MemoryManager" >}} The Kubernetes \*Memory Manager\* allocates RAM (memory, and optionally Linux huge pages) resources for pods in the `Guaranteed` {{< glossary\_tooltip text="QoS class" term\_id="qos-class" >}}. The Memory Manager employs hint generation protocol to yield the most suitable NUMA affinity for a pod. The Memory Manager feeds the central manager (\*Topology Manager\*) with these affinity hints. Based on both the hints and Topology Manager policy, the pod is rejected or admitted to the node. Moreover, the Memory Manager ensures that the memory which a pod requests is allocated from a minimum number of NUMA nodes. To learn more, read [Control Memory Management Policies on a Node](/docs/tasks/administer-cluster/memory-manager/). ## Other resource managers The configuration of individual managers is elaborated in dedicated documents: - [Device Manager](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/node-resource-managers.md
[ 0.023785315454006195, 0.04634498432278633, 0.027660774067044258, 0.03776039183139801, -0.0329337976872921, 0.01142036635428667, -0.01928284950554371, 0.011458457447588444, 0.1166425570845604, 0.010078282095491886, -0.03445259854197502, -0.04445631057024002, -0.0266256146132946, -0.09279359132051468, -0.0009582896600477397, -0.04927310347557068, 0.13040030002593994, 0.005664538592100143, -0.04550810530781746, -0.05161219462752342, 0.010260066948831081, -0.03972470015287399, -0.006328023970127106, 0.042702097445726395, 0.005335585679858923, -0.05374326556921005, -0.018816905096173286, -0.019436385482549667, 0.03284173458814621, -0.04468736797571182, -0.052067551761865616, -0.04974891617894173, 0.056474469602108, 0.04410354048013687, 0.043856024742126465, 0.0742708295583725, -0.009717646054923534, -0.061773523688316345, -0.08334849029779434, 0.07272094488143921, -0.0009017861448228359, -0.03972328454256058, -0.08112364262342453, 0.00979326106607914, -0.026198403909802437, 0.02340066060423851, -0.046238016337156296, -0.03535560518503189, -0.047183580696582794, -0.05367949604988098, 0.05486103519797325, -0.06418539583683014, 0.0797499492764473, 0.04149634391069412, 0.03577573969960213, 0.05297289416193962, 0.005291691515594721, -0.012392343021929264, 0.060200296342372894, 0.044391945004463196, -0.021857978776097298, -0.061034608632326126, 0.03276647999882698, -0.02662353776395321, 0.008090704679489136, -0.012510452419519424, 0.05038325488567352, -0.004231823142617941, 0.040662024170160294, 0.04204074665904045, 0.14814604818820953, -0.0064068022184073925, -0.002150614745914936, 0.006251080427318811, -0.023179786279797554, 0.0000016414359151895042, -0.05536501854658127, -0.02186296507716179, 0.006241197697818279, -0.06572605669498444, 0.02798328548669815, 0.026677336543798447, 0.013976691290736198, -0.08684420585632324, -0.04482868313789368, -0.049415357410907745, 0.0037284409627318382, -0.0035078006330877542, 0.02395535819232464, -0.01886945217847824, 0.058910004794597626, 0.04510550573468208, 0.02084873802959919, -0.08765234798192978, 0.08008359372615814, 0.01941705122590065, -0.039285045117139816, 0.002453951397910714, 0.015061725862324238, -0.03250974789261818, 0.05542285740375519, 0.014745338819921017, 0.007875438779592514, 0.06765250861644745, 0.06415744870901108, -0.05165684595704079, 0.004470352083444595, 0.01401006244122982, -0.024749062955379486, -0.015034578740596771, 0.035172238945961, 0.03495483845472336, 0.008819260634481907, 0.06871174275875092, -0.010338719934225082, 0.05164749175310135, 0.05951391160488129, -0.05029875785112381, 0.05488568916916847, 0.043748993426561356, -0.01634596660733223, -0.02715834230184555, 0.026218274608254433, -0.035465966910123825, -0.06785553693771362, 0.018026843667030334, -0.09528040140867233, 4.6601169474304145e-33, 0.022751308977603912, -0.020579544827342033, 0.03644762933254242, -0.12950333952903748, -0.056916553527116776, -0.1251545250415802, -0.08923514187335968, -0.03937823325395584, -0.048953935503959656, -0.029230399057269096, -0.06018943339586258, -0.04436980560421944, 0.03252016752958298, 0.02244197577238083, 0.024583349004387856, -0.01980944722890854, 0.011317449621856213, 0.03619827330112457, 0.1349528282880783, 0.013656938448548317, 0.0755474716424942, -0.030851460993289948, -0.08039125055074692, 0.049433961510658264, 0.020553190261125565, -0.020052621141076088, 0.021962707862257957, -0.09418358653783798, -0.04757767915725708, 0.029885822907090187, -0.035576824098825455, 0.029585469514131546, 0.0011858491925522685, 0.02615104243159294, -0.12233468145132065, 0.010343075729906559, -0.038794368505477905, 0.023984933272004128, -0.006594955921173096, -0.013217760249972343, 0.03681154176592827, 0.03255594149231911, -0.020488180220127106, -0.06938967108726501, 0.044921547174453735, 0.005470009054988623, -0.022826606407761574, -0.08502354472875595, -0.015520201064646244, 0.073316790163517, 0.014768358319997787, 0.011433293111622334, 0.06899359822273254, 0.019915878772735596, 0.048669636249542236, 0.007945351302623749, 0.1221376582980156, -0.0495273731648922, 0.01975163258612156, 0.09454341232776642, -0.00958448089659214, -0.06505846977233887, -0.013578906655311584, 0.0005458242958411574, 0.009712706319987774, 0.01753251999616623, -0.026108533143997192, 0.04981677234172821, -0.10326164960861206, 0.023671887814998627, -0.08246120810508728, 0.005320642609149218, -0.006482208147644997, 0.0054621268063783646, -0.03281208872795105, -0.030654126778244972, 0.0038002191577106714, -0.03270566835999489, -0.18094339966773987, -0.041420482099056244, 0.019339019432663918, -0.011108765378594398, -0.03876722976565361, 0.011670117266476154, -0.017781255766749382, -0.05771717056632042, 0.010247624479234219, 0.06735154986381531, -0.014578466303646564, 0.03393520787358284, 0.00929134152829647, -0.008434727787971497, -0.069340780377388, 0.037597715854644775, -0.12937071919441223, -4.524511551777571e-33, 0.09170031547546387, -0.029648147523403168, -0.015278368256986141, 0.07935935258865356, 0.0618545264005661, 0.04254665598273277, -0.003974786028265953, -0.0012531282845884562, -0.016312669962644577, -0.07261443138122559, -0.06782795488834381, -0.06251385062932968, 0.00987759418785572, 0.0167021993547678, -0.04713452607393265, 0.01073572225868702, -0.07731795310974121, 0.01774705946445465, 0.0005027723964303732, 0.014746114611625671, -0.023629773408174515, -0.012236029841005802, 0.06279916316270828, -0.02741708979010582, 0.03401578217744827, 0.01312941126525402, -0.06342644989490509, 0.02843054197728634, -0.022379253059625626, -0.035315319895744324, -0.03956197202205658, -0.08707472681999207, -0.019790364429354668, 0.013341247104108334, 0.028358502313494682, -0.017538931220769882, -0.017800340428948402, 0.08321793377399445, -0.0005427171709015965, 0.06720783561468124, 0.02343546785414219, 0.05700196325778961, -0.02578081376850605, 0.006676281336694956, -0.02185673452913761, 0.07751337438821793, 0.025951163843274117, -0.08326788246631622, -0.010759691707789898, -0.07986430078744888, -0.020263832062482834, -0.05051618441939354, 0.03719664737582207, 0.16267013549804688, -0.008197766728699207, -0.012677166610956192, 0.013942020013928413, 0.06464988738298416, -0.004526243079453707, -0.013706727884709835, 0.0949726402759552, -0.11759080737829208, 0.020423423498868942, -0.006311832927167416, 0.011048019863665104, -0.05077148973941803, 0.022620150819420815, 0.014430765062570572, -0.014771045185625553, 0.0487990602850914, -0.00034668721491470933, 0.012173033319413662, 0.04898134991526604, 0.09776011854410172, -0.0634363442659378, 0.036413464695215225, 0.030534856021404266, -0.02135617658495903, 0.008018754422664642, 0.005265419837087393, -0.07950996607542038, 0.0457809641957283, -0.025852056220173836, -0.03430589661002159, 0.015175302512943745, 0.04707985371351242, 0.06495662778615952, 0.0023319574538618326, 0.025160014629364014, -0.03432684391736984, -0.01938466727733612, -0.007372288033366203, -0.028274361044168472, 0.05883115530014038, -0.09221020340919495, -5.1539721823701257e-8, 0.1382000744342804, -0.0834357887506485, -0.03657342866063118, 0.053108781576156616, 0.07826453447341919, -0.07062140852212906, -0.0069229318760335445, -0.020510204136371613, -0.02747339755296707, 0.04200587049126625, 0.06351228803396225, 0.021954389289021492, -0.002253428101539612, -0.020746540278196335, 0.09420974552631378, 0.02990839257836342, 0.004248369950801134, 0.026965325698256493, 0.013926377519965172, -0.04981048405170441, -0.09124935418367386, 0.012003157287836075, -0.02955048345029354, -0.006276939529925585, 0.0006936949212104082, 0.0711190477013588, 0.13172245025634766, 0.014237445779144764, 0.039163198322057724, 0.02179122157394886, -0.08985533565282822, 0.020486924797296524, -0.08302639424800873, 0.007113083265721798, 0.03883812576532364, 0.07409726083278656, -0.18531641364097595, 0.04109066724777222, 0.06302499026060104, 0.06848929822444916, 0.010970243252813816, -0.07208460569381714, -0.04119282588362694, 0.006302047986537218, 0.08006074279546738, 0.06878171861171722, -0.05153292044997215, 0.09370545297861099, 0.0019517425680533051, -0.0001256151299457997, -0.023902907967567444, -0.033915936946868896, -0.01333275530487299, 0.10494581609964371, -0.007179759442806244, 0.037191517651081085, -0.01156309712678194, -0.07139293104410172, 0.021299179643392563, -0.03601474314928055, 0.020834269002079964, -0.011489548720419407, 0.016926061362028122, -0.01833086647093296 ]
0.191586
{{< feature-state for\_k8s\_version="v1.20" state="stable" >}} Kubernetes allow you to limit the number of process IDs (PIDs) that a {{< glossary\_tooltip term\_id="Pod" text="Pod" >}} can use. You can also reserve a number of allocatable PIDs for each {{< glossary\_tooltip term\_id="node" text="node" >}} for use by the operating system and daemons (rather than by Pods). Process IDs (PIDs) are a fundamental resource on nodes. It is trivial to hit the task limit without hitting any other resource limits, which can then cause instability to a host machine. Cluster administrators require mechanisms to ensure that Pods running in the cluster cannot induce PID exhaustion that prevents host daemons (such as the {{< glossary\_tooltip text="kubelet" term\_id="kubelet" >}} or {{< glossary\_tooltip text="kube-proxy" term\_id="kube-proxy" >}}, and potentially also the container runtime) from running. In addition, it is important to ensure that PIDs are limited among Pods in order to ensure they have limited impact on other workloads on the same node. {{< note >}} On certain Linux installations, the operating system sets the PIDs limit to a low default, such as `32768`. Consider raising the value of `/proc/sys/kernel/pid\_max`. {{< /note >}} You can configure a kubelet to limit the number of PIDs a given Pod can consume. For example, if your node's host OS is set to use a maximum of `262144` PIDs and expect to host less than `250` Pods, one can give each Pod a budget of `1000` PIDs to prevent using up that node's overall number of available PIDs. If the admin wants to overcommit PIDs similar to CPU or memory, they may do so as well with some additional risks. Either way, a single Pod will not be able to bring the whole machine down. This kind of resource limiting helps to prevent simple fork bombs from affecting operation of an entire cluster. Per-Pod PID limiting allows administrators to protect one Pod from another, but does not ensure that all Pods scheduled onto that host are unable to impact the node overall. Per-Pod limiting also does not protect the node agents themselves from PID exhaustion. You can also reserve an amount of PIDs for node overhead, separate from the allocation to Pods. This is similar to how you can reserve CPU, memory, or other resources for use by the operating system and other facilities outside of Pods and their containers. PID limiting is an important sibling to [compute resource](/docs/concepts/configuration/manage-resources-containers/) requests and limits. However, you specify it in a different way: rather than defining a Pod's resource limit in the `.spec` for a Pod, you configure the limit as a setting on the kubelet. Pod-defined PID limits are not currently supported. {{< caution >}} This means that the limit that applies to a Pod may be different depending on where the Pod is scheduled. To make things simple, it's easiest if all Nodes use the same PID resource limits and reservations. {{< /caution >}} ## Node PID limits Kubernetes allows you to reserve a number of process IDs for the system use. To configure the reservation, use the parameter `pid=` in the `--system-reserved` and `--kube-reserved` command line options to the kubelet. The value you specified declares that the specified number of process IDs will be reserved for the system as a whole and for Kubernetes system daemons respectively. ## Pod PID limits Kubernetes allows you to limit the number of processes running in a Pod. You specify this limit at the node level, rather than configuring it as a resource limit for a particular Pod. Each Node can have a different PID limit. To configure the limit, you can specify the command line
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/pid-limiting.md
[ -0.009301048703491688, -0.0057264817878603935, 0.07296407222747803, -0.012997949495911598, -0.01571107655763626, -0.008625048212707043, 0.02188383787870407, -0.010024544782936573, 0.06828711181879044, 0.06013146787881851, -0.043221842497587204, -0.00578570319339633, 0.030613258481025696, -0.06097693741321564, 0.004680667072534561, -0.005388110876083374, 0.045956533402204514, -0.02378636598587036, -0.04260961338877678, -0.06061745807528496, 0.05912843719124794, 0.017644567415118217, 0.030135883018374443, 0.04948968067765236, -0.09391715377569199, 0.027981998398900032, -0.04468350484967232, -0.06642019748687744, 0.06085251644253731, -0.0013953129528090358, -0.02713644504547119, 0.025759246200323105, -0.05246409401297569, 0.03493943810462952, 0.09533129632472992, 0.07432761788368225, -0.00010516424663364887, -0.019924340769648552, -0.08181677758693695, 0.03403499349951744, 0.03558608144521713, -0.04787437245249748, -0.09944776445627213, -0.01106341928243637, 0.03847423195838928, 0.01527879573404789, -0.0849839597940445, -0.07123637199401855, -0.0011595600517466664, -0.03133276477456093, 0.014700612984597683, -0.07412121444940567, 0.06489234417676926, 0.05542765557765961, 0.09825817495584488, -0.023712797090411186, -0.014440350234508514, -0.005313268397003412, 0.07491128146648407, 0.064040407538414, 0.0118010975420475, -0.06754552572965622, 0.032598208636045456, -0.02861899510025978, 0.03992786258459091, -0.0010894284350797534, 0.03789588809013367, -0.0009314864291809499, -0.027435554191470146, 0.0030601974576711655, 0.04368314519524574, 0.00254589575342834, -0.05180475860834122, 0.010190043598413467, -0.02418598160147667, 0.03470675274729729, -0.08210613578557968, -0.0008429515291936696, 0.000036221630580257624, -0.08729895949363708, 0.00137223897036165, 0.07174593210220337, 0.09962064772844315, -0.02340465970337391, -0.06459353119134903, -0.014649310149252415, 0.018428143113851547, -0.03632992506027222, 0.05431845784187317, 0.04603668302297592, -0.019586073234677315, -0.04797044023871422, 0.09517288953065872, -0.10382959991693497, 0.0577157698571682, 0.026157397776842117, -0.0020618848502635956, -0.03833208978176117, 0.015763040632009506, -0.03913571685552597, 0.042329706251621246, 0.006998022552579641, 0.005151911173015833, -0.0017328540561720729, 0.019505489617586136, -0.055520668625831604, -0.06823552399873734, -0.006605062168091536, -0.004048241302371025, -0.0023560968693345785, -0.006954367738217115, 0.062429893761873245, -0.013828209601342678, 0.039514634758234024, -0.017114831134676933, -0.049621909856796265, 0.033402279019355774, -0.019929202273488045, 0.0728246420621872, 0.0655297115445137, 0.032388005405664444, -0.09071748703718185, -0.04994668811559677, 0.01848544552922249, -0.08065002411603928, 0.05946698412299156, -0.04301561415195465, 4.000997428457188e-33, 0.07899383455514908, -0.0836222842335701, -0.011781012639403343, -0.047873999923467636, -0.029263393953442574, -0.07668803632259369, -0.07434841990470886, -0.024279821664094925, -0.06797990947961807, -0.03456352278590202, -0.035099126398563385, 0.062215786427259445, -0.02813001163303852, -0.03756280988454819, 0.07961627840995789, -0.0028958532493561506, -0.0055249775759875774, 0.12698857486248016, 0.08985015004873276, -0.04919036105275154, 0.03312431648373604, -0.11028844118118286, -0.054880138486623764, 0.0034031288232654333, 0.08673393726348877, -0.007776162587106228, -0.04036052152514458, -0.08530966192483902, 0.011041504330933094, 0.004717372357845306, -0.05265720188617706, 0.010539968498051167, -0.002608171198517084, 0.04754577577114105, -0.18126344680786133, 0.012813354842364788, -0.04768950492143631, -0.011545322835445404, -0.01088701467961073, -0.09404297173023224, -0.01107623241841793, 0.008258157409727573, 0.007494483608752489, -0.04248284548521042, 0.0572659969329834, 0.051830995827913284, 0.04512326419353485, -0.10767937451601028, -0.028482137247920036, 0.04417172819375992, 0.02122860588133335, -0.0034526591189205647, 0.028797291219234467, 0.005209372378885746, 0.06463142484426498, 0.00847078301012516, 0.07271311432123184, -0.09109386056661606, -0.008047603070735931, 0.038585301488637924, -0.04695241153240204, 0.0015871579525992274, -0.00738954171538353, 0.002836079802364111, 0.07138233631849289, 0.038089532405138016, -0.006555126514285803, 0.09590599685907364, 0.014052572660148144, 0.049462925642728806, -0.08308345824480057, 0.006182003766298294, -0.002450279425829649, -0.014251207001507282, 0.026691604405641556, -0.1048218309879303, 0.06032576411962509, -0.039629220962524414, -0.1358690857887268, 0.024297012016177177, 0.003986127208918333, -0.0503930002450943, -0.05537791922688484, 0.032684046775102615, 0.042295921593904495, -0.04152427241206169, -0.012572641484439373, 0.023296143859624863, -0.10800925642251968, 0.037775918841362, -0.0023275252897292376, -0.024412069469690323, -0.06679700314998627, 0.028077175840735435, -0.180951327085495, -4.642576735006223e-33, 0.07769804447889328, -0.03684602677822113, -0.007403077092021704, 0.027255117893218994, 0.018029723316431046, 0.0009652081644162536, 0.00705917552113533, 0.046771224588155746, -0.043008819222450256, -0.10392169654369354, -0.06265188753604889, -0.042631134390830994, 0.05648955702781677, 0.08219259977340698, -0.06779514253139496, 0.008752625435590744, -0.06923864036798477, 0.023812230676412582, 0.011486317031085491, 0.03617018833756447, -0.06583070755004883, 0.00672198785468936, 0.048706263303756714, 0.07642817497253418, -0.01953551173210144, -0.02888772450387478, -0.017442267388105392, -0.03576301038265228, -0.03799920901656151, -0.04154013469815254, 0.010744856670498848, -0.06294836103916168, -0.0642826184630394, 0.024962911382317543, 0.03722449392080307, -0.07759612053632736, 0.016184795647859573, 0.0130491703748703, 0.010455313138663769, 0.04102163016796112, 0.060888033360242844, -0.0015894373646005988, -0.043002739548683167, -0.030528860166668892, -0.0195628609508276, 0.02126794308423996, -0.007212124764919281, -0.027127867564558983, -0.04819762706756592, -0.07621735334396362, 0.03112706169486046, 0.007933305576443672, -0.005135070066899061, 0.0837256908416748, -0.0319189727306366, -0.02725960500538349, 0.025105182081460953, 0.012668177485466003, -0.05588911473751068, -0.02353055402636528, 0.08016426116228104, -0.07043708115816116, 0.027332883328199387, 0.05935360863804817, 0.059012334793806076, -0.022281747311353683, 0.001738669932819903, 0.06034544110298157, -0.04040548577904701, 0.023698357865214348, 0.02875411882996559, 0.0023615588434040546, 0.02939566969871521, 0.02504890225827694, -0.006126529071480036, -0.022752776741981506, 0.031596630811691284, -0.09536370635032654, 0.04469989612698555, -0.026561785489320755, -0.036894168704748154, 0.10599964112043381, -0.009351212531328201, 0.0055708205327391624, -0.0015299302758648992, 0.05816608667373657, 0.07373647391796112, 0.10149943828582764, 0.04347723722457886, 0.07962304353713989, -0.007197216618806124, -0.025690704584121704, -0.04706704616546631, 0.14159542322158813, -0.0425952784717083, -5.1840562065308404e-8, 0.031076006591320038, 0.10346855968236923, -0.002552604302763939, 0.03829078748822212, 0.08147814124822617, -0.0031275448855012655, -0.0017778200563043356, 0.0656268298625946, 0.009049510583281517, 0.0007999312947504222, 0.04489749297499657, 0.04864559322595596, -0.026985520496964455, 0.05806839093565941, 0.10339196026325226, 0.0025349357165396214, -0.04312971234321594, 0.04445909336209297, 0.021495036780834198, -0.036409057676792145, -0.02219020016491413, -0.016910092905163765, 0.003715738421306014, 0.006885582581162453, -0.02358616143465042, -0.021668188273906708, 0.10746902227401733, 0.01572471670806408, 0.005946062970906496, -0.0055395206436514854, -0.056340061128139496, -0.021190354600548744, -0.09679604321718216, 0.09052148461341858, 0.0626295804977417, 0.003895763773471117, -0.15598778426647186, 0.018230058252811432, 0.045137036591768265, 0.10201400518417358, -0.04456215724349022, -0.016553055495023727, -0.0698910728096962, 0.012547326274216175, -0.0007027360261417925, 0.08811717480421066, -0.054417312145233154, 0.027517100796103477, -0.0034983456134796143, 0.038919758051633835, -0.030653493478894234, -0.030367949977517128, 0.030586088076233864, 0.07875744998455048, -0.00733801769092679, 0.0009788719471544027, 0.020330270752310753, -0.033086664974689484, 0.018086889758706093, 0.01746973767876625, 0.0179599616676569, 0.017658963799476624, 0.020106276497244835, 0.044037871062755585 ]
0.169948
allows you to limit the number of processes running in a Pod. You specify this limit at the node level, rather than configuring it as a resource limit for a particular Pod. Each Node can have a different PID limit. To configure the limit, you can specify the command line parameter `--pod-max-pids` to the kubelet, or set `PodPidsLimit` in the kubelet [configuration file](/docs/tasks/administer-cluster/kubelet-config-file/). ## PID based eviction You can configure kubelet to start terminating a Pod when it is misbehaving and consuming abnormal amount of resources. This feature is called eviction. You can [Configure Out of Resource Handling](/docs/concepts/scheduling-eviction/node-pressure-eviction/) for various eviction signals. Use `pid.available` eviction signal to configure the threshold for number of PIDs used by Pod. You can set soft and hard eviction policies. However, even with the hard eviction policy, if the number of PIDs growing very fast, node can still get into unstable state by hitting the node PIDs limit. Eviction signal value is calculated periodically and does NOT enforce the limit. PID limiting - per Pod and per Node sets the hard limit. Once the limit is hit, workload will start experiencing failures when trying to get a new PID. It may or may not lead to rescheduling of a Pod, depending on how workload reacts on these failures and how liveness and readiness probes are configured for the Pod. However, if limits were set correctly, you can guarantee that other Pods workload and system processes will not run out of PIDs when one Pod is misbehaving. ## {{% heading "whatsnext" %}} - Refer to the [PID Limiting enhancement document](https://github.com/kubernetes/enhancements/blob/097b4d8276bc9564e56adf72505d43ce9bc5e9e8/keps/sig-node/20190129-pid-limiting.md) for more information. - For historical context, read [Process ID Limiting for Stability Improvements in Kubernetes 1.14](/blog/2019/04/15/process-id-limiting-for-stability-improvements-in-kubernetes-1.14/). - Read [Managing Resources for Containers](/docs/concepts/configuration/manage-resources-containers/). - Learn how to [Configure Out of Resource Handling](/docs/concepts/scheduling-eviction/node-pressure-eviction/).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/pid-limiting.md
[ 0.016924763098359108, 0.01810476928949356, 0.03537241369485855, 0.006685664411634207, -0.040871910750865936, -0.032254479825496674, -0.019273700192570686, 0.003968849778175354, 0.07988494634628296, 0.03440820053219795, -0.033760856837034225, 0.018826277926564217, -0.02426142431795597, -0.03895144164562225, 0.0008689697715453804, -0.03465420752763748, 0.03856206685304642, 0.030791504308581352, -0.04107894003391266, -0.03221574053168297, 0.05918227136135101, -0.003799297846853733, 0.040123339742422104, 0.025609664618968964, -0.07893522083759308, -0.014464369043707848, -0.02016257680952549, -0.05694365128874779, 0.05203383415937424, -0.05793946981430054, -0.0029022758826613426, 0.0002536089741624892, 0.02890278771519661, 0.043806612491607666, 0.10636544227600098, 0.09193408489227295, -0.013916214928030968, -0.05578796565532684, -0.08059951663017273, 0.033741727471351624, 0.023284628987312317, -0.032196927815675735, -0.09608939290046692, -0.013853550888597965, -0.06010250002145767, 0.023408206179738045, -0.10509803146123886, -0.05435985326766968, -0.001948081306181848, -0.058135226368904114, 0.035488396883010864, -0.04090502858161926, 0.0997067466378212, 0.05393487960100174, 0.10699301213026047, -0.02013821341097355, 0.03218471258878708, -0.030572254210710526, 0.07440858334302902, 0.012675702571868896, 0.035259272903203964, 0.009707270190119743, 0.002220539376139641, -0.03026909939944744, 0.02913602627813816, -0.021543076261878014, 0.023466385900974274, 0.03489822894334793, -0.006468514911830425, 0.04281708225607872, 0.08098749816417694, -0.05042669177055359, -0.05927828699350357, 0.014175577089190483, -0.00773691525682807, -0.0034254835918545723, -0.07019402086734772, -0.0173189714550972, -0.050522997975349426, -0.04154910519719124, -0.014123043976724148, 0.013630138710141182, 0.08888290077447891, -0.11172077059745789, -0.08492501080036163, -0.00648253271356225, -0.016876641660928726, -0.013475518673658371, 0.06727258116006851, 0.039354052394628525, 0.02681722119450569, 0.07761213928461075, 0.044422850012779236, -0.07018782198429108, 0.07796286046504974, 0.0013914929004386067, -0.04347158595919609, -0.047681067138910294, -0.00775169488042593, -0.05158693715929985, 0.046569738537073135, 0.03302989527583122, -0.006618179380893707, 0.005373686086386442, 0.07926688343286514, -0.11229605227708817, -0.037549473345279694, -0.024347415193915367, 0.004645166918635368, 0.02709965966641903, 0.006460477132350206, 0.0008470808388665318, 0.0036338979844003916, 0.04890942946076393, -0.013038980774581432, 0.06146620586514473, 0.02568781189620495, 0.03947359696030617, 0.04082275182008743, 0.06902022659778595, 0.08266813308000565, -0.039319057017564774, -0.0518837571144104, 0.03454535827040672, -0.042501743882894516, 0.012329131364822388, -0.04718450456857681, 2.440984916485514e-33, 0.03801126778125763, -0.113462895154953, -0.006238983478397131, -0.07669705152511597, -0.036962319165468216, -0.06332799792289734, -0.09250748157501221, 0.018498431891202927, -0.026056205853819847, -0.07299409061670303, -0.05251831188797951, 0.02185063809156418, -0.016602158546447754, -0.0278466809540987, 0.04689450189471245, -0.048778027296066284, -0.009008812718093395, 0.08957001566886902, 0.0775311291217804, -0.024952836334705353, 0.04385789483785629, -0.07210822403430939, -0.04794205352663994, 0.038288701325654984, 0.03055437095463276, -0.009626364335417747, 0.04329312965273857, -0.07642582058906555, -0.010468154214322567, 0.013979472219944, 0.002106592757627368, 0.06247655302286148, -0.02103736624121666, 0.05886415019631386, -0.14558276534080505, 0.0240626223385334, -0.062090739607810974, 0.028078587725758553, -0.048121530562639236, -0.05291818454861641, -0.041543055325746536, -0.002553042257204652, 0.013199904933571815, -0.04714728146791458, 0.03617623448371887, -0.009196899831295013, 0.08435368537902832, -0.061935555189847946, -0.06939743459224701, 0.0867345854640007, 0.046340104192495346, -0.006104129832237959, 0.03922407329082489, 0.02504958026111126, 0.04513664171099663, 0.0019359458237886429, 0.10944773256778717, -0.07975413650274277, -0.03147761896252632, 0.05118362605571747, -0.0424005426466465, -0.032561589032411575, 0.050355903804302216, 0.03422044962644577, 0.04886696860194206, 0.030677136033773422, -0.027914168313145638, 0.0671067163348198, -0.00871221162378788, 0.10931577533483505, -0.06400048732757568, -0.009442201815545559, 0.024469386786222458, -0.03261370211839676, -0.06051415577530861, -0.10213642567396164, 0.0397263765335083, -0.013086730614304543, -0.20505085587501526, 0.0059147002175450325, -0.012066586874425411, -0.026887863874435425, 0.034217674285173416, -0.005768973380327225, 0.01758064329624176, -0.031097378581762314, 0.011352651752531528, 0.08384395390748978, -0.08914658427238464, 0.02217344380915165, 0.03891197219491005, -0.023130033165216446, -0.046562016010284424, 0.047446686774492264, -0.09633468836545944, -2.426766577628349e-33, 0.03439098596572876, -0.0029331622645258904, -0.01642902009189129, 0.016904350370168686, 0.01839051954448223, 0.03065263107419014, -0.05694480985403061, 0.05934543535113335, -0.012275571934878826, -0.06966447830200195, -0.09000757336616516, -0.09256808459758759, 0.0730348601937294, 0.04439980164170265, -0.11031400412321091, -0.0112874461337924, -0.032690566033124924, -0.03498806059360504, -0.006511619780212641, 0.036606572568416595, -0.08151833713054657, -0.018066788092255592, 0.014901981689035892, 0.02735668420791626, 0.014279729686677456, 0.00988487247377634, -0.025257939472794533, -0.007449110969901085, -0.04963922128081322, -0.039436906576156616, 0.013626075349748135, -0.103913314640522, -0.04970068857073784, 0.039101313799619675, 0.03465716168284416, -0.03786318004131317, -0.013987455517053604, 0.12625828385353088, 0.014929400756955147, 0.011887614615261555, 0.06291726231575012, 0.007087553385645151, -0.02892518974840641, -0.025244848802685738, -0.013143450953066349, 0.01528193335980177, -0.0023914321791380644, -0.06534586101770401, -0.03270808979868889, -0.06586621701717377, -0.0013214406790211797, 0.001713944016955793, 0.028418703004717827, 0.1347329169511795, 0.0062609449960291386, -0.026765398681163788, 0.012144852429628372, 0.0872827097773552, -0.026741934940218925, -0.00843124184757471, 0.08023528754711151, -0.05112135037779808, 0.05534688010811806, 0.03128686547279358, 0.0021567451767623425, -0.06690090894699097, 0.019393865019083023, -0.01592833921313286, -0.005143071990460157, 0.039259448647499084, 0.032081037759780884, 0.0872606411576271, 0.038479287177324295, 0.09032386541366577, -0.057833440601825714, 0.0038618165999650955, 0.017455030232667923, -0.09525817632675171, 0.016139069572091103, 0.029534008353948593, -0.08009135723114014, 0.08707688003778458, -0.02825337089598179, 0.027832888066768646, -0.03428293764591217, 0.02762703411281109, 0.039662960916757584, 0.031147532165050507, 0.08205846697092056, 0.06873626261949539, 0.01941005326807499, -0.010413928888738155, -0.017893226817250252, 0.05412866920232773, -0.049875881522893906, -4.22166372970878e-8, 0.10751480609178543, -0.032673321664333344, -0.00706956721842289, 0.02176579274237156, 0.09742052108049393, -0.057146549224853516, 0.0433281771838665, 0.09381776303052902, -0.035556990653276443, 0.0435311496257782, 0.03860520198941231, 0.0338786318898201, 0.024239148944616318, 0.006574232596904039, 0.10280105471611023, -0.0017331064445897937, 0.050996772944927216, 0.03076293133199215, 0.00617666682228446, -0.042160291224718094, -0.0743785947561264, -0.0633111223578453, -0.013571055606007576, 0.03470531851053238, -0.00017284594650845975, 0.028190389275550842, 0.09278421103954315, 0.014158320613205433, 0.005074139218777418, -0.029065925627946854, -0.04543130099773407, -0.014057902619242668, -0.042459093034267426, 0.034296948462724686, -0.007602372206747532, 0.06418939679861069, -0.17880994081497192, -0.009426884353160858, 0.0001494373136665672, 0.11623921990394592, -0.024827050045132637, -0.045836664736270905, -0.0375601090490818, 0.00047804389032535255, -0.011897201649844646, 0.05633747577667236, -0.07514813542366028, 0.03501487523317337, 0.015029755420982838, 0.05641717463731766, 0.005737260915338993, -0.024175098165869713, 0.001431101467460394, 0.04676903784275055, -0.00868263840675354, 0.047153204679489136, 0.019270140677690506, -0.06980982422828674, -0.0023683076724410057, 0.024228833615779877, -0.00126528216060251, 0.02438284270465374, -0.003283807775005698, 0.027863426133990288 ]
0.210095
Kubernetes policies are configurations that manage other configurations or runtime behaviors. Kubernetes offers various forms of policies, described below: ## Apply policies using API objects Some API objects act as policies. Here are some examples: \* [NetworkPolicies](/docs/concepts/services-networking/network-policies/) can be used to restrict ingress and egress traffic for a workload. \* [LimitRanges](/docs/concepts/policy/limit-range/) manage resource allocation constraints across different object kinds. \* [ResourceQuotas](/docs/concepts/policy/resource-quotas/) limit resource consumption for a {{< glossary\_tooltip text="namespace" term\_id="namespace" >}}. ## Apply policies using admission controllers An {{< glossary\_tooltip text="admission controller" term\_id="admission-controller" >}} runs in the API server and can validate or mutate API requests. Some admission controllers act to apply policies. For example, the [AlwaysPullImages](/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages) admission controller modifies a new Pod to set the image pull policy to `Always`. Kubernetes has several built-in admission controllers that are configurable via the API server `--enable-admission-plugins` flag. Details on admission controllers, with the complete list of available admission controllers, are documented in a dedicated section: \* [Admission Controllers](/docs/reference/access-authn-authz/admission-controllers/) ## Apply policies using ValidatingAdmissionPolicy Validating admission policies allow configurable validation checks to be executed in the API server using the Common Expression Language (CEL). For example, a `ValidatingAdmissionPolicy` can be used to disallow use of the `latest` image tag. A `ValidatingAdmissionPolicy` operates on an API request and can be used to block, audit, and warn users about non-compliant configurations. Details on the `ValidatingAdmissionPolicy` API, with examples, are documented in a dedicated section: \* [Validating Admission Policy](/docs/reference/access-authn-authz/validating-admission-policy/) ## Apply policies using dynamic admission control Dynamic admission controllers (or admission webhooks) run outside the API server as separate applications that register to receive webhooks requests to perform validation or mutation of API requests. Dynamic admission controllers can be used to apply policies on API requests and trigger other policy-based workflows. A dynamic admission controller can perform complex checks including those that require retrieval of other cluster resources and external data. For example, an image verification check can lookup data from OCI registries to validate the container image signatures and attestations. Details on dynamic admission control are documented in a dedicated section: \* [Dynamic Admission Control](/docs/reference/access-authn-authz/extensible-admission-controllers/) ### Implementations {#implementations-admission-control} {{% thirdparty-content %}} Dynamic Admission Controllers that act as flexible policy engines are being developed in the Kubernetes ecosystem, such as: - [Kubewarden](https://github.com/kubewarden) - [Kyverno](https://kyverno.io) - [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper) - [Polaris](https://polaris.docs.fairwinds.com/admission-controller/) ## Apply policies using Kubelet configurations Kubernetes allows configuring the Kubelet on each worker node. Some Kubelet configurations act as policies: \* [Process ID limits and reservations](/docs/concepts/policy/pid-limiting/) are used to limit and reserve allocatable PIDs. \* [Node Resource Managers](/docs/concepts/policy/node-resource-managers/) can manage compute, memory, and device resources for latency-critical and high-throughput workloads.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/policy/_index.md
[ -0.06770580261945724, 0.030489787459373474, 0.047960128635168076, -0.03395592421293259, -0.014576009474694729, 0.010406194254755974, 0.10663102567195892, -0.038195088505744934, 0.0716540589928627, 0.07189076393842697, -0.03643622249364853, -0.021916933357715607, 0.025453617796301842, -0.003992983605712652, 0.054383520036935806, 0.015951676294207573, 0.06841904670000076, -0.016370050609111786, -0.1013803780078888, -0.07891076058149338, 0.12959317862987518, 0.025104960426688194, -0.03281605243682861, 0.012708213180303574, -0.09458184242248535, 0.0004372784751467407, -0.03721252828836441, -0.02476354129612446, 0.04615955799818039, 0.038602303713560104, -0.05579739809036255, -0.04733629524707794, -0.10696583986282349, 0.03943537175655365, 0.04755168780684471, 0.010739603079855442, -0.09702297300100327, -0.05258776992559433, -0.08457354456186295, 0.037734758108854294, 0.03115791454911232, -0.015346166677772999, -0.09405188262462616, 0.014245717786252499, 0.03995605185627937, 0.023592840880155563, -0.04179779067635536, -0.040436964482069016, -0.02207428403198719, -0.007568695116788149, 0.0448637381196022, -0.04781939461827278, 0.06717193871736526, 0.023623818531632423, 0.08432956784963608, -0.03721412271261215, -0.03694750368595123, 0.016653481870889664, 0.06066767871379852, 0.025809111073613167, -0.014163150452077389, -0.08454140275716782, -0.02751193195581436, -0.011739649809896946, -0.03739378601312637, 0.010469294153153896, -0.029797352850437164, 0.051226187497377396, -0.010019815526902676, -0.007285979110747576, 0.03132498264312744, -0.011436987668275833, -0.040842391550540924, -0.004732772242277861, 0.016403092071413994, -0.007816378027200699, -0.08488936722278595, 0.07770120352506638, 0.05557050183415413, -0.1493469476699829, 0.020851781591773033, 0.004002673085778952, 0.09650318324565887, 0.012553724460303783, -0.05902005732059479, -0.05379882827401161, -0.01088179275393486, -0.025313736870884895, 0.09331914037466049, -0.009275476448237896, 0.06250651925802231, -0.026111643761396408, 0.04449707642197609, -0.07601670175790787, 0.08481423556804657, -0.010455580428242683, -0.07000313699245453, -0.09609302133321762, -0.02303045243024826, -0.0031485857907682657, 0.006496400572359562, -0.03845228627324104, 0.017972135916352272, 0.04388006031513214, 0.03809038922190666, -0.09108274430036545, -0.028924135491251945, 0.03986642137169838, 0.025367172434926033, 0.07718770205974579, -0.017551535740494728, 0.08017665147781372, 0.050508320331573486, 0.007421324960887432, -0.015989577397704124, -0.03946629911661148, -0.00011756786261685193, -0.02862410619854927, 0.06406096369028091, 0.10859430581331253, -0.016906755045056343, -0.06143828108906746, 0.0014545473968610168, -0.036246564239263535, -0.03915352001786232, 0.0031384339090436697, -0.052147019654512405, 4.7390510257461465e-33, 0.016544358804821968, -0.05181271582841873, -0.05880855396389961, -0.06458526104688644, -0.017391394823789597, -0.08066074550151825, -0.04946294054389, -0.027845634147524834, -0.04401444271206856, -0.02983417920768261, -0.035071343183517456, 0.11627943068742752, -0.03373009338974953, 0.016689952462911606, 0.09977252781391144, 0.04478878527879715, -0.01951364427804947, 0.13956774771213531, 0.1350969821214676, 0.034880783408880234, 0.0499284453690052, -0.08278957009315491, 0.0041420054621994495, 0.016990629956126213, 0.05279713124036789, -0.006398066878318787, -0.01935383304953575, -0.06419243663549423, 0.03111865557730198, 0.0412854328751564, 0.01709621027112007, 0.0030849664472043514, -0.008935302495956421, -0.034991733729839325, -0.05984136089682579, -0.02039952762424946, -0.06179104000329971, 0.011873987503349781, -0.002274506725370884, -0.051078908145427704, -0.03002750873565674, -0.06551456451416016, 0.022607695311307907, -0.011801483109593391, -0.02214421145617962, 0.01107068732380867, 0.015725530683994293, -0.09007115662097931, 0.04588209465146065, 0.030852913856506348, 0.02104140818119049, -0.019627539440989494, 0.026880590245127678, -0.03412767872214317, 0.03440656140446663, -0.007024748716503382, 0.03911164030432701, -0.007924344390630722, -0.05906600505113602, 0.015192451886832714, -0.04841264709830284, -0.07711393386125565, -0.03527858108282089, 0.007943842560052872, 0.03012130595743656, -0.022204509004950523, -0.0988408699631691, 0.05509762093424797, 0.0002723958750721067, -0.04696124047040939, -0.06712263077497482, 0.0320136696100235, 0.02457655966281891, 0.01286143995821476, -0.010540243238210678, -0.09225481003522873, 0.027084490284323692, 0.05622689425945282, -0.16443438827991486, -0.011635741218924522, -0.04795398190617561, -0.040281374007463455, -0.015842081978917122, 0.032577939331531525, -0.011508729308843613, -0.050888676196336746, 0.009336528368294239, -0.0008277211454696953, -0.02479117549955845, -0.002936156466603279, -0.012323599308729172, -0.07018306851387024, -0.0995541661977768, 0.0703531876206398, -0.058926671743392944, -6.272488549181605e-33, 0.11534598469734192, 0.018873604014515877, 0.03276487812399864, -0.005600192584097385, 0.036670394241809845, 0.029102863743901253, 0.026900839060544968, 0.07482227683067322, 0.05147422105073929, -0.0789993479847908, -0.033033791929483414, 0.0317208431661129, 0.07153744995594025, 0.03563695028424263, -0.08493653684854507, -0.04122864827513695, -0.10021178424358368, 0.010420297272503376, -0.019621238112449646, 0.024075524881482124, -0.009512140415608883, -0.03160174563527107, 0.022696707397699356, 0.011426386423408985, 0.009011661633849144, 0.010227620601654053, -0.03024933859705925, 0.020963657647371292, -0.004631299991160631, 0.017235632985830307, -0.05452504754066467, -0.07636228948831558, -0.08395764976739883, -0.0045734248124063015, 0.015784310176968575, -0.10497789829969406, 0.07209059596061707, 0.05851461738348007, -0.058783430606126785, 0.059900544583797455, 0.09231642633676529, -0.021501576527953148, 0.03912998363375664, -0.02051040343940258, -0.0028531828429549932, 0.026318460702896118, 0.001994938589632511, -0.06323736160993576, -0.05433721840381622, -0.12443678826093674, 0.029467293992638588, -0.023971784859895706, -0.01801486872136593, 0.09979772567749023, -0.03421878442168236, 0.011213110759854317, 0.07991594076156616, -0.012501741759479046, -0.026665961369872093, 0.023578623309731483, 0.02113424986600876, -0.05382499098777771, 0.008013876155018806, 0.07351125776767731, -0.010446049273014069, -0.015901286154985428, -0.027842694893479347, 0.004828362260013819, 0.0458373986184597, 0.004328195005655289, -0.040664929896593094, -0.05902041122317314, 0.047213826328516006, 0.027159953489899635, 0.028090614825487137, -0.027408646419644356, 0.0962616428732872, -0.09682658314704895, 0.020423633977770805, 0.0009794153738766909, -0.024383338168263435, 0.0608086995780468, -0.01666787825524807, 0.038461241871118546, 0.0491577684879303, 0.047386303544044495, 0.0204841960221529, 0.03808198869228363, 0.02751491777598858, 0.08678153157234192, -0.07871127128601074, -0.017445692792534828, 0.015255599282681942, 0.09918952733278275, -0.08615583181381226, -5.3278146339152954e-8, -0.005450489930808544, 0.08293090015649796, 0.058662302792072296, 0.028358811512589455, 0.00775363203138113, -0.027901267632842064, 0.02372746355831623, 0.0030037066899240017, -0.02235165610909462, -0.002019275911152363, 0.04431527853012085, 0.14879246056079865, -0.030103323981165886, -0.02111857384443283, -0.029727652668952942, 0.013543354347348213, -0.02099420130252838, -0.03104804828763008, 0.026551347225904465, -0.03874850273132324, -0.0542728416621685, -0.025714833289384842, -0.006894214544445276, 0.019901273772120476, 0.007399413734674454, 0.042799212038517, 0.07209179550409317, 0.0012358477106317878, 0.04569731652736664, 0.07720798999071121, -0.057312022894620895, 0.0072624762542545795, -0.013864077627658844, 0.02566213719546795, -0.012832614593207836, -0.001642824849113822, -0.11288526654243469, -0.00041452658479101956, 0.07413017004728317, 0.050144992768764496, 0.029247406870126724, -0.030594678595662117, -0.013244441710412502, 0.004485275596380234, 0.09056203812360764, 0.09443621337413788, -0.03615594282746315, 0.04577859863638878, 0.04145897179841995, -0.014592349529266357, -0.028229299932718277, -0.0245334655046463, -0.04309871792793274, 0.12218812108039856, -0.07717976719141006, -0.07918952405452728, 0.006448592524975538, -0.04274381697177887, 0.026909124106168747, 0.025911347940564156, 0.016148388385772705, 0.0254267156124115, 0.029106775298714638, 0.034072715789079666 ]
0.174566
Kubernetes can be configured to use swap memory on a {{< glossary\_tooltip text="node" term\_id="node" >}}, allowing the kernel to free up physical memory by swapping out pages to backing storage. This is useful for multiple use-cases. For example, nodes running workloads that can benefit from using swap, such as those that have large memory footprints but only access a portion of that memory at any given time. It also helps prevent Pods from being terminated during memory pressure spikes, shields nodes from system-level memory spikes that might compromise its stability, allows for more flexible memory management on the node, and much more. To learn about configuring swap in your cluster, read [Configuring swap memory on Kubernetes nodes](/docs/tutorials/cluster-management/provision-swap-memory/). ## Operating system support \* Linux nodes support swap; you need to configure each node to enable it. By default, the kubelet will \*\*not\*\* start on a Linux node that has swap enabled. \* Windows nodes require swap space. By default, the kubelet does \*\*not\*\* start on a Windows node that has swap disabled. ## How does it work? There are a number of possible ways that one could envision swap use on a node. If kubelet is already running on a node, it would need to be restarted after swap is provisioned in order to identify it. When kubelet starts on a node in which swap is provisioned and available (with the `failSwapOn: false` configuration), kubelet will: - Be able to start on this swap-enabled node. - Direct the Container Runtime Interface (CRI) implementation, often referred to as the container runtime, to allocate zero swap memory to Kubernetes workloads by default. Swap configuration on a node is exposed to a cluster admin via the [`memorySwap` in the KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1). As a cluster administrator, you can specify the node's behaviour in the presence of swap memory by setting `memorySwap.swapBehavior`. ### Swap behaviors You need to pick a [swap behavior](/docs/reference/node/swap-behavior/) to use. Different nodes in your cluster can use different swap behaviors. The swap behaviors you can choose for Linux nodes are: `NoSwap` (default) : Workloads running as Pods on this node do not and cannot use swap. `LimitedSwap` : Kubernetes workloads can utilize swap memory. {{< note >}} If you choose the NoSwap behavior, and you configure the kubelet to tolerate swap space (`failSwapOn: false`), then your workloads don't use any swap. However, processes outside of Kubernetes-managed containers, such as systemi services (and even the kubelet itself!) \*\*can\*\* utilize swap. {{< /note >}} You can read [configuring swap memory on Kubernetes nodes](/docs/tutorials/cluster-management/provision-swap-memory/) to learn about enabling swap for your cluster. ### Container runtime integration The kubelet uses the container runtime API, and directs the container runtime to apply specific configuration (for example, in the cgroup v2 case, `memory.swap.max`) in a manner that will enable the desired swap configuration for a container. For runtimes that use control groups, or cgroups, the container runtime is then responsible for writing these settings to the container-level cgroup. ## Observability for swap use ### Node and container level metric statistics Kubelet now collects node and container level metric statistics, which can be accessed at the `/metrics/resource` (which is used mainly by monitoring tools like Prometheus) and `/stats/summary` (which is used mainly by Autoscalers) kubelet HTTP endpoints. This allows clients who can directly request the kubelet to monitor swap usage and remaining swap memory when using `LimitedSwap`. Additionally, a `machine\_swap\_bytes` metric has been added to cadvisor to show the total physical swap capacity of the machine. See [this page](/docs/reference/instrumentation/node-metrics/) for more info. For example, these `/metrics/resource` are supported: - `node\_swap\_usage\_bytes`: Current swap usage of the node in bytes. - `container\_swap\_usage\_bytes`:
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.034685730934143066, 0.017345227301120758, 0.01942899450659752, 0.051708199083805084, -0.048483412712812424, 0.07997335493564606, -0.02427089959383011, 0.0046858652494847775, 0.06780366599559784, 0.0707223191857338, -0.0480562224984169, 0.030323991551995277, -0.02630315162241459, -0.08366897702217102, 0.012105762027204037, 0.04325678572058678, -0.010483799502253532, 0.07696250826120377, 0.001465758541598916, -0.015537702478468418, -0.02174951508641243, -0.062264230102300644, -0.013854028657078743, 0.03458381071686745, -0.04494418576359749, 0.03408446162939072, -0.018801257014274597, -0.029300669208168983, 0.026998145505785942, -0.06633341312408447, -0.05118472874164581, 0.035971302539110184, -0.04836053401231766, 0.044292841106653214, 0.026314185932278633, 0.11906453967094421, -0.0826546847820282, -0.05755876377224922, -0.0926666259765625, 0.020063888281583786, 0.046079594641923904, 0.0052959732711315155, -0.10381914675235748, 0.02674025110900402, -0.000586646783631295, 0.1009182259440422, -0.04161660745739937, -0.014802862890064716, 0.004942124243825674, -0.026006681844592094, 0.042473044246435165, -0.038079991936683655, 0.042723339051008224, 0.06992132216691971, 0.013465032912790775, 0.0412834957242012, 0.0010840191971510649, -0.025699006393551826, 0.07807580381631851, 0.019642453640699387, 0.035297416150569916, -0.057604216039180756, 0.05684357509016991, -0.042546603828668594, -0.04582523927092552, -0.024901133030653, 0.07235033810138702, 0.015687182545661926, 0.031027529388666153, -0.017329033464193344, 0.03782912716269493, 0.004031116142868996, 0.016456475481390953, 0.0031118355691432953, -0.022214598953723907, 0.007342349272221327, 0.0034472441766411066, -0.010716600343585014, -0.0002582782763056457, 0.009519228711724281, 0.0124457236379385, 0.06716243922710419, 0.08037592470645905, -0.04252580180764198, -0.06150711700320244, -0.013552486896514893, -0.03070017509162426, -0.044575221836566925, -0.02932661958038807, -0.049734216183423996, 0.015087248757481575, 0.016338687390089035, 0.022619837895035744, -0.14835631847381592, 0.05485845357179642, 0.010929584503173828, 0.012267859652638435, -0.00261997920460999, 0.024174725636839867, -0.028481733053922653, 0.08263121545314789, 0.04751875251531601, 0.04468345269560814, 0.028558719903230667, 0.04357890412211418, -0.07851576805114746, 0.0010362068424001336, -0.007335056085139513, -0.011003213934600353, 0.016733551397919655, 0.027928879484534264, 0.12364906072616577, -0.03485814481973648, 0.0456230454146862, 0.023290690034627914, -0.03946499526500702, 0.034815896302461624, -0.055869556963443756, 0.007491852156817913, 0.08994317054748535, 0.004385319538414478, -0.079121895134449, -0.05908939614892006, 0.0266821701079607, -0.07451426982879639, 0.02917090244591236, -0.0766797885298729, 5.0681659340893705e-33, 0.019247829914093018, -0.05195581912994385, 0.0032866739202290773, -0.0596589632332325, -0.007957562804222107, -0.09634469449520111, -0.07026954740285873, -0.040442340075969696, -0.06867591291666031, -0.06362753361463547, -0.06411552429199219, 0.003601724747568369, 0.037526607513427734, -0.011653903871774673, 0.05444815382361412, -0.04374055191874504, -0.07790759205818176, 0.020056819543242455, 0.15732066333293915, -0.08162861317396164, 0.023942936211824417, -0.056096263229846954, -0.0028163751121610403, 0.03980241343379021, -0.02661253698170185, -0.05608513206243515, 0.0428159274160862, -0.11335495114326477, -0.010728522203862667, -0.015721069648861885, -0.07292135804891586, 0.04157859832048416, -0.02426302805542946, 0.015472956001758575, -0.10346661508083344, 0.006269227247685194, -0.05918676033616066, -0.03857721760869026, -0.04436708241701126, -0.06936725974082947, -0.02749222330749035, 0.02936762571334839, 0.048134833574295044, -0.11761493980884552, 0.05495647341012955, -0.03974318876862526, 0.08032472431659698, -0.06659632176160812, 0.008866602554917336, 0.04693949222564697, 0.02316863276064396, -0.024820728227496147, 0.0032783527858555317, 0.06776934862136841, 0.07470463216304779, 0.05779026076197624, 0.14035552740097046, -0.07340844720602036, -0.02064443752169609, 0.08715415745973587, -0.04928372800350189, -0.07079564034938812, -0.004968782886862755, 0.017862340435385704, 0.001866274862550199, 0.018585043027997017, 0.04422985017299652, 0.13401058316230774, -0.07566974312067032, -0.03527311235666275, -0.03537429869174957, -0.022403864189982414, -0.0047406586818397045, 0.04965709149837494, -0.09734199941158295, 0.010242554359138012, 0.008678173646330833, 0.011991659179329872, -0.15323343873023987, 0.04730983078479767, 0.06359447538852692, -0.05935324728488922, -0.008216450922191143, 0.043657463043928146, 0.014269277453422546, -0.045049428939819336, 0.07064138352870941, -0.025492912158370018, -0.013690085150301456, 0.03960280865430832, 0.06008943170309067, -0.011665496975183487, 0.01790378801524639, 0.009919763542711735, -0.10861282795667648, -5.66014452182149e-33, 0.05582617595791817, 0.014865431934595108, -0.022755872458219528, 0.07311119884252548, 0.01625809073448181, 0.026802022010087967, -0.024729078635573387, 0.03179725259542465, -0.07241415977478027, -0.10292865335941315, -0.07378985732793808, -0.050217628479003906, 0.03175359591841698, 0.02848135121166706, -0.051829155534505844, -0.024426771327853203, -0.025385580956935883, 0.01526457630097866, -0.010145553387701511, 0.05059845745563507, -0.028149031102657318, 0.021785445511341095, 0.062398459762334824, -0.048114366829395294, -0.01210549846291542, 0.026099005714058876, -0.017287252470850945, 0.06449026614427567, -0.0779561921954155, -0.0033754061441868544, 0.011056029237806797, -0.09942691028118134, 0.03473455458879471, 0.014853409491479397, 0.07128659635782242, -0.0746862143278122, 0.005838949233293533, 0.0027507285121828318, 0.0384075753390789, 0.030671346932649612, 0.05834273248910904, 0.03257228061556816, -0.04052412509918213, -0.053675729781389236, -0.0369819812476635, 0.04542678967118263, -0.09481421858072281, -0.025843186303973198, 0.014007500372827053, -0.04232718423008919, -0.029624855145812035, 0.015639621764421463, -0.07542416453361511, 0.03188912570476532, -0.055524274706840515, -0.04844151809811592, -0.005573542322963476, 0.12143617868423462, 0.0009367102757096291, 0.011771970428526402, 0.046621669083833694, -0.11429660022258759, -0.008375127799808979, -0.06379818171262741, -0.00044144547428004444, -0.04163156449794769, 0.018905043601989746, -0.03238237649202347, -0.04787248745560646, 0.07484963536262512, -0.01202752348035574, 0.04235308989882469, 0.03393884375691414, 0.031964439898729324, -0.018806900829076767, -0.004008791875094175, 0.06281821429729462, 0.0014792127767577767, 0.06339416652917862, -0.029960865154862404, -0.05190637335181236, 0.050210993736982346, -0.05126011744141579, 0.05341813713312149, -0.012762176804244518, 0.07261962443590164, 0.004170409869402647, 0.03278421238064766, -0.00804908201098442, -0.02904309518635273, -0.017824793234467506, -0.019777584820985794, -0.014138873666524887, 0.085920050740242, -0.026813242584466934, -5.086414489596791e-8, 0.06473959237337112, -0.009286614134907722, 0.030039189383387566, 0.055704038590192795, 0.007116150576621294, -0.110602468252182, 0.05551556497812271, 0.06901314854621887, -0.009941709227859974, 0.05582623556256294, 0.059490419924259186, 0.06328002363443375, -0.038777343928813934, -0.04386164993047714, 0.07283797115087509, 0.062374766916036606, 0.02044644020497799, 0.016636542975902557, 0.03996248543262482, -0.04508505016565323, -0.05938214808702469, -0.04090059921145439, 0.04425075650215149, 0.0818573459982872, 0.05506362393498421, 0.009187699295580387, 0.13278424739837646, 0.04249686375260353, 0.009593219496309757, -0.03289315477013588, -0.04939164221286774, -0.011560994200408459, -0.06817983835935593, 0.08263912051916122, 0.028071532025933266, 0.023692680522799492, -0.1183343455195427, 0.04866538569331169, 0.0245702862739563, 0.06021946668624878, -0.02974715828895569, -0.017827970907092094, -0.08549834042787552, 0.012039167806506157, -0.043446123600006104, 0.08061978965997696, -0.03855213150382042, 0.048131976276636124, -0.0038850982673466206, 0.019974414259195328, -0.014520012773573399, -0.012056020088493824, 0.04926396533846855, 0.06453970819711685, -0.03763020783662796, 0.016528187319636345, 0.011224508285522461, -0.014135992154479027, 0.0320647731423378, 0.026698797941207886, -0.020207049325108528, -0.006513683125376701, -0.04112177714705467, -0.050613921135663986 ]
0.208453
and remaining swap memory when using `LimitedSwap`. Additionally, a `machine\_swap\_bytes` metric has been added to cadvisor to show the total physical swap capacity of the machine. See [this page](/docs/reference/instrumentation/node-metrics/) for more info. For example, these `/metrics/resource` are supported: - `node\_swap\_usage\_bytes`: Current swap usage of the node in bytes. - `container\_swap\_usage\_bytes`: Current amount of the container swap usage in bytes. - `container\_swap\_limit\_bytes`: Current amount of the container swap limit in bytes. ### Using `kubectl top --show-swap` Querying metrics is valuable, but somewhat cumbersome, as these metrics are designed to be used by software rather than humans. In order to consume this data in a more user-friendly way, the `kubectl top` command has been extended to support swap metrics, using the `--show-swap` flag. In order to receive information about swap usage on nodes, `kubectl top nodes --show-swap` can be used: ```shell kubectl top nodes --show-swap ``` This will result in an output similar to: ``` NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%) SWAP(bytes) SWAP(%) node1 1m 10% 2Mi 10% 1Mi 0% node2 5m 10% 6Mi 10% 2Mi 0% node3 3m 10% 4Mi 10% ``` In order to receive information about swap usage by pods, `kubectl top pods --show-swap` can be used: ```shell kubectl top pod -n kube-system --show-swap ``` This will result in an output similar to: ``` NAME CPU(cores) MEMORY(bytes) SWAP(bytes) coredns-58d5bc5cdb-5nbk4 2m 19Mi 0Mi coredns-58d5bc5cdb-jsh26 3m 37Mi 0Mi etcd-node01 51m 143Mi 5Mi kube-apiserver-node01 98m 824Mi 16Mi kube-controller-manager-node01 20m 135Mi 9Mi kube-proxy-ffgs2 1m 24Mi 0Mi kube-proxy-fhvwx 1m 39Mi 0Mi kube-scheduler-node01 13m 69Mi 0Mi metrics-server-8598789fdb-d2kcj 5m 26Mi 0Mi ``` ### Nodes to report swap capacity as part of node status A new node status field is now added, `node.status.nodeInfo.swap.capacity`, to report the swap capacity of a node. As an example, the following command can be used to retrieve the swap capacity of the nodes in a cluster: ```shell kubectl get nodes -o go-template='{{range .items}}{{.metadata.name}}: {{if .status.nodeInfo.swap.capacity}}{{.status.nodeInfo.swap.capacity}}{{else}}{{end}}{{"\n"}}{{end}}' ``` This will result in an output similar to: ``` node1: 21474836480 node2: 42949664768 node3: ``` {{< note >}} The `` value indicates that the `.status.nodeInfo.swap.capacity` field is not set for that Node. This probably means that the node does not have swap provisioned, or less likely, that the kubelet is not able to determine the swap capacity of the node. {{< /note >}} ### Swap discovery using Node Feature Discovery (NFD) {#node-feature-discovery} [Node Feature Discovery](https://github.com/kubernetes-sigs/node-feature-discovery) is a Kubernetes addon for detecting hardware features and configuration. It can be utilized to discover which nodes are provisioned with swap. As an example, to figure out which nodes are provisioned with swap, use the following command: ```shell kubectl get nodes -o jsonpath='{range .items[?(@.metadata.labels.feature\.node\.kubernetes\.io/memory-swap)]}{.metadata.name}{"\t"}{.metadata.labels.feature\.node\.kubernetes\.io/memory-swap}{"\n"}{end}' ``` This will result in an output similar to: ``` k8s-worker1: true k8s-worker2: true k8s-worker3: false ``` In this example, swap is provisioned on nodes `k8s-worker1` and `k8s-worker2`, but not on `k8s-worker3`. ## Risks and caveats {{< caution >}} It is deeply encouraged to encrypt the swap space. See Memory-backed volumes [memory-backed volumes](#memory-backed-volumes) for more info. {{< /caution >}} Having swap available on a system reduces predictability. While swap can enhance performance by making more RAM available, swapping data back to memory is a heavy operation, sometimes slower by many orders of magnitude, which can cause unexpected performance regressions. Furthermore, swap changes a system's behaviour under memory pressure. Enabling swap increases the risk of noisy neighbors, where Pods that frequently use their RAM may cause other Pods to swap. In addition, since swap allows for greater memory usage for workloads in Kubernetes that cannot be predictably accounted for, and due to unexpected packing configurations, the scheduler currently does not account for swap memory usage. This heightens the
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.020905863493680954, -0.0016431583790108562, 0.0037944912910461426, -0.009279711171984673, -0.015685303136706352, -0.03637368604540825, -0.006669217720627785, 0.0737331211566925, 0.027977081015706062, 0.03372364118695259, -0.05154327303171158, -0.025323595851659775, 0.01872759498655796, -0.0695803090929985, -0.042848989367485046, -0.0001783897023415193, 0.015427944250404835, 0.04085388407111168, -0.006384057924151421, -0.0398610457777977, 0.036391738802194595, -0.07501852512359619, -0.022332001477479935, -0.06148003414273262, -0.018927687779068947, -0.027989618480205536, -0.06917125731706619, 0.01833207532763481, -0.011185276322066784, -0.06931629776954651, -0.08712131530046463, 0.09453145414590836, -0.053504157811403275, 0.02147076465189457, 0.02039952389895916, 0.04769813269376755, -0.034920357167720795, -0.11393244564533234, -0.07416067272424698, -0.028615139424800873, 0.0571429543197155, 0.009712024591863155, -0.016892386600375175, 0.047857027500867844, -0.001393766957335174, 0.10180141031742096, -0.06067284196615219, -0.0692586898803711, -0.02306724525988102, -0.008524496108293533, 0.03786290064454079, 0.025969821959733963, 0.05027607083320618, 0.07257474958896637, 0.05070666968822479, -0.0018809267785400152, -0.0003384161100257188, -0.05748485401272774, 0.07371672987937927, 0.05608641356229782, -0.018406854942440987, 0.003120752749964595, 0.02821020409464836, -0.02675807848572731, -0.03657785430550575, -0.06164586916565895, 0.04884353280067444, -0.016629977151751518, -0.04349103569984436, 0.020576126873493195, -0.0010027260286733508, 0.012101270258426666, -0.002332169795408845, -0.004527573008090258, -0.004488171543926001, -0.06506729125976562, 0.027796268463134766, 0.022607194259762764, -0.012966829352080822, -0.10905105620622635, -0.04487079009413719, 0.0884278416633606, 0.028778113424777985, -0.00030422949930652976, -0.03757276386022568, -0.010702227242290974, -0.009923639707267284, -0.05187100172042847, 0.003654946805909276, -0.010294376872479916, 0.0463167279958725, 0.0192322488874197, -0.04409032315015793, -0.09481181204319, 0.008094562217593193, 0.020808739587664604, 0.0061452630907297134, 0.05964002385735512, 0.01313784345984459, -0.005264172796159983, 0.04255809262394905, 0.04817725345492363, 0.06268416345119476, -0.009185469709336758, 0.010126665234565735, -0.04188152030110359, 0.0026437267661094666, 0.03813888505101204, -0.02504577860236168, 0.057078536599874496, 0.029000116512179375, 0.11771250516176224, -0.047770239412784576, 0.012801481410861015, 0.02021806687116623, -0.014397869817912579, -0.0005286560044623911, -0.060965050011873245, 0.031463753432035446, 0.047109104692935944, 0.046714458614587784, -0.03543410822749138, -0.016255229711532593, 0.0025721716228872538, -0.06955642998218536, 0.039901252835989, -0.03275049105286598, 1.5201180704146885e-33, 0.006852006074041128, -0.0792795792222023, 0.07367266714572906, -0.03490676358342171, -0.0476994626224041, -0.0063886819407343864, -0.08632824569940567, 0.004216385073959827, -0.06325913220643997, 0.020834652706980705, -0.09696975350379944, 0.07518373429775238, -0.02462718077003956, -0.0005356324254535139, 0.036145489662885666, -0.018886327743530273, -0.049543336033821106, 0.010410932824015617, 0.05432825908064842, -0.07434941828250885, 0.03609629347920418, -0.058774154633283615, 0.030994277447462082, 0.07734676450490952, 0.02241838350892067, -0.025841692462563515, 0.03410676494240761, -0.06439650803804398, -0.01124245673418045, 0.01272791251540184, -0.040553171187639236, 0.013110189698636532, -0.02236558310687542, 0.011143767274916172, -0.04442784935235977, -0.011727636680006981, -0.021242855116724968, -0.006303857080638409, -0.07642964273691177, -0.023168984800577164, 0.02511567249894142, 0.02146868035197258, 0.03894881159067154, -0.1466122567653656, -0.07427932322025299, -0.03135717287659645, 0.08342603594064713, -0.0375981479883194, -0.014983179047703743, 0.06904157251119614, 0.010063236579298973, -0.004034957382827997, 0.027630284428596497, 0.03477296605706215, 0.07016782462596893, 0.03980329632759094, 0.11164581030607224, -0.03228007256984711, -0.0018185315420851111, 0.1464654952287674, -0.09177028387784958, -0.016264326870441437, 0.04206347092986107, 0.0045471214689314365, 0.011756488122045994, 0.09589235484600067, 0.031989458948373795, 0.05342577025294304, -0.0025719807017594576, -0.01903846673667431, -0.08791698515415192, 0.004301123321056366, -0.0009760393295437098, 0.08531351387500763, -0.053725361824035645, 0.021035749465227127, 0.016598839312791824, -0.025356203317642212, -0.07483358681201935, 0.0440094880759716, 0.005696095526218414, -0.07764915376901627, 0.03099713660776615, 0.005723694805055857, -0.012814165093004704, -0.048791807144880295, 0.06561718881130219, -0.009976961649954319, -0.06603091210126877, 0.036822814494371414, -0.00011376127076800913, -0.04555496573448181, -0.027849368751049042, -0.06556703895330429, -0.1196235939860344, -3.676984900280502e-33, -0.015038112178444862, 0.06939689069986343, 0.0039046702440828085, 0.07951563596725464, -0.005710203666239977, -0.061130233108997345, 0.05301923304796219, 0.056051284074783325, -0.05983180180191994, -0.05796491727232933, -0.015961233526468277, -0.02125995047390461, 0.047010425478219986, 0.008060235530138016, 0.0018070802325382829, 0.03504881635308266, -0.07917683571577072, -0.04914242774248123, -0.04322715103626251, 0.04453828185796738, -0.01919168047606945, 0.09233071655035019, 0.018575770780444145, -0.027109330520033836, -0.020245568826794624, 0.0397103950381279, -0.016780275851488113, 0.005193929187953472, -0.06239387392997742, -0.07470344752073288, 0.03653263300657272, -0.13392606377601624, -0.013210867531597614, 0.06982055306434631, 0.01876833289861679, -0.12626108527183533, 0.02260841615498066, 0.03935038298368454, 0.03186444565653801, 0.0833049938082695, 0.069280706346035, 0.025113433599472046, -0.01390353124588728, 0.03791709244251251, -0.028959082439541817, 0.05646447092294693, -0.12162882089614868, -0.039610423147678375, 0.05888582393527031, -0.07420887798070908, 0.014239239506423473, 0.01289005484431982, -0.010060437954962254, 0.027446405962109566, -0.005485920701175928, -0.07115010172128677, 0.016201302409172058, 0.07398825138807297, -0.003369755344465375, -0.03999120369553566, 0.07923419028520584, -0.09691290557384491, -0.024198012426495552, -0.036735523492097855, 0.0251302532851696, -0.023166153579950333, 0.007390434853732586, -0.13998417556285858, -0.053141288459300995, 0.025355808436870575, 0.09769808501005173, 0.015344159677624702, 0.0421597845852375, -0.039161812514066696, -0.05278114974498749, 0.0354120098054409, 0.060193661600351334, -0.01597234606742859, 0.07309716194868088, -0.020630192011594772, -0.07279489934444427, -0.005413811653852463, 0.04311098903417587, -0.020421190187335014, -0.03856910020112991, 0.06388635188341141, -0.01821461319923401, 0.039486926048994064, 0.03576776385307312, 0.009269431233406067, -0.10092484205961227, -0.04951916262507439, -0.11155925691127777, 0.07648830860853195, -0.025403372943401337, -4.9555357151120916e-8, 0.0366903692483902, -0.026423638686537743, -0.007943288423120975, 0.0150771988555789, 0.03032742626965046, -0.02249321900308132, 0.07661087065935135, 0.11823804676532745, -0.01421546284109354, 0.1070084273815155, 0.08153639733791351, 0.03470271825790405, -0.05804780498147011, -0.029676100239157677, 0.08877736330032349, 0.053251657634973526, 0.04559430480003357, 0.0430680513381958, -0.01232599001377821, -0.03239918872714043, -0.05830243229866028, 0.0366106741130352, -0.004583339672535658, 0.02783561311662197, 0.007021044380962849, -0.030286593362689018, 0.05295844003558159, 0.04187611863017082, 0.033867835998535156, -0.101874440908432, 0.03452921286225319, -0.03633638843894005, 0.001957110594958067, 0.029779167845845222, 0.0467875599861145, 0.07400872558355331, -0.14625394344329834, 0.06863053143024445, 0.08708028495311737, 0.08801980316638947, -0.07018172740936279, -0.02483951859176159, -0.06516136229038239, 0.059369634836912155, -0.025376038625836372, 0.064591184258461, -0.08499250560998917, 0.09021349251270294, -0.05721266567707062, 0.007006985135376453, -0.002549111610278487, -0.048291973769664764, 0.010501735843718052, 0.0297501552850008, -0.07266306132078171, 0.08481130003929138, 0.016818642616271973, -0.011974542401731014, 0.0047620488330721855, 0.03442041575908661, -0.01135119516402483, -0.010721703991293907, -0.07556453347206116, 0.009386644698679447 ]
0.21007
Pods that frequently use their RAM may cause other Pods to swap. In addition, since swap allows for greater memory usage for workloads in Kubernetes that cannot be predictably accounted for, and due to unexpected packing configurations, the scheduler currently does not account for swap memory usage. This heightens the risk of noisy neighbors. The performance of a node with swap memory enabled depends on the underlying physical storage. When swap memory is in use, performance will be significantly worse in an I/O operations per second (IOPS) constrained environment, such as a cloud VM with I/O throttling, when compared to faster storage mediums like solid-state drives or NVMe. As swap might cause IO pressure, it is recommended to give a higher IO latency priority to system critical daemons. See the relevant section in the [recommended practices](#good-practice-for-using-swap-in-a-kubernetes-cluster) section below. ### Memory-backed volumes On Linux nodes, memory-backed volumes (such as [`secret`](/docs/concepts/configuration/secret/) volume mounts, or [`emptyDir`](/docs/concepts/storage/volumes/#emptydir) with `medium: Memory`) are implemented with a `tmpfs` filesystem. The contents of such volumes should remain in memory at all times, hence should not be swapped to disk. To ensure the contents of such volumes remain in memory, the `noswap` tmpfs option is being used. The Linux kernel officially supports the `noswap` option from version 6.3 (more info can be found in [Linux Kernel Version Requirements](/docs/reference/node/kernel-version-requirements/#requirements-other)). However, the different distributions often choose to backport this mount option to older Linux versions as well. In order to verify whether the node supports the `noswap` option, the kubelet will do the following: \* If the kernel's version is above 6.3 then the `noswap` option will be assumed to be supported. \* Otherwise, kubelet would try to mount a dummy tmpfs with the `noswap` option at startup. If kubelet fails with an error indicating of an unknown option, `noswap` will be assumed to not be supported, hence will not be used. A kubelet log entry will be emitted to warn the user about memory-backed volumes might swap to disk. If kubelet succeeds, the dummy tmpfs will be deleted and the `noswap` option will be used. \* If the `noswap` option is not supported, kubelet will emit a warning log entry, then continue its execution. See the [section above](#setting-up-encrypted-swap) with an example for setting unencrypted swap. However, handling encrypted swap is not within the scope of kubelet; rather, it is a general OS configuration concern and should be addressed at that level. It is the administrator's responsibility to provision encrypted swap to mitigate this risk. ### Evictions Configuring memory eviction thresholds for swap-enabled nodes can be tricky. With swap being disabled, it is reasonable to configure kubelet's eviction thresholds to be a bit lower than the node's memory capacity. The rationale is that we want Kubernetes to start evicting Pods before the node runs out of memory and invokes the Out Of Memory (OOM) killer, since the OOM killer is not Kubernetes-aware, therefore does not consider things like QoS, pod priority, or other Kubernetes-specific factors. With swap enabled, the situation is more complex. In Linux, the `vm.min\_free\_kbytes` parameter defines the memory threshold for the kernel to start aggressively reclaiming memory, which includes swapping out pages. If the kubelet's eviction thresholds are set in a way that eviction would take place before the kernel starts reclaiming memory, it could lead to workloads never being able to swap out during node memory pressure. However, setting the eviction thresholds too high could result in the node running out of memory and invoking the OOM killer, which is not ideal either. To address this, it is recommended to set the kubelet's eviction thresholds to be
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.02441769652068615, 0.003459680126979947, 0.06881692260503769, 0.05839787423610687, -0.017503999173641205, 0.004616369027644396, -0.035075630992650986, 0.037351131439208984, 0.10730157792568207, 0.05065172538161278, -0.0684586688876152, 0.07006996870040894, -0.019439036026597023, -0.08268758654594421, 0.018442565575242043, 0.05175691470503807, 0.01440096739679575, 0.02940981276333332, 0.00472085690125823, -0.000754256674554199, -0.017026709392666817, -0.02934429980814457, -0.022537313401699066, 0.01840968243777752, -0.015845656394958496, 0.02757684700191021, -0.017410460859537125, -0.037135157734155655, 0.005385503638535738, -0.07019669562578201, -0.09614092111587524, 0.031916674226522446, -0.04489162936806679, 0.025597769767045975, 0.030739907175302505, 0.056235421448946, -0.06072114780545235, -0.0932263731956482, -0.05432630702853203, 0.04799541085958481, 0.04512312263250351, -0.02567681297659874, -0.06821375340223312, 0.04321606084704399, -0.0020860894583165646, 0.09772411733865738, -0.02074158564209938, -0.09030298888683319, 0.002379754325374961, -0.024556133896112442, 0.007741465698927641, -0.028004134073853493, 0.07266884297132492, 0.06702885776758194, 0.04348317161202431, 0.06809313595294952, 0.03710554912686348, -0.01094062253832817, 0.10290439426898956, 0.03236684575676918, 0.006481917109340429, -0.008673345670104027, 0.08551719784736633, -0.041727833449840546, -0.02587706223130226, -0.04561593383550644, 0.10716851055622101, 0.015590855851769447, -0.007077055983245373, -0.01019541546702385, 0.06350136548280716, 0.017735345289111137, 0.0345931202173233, 0.011288181878626347, -0.0009895996190607548, -0.027691632509231567, 0.0041228970512747765, -0.013736645691096783, 0.017224468290805817, -0.025174913927912712, 0.0046677254140377045, 0.03581913560628891, 0.0329049788415432, -0.0803411677479744, -0.03024763986468315, -0.03842826560139656, 0.008388148620724678, -0.05715366452932358, -0.032968081533908844, -0.036210011690855026, 0.04803253710269928, -0.004651984665542841, 0.026875123381614685, -0.1140703335404396, 0.06017627939581871, 0.027226058766245842, 0.017907757312059402, 0.015391255728900433, 0.0030264609958976507, -0.03466220572590828, 0.08513377606868744, 0.08348701894283295, 0.022004183381795883, 0.05364047363400459, 0.10469811409711838, -0.03547792509198189, 0.015530724078416824, -0.02248712256550789, -0.02970224805176258, 0.051904816180467606, 0.04863477498292923, 0.10545025020837784, 0.002249704208225012, 0.07422448694705963, 0.002696051262319088, -0.026936594396829605, -0.02273477055132389, -0.060426998883485794, -0.042977944016456604, 0.06884939968585968, -0.0043150437995791435, -0.09223078936338425, -0.05711168423295021, 0.04450931027531624, -0.09715347737073898, 0.026333533227443695, -0.061760302633047104, 3.7502677895046555e-33, 0.029666133224964142, -0.04340369626879692, -0.021287458017468452, -0.08208830654621124, -0.010342353023588657, -0.09090723842382431, -0.056310057640075684, -0.02395826019346714, -0.04410278797149658, -0.032915033400058746, -0.09059269726276398, -0.0028228589799255133, 0.021957265213131905, -0.033171482384204865, 0.0027591895777732134, -0.01617223583161831, -0.0682254433631897, -0.013195522129535675, 0.11387602984905243, -0.07947012037038803, 0.0036090617068111897, -0.06331255286931992, -0.013680215924978256, 0.03198573738336563, -0.07286005467176437, -0.03518377244472504, 0.040045056492090225, -0.1509142369031906, -0.001980156172066927, -0.01659756526350975, -0.08134404569864273, -0.009156600572168827, 0.027055256068706512, 0.038610752671957016, -0.05841107666492462, -0.01889396272599697, -0.022230667993426323, -0.04132326319813728, -0.0573640912771225, -0.06971215456724167, -0.010972375981509686, 0.04870932921767235, 0.03680536895990372, -0.10286395996809006, 0.06298363208770752, -0.007507700473070145, 0.06663432717323303, -0.07787656784057617, -0.047944799065589905, 0.07073372602462769, -0.020295796915888786, 0.013385733589529991, -0.0036211423575878143, 0.07707323133945465, 0.09134970605373383, 0.022135119885206223, 0.12006630003452301, -0.06940533965826035, -0.013923516497015953, 0.08169449865818024, -0.04822206869721413, -0.02622494287788868, 0.015609661117196083, -0.01196286454796791, 0.01814159005880356, 0.06143280118703842, 0.06925258785486221, 0.09355708956718445, -0.049260806292295456, -0.03682619333267212, -0.006992257200181484, -0.04691123962402344, -0.039706774055957794, 0.036200448870658875, -0.040814340114593506, -0.01378287747502327, 0.020386040210723877, 0.017176443710923195, -0.1160895973443985, -0.038805220276117325, 0.09250576794147491, -0.03383137285709381, -0.011664164252579212, 0.05458647757768631, -0.027734002098441124, -0.008904681541025639, 0.0671430379152298, -0.015728425234556198, -0.047266412526369095, 0.09271009266376495, 0.08672372251749039, -0.0071515473537147045, -0.007580452132970095, -0.0060279350727796555, -0.11864318698644638, -3.8490724977950844e-33, 0.05843677371740341, -0.024869807064533234, -0.0299369003623724, 0.08648117631673813, 0.025723980739712715, -0.01583847962319851, 0.010752498172223568, -0.004096741788089275, -0.02208477072417736, -0.0887557864189148, -0.05556924268603325, -0.049618080258369446, -0.00016249014879576862, 0.03398356959223747, -0.003512156428769231, -0.028916511684656143, -0.03318523243069649, -0.027173765003681183, -0.012415749952197075, 0.02768307738006115, -0.0017905812710523605, 0.058988284319639206, 0.07266983389854431, -0.005258569493889809, -0.046238165348768234, 0.04432714730501175, -0.03744648024439812, 0.03068593144416809, -0.05097166448831558, -0.0338192917406559, 0.02555510401725769, -0.0673961415886879, 0.0264532882720232, 0.03908621892333031, 0.07942841202020645, -0.05771945044398308, -0.012786920182406902, 0.019040700048208237, 0.03062465786933899, 0.026919646188616753, 0.05181102082133293, 0.0592297725379467, -0.021023206412792206, -0.062429506331682205, -0.06851799041032791, 0.05324360728263855, -0.12087877839803696, -0.015356593765318394, 0.0665210410952568, -0.030474379658699036, -0.012035221792757511, 0.03303033113479614, -0.05931730195879936, 0.05247693508863449, -0.024555880576372147, -0.0571412593126297, -0.013696400448679924, 0.06627341359853745, 0.019030993804335594, 0.05036010965704918, 0.07284035533666611, -0.053087543696165085, -0.017888717353343964, -0.11733749508857727, 0.007349042687565088, -0.024116182699799538, 0.01907528191804886, -0.06731963157653809, 0.02877522073686123, 0.0542796291410923, 0.06712409853935242, -0.02966163493692875, 0.017552390694618225, -0.0027984955813735723, -0.047905027866363525, 0.005278151482343674, 0.06325928866863251, 0.011409270577132702, 0.052917830646038055, -0.03906915709376335, -0.10747930407524109, 0.053320325911045074, -0.0248559657484293, 0.04215307906270027, -0.11631639301776886, 0.06502090394496918, 0.03218916058540344, 0.00008066432201303542, 0.010745939798653126, -0.03403361514210701, 0.0007051500724628568, -0.0565231591463089, -0.050265245139598846, 0.07001086324453354, -0.021260278299450874, -4.720402912994359e-8, 0.08072005212306976, -0.026405438780784607, 0.056563008576631546, 0.08193595707416534, 0.043753720819950104, -0.11882750689983368, 0.04554456099867821, 0.08197654783725739, -0.009345519356429577, 0.11304650455713272, 0.094069704413414, 0.039735108613967896, -0.038471292704343796, -0.047758836299180984, 0.09628670662641525, 0.06703758239746094, 0.024551326408982277, 0.04725152999162674, 0.02293425053358078, -0.06878730654716492, -0.0676279366016388, -0.012455040588974953, -0.00357303605414927, -0.006816952023655176, 0.01986881159245968, 0.03726072236895561, 0.1294374018907547, 0.02588522806763649, 0.010034618899226189, -0.06410887092351913, -0.05453081429004669, -0.00864859577268362, -0.04903549700975418, 0.03980429098010063, 0.011653107590973377, 0.008238845504820347, -0.07724976539611816, 0.008668438531458378, 0.04738471284508705, 0.02807674929499626, -0.06922324001789093, -0.021689437329769135, -0.07515771687030792, 0.02737516723573208, -0.04008688032627106, 0.06479521095752716, -0.013108142651617527, 0.067413829267025, -0.0071107735857367516, -0.0026798066683113575, -0.023218369111418724, -0.02016415074467659, 0.043731674551963806, 0.03421323746442795, -0.019891150295734406, 0.02095232717692852, 0.022535795345902443, -0.014132295735180378, 0.002092573558911681, 0.021800817921757698, -0.013353421352803707, -0.013755946420133114, -0.05759543180465698, -0.04543155059218407 ]
0.152245
never being able to swap out during node memory pressure. However, setting the eviction thresholds too high could result in the node running out of memory and invoking the OOM killer, which is not ideal either. To address this, it is recommended to set the kubelet's eviction thresholds to be slightly lower than the `vm.min\_free\_kbytes` value. This way, the node can start swapping before kubelet would start evicting Pods, allowing workloads to swap out unused data and preventing evictions from happening. On the other hand, since it is just slightly lower, kubelet is likely to start evicting Pods before the node runs out of memory, thus avoiding the OOM killer. The value of `vm.min\_free\_kbytes` can be determined by running the following command on the node: ```shell cat /proc/sys/vm/min\_free\_kbytes ``` ### Unutilized swap space Under the `LimitedSwap` behavior, the amount of swap available to a Pod is determined automatically, based on the proportion of the memory requested relative to the node's total memory (For more details, see the [section below](#how-is-the-swap-limit-being-determined-with-limitedswap)). This design means that usually there would be some portion of swap that will remain restricted for Kubernetes workloads. For example, since Kubernetes {{< skew currentVersion >}} does not permit swap use for Pods in the Guaranteed {{< glossary\_tooltip text="QoS class" term\_id="qos-class" >}}, the amount of swap that's proportional to the memory request for Guaranteed pods would remain unused by Kubernetes workloads. This behavior carries some risk in a situation where many pods are not eligible for swapping. On the other hand, it effectively keeps some system-reserved amount of swap memory that can be used by processes outside of Kubernetes' scope, such as system daemons and even kubelet itself. ## Good practice for using swap in a Kubernetes cluster ### Disable swap for system-critical daemons During the testing phase and based on user feedback, it was observed that the performance of system-critical daemons and services might degrade. This implies that system daemons, including the kubelet, could operate slower than usual. If this issue is encountered, it is advisable to configure the cgroup of the system slice to prevent swapping (i.e., set `memory.swap.max=0`). ### Protect system-critical daemons for I/O latency Swap can increase the I/O load on a node. When memory pressure causes the kernel to rapidly swap pages in and out, system-critical daemons and services that rely on I/O operations may experience performance degradation. To mitigate this, it is recommended for systemd users to prioritize the system slice in terms of I/O latency. For non-systemd users, setting up a dedicated cgroup for system daemons and processes and prioritizing I/O latency in the same way is advised. This can be achieved by setting `io.latency` for the system slice, thereby granting it higher I/O priority. See [cgroup's documentation](https://www.kernel.org/doc/Documentation/admin-guide/cgroup-v2.rst) for more info. ### Swap and control plane nodes The Kubernetes project recommends running control plane nodes without any swap space configured. The control plane primarily hosts Guaranteed QoS Pods, so swap can generally be disabled. The main concern is that swapping critical services on the control plane could negatively impact performance. ### Use of a dedicated disk for swap The Kubernetes project recommends using encrypted swap, whenever you run nodes with swap enabled. If swap resides on a partition or the root filesystem, workloads may interfere with system processes that need to write to disk. When they share the same disk, processes can overwhelm swap, disrupting the I/O of kubelet, container runtime, and systemd, which would impact other workloads. Since swap space is located on a disk, it is crucial to ensure the disk is fast enough for the intended use cases. Alternatively, one
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.038915056735277176, 0.04484201967716217, 0.04213084653019905, 0.04745946452021599, -0.035551153123378754, -0.014641192741692066, -0.0024779189843684435, 0.05124063417315483, 0.08794207870960236, 0.04205654188990593, -0.017776042222976685, 0.008441650308668613, -0.038315482437610626, -0.12836496531963348, 0.010571159422397614, 0.06357839703559875, 0.0036635790020227432, 0.07348040491342545, -0.030275579541921616, 0.05045647174119949, 0.00917081255465746, -0.039830490946769714, 0.018658671528100967, -0.007985112257301807, -0.017670754343271255, -0.023296386003494263, -0.01284383237361908, 0.026895126327872276, 0.06412295997142792, -0.11656630039215088, -0.057583924382925034, 0.0305376835167408, -0.049589939415454865, 0.05042866989970207, 0.08534535020589828, 0.0878325030207634, -0.024942070245742798, -0.11442673951387405, -0.11618438363075256, 0.02918744832277298, 0.04078225418925285, 0.03856587037444115, -0.14944837987422943, 0.06853698939085007, -0.03766828775405884, 0.10729885846376419, -0.014748523943126202, -0.03612535819411278, -0.022134365513920784, -0.06996866315603256, 0.023893259465694427, -0.04430636763572693, 0.06315220892429352, 0.06091710180044174, 0.015919279307127, 0.031788699328899384, 0.029183808714151382, -0.024618545547127724, 0.07903290539979935, 0.027018392458558083, -0.0016487023094668984, 0.02396354265511036, 0.04348967969417572, -0.0003097003500442952, -0.020139414817094803, -0.0005737466854043305, 0.09350382536649704, -0.011175633408129215, -0.027287520468235016, 0.03815937042236328, 0.04482966661453247, -0.016713617369532585, -0.012422170490026474, 0.0026160103734582663, 0.03700026124715805, -0.0217873677611351, -0.03621092811226845, -0.022996148094534874, -0.009716829285025597, -0.040085285902023315, 0.011834236793220043, 0.017812885344028473, 0.036461688578128815, -0.06739859282970428, -0.07976408302783966, -0.03237062692642212, -0.024143056944012642, -0.04790865629911423, 0.039399709552526474, 0.02788056805729866, 0.004633777774870396, 0.005403758026659489, 0.008917451836168766, -0.08829665929079056, 0.09208633005619049, -0.023579489439725876, 0.06749218702316284, 0.02177364192903042, -0.02890920825302601, -0.021980110555887222, 0.04349881038069725, 0.08966013044118881, -0.024236498400568962, 0.04114164412021637, 0.10295664519071579, -0.05064179375767708, 0.039636313915252686, -0.03393874317407608, -0.021103981882333755, 0.03769245743751526, 0.05289866775274277, 0.06320226937532425, 0.0320100300014019, 0.025161707773804665, -0.008963927626609802, 0.014473863877356052, -0.025527533143758774, 0.006954760756343603, -0.026464153081178665, 0.07980240881443024, 0.020422425121068954, -0.06336650997400284, -0.09415658563375473, 0.029226934537291527, -0.13392360508441925, -0.003103582886978984, -0.03940516337752342, 4.077826269858994e-33, 0.058276910334825516, -0.08921140432357788, 0.01720411889255047, -0.06651802361011505, -0.02970815636217594, -0.05998142063617706, -0.061537258327007294, -0.025460464879870415, -0.07609359920024872, -0.030215835198760033, -0.08561540395021439, -0.0948871448636055, -0.004186633042991161, -0.01546283159404993, 0.0685100108385086, -0.0720716118812561, -0.06347468495368958, 0.03197788447141647, 0.07220876961946487, -0.05613319203257561, 0.04836200177669525, -0.039170753210783005, -0.0018527323845773935, 0.023136798292398453, -0.04897628352046013, -0.0006361562991514802, 0.026889411732554436, -0.11283547431230545, -0.006226133089512587, 0.00878953468054533, -0.05536771938204765, 0.06917445361614227, -0.012819736264646053, 0.05843845009803772, -0.1392226219177246, 0.027850259095430374, -0.047862887382507324, -0.041777946054935455, -0.03448640555143356, -0.06790502369403839, -0.03402559831738472, 0.05341966450214386, 0.04246963933110237, -0.09776109457015991, 0.028596073389053345, -0.10489454120397568, 0.07865156978368759, -0.032685086131095886, -0.031264275312423706, 0.08889221400022507, -0.0248121190816164, 0.012905876152217388, -0.021747156977653503, 0.07714299112558365, 0.05470215156674385, 0.03058963268995285, 0.1055159792304039, -0.06102481484413147, -0.030144214630126953, 0.10257663577795029, -0.019615627825260162, -0.0013685148442164063, 0.0653466284275055, 0.017836792394518852, 0.038204800337553024, 0.07984884828329086, -0.03223644942045212, 0.0089708948507905, -0.07111195474863052, 0.01063214335590601, -0.05509420484304428, -0.0031501881312578917, -0.03800665959715843, -0.007985465228557587, -0.10105151683092117, -0.007306295912712812, 0.020363561809062958, -0.03517252951860428, -0.16291718184947968, -0.0255203228443861, 0.08076410740613937, -0.04317660629749298, 0.05209269002079964, 0.01676594838500023, -0.007350255269557238, -0.053480364382267, 0.05490294471383095, 0.03282026946544647, -0.0856529101729393, 0.09770049154758453, 0.08936244994401932, -0.04561326652765274, -0.042414095252752304, -0.03110221028327942, -0.09939000755548477, -4.391431632269072e-33, 0.027452167123556137, 0.005792341195046902, -0.007181485183537006, 0.059047944843769073, 0.0037248441949486732, 0.0004999196389690042, -0.055687159299850464, 0.051391296088695526, -0.0818575918674469, -0.04900721088051796, -0.08316478133201599, -0.032243259251117706, 0.013881056569516659, 0.0317247100174427, -0.026696108281612396, -0.012223880738019943, -0.04437669366598129, 0.0027681307401508093, -0.004242576193064451, 0.06060038134455681, -0.03116319328546524, 0.054622795432806015, 0.030996445566415787, 0.021426932886242867, -0.015804806724190712, 0.006799712311476469, 0.00012137318844906986, 0.037513189017772675, -0.05420991778373718, -0.030610252171754837, 0.029686929658055305, -0.024912308901548386, -0.03431309387087822, 0.07663112133741379, 0.07052285969257355, -0.04520545154809952, -0.01857129856944084, 0.05252919718623161, 0.018943816423416138, 0.03967588394880295, 0.02359035238623619, 0.07126066833734512, -0.060654036700725555, -0.05514022335410118, 0.002494087442755699, 0.06443198770284653, -0.07898495346307755, -0.013951655477285385, 0.09094389528036118, -0.04487098380923271, -0.002394936280325055, 0.008386923931539059, 0.017271066084504128, 0.10191924124956131, -0.02056749351322651, -0.06154375895857811, 0.011281730607151985, 0.051408521831035614, -0.003805025015026331, -0.046795714646577835, 0.06930946558713913, -0.03836572915315628, 0.04712870717048645, -0.10361046344041824, 0.019572246819734573, -0.02599802054464817, 0.034213241189718246, -0.011454752646386623, 0.015234564431011677, 0.003429263364523649, 0.03134733811020851, 0.04370689392089844, 0.022232068702578545, -0.027239607647061348, -0.011060197837650776, 0.04112445190548897, 0.016437266021966934, -0.010066313669085503, 0.04966410622000694, -0.03326539695262909, -0.1046464741230011, 0.053337063640356064, -0.00869169645011425, 0.08750589936971664, -0.044329624623060226, 0.04845176264643669, 0.0167950801551342, 0.031070241704583168, 0.04994837939739227, 0.03284420818090439, -0.019628936424851418, -0.04166986048221588, -0.04004161059856415, 0.049351248890161514, 0.0008544084848836064, -4.4858076364562294e-8, 0.07473408430814743, -0.05956730246543884, 0.006038532126694918, 0.08688133955001831, 0.06155345216393471, -0.06975799798965454, 0.033002883195877075, 0.06740502268075943, -0.0355292409658432, 0.056092437356710434, 0.04223797470331192, 0.06970460712909698, 0.013234344311058521, -0.029354194179177284, 0.05441800504922867, 0.007105335593223572, -0.008110279217362404, 0.03975658118724823, 0.010777047835290432, -0.03729642555117607, -0.08476506918668747, -0.04639087989926338, 0.031547147780656815, 0.062456030398607254, 0.058903198689222336, -0.0000354978401446715, 0.10565339028835297, 0.017483100295066833, 0.029767092317342758, -0.05211789160966873, -0.030787289142608643, -0.01114941667765379, -0.04432598873972893, 0.026924625039100647, -0.016573548316955566, 0.07060901820659637, -0.0850922018289566, 0.05418294668197632, 0.033978864550590515, 0.04105481132864952, -0.06562818586826324, -0.05789618194103241, -0.03414582088589668, 0.024124419316649437, -0.06367617100477219, 0.05769544839859009, -0.031330592930316925, 0.08219285309314728, -0.002141481963917613, -0.010017543099820614, -0.0095968097448349, -0.013756820000708103, -0.014370065182447433, 0.041701704263687134, -0.03172491863369942, 0.011684323661029339, -0.018072282895445824, -0.018728522583842278, -0.0011140198912471533, 0.015094264410436153, 0.002107303123921156, -0.024562938138842583, -0.04544992372393608, -0.028699401766061783 ]
0.129292
disk. When they share the same disk, processes can overwhelm swap, disrupting the I/O of kubelet, container runtime, and systemd, which would impact other workloads. Since swap space is located on a disk, it is crucial to ensure the disk is fast enough for the intended use cases. Alternatively, one can configure I/O priorities between different mapped areas of a single backing device. ### Swap-aware scheduling Kubernetes {{< skew currentVersion >}} does not support allocating Pods to nodes in a way that accounts for swap memory usage. The scheduler typically uses \_requests\_ for infrastructure resources to guide Pod placement, and Pods do not request swap space; they just request `memory`. This means that the scheduler does not consider swap memory when making scheduling decisions. While this is something we are actively working on, it is not yet implemented. In order for administrators to ensure that Pods are not scheduled on nodes with swap memory unless they are specifically intended to use it, Administrators can taint nodes with swap available to protect against this problem. Taints will ensure that workloads which tolerate swap will not spill onto nodes without swap under load. ### Selecting storage for optimal performance The storage device designated for swap space is critical to maintaining system responsiveness during high memory usage. Rotational hard disk drives (HDDs) are ill-suited for this task as their mechanical nature introduces significant latency, leading to severe performance degradation and system thrashing. For modern performance needs, a device such as a Solid State Drive (SSD) is probably the appropriate choice for swap, as its low-latency electronic access minimizes the slowdown. ## Swap behavior details ### How is the swap limit being determined with LimitedSwap? The configuration of swap memory, including its limitations, presents a significant challenge. Not only is it prone to misconfiguration, but as a system-level property, any misconfiguration could potentially compromise the entire node rather than just a specific workload. To mitigate this risk and ensure the health of the node, we have implemented Swap with automatic configuration of limitations. With `LimitedSwap`, Pods that do not fall under the Burstable QoS classification (i.e. `BestEffort`/`Guaranteed` QoS Pods) are prohibited from utilizing swap memory. `BestEffort` QoS Pods exhibit unpredictable memory consumption patterns and lack information regarding their memory usage, making it difficult to determine a safe allocation of swap memory. Conversely, `Guaranteed` QoS Pods are typically employed for applications that rely on the precise allocation of resources specified by the workload, with memory being immediately available. To maintain the aforementioned security and node health guarantees, these Pods are not permitted to use swap memory when `LimitedSwap` is in effect. In addition, high-priority pods are not permitted to use swap in order to ensure the memory they consume always residents on disk, hence ready to use. Prior to detailing the calculation of the swap limit, it is necessary to define the following terms: \* `nodeTotalMemory`: The total amount of physical memory available on the node. \* `totalPodsSwapAvailable`: The total amount of swap memory on the node that is available for use by Pods (some swap memory may be reserved for system use). \* `containerMemoryRequest`: The container's memory request. Swap limitation is configured as: ( `containerMemoryRequest` / `nodeTotalMemory` ) Γ— `totalPodsSwapAvailable` In other words, the amount of swap that a container is able to use is proportionate to its memory request, the node's total physical memory and the total amount of swap memory on the node that is available for use by Pods. It is important to note that, for containers within Burstable QoS Pods, it is possible to opt-out of swap usage by specifying
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.013123642653226852, 0.010053159669041634, 0.08981841802597046, 0.007475430145859718, -0.02805415354669094, -0.009891781955957413, -0.03095032460987568, 0.001325300196185708, 0.1115773469209671, 0.04712212458252907, -0.05712222307920456, 0.04905632883310318, -0.009021119214594364, -0.052252259105443954, -0.005407864227890968, -0.005343276541680098, 0.00625451048836112, 0.02891959436237812, -0.03411716967821121, 0.01894201710820198, 0.002460808027535677, -0.04306771233677864, -0.005190144293010235, 0.052438441663980484, -0.021291902288794518, -0.00780763104557991, -0.017067471519112587, -0.027414556592702866, 0.007914844900369644, -0.04652932658791542, -0.06798725575208664, 0.010245070792734623, -0.017511676996946335, 0.031871479004621506, 0.041239943355321884, 0.05255386233329773, -0.04027336463332176, -0.06624183803796768, -0.051142606884241104, 0.023743029683828354, 0.03915291652083397, -0.018732430413365364, -0.07608407735824585, 0.03894557058811188, -0.0683274120092392, 0.05020447075366974, -0.02488873340189457, -0.08524073660373688, -0.03401811793446541, -0.022368265315890312, 0.049258727580308914, -0.06989312171936035, 0.08851213753223419, 0.08395708352327347, 0.051348160952329636, 0.07605588436126709, 0.03140471503138542, 0.018442703410983086, 0.12894083559513092, 0.03773956000804901, 0.004290680401027203, -0.03478271886706352, 0.0749799907207489, -0.028375105932354927, 0.005235386546701193, -0.049314893782138824, 0.06739777326583862, 0.019248701632022858, -0.030549535527825356, -0.047753047198057175, 0.07237854599952698, 0.008161013945937157, 0.01963191106915474, 0.03578869253396988, 0.012918761931359768, -0.017921531572937965, 0.005305455531924963, 0.038060057908296585, -0.014166994020342827, -0.05105052888393402, -0.014699326828122139, 0.05600608512759209, 0.0643506720662117, -0.07299105823040009, -0.05280021205544472, -0.028712250292301178, -0.037027567625045776, -0.04082150384783745, 0.03485850617289543, -0.01994311809539795, 0.050067294389009476, 0.039098139852285385, 0.028265273198485374, -0.1339365541934967, 0.07050712406635284, 0.02343066968023777, 0.027204101905226707, 0.03977394476532936, 0.03164983540773392, -0.013116003945469856, 0.0410793274641037, 0.027002228423953056, 0.04057450592517853, 0.025445323437452316, 0.08141449838876724, -0.07856722921133041, -0.016002189368009567, -0.07052937895059586, -0.027167780324816704, 0.0078115989454090595, 0.05081005021929741, 0.06896879523992538, -0.012209790758788586, 0.07734832912683487, -0.010247956961393356, -0.018066158518195152, 0.027979504317045212, -0.0233876071870327, 0.019061803817749023, 0.03877149522304535, -0.012969350442290306, -0.08715179562568665, 0.0035362709313631058, 0.034165333956480026, -0.061450351029634476, 0.0219284575432539, -0.02807936631143093, 6.892245170449609e-33, -0.0031434055417776108, -0.07656985521316528, 0.008579559624195099, -0.08193694055080414, -0.017256123945116997, -0.11140421777963638, -0.07817956805229187, 0.004924139007925987, -0.027270041406154633, -0.07751908153295517, -0.07951001077890396, 0.05711879953742027, 0.01569470390677452, -0.017094822600483894, 0.048311423510313034, -0.00427590636536479, -0.08521834015846252, 0.02401929907500744, 0.11538923531770706, -0.07297185063362122, 0.03599867597222328, -0.05499325320124626, -0.04608658328652382, 0.025763889774680138, -0.04353022575378418, -0.062031928449869156, 0.04701462388038635, -0.15855064988136292, 0.014140920713543892, 0.000022505941160488874, -0.045981183648109436, 0.014328580349683762, 0.03202478587627411, 0.055626049637794495, -0.07744218409061432, 0.012689277529716492, -0.053519461303949356, 0.012699555605649948, -0.07601448893547058, -0.04279148206114769, 0.017597535625100136, -0.0003059520968236029, 0.04440273717045784, -0.08636633306741714, 0.0832267627120018, -0.046112511307001114, 0.07048553973436356, -0.05257441848516464, -0.013615607284009457, 0.09266340732574463, 0.015980971977114677, -0.0025461590848863125, 0.024297140538692474, 0.019275957718491554, 0.0681101605296135, 0.02015923522412777, 0.11769460886716843, -0.11476849019527435, 0.0068499138578772545, 0.10254304111003876, -0.03716374561190605, -0.016388747841119766, 0.015715450048446655, 0.031219569966197014, -0.008287065662443638, 0.03623974323272705, 0.04174629598855972, 0.05273255333304405, -0.020177602767944336, -0.0007675061351619661, -0.033072300255298615, -0.02688598446547985, -0.05153653025627136, 0.0384831577539444, -0.06723248213529587, -0.005507657770067453, -0.0254888366907835, 0.04794260486960411, -0.14876899123191833, -0.0021406051237136126, 0.010126356966793537, -0.049465831369161606, -0.03430074453353882, 0.036665841937065125, -0.047160521149635315, -0.029734313488006592, 0.021559622138738632, -0.0003736332873813808, -0.01961175724864006, 0.07702456414699554, 0.06903884559869766, -0.05159945785999298, -0.02883845753967762, 0.03655277565121651, -0.08218502998352051, -6.797924238423598e-33, 0.052280962467193604, -0.026573846116662025, 0.011130874045193195, 0.0504167377948761, 0.026125909760594368, 0.013062904588878155, -0.016598965972661972, -0.037281956523656845, -0.019250299781560898, -0.06600960344076157, -0.11913234740495682, -0.04746756702661514, -0.004430737812072039, 0.04268393665552139, -0.039330147206783295, 0.01131775788962841, -0.017785891890525818, -0.016027433797717094, -0.03453381359577179, 0.04846906289458275, 0.007406615652143955, 0.054283469915390015, 0.04079122468829155, 0.017549945041537285, 0.006459311582148075, 0.033037103712558746, -0.009044178761541843, 0.03981231525540352, -0.04500669986009598, -0.01719425432384014, -0.01062009483575821, -0.15388403832912445, 0.04117043316364288, -0.005184924229979515, 0.06111333146691322, -0.04307074099779129, -0.06976988166570663, 0.07086090743541718, -0.005927869584411383, 0.021844161674380302, 0.05243595689535141, -0.013725608587265015, -0.07592898607254028, -0.0189349465072155, -0.043503183871507645, 0.06904934346675873, -0.10277719050645828, -0.00897594541311264, 0.010474735870957375, -0.05032998323440552, -0.009161176159977913, 0.023509670048952103, -0.02261737920343876, 0.039838727563619614, -0.009694201871752739, -0.038511790335178375, 0.01864919811487198, 0.07522279024124146, -0.022419501096010208, 0.0362493135035038, 0.10051029920578003, -0.08210182934999466, 0.018550032749772072, -0.06238364800810814, -0.0352519191801548, -0.03494646027684212, 0.034481149166822433, -0.06569691002368927, -0.014082377776503563, 0.04995469003915787, 0.05141753330826759, -0.0320495143532753, 0.026499463245272636, -0.001547694206237793, -0.061193935573101044, 0.00910936389118433, 0.08155158162117004, -0.010798435658216476, 0.05034426972270012, -0.003433699021115899, -0.11229420453310013, 0.0466582290828228, -0.01537977997213602, 0.017931001260876656, -0.08068107068538666, 0.06633605062961578, 0.07025586068630219, 0.007996145635843277, 0.026472460478544235, -0.014404245652258396, 0.01865939050912857, -0.025385595858097076, -0.05546183884143829, 0.07369544357061386, 0.015985172241926193, -5.212231002360568e-8, 0.1207679808139801, 0.01120541151612997, 0.02194792591035366, 0.06965561211109161, 0.01348601933568716, -0.1610061526298523, 0.07819916307926178, 0.03474004939198494, -0.03128587827086449, 0.12140548229217529, 0.0565919429063797, 0.06148223578929901, -0.016244545578956604, -0.047778964042663574, 0.09363473206758499, 0.06025072559714317, -0.009706043638288975, 0.042809776961803436, -0.026406792923808098, -0.07171981036663055, -0.07371433079242706, -0.02984505146741867, 0.017914503812789917, 0.011596395634114742, 0.012104510329663754, 0.05742562934756279, 0.072450190782547, 0.030808649957180023, 0.0641285851597786, -0.00434534065425396, -0.016490861773490906, -0.00515261385589838, -0.08413726091384888, 0.061541568487882614, -0.010891485027968884, 0.00983914453536272, -0.1360195130109787, 0.0166996531188488, 0.03993556648492813, 0.0758843794465065, -0.061074480414390564, -0.05608543008565903, -0.054531775414943695, 0.014483132399618626, -0.012428874149918556, 0.07373299449682236, -0.0782817006111145, 0.062046099454164505, -0.019509555771946907, 0.02951214276254177, -0.024930760264396667, -0.04573898762464523, 0.019496915861964226, 0.0971144437789917, -0.008130859583616257, 0.03152710199356079, 0.022583458572626114, -0.047275904566049576, -0.015063776634633541, 0.027068234980106354, -0.003299245610833168, 0.0036373918410390615, -0.06013856083154678, -0.020832188427448273 ]
0.158891
is proportionate to its memory request, the node's total physical memory and the total amount of swap memory on the node that is available for use by Pods. It is important to note that, for containers within Burstable QoS Pods, it is possible to opt-out of swap usage by specifying memory requests that are equal to memory limits. Containers configured in this manner will not have access to swap memory. ## {{% heading "whatsnext" %}} - To learn about managing swap on Linux nodes, read [configuring swap memory on Kubernetes nodes](/docs/tutorials/cluster-management/provision-swap-memory/). - You can check out a [blog post about Kubernetes and swap](/blog/2025/03/25/swap-linux-improvements/) - For background information, please see the original KEP, [KEP-2400](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2400-node-swap), and its [design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2400-node-swap/README.md).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/swap-memory-management.md
[ 0.049990445375442505, 0.03672480583190918, 0.016571862623095512, 0.020202064886689186, -0.044917840510606766, 0.04024611786007881, 0.0043982514180243015, 0.06049945577979088, 0.05331701412796974, 0.06369142979383469, -0.04713506996631622, 0.04917412996292114, -0.018930507823824883, -0.09028385579586029, -0.004294318612664938, 0.0455542616546154, 0.01845567300915718, 0.05586135759949684, 0.032511282712221146, -0.028186993673443794, 0.008853976614773273, -0.05933861434459686, -0.01468181423842907, 0.0000364082952728495, -0.013461473397910595, 0.052304934710264206, -0.018899274989962578, -0.010585126467049122, 0.02354189194738865, -0.06001835688948631, -0.07821137458086014, 0.059050217270851135, -0.041551701724529266, 0.013933474197983742, 0.03688788414001465, 0.09864827990531921, -0.07160481065511703, -0.09484995156526566, -0.03663424775004387, 0.018254157155752182, 0.06556202471256256, -0.011990206316113472, -0.07634996622800827, 0.05074277147650719, 0.01937493495643139, 0.11295133829116821, -0.048802055418491364, 0.0022843037731945515, -0.02723671868443489, -0.036440443247556686, 0.0336003340780735, -0.016275206580758095, 0.07773853093385696, 0.09909453988075256, 0.01704534888267517, 0.06254076957702637, -0.004345915280282497, 0.0036035107914358377, 0.11091489344835281, 0.03084133006632328, 0.0014476438518613577, -0.01891648955643177, 0.07058066874742508, -0.008281141519546509, -0.02770419605076313, -0.040408141911029816, 0.062228407710790634, -0.017138229683041573, 0.00923595204949379, -0.04118653014302254, 0.06435547769069672, 0.012883980758488178, 0.040298476815223694, -0.017168251797556877, -0.022424204275012016, -0.022838326171040535, 0.023418178781867027, 0.012607057578861713, -0.044142238795757294, 0.018978429958224297, 0.03661899268627167, 0.03971248120069504, 0.055327095091342926, -0.09452454745769501, -0.06620070338249207, 0.003829564666375518, -0.015814751386642456, -0.04904652759432793, -0.05313849449157715, -0.0454760380089283, 0.011961802840232849, 0.008914384990930557, -0.010535303503274918, -0.14794139564037323, 0.07860952615737915, 0.045399848371744156, -0.030435776337981224, -0.00831818487495184, 0.029873233288526535, -0.04814555495977402, 0.07043419033288956, 0.047093912959098816, 0.035513490438461304, -0.002464798977598548, 0.06744205206632614, -0.06360267102718353, 0.009095514193177223, -0.012623962014913559, 0.005542398896068335, 0.05536266043782234, 0.01933138072490692, 0.09822726249694824, -0.02140633948147297, 0.04593537002801895, 0.02938760444521904, -0.014665905386209488, 0.027412572875618935, -0.06875182688236237, 0.018038125708699226, 0.060593441128730774, 0.03050524927675724, -0.06212799623608589, -0.04655248671770096, 0.037621889263391495, -0.12046726047992706, 0.02154100500047207, -0.08313480764627457, 2.2321357535298797e-33, -0.013735713437199593, -0.04217866063117981, -0.0017114694928750396, -0.056219350546598434, 0.023629959672689438, -0.07293316721916199, -0.032266199588775635, -0.04459356516599655, -0.07456310838460922, -0.06281116604804993, -0.10238612443208694, -0.008837752044200897, 0.02491854317486286, -0.012146612629294395, 0.013316202908754349, -0.04647400602698326, -0.08726882189512253, 0.00936423521488905, 0.10487279295921326, -0.07928196340799332, -0.007298526354134083, -0.04237281158566475, -0.020812533795833588, 0.08985255658626556, -0.04705353081226349, -0.01702417992055416, 0.037096958607435226, -0.10580677539110184, -0.01802729070186615, -0.02290874719619751, -0.07703378796577454, 0.023202544078230858, -0.0033766834530979395, 0.008140109479427338, -0.06154578551650047, -0.01973782479763031, -0.016198735684156418, -0.03573082759976387, -0.0461728572845459, -0.047443926334381104, -0.014426114968955517, 0.030292673036456108, 0.05560653656721115, -0.11919029802083969, 0.012446689419448376, -0.03628776967525482, 0.07342308759689331, -0.07703384011983871, 0.011139840818941593, 0.08834816515445709, 0.03505285084247589, -0.05812302231788635, -0.005330207757651806, 0.03604627400636673, 0.10318726301193237, 0.04929552599787712, 0.08862268924713135, -0.03364209458231926, -0.005481702741235495, 0.10739511996507645, -0.03202124685049057, -0.04765307530760765, 0.014624252915382385, -0.00403231754899025, 0.0022545610554516315, 0.07444224506616592, 0.02426046133041382, 0.10580477863550186, -0.042638082057237625, -0.0025551265571266413, -0.041934508830308914, 0.006765762344002724, -0.0029057415667921305, 0.07267779856920242, -0.07587826997041702, 0.004680225625634193, 0.026669630780816078, 0.02000359632074833, -0.09109720587730408, 0.04356186464428902, 0.03662501275539398, -0.04740111902356148, -0.0021514794789254665, 0.05001560598611832, -0.018133295699954033, -0.04758484289050102, 0.07219760864973068, -0.020221134647727013, -0.007894450798630714, 0.08427677303552628, 0.07187576591968536, -0.009633439593017101, -0.02082928456366062, -0.01775209605693817, -0.12779691815376282, -3.001354461124022e-33, 0.05849344655871391, 0.05312234163284302, -0.03726516291499138, 0.06486784666776657, 0.003614653367549181, -0.026164356619119644, -0.016155090183019638, 0.043615978211164474, -0.01572463847696781, -0.08265289664268494, -0.06787601113319397, -0.00954694114625454, 0.03415371850132942, 0.0412309430539608, -0.09088261425495148, -0.0280515905469656, -0.012302028946578503, -0.03764031082391739, -0.024905769154429436, 0.03294628858566284, 0.012313805520534515, 0.03281741216778755, 0.06758428364992142, -0.02597225084900856, -0.028961366042494774, 0.029857730492949486, 0.017009694129228592, 0.031546175479888916, -0.044677793979644775, -0.055146120488643646, 0.008762558922171593, -0.12827394902706146, 0.005275802221149206, 0.07759612053632736, 0.07753298431634903, -0.07692121714353561, -0.018522555008530617, 0.039927590638399124, 0.037934042513370514, 0.008297829888761044, 0.04627622663974762, 0.00426512723788619, -0.08075272291898727, -0.013760915957391262, -0.04348614439368248, 0.04264456406235695, -0.0649385154247284, -0.03295658901333809, 0.037154871970415115, -0.061735767871141434, -0.021682580932974815, 0.03248894587159157, -0.06874863058328629, 0.09026063978672028, -0.053330469876527786, -0.08576948195695877, 0.0060403612442314625, 0.133077472448349, 0.005417643114924431, 0.006200173404067755, 0.07905522733926773, -0.07756835967302322, -0.025579489767551422, -0.08904718607664108, 0.03172723576426506, -0.07159487158060074, -0.03048214688897133, -0.08440297842025757, -0.041706886142492294, 0.06126154959201813, 0.04153302311897278, 0.01871708780527115, 0.023958556354045868, 0.010983998887240887, -0.047912389039993286, -0.028725020587444305, 0.031032882630825043, -0.017316559329628944, 0.11176557838916779, -0.044564370065927505, -0.0907636508345604, 0.06334802508354187, -0.05286013334989548, 0.0482807494699955, -0.04639096558094025, 0.06625303626060486, 0.03164149820804596, 0.02669091522693634, 0.011896371841430664, -0.02209789864718914, -0.012501653283834457, -0.02262836880981922, -0.0554308257997036, 0.05082275718450546, -0.03079846315085888, -4.648957485642313e-8, 0.06818655878305435, -0.000196338864043355, -0.013791789300739765, 0.055352833122015, 0.039567332714796066, -0.07078998535871506, 0.056878138333559036, 0.09005104005336761, -0.0263654962182045, 0.08784125000238419, 0.03670189902186394, 0.05634481459856033, -0.04301033541560173, -0.04178021103143692, 0.0792614221572876, 0.03841204196214676, -0.0034776257816702127, 0.027768440544605255, 0.03687810152769089, -0.02901696227490902, -0.05665332078933716, 0.0004495984176173806, 0.012976452708244324, 0.029111148789525032, 0.01620999351143837, 0.021274518221616745, 0.13263250887393951, 0.04795564338564873, -0.004496200941503048, -0.06231450289487839, -0.034751616418361664, -0.011105768382549286, -0.06216131150722504, 0.052749376744031906, 0.02542155422270298, 0.036377888172864914, -0.114503413438797, 0.041527602821588516, 0.063436359167099, 0.052830033004283905, -0.07992597669363022, -0.06714867055416107, -0.03365973383188248, 0.025603966787457466, -0.07972042262554169, 0.09459130465984344, -0.03227898105978966, 0.0736553817987442, -0.001822038902901113, 0.008365821093320847, 0.0130758723244071, -0.03866925090551376, 0.028324147686362267, 0.03142349794507027, -0.05437489598989487, 0.009844059124588966, 0.021545588970184326, -0.010111925192177296, 0.01197498943656683, 0.005830252543091774, -0.0022032808046787977, 0.01790894754230976, -0.027018938213586807, -0.017453135922551155 ]
0.193092
This page describes good practices when configuring a Kubernetes cluster utilizing Dynamic Resource Allocation (DRA). These instructions are for cluster administrators. ## Separate permissions to DRA related APIs DRA is orchestrated through a number of different APIs. Use authorization tools (like RBAC, or another solution) to control access to the right APIs depending on the persona of your user. In general, DeviceClasses and ResourceSlices should be restricted to admins and the DRA drivers. Cluster operators that will be deploying Pods with claims will need access to ResourceClaim and ResourceClaimTemplate APIs; both of these APIs are namespace scoped. ## DRA driver deployment and maintenance DRA drivers are third-party applications that run on each node of your cluster to interface with the hardware of that node and Kubernetes' native DRA components. The installation procedure depends on the driver you choose, but is likely deployed as a DaemonSet to all or a selection of the nodes (using node selectors or similar mechanisms) in your cluster. ### Use drivers with seamless upgrade if available DRA drivers implement the [`kubeletplugin` package interface](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin). Your driver may support \_seamless upgrades\_ by implementing a property of this interface that allows two versions of the same DRA driver to coexist for a short time. This is only available for kubelet versions 1.33 and above and may not be supported by your driver for heterogeneous clusters with attached nodes running older versions of Kubernetes - check your driver's documentation to be sure. If seamless upgrades are available for your situation, consider using it to minimize scheduling delays when your driver updates. If you cannot use seamless upgrades, during driver downtime for upgrades you may observe that: \* Pods cannot start unless the claims they depend on were already prepared for use. \* Cleanup after the last pod which used a claim gets delayed until the driver is available again. The pod is not marked as terminated. This prevents reusing the resources used by the pod for other pods. \* Running pods will continue to run. ### Confirm your DRA driver exposes a liveness probe and utilize it Your DRA driver likely implements a gRPC socket for healthchecks as part of DRA driver good practices. The easiest way to utilize this grpc socket is to configure it as a liveness probe for the DaemonSet deploying your DRA driver. Your driver's documentation or deployment tooling may already include this, but if you are building your configuration separately or not running your DRA driver as a Kubernetes pod, be sure that your orchestration tooling restarts the DRA driver on failed healthchecks to this grpc socket. Doing so will minimize any accidental downtime of the DRA driver and give it more opportunities to self heal, reducing scheduling delays or troubleshooting time. ### When draining a node, drain the DRA driver as late as possible The DRA driver is responsible for unpreparing any devices that were allocated to Pods, and if the DRA driver is {{< glossary\_tooltip text="drained" term\_id="drain" >}} before Pods with claims have been deleted, it will not be able to finalize its cleanup. If you implement custom drain logic for nodes, consider checking that there are no allocated/reserved ResourceClaim or ResourceClaimTemplates before terminating the DRA driver itself. ## Monitor and tune components for higher load, especially in high scale environments Control plane component {{< glossary\_tooltip text="kube-scheduler" term\_id="kube-scheduler" >}} and the internal ResourceClaim controller orchestrated by the component {{< glossary\_tooltip text="kube-controller-manager" term\_id="kube-controller-manager" >}} do the heavy lifting during scheduling of Pods with claims based on metadata stored in the DRA APIs. Compared to non-DRA scheduled Pods, the number of API server calls, memory,
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/dra.md
[ -0.02241925708949566, 0.0037694803904742002, 0.056574150919914246, -0.01695762202143669, -0.04808814823627472, 0.0027197927702218294, 0.014108498580753803, 0.025354182347655296, 0.026270266622304916, 0.03785832226276398, -0.038845743983983994, -0.052386220544576645, -0.024409832432866096, 0.005783908534795046, 0.03662513196468353, 0.0027465508319437504, 0.08467168360948563, 0.01941153220832348, -0.05115446448326111, 0.011872302740812302, 0.05207834020256996, -0.04093096777796745, -0.025164145976305008, 0.03678310662508011, -0.06539586186408997, 0.0020643649622797966, 0.03932305425405502, -0.012336594983935356, 0.042904794216156006, -0.018345361575484276, -0.04829169437289238, -0.03869546949863434, 0.021016789600253105, 0.0007354534463956952, 0.03584375977516174, 0.05727045610547066, 0.03709368407726288, -0.06779538840055466, -0.09975045174360275, 0.03840547427535057, 0.020830893889069557, -0.00976494699716568, -0.12567585706710815, -0.015282115899026394, 0.009662467055022717, -0.011653258465230465, -0.012622466310858727, 0.018822722136974335, 0.046640828251838684, -0.024954643100500107, 0.07403486222028732, -0.06561974436044693, 0.07373521476984024, 0.03786662966012955, 0.012506331317126751, 0.004483561031520367, 0.05342159792780876, 0.042924996465444565, 0.12468346208333969, 0.010143417865037918, 0.05622417479753494, -0.02585992030799389, 0.04408392682671547, -0.004377361387014389, -0.020049940794706345, -0.033150266855955124, 0.018327249214053154, -0.017977120354771614, 0.02126147411763668, -0.05003815516829491, 0.06465908885002136, -0.0010403157211840153, -0.0049057030119001865, -0.009169111028313637, 0.029978247359395027, 0.02689342200756073, -0.04163840785622597, 0.07038620859384537, 0.03345384821295738, -0.07726959139108658, 0.04793567955493927, 0.11172882467508316, 0.06695105880498886, -0.03007027879357338, -0.07779507339000702, 0.018588190898299217, -0.0598670169711113, -0.05174259468913078, 0.06618104130029678, 0.01950010098516941, 0.0546671524643898, -0.018574468791484833, 0.02219543606042862, -0.13298432528972626, 0.05561671033501625, -0.01896715722978115, -0.01631150394678116, -0.05299949273467064, 0.04019545391201973, -0.007977182976901531, 0.004259337205439806, -0.022535230964422226, -0.061323776841163635, -0.018848242238163948, 0.023157550022006035, -0.007852100767195225, -0.07506266981363297, -0.047051820904016495, 0.011640612035989761, 0.02632513828575611, 0.028248751536011696, 0.0660940632224083, -0.04961065202951431, 0.04156191274523735, -0.004708238877356052, 0.010562480427324772, -0.012467799708247185, -0.021892841905355453, 0.07385537773370743, -0.003750431817024946, -0.03318705037236214, -0.1251733899116516, 0.044268928468227386, 0.014873574487864971, 0.04333224892616272, 0.041389111429452896, -0.12308413535356522, 5.9862905722449184e-33, 0.043315339833498, -0.062257759273052216, -0.004095911514014006, 0.011904481798410416, 0.024050436913967133, -0.09364165365695953, -0.03866330906748772, -0.05203971266746521, -0.05232737213373184, -0.09408557415008545, -0.06379219144582748, 0.15033850073814392, -0.009564626961946487, -0.09824998676776886, 0.051102425903081894, -0.0011181934969499707, -0.030014049261808395, 0.04912590980529785, 0.13248202204704285, 0.017095930874347687, 0.03754767030477524, -0.09264473617076874, 0.03081485815346241, 0.026030808687210083, 0.04668546840548515, -0.012285590171813965, 0.033458348363637924, -0.05686640739440918, 0.06260896474123001, 0.020279262214899063, -0.07425212115049362, -0.05209062620997429, 0.06320872157812119, 0.05009523406624794, -0.15018200874328613, 0.018613742664456367, -0.090298593044281, 0.018667664378881454, -0.09707393497228622, 0.0010065585374832153, -0.012297938577830791, -0.047877877950668335, 0.005709521006792784, -0.09486366808414459, 0.04518011957406998, -0.04634031280875206, 0.04426005855202675, -0.049890924245119095, 0.045178696513175964, 0.06411353498697281, -0.06110444664955139, -0.0726214274764061, 0.09071909636259079, -0.05027265474200249, 0.06445891410112381, -0.02564622275531292, 0.0813041403889656, -0.08376263827085495, 0.023767298087477684, -0.00929685216397047, -0.02367066591978073, -0.008098429068922997, -0.01979822851717472, 0.03569846227765083, -0.008863159455358982, -0.013594514690339565, -0.032705798745155334, 0.055002935230731964, -0.02134140208363533, 0.017545998096466064, -0.021470414474606514, 0.018960770219564438, -0.03461313620209694, 0.03960917890071869, -0.0538172610104084, -0.08859602361917496, -0.031816549599170685, 0.12241803109645844, -0.14927314221858978, 0.06643199920654297, 0.023277785629034042, 0.00848739966750145, -0.05247403681278229, 0.09266140311956406, -0.040636803954839706, -0.026949191465973854, -0.013465208932757378, -0.0222637839615345, -0.06658780574798584, 0.042380668222904205, 0.02641155757009983, -0.024350987747311592, -0.013785190880298615, 0.05475954711437225, -0.047182854264974594, -7.709716268106076e-33, 0.08132833987474442, -0.011426214128732681, 0.06361615657806396, -0.018000634387135506, 0.03596276044845581, 0.0093421321362257, -0.068113774061203, 0.05296856909990311, 0.013948770239949226, -0.07248272746801376, -0.04448487237095833, -0.04652867838740349, -0.008238963782787323, 0.014792567119002342, -0.097259521484375, 0.023685676977038383, -0.04712904244661331, -0.023820219561457634, -0.031072497367858887, -0.013737289234995842, -0.03914329409599304, 0.024243628606200218, 0.07042831182479858, 0.004190413746982813, -0.017052335664629936, -0.029307542368769646, -0.03754284605383873, 0.06894680112600327, -0.0383174754679203, -0.029880184680223465, 0.0013412006665021181, -0.12243197858333588, -0.04738327115774155, -0.04374384880065918, -0.015696583315730095, -0.04192275553941727, -0.0493936762213707, 0.08533977717161179, 0.008925349451601505, 0.011308254674077034, 0.0779929831624031, -0.016162989661097527, -0.003545332234352827, 0.010928676463663578, -0.016698937863111496, 0.010428293608129025, -0.01004458125680685, -0.06382632255554199, -0.04227498546242714, -0.08224858343601227, -0.0054900371469557285, -0.026338405907154083, -0.007098352536559105, 0.08314651995897293, -0.06949139386415482, 0.05613270774483681, 0.09592214971780777, 0.1034560278058052, -0.025970323011279106, 0.06068117916584015, 0.09854065626859665, -0.11748361587524414, 0.039216168224811554, 0.05747893452644348, -0.1276005506515503, -0.07496291399002075, 0.04330039396882057, 0.008145413361489773, -0.04056558012962341, 0.08115585148334503, -0.002033991739153862, -0.04313753545284271, -0.01392077375203371, 0.028397124260663986, -0.06601894646883011, -0.0322711206972599, -0.008367941714823246, -0.035444676876068115, 0.03504587709903717, 0.02666112221777439, -0.05144106224179268, -0.01082262210547924, -0.03455748036503792, 0.03440823405981064, 0.0351993665099144, 0.05157117918133736, 0.12135819345712662, -0.012201926670968533, 0.05930708348751068, 0.10903728008270264, 0.0018891541985794902, -0.018694428727030754, -0.03901392221450806, 0.12066997587680817, -0.0366765521466732, -5.4988984032888766e-8, 0.07193413376808167, 0.016167020425200462, -0.024332666769623756, 0.009733895771205425, -0.005073988810181618, -0.0649980902671814, 0.009855984710156918, 0.0011387390550225973, -0.042170971632003784, 0.04007238894701004, 0.029120292514562607, 0.014655071310698986, -0.04640880227088928, -0.001258050906471908, 0.040561743080616, 0.05494585633277893, -0.010497680865228176, 0.06303359568119049, 0.005480901338160038, -0.07929067313671112, -0.04532646760344505, -0.06513263285160065, 0.03489801287651062, 0.027785208076238632, 0.01953773945569992, 0.05669798702001572, 0.04970088601112366, -0.03085845150053501, 0.016031233593821526, 0.004111063666641712, -0.07232212275266647, 0.027598178014159203, -0.058562569320201874, 0.07320886850357056, -0.013540848158299923, -0.018542610108852386, -0.10881677269935608, 0.04091361165046692, 0.013481599278748035, 0.04988262802362442, -0.03812494874000549, 0.010493180714547634, -0.020361650735139847, -0.0005342582589946687, 0.0006891453522257507, 0.06446515023708344, 0.004815146327018738, 0.03176504746079445, -0.010389411821961403, 0.034609150141477585, 0.010323268361389637, -0.046418771147727966, -0.02519102394580841, 0.09360231459140778, -0.016190294176340103, 0.016483711078763008, -0.028233515098690987, -0.022762218490242958, 0.010122306644916534, 0.026068447157740593, -0.011135507375001907, 0.03094266913831234, 0.021037064492702484, -0.019366808235645294 ]
0.191057
component {{< glossary\_tooltip text="kube-scheduler" term\_id="kube-scheduler" >}} and the internal ResourceClaim controller orchestrated by the component {{< glossary\_tooltip text="kube-controller-manager" term\_id="kube-controller-manager" >}} do the heavy lifting during scheduling of Pods with claims based on metadata stored in the DRA APIs. Compared to non-DRA scheduled Pods, the number of API server calls, memory, and CPU utilization needed by these components is increased for Pods using DRA claims. In addition, node local components like the DRA driver and kubelet utilize DRA APIs to allocated the hardware request at Pod sandbox creation time. Especially in high scale environments where clusters have many nodes, and/or deploy many workloads that heavily utilize DRA defined resource claims, the cluster administrator should configure the relevant components to anticipate the increased load. The effects of mistuned components can have direct or snowballing affects causing different symptoms during the Pod lifecycle. If the `kube-scheduler` component's QPS and burst configurations are too low, the scheduler might quickly identify a suitable node for a Pod but take longer to bind the Pod to that node. With DRA, during Pod scheduling, the QPS and Burst parameters in the client-go configuration within `kube-controller-manager` are critical. The specific values to tune your cluster to depend on a variety of factors like number of nodes/pods, rate of pod creation, churn, even in non-DRA environments; see the [SIG Scalability README on Kubernetes scalability thresholds](https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md) for more information. In scale tests performed against a DRA enabled cluster with 100 nodes, involving 720 long-lived pods (90% saturation) and 80 churn pods (10% churn, 10 times), with a job creation QPS of 10, `kube-controller-manager` QPS could be set to as low as 75 and Burst to 150 to meet equivalent metric targets for non-DRA deployments. At this lower bound, it was observed that the client side rate limiter was triggered enough to protect the API server from explosive burst but was high enough that pod startup SLOs were not impacted. While this is a good starting point, you can get a better idea of how to tune the different components that have the biggest effect on DRA performance for your deployment by monitoring the following metrics. For more information on all the stable metrics in Kubernetes, see the [Kubernetes Metrics Reference](/docs/reference/generated/metrics/). ### `kube-controller-manager` metrics The following metrics look closely at the internal ResourceClaim controller managed by the `kube-controller-manager` component. \* Workqueue Add Rate: Monitor {{< highlight promql "hl\_inline=true" >}} sum(rate(workqueue\_adds\_total{name="resource\_claim"}[5m])) {{< /highlight >}} to gauge how quickly items are added to the ResourceClaim controller. \* Workqueue Depth: Track {{< highlight promql "hl\_inline=true" >}}sum(workqueue\_depth{endpoint="kube-controller-manager", name="resource\_claim"}){{< /highlight >}} to identify any backlogs in the ResourceClaim controller. \* Workqueue Work Duration: Observe {{< highlight promql "hl\_inline=true">}}histogram\_quantile(0.99, sum(rate(workqueue\_work\_duration\_seconds\_bucket{name="resource\_claim"}[5m])) by (le)){{< /highlight >}} to understand the speed at which the ResourceClaim controller processes work. If you are experiencing low Workqueue Add Rate, high Workqueue Depth, and/or high Workqueue Work Duration, this suggests the controller isn't performing optimally. Consider tuning parameters like QPS, burst, and CPU/memory configurations. If you are experiencing high Workequeue Add Rate, high Workqueue Depth, but reasonable Workqueue Work Duration, this indicates the controller is processing work, but concurrency might be insufficient. Concurrency is hardcoded in the controller, so as a cluster administrator, you can tune for this by reducing the pod creation QPS, so the add rate to the resource claim workqueue is more manageable. ### `kube-scheduler` metrics The following scheduler metrics are high level metrics aggregating performance across all Pods scheduled, not just those using DRA. It is important to note that the end-to-end metrics are ultimately influenced by the `kube-controller-manager`'s performance in creating ResourceClaims from ResourceClainTemplates in deployments that heavily use
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/dra.md
[ -0.019335299730300903, 0.008198167197406292, 0.08415765315294266, 0.06567347049713135, 0.027576223015785217, -0.05484126880764961, 0.011971544474363327, 0.02504432015120983, 0.11922076344490051, 0.03985022008419037, -0.05058472603559494, -0.0103832446038723, -0.0316895917057991, -0.030726807191967964, 0.057412292808294296, -0.037780504673719406, 0.10084899514913559, -0.04156699404120445, -0.07796213030815125, -0.01318053063005209, 0.06916927546262741, -0.0802825465798378, -0.04917464405298233, 0.04703038930892944, -0.030477920547127724, 0.021430358290672302, -0.016368988901376724, -0.03678908944129944, 0.034761201590299606, -0.05379312112927437, -0.05009374022483826, 0.03479480370879173, 0.013266026973724365, -0.006613926030695438, 0.03930404782295227, 0.08620593696832657, -0.02346215397119522, -0.0584849938750267, -0.10536880791187286, -0.014917178079485893, 0.025547917932271957, -0.03906431794166565, -0.11145078390836716, 0.00855977088212967, -0.023425772786140442, 0.016173968091607094, -0.001656426815316081, -0.014933873899281025, -0.023803353309631348, -0.008645066991448402, 0.021279528737068176, -0.07773853838443756, 0.08088178932666779, 0.04511656239628792, 0.02779470942914486, 0.03350871428847313, 0.06353162229061127, -0.005777787417173386, 0.0698993131518364, 0.043074581772089005, -0.03530352562665939, -0.02061011642217636, 0.03688368201255798, 0.00084998260717839, 0.0753258690237999, -0.01812632754445076, 0.03540923446416855, -0.00732420664280653, 0.014160484075546265, -0.03168974444270134, 0.09408894926309586, 0.00108096853364259, 0.004455798305571079, 0.001293565146625042, 0.01423684973269701, -0.011132439598441124, -0.08788038045167923, 0.05560151860117912, 0.053684964776039124, -0.08196403086185455, 0.0212192852050066, 0.13521674275398254, 0.06657688319683075, -0.03522225841879845, -0.03649680316448212, -0.004110390320420265, 0.01566498912870884, -0.02778835967183113, 0.012904101982712746, 0.028569262474775314, 0.09449867904186249, -0.0007330270600505173, 0.049209706485271454, -0.05245788395404816, 0.05454093962907791, 0.005607505328953266, -0.016197936609387398, -0.016860969364643097, 0.024764109402894974, -0.030531050637364388, 0.02790141850709915, 0.033245012164115906, -0.0006024528411217034, 0.0022926877718418837, 0.047622691839933395, -0.07378057390451431, -0.061355110257864, -0.04135161265730858, -0.006826399359852076, 0.031420446932315826, 0.03286685794591904, 0.022737443447113037, -0.03921958804130554, 0.030781744047999382, 0.017345186322927475, 0.007283648010343313, -0.03282437473535538, -0.00769871287047863, 0.03695940598845482, 0.0017698273295536637, 0.018176740035414696, -0.08841012418270111, 0.017320122569799423, -0.012058488093316555, -0.007961059920489788, 0.039779145270586014, -0.09606372565031052, 5.047851922339223e-33, 0.05273202061653137, -0.06534925848245621, -0.0227680467069149, -0.08286695927381516, -0.008006547577679157, -0.1294204294681549, -0.0006203755037859082, 0.012905962765216827, 0.020295048132538795, -0.04737596958875656, -0.07846216857433319, 0.0950959324836731, -0.022268619388341904, -0.035199474543333054, 0.043795857578516006, -0.05668147653341293, -0.057921163737773895, 0.08164625614881516, 0.040024805814027786, -0.02286158874630928, 0.04119766876101494, -0.08140392601490021, -0.03165694326162338, 0.028636489063501358, 0.059194982051849365, 0.017375238239765167, 0.04270898178219795, -0.0638645738363266, -0.038347724825143814, 0.022620446979999542, -0.0023962173145264387, -0.029888201504945755, 0.036211974918842316, 0.08434940874576569, -0.11599690467119217, 0.0035548643209040165, -0.03290332853794098, -0.013639243319630623, -0.050490085035562515, -0.011412064544856548, -0.028154384344816208, -0.027463043108582497, -0.006263630464673042, -0.08273834735155106, 0.02396787516772747, -0.060547325760126114, 0.015272662974894047, -0.07769390940666199, 0.0006902565946802497, 0.06025668978691101, 0.00912084337323904, -0.003853302914649248, 0.11284209787845612, 0.014158551581203938, 0.06431671977043152, 0.020220555365085602, 0.11210883408784866, -0.07719674706459045, 0.015718478709459305, 0.06938885152339935, -0.05803845077753067, -0.036258090287446976, -0.025619342923164368, 0.009833212941884995, -0.02403371036052704, 0.07284002751111984, 0.008677764795720577, 0.07713061571121216, -0.006171676330268383, 0.037996698170900345, -0.02152298577129841, -0.011422674171626568, 0.0063629187643527985, 0.01406758651137352, -0.019773833453655243, -0.10083301365375519, -0.007901586592197418, 0.006658147554844618, -0.21011650562286377, 0.049422308802604675, 0.010791917331516743, 0.022941330447793007, -0.010303537361323833, 0.08489871025085449, -0.03733034059405327, -0.011520479805767536, -0.00026697476278059185, -0.011712849140167236, -0.08172424137592316, 0.025230903178453445, 0.015123634599149227, -0.011896074749529362, -0.06649157404899597, 0.06747468560934067, -0.08694303035736084, -5.1949437345095235e-33, 0.0565938763320446, -0.058132730424404144, 0.038037944585084915, 0.06424615532159805, 0.023914478719234467, 0.008023026399314404, -0.05290212854743004, 0.0744248777627945, -0.008260115049779415, -0.04448772221803665, -0.1022401824593544, -0.017190853133797646, -0.026529638096690178, 0.042208798229694366, -0.043082233518362045, 0.04268963262438774, -0.025014180690050125, -0.043386638164520264, 0.004547777120023966, -0.007927636615931988, 0.0004910455318167806, 0.025654146447777748, 0.048675380647182465, -0.06063124164938927, -0.010770967230200768, -0.016056228429079056, 0.004968376364558935, 0.03159577399492264, 0.02281574159860611, -0.05591154471039772, 0.033308323472738266, -0.07360434532165527, -0.050136368721723557, -0.036551933735609055, 0.03596185892820358, -0.045088257640600204, -0.05241309851408005, 0.04672430083155632, -0.01307655405253172, 0.01359626092016697, 0.11305079609155655, -0.02426847815513611, -0.003994910977780819, -0.008061825297772884, -0.016022084280848503, 0.004581375513225794, -0.044537536799907684, -0.06711344420909882, 0.03704553842544556, -0.040836166590452194, 0.05343882367014885, -0.042322441935539246, -0.02431667596101761, 0.12929269671440125, -0.05027167871594429, -0.03882806375622749, 0.039199765771627426, 0.020736120641231537, -0.01141106616705656, 0.021003199741244316, 0.06349179893732071, -0.07460297644138336, 0.03319016471505165, 0.022223707288503647, -0.03375018760561943, -0.06663532555103302, 0.058016907423734665, -0.02003803290426731, 0.02335657738149166, 0.02255379781126976, 0.07634100317955017, -0.044182032346725464, -0.014823837205767632, 0.022797144949436188, -0.06416407227516174, 0.019709719344973564, -0.010584507137537003, -0.03402307257056236, -0.0035294480621814728, 0.026328139007091522, -0.08233809471130371, 0.05342775955796242, -0.0038408786058425903, -0.006304069422185421, -0.033688440918922424, 0.07076888531446457, 0.03622032701969147, 0.04991825297474861, 0.01758517697453499, 0.1425703763961792, 0.012752477079629898, -0.03818506747484207, -0.05110436677932739, 0.15885135531425476, -0.040189724415540695, -5.034253547364642e-8, 0.08431175351142883, 0.045823097229003906, 0.005643859971314669, 0.008416562341153622, 0.07602474093437195, -0.0943487137556076, 0.037058502435684204, 0.06526315957307816, -0.051453813910484314, 0.041157763451337814, 0.1027161255478859, -0.016093891113996506, -0.046259790658950806, -0.01070884708315134, 0.09305799752473831, 0.0598587840795517, -0.012962248176336288, 0.050232332199811935, -0.018703795969486237, -0.14212234318256378, -0.04063830152153969, -0.028996000066399574, 0.008959697559475899, -0.017237866297364235, 0.005558839067816734, 0.0477423295378685, 0.09301895648241043, 0.0445941723883152, 0.05875337868928909, -0.005360501352697611, -0.12437723577022552, 0.042954254895448685, -0.03450462594628334, -0.02416558936238289, -0.006704848725348711, 0.022142915055155754, -0.1403886377811432, -0.03287684917449951, 0.03908542916178703, 0.053523533046245575, -0.04317067936062813, -0.028258342295885086, -0.021831566467881203, 0.010421467944979668, 0.0117618003860116, 0.0491054393351078, -0.09651333838701248, 0.05150894448161125, -0.009399139322340488, -0.025124866515398026, -0.03985049948096275, -0.04150572419166565, -0.01960497908294201, 0.09708674252033234, -0.021615266799926758, 0.00668394984677434, 0.017026595771312714, -0.06402648985385895, 0.06673189997673035, -0.02665792591869831, 0.015866732224822044, -0.03292526304721832, -0.011849134229123592, 0.010368566028773785 ]
0.198705
more manageable. ### `kube-scheduler` metrics The following scheduler metrics are high level metrics aggregating performance across all Pods scheduled, not just those using DRA. It is important to note that the end-to-end metrics are ultimately influenced by the `kube-controller-manager`'s performance in creating ResourceClaims from ResourceClainTemplates in deployments that heavily use ResourceClainTemplates. \* Scheduler End-to-End Duration: Monitor {{< highlight promql "hl\_inline=true" >}}histogram\_quantile(0.99, sum(increase(scheduler\_pod\_scheduling\_sli\_duration\_seconds\_bucket[5m])) by (le)){{< /highlight >}}. \* Scheduler Algorithm Latency: Track {{< highlight promql "hl\_inline=true" >}}histogram\_quantile(0.99, sum(increase(scheduler\_scheduling\_algorithm\_duration\_seconds\_bucket[5m])) by (le)){{< /highlight >}}. ### `kubelet` metrics When a Pod bound to a node must have a ResourceClaim satisfied, kubelet calls the `NodePrepareResources` and `NodeUnprepareResources` methods of the DRA driver. You can observe this behavior from the kubelet's point of view with the following metrics. \* Kubelet NodePrepareResources: Monitor {{< highlight promql "hl\_inline=true" >}}histogram\_quantile(0.99, sum(rate(dra\_operations\_duration\_seconds\_bucket{operation\_name="PrepareResources"}[5m])) by (le)){{< /highlight >}}. \* Kubelet NodeUnprepareResources: Track {{< highlight promql "hl\_inline=true" >}}histogram\_quantile(0.99, sum(rate(dra\_operations\_duration\_seconds\_bucket{operation\_name="UnprepareResources"}[5m])) by (le)){{< /highlight >}}. ### DRA kubeletplugin operations DRA drivers implement the [`kubeletplugin` package interface](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin) which surfaces its own metric for the underlying gRPC operation `NodePrepareResources` and `NodeUnprepareResources`. You can observe this behavior from the point of view of the internal kubeletplugin with the following metrics. \* DRA kubeletplugin gRPC NodePrepareResources operation: Observe {{< highlight promql "hl\_inline=true" >}}histogram\_quantile(0.99, sum(rate(dra\_grpc\_operations\_duration\_seconds\_bucket{method\_name=~".\*NodePrepareResources"}[5m])) by (le)){{< /highlight >}}. \* DRA kubeletplugin gRPC NodeUnprepareResources operation: Observe {{< highlight promql "hl\_inline=true" >}} histogram\_quantile(0.99, sum(rate(dra\_grpc\_operations\_duration\_seconds\_bucket{method\_name=~".\*NodeUnprepareResources"}[5m])) by (le)){{< /highlight >}}. ## {{% heading "whatsnext" %}} \* [Learn more about DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) \* Read the [Kubernetes Metrics Reference](/docs/reference/generated/metrics/)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/dra.md
[ 0.004915407858788967, 0.003653722582384944, 0.015985742211341858, 0.011947841383516788, -0.0521022193133831, -0.04938394948840141, -0.034010156989097595, -0.009084025397896767, 0.05055626109242439, -0.0029396594036370516, -0.08127225935459137, -0.11181434988975525, -0.05364592373371124, -0.030323777347803116, 0.001549437758512795, -0.03232165798544884, 0.08867057412862778, -0.025333702564239502, -0.07726525515317917, -0.0843251422047615, 0.04148554801940918, -0.016029348596930504, 0.018241122364997864, 0.019603297114372253, -0.029906228184700012, 0.03880685940384865, -0.0021834755316376686, 0.0032247102353721857, 0.01544050220400095, -0.0381162203848362, -0.05280765891075134, -0.039881180971860886, 0.11468987166881561, 0.010114423930644989, 0.01846313290297985, 0.05616381764411926, -0.0014181239530444145, -0.0743996724486351, -0.01658397912979126, -0.010338371619582176, 0.06721191108226776, -0.013171618804335594, -0.08394277840852737, 0.011320339515805244, 0.003343841526657343, -0.02328876033425331, -0.059057753533124924, -0.016148047521710396, -0.014272266067564487, -0.03045370616018772, 0.01905735209584236, -0.06904551386833191, 0.09062707424163818, 0.01341154333204031, 0.05056368559598923, 0.07954426854848862, 0.07336090505123138, -0.029849747195839882, 0.11975911259651184, -0.03376572206616402, -0.025828750804066658, -0.03774876892566681, 0.005093868356198072, -0.018589256331324577, 0.014166904613375664, -0.0457194522023201, -0.002826646901667118, 0.05633699893951416, 0.03142460063099861, 0.031219130381941795, 0.011112235486507416, -0.009202387183904648, 0.015217005275189877, 0.013432336039841175, 0.005689884070307016, 0.047854743897914886, -0.025661420077085495, 0.09473934024572372, 0.005135302431881428, -0.11842628568410873, -0.0063823130913078785, 0.008523013442754745, 0.04508230835199356, 0.001056959037669003, 0.02140263095498085, -0.02800716646015644, 0.03207264468073845, -0.043608568608760834, 0.07211171090602875, -0.039301563054323196, 0.08234164118766785, 0.05926581472158432, -0.017865115776658058, -0.12926240265369415, 0.026732197031378746, 0.012703699991106987, -0.016806650906801224, -0.04659409448504448, 0.056856416165828705, 0.010589605197310448, 0.06222030520439148, -0.011331032030284405, -0.0479070283472538, 0.0037254085764288902, 0.06344872713088989, -0.041007865220308304, -0.005908741615712643, 0.05698559433221817, -0.06605473905801773, 0.05464113876223564, 0.04512482136487961, 0.025176534429192543, 0.025504879653453827, 0.0329103022813797, 0.03954390808939934, 0.0698845162987709, -0.02917976677417755, 0.0037593585439026356, 0.05420834198594093, 0.056459568440914154, 0.026826906949281693, -0.09149594604969025, -0.005805330816656351, -0.028322329744696617, 0.018228473141789436, -0.02893795631825924, -0.013378766365349293, 5.248313749430748e-33, 0.015083283185958862, -0.0778176411986351, -0.0061557479202747345, -0.14240770041942596, 0.011452057398855686, -0.06782129406929016, -0.06251371651887894, -0.025966236367821693, 0.011942428536713123, -0.049474045634269714, -0.04133036360144615, 0.08903414011001587, -0.034457772970199585, -0.04058869555592537, 0.004703059326857328, -0.018198955804109573, -0.008269073441624641, 0.07572883367538452, 0.032338302582502365, -0.008418799377977848, 0.03806557133793831, -0.1292382925748825, -0.05791739374399185, -0.013188522309064865, 0.074102483689785, 0.030535418540239334, 0.07913170009851456, -0.09352078288793564, 0.004055832978338003, 0.03148243576288223, -0.03258655220270157, -0.0486101359128952, 0.025809966027736664, 0.04267393797636032, -0.09341169148683548, -0.003119059605523944, -0.0359698161482811, 0.0533476285636425, -0.03391232341527939, 0.00770103745162487, -0.011963008902966976, -0.055285729467868805, -0.007368754595518112, -0.06658968329429626, -0.018008563667535782, 0.005326415412127972, 0.028984561562538147, -0.04502345249056816, 0.0006639299681410193, 0.05440822243690491, 0.014112419448792934, -0.03148050606250763, 0.05148928984999657, -0.07710239291191101, 0.0634855106472969, -0.018859807401895523, 0.15318550169467926, 0.013463221490383148, 0.02706257253885269, 0.06919069588184357, -0.060332052409648895, 0.04719853401184082, -0.03876658156514168, -0.009549777954816818, 0.024493640288710594, 0.023807356134057045, -0.04780324921011925, 0.06590307503938675, 0.00914937723428011, 0.058724116533994675, -0.015764759853482246, 0.040262170135974884, 0.02990300953388214, 0.02811029739677906, 0.034497279673814774, -0.0893356055021286, 0.030929330736398697, 0.02483912743628025, -0.14361871778964996, 0.02738329768180847, 0.023949401453137398, 0.015102403238415718, -0.04144793003797531, -0.014064344577491283, -0.009183998219668865, -0.0444132424890995, 0.0007483505760319531, 0.02451171725988388, -0.12779784202575684, 0.05459121614694595, -0.018303582444787025, -0.02376277558505535, -0.0827767550945282, 0.05008699744939804, -0.08580126613378525, -5.001449282840513e-33, 0.07824860513210297, 0.016699496656656265, 0.08451434969902039, 0.12331563234329224, 0.0615936703979969, -0.044823307543992996, -0.009150602854788303, 0.05385265871882439, 0.056936703622341156, -0.01978418231010437, -0.05220317095518112, -0.052121058106422424, -0.02054177224636078, 0.03496607393026352, -0.03452369570732117, 0.05733072757720947, -0.02192535623908043, -0.029250316321849823, -0.05746771767735481, 0.0003076581342611462, 0.05008918419480324, 0.02403291128575802, -0.010911007411777973, -0.01442068349570036, -0.0132225900888443, -0.010164912790060043, 0.01815289631485939, 0.05603468418121338, -0.05246330797672272, -0.05904348939657211, 0.0034239429514855146, -0.12035346776247025, -0.045732732862234116, -0.021768704056739807, 0.03505735844373703, -0.0626099705696106, -0.041632361710071564, 0.09621046483516693, -0.008645952679216862, 0.0672224834561348, 0.11089805513620377, -0.017651356756687164, -0.02205687016248703, -0.05322548747062683, -0.01821783185005188, 0.0855177789926529, -0.03622940927743912, -0.00492648733779788, -0.012361422181129456, -0.052204664796590805, -0.0064664846286177635, -0.01283026672899723, -0.09057699888944626, 0.12788233160972595, 0.001165401074104011, 0.016271395608782768, 0.03522403910756111, 0.0027086171321570873, -0.06885246932506561, 0.06060044839978218, 0.011867212131619453, -0.0863286703824997, 0.08752790838479996, 0.026905562728643417, 0.02115410752594471, -0.049773573875427246, 0.06691835075616837, -0.06501675397157669, -0.003405842697247863, 0.07428016513586044, 0.05145839974284172, -0.00044184396392665803, -0.0018320698291063309, 0.02556629665195942, -0.08022917807102203, 0.03837532922625542, -0.011983935721218586, -0.006715684197843075, 0.008735190145671368, 0.024393601343035698, -0.10073436051607132, 0.0024730872828513384, 0.061089687049388885, -0.0025191898457705975, -0.05462963506579399, 0.10479599237442017, 0.03495565429329872, 0.031199444085359573, 0.04120694473385811, 0.09884381294250488, 0.034502968192100525, -0.02540113590657711, -0.028158828616142273, 0.08982260525226593, -0.01800035685300827, -5.030071648093326e-8, 0.03240576758980751, -0.02785383351147175, 0.015359856188297272, -0.01516526285558939, 0.07914210110902786, -0.0801716148853302, 0.028092041611671448, 0.00866690743714571, -0.01629156805574894, 0.01856561005115509, 0.0957428514957428, -0.05413704738020897, -0.09030118584632874, 0.012131544761359692, 0.0531250461935997, 0.012979058548808098, 0.04600748419761658, 0.0623917281627655, 0.0005667750374414027, -0.11205534636974335, -0.0031380944419652224, 0.007590248715132475, 0.03559303283691406, -0.07403513044118881, -0.011962087824940681, 0.0531357005238533, 0.01817292906343937, 0.04013582691550255, 0.08038206398487091, -0.04022416099905968, 0.014417111873626709, 0.023647427558898926, -0.01527068018913269, 0.012620072811841965, -0.005820884834975004, -0.0536838136613369, -0.12283599376678467, 0.027924634516239166, 0.04639787971973419, 0.11201909184455872, 0.008256928063929081, -0.03714454174041748, -0.10845211148262024, 0.01784317009150982, 0.0591096356511116, 0.05142689496278763, -0.050023362040519714, 0.04332534223794937, -0.027998995035886765, -0.037398964166641235, 0.0034473291598260403, -0.08326406031847, 0.010649644769728184, 0.00037092348793521523, 0.008555545471608639, 0.0045019034296274185, 0.031779076904058456, -0.10772867500782013, 0.009302547201514244, 0.029245158657431602, -0.022586164996027946, -0.07440737634897232, -0.058270104229450226, -0.0038218768313527107 ]
0.161147
This page explains proxies used with Kubernetes. ## Proxies There are several different proxies you may encounter when using Kubernetes: 1. The [kubectl proxy](/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api): - runs on a user's desktop or in a pod - proxies from a localhost address to the Kubernetes apiserver - client to proxy uses HTTP - proxy to apiserver uses HTTPS - locates apiserver - adds authentication headers 1. The [apiserver proxy](/docs/tasks/access-application-cluster/access-cluster-services/#discovering-builtin-services): - is a bastion built into the apiserver - connects a user outside of the cluster to cluster IPs which otherwise might not be reachable - runs in the apiserver processes - client to proxy uses HTTPS (or http if apiserver so configured) - proxy to target may use HTTP or HTTPS as chosen by proxy using available information - can be used to reach a Node, Pod, or Service - does load balancing when used to reach a Service 1. The [kube proxy](/docs/concepts/services-networking/service/#ips-and-vips): - runs on each node - proxies UDP, TCP and SCTP - does not understand HTTP - provides load balancing - is only used to reach services 1. A Proxy/Load-balancer in front of apiserver(s): - existence and implementation varies from cluster to cluster (e.g. nginx) - sits between all clients and one or more apiservers - acts as load balancer if there are several apiservers. 1. Cloud Load Balancers on external services: - are provided by some cloud providers (e.g. AWS ELB, Google Cloud Load Balancer) - are created automatically when the Kubernetes service has type `LoadBalancer` - usually supports UDP/TCP only - SCTP support is up to the load balancer implementation of the cloud provider - implementation varies by cloud provider. Kubernetes users will typically not need to worry about anything other than the first two types. The cluster admin will typically ensure that the latter types are set up correctly. ## Requesting redirects Proxies have replaced redirect capabilities. Redirects have been deprecated.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/proxies.md
[ -0.017489485442638397, 0.009273812174797058, 0.029390791431069374, -0.0450470969080925, -0.043861910700798035, 0.02589242346584797, 0.029926760122179985, -0.03513989597558975, 0.1279086470603943, 0.06874285638332367, -0.0764891728758812, 0.053575191646814346, 0.01994280517101288, -0.046597398817539215, 0.1014530286192894, -0.01381627470254898, 0.13485851883888245, -0.003394384402781725, -0.017708439379930496, -0.08133145421743393, -0.02768881432712078, -0.09438961744308472, -0.06145542114973068, 0.017248695716261864, -0.097364142537117, -0.008888796903192997, -0.07178858667612076, -0.02060716785490513, 0.02762550860643387, 0.02012474276125431, -0.06515498459339142, -0.015788722783327103, -0.06717092543840408, 0.010451379232108593, -0.10242843627929688, -0.0012378479586914182, 0.031793225556612015, 0.010657478123903275, -0.08172607421875, 0.046983156353235245, 0.01704474352300167, -0.023956388235092163, -0.05550486221909523, -0.05835490673780441, -0.0025087427347898483, 0.01201372779905796, -0.012849230319261551, 0.012874586507678032, -0.00035549572203308344, -0.060581449419260025, -0.017064083367586136, -0.0679045096039772, 0.030618416145443916, 0.11156246811151505, -0.013639015145599842, -0.05847162380814552, 0.0025471027474850416, 0.06946516036987305, 0.07604721933603287, 0.04164495691657066, -0.0327787920832634, -0.07781093567609787, 0.02016829513013363, 0.009924519807100296, -0.06168285757303238, -0.06794373691082001, -0.025471346452832222, 0.036184221506118774, 0.05684391036629677, -0.0761682465672493, 0.035407956689596176, -0.0023341693449765444, -0.028758948668837547, -0.016399430111050606, 0.04800695925951004, -0.00129879848100245, -0.009970181621611118, 0.017355166375637054, 0.05773462355136871, -0.09155444800853729, 0.06119111552834511, 0.07457425445318222, 0.01469461526721716, 0.03947421535849571, -0.06690000742673874, 0.005963724106550217, -0.030843880027532578, -0.07994747161865234, 0.04935624077916145, -0.0002747162361629307, 0.03010784648358822, -0.04526633024215698, -0.01393881905823946, -0.05349856987595558, 0.04609169065952301, 0.00029592166538350284, 0.03147361800074577, 0.024886704981327057, -0.006536645349115133, -0.013171683996915817, 0.01330707035958767, 0.017296629026532173, 0.010094022378325462, -0.01554922666400671, -0.00968449842184782, -0.010394536890089512, -0.06090657040476799, 0.02893013507127762, 0.09970050305128098, 0.12337753176689148, -0.0664636418223381, -0.03874601796269417, -0.050243981182575226, 0.015734462067484856, -0.022020108997821808, 0.007822216488420963, 0.06058650463819504, -0.08290494978427887, 0.05675116181373596, 0.034804925322532654, 0.009160102345049381, -0.07052741944789886, 0.04001617804169655, 0.04932535067200661, -0.01088707149028778, 0.04486992210149765, -0.04228788986802101, 2.9329603427023427e-33, 0.08800960332155228, -0.053514666855335236, 0.05757154896855354, 0.01728890836238861, 0.020676156505942345, -0.05843869224190712, -0.008227476850152016, -0.016343247145414352, 0.014830143190920353, -0.04815852642059326, -0.0456540621817112, 0.03422410413622856, 0.027605196461081505, 0.0031952455174177885, 0.029369594529271126, 0.027458587661385536, -0.09025949239730835, 0.018608566373586655, 0.07634878158569336, 0.051865581423044205, -0.010248087346553802, -0.07793968170881271, 0.010901528410613537, 0.023695413023233414, -0.018606364727020264, -0.030247479677200317, 0.04407063499093056, -0.07102508097887039, -0.041446685791015625, 0.03848150372505188, 0.00116839783731848, -0.007566297426819801, 0.018045656383037567, 0.0062816813588142395, -0.09001833945512772, 0.009045771323144436, 0.07549750059843063, -0.043495822697877884, -0.07593714445829391, -0.013740120455622673, -0.0440494604408741, -0.01826636865735054, 0.052005644887685776, -0.052791595458984375, 0.03871480002999306, -0.08811727911233902, -0.021655187010765076, -0.028800182044506073, 0.10133496671915054, 0.03470749408006668, -0.015390592627227306, 0.009677131660282612, 0.10686623305082321, -0.06100771203637123, 0.04232349991798401, 0.06646266579627991, 0.08209767937660217, -0.03305720165371895, -0.07939442992210388, -0.01990319788455963, -0.013433912768959999, -0.07739833742380142, -0.01559238787740469, 0.04039286822080612, 0.03894226625561714, 0.05937934294342995, -0.006272454280406237, 0.13768571615219116, -0.02046259492635727, 0.0760703980922699, -0.010215051472187042, 0.0036865652073174715, 0.014170438051223755, 0.0061798617243766785, -0.03270990774035454, -0.011965418234467506, 0.028061384335160255, 0.02448633685708046, 0.008924168534576893, 0.050960566848516464, 0.03608223795890808, -0.042343299835920334, -0.05507272854447365, 0.0691026896238327, -0.11628831177949905, -0.02665831707417965, 0.006849565543234348, -0.04172344133257866, 0.024007434025406837, -0.012250389903783798, 0.04900289699435234, -0.005358206573873758, -0.008755363523960114, 0.0836087018251419, -0.10170187056064606, -5.127187872786142e-33, 0.029491228982806206, 0.01243598572909832, 0.02548791654407978, -0.039477359503507614, 0.036890290677547455, 0.05558792129158974, 0.023655472323298454, 0.07313667237758636, 0.011057920753955841, 0.027292033657431602, -0.08029177039861679, -0.026946065947413445, 0.05695983022451401, -0.021342622116208076, -0.08953123539686203, 0.01990423910319805, -0.01814270205795765, -0.05501527711749077, -0.04062803462147713, 0.024493589997291565, -0.05847060680389404, -0.07540430128574371, 0.0696134865283966, 0.003828042419627309, -0.010137984529137611, -0.009224021807312965, 0.01809600368142128, -0.015878545120358467, -0.03382381051778793, -0.004803379066288471, 0.04762478545308113, -0.0946500152349472, 0.028254788368940353, 0.03777181729674339, -0.023486845195293427, -0.037827737629413605, -0.013631819747388363, 0.08848315477371216, 0.003007135121151805, -0.21816681325435638, -0.016973497346043587, -0.020289486274123192, 0.0301385335624218, -0.023351971060037613, 0.034750357270240784, 0.022462300956249237, -0.06682007014751434, 0.052435632795095444, -0.035312723368406296, -0.055275142192840576, -0.013086359947919846, 0.05052797123789787, -0.05854877829551697, 0.1236766129732132, -0.08978786319494247, 0.03694935142993927, -0.04345317929983139, 0.1483709216117859, 0.01037353090941906, 0.03674027696251869, 0.038376227021217346, -0.07864724099636078, -0.02199459820985794, 0.08702147752046585, -0.028241967782378197, -0.0037598072085529566, -0.04572596028447151, -0.014499739743769169, -0.04549883306026459, 0.05000510439276695, -0.049913518130779266, -0.07088442891836166, 0.0006847277982160449, 0.005933055654168129, -0.015039592050015926, -0.022969534620642662, 0.07500725984573364, -0.08663519471883774, -0.05373246595263481, 0.06311376392841339, 0.004386355634778738, 0.0015050384681671858, -0.05801665782928467, -0.03597511723637581, 0.06851807981729507, 0.03293300420045853, 0.03903797268867493, 0.08248800039291382, 0.06446924805641174, 0.00022653232736047357, -0.01947431080043316, 0.020928623154759407, -0.09488879889249802, 0.04625142738223076, 0.01820063591003418, -5.068821806730739e-8, 0.0903569832444191, 0.01743197999894619, 0.01422872580587864, 0.00172720686532557, -0.07667095214128494, -0.0036134866531938314, -0.01503150723874569, -0.004078127443790436, -0.06319780647754669, 0.03630918264389038, 0.010808789171278477, 0.04049663990736008, -0.0856935977935791, -0.016432009637355804, 0.0834304615855217, -0.015490121208131313, 0.01931854523718357, -0.020954852923750877, 0.01417455542832613, -0.05408691242337227, -0.08347982913255692, -0.07026495039463043, -0.006645859684795141, 0.0013812570832669735, -0.05033126473426819, 0.06790678948163986, 0.002060940722003579, -0.03728000819683075, 0.04580184072256088, -0.002017832361161709, -0.09221643954515457, 0.03255388140678406, -0.0018820451805368066, -0.004467182792723179, -0.036134105175733566, 0.08677108585834503, -0.10669006407260895, 0.007930120453238487, -0.027802640572190285, 0.05502486228942871, 0.04861854761838913, -0.020075391978025436, 0.003028992097824812, -0.011548214592039585, 0.02938539907336235, 0.08051349222660065, 0.01127928588539362, 0.0720735639333725, -0.01690121926367283, 0.029101107269525528, 0.046387072652578354, -0.06961579620838165, -0.01193720381706953, -0.01774735189974308, -0.05237528681755066, 0.0007895033922977746, -0.06903206557035446, -0.06810588389635086, 0.029362371191382408, -0.00005452754703583196, 0.07429706305265427, 0.044805873185396194, 0.0495305061340332, 0.03276791423559189 ]
0.162585
This page provides good practices and considerations when designing \_admission webhooks\_ in Kubernetes. This information is intended for cluster operators who run admission webhook servers or third-party applications that modify or validate your API requests. Before reading this page, ensure that you're familiar with the following concepts: \* [Admission controllers](/docs/reference/access-authn-authz/admission-controllers/) \* [Admission webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks) ## Importance of good webhook design {#why-good-webhook-design-matters} Admission control occurs when any create, update, or delete request is sent to the Kubernetes API. Admission controllers intercept requests that match specific criteria that you define. These requests are then sent to mutating admission webhooks or validating admission webhooks. These webhooks are often written to ensure that specific fields in object specifications exist or have specific allowed values. Webhooks are a powerful mechanism to extend the Kubernetes API. Badly-designed webhooks often result in workload disruptions because of how much control the webhooks have over objects in the cluster. Like other API extension mechanisms, webhooks are challenging to test at scale for compatibility with all of your workloads, other webhooks, add-ons, and plugins. Additionally, with every release, Kubernetes adds or modifies the API with new features, feature promotions to beta or stable status, and deprecations. Even stable Kubernetes APIs are likely to change. For example, the `Pod` API changed in v1.29 to add the [Sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) feature. While it's rare for a Kubernetes object to enter a broken state because of a new Kubernetes API, webhooks that worked as expected with earlier versions of an API might not be able to reconcile more recent changes to that API. This can result in unexpected behavior after you upgrade your clusters to newer versions. This page describes common webhook failure scenarios and how to avoid them by cautiously and thoughtfully designing and implementing your webhooks. ## Identify whether you use admission webhooks {#identify-admission-webhooks} Even if you don't run your own admission webhooks, some third-party applications that you run in your clusters might use mutating or validating admission webhooks. To check whether your cluster has any mutating admission webhooks, run the following command: ```shell kubectl get mutatingwebhookconfigurations ``` The output lists any mutating admission controllers in the cluster. To check whether your cluster has any validating admission webhooks, run the following command: ```shell kubectl get validatingwebhookconfigurations ``` The output lists any validating admission controllers in the cluster. ## Choose an admission control mechanism {#choose-admission-mechanism} Kubernetes includes multiple admission control and policy enforcement options. Knowing when to use a specific option can help you to improve latency and performance, reduce management overhead, and avoid issues during version upgrades. The following table describes the mechanisms that let you mutate or validate resources during admission: Mutating and validating admission control in Kubernetes | Mechanism | Description | Use cases | | --- | --- | --- | | [Mutating admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) | Intercept API requests before admission and modify as needed using custom logic. | * Make critical modifications that must happen before resource admission. * Make complex modifications that require advanced logic, like calling external APIs. | | [Mutating admission policy](/docs/reference/access-authn-authz/mutating-admission-policy/) | Intercept API requests before admission and modify as needed using Common Expression Language (CEL) expressions. | * Make critical modifications that must happen before resource admission. * Make simple modifications, such as adjusting labels or replica counts. | | [Validating admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) | Intercept API requests before admission and validate against complex policy declarations. | * Validate critical configurations before resource admission. * Enforce complex policy logic before admission. | | [Validating admission policy](/docs/reference/access-authn-authz/validating-admission-policy/) | Intercept API requests before admission and validate against CEL expressions. | * Validate critical configurations before resource admission.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.030502261593937874, 0.07309260219335556, 0.0034550654236227274, -0.042899202555418015, -0.00829374697059393, -0.04554934427142143, 0.03364776447415352, -0.040151745080947876, 0.039118796586990356, 0.031210239976644516, -0.02314860373735428, -0.0731825977563858, 0.02682727389037609, -0.065536268055439, 0.04535044729709625, -0.02844161167740822, 0.0832245722413063, -0.05967855453491211, -0.08473588526248932, -0.06643694639205933, 0.0378890335559845, -0.03273006156086922, -0.04540635272860527, 0.013481787405908108, -0.1016625389456749, -0.014061442576348782, -0.006833680439740419, 0.00908287987112999, 0.03706228360533714, -0.004490134306252003, -0.0449887253344059, -0.024774039164185524, -0.04405565559864044, 0.03951740637421608, -0.015262779779732227, 0.07080500572919846, -0.004454702138900757, -0.06284595280885696, -0.05916401743888855, 0.047702666372060776, 0.01968151517212391, -0.0765371173620224, -0.047061678022146225, -0.008675779215991497, 0.008175755850970745, -0.04524927958846092, -0.10447729378938675, -0.0869869589805603, -0.046534113585948944, 0.015511530451476574, 0.019822215661406517, -0.01818392425775528, 0.016234541311860085, 0.07576055079698563, -0.017986223101615906, 0.0476313941180706, -0.04017398878931999, 0.030459711328148842, 0.020935218781232834, -0.015447594225406647, 0.028081635013222694, -0.06678719073534012, 0.06323964148759842, -0.005811942275613546, -0.027296707034111023, -0.05541868880391121, -0.022961450740695, 0.012199021875858307, 0.10158094018697739, -0.03870117664337158, 0.010212564840912819, 0.018638966605067253, -0.08252763748168945, 0.012102738954126835, -0.032248299568891525, -0.002095024101436138, -0.05657963082194328, 0.08500298857688904, 0.04674338921904564, -0.07110940665006638, 0.016802139580249786, -0.009898146614432335, 0.029561378061771393, -0.004742753226310015, -0.01572958007454872, 0.02307724580168724, -0.045827701687812805, -0.044011812657117844, 0.00008019134111236781, 0.052228495478630066, 0.07771174609661102, -0.07342853397130966, -0.010819605551660061, -0.055123697966337204, 0.048832714557647705, -0.0011286026565358043, -0.04273305460810661, -0.01877696067094803, 0.014276356436312199, 0.036348145455121994, -0.022296462208032608, -0.015907270833849907, 0.0009013179806061089, 0.009742909111082554, 0.04651588574051857, -0.12340117990970612, 0.04364045336842537, 0.00478587718680501, 0.08806262910366058, 0.02344503067433834, -0.056526605039834976, 0.0036093408707529306, 0.02773204818367958, 0.040834665298461914, -0.018149781972169876, 0.08052090555429459, 0.03458070009946823, -0.04395369812846184, 0.05452553182840347, 0.10657410323619843, -0.004482321906834841, -0.020175840705633163, 0.030774490907788277, -0.02888341061770916, -0.04981382563710213, -0.028195820748806, -0.0755917876958847, 5.8065108335721424e-33, 0.0025210443418473005, 0.05110762268304825, -0.025473518297076225, -0.08244167268276215, -0.0005519408150576055, -0.13931038975715637, -0.031369078904390335, -0.0744224563241005, 0.004614354111254215, -0.06743435561656952, -0.05288466811180115, 0.07299741357564926, 0.035548657178878784, -0.0058832657523453236, 0.038445811718702316, 0.03033582866191864, -0.07765481621026993, 0.09487807005643845, 0.0810348317027092, 0.0601644292473793, 0.08750257641077042, -0.09999100863933563, -0.04496649652719498, 0.03646670654416084, 0.025021938607096672, -0.00686368253082037, -0.05416334047913551, 0.020459318533539772, -0.03863837569952011, 0.06311622262001038, 0.023418065160512924, -0.07843373715877533, -0.009509352035820484, -0.0007817625300958753, -0.06756500154733658, -0.015447025187313557, -0.037873558700084686, -0.040002916008234024, 0.01412199903279543, -0.14547941088676453, -0.04007794335484505, -0.08050008118152618, -0.03846233710646629, 0.01942840777337551, 0.00929176528006792, -0.003355439053848386, 0.016946211457252502, -0.0786440372467041, 0.0636148601770401, 0.0034641027450561523, -0.07151003181934357, -0.0628674179315567, 0.08385886251926422, 0.0014681866159662604, -0.05197051540017128, -0.025970404967665672, 0.10534051805734634, -0.07508648186922073, -0.07399965077638626, -0.01115136593580246, -0.0016574827022850513, -0.05643941089510918, -0.034840043634176254, -0.021101273596286774, 0.009696178138256073, -0.027658067643642426, -0.029649334028363228, 0.041256118565797806, -0.02383173629641533, -0.09664836525917053, -0.06824749708175659, 0.03452909365296364, -0.010846431367099285, 0.0246624406427145, -0.049697842448949814, -0.06227840483188629, 0.0482761524617672, 0.07116031646728516, -0.0752866193652153, 0.03199443966150284, 0.05907228961586952, 0.01630089432001114, -0.05403042584657669, 0.03823140636086464, -0.015604628250002861, -0.00029004624229855835, 0.03108569048345089, -0.05239482969045639, -0.03482874855399132, 0.05147683620452881, 0.04055585339665413, -0.0027903381269425154, -0.05026809871196747, 0.049976397305727005, -0.03059813752770424, -7.942924796417617e-33, 0.09815181791782379, 0.03434976935386658, -0.02899199165403843, -0.026931898668408394, 0.042668476700782776, 0.07076870650053024, 0.03394608944654465, 0.04020840302109718, 0.05649128183722496, -0.09423145651817322, 0.04748224467039108, 0.017426589503884315, 0.012751339934766293, -0.02055191807448864, -0.06894637644290924, -0.016113437712192535, -0.046329181641340256, -0.023161612451076508, 0.06807888299226761, -0.005168973468244076, 0.033112045377492905, 0.008563928306102753, 0.014940401539206505, -0.02557896263897419, 0.04088970646262169, 0.00036435978836379945, -0.02499082125723362, 0.04145778343081474, -0.049645666033029556, 0.0014767919201403856, 0.010349057614803314, -0.1197066456079483, -0.03884725272655487, 0.09023340791463852, 0.040958911180496216, -0.10901902616024017, 0.0407826229929924, 0.0791509822010994, 0.0018358571687713265, -0.00960355531424284, 0.09530353546142578, -0.033954400569200516, 0.01742578111588955, 0.044901296496391296, -0.03987262398004532, 0.06701258569955826, 0.003732214914634824, -0.014788486994802952, -0.041778214275836945, -0.08083681762218475, -0.02123047225177288, 0.04476940259337425, 0.006749681197106838, 0.10424593836069107, -0.04941898584365845, 0.13295166194438934, 0.03243008255958557, 0.05277850851416588, -0.01767573319375515, 0.04197893664240837, -0.036091312766075134, 0.0023097069934010506, 0.0058418260887265205, 0.12182732671499252, -0.027989516034722328, -0.06372182071208954, -0.020216329023241997, 0.04602999985218048, -0.04029097780585289, 0.03209409862756729, -0.023678449913859367, -0.049213942140340805, 0.023914853110909462, 0.012979432009160519, 0.010581686161458492, -0.07540828734636307, 0.05689530447125435, -0.032230302691459656, -0.0316079817712307, -0.028034653514623642, -0.09089450538158417, 0.07314728200435638, -0.005776353180408478, 0.025705523788928986, 0.07465282827615738, 0.0003926215576939285, 0.02622227743268013, 0.043587084859609604, 0.018146619200706482, 0.026145605370402336, -0.03707017004489899, 0.024278908967971802, -0.034945227205753326, 0.03423517942428589, -0.0678023025393486, -5.500111655010187e-8, -0.0014577526599168777, -0.03096914291381836, 0.02182854153215885, 0.06994518637657166, 0.05689781531691551, -0.02264910750091076, -0.04533420503139496, -0.021497709676623344, -0.09054295718669891, -0.026243463158607483, 0.0022556795738637447, 0.10497821867465973, -0.08073414862155914, -0.05792286619544029, -0.011213568039238453, -0.014010748825967312, -0.02463587559759617, 0.027898941189050674, 0.03165381774306297, -0.06279060989618301, -0.04030566290020943, -0.06589150428771973, 0.06674493104219437, -0.010795079171657562, 0.05432296171784401, 0.16484586894512177, 0.0709049254655838, 0.0045357197523117065, -0.007535061798989773, 0.07070432603359222, -0.03051828220486641, 0.019978772848844528, -0.020411215722560883, 0.04818120226264, -0.01360879372805357, 0.05647412687540054, -0.155633345246315, -0.009268421679735184, 0.0030406706500798464, 0.011084146797657013, 0.0009567298111505806, 0.0241667740046978, -0.0044805509969592094, 0.01354017574340105, 0.12112148851156235, 0.10546816140413284, 0.02552955597639084, 0.009686477482318878, 0.057340107858181, 0.010305498726665974, -0.025687342509627342, -0.059273626655340195, -0.014141468331217766, 0.08474696427583694, -0.01848985254764557, 0.015991240739822388, 0.014453337527811527, -0.07931926101446152, 0.08453809469938278, 0.026999495923519135, 0.07211724668741226, 0.037400469183921814, 0.011117037385702133, 0.019323434680700302 ]
0.184315
Intercept API requests before admission and validate against complex policy declarations. | * Validate critical configurations before resource admission. * Enforce complex policy logic before admission. | | [Validating admission policy](/docs/reference/access-authn-authz/validating-admission-policy/) | Intercept API requests before admission and validate against CEL expressions. | * Validate critical configurations before resource admission. * Enforce policy logic using CEL expressions. | In general, use \_webhook\_ admission control when you want an extensible way to declare or configure the logic. Use built-in CEL-based admission control when you want to declare simpler logic without the overhead of running a webhook server. The Kubernetes project recommends that you use CEL-based admission control when possible. ### Use built-in validation and defaulting for CustomResourceDefinitions {#no-crd-validation-defaulting} If you use {{< glossary\_tooltip text="CustomResourceDefinitions" term\_id="customresourcedefinition" >}}, don't use admission webhooks to validate values in CustomResource specifications or to set default values for fields. Kubernetes lets you define validation rules and default field values when you create CustomResourceDefinitions. To learn more, see the following resources: \* [Validation rules](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) \* [Defaulting](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting) ## Performance and latency {#performance-latency} This section describes recommendations for improving performance and reducing latency. In summary, these are as follows: \* Consolidate webhooks and limit the number of API calls per webhook. \* Use audit logs to check for webhooks that repeatedly do the same action. \* Use load balancing for webhook availability. \* Set a small timeout value for each webhook. \* Consider cluster availability needs during webhook design. ### Design admission webhooks for low latency {#design-admission-webhooks-low-latency} Mutating admission webhooks are called in sequence. Depending on the mutating webhook setup, some webhooks might be called multiple times. Every mutating webhook call adds latency to the admission process. This is unlike validating webhooks, which get called in parallel. When designing your mutating webhooks, consider your latency requirements and tolerance. The more mutating webhooks there are in your cluster, the greater the chance of latency increases. Consider the following to reduce latency: \* Consolidate webhooks that perform a similar mutation on different objects. \* Reduce the number of API calls made in the mutating webhook server logic. \* Limit the match conditions of each mutating webhook to reduce how many webhooks are triggered by a specific API request. \* Consolidate small webhooks into one server and configuration to help with ordering and organization. ### Prevent loops caused by competing controllers {#prevent-loops-competing-controllers} Consider any other components that run in your cluster that might conflict with the mutations that your webhook makes. For example, if your webhook adds a label that a different controller removes, your webhook gets called again. This leads to a loop. To detect these loops, try the following: 1. Update your cluster audit policy to log audit events. Use the following parameters: \* `level`: `RequestResponse` \* `verbs`: `["patch"]` \* `omitStages`: `RequestReceived` Set the audit rule to create events for the specific resources that your webhook mutates. 1. Check your audit events for webhooks being reinvoked multiple times with the same patch being applied to the same object, or for an object having a field updated and reverted multiple times. ### Set a small timeout value {#small-timeout} Admission webhooks should evaluate as quickly as possible (typically in milliseconds), since they add to API request latency. Use a small timeout for webhooks. For details, see [Timeouts](/docs/reference/access-authn-authz/extensible-admission-controllers/#timeouts). ### Use a load balancer to ensure webhook availability {#load-balancer-webhook} Admission webhooks should leverage some form of load-balancing to provide high availability and performance benefits. If a webhook is running within the cluster, you can run multiple webhook backends behind a Service of type `ClusterIP`. ### Use a high-availability deployment model {#ha-deployment} Consider your cluster's availability
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.047720108181238174, 0.11234614253044128, 0.01478908583521843, -0.03896143287420273, -0.011690781451761723, -0.04119063913822174, 0.01941114291548729, -0.013768376782536507, 0.04315286502242088, 0.025615062564611435, -0.02235531434416771, -0.12760166823863983, 0.043281570076942444, -0.003016052069142461, 0.05769939348101616, -0.06321430951356888, 0.06394454836845398, -0.02638198435306549, -0.05585915222764015, -0.07506012916564941, 0.08101552724838257, -0.02226393297314644, -0.028704864904284477, 0.03419306129217148, -0.08028126507997513, -0.07446957379579544, 0.02987716533243656, 0.03663848340511322, 0.07124774158000946, 0.005531522445380688, 0.018241021782159805, -0.02767566591501236, -0.09387509524822235, 0.04294257611036301, 0.02860911376774311, 0.06373511999845505, 0.018316159024834633, -0.06901058554649353, -0.059470485895872116, 0.0564442053437233, 0.03191937878727913, -0.10087258368730545, -0.0958898738026619, -0.018740171566605568, 0.030772864818572998, -0.033572252839803696, -0.07633014768362045, -0.07978330552577972, -0.06825854629278183, 0.04907267540693283, 0.03429671749472618, -0.062373317778110504, 0.016633398830890656, 0.02627667784690857, 0.0015168230747804046, 0.03827030584216118, -0.0473458357155323, 0.05288131162524223, 0.031975701451301575, -0.029071155935525894, 0.0003205937100574374, -0.09733718633651733, 0.05717039480805397, -0.01907663606107235, -0.059649646282196045, 0.05459636449813843, -0.06262563169002533, 0.014451795257627964, 0.04924068972468376, 0.04055683687329292, -0.0017719152383506298, -0.02348436415195465, -0.012265888974070549, -0.00393682811409235, -0.021584896370768547, -0.006643889006227255, -0.06274276226758957, 0.02738003432750702, 0.05745713412761688, -0.11865111440420151, 0.01626921258866787, 0.02243232913315296, 0.03091336414217949, 0.04616671800613403, -0.01805310696363449, 0.038304686546325684, -0.016231542453169823, -0.026029471307992935, 0.05329325795173645, 0.017566658556461334, 0.12476716190576553, -0.06478552520275116, -0.037579648196697235, -0.03918585181236267, 0.06631851941347122, 0.013156382367014885, -0.04405147582292557, -0.04358774796128273, 0.017182672396302223, 0.028851591050624847, -0.009439242072403431, -0.02052435837686062, -0.025081798434257507, 0.0020654278341680765, 0.09878960996866226, -0.10239262878894806, 0.0645553469657898, -0.0026332722045481205, 0.03459400683641434, 0.024786585941910744, -0.016274703666567802, 0.024015825241804123, 0.07706519216299057, -0.0016146859852597117, 0.009698613546788692, 0.1333419531583786, 0.038552176207304, 0.0009783688001334667, 0.06446810066699982, 0.04601337015628815, -0.014512132853269577, -0.0072173671796917915, 0.05498132482171059, -0.0007934971945360303, -0.010290161706507206, -0.0391228124499321, -0.03498682379722595, 6.17243267409152e-33, -0.0012328801676630974, 0.04015510156750679, -0.06519723683595657, -0.07542421668767929, -0.06704949587583542, -0.12553641200065613, -0.004585012327879667, -0.03408912569284439, -0.04310283809900284, -0.06854041665792465, 0.027824735268950462, 0.07903803139925003, -0.016146941110491753, -0.05272622033953667, 0.04172494262456894, 0.06191406771540642, -0.10044464468955994, 0.08381511270999908, 0.06902594864368439, 0.035111427307128906, 0.0841020941734314, -0.1382625699043274, -0.02847610041499138, 0.02745606191456318, 0.005643527023494244, -0.03535822778940201, -0.07472172379493713, -0.0009195136954076588, -0.028808539733290672, 0.038866739720106125, 0.014086104929447174, -0.0746275931596756, 0.04555588215589523, 0.02651231549680233, -0.07776293903589249, -0.011382127180695534, -0.055469464510679245, 0.0002347910776734352, 0.007289462722837925, -0.10621419548988342, -0.025627566501498222, -0.06191134825348854, -0.025439416989684105, 0.029269982129335403, -0.002822305541485548, -0.007863602600991726, -0.020393822342157364, -0.11677180230617523, 0.0782260149717331, -0.031225526705384254, -0.026601871475577354, -0.02875375747680664, 0.028968099504709244, -0.028341248631477356, -0.0346076600253582, -0.04536258801817894, 0.030417000874876976, -0.06124290078878403, -0.06969686597585678, -0.016615791246294975, -0.008553581312298775, -0.07044599205255508, -0.062397003173828125, 0.00082746846601367, 0.022107694298028946, -0.030711064115166664, -0.07386685907840729, 0.0351162813603878, -0.05980649217963219, -0.12504032254219055, -0.06719255447387695, -0.003830969100818038, 0.003381325164809823, 0.004719090182334185, -0.003672556020319462, -0.07021499425172806, 0.08573316037654877, 0.10858145356178284, -0.10561887174844742, 0.007907134480774403, 0.08936818689107895, 0.027287494391202927, -0.03417827934026718, 0.061250559985637665, 0.035876888781785965, -0.02585502341389656, 0.023093214258551598, -0.04145316034555435, -0.05930359661579132, 0.05069404095411301, -0.016482416540384293, -0.030584102496504784, -0.03425178676843643, 0.03786255046725273, -0.04081222042441368, -6.802059774486585e-33, 0.12677966058254242, 0.022307956591248512, 0.013204306364059448, 0.004989221692085266, 0.02764931693673134, 0.055423710495233536, 0.07818660140037537, 0.0033171235118061304, 0.048297759145498276, -0.07971960306167603, 0.07437744736671448, -0.02104293182492256, 0.02776140160858631, 0.019826561212539673, -0.059245333075523376, -0.005487209185957909, -0.09751620143651962, -0.002436760812997818, 0.06168798729777336, 0.039599787443876266, 0.0733255073428154, 0.0005323479999788105, -0.0018381297122687101, 0.020961809903383255, 0.03292214497923851, 0.01746826060116291, -0.04262739047408104, 0.06171490252017975, -0.048367999494075775, 0.020773299038410187, 0.007214966230094433, -0.0473465658724308, -0.019096489995718002, 0.03363805264234543, 0.010068497620522976, -0.12588782608509064, 0.0037334987428039312, 0.07431021332740784, -0.007170015946030617, 0.025846168398857117, 0.0890253484249115, -0.03814175724983215, -0.04323803260922432, -0.008447508327662945, -0.023724766448140144, 0.05168608948588371, 0.02237636409699917, -0.06692912429571152, -0.0745534747838974, -0.06944557279348373, -0.03025169111788273, 0.04888743534684181, 0.006740901619195938, 0.07992210239171982, -0.016553303226828575, 0.09648105502128601, 0.05419696867465973, 0.024233853444457054, -0.02640891633927822, 0.03619639575481415, -0.03285505622625351, -0.017208382487297058, 0.0421706847846508, 0.07090899348258972, -0.018669111654162407, -0.025804731994867325, -0.060896795243024826, 0.07615411281585693, 0.029746484011411667, 0.023577174171805382, -0.009040621109306812, -0.03425263613462448, -0.022924555465579033, -0.009442279115319252, 0.023163342848420143, -0.05064013972878456, 0.06322222948074341, -0.03504791483283043, -0.006561840884387493, -0.019879771396517754, -0.08555494993925095, 0.08257918804883957, 0.01718873530626297, 0.03459171950817108, 0.0378405824303627, 0.057897236198186874, -0.01651059277355671, 0.027387134730815887, 0.003726382739841938, 0.08028292655944824, -0.045098792761564255, 0.015923650935292244, 0.011814240366220474, 0.007903841324150562, -0.04875773563981056, -5.111967382731564e-8, -0.0482487678527832, -0.00797465443611145, 0.07549852132797241, 0.07516394555568695, 0.07527252286672592, -0.027139227837324142, -0.018584420904517174, -0.07474236190319061, -0.036111149936914444, -0.017835723236203194, -0.03526413440704346, 0.06306003779172897, -0.01818441040813923, -0.05259839445352554, -0.0892789363861084, 0.027319762855768204, -0.01875513792037964, 0.02026025578379631, 0.03124580718576908, -0.020178044214844704, -0.010117904283106327, -0.03529408201575279, 0.03833969309926033, 0.005865067709237337, 0.0659368708729744, 0.127857506275177, 0.056273963302373886, 0.007420887239277363, 0.005211491137742996, 0.0804419293999672, -0.03365308791399002, -0.02124142460525036, -0.026184454560279846, 0.049949921667575836, -0.009966797195374966, 0.047348443418741226, -0.1336003988981247, -0.014822046272456646, -0.00022777971753384918, 0.023231245577335358, -0.0036263708025217056, 0.04057867452502251, -0.005365611985325813, -0.006722441874444485, 0.09323514997959137, 0.08654027432203293, 0.008506187237799168, -0.033394720405340195, 0.06129854917526245, 0.0064552598632872105, -0.02427220717072487, -0.048409800976514816, 0.013080519624054432, 0.08676112443208694, -0.025759980082511902, -0.010270453058183193, 0.004508352838456631, -0.04841308668255806, 0.01781189627945423, 0.04093340039253235, 0.06418712437152863, 0.004314088262617588, 0.059710144996643066, -0.0034164022654294968 ]
0.083833
ensure webhook availability {#load-balancer-webhook} Admission webhooks should leverage some form of load-balancing to provide high availability and performance benefits. If a webhook is running within the cluster, you can run multiple webhook backends behind a Service of type `ClusterIP`. ### Use a high-availability deployment model {#ha-deployment} Consider your cluster's availability requirements when designing your webhook. For example, during node downtime or zonal outages, Kubernetes marks Pods as `NotReady` to allow load balancers to reroute traffic to available zones and nodes. These updates to Pods might trigger your mutating webhooks. Depending on the number of affected Pods, the mutating webhook server has a risk of timing out or causing delays in Pod processing. As a result, traffic won't get rerouted as quickly as you need. Consider situations like the preceding example when writing your webhooks. Exclude operations that are a result of Kubernetes responding to unavoidable incidents. ## Request filtering {#request-filtering} This section provides recommendations for filtering which requests trigger specific webhooks. In summary, these are as follows: \* Limit the webhook scope to avoid system components and read-only requests. \* Limit webhooks to specific namespaces. \* Use match conditions to perform fine-grained request filtering. \* Match all versions of an object. ### Limit the scope of each webhook {#webhook-limit-scope} Admission webhooks are only called when an API request matches the corresponding webhook configuration. Limit the scope of each webhook to reduce unnecessary calls to the webhook server. Consider the following scope limitations: \* Avoid matching objects in the `kube-system` namespace. If you run your own Pods in the `kube-system` namespace, use an [`objectSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector) to avoid mutating a critical workload. \* Don't mutate node leases, which exist as Lease objects in the `kube-node-lease` system namespace. Mutating node leases might result in failed node upgrades. Only apply validation controls to Lease objects in this namespace if you're confident that the controls won't put your cluster at risk. \* Don't mutate TokenReview or SubjectAccessReview objects. These are always read-only requests. Modifying these objects might break your cluster. \* Limit each webhook to a specific namespace by using a [`namespaceSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector). ### Filter for specific requests by using match conditions {#filter-match-conditions} Admission controllers support multiple fields that you can use to match requests that meet specific criteria. For example, you can use a `namespaceSelector` to filter for requests that target a specific namespace. For more fine-grained request filtering, use the `matchConditions` field in your webhook configuration. This field lets you write multiple CEL expressions that must evaluate to `true` for a request to trigger your admission webhook. Using `matchConditions` might significantly reduce the number of calls to your webhook server. For details, see [Matching requests: `matchConditions`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions). ### Match all versions of an API {#match-all-versions} By default, admission webhooks run on any API versions that affect a specified resource. The `matchPolicy` field in the webhook configuration controls this behavior. Specify a value of `Equivalent` in the `matchPolicy` field or omit the field to allow the webhook to run on any API version. For details, see [Matching requests: `matchPolicy`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchpolicy). ## Mutation scope and field considerations {#mutation-scope-considerations} This section provides recommendations for the scope of mutations and any special considerations for object fields. In summary, these are as follows: \* Patch only the fields that you need to patch. \* Don't overwrite array values. \* Avoid side effects in mutations when possible. \* Avoid self-mutations. \* Fail open and validate the final state. \* Plan for future field updates in later versions. \* Prevent webhooks from self-triggering. \* Don't change immutable objects. ### Patch only required fields {#patch-required-fields} Admission webhook servers send HTTP responses to indicate what to
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ 0.004616522695869207, 0.04048219323158264, 0.0558365099132061, 0.009860585443675518, -0.01857439987361431, -0.06749074906110764, -0.04087206721305847, -0.04586804285645485, 0.01944071799516678, 0.06294310837984085, -0.03239431604743004, -0.06190933287143707, -0.021790659055113792, -0.09120194613933563, 0.07392161339521408, -0.009525234811007977, 0.06656039506196976, -0.011512755416333675, -0.03950798884034157, -0.03831981495022774, -0.02223711647093296, -0.02342039719223976, -0.02512619085609913, 0.025408484041690826, -0.060889892280101776, 0.023056859150528908, -0.020880041643977165, -0.025836782529950142, -0.017667710781097412, -0.00829320214688778, -0.07444807887077332, -0.04507944732904434, -0.006845164578408003, 0.055532056838274, -0.018051709979772568, 0.10560200363397598, -0.005635337438434362, -0.03880777955055237, -0.029944391921162605, 0.07823193818330765, 0.050060342997312546, -0.07353644073009491, -0.05482838302850723, -0.05081424117088318, -0.02757110446691513, -0.04541345313191414, -0.07831908762454987, -0.015784386545419693, -0.019711673259735107, -0.016679376363754272, 0.028978955000638962, -0.09663883596658707, 0.017633842304348946, 0.09852568805217743, 0.021330496296286583, 0.007732264697551727, 0.0014087246963754296, 0.04512897506356239, 0.07228443771600723, -0.026928238570690155, 0.04314911365509033, -0.0651111975312233, 0.10971913486719131, -0.04908091574907303, -0.006225135643035173, -0.03581025078892708, 0.024690819904208183, 0.04513686150312424, 0.05908549576997757, 0.02798653393983841, 0.07616312801837921, 0.043357234448194504, -0.014299539849162102, -0.026864398270845413, -0.05049159377813339, 0.0224933885037899, 0.03464844450354576, 0.04488615691661835, 0.06548213213682175, 0.01712987944483757, 0.02844160422682762, 0.015203475952148438, 0.05741005763411522, 0.00680531794205308, -0.06073182448744774, -0.035743530839681625, -0.026901142671704292, -0.0744967833161354, -0.04043448343873024, -0.006251309532672167, 0.04447843134403229, 0.00607276801019907, 0.052217353135347366, -0.0713861957192421, 0.01949402503669262, -0.007534447126090527, -0.030318422242999077, -0.0023472157772630453, 0.01786019839346409, -0.0026689935475587845, 0.028208386152982712, 0.013562853448092937, 0.028682131320238113, -0.011650757864117622, 0.06032140925526619, -0.08979309350252151, 0.010020367801189423, -0.038479793816804886, 0.05726955085992813, 0.049784187227487564, -0.00318750343285501, 0.0254839975386858, 0.025292376056313515, 0.06746527552604675, -0.03754076361656189, 0.1092592105269432, 0.03199257329106331, -0.041638076305389404, 0.0051323832012712955, 0.0681082010269165, 0.014326038770377636, -0.050219595432281494, 0.035860612988471985, -0.012719196267426014, 0.029940243810415268, 0.03834571689367294, -0.012147855013608932, 7.104856833682836e-33, 0.004899006336927414, -0.021180083975195885, -0.03188007324934006, -0.10809158533811569, 0.03333858773112297, -0.10768184810876846, -0.019573505967855453, -0.03961329534649849, -0.0037262297701090574, -0.10060365498065948, -0.04026792570948601, 0.0563613623380661, 0.02243102714419365, -0.04688985273241997, 0.007134482730180025, -0.046180225908756256, -0.039857421070337296, 0.02779107727110386, 0.09366761893033981, 0.0026692424435168505, 0.04044323042035103, -0.16215047240257263, -0.09005241841077805, 0.038422778248786926, -0.014755908399820328, -0.01871500536799431, -0.009033448994159698, -0.07292183488607407, -0.03263796493411064, 0.05109509825706482, 0.00938012357801199, -0.045487046241760254, 0.021009130403399467, 0.009514683857560158, -0.1797262281179428, -0.05772686377167702, -0.1031104028224945, -0.008370178751647472, -0.028761982917785645, -0.09515907615423203, -0.05718081817030907, -0.023074107244610786, -0.034378670156002045, -0.0493280291557312, 0.06339581310749054, 0.008739988319575787, 0.040257591754198074, -0.06546209007501602, -0.01612382009625435, 0.010370361618697643, -0.06136149913072586, -0.055342886596918106, 0.034890756011009216, 0.020508872345089912, -0.029583707451820374, 0.023321975022554398, 0.08345982432365417, -0.06867631524801254, -0.04553863778710365, 0.02541927434504032, -0.007497681770473719, -0.045144032686948776, -0.0036970528308302164, -0.0021540347952395678, 0.07367134094238281, 0.035370178520679474, 0.01436273567378521, 0.09072686731815338, -0.07364893704652786, 0.038132499903440475, 0.02606293186545372, -0.003342028707265854, 0.018280556425452232, 0.0071256584487855434, -0.05802334472537041, -0.0487663708627224, 0.02849392034113407, 0.02372991293668747, -0.13353241980075836, 0.02386319451034069, 0.04908100888133049, -0.0009386269375681877, -0.03816305473446846, 0.035273272544145584, 0.028914164751768112, 0.01348261721432209, 0.058276429772377014, -0.041367046535015106, -0.10578830540180206, 0.11824449896812439, 0.007486993446946144, 0.020855918526649475, -0.056045930832624435, -0.015145806595683098, -0.06649067997932434, -7.021542936884338e-33, 0.06799699366092682, 0.0251633208245039, -0.05510091036558151, 0.021041054278612137, 0.03247055783867836, 0.05214352905750275, 0.020404482260346413, 0.03713103383779526, -0.006184419617056847, -0.07213670760393143, -0.01348007470369339, -0.060067158192396164, -0.022914038971066475, 0.025502623990178108, -0.07850665599107742, -0.002776572247967124, -0.009596265852451324, -0.04001139476895332, 0.06182537600398064, 0.024804867804050446, 0.024437129497528076, -0.06771653145551682, 0.018946101889014244, 0.023905444890260696, 0.007891841232776642, 0.005606110207736492, -0.030777372419834137, 0.044698406010866165, -0.056511398404836655, -0.0067049721255898476, 0.006883102469146252, -0.10466590523719788, 0.05949488282203674, 0.03322815150022507, 0.053193192929029465, -0.04489760845899582, -0.03060854598879814, 0.06089275702834129, 0.05799167603254318, -0.06487448513507843, 0.08988539129495621, -0.04198843613266945, -0.04157017543911934, -0.024631652981042862, -0.05636950954794884, 0.04301772266626358, -0.049865249544382095, 0.028689071536064148, -0.07551014423370361, -0.024797536432743073, -0.020012574270367622, 0.036929041147232056, -0.08802209794521332, 0.14306193590164185, -0.07752884924411774, 0.10552135109901428, 0.0058492450043559074, 0.05793716013431549, -0.09094938635826111, 0.04302928224205971, -0.010537680238485336, -0.02143302746117115, 0.004793959204107523, 0.061333559453487396, 0.034134700894355774, -0.04182175174355507, 0.026140131056308746, 0.035757459700107574, -0.0027479673735797405, 0.04816979169845581, 0.024240978062152863, 0.06299800425767899, 0.045192502439022064, 0.03712041303515434, -0.03771857172250748, -0.04063965380191803, -0.004157823510468006, -0.017360959202051163, 0.016558919101953506, -0.023768886923789978, -0.10192016512155533, 0.11540411412715912, 0.0003293278277851641, -0.008004840463399887, 0.03243495896458626, 0.0978240817785263, 0.05038522556424141, 0.04188022390007973, 0.05720636621117592, 0.0633855015039444, -0.004075565841048956, 0.014399991370737553, -0.0599256306886673, 0.05235598608851433, -0.04863433167338371, -4.7990507567874374e-8, 0.04658079147338867, 0.009901951998472214, 0.0166797898709774, 0.08833416551351547, 0.06482771039009094, -0.03830874338746071, 0.03153325989842415, 0.0017507346346974373, -0.0941656082868576, 0.038762256503105164, 0.009155690670013428, 0.056526511907577515, -0.03519788756966591, 0.03530440106987953, 0.0680423304438591, -0.02239345759153366, 0.0439540296792984, -0.0051701851189136505, -0.012205223552882671, -0.07764427363872528, -0.06843940168619156, -0.07501278072595596, 0.0284727793186903, 0.007420718669891357, 0.03883654996752739, 0.12760357558727264, 0.07442508637905121, -0.048126429319381714, 0.004130179528146982, -0.04845337197184563, -0.07803318649530411, -0.02800477296113968, -0.08584944158792496, 0.06380721181631088, -0.01572556421160698, 0.03317120671272278, -0.1741686314344406, 0.010136495344340801, -0.02622922882437706, 0.07751616835594177, -0.013791574165225029, 0.018874062225222588, 0.0033957394771277905, 0.0012844837037846446, 0.06657497584819794, 0.05366592854261398, -0.0039527020417153835, 0.026286398991942406, 0.050682198256254196, 0.058649737387895584, -0.02878962643444538, -0.07475098967552185, 0.040484558790922165, 0.06988997757434845, 0.006404754240065813, -0.017085222527384758, 0.009270548820495605, -0.03023499995470047, 0.04859603941440582, 0.060934536159038544, 0.06439708173274994, -0.022348668426275253, -0.026838842779397964, 0.0006497527356259525 ]
0.156369
in mutations when possible. \* Avoid self-mutations. \* Fail open and validate the final state. \* Plan for future field updates in later versions. \* Prevent webhooks from self-triggering. \* Don't change immutable objects. ### Patch only required fields {#patch-required-fields} Admission webhook servers send HTTP responses to indicate what to do with a specific Kubernetes API request. This response is an AdmissionReview object. A mutating webhook can add specific fields to mutate before allowing admission by using the `patchType` field and the `patch` field in the response. Ensure that you only modify the fields that require a change. For example, consider a mutating webhook that's configured to ensure that `web-server` Deployments have at least three replicas. When a request to create a Deployment object matches your webhook configuration, the webhook should only update the value in the `spec.replicas` field. ### Don't overwrite array values {#dont-overwrite-arrays} Fields in Kubernetes object specifications might include arrays. Some arrays contain key:value pairs (like the `envVar` field in a container specification), while other arrays are unkeyed (like the `readinessGates` field in a Pod specification). The order of values in an array field might matter in some situations. For example, the order of arguments in the `args` field of a container specification might affect the container. Consider the following when modifying arrays: \* Whenever possible, use the `add` JSONPatch operation instead of `replace` to avoid accidentally replacing a required value. \* Treat arrays that don't use key:value pairs as sets. \* Ensure that the values in the field that you modify aren't required to be in a specific order. \* Don't overwrite existing key:value pairs unless absolutely necessary. \* Use caution when modifying label fields. An accidental modification might cause label selectors to break, resulting in unintended behavior. ### Avoid side effects {#avoid-side-effects} Ensure that your webhooks operate only on the content of the AdmissionReview that's sent to them, and do not make out-of-band changes. These additional changes, called \_side effects\_, might cause conflicts during admission if they aren't reconciled properly. The `.webhooks[].sideEffects` field should be set to `None` if a webhook doesn't have any side effect. If side effects are required during the admission evaluation, they must be suppressed when processing an AdmissionReview object with `dryRun` set to `true`, and the `.webhooks[].sideEffects` field should be set to `NoneOnDryRun`. For details, see [Side effects](/docs/reference/access-authn-authz/extensible-admission-controllers/#side-effects). ### Avoid self-mutations {#avoid-self-mutation} A webhook running inside the cluster might cause deadlocks for its own deployment if it is configured to intercept resources required to start its own Pods. For example, a mutating admission webhook is configured to admit \*\*create\*\* Pod requests only if a certain label is set in the Pod (such as `env: prod`). The webhook server runs in a Deployment that doesn't set the `env` label. When a node that runs the webhook server Pods becomes unhealthy, the webhook Deployment tries to reschedule the Pods to another node. However, the existing webhook server rejects the requests since the `env` label is unset. As a result, the migration cannot happen. Exclude the namespace where your webhook is running with a [`namespaceSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector). ### Avoid dependency loops {#avoid-dependency-loops} Dependency loops can occur in scenarios like the following: \* Two webhooks check each other's Pods. If both webhooks become unavailable at the same time, neither webhook can start. \* Your webhook intercepts cluster add-on components, such as networking plugins or storage plugins, that your webhook depends on. If both the webhook and the dependent add-on become unavailable, neither component can function. To avoid these dependency loops, try the following: \* Use [ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/) to avoid introducing dependencies. \* Prevent webhooks from validating or
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.05902335047721863, 0.07928898185491562, 0.05426893010735512, -0.03870752081274986, -0.00088381243404001, -0.07824189960956573, -0.011519302614033222, -0.0573844276368618, 0.05124896764755249, 0.06105086952447891, -0.0059877075254917145, -0.07642016559839249, 0.01194149348884821, -0.07358966022729874, 0.062318697571754456, 0.037063006311655045, 0.0319792777299881, -0.02757861837744713, -0.07276196777820587, -0.008486966602504253, -0.009556673467159271, 0.004526413511484861, -0.020304270088672638, 0.05575665831565857, -0.10243061184883118, 0.004528108052909374, -0.01633727177977562, 0.0443376749753952, -0.010575919412076473, -0.06475740671157837, -0.05008552968502045, 0.018265249207615852, -0.08356690406799316, 0.043484002351760864, 0.0053128767758607864, 0.07416064292192459, -0.026960110291838646, -0.005518057383596897, -0.01837889663875103, 0.04508819058537483, 0.02972758188843727, -0.09696110337972641, -0.0885297954082489, 0.000454113760497421, 0.019918419420719147, -0.03079688921570778, -0.026044566184282303, -0.08138254284858704, -0.04428103566169739, -0.009495053440332413, -0.02922913432121277, -0.067865751683712, -0.023455725982785225, 0.08929947018623352, 0.07043982297182083, -0.030157728120684624, -0.020791679620742798, 0.08397277444601059, 0.025678375735878944, -0.024238448590040207, 0.0657123550772667, -0.05486806854605675, 0.09571492671966553, -0.008147492073476315, -0.004931642673909664, -0.011907888576388359, 0.05210249871015549, -0.035006023943424225, 0.09667015820741653, -0.010800840333104134, 0.03421171382069588, 0.027289003133773804, -0.042187489569187164, -0.017154445871710777, -0.00015686188999097794, 0.05977296829223633, -0.08447189629077911, 0.08553846925497055, 0.08807220309972763, -0.06484033167362213, -0.029323888942599297, -0.03650315850973129, 0.025241725146770477, -0.04523173347115517, -0.04152195155620575, -0.018611187115311623, -0.03461907431483269, -0.024054430425167084, 0.014307782053947449, 0.03044123947620392, 0.02417692542076111, -0.09435341507196426, 0.04835990443825722, -0.0645197182893753, 0.027820635586977005, 0.0546557754278183, -0.03193686529994011, -0.03537239879369736, 0.045050475746393204, 0.02212248370051384, -0.014256112277507782, -0.047210343182086945, 0.026478257030248642, 0.044442933052778244, 0.04428815096616745, -0.10682056099176407, 0.013147102668881416, -0.03371645510196686, -0.03454216197133064, -0.008825554512441158, -0.017203422263264656, 0.035885125398635864, 0.04449914023280144, 0.02616352029144764, -0.045281630009412766, 0.06309183686971664, 0.014729103073477745, -0.004508127924054861, -0.019549494609236717, 0.1042613685131073, 0.05702973157167435, -0.028099248185753822, 0.05593593418598175, 0.020672081038355827, -0.08593762665987015, 0.05114687979221344, -0.03138600289821625, 4.7481758006444045e-33, 0.05042140185832977, 0.0628284364938736, -0.009664511308073997, -0.04200758412480354, -0.016035495325922966, -0.10456482321023941, -0.010252191685140133, -0.054706379771232605, -0.020291268825531006, -0.10571900755167007, -0.01190037839114666, 0.029015688225626945, 0.022520843893289566, -0.047799255698919296, 0.03670289367437363, -0.01948942057788372, -0.07235519587993622, 0.06728959083557129, 0.08047117292881012, 0.02867099456489086, 0.09710201621055603, -0.0884387344121933, -0.07796905189752579, -0.003950558602809906, 0.03739617019891739, -0.0035641840659081936, -0.04193628951907158, -0.010256573557853699, -0.057016827166080475, 0.035971686244010925, 0.010061975568532944, -0.011166642419993877, 0.022828297689557076, 0.04220684617757797, -0.10930425673723221, -0.053129762411117554, -0.04957609251141548, -0.050661105662584305, -0.03365427628159523, -0.10654239356517792, 0.004009089432656765, -0.017772052437067032, -0.028373925015330315, -0.0033728666603565216, 0.11454589664936066, -0.021171579137444496, 0.05239604413509369, -0.04201613739132881, 0.01814090460538864, -0.05221451446413994, -0.013972465880215168, -0.03746552765369415, 0.056253086775541306, -0.06429670006036758, 0.004682866390794516, -0.003922468051314354, 0.0975576862692833, -0.12272146344184875, -0.06559333205223083, 0.0027607623487710953, 0.008984401822090149, -0.05368673428893089, -0.04322538524866104, 0.011490188539028168, 0.03149791434407234, -0.020156096667051315, 0.014771183021366596, 0.010883810929954052, -0.08431992679834366, -0.00116466183681041, -0.00007200337131507695, 0.007434029132127762, -0.12209676206111908, -0.000949069217313081, -0.0747125893831253, -0.11470921337604523, 0.031109720468521118, 0.069981649518013, -0.10256465524435043, 0.0021428903564810753, 0.03528406471014023, 0.027031799778342247, -0.1105477437376976, 0.08091482520103455, -0.03513067588210106, -0.029140925034880638, 0.03689523786306381, -0.008528096601366997, -0.054922979325056076, 0.02908160164952278, 0.06869801878929138, -0.033751167356967926, -0.06518876552581787, -0.021225908771157265, 0.003224308369681239, -5.343386263157316e-33, 0.037899795919656754, -0.027774356305599213, -0.021739492192864418, 0.05194231867790222, 0.017131322994828224, 0.03408322110772133, 0.05931135639548302, 0.06415233761072159, 0.04918549209833145, -0.1196799948811531, -0.001247837906703353, -0.02511666528880596, -0.03144556283950806, -0.03968808427453041, -0.12242627143859863, -0.025153426453471184, -0.08889006823301315, -0.04508035257458687, 0.049923475831747055, 0.011680598370730877, 0.07751572877168655, 0.008500922471284866, 0.005807846784591675, 0.04107200726866722, 0.012666379101574421, 0.004111511167138815, -0.06142987683415413, 0.059044040739536285, 0.011843533255159855, -0.017116636037826538, 0.0018128925003111362, -0.06375902891159058, -0.033047597855329514, 0.05310535058379173, 0.06364219635725021, -0.0361749529838562, 0.03728794306516647, 0.05551022291183472, 0.008288110606372356, 0.010188309475779533, 0.053166862577199936, -0.002438182942569256, -0.032658111304044724, 0.08120724558830261, 0.005047096870839596, 0.04882722347974777, 0.015405594371259212, -0.025289390236139297, 0.007695671636611223, -0.09786265343427658, -0.027658797800540924, 0.06208735704421997, -0.028807077556848526, 0.06575668603181839, -0.06116422265768051, 0.10567882657051086, 0.01389803271740675, 0.013084463775157928, -0.03581701219081879, 0.04963218420743942, -0.011517227627336979, -0.03849690034985542, 0.07814928144216537, 0.06821423768997192, -0.019713088870048523, -0.01959935948252678, -0.026211906224489212, 0.02260144241154194, 0.014790795743465424, 0.030031315982341766, 0.04960061237215996, -0.03980397805571556, -0.011383400298655033, -0.05241775140166283, 0.02807476930320263, -0.12077859789133072, 0.001376964501105249, -0.0037686461582779884, 0.030375991016626358, -0.004114584531635046, -0.08155746757984161, 0.05855795741081238, -0.010106685571372509, 0.02331257238984108, 0.04681333526968956, 0.021169403567910194, 0.0507332980632782, 0.0647805854678154, 0.027225295081734657, 0.021517885848879814, -0.07511850446462631, 0.026306027546525, -0.09000767767429352, 0.051324665546417236, -0.09478159248828888, -5.152649507067508e-8, 0.0032222550362348557, 0.003474667901173234, 0.01250848826020956, 0.11168515682220459, 0.08931049704551697, -0.005399750545620918, -0.029129983857274055, -0.002744736848399043, -0.011766926385462284, -0.01244555413722992, -0.0198264978826046, 0.12105202674865723, 0.010946985334157944, 0.025867506861686707, 0.03666278347373009, 0.022196639329195023, -0.011891817674040794, 0.01848818175494671, -0.0022488636896014214, -0.05020877346396446, -0.06238600239157677, -0.028770187869668007, 0.020416580140590668, -0.01771777868270874, 0.07888607680797577, 0.11188822984695435, 0.1004524752497673, -0.004464184399694204, 0.0632316917181015, 0.0713212788105011, -0.004893175326287746, -0.05170693248510361, 0.010797928087413311, 0.11709606647491455, -0.03481488302350044, 0.019527534022927284, -0.11229927092790604, 0.042467642575502396, 0.0056524984538555145, 0.053100425750017166, 0.020722992718219757, 0.031231297180056572, -0.05651372671127319, 0.023420026525855064, 0.0448693111538887, 0.04164309427142143, 0.004090122878551483, -0.00917766336351633, -0.03404650092124939, -0.009193348698318005, 0.0038258025888353586, -0.05799907445907593, -0.011782612651586533, 0.09258191287517548, -0.04335349425673485, 0.028720133006572723, 0.0691034123301506, -0.029629060998558998, 0.1060774028301239, 0.02876453660428524, 0.05333675071597099, -0.00837227888405323, 0.025800740346312523, 0.005673650186508894 ]
0.167056
cluster add-on components, such as networking plugins or storage plugins, that your webhook depends on. If both the webhook and the dependent add-on become unavailable, neither component can function. To avoid these dependency loops, try the following: \* Use [ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/) to avoid introducing dependencies. \* Prevent webhooks from validating or mutating other webhooks. Consider [excluding specific namespaces](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector) from triggering your webhook. \* Prevent your webhooks from acting on dependent add-ons by using an [`objectSelector`](/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector). ### Fail open and validate the final state {#fail-open-validate-final-state} Mutating admission webhooks support the `failurePolicy` configuration field. This field indicates whether the API server should admit or reject the request if the webhook fails. Webhook failures might occur because of timeouts or errors in the server logic. By default, admission webhooks set the `failurePolicy` field to Fail. The API server rejects a request if the webhook fails. However, rejecting requests by default might result in compliant requests being rejected during webhook downtime. Let your mutating webhooks "fail open" by setting the `failurePolicy` field to Ignore. Use a validating controller to check the state of requests to ensure that they comply with your policies. This approach has the following benefits: \* Mutating webhook downtime doesn't affect compliant resources from deploying. \* Policy enforcement occurs during validating admission control. \* Mutating webhooks don't interfere with other controllers in the cluster. ### Plan for future updates to fields {#plan-future-field-updates} In general, design your webhooks under the assumption that Kubernetes APIs might change in a later version. Don't write a server that takes the stability of an API for granted. For example, the release of sidecar containers in Kubernetes added a `restartPolicy` field to the Pod API. ### Prevent your webhook from triggering itself {#prevent-webhook-self-trigger} Mutating webhooks that respond to a broad range of API requests might unintentionally trigger themselves. For example, consider a webhook that responds to all requests in the cluster. If you configure the webhook to create Event objects for every mutation, it'll respond to its own Event object creation requests. To avoid this, consider setting a unique label in any resources that your webhook creates. Exclude this label from your webhook match conditions. ### Don't change immutable objects {#dont-change-immutable-objects} Some Kubernetes objects in the API server can't change. For example, when you deploy a {{< glossary\_tooltip text="static Pod" term\_id="static-pod" >}}, the kubelet on the node creates a {{< glossary\_tooltip text="mirror Pod" term\_id="mirror-pod" >}} in the API server to track the static Pod. However, changes to the mirror Pod don't propagate to the static Pod. Don't attempt to mutate these objects during admission. All mirror Pods have the `kubernetes.io/config.mirror` annotation. To exclude mirror Pods while reducing the security risk of ignoring an annotation, allow static Pods to only run in specific namespaces. ## Mutating webhook ordering and idempotence {#ordering-idempotence} This section provides recommendations for webhook order and designing idempotent webhooks. In summary, these are as follows: \* Don't rely on a specific order of execution. \* Validate mutations before admission. \* Check for mutations being overwritten by other controllers. \* Ensure that the set of mutating webhooks is idempotent, not just the individual webhooks. ### Don't rely on mutating webhook invocation order {#dont-rely-webhook-order} Mutating admission webhooks don't run in a consistent order. Various factors might change when a specific webhook is called. Don't rely on your webhook running at a specific point in the admission process. Other webhooks could still mutate your modified object. The following recommendations might help to minimize the risk of unintended changes: \* [Validate mutations before admission](#validate-mutations) \* Use a reinvocation policy to observe changes to an object by other plugins and re-run
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.07927469164133072, 0.06094605475664139, -0.046111948788166046, 0.014835321344435215, 0.04611983150243759, -0.049594249576330185, 0.01584779843688011, -0.06639308482408524, -0.03152007237076759, -0.017264965921640396, 0.03809110447764397, -0.09156633168458939, 0.016244443133473396, -0.017767323181033134, 0.06965415179729462, 0.0359499566257, 0.05202662944793701, -0.06586558371782303, -0.04337214305996895, -0.06428486108779907, 0.03584110736846924, -0.06965700536966324, -0.029726434499025345, 0.01647886447608471, -0.06280815601348877, -0.03872491046786308, -0.02510932646691799, -0.009137592278420925, 0.03403952717781067, 0.018390048295259476, 0.058931443840265274, -0.056458763778209686, -0.0770651176571846, 0.012932040728628635, 0.023319827392697334, 0.09642255306243896, 0.021068809553980827, -0.004828704986721277, -0.017947683110833168, 0.040116164833307266, 0.06209453567862511, 0.03290451318025589, 0.0002151552471332252, -0.09456776082515717, -0.00840284675359726, -0.11447625607252121, -0.08794239908456802, -0.08359819650650024, -0.08257841318845749, 0.017145615071058273, 0.009147623553872108, 0.010734030976891518, 0.006259526591747999, 0.04869814217090607, -0.0041460515931248665, 0.06250458210706711, -0.013507075607776642, 0.1173308789730072, -0.010503202676773071, -0.09934461116790771, 0.006992189213633537, -0.097318634390831, 0.07361102104187012, -0.05435502901673317, -0.05176154896616936, 0.0070146736688911915, -0.0343937873840332, -0.028636639937758446, 0.027521967887878418, 0.04669767990708351, -0.018165195360779762, 0.06136820837855339, -0.012252910993993282, -0.016992155462503433, -0.004949426744133234, 0.05144921690225601, -0.01181795820593834, 0.016878658905625343, 0.10765226185321808, -0.13948886096477509, -0.0015624344814568758, -0.007165459915995598, 0.02743491530418396, 0.02486804500222206, -0.025350365787744522, 0.036094699054956436, -0.03051120601594448, -0.05022768676280975, -0.03122030198574066, -0.0062811486423015594, 0.06825479120016098, -0.04693519324064255, -0.020200427621603012, -0.005797714460641146, 0.06301753968000412, -0.04846144840121269, -0.03634728491306305, 0.010728762485086918, -0.0658407136797905, 0.061945121735334396, -0.0776190310716629, -0.027718426659703255, 0.017880678176879883, -0.004118929151445627, 0.06017201393842697, -0.109078548848629, 0.04095751792192459, -0.04380982369184494, 0.0355701670050621, 0.01656065136194229, -0.007284488994628191, 0.0389997772872448, 0.03005557879805565, 0.031691331416368484, -0.048897337168455124, 0.0877348929643631, 0.07271592319011688, -0.07331915199756622, 0.02461756393313408, 0.057511091232299805, 0.012636593542993069, 0.024124618619680405, 0.09415921568870544, -0.05746801197528839, 0.025342270731925964, -0.027175305411219597, -0.04441722854971886, 4.224559556252294e-33, -0.03252333775162697, 0.007224386092275381, -0.022723570466041565, -0.03233621269464493, 0.04819578677415848, -0.0803084671497345, -0.005132271442562342, -0.02956918254494667, -0.03570540249347687, -0.0771397277712822, 0.015161370858550072, 0.08306397497653961, -0.0017754139844328165, -0.0675489753484726, 0.0617389976978302, -0.012214027345180511, 0.00003610285421018489, 0.02733212150633335, 0.0863870158791542, 0.0505531020462513, 0.08025790005922318, -0.10223089903593063, -0.05203760787844658, 0.04048015549778938, -0.04022495448589325, -0.04551069065928459, -0.06200011074542999, 0.024047667160630226, 0.0017409544670954347, 0.058319151401519775, 0.050148967653512955, 0.0037682335823774338, -0.004379676654934883, 0.02656896784901619, -0.06063445657491684, -0.045955341309309006, -0.034137967973947525, -0.022696899250149727, 0.00840961653739214, -0.1903204768896103, -0.05578291043639183, -0.06871519982814789, -0.00011735328007489443, 0.022722216323018074, 0.004459576215595007, -0.04062563553452492, 0.02069523185491562, -0.0369454100728035, 0.07897147536277771, 0.01856207102537155, -0.09114517271518707, -0.05391975864768028, 0.015739018097519875, -0.015485448762774467, -0.0652303695678711, -0.06562577188014984, -0.03777161240577698, -0.016414808109402657, 0.025184117257595062, -0.05536014586687088, 0.0725337490439415, -0.04005111753940582, -0.006194108631461859, 0.004224022384732962, 0.06973235309123993, 0.002574363723397255, -0.01985020749270916, -0.002569735050201416, -0.05355428159236908, -0.07267262041568756, -0.014683634974062443, -0.021357223391532898, -0.017462139949202538, 0.045205820351839066, -0.02487412467598915, -0.07681385427713394, 0.046327557414770126, 0.052461445331573486, -0.060366980731487274, 0.018017439171671867, 0.03536955639719963, -0.033172521740198135, -0.022552048787474632, 0.03047531098127365, -0.004613978322595358, -0.015742698684334755, -0.006066793110221624, -0.022518808022141457, -0.05271349847316742, 0.06387900561094284, 0.05442371591925621, -0.009026062674820423, 0.02609347179532051, -0.010065378621220589, -0.014908167533576488, -5.1385402094792084e-33, 0.07287543267011642, 0.022045301273465157, -0.004925914108753204, -0.03386949747800827, 0.07857397943735123, 0.08344538509845734, 0.0053037176840007305, -0.03026450052857399, 0.008125180378556252, -0.061083488166332245, 0.06245872378349304, -0.005300113931298256, 0.06536103785037994, 0.010579604655504227, -0.03246206417679787, 0.05300420522689819, -0.053518399596214294, -0.0014144163578748703, 0.13643932342529297, 0.03223496302962303, 0.10134582966566086, -0.0035119783133268356, 0.02462550438940525, 0.015324130654335022, 0.07043775171041489, 0.026805628091096878, -0.07220371812582016, 0.05312184616923332, -0.022235358133912086, 0.027134252712130547, 0.0020432083401829004, -0.01592336595058441, -0.02230190671980381, 0.03652617707848549, 0.021779602393507957, -0.0962911993265152, -0.04410644248127937, 0.07227285951375961, -0.05747559294104576, -0.056803248822689056, 0.09022252261638641, -0.11974218487739563, -0.05070209130644798, 0.02159309759736061, 0.0173333752900362, 0.024744439870119095, 0.036718860268592834, -0.01132246945053339, -0.09943781048059464, -0.00524603296071291, -0.06524031609296799, 0.02568531408905983, 0.02120307832956314, 0.11851734668016434, -0.022316431626677513, 0.20079544186592102, 0.07953272759914398, 0.021161817014217377, 0.014488456770777702, -0.00311861839145422, -0.01876373589038849, -0.004055427853018045, 0.0005764485104009509, 0.09610506147146225, 0.0010364929912611842, -0.04720620438456535, -0.017652172595262527, 0.060820288956165314, 0.05837259814143181, 0.046889934688806534, 0.03997029736638069, 0.02015860006213188, 0.04325588420033455, -0.039241280406713486, -0.0254228375852108, 0.029670465737581253, 0.014940953813493252, -0.029566403478384018, -0.024046776816248894, -0.06498166918754578, -0.11228207498788834, 0.05373571068048477, 0.04463548958301544, 0.023925527930259705, -0.005577268544584513, 0.00386186596006155, 0.02454318106174469, 0.023586032912135124, -0.010884461924433708, 0.0723651722073555, -0.02300652302801609, 0.015348699875175953, -0.04792535677552223, 0.005914074834436178, -0.06503095477819443, -5.3053490489674004e-8, 0.0034853790421038866, -0.04644901305437088, -0.02516261301934719, 0.008409461006522179, 0.11186867952346802, -0.055350352078676224, -0.004820757545530796, -0.04236249998211861, -0.09229955822229385, 0.03672276437282562, 0.02415040135383606, 0.09341534972190857, 0.020570792257785797, -0.024460069835186005, -0.0786786898970604, -0.022622235119342804, 0.018719742074608803, 0.00007256655226228759, 0.0022130529396235943, -0.025160841643810272, -0.030257482081651688, -0.11159451305866241, 0.05793510749936104, 0.0009463076130487025, 0.05048910528421402, 0.09581796824932098, 0.016646405681967735, -0.04162921383976936, -0.01720280945301056, 0.013127023354172707, -0.022203611209988594, -0.01899118907749653, -0.04529866948723793, 0.03988908231258392, -0.06446373462677002, 0.06430933624505997, -0.09910871088504791, -0.0014955711085349321, -0.020712871104478836, -0.021260028705000877, 0.03789456933736801, 0.07864352315664291, 0.042025379836559296, 0.02339152619242668, 0.08443385362625122, 0.07799617946147919, 0.013837526552379131, -0.03578053414821625, 0.06265449523925781, 0.052953243255615234, -0.06930312514305115, -0.011949928477406502, -0.009601611644029617, 0.05332689732313156, -0.0015469189966097474, -0.008216364309191704, 0.011364989914000034, -0.02740843966603279, 0.07790256291627884, 0.04684785380959511, 0.046620726585388184, -0.008381789550185204, 0.028097664937376976, -0.011076068505644798 ]
0.024749
running at a specific point in the admission process. Other webhooks could still mutate your modified object. The following recommendations might help to minimize the risk of unintended changes: \* [Validate mutations before admission](#validate-mutations) \* Use a reinvocation policy to observe changes to an object by other plugins and re-run the webhook as needed. For details, see [Reinvocation policy](/docs/reference/access-authn-authz/extensible-admission-controllers/#reinvocation-policy). ### Ensure that the mutating webhooks in your cluster are idempotent {#ensure-mutating-webhook-idempotent} Every mutating admission webhook should be \_idempotent\_. The webhook should be able to run on an object that it already modified without making additional changes beyond the original change. Additionally, all of the mutating webhooks in your cluster should, as a collection, be idempotent. After the mutation phase of admission control ends, every individual mutating webhook should be able to run on an object without making additional changes to the object. Depending on your environment, ensuring idempotence at scale might be challenging. The following recommendations might help: \* Use validating admission controllers to verify the final state of critical workloads. \* Test your deployments in a staging cluster to see if any objects get modified multiple times by the same webhook. \* Ensure that the scope of each mutating webhook is specific and limited. The following examples show idempotent mutation logic: 1. For a \*\*create\*\* Pod request, set the field `.spec.securityContext.runAsNonRoot` of the Pod to true. 1. For a \*\*create\*\* Pod request, if the field `.spec.containers[].resources.limits` of a container is not set, set default resource limits. 1. For a \*\*create\*\* Pod request, inject a sidecar container with name `foo-sidecar` if no container with the name `foo-sidecar` already exists. In these cases, the webhook can be safely reinvoked, or admit an object that already has the fields set. The following examples show non-idempotent mutation logic: 1. For a \*\*create\*\* Pod request, inject a sidecar container with name `foo-sidecar` suffixed with the current timestamp (such as `foo-sidecar-19700101-000000`). Reinvoking the webhook can result in the same sidecar being injected multiple times to a Pod, each time with a different container name. Similarly, the webhook can inject duplicated containers if the sidecar already exists in a user-provided pod. 1. For a \*\*create\*\*/\*\*update\*\* Pod request, reject if the Pod has label `env` set, otherwise add an `env: prod` label to the Pod. Reinvoking the webhook will result in the webhook failing on its own output. 1. For a \*\*create\*\* Pod request, append a sidecar container named `foo-sidecar` without checking whether a `foo-sidecar` container exists. Reinvoking the webhook will result in duplicated containers in the Pod, which makes the request invalid and rejected by the API server. ## Mutation testing and validation {#mutation-testing-validation} This section provides recommendations for testing your mutating webhooks and validating mutated objects. In summary, these are as follows: \* Test webhooks in staging environments. \* Avoid mutations that violate validations. \* Test minor version upgrades for regressions and conflicts. \* Validate mutated objects before admission. ### Test webhooks in staging environments {#test-in-staging-environments} Robust testing should be a core part of your release cycle for new or updated webhooks. If possible, test any changes to your cluster webhooks in a staging environment that closely resembles your production clusters. At the very least, consider using a tool like [minikube](https://minikube.sigs.k8s.io/docs/) or [kind](https://kind.sigs.k8s.io/) to create a small test cluster for webhook changes. ### Ensure that mutations don't violate validations {#ensure-mutations-dont-violate-validations} Your mutating webhooks shouldn't break any of the validations that apply to an object before admission. For example, consider a mutating webhook that sets the default CPU request of a Pod to a specific value. If the CPU limit of that Pod is set to
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.04863327741622925, 0.0316513329744339, -0.04739411175251007, 0.009925647638738155, 0.034351278096437454, -0.06831827759742737, 0.014075621031224728, -0.0485764741897583, -0.049276821315288544, 0.03663310036063194, 0.04237506911158562, -0.07215048372745514, 0.029497921466827393, -0.06984864175319672, 0.003704995848238468, 0.017607562243938446, 0.04603998363018036, -0.0030818083323538303, -0.0581124983727932, -0.010436465963721275, -0.03868315368890762, 0.004060713574290276, -0.020148158073425293, 0.024525603279471397, -0.08144836872816086, -0.0011619715951383114, 0.027818378061056137, 0.011982191354036331, 0.017900841310620308, -0.077224001288414, -0.006288302130997181, -0.022296274080872536, -0.07093298435211182, 0.01798790879547596, 0.019825972616672516, 0.09078521281480789, -0.00037395957042463124, -0.039346419274806976, -0.0015546672511845827, -0.02863156981766224, 0.08515837788581848, -0.027328675612807274, -0.05328255891799927, -0.019736263900995255, -0.0347757413983345, -0.08795486390590668, -0.07326827198266983, -0.07754535228013992, -0.08758974075317383, -0.0062817176803946495, 0.023371433839201927, -0.032928962260484695, -0.005512312054634094, 0.06021490693092346, -0.02611047960817814, 0.056003108620643616, 0.061935361474752426, 0.03682556748390198, 0.019892094656825066, -0.032796554267406464, 0.042779289186000824, -0.02658725529909134, 0.1020829901099205, -0.026059335097670555, -0.058882251381874084, -0.012095018289983273, 0.0659620463848114, -0.04702681303024292, 0.11506938934326172, -0.003358707530423999, 0.023967823013663292, 0.05362078547477722, -0.06523054838180542, -0.028667036443948746, -0.033635057508945465, 0.06355363875627518, -0.03764614462852478, 0.06417515128850937, 0.054295625537633896, -0.06996584683656693, 0.004139832220971584, -0.031170057132840157, 0.024724788963794708, -0.04445282369852066, 0.003772946074604988, 0.016939403489232063, -0.016505300998687744, -0.051090020686388016, 0.025111721828579903, 0.05027548596262932, 0.0523703433573246, -0.035745080560445786, 0.050881944596767426, -0.04635119065642357, 0.03235922381281853, -0.018682342022657394, -0.00919280108064413, -0.019624536857008934, 0.07606292515993118, 0.06280650943517685, -0.045148856937885284, -0.025706766173243523, 0.0025786494370549917, 0.048416800796985626, 0.0027564081829041243, -0.09859190136194229, 0.022882379591464996, -0.025377605110406876, 0.04341520741581917, 0.0021610273979604244, -0.015727419406175613, 0.032214414328336716, 0.07925692945718765, 0.030509479343891144, -0.04146874323487282, 0.08815105259418488, 0.0383172333240509, -0.04215468093752861, -0.04355296492576599, 0.13059115409851074, 0.059662267565727234, -0.006360417697578669, 0.08958505839109421, -0.022177953273057938, -0.009612314403057098, -0.004826421849429607, -0.07836119830608368, 5.196358735834326e-33, 0.024164138361811638, -0.003912768792361021, -0.0498509407043457, -0.042445164173841476, 0.044765423983335495, -0.07249384373426437, -0.0101120974868536, -0.01721602864563465, -0.014626900665462017, -0.11399352550506592, -0.01618216000497341, 0.03593079000711441, 0.02336958609521389, -0.025604670867323875, 0.05114641785621643, -0.03270953521132469, -0.019394028931856155, 0.07578318566083908, 0.04887305945158005, 0.03846190869808197, 0.055620092898607254, -0.06279033422470093, -0.09088531136512756, -0.04827276989817619, -0.017120204865932465, 0.04116756469011307, -0.046423446387052536, 0.027204101905226707, 0.014726771041750908, 0.04025966674089432, 0.07445864379405975, -0.017108317464590073, -0.04029335454106331, 0.10848479717969894, -0.09504883736371994, -0.03248896077275276, -0.014193208888173103, -0.05519157275557518, -0.008579044602811337, -0.15038472414016724, 0.02503397688269615, -0.01603841967880726, -0.030642282217741013, 0.004428497515618801, 0.04071936011314392, -0.01669817604124546, 0.019374359399080276, -0.011319084092974663, 0.012262564152479172, -0.06250867247581482, -0.0417923741042614, -0.03904596343636513, 0.01214015856385231, -0.005698076914995909, -0.09190645068883896, -0.060916416347026825, -0.0015733845066279173, -0.04945625364780426, 0.01462364662438631, -0.05995635688304901, 0.033122193068265915, -0.00590866943821311, -0.05410853400826454, 0.06481769680976868, 0.03642649203538895, -0.010699965991079807, 0.011906939558684826, -0.010075211524963379, -0.004723263438791037, -0.0031419640872627497, -0.049697745591402054, -0.01903907209634781, -0.0593547485768795, 0.05357620492577553, -0.07510924339294434, -0.10254035145044327, 0.04396103695034981, 0.07605725526809692, -0.10284838825464249, 0.010533650405704975, 0.05549629405140877, 0.04088297486305237, -0.0823613628745079, 0.011422271840274334, -0.006819952744990587, -0.03715616837143898, 0.009375428780913353, -0.024641942232847214, -0.07395564764738083, 0.03681856393814087, 0.1375313103199005, -0.005406886804848909, 0.02786407619714737, -0.00007097629713825881, -0.01222103089094162, -6.321702089546719e-33, 0.005218747071921825, -0.03657104820013046, -0.006997292395681143, 0.03389563411474228, 0.03971174359321594, 0.02368774078786373, -0.03379471227526665, 0.06170421093702316, -0.00562509847804904, -0.13758009672164917, 0.03723447397351265, -0.008535807952284813, 0.02800535224378109, -0.036293875426054, -0.04365774989128113, 0.011818346567451954, -0.05091630294919014, -0.05728374421596527, 0.0802765041589737, 0.010967173613607883, 0.06443269550800323, 0.02734760008752346, -0.0023434411268681288, -0.016315070912241936, 0.0663423165678978, -0.0066873012110590935, -0.06577941030263901, 0.058900561183691025, 0.0002095766831189394, -0.04558223485946655, -0.020543785765767097, -0.008142085745930672, -0.11042644083499908, 0.07187830656766891, 0.04177498072385788, -0.06267491728067398, 0.026035673916339874, 0.06273681670427322, -0.011818086728453636, 0.02150661125779152, 0.07108160853385925, -0.04936976358294487, -0.0500061921775341, 0.10279202461242676, 0.0561106875538826, 0.026541098952293396, -0.061094120144844055, -0.05755192041397095, -0.030309302732348442, 0.0033164427150040865, -0.04403873533010483, 0.050022803246974945, 0.04854260012507439, 0.05490383133292198, 0.009107548743486404, 0.08800578862428665, 0.08874411135911942, -0.029752561822533607, -0.04874274134635925, 0.05502275004982948, 0.010213789530098438, -0.019918343052268028, -0.011446382850408554, 0.13143503665924072, -0.0701097771525383, -0.029588298872113228, -0.031144550070166588, 0.006685192231088877, -0.019763078540563583, 0.007657346781343222, 0.028491659089922905, 0.029820559546351433, -0.022453878074884415, -0.04448135569691658, 0.014021886512637138, -0.14939436316490173, 0.008281653746962547, -0.0574604831635952, -0.028503941372036934, -0.018667034804821014, -0.12056335061788559, 0.07499953359365463, 0.033083345741033554, -0.032301049679517746, 0.010657680220901966, 0.0017271196702495217, 0.02212824486196041, 0.060956891626119614, 0.02270638942718506, 0.06732920557260513, -0.09945551306009293, 0.014754855073988438, -0.07992533594369888, -0.032377373427152634, -0.09847407042980194, -5.668408320502749e-8, -0.016270320862531662, 0.01793646439909935, 0.01491096056997776, 0.11989098787307739, 0.12487760186195374, -0.0022996733896434307, -0.08622755855321884, -0.006139296572655439, -0.05366835370659828, -0.025235045701265335, 0.016998430714011192, 0.10720174014568329, 0.046161457896232605, -0.005724170710891485, -0.032716840505599976, 0.018599998205900192, 0.024668393656611443, -0.010768282227218151, 0.013562995940446854, -0.011886692605912685, -0.07188478112220764, 0.008558047004044056, 0.0732763409614563, 0.02215530164539814, 0.034628063440322876, 0.08364295214414597, 0.12270005792379379, -0.017748834565281868, -0.010289872996509075, 0.05541984364390373, -0.08412997424602509, -0.021520404145121574, 0.021028881892561913, 0.11782839149236679, -0.0965670570731163, 0.020233163610100746, -0.09008627384901047, -0.0035373924765735865, -0.02074999175965786, 0.007133068051189184, 0.06637299060821533, 0.016798365861177444, 0.0011403645621612668, 0.003238686127588153, 0.04645315185189247, 0.015256674960255623, 0.009245420806109905, -0.049799636006355286, 0.07435022294521332, 0.022718556225299835, -0.026649923995137215, -0.01373186707496643, -0.022679299116134644, 0.07201182842254639, 0.05261649563908577, 0.023199478164315224, 0.044413257390260696, -0.00928729772567749, 0.09875804930925369, 0.06829697638750076, 0.028098220005631447, -0.0586281344294548, 0.02175205759704113, -0.026395553722977638 ]
0.127903
mutations don't violate validations {#ensure-mutations-dont-violate-validations} Your mutating webhooks shouldn't break any of the validations that apply to an object before admission. For example, consider a mutating webhook that sets the default CPU request of a Pod to a specific value. If the CPU limit of that Pod is set to a lower value than the mutated request, the Pod fails admission. Test every mutating webhook against the validations that run in your cluster. ### Test minor version upgrades to ensure consistent behavior {#test-minor-version-upgrades} Before upgrading your production clusters to a new minor version, test your webhooks and workloads in a staging environment. Compare the results to ensure that your webhooks continue to function as expected after the upgrade. Additionally, use the following resources to stay informed about API changes: \* [Kubernetes release notes](/releases/) \* [Kubernetes blog](/blog/) ### Validate mutations before admission {#validate-mutations} Mutating webhooks run to completion before any validating webhooks run. There is no stable order in which mutations are applied to objects. As a result, your mutations could get overwritten by a mutating webhook that runs at a later time. Add a validating admission controller like a ValidatingAdmissionWebhook or a ValidatingAdmissionPolicy to your cluster to ensure that your mutations are still present. For example, consider a mutating webhook that inserts the `restartPolicy: Always` field to specific init containers to make them run as sidecar containers. You could run a validating webhook to ensure that those init containers retained the `restartPolicy: Always` configuration after all mutations were completed. For details, see the following resources: \* [Validating Admission Policy](/docs/reference/access-authn-authz/validating-admission-policy/) \* [ValidatingAdmissionWebhooks](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook) ## Mutating webhook deployment {#mutating-webhook-deployment} This section provides recommendations for deploying your mutating admission webhooks. In summary, these are as follows: \* Gradually roll out the webhook configuration and monitor for issues by namespace. \* Limit access to edit the webhook configuration resources. \* Limit access to the namespace that runs the webhook server, if the server is in-cluster. ### Install and enable a mutating webhook {#install-enable-mutating-webhook} When you're ready to deploy your mutating webhook to a cluster, use the following order of operations: 1. Install the webhook server and start it. 1. Set the `failurePolicy` field in the MutatingWebhookConfiguration manifest to Ignore. This lets you avoid disruptions caused by misconfigured webhooks. 1. Set the `namespaceSelector` field in the MutatingWebhookConfiguration manifest to a test namespace. 1. Deploy the MutatingWebhookConfiguration to your cluster. Monitor the webhook in the test namespace to check for any issues, then roll the webhook out to other namespaces. If the webhook intercepts an API request that it wasn't meant to intercept, pause the rollout and adjust the scope of the webhook configuration. ### Limit edit access to mutating webhooks {#limit-edit-access} Mutating webhooks are powerful Kubernetes controllers. Use RBAC or another authorization mechanism to limit access to your webhook configurations and servers. For RBAC, ensure that the following access is only available to trusted entities: \* Verbs: \*\*create\*\*, \*\*update\*\*, \*\*patch\*\*, \*\*delete\*\*, \*\*deletecollection\*\* \* API group: `admissionregistration.k8s.io/v1` \* API kind: MutatingWebhookConfigurations If your mutating webhook server runs in the cluster, limit access to create or modify any resources in that namespace. ## Examples of good implementations {#example-good-implementations} {{% thirdparty-content %}} The following projects are examples of "good" custom webhook server implementations. You can use them as a starting point when designing your own webhooks. Don't use these examples as-is; use them as a starting point and design your webhooks to run well in your specific environment. \* [`cert-manager`](https://github.com/cert-manager/cert-manager/tree/master/internal/webhook) \* [Gatekeeper Open Policy Agent (OPA)](https://open-policy-agent.github.io/gatekeeper/website/docs/mutation) ## {{% heading "whatsnext" %}} \* [Use webhooks for authentication and authorization](/docs/reference/access-authn-authz/webhook/) \* [Learn about MutatingAdmissionPolicies](/docs/reference/access-authn-authz/mutating-admission-policy/) \* [Learn about ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.008461683988571167, 0.023727742955088615, 0.06662195175886154, -0.03627195209264755, 0.069978266954422, -0.11776565760374069, -0.07190228253602982, -0.043291784822940826, -0.022909538820385933, 0.025482309982180595, 0.022596869617700577, -0.0745776817202568, 0.0012187284883111715, -0.05274481698870659, 0.06006912142038345, 0.0004752731474582106, 0.056538015604019165, -0.01142958179116249, -0.05340365692973137, -0.013277127407491207, -0.03468138724565506, -0.028628816828131676, -0.00550885871052742, 0.041730571538209915, -0.03917500376701355, 0.00632444629445672, -0.04554782435297966, 0.002766973339021206, -0.003958103246986866, -0.04734976217150688, -0.04299410060048103, -0.012302682735025883, -0.04145222157239914, 0.025214487686753273, 0.09787949919700623, 0.07208866626024246, 0.021275511011481285, -0.04618456959724426, 0.007356643211096525, 0.07507157325744629, 0.041666917502880096, -0.08170738071203232, -0.0651378408074379, -0.021212220191955566, -0.030373208224773407, -0.04945865273475647, -0.04263792559504509, -0.0737425833940506, -0.07951018214225769, -0.004700883757323027, -0.014448296278715134, -0.0952378511428833, 0.006247072480618954, 0.04879214987158775, 0.010785653255879879, 0.004658295772969723, 0.028239626437425613, 0.027814511209726334, 0.06281381845474243, -0.024201340973377228, 0.05364302545785904, -0.08886315673589706, 0.10315493494272232, -0.050918105989694595, -0.018700595945119858, -0.031915582716464996, 0.061230745166540146, -0.0683017149567604, 0.08679528534412384, -0.013690055347979069, 0.021693360060453415, 0.011989826336503029, -0.017041392624378204, 0.012872236780822277, -0.023380229249596596, 0.09636813402175903, -0.03617551922798157, 0.055887553840875626, 0.10234061628580093, -0.06193876266479492, -0.037922441959381104, -0.03496738523244858, 0.035134684294462204, -0.06304147839546204, -0.058013468980789185, 0.030224982649087906, -0.012094077654182911, -0.04589623957872391, -0.039624981582164764, 0.03417558968067169, 0.07662712037563324, -0.05938659608364105, 0.043981071561574936, -0.015002417378127575, 0.03436901420354843, 0.017872722819447517, -0.05825541168451309, -0.048344746232032776, 0.07322962582111359, 0.03614599630236626, -0.03258882090449333, -0.02182520367205143, 0.05145329609513283, 0.03314053639769554, 0.052277497947216034, -0.07270266115665436, 0.021229367703199387, -0.03903381526470184, 0.004609324503690004, -0.005992812570184469, 0.0306969303637743, 0.0637584775686264, 0.08368555456399918, 0.04634100943803787, -0.008830808103084564, 0.07239937782287598, -0.009467260912060738, -0.029885519295930862, -0.04157350957393646, 0.11471647769212723, 0.06723680347204208, -0.019941551610827446, 0.07366244494915009, 0.007507461588829756, -0.07607696205377579, 0.0272515956312418, -0.05494627356529236, 3.9219289029750805e-33, 0.04172259941697121, 0.021682683378458023, -0.0003336691006552428, -0.04043610766530037, -0.016343381255865097, -0.09326118230819702, -0.01451854407787323, -0.033456165343523026, -0.06129800155758858, -0.11237163096666336, -0.04095671325922012, -0.00520735140889883, 0.02649614028632641, -0.08752437680959702, 0.062391720712184906, -0.01120950561016798, -0.054471276700496674, 0.04588751122355461, 0.0714239627122879, 0.04712020978331566, 0.09306073188781738, -0.11256019026041031, -0.06943509727716446, 0.0003614662273321301, -0.009153715334832668, 0.000838597072288394, -0.035848889499902725, -0.004917975980788469, -0.02909865975379944, 0.032781634479761124, -0.05359959602355957, -0.03764696419239044, 0.03148660063743591, 0.06623616814613342, -0.16010481119155884, -0.02485148422420025, -0.04136205464601517, -0.0434289276599884, -0.04579584673047066, -0.0914570763707161, -0.021127980202436447, -0.010551012121140957, -0.03118055686354637, -0.008654450066387653, 0.10715924948453903, 0.01665078103542328, 0.011492320336401463, -0.06110066547989845, 0.00599241117015481, -0.0564095601439476, -0.05151110887527466, -0.051581721752882004, 0.050840411335229874, -0.01587146520614624, -0.026367804035544395, -0.006516708061099052, 0.11864946037530899, -0.1035546064376831, -0.01769295148551464, -0.015867864713072777, 0.04096385836601257, -0.056935232132673264, -0.045456238090991974, -0.009887373074889183, 0.013125843368470669, 0.004850669763982296, 0.0235432256013155, 0.023479541763663292, -0.04640045017004013, 0.0404389388859272, 0.004171449691057205, -0.036394137889146805, -0.05875704810023308, 0.026281919330358505, -0.037146203219890594, -0.1083730012178421, 0.019368605688214302, 0.0560879111289978, -0.12334901839494705, -0.011508437804877758, 0.10658891499042511, 0.027610916644334793, -0.06363718211650848, 0.03717733919620514, -0.015282806009054184, -0.058501359075307846, 0.010398518294095993, 0.008039257489144802, -0.03570695221424103, 0.11162454634904861, 0.050223276019096375, -0.03599992021918297, -0.023229636251926422, -0.01296181045472622, -0.02928011491894722, -3.7161442905262384e-33, 0.031058412045240402, 0.0061978306621313095, -0.027753084897994995, 0.06326545029878616, -0.02189035154879093, -0.004853011574596167, 0.018099110573530197, 0.07351607084274292, -0.025109514594078064, -0.11694692820310593, 0.02701864019036293, -0.040277935564517975, -0.013847132213413715, -0.018185799941420555, -0.1101200208067894, -0.006028058938682079, -0.06924883276224136, -0.059315260499715805, 0.10370157659053802, 0.018530217930674553, 0.0863838642835617, 0.020719237625598907, -0.026944177225232124, 0.03597167134284973, 0.004971204325556755, 0.010052639991044998, -0.04392994940280914, 0.0892561748623848, -0.009023514576256275, -0.025350142270326614, 0.02272736094892025, -0.028115857392549515, -0.004695171024650335, 0.0980672538280487, 0.08745897561311722, -0.06380069255828857, 0.019580159336328506, 0.0054319375194609165, 0.02139187790453434, -0.019383160397410393, 0.06043286249041557, -0.021970143541693687, -0.020824681967496872, 0.037441711872816086, -0.015611723065376282, 0.04475124925374985, 0.011667350307106972, -0.02715928480029106, -0.011396816931664944, -0.09688674658536911, 0.0018841513665392995, 0.06418765336275101, -0.005435846745967865, 0.07766295224428177, -0.06878520548343658, 0.0766703188419342, 0.023321688175201416, 0.03461631387472153, -0.08740806579589844, 0.060646869242191315, -0.02186856046319008, -0.02668818086385727, 0.013760946691036224, 0.06746312975883484, -0.044887036085128784, 0.0027799152303487062, 0.007403314579278231, 0.032574694603681564, 0.020121576264500618, 0.06271205097436905, 0.04175679385662079, 0.029321348294615746, -0.012045622803270817, -0.024917367845773697, -0.014584814198315144, -0.10757219046354294, 0.0027215087320655584, 0.014873434789478779, 0.04317331314086914, -0.06533289700746536, -0.1253429800271988, 0.08936239778995514, 0.011942782439291477, 0.018983840942382812, 0.065837062895298, 0.08165200799703598, 0.06501535326242447, 0.029083460569381714, -0.015809394419193268, 0.049952201545238495, -0.05048375949263573, -0.01498805545270443, -0.09215369075536728, -0.0006370813935063779, -0.04102233052253723, -4.564780553550918e-8, 0.031130770221352577, 0.01147737167775631, -0.01837419718503952, 0.12114104628562927, 0.11520692706108093, -0.013126739300787449, -0.018410686403512955, -0.02626020275056362, -0.01304769329726696, 0.03336223214864731, -0.012564845383167267, 0.06396212428808212, 0.017230169847607613, 0.035138536244630814, 0.05526478588581085, 0.01127015333622694, 0.015539160929620266, 0.03858981281518936, 0.006975643336772919, -0.030537443235516548, -0.09275776892900467, 0.017658360302448273, 0.05967874452471733, 0.016605813056230545, 0.04109730198979378, 0.0645749568939209, 0.10777256637811661, 0.03965483233332634, 0.028284847736358643, -0.007370275910943747, -0.052790287882089615, -0.05669474974274635, -0.018565800040960312, 0.05948357656598091, -0.01833491399884224, 0.01754770614206791, -0.1375531256198883, 0.05260654166340828, 0.021403351798653603, 0.054154589772224426, 0.03235137462615967, 0.004537130240350962, -0.036450229585170746, -0.003390471450984478, 0.03551807627081871, 0.018847104161977768, -0.03134548291563988, -0.01634315587580204, 0.015611282549798489, 0.016420699656009674, -0.003341727890074253, -0.03918137773871422, -0.01926763541996479, 0.08405817300081253, -0.02077285759150982, 0.006339766085147858, 0.009246833622455597, 0.0035983037669211626, 0.041672639548778534, 0.03637200593948364, 0.1259831190109253, -0.016458578407764435, 0.039192598313093185, -0.020247217267751694 ]
0.101613
examples as-is; use them as a starting point and design your webhooks to run well in your specific environment. \* [`cert-manager`](https://github.com/cert-manager/cert-manager/tree/master/internal/webhook) \* [Gatekeeper Open Policy Agent (OPA)](https://open-policy-agent.github.io/gatekeeper/website/docs/mutation) ## {{% heading "whatsnext" %}} \* [Use webhooks for authentication and authorization](/docs/reference/access-authn-authz/webhook/) \* [Learn about MutatingAdmissionPolicies](/docs/reference/access-authn-authz/mutating-admission-policy/) \* [Learn about ValidatingAdmissionPolicies](/docs/reference/access-authn-authz/validating-admission-policy/)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/admission-webhooks-good-practices.md
[ -0.07690557837486267, 0.10119587928056717, -0.12037079781293869, -0.01925257034599781, 0.026770394295454025, -0.09698954224586487, 0.012833506800234318, 0.016229581087827682, -0.055487118661403656, -0.04072932153940201, 0.024134019389748573, -0.08502373099327087, 0.10772093385457993, -0.021358776837587357, 0.07749498635530472, 0.036579474806785583, 0.019670015200972557, 0.05761779099702835, -0.008441944606602192, -0.11274543404579163, 0.013941857032477856, -0.008005122654139996, 0.01660817116498947, -0.004360707011073828, -0.10521697252988815, -0.061983492225408554, 0.04096938297152519, 0.013745102100074291, -0.0115702785551548, 0.0038469720166176558, 0.047688521444797516, -0.06093824282288551, -0.025056354701519012, 0.02834204211831093, -0.03208800405263901, 0.07030607759952545, 0.09079846739768982, -0.015490914694964886, 0.004954818170517683, 0.025583893060684204, 0.06133287772536278, -0.037421856075525284, -0.04203345254063606, -0.011403623968362808, -0.016503969207406044, -0.07783011347055435, -0.07112514227628708, -0.07074180990457535, -0.08107534795999527, 0.02213297039270401, -0.00898729171603918, -0.11400367319583893, -0.006701555568724871, 0.06144319102168083, -0.054466165602207184, -0.012942830100655556, -0.028548935428261757, 0.015344790183007717, 0.0179770365357399, -0.06735199689865112, 0.0713195875287056, -0.02095397561788559, 0.02048659510910511, 0.005921106319874525, -0.033353231847286224, 0.004197161179035902, 0.0008644288755021989, 0.02935514971613884, 0.06733310222625732, -0.02434631437063217, -0.0966654121875763, -0.0020507473964244127, -0.03935576230287552, -0.012575310654938221, -0.0308547280728817, 0.0008690732065588236, -0.05189615860581398, 0.03414241969585419, 0.06664206087589264, -0.16608406603336334, -0.0058005331084132195, -0.01770390383899212, 0.014751889742910862, 0.055194590240716934, -0.007400356698781252, 0.07872419059276581, 0.00617770804092288, 0.024663513526320457, 0.018185751512646675, 0.06257393956184387, 0.1367279589176178, 0.004667656496167183, -0.022486519068479538, -0.057310689240694046, 0.06237446144223213, 0.049689095467329025, -0.032118961215019226, -0.05129483342170715, 0.011516829021275043, 0.057523634284734726, -0.05349157005548477, -0.06066783890128136, 0.013453338295221329, -0.03364164009690285, 0.061474595218896866, -0.03011929988861084, 0.04805850237607956, -0.016553083434700966, 0.04832383245229721, 0.03273983299732208, -0.035325102508068085, -0.01916942000389099, -0.010729342699050903, -0.02232758328318596, 0.018297061324119568, 0.1093037948012352, -0.03013293631374836, -0.003914969507604837, 0.02992682158946991, 0.07326387614011765, 0.019747575744986534, 0.029427839443087578, 0.012390423566102982, -0.029173141345381737, 0.042705170810222626, 0.04035528376698494, -0.008071323856711388, 3.0525690969504182e-33, 0.05985073372721672, 0.09705399721860886, -0.04529952630400658, 0.005168018862605095, 0.074285589158535, -0.06687286496162415, 0.07470465451478958, -0.03705735504627228, -0.033102311193943024, -0.04107745736837387, 0.06099782884120941, 0.0756288543343544, -0.009159969165921211, -0.05895652249455452, 0.015059523284435272, -0.05479267239570618, -0.08000755310058594, 0.04811214655637741, 0.08579326421022415, 0.055601295083761215, 0.04495001956820488, -0.057958927005529404, -0.012500588782131672, 0.06117287278175354, 0.05297891050577164, -0.033060215413570404, -0.03114369511604309, 0.0419103242456913, 0.010356508195400238, 0.03519285097718239, 0.06142241880297661, -0.019725101068615913, 0.004361826926469803, 0.03954209387302399, -0.027537785470485687, -0.012188809923827648, -0.006059850100427866, -0.05720450356602669, 0.02881474606692791, -0.17103295028209686, -0.06544701009988785, -0.06595900654792786, 0.03211907297372818, 0.03361403942108154, -0.016145387664437294, -0.04207102581858635, -0.04645589366555214, -0.05112297087907791, 0.1291096806526184, -0.017773758620023727, -0.06922799348831177, -0.06779970228672028, -0.000683138205204159, -0.08058429509401321, -0.018715394660830498, -0.076810821890831, -0.03810928761959076, -0.019543003290891647, -0.06587895005941391, -0.060299985110759735, -0.0029253859538584948, 0.005779659375548363, -0.012556618079543114, -0.04026363790035248, 0.02078932151198387, -0.02193496935069561, -0.07340853661298752, 0.012423692271113396, -0.0480257049202919, -0.052714794874191284, -0.035797119140625, 0.0066702296026051044, 0.02007800154387951, 0.05244837701320648, -0.08690042793750763, -0.05020461231470108, 0.05980217829346657, 0.10276688635349274, -0.03796461224555969, -0.015014945529401302, 0.0325184166431427, 0.06357567757368088, -0.0272627305239439, 0.07212712615728378, -0.003178762272000313, 0.017969761043787003, 0.007761289365589619, -0.009777345694601536, -0.04078046604990959, 0.04460453242063522, 0.038007330149412155, 0.0009202670771628618, 0.025952601805329323, 0.027615224942564964, -0.029592370614409447, -4.5140246728002974e-33, 0.02014419622719288, -0.023154813796281815, 0.04969988763332367, 0.01974458247423172, 0.0225975401699543, 0.05893482267856598, -0.017517996951937675, -0.0039308806881308556, 0.05595139414072037, -0.06346286088228226, 0.01636812463402748, 0.011173458769917488, 0.04282817617058754, -0.052447304129600525, -0.030135907232761383, -0.07240124046802521, -0.06281916797161102, -0.0015738586662337184, 0.05683276429772377, -0.010890916921198368, 0.08077023178339005, 0.06737565249204636, -0.05900583416223526, 0.026163723319768906, 0.07815105468034744, -0.007605963386595249, -0.033191658556461334, 0.057154763489961624, -0.01697666384279728, -0.0033445965964347124, -0.0001380773028358817, -0.05957982689142227, 0.002508804900571704, 0.04745660349726677, -0.035947490483522415, -0.10212526470422745, 0.029854711145162582, 0.09910525381565094, -0.015185950323939323, 0.004651115275919437, 0.10401000082492828, -0.13044030964374542, -0.041243776679039, -0.016605721786618233, 0.017266329377889633, 0.07743364572525024, 0.007631578017026186, -0.004902571439743042, -0.06336631625890732, 0.007834305986762047, -0.02136164717376232, 0.03388803452253342, -0.013987676240503788, 0.03178650513291359, -0.048751212656497955, 0.13918086886405945, 0.07355567067861557, 0.023037105798721313, 0.01576884090900421, -0.015999602153897285, -0.044259458780288696, -0.002207304583862424, 0.024543767794966698, 0.14673548936843872, -0.08745189756155014, -0.05133868753910065, -0.0828888863325119, 0.040763262659311295, -0.00824718177318573, -0.02391543798148632, 0.02265584096312523, -0.03909731283783913, -0.012659439817070961, -0.06535501033067703, 0.05748877674341202, -0.07753173261880875, 0.043020859360694885, -0.08724886178970337, -0.07591726630926132, 0.014289598912000656, -0.0647711455821991, 0.09881341457366943, 0.0036694100126624107, 0.01507940050214529, 0.02264455519616604, 0.04478808119893074, 0.001869276398792863, -0.0012825463199988008, 0.05809628963470459, 0.02439947798848152, -0.09064540266990662, 0.03886977210640907, -0.02641531080007553, -0.01235252432525158, 0.001776364166289568, -5.1041077142599534e-8, -0.018580563366413116, -0.00038957514334470034, 0.05340336263179779, 0.03278728201985359, 0.04048224911093712, 0.032688405364751816, -0.03730545565485954, -0.04705077409744263, -0.06938004493713379, -0.0011457103537395597, 0.015313347801566124, 0.03989524394273758, -0.010428158566355705, -0.08724997192621231, -0.08064594119787216, 0.0005181870074011385, 0.025000059977173805, 0.012844759970903397, 0.015104054473340511, 0.0040337820537388325, -0.00962839275598526, -0.06595627963542938, 0.05014335736632347, 0.005649183876812458, 0.02808261103928089, 0.12235549092292786, -0.0007089153514243662, 0.0053296172991395, -0.009176853112876415, 0.04843272641301155, -0.022179706022143364, -0.02233722433447838, 0.007490317337214947, 0.0035716278944164515, -0.047658905386924744, 0.061575740575790405, -0.1340993195772171, -0.059275757521390915, -0.00307679595425725, -0.01165878213942051, 0.01661449857056141, 0.026840895414352417, 0.033851101994514465, 0.030881719663739204, 0.020344482734799385, 0.030589252710342407, 0.01261728536337614, -0.03265756741166115, 0.07995554059743881, 0.021020766347646713, -0.0012756413780152798, -0.07317809760570526, 0.024223223328590393, 0.051281221210956573, -0.01204224769026041, 0.041047319769859314, 0.05395327880978584, -0.0692332535982132, 0.08084899932146072, 0.0631529688835144, 0.018518369644880295, -0.02327759377658367, 0.05937959626317024, 0.03888634592294693 ]
0.102166
{{< feature-state feature\_gate\_name="CoordinatedLeaderElection" >}} Kubernetes {{< skew currentVersion >}} includes a beta feature that allows {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} components to deterministically select a leader via \_coordinated leader election\_. This is useful to satisfy Kubernetes version skew constraints during cluster upgrades. Currently, the only builtin selection strategy is `OldestEmulationVersion`, preferring the leader with the lowest emulation version, followed by binary version, followed by creation timestamp. ## Enabling coordinated leader election Ensure that `CoordinatedLeaderElection` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled when you start the {{< glossary\_tooltip text="API Server" term\_id="kube-apiserver" >}}: and that the `coordination.k8s.io/v1beta1` API group is enabled. This can be done by setting flags `--feature-gates="CoordinatedLeaderElection=true"` and `--runtime-config="coordination.k8s.io/v1beta1=true"`. ## Component configuration Provided that you have enabled the `CoordinatedLeaderElection` feature gate \_and\_ have the `coordination.k8s.io/v1beta1` API group enabled, compatible control plane components automatically use the LeaseCandidate and Lease APIs to elect a leader as needed. For Kubernetes {{< skew currentVersion >}}, two control plane components (kube-controller-manager and kube-scheduler) automatically use coordinated leader election when the feature gate and API group are enabled.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/coordinated-leader-election.md
[ -0.029698463156819344, -0.0021321591921150684, 0.07408022880554199, -0.004319776780903339, 0.005855660419911146, 0.027944888919591904, -0.020325917750597, -0.08119751513004303, 0.037399813532829285, 0.0793895348906517, -0.010193348862230778, -0.04275905713438988, -0.0012783611891791224, -0.02958887629210949, 0.045411814004182816, 0.026744430884718895, 0.04342310503125191, -0.06125641614198685, -0.023565217852592468, -0.08758760243654251, -0.019110100343823433, -0.013743501156568527, 0.022222576662898064, 0.019562071189284325, -0.010565727017819881, -0.05462972819805145, -0.03904559090733528, -0.01162790972739458, 0.03433617949485779, -0.01600390300154686, -0.08587007224559784, 0.02153852954506874, -0.020333781838417053, 0.05190221592783928, 0.009672350250184536, 0.009386383928358555, -0.02159186452627182, -0.01811051554977894, -0.0172788817435503, 0.040695611387491226, 0.05294298753142357, -0.02572403848171234, -0.09246615320444107, -0.08034524321556091, -0.026060065254569054, 0.0617784820497036, -0.042538877576589584, -0.01140269823372364, -0.04588225111365318, -0.002542833797633648, 0.016900962218642235, -0.11956274509429932, 0.03443756699562073, -0.026592014357447624, 0.10663802176713943, 0.0014268361264839768, -0.08022474497556686, 0.04295836761593819, 0.08045181632041931, -0.030977457761764526, 0.0247211717069149, -0.03283769264817238, -0.014584365300834179, -0.030898893252015114, -0.03632912412285805, -0.006260742899030447, 0.08044884353876114, -0.025528956204652786, 0.023650970309972763, -0.02978396788239479, 0.06261318176984787, -0.033645305782556534, 0.009926386177539825, -0.01834486611187458, 0.03752148151397705, 0.04234837368130684, 0.006418484728783369, 0.07219056040048599, 0.05369880050420761, -0.11806747317314148, 0.015074829570949078, 0.056988950818777084, 0.04665561020374298, 0.10018158704042435, -0.024547474458813667, -0.038915231823921204, -0.03373003378510475, -0.06985712796449661, 0.06680772453546524, 0.010651717893779278, -0.035498134791851044, -0.029402021318674088, 0.06866121292114258, -0.10128547251224518, 0.03189859911799431, 0.06553785502910614, -0.04158312827348709, -0.012882621958851814, -0.007348556537181139, 0.03488299623131752, 0.0028624797705560923, -0.01732284016907215, 0.02450830303132534, 0.008478960953652859, 0.010906947776675224, -0.04892055690288544, -0.017487987875938416, -0.012653985060751438, -0.017483258619904518, 0.022268136963248253, -0.008612222969532013, 0.08634133636951447, 0.021646535024046898, -0.014826684258878231, -0.017262635752558708, -0.04329216480255127, 0.0024019365664571524, 0.016006261110305786, 0.013217451982200146, 0.045773256570100784, 0.031579744070768356, -0.10507992655038834, 0.004672554321587086, 0.03577401489019394, -0.03693888336420059, 0.12959624826908112, -0.054226960986852646, 4.9215895027235085e-33, 0.06107841432094574, -0.07362297177314758, -0.0005522224237211049, -0.015953779220581055, -0.027905913069844246, -0.048531487584114075, 0.006544849369674921, -0.05234752222895622, -0.10423851013183594, -0.010098259896039963, -0.0795460119843483, 0.02714965119957924, -0.009183179587125778, -0.03880704566836357, 0.07769251614809036, -0.04152090474963188, -0.03547888249158859, 0.06727638095617294, 0.05090240389108658, -0.013922500424087048, 0.05060872808098793, -0.048459816724061966, -0.04983452335000038, -0.07693382352590561, 0.0720171257853508, -0.0246747899800539, -0.024941811338067055, -0.07246237993240356, -0.0651150718331337, 0.03610770404338837, -0.023768847808241844, -0.029967397451400757, -0.02523212321102619, 0.017407462000846863, -0.16236546635627747, -0.014386776834726334, -0.08474810421466827, -0.056607794016599655, -0.027871383354067802, 0.016213180497288704, 0.024505676701664925, -0.00901502650231123, -0.04883189499378204, -0.07136602699756622, 0.05919015035033226, 0.052484944462776184, 0.00039108164492063224, -0.026352111250162125, 0.09920305013656616, -0.012422622181475163, -0.004702031146734953, 0.0016275177476927638, 0.03441781550645828, -0.012696926482021809, 0.07012461125850677, 0.025080643594264984, 0.14261746406555176, -0.025447331368923187, -0.02983195148408413, -0.0046098195016384125, -0.04643877223134041, 0.01699018105864525, -0.076168954372406, -0.009275118820369244, 0.05859848111867905, 0.0000927792934817262, -0.04326195269823074, 0.03445099666714668, 0.00039446703158318996, -0.05302729457616806, -0.022547567263245583, 0.03853768855333328, -0.02188808284699917, 0.033926986157894135, 0.019997337833046913, -0.09298461675643921, 0.04904824495315552, 0.01585344225168228, -0.009831583127379417, 0.0019263032590970397, 0.0032944991253316402, -0.07686023414134979, -0.033631227910518646, 0.02950604446232319, 0.053402941673994064, -0.06434372812509537, 0.04385196790099144, -0.0033761023078113794, -0.024302108213305473, 0.029580142349004745, -0.03211115300655365, -0.08536064624786377, -0.043361201882362366, 0.07763443142175674, -0.1266118735074997, -5.142040978592751e-33, 0.08457548916339874, -0.02351517044007778, 0.060016483068466187, 0.0043223220854997635, 0.014774072915315628, 0.013419881463050842, 0.02089725434780121, 0.01898559182882309, -0.05391421169042587, -0.09630740433931351, 0.0428343191742897, 0.012636811472475529, 0.043229807168245316, 0.031456802040338516, 0.038884006440639496, 0.04484740272164345, -0.12123151868581772, -0.05060906708240509, 0.029332295060157776, 0.017438335344195366, -0.0052492693066596985, -0.040550749748945236, 0.02964812144637108, 0.08043237030506134, -0.013870395720005035, -0.06467068195343018, 0.04964563623070717, 0.08586842566728592, 0.019365938380360603, -0.0558289997279644, 0.006471496541053057, -0.06767866015434265, -0.044232577085494995, -0.004497148096561432, 0.03172735869884491, -0.036302223801612854, 0.007929934188723564, -0.01871466264128685, -0.03792271763086319, 0.08700073510408401, -0.00824454240500927, 0.014600825496017933, -0.027840537950396538, -0.015512784942984581, 0.014598725363612175, 0.08850865066051483, 0.05794935300946236, -0.0007228528847917914, -0.014281881973147392, -0.10265707969665527, 0.01341442670673132, 0.03040776215493679, -0.026109490543603897, 0.04997974634170532, -0.07419739663600922, 0.09409959614276886, 0.057668205350637436, 0.045062106102705, -0.011267179623246193, 0.020194245502352715, 0.03229149430990219, -0.09281101077795029, 0.09215883910655975, 0.022032110020518303, 0.025831270962953568, 0.015552298165857792, 0.01585748977959156, 0.08627277612686157, -0.0012362139532342553, 0.06192692741751671, -0.08355075120925903, -0.07172849029302597, 0.032287828624248505, -0.033111345022916794, -0.001547715743072331, -0.038057874888181686, 0.023758890107274055, 0.01412157528102398, 0.07607495039701462, -0.05480995401740074, -0.056541915982961655, 0.07816896587610245, -0.004133162554353476, -0.0023437472991645336, 0.026917971670627594, 0.06481944769620895, 0.09058499336242676, 0.12570689618587494, 0.09381097555160522, 0.032128967344760895, -0.010655492544174194, -0.07715697586536407, -0.0008972987998276949, 0.10786614567041397, -0.04261167347431183, -5.5952561694994074e-8, 0.009411215782165527, 0.10256656259298325, -0.019676074385643005, 0.060168493539094925, 0.09784511476755142, 0.034008242189884186, 0.0034407798666507006, -0.015329563990235329, -0.01760777272284031, -0.03159606456756592, -0.006207621656358242, 0.12122435867786407, -0.05754402279853821, 0.024723676964640617, 0.09417227655649185, -0.025655414909124374, -0.08924166858196259, 0.02477591298520565, 0.013969815336167812, -0.10995155572891235, -0.04123077914118767, -0.036341141909360886, 0.008519848808646202, -0.015048405155539513, 0.0004902991931885481, 0.011810597032308578, -0.03615312650799751, 0.061241086572408676, 0.013271578587591648, 0.048524197190999985, -0.07325021922588348, 0.016632787883281708, -0.08881574124097824, 0.07988490164279938, 0.019190877676010132, 0.025752490386366844, -0.14960356056690216, 0.041643645614385605, 0.09156475961208344, 0.03814458101987839, 0.050412312150001526, 0.025023501366376877, -0.09460531920194626, 0.023166880011558533, 0.007777765858918428, 0.09313327819108963, 0.030055325478315353, -0.012758098542690277, 0.01147620752453804, -0.04425013065338135, -0.037213295698165894, -0.028611158952116966, -0.03859877958893776, 0.09398272633552551, -0.03254092484712601, 0.012488145381212234, -0.05871465429663658, -0.03989117965102196, 0.03674172982573509, -0.03143836185336113, 0.009847410954535007, 0.002685912186279893, -0.031085625290870667, -0.0039926874451339245 ]
0.056454
Networking is a central part of Kubernetes, but it can be challenging to understand exactly how it is expected to work. There are 4 distinct networking problems to address: 1. Highly-coupled container-to-container communications: this is solved by {{< glossary\_tooltip text="Pods" term\_id="pod" >}} and `localhost` communications. 2. Pod-to-Pod communications: this is the primary focus of this document. 3. Pod-to-Service communications: this is covered by [Services](/docs/concepts/services-networking/service/). 4. External-to-Service communications: this is also covered by Services. Kubernetes is all about sharing machines among applications. Typically, sharing machines requires ensuring that two applications do not try to use the same ports. Coordinating ports across multiple developers is very difficult to do at scale and exposes users to cluster-level issues outside of their control. Dynamic port allocation brings a lot of complications to the system - every application has to take ports as flags, the API servers have to know how to insert dynamic port numbers into configuration blocks, services have to know how to find each other, etc. Rather than deal with this, Kubernetes takes a different approach. To learn about the Kubernetes networking model, see [here](/docs/concepts/services-networking/). ## Kubernetes IP address ranges Kubernetes clusters require to allocate non-overlapping IP addresses for Pods, Services and Nodes, from a range of available addresses configured in the following components: - The network plugin is configured to assign IP addresses to Pods. - The kube-apiserver is configured to assign IP addresses to Services. - The kubelet or the cloud-controller-manager is configured to assign IP addresses to Nodes. {{< figure src="/docs/images/kubernetes-cluster-network.svg" alt="A figure illustrating the different network ranges in a kubernetes cluster" class="diagram-medium" >}} ## Cluster networking types {#cluster-network-ipfamilies} Kubernetes clusters, attending to the IP families configured, can be categorized into: - IPv4 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv4 addresses. - IPv6 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv6 addresses. - IPv4/IPv6 or IPv6/IPv4 [dual-stack](/docs/concepts/services-networking/dual-stack/): - The network plugin is configured to assign IPv4 and IPv6 addresses. - The kube-apiserver is configured to assign IPv4 and IPv6 addresses. - The kubelet or cloud-controller-manager is configured to assign IPv4 and IPv6 address. - All components must agree on the configured primary IP family. Kubernetes clusters only consider the IP families present on the Pods, Services and Nodes objects, independently of the existing IPs of the represented objects. For example, a server or a pod can have multiple IP addresses assigned to its interfaces, but only the IP addresses in `node.status.addresses` or `pod.status.ips` are considered when implementing the Kubernetes network model and defining the cluster type. ## How to implement the Kubernetes network model The network model is implemented by the container runtime on each node. The most common container runtimes use [Container Network Interface](https://github.com/containernetworking/cni) (CNI) plugins to manage their network and security capabilities. Many different CNI plugins exist from many different vendors. Some of these provide only basic features of adding and removing network interfaces, while others provide more sophisticated solutions, such as integration with other container orchestration systems, running multiple CNI plugins, advanced IPAM features etc. See [this page](/docs/concepts/cluster-administration/addons/#networking-and-network-policy) for a non-exhaustive list of networking addons supported by Kubernetes. ## {{% heading "whatsnext" %}} The early design of the networking model and its rationale are described in more detail in the [networking design document](https://git.k8s.io/design-proposals-archive/network/networking.md). For future plans and some on-going efforts that aim to improve Kubernetes networking, please refer to the SIG-Network [KEPs](https://github.com/kubernetes/enhancements/tree/master/keps/sig-network).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/networking.md
[ 0.04870927333831787, -0.027689870446920395, 0.08473275601863861, -0.02438941039144993, -0.029267357662320137, -0.00644676573574543, -0.02390258014202118, 0.011462667025625706, 0.0817096009850502, 0.028553036972880363, -0.08220052719116211, 0.001254731323570013, -0.009980384260416031, -0.03500805422663689, 0.06922736763954163, -0.02222197875380516, 0.09580851346254349, -0.033338647335767746, -0.04935580864548683, -0.037683531641960144, -0.048867117613554, 0.0053902892395854, 0.002654056530445814, -0.028556058183312416, -0.05565136671066284, 0.02699219435453415, 0.008782666176557541, -0.04522392526268959, -0.006423976272344589, -0.0041268737986683846, -0.10037640482187271, 0.01372945960611105, 0.017242589965462685, 0.02889391779899597, -0.06076805293560028, 0.03622402623295784, 0.03778497502207756, -0.01097311731427908, -0.06528966128826141, 0.0547979399561882, 0.0025665126740932465, -0.10086126625537872, -0.09636397659778595, -0.02441449835896492, -0.019924940541386604, -0.038775503635406494, -0.025150755420327187, -0.04877150058746338, -0.03080310858786106, -0.04150361940264702, -0.0020116856321692467, -0.06848502904176712, 0.04829290881752968, 0.0877113863825798, 0.07057181745767593, -0.05095023661851883, -0.03439684212207794, 0.08973930031061172, 0.06765793263912201, 0.09065575897693634, 0.10303303599357605, 0.003650260390713811, 0.016209864988923073, -0.00259597459807992, 0.07158233225345612, -0.06897509843111038, 0.0656321793794632, 0.06534730643033981, 0.007159911561757326, -0.05271342396736145, 0.06796589493751526, 0.0026075837668031454, -0.006740926299244165, -0.015312728472054005, 0.01198976207524538, 0.0015328796580433846, -0.00013374905392993242, 0.04210536926984787, 0.014430603012442589, -0.011858675628900528, 0.04418142884969711, 0.10859857499599457, 0.011340050958096981, -0.018396994099020958, -0.10270582884550095, -0.04304371774196625, -0.030915964394807816, -0.04345698282122612, -0.0005490750190801919, -0.020682917907834053, -0.031860481947660446, -0.04944397136569023, 0.006776002701371908, -0.0982593446969986, 0.04522993415594101, 0.02127685584127903, -0.011715210042893887, -0.06861665844917297, 0.015093175694346428, 0.0008774985908530653, 0.04294867813587189, 0.0002766471297945827, -0.002387389075011015, -0.02834194153547287, 0.04776653274893761, -0.03996311500668526, -0.01825178973376751, -0.024244321510195732, 0.030191147699952126, 0.0465114451944828, -0.036488376557826996, -0.035309601575136185, -0.04215206950902939, 0.05478115752339363, -0.03965827450156212, 0.009478596039116383, 0.01266249269247055, -0.02281731739640236, 0.08114174753427505, 0.0661860853433609, -0.049754027277231216, -0.08610659092664719, 0.029048806056380272, 0.034561820328235626, -0.032780181616544724, 0.052005015313625336, -0.028391128405928612, 3.0755474401151015e-33, 0.014468149282038212, -0.0621182806789875, -0.0005666690994985402, -0.015942666679620743, 0.04697462543845177, -0.0917988047003746, 0.005874531343579292, -0.02566790021955967, -0.020609330385923386, -0.0028115275781601667, -0.07472855597734451, 0.127574160695076, 0.07782382518053055, -0.007974186912178993, 0.06476084887981415, 0.016125090420246124, -0.115879125893116, 0.007890965789556503, 0.0837063416838646, 0.04016127437353134, 0.01009916141629219, -0.09730901569128036, -0.021643297746777534, 0.03489603102207184, 0.06490866839885712, -0.06122719869017601, 0.031254298985004425, -0.10299037396907806, 0.014150701463222504, 0.027176707983016968, -0.011060494929552078, 0.022362545132637024, 0.04157831147313118, 0.038525260984897614, -0.08921182155609131, 0.014419148676097393, -0.03394848853349686, -0.006395840551704168, -0.06098080798983574, 0.015847284346818924, -0.0161313284188509, -0.04447575658559799, -0.07489285618066788, -0.042838335037231445, 0.05119536817073822, 0.021843191236257553, 0.028446262702345848, -0.055346809327602386, -0.027715416625142097, -0.005966794677078724, -0.013808955438435078, -0.030708927661180496, 0.015185085125267506, 0.04509865865111351, 0.07320845127105713, 0.019843125715851784, 0.08168250322341919, -0.058932870626449585, -0.08354534953832626, 0.057094186544418335, -0.057066429406404495, -0.04358117654919624, -0.01753709465265274, 0.015116087161004543, 0.0764656737446785, 0.02430238388478756, -0.008651304990053177, 0.07876303791999817, 0.022392237558960915, 0.0020635887049138546, -0.060077425092458725, 0.04005361348390579, -0.0390033982694149, 0.011026719585061073, -0.022341284900903702, -0.030712958425283432, -0.0329587496817112, 0.020302703604102135, -0.0828440934419632, 0.0982920303940773, -0.023464104160666466, 0.03295760229229927, -0.0491691492497921, 0.10325831919908524, -0.05609112232923508, -0.037610962986946106, 0.00459884200245142, 0.001481883693486452, -0.06991877406835556, 0.10189954191446304, 0.003635797183960676, 0.045903511345386505, -0.013902627862989902, 0.048172738403081894, -0.04120655357837677, -4.814530987380384e-33, 0.04007936269044876, 0.04019560292363167, -0.07271362096071243, -0.0058015575632452965, -0.015498888678848743, 0.027610015124082565, -0.01927492395043373, 0.029829030856490135, -0.0036840501707047224, -0.047098468989133835, -0.10397642850875854, -0.04095404967665672, 0.0694822445511818, 0.04474848881363869, -0.11953538656234741, -0.03431730717420578, -0.07515408098697662, -0.017921151593327522, 0.022996308282017708, -0.008525718934834003, -0.031235670670866966, 0.036079663783311844, 0.059711795300245285, -0.03354685381054878, -0.0761265754699707, 0.004147408530116081, -0.007727909833192825, -0.04637254774570465, -0.09622274339199066, -0.03395107388496399, 0.04355976730585098, -0.10658916085958481, 0.053869593888521194, 0.02211211435496807, -0.003001035423949361, 0.025291256606578827, 0.015918975695967674, 0.03626802936196327, 0.029097827151417732, -0.04720768332481384, 0.0226338729262352, -0.013639670796692371, -0.019609222188591957, -0.055634282529354095, -0.06591333448886871, 0.009494563564658165, -0.06956692039966583, -0.009810510091483593, -0.08157287538051605, -0.08960339426994324, 0.02315174974501133, -0.0024611391127109528, -0.09126190841197968, 0.029482776299118996, -0.05099360644817352, 0.07489334046840668, 0.011909415945410728, 0.09566634148359299, -0.05142900347709656, 0.1326797902584076, 0.08972413092851639, -0.11417277902364731, 0.03890053927898407, 0.08994671702384949, -0.010305932722985744, -0.0027211003471165895, 0.028682803735136986, 0.017949609085917473, 0.020360110327601433, 0.024503910914063454, 0.0023886580020189285, -0.03666377440094948, 0.014353171922266483, 0.12159242480993271, -0.021095138043165207, -0.021655119955539703, 0.020689651370048523, -0.04631124436855316, 0.001036203932017088, -0.010793102905154228, -0.05527343600988388, 0.08045607060194016, -0.05055595934391022, 0.0019293836085125804, -0.013363129459321499, 0.0696093738079071, 0.14602217078208923, 0.03273807466030121, 0.05054034665226936, -0.03287087753415108, -0.0028377575799822807, 0.004646669141948223, -0.06604710221290588, 0.07701043784618378, -0.03926477208733559, -5.69548319617752e-8, 0.09787549823522568, 0.01832551136612892, -0.05146271362900734, 0.02863493375480175, -0.05760560557246208, 0.05224473029375076, 0.038468725979328156, 0.014668233692646027, -0.00042120672878809273, 0.06120498478412628, -0.07511995732784271, 0.06993905454874039, -0.1076141893863678, 0.007936504669487476, 0.08335836976766586, 0.04784437641501427, -0.015018883161246777, -0.018165696412324905, -0.018480334430933, -0.10621118545532227, -0.0326935276389122, -0.06031205505132675, -0.014141585677862167, 0.024627268314361572, -0.007120926398783922, 0.06601940095424652, 0.07762615382671356, 0.020010273903608322, 0.0469140000641346, 0.006310646887868643, -0.034749049693346024, -0.017251649871468544, -0.056781549006700516, 0.06983765214681625, -0.02948705479502678, 0.02689552679657936, -0.10777197033166885, -0.01263541728258133, 0.004843495320528746, 0.07628872245550156, -0.03649202361702919, -0.0259853508323431, -0.060327041894197464, -0.007000449579209089, 0.04375411942601204, 0.06410752981901169, -0.021694494411349297, 0.0785817876458168, -0.03438197076320648, 0.02633182890713215, 0.015353756956756115, 0.0021357866935431957, 0.04422489181160927, 0.053029827773571014, 0.031059419736266136, 0.028657814487814903, -0.0553269162774086, -0.04774244874715805, 0.05407858267426491, 0.03708931803703308, -0.04883686080574989, 0.11893966048955917, 0.017074666917324066, 0.030698463320732117 ]
0.23634
plans and some on-going efforts that aim to improve Kubernetes networking, please refer to the SIG-Network [KEPs](https://github.com/kubernetes/enhancements/tree/master/keps/sig-network).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/networking.md
[ -0.00479326443746686, -0.0038077165372669697, 0.12143784761428833, 0.0004809279053006321, -0.05150308459997177, 0.028214020654559135, -0.034598514437675476, -0.009161442518234253, 0.0038288806099444628, 0.014040032401680946, -0.052210986614227295, 0.01819254644215107, -0.05812447518110275, -0.07102826237678528, 0.022223107516765594, 0.0047448924742639065, 0.09569624066352844, 0.021223265677690506, -0.02151845023036003, -0.08808676153421402, -0.04143210127949715, -0.021126961335539818, 0.02446652576327324, -0.03206053748726845, -0.03047139197587967, -0.04960312321782112, 0.011670995503664017, 0.012223049998283386, -0.004073659889400005, -0.05474843457341194, -0.054811879992485046, 0.02171987108886242, -0.009200051426887512, 0.0033547081984579563, -0.04476231709122658, 0.06311576068401337, -0.002118461998179555, -0.033322446048259735, -0.057289253920316696, 0.027765074744820595, 0.061433590948581696, -0.06510023772716522, -0.04498579353094101, -0.016779573634266853, 0.0002659875899553299, 0.018176741898059845, -0.027763282880187035, -0.0466415174305439, 0.009477959014475346, -0.07826071977615356, 0.029499663040041924, -0.12880070507526398, 0.10005603730678558, 0.01479548029601574, 0.07015223056077957, -0.0004177612136118114, -0.04561825469136238, 0.02945290319621563, 0.07250762730836868, 0.039671190083026886, 0.07937679439783096, -0.006267980672419071, -0.013868975453078747, 0.015810487791895866, 0.01574353501200676, 0.011962298303842545, 0.09491842240095139, 0.059179943054914474, -0.008726850152015686, -0.04645764082670212, 0.07954159379005432, 0.024021251127123833, -0.06350352615118027, 0.05374632030725479, 0.012177127413451672, 0.08741016685962677, -0.01688232645392418, 0.06920146197080612, 0.0801139771938324, -0.04019857570528984, 0.033306319266557693, 0.1132052019238472, 0.03209754079580307, -0.03229672834277153, -0.047409024089574814, -0.11944211274385452, -0.023474059998989105, -0.04140102118253708, -0.040125638246536255, -0.04714134335517883, -0.00729502784088254, -0.0034835715778172016, 0.02303074486553669, -0.07718663662672043, 0.004846618976444006, 0.050616174936294556, -0.0811326876282692, -0.08575320243835449, -0.0013779887231066823, -0.022275935858488083, 0.01954174041748047, 0.04463889077305794, -0.018989870324730873, -0.02267889492213726, 0.04814363643527031, 0.0350695364177227, -0.0030837650410830975, 0.04752085357904434, 0.023489253595471382, 0.009564832784235477, -0.0322948656976223, 0.03621826693415642, -0.012412303127348423, -0.012112966738641262, 0.030998386442661285, 0.01387697458267212, 0.03721088916063309, -0.006593701895326376, 0.10083860158920288, 0.0909663513302803, -0.052096519619226456, -0.08026029914617538, -0.01982213370501995, -0.014559752307832241, -0.007867145352065563, 0.09074099361896515, -0.07224272191524506, -9.195656289257629e-34, -0.01106873620301485, 0.0469011589884758, -0.0030747060663998127, -0.10343390703201294, 0.06516508013010025, -0.1313641220331192, -0.007203978020697832, -0.11625731736421585, -0.04711674898862839, -0.07669735699892044, -0.13044562935829163, 0.020854275673627853, 0.028750261291861534, -0.008914628066122532, 0.07945761829614639, -0.10095643997192383, -0.04758281633257866, -0.012608109973371029, 0.10566773265600204, 0.007466467563062906, -0.01183586847037077, -0.08631289005279541, 0.036185577511787415, 0.004301892127841711, 0.11542575061321259, -0.009762241505086422, 0.019500400871038437, -0.046649523079395294, -0.030255625024437904, 0.024587292224168777, -0.029300305992364883, -0.006508578080683947, 0.006993766874074936, 0.00567942438647151, -0.13472402095794678, 0.01284370943903923, -0.0750412568449974, -0.011125900782644749, -0.0388437919318676, 0.011122897267341614, 0.04562750086188316, -0.002954144962131977, -0.028876977041363716, -0.06900440901517868, 0.02302284725010395, 0.04963814839720726, 0.0032322898041456938, -0.02482547238469124, 0.062151454389095306, 0.003821935970336199, 0.013138149864971638, -0.026758503168821335, -0.054752834141254425, -0.020845655351877213, 0.06307670474052429, 0.04717183858156204, 0.13323161005973816, -0.03149018809199333, -0.009549042209982872, 0.08321341872215271, -0.02019830420613289, -0.07203312963247299, -0.013314255513250828, 0.0008520783158019185, 0.0668819472193718, -0.012065347284078598, -0.03210865333676338, 0.0551578551530838, -0.05011393874883652, -0.04819805175065994, -0.057201940566301346, 0.04507593810558319, 0.019998835399746895, -0.019332265481352806, -0.000999028910882771, -0.07697462290525436, -0.08345194905996323, -0.03054964728653431, -0.022165421396493912, 0.1057136282324791, -0.0020509175956249237, 0.021140199154615402, -0.022706687450408936, 0.02730606682598591, 0.012834135442972183, -0.03990080952644348, 0.02479570545256138, 0.06237911432981491, -0.031811244785785675, 0.09996858239173889, 0.022955970838665962, -0.01038030069321394, -0.024409383535385132, 0.10410065203905106, -0.06636682897806168, 7.592949064821247e-35, 0.04969309642910957, 0.09260400384664536, -0.015691982582211494, 0.09601080417633057, 0.019730299711227417, 0.039011772722005844, 0.06475672125816345, 0.03068489208817482, -0.04997064545750618, -0.02494446188211441, -0.029948437586426735, -0.04533606022596359, 0.055199068039655685, -0.0053505017422139645, -0.034649189561605453, -0.09650634974241257, -0.03439724072813988, -0.058153558522462845, 0.009119640104472637, 0.006822056137025356, 0.023276319727301598, 0.0034887243527919054, -0.014164913445711136, -0.024396266788244247, 0.024987703189253807, 0.004794653970748186, -0.004388617351651192, 0.052681565284729004, -0.10376116633415222, -0.015575266443192959, -0.013713488355278969, -0.1065436527132988, 0.012895584106445312, 0.018866166472434998, 0.08117255568504333, 0.006408690009266138, 0.10965348780155182, 0.053040847182273865, -0.012490388937294483, -0.07533341646194458, 0.05341346934437752, 0.01043733675032854, -0.02545355074107647, -0.02524256706237793, -0.049733035266399384, 0.022264063358306885, 0.015268300659954548, -0.027131665498018265, -0.07073657214641571, -0.0856068953871727, 0.01295329537242651, -0.017296096310019493, -0.08859150111675262, 0.0630650743842125, -0.036338821053504944, 0.054151419550180435, -0.010873112827539444, 0.09469868242740631, 0.015820926055312157, 0.0754200741648674, -0.013748460449278355, -0.0806179940700531, 0.07794176787137985, 0.052521269768476486, 0.06525126844644547, -0.025121990591287613, 0.005247401539236307, 0.02988840639591217, -0.006938361097127199, 0.014111478812992573, 0.011579604819417, -0.007119815796613693, 0.04676198959350586, 0.08951427787542343, -0.03717135265469551, -0.0561731718480587, 0.05231228843331337, 0.04572106897830963, 0.007376931142061949, -0.01754286326467991, -0.029434746131300926, 0.033672332763671875, -0.09717275947332382, 0.02398556098341942, 0.09178395569324493, 0.062203723937273026, 0.07668992131948471, 0.05701550841331482, 0.05219919979572296, 0.028096305206418037, -0.05055416002869606, 0.018856849521398544, -0.017085043713450432, 0.07433654367923737, -0.04978892579674721, -3.959785388474302e-8, 0.016857780516147614, 0.011070073582231998, -0.05977367237210274, 0.02185477688908577, 0.033491939306259155, -0.03666658699512482, 0.03542475029826164, -0.008973834104835987, -0.03623585402965546, 0.023788155987858772, -0.03466372191905975, 0.0842038169503212, -0.07634060829877853, -0.016816023737192154, 0.05201885849237442, -0.05144291743636131, -0.005416714120656252, 0.021935168653726578, 0.01940053328871727, -0.09474103897809982, -0.04541714861989021, 0.0018993058474734426, -0.013821184635162354, 0.03969760984182358, 0.03582027554512024, 0.06080362945795059, 0.04653887823224068, 0.006846976466476917, 0.05288827791810036, 0.02606150694191456, -0.06813110411167145, 0.009764041751623154, -0.07698909938335419, 0.060515113174915314, 0.05475592613220215, 0.07074560225009918, -0.14046414196491241, 0.07303464412689209, 0.02763677015900612, 0.03943262994289398, -0.0353626050055027, -0.03467888757586479, -0.0074156648479402065, -0.0058425054885447025, -0.010171758010983467, 0.050028640776872635, -0.049314405769109726, 0.025029802694916725, -0.03852498531341553, -0.029958974570035934, 0.023513315245509148, -0.03956455737352371, -0.015657605603337288, 0.04752345383167267, -0.004450894892215729, 0.008665595203638077, 0.0317440889775753, -0.108680360019207, 0.04953693971037865, 0.03302740678191185, 0.007543114013969898, -0.02600100450217724, -0.04295726865530014, 0.06871900707483292 ]
0.180221
The state of Kubernetes objects in the Kubernetes API can be exposed as metrics. An add-on agent called [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics) can connect to the Kubernetes API server and expose a HTTP endpoint with metrics generated from the state of individual objects in the cluster. It exposes various information about the state of objects like labels and annotations, startup and termination times, status or the phase the object currently is in. For example, containers running in pods create a `kube\_pod\_container\_info` metric. This includes the name of the container, the name of the pod it is part of, the {{< glossary\_tooltip text="namespace" term\_id="namespace" >}} the pod is running in, the name of the container image, the ID of the image, the image name from the spec of the container, the ID of the running container and the ID of the pod as labels. {{% thirdparty-content single="true" %}} An external component that is able and capable to scrape the endpoint of kube-state-metrics (for example via Prometheus) can now be used to enable the following use cases. ## Example: using metrics from kube-state-metrics to query the cluster state {#example-kube-state-metrics-query-1} Metric series generated by kube-state-metrics are helpful to gather further insights into the cluster, as they can be used for querying. If you use Prometheus or another tool that uses the same query language, the following PromQL query returns the number of pods that are not ready: ``` count(kube\_pod\_status\_ready{condition="false"}) by (namespace, pod) ``` ## Example: alerting based on from kube-state-metrics {#example-kube-state-metrics-alert-1} Metrics generated from kube-state-metrics also allow for alerting on issues in the cluster. If you use Prometheus or a similar tool that uses the same alert rule language, the following alert will fire if there are pods that have been in a `Terminating` state for more than 5 minutes: ```yaml groups: - name: Pod state rules: - alert: PodsBlockedInTerminatingState expr: count(kube\_pod\_deletion\_timestamp) by (namespace, pod) \* count(kube\_pod\_status\_reason{reason="NodeLost"} == 0) by (namespace, pod) > 0 for: 5m labels: severity: page annotations: summary: Pod {{$labels.namespace}}/{{$labels.pod}} blocked in Terminating state. ```
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/kube-state-metrics.md
[ -0.019185353070497513, 0.0025742328725755215, -0.02674582600593567, 0.03853646665811539, -0.025020204484462738, 0.012674003839492798, -0.007019327022135258, -0.028578653931617737, 0.08478619903326035, 0.041277363896369934, -0.05363946408033371, -0.11527872830629349, -0.011663305573165417, -0.032046083360910416, 0.034584276378154755, -0.04160991683602333, 0.1138959601521492, 0.02052442356944084, -0.021939270198345184, -0.09646645188331604, 0.045507874339818954, 0.040125373750925064, 0.012447736226022243, 0.0104580819606781, -0.05415366590023041, 0.05681479722261429, -0.05136268585920334, -0.015239665284752846, 0.01503371074795723, 0.00930264126509428, -0.046043600887060165, -0.011136787012219429, -0.01733621396124363, 0.07813580334186554, 0.05068496987223625, 0.07699622213840485, 0.009530658833682537, -0.0415329672396183, -0.057663075625896454, -0.04132315143942833, 0.0800943449139595, -0.03502243384718895, -0.07192257791757584, -0.0028362160082906485, -0.00774168549105525, 0.032144200056791306, -0.08323922008275986, -0.05432151257991791, -0.04901788756251335, -0.020618358626961708, -0.016068264842033386, -0.08537617325782776, 0.032171688973903656, 0.06837926059961319, 0.054296646267175674, 0.032503511756658554, 0.002501528011634946, 0.016003265976905823, 0.027740996330976486, -0.0038305220659822226, 0.04494955390691757, -0.045064300298690796, 0.022702276706695557, -0.010119144804775715, 0.047870147973299026, 0.0101163936778903, 0.01765473373234272, 0.030358223244547844, 0.028570450842380524, -0.0995011031627655, 0.03565363213419914, -0.002998535754159093, 0.008989138528704643, -0.05878721550107002, -0.021603697910904884, 0.006648066453635693, -0.01747354306280613, 0.07827405631542206, 0.0035543201956897974, -0.06058439239859581, 0.012922767549753189, 0.0710730329155922, 0.10037022083997726, 0.07261762768030167, -0.07264309376478195, -0.04227323457598686, 0.00666227750480175, 0.003005104837939143, 0.01965128257870674, -0.03843488544225693, -0.036472443491220474, -0.05441318079829216, 0.00019932335999328643, -0.12222625315189362, 0.059702835977077484, 0.0013357741991057992, -0.03945251926779747, -0.05432907119393349, 0.0852782353758812, 0.019442765042185783, 0.02068566158413887, -0.0031426935456693172, -0.021161559969186783, -0.012532264925539494, 0.06296341866254807, -0.01249482948333025, -0.0984346941113472, 0.0027105240151286125, 0.04460693523287773, 0.08955074846744537, -0.005474983248859644, 0.07482876628637314, -0.015557522885501385, 0.025898223742842674, 0.023350749164819717, -0.0349653922021389, 0.029947470873594284, -0.032898832112550735, 0.08113811165094376, 0.037803009152412415, 0.03607591241598129, -0.11974231153726578, 0.026717381551861763, 0.023766838014125824, 0.00753801828250289, 0.0684761181473732, -0.03089238330721855, 1.4488753067376844e-33, 0.04367395117878914, -0.09780929237604141, 0.04983595013618469, -0.060936398804187775, -0.020370300859212875, -0.026604019105434418, -0.037796009331941605, -0.044785451143980026, 0.015673687681555748, -0.04131926968693733, -0.07569053024053574, 0.14731115102767944, 0.029166854918003082, -0.04278935119509697, 0.039985936135053635, -0.0018758837832137942, -0.11450289189815521, 0.1151747852563858, 0.06786338984966278, 0.00806394126266241, 0.011829321272671223, -0.060862231999635696, -0.015049835667014122, -0.0008199689909815788, 0.05484507605433464, -0.02333749085664749, 0.006710442714393139, -0.05026780813932419, -0.06537128239870071, 0.015592389740049839, 0.01975526660680771, -0.015254242345690727, 0.019910722970962524, -0.0013388961087912321, -0.07328344881534576, -0.03581856191158295, -0.011824170127511024, 0.019559668377041817, -0.05448250472545624, -0.023929491639137268, 0.0289005097001791, -0.04385456070303917, -0.014620835892856121, -0.09040681272745132, -0.05738942697644234, 0.007572782691568136, -0.024662718176841736, -0.1222144290804863, 0.07787424325942993, -0.02021312341094017, 0.027654772624373436, -0.06577882915735245, 0.050857264548540115, -0.05649584159255028, 0.0034786779433488846, 0.04691750556230545, 0.09994958341121674, -0.040733110159635544, -0.01868058368563652, -0.0053213355131447315, -0.11568266153335571, -0.025993524119257927, 0.012460540048778057, -0.034671831876039505, 0.013614306226372719, 0.027857672423124313, 0.015766579657793045, 0.09787572175264359, 0.032442521303892136, 0.04242477938532829, -0.06125850975513458, 0.058872513473033905, -0.01470953319221735, 0.014701840467751026, 0.006753016263246536, -0.05103425681591034, 0.0446074940264225, 0.01563912443816662, -0.12173113971948624, 0.033704087138175964, 0.02156146988272667, -0.08436883985996246, -0.04189317300915718, 0.06676356494426727, -0.009408507496118546, -0.025406088680028915, -0.007535942830145359, -0.029962293803691864, -0.07602985203266144, -0.0022241489496082067, -0.01657094433903694, -0.017523417249321938, -0.09044911712408066, 0.0516994334757328, -0.1306542456150055, -2.9804811712022722e-33, 0.08837942034006119, -0.0033531389199197292, -0.00016241589037235826, 0.03704700246453285, 0.02187701128423214, -0.018251005560159683, 0.011156436987221241, 0.1294943392276764, -0.01842556521296501, -0.0003848448395729065, -0.017677340656518936, -0.02312634326517582, 0.023216981440782547, 0.046083856374025345, -0.06818843632936478, 0.05931274592876434, -0.05110866203904152, -0.04813750460743904, 0.016546763479709625, 0.005818298552185297, -0.02570987120270729, -0.05899627506732941, 0.012166406959295273, -0.01601516641676426, -0.017658155411481857, 0.009919813834130764, 0.026135023683309555, -0.04972611367702484, -0.06898175925016403, -0.06871841847896576, 0.017033396288752556, -0.09903920441865921, -0.006898263934999704, 0.031902898102998734, -0.002051659394055605, -0.06266746670007706, 0.024337617680430412, -0.029079031199216843, -0.008897180669009686, 0.012828786857426167, 0.043129295110702515, 0.013990238308906555, -0.10551375895738602, -0.0010537480702623725, -0.03952108696103096, 0.015051023103296757, -0.0009200538625009358, 0.04413687810301781, -0.047572776675224304, -0.07027354091405869, 0.02307172119617462, -0.023943737149238586, -0.04672832041978836, 0.08245677500963211, -0.07110419124364853, 0.045862872153520584, 0.019096294417977333, 0.025034481659531593, -0.08236540853977203, 0.03318079933524132, 0.013982496224343777, -0.13616634905338287, 0.03512759134173393, 0.06548245251178741, 0.0129978833720088, -0.041290976107120514, -0.003917803056538105, -0.028240056708455086, -0.05369298905134201, 0.03209459409117699, 0.023516710847616196, -0.0018909581704065204, -0.004508660174906254, 0.03923940658569336, 0.019474288448691368, -0.01320737600326538, 0.04261599853634834, -0.05230949819087982, 0.04592959210276604, 0.009470853954553604, -0.03981834650039673, 0.06166049465537071, -0.022899996489286423, 0.028351202607154846, 0.09260362386703491, 0.04854849725961685, 0.05323423445224762, 0.11446614563465118, 0.06053305044770241, 0.0524313859641552, -0.09915336221456528, 0.052608922123909, -0.07501916587352753, 0.10146583616733551, -0.041841112077236176, -5.610099407249436e-8, -0.006047521717846394, 0.042618248611688614, -0.016542160883545876, 0.07951433211565018, -0.03181365877389908, 0.06006602942943573, 0.022605525329709053, 0.05155003443360329, -0.0534265972673893, 0.011565536260604858, 0.01568259857594967, 0.026832522824406624, -0.11847823858261108, 0.02624155580997467, 0.04088633507490158, 0.006725145969539881, 0.027575939893722534, 0.024350760504603386, 0.01986515335738659, -0.028703000396490097, -0.023805011063814163, 0.003267450025305152, 0.04058054834604263, -0.023376071825623512, 0.01946999318897724, 0.049986813217401505, 0.03713689371943474, 0.052058979868888855, 0.016065798699855804, -0.012251343578100204, -0.021323269233107567, 0.00717763788998127, -0.04315298795700073, 0.09356673061847687, -0.02126552164554596, 0.041535280644893646, -0.1624191403388977, 0.05940144881606102, 0.043431904166936874, 0.09404648095369339, -0.0026488960720598698, 0.03450045734643936, -0.09582340717315674, 0.037088990211486816, 0.07707683742046356, 0.10006856173276901, -0.011347356252372265, 0.05136748030781746, -0.028466710820794106, -0.023519231006503105, -0.022741887718439102, -0.09979633241891861, -0.04297570884227753, 0.101414255797863, -0.06267575174570084, -0.024501878768205643, -0.021859662607312202, -0.051002971827983856, 0.085420161485672, 0.0337156243622303, -0.014441161416471004, 0.02247505821287632, 0.01058029942214489, 0.014302581548690796 ]
0.238711
System component metrics can give a better look into what is happening inside them. Metrics are particularly useful for building dashboards and alerts. Kubernetes components emit metrics in [Prometheus format](https://prometheus.io/docs/instrumenting/exposition\_formats/). This format is structured plain text, designed so that people and machines can both read it. ## Metrics in Kubernetes In most cases metrics are available on `/metrics` endpoint of the HTTP server. For components that don't expose endpoint by default, it can be enabled using `--bind-address` flag. Examples of those components: \* {{< glossary\_tooltip term\_id="kube-controller-manager" text="kube-controller-manager" >}} \* {{< glossary\_tooltip term\_id="kube-proxy" text="kube-proxy" >}} \* {{< glossary\_tooltip term\_id="kube-apiserver" text="kube-apiserver" >}} \* {{< glossary\_tooltip term\_id="kube-scheduler" text="kube-scheduler" >}} \* {{< glossary\_tooltip term\_id="kubelet" text="kubelet" >}} In a production environment you may want to configure [Prometheus Server](https://prometheus.io/) or some other metrics scraper to periodically gather these metrics and make them available in some kind of time series database. Note that {{< glossary\_tooltip term\_id="kubelet" text="kubelet" >}} also exposes metrics in `/metrics/cadvisor`, `/metrics/resource` and `/metrics/probes` endpoints. Those metrics do not have the same lifecycle. If your cluster uses {{< glossary\_tooltip term\_id="rbac" text="RBAC" >}}, reading metrics requires authorization via a user, group or ServiceAccount with a ClusterRole that allows accessing `/metrics`. For example: ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: prometheus rules: - nonResourceURLs: - "/metrics" verbs: - get ``` ## Metric lifecycle Alpha metric β†’ Beta metric β†’ Stable metric β†’ Deprecated metric β†’ Hidden metric β†’ Deleted metric Alpha metrics have no stability guarantees. These metrics can be modified or deleted at any time. Beta metrics observe a looser API contract than its stable counterparts. No labels can be removed from beta metrics during their lifetime, however, labels can be added while the metric is in the beta stage. Stable metrics are guaranteed to not change. This means: \* A stable metric without a deprecated signature will not be deleted or renamed \* A stable metric's type will not be modified Deprecated metrics are slated for deletion, but are still available for use. These metrics include an annotation about the version in which they became deprecated. For example: \* Before deprecation ``` # HELP some\_counter this counts things # TYPE some\_counter counter some\_counter 0 ``` \* After deprecation ``` # HELP some\_counter (Deprecated since 1.15.0) this counts things # TYPE some\_counter counter some\_counter 0 ``` Hidden metrics are no longer published for scraping, but are still available for use. A deprecated metric becomes a hidden metric after a period of time, based on its stability level: \* \*\*STABLE\*\* metrics become hidden after a minimum of 3 releases or 9 months, whichever is longer. \* \*\*BETA\*\* metrics become hidden after a minimum of 1 release or 4 months, whichever is longer. \* \*\*ALPHA\*\* metrics can be hidden or removed in the same release in which they are deprecated. To use a hidden metric, you must enable it. For more details, refer to the [Show hidden metrics](#show-hidden-metrics) section. Deleted metrics are no longer published and cannot be used. ## Show hidden metrics As described above, admins can enable hidden metrics through a command-line flag on a specific binary. This intends to be used as an escape hatch for admins if they missed the migration of the metrics deprecated in the last release. The flag `show-hidden-metrics-for-version` takes a version for which you want to show metrics deprecated in that release. The version is expressed as x.y, where x is the major version, y is the minor version. The patch version is not needed even though a metrics can be deprecated in a patch release, the reason for that is the metrics deprecation policy runs against the minor release.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-metrics.md
[ -0.022747712209820747, -0.00475835707038641, 0.015881409868597984, -0.006384439766407013, -0.03200007602572441, -0.06886128336191177, 0.028202136978507042, -0.030685730278491974, 0.16706663370132446, 0.022806957364082336, -0.03380497917532921, -0.0620136559009552, -0.019403677433729172, -0.002106440719217062, 0.01318567618727684, -0.013657952658832073, 0.06510444730520248, -0.07009537518024445, 0.0035227423068135977, -0.07241787761449814, 0.033041104674339294, 0.07872716337442398, -0.0024728192947804928, 0.010019456036388874, -0.06569382548332214, 0.001296157599426806, -0.02118632383644581, -0.0022063672076910734, 0.02378181554377079, -0.006692105904221535, -0.013510435819625854, -0.02863502874970436, -0.0968426987528801, 0.01172325387597084, -0.036053501069545746, 0.07555171847343445, 0.022243665531277657, -0.025279879570007324, -0.07237553596496582, 0.022900573909282684, 0.06873539090156555, -0.017133161425590515, -0.03668840602040291, -0.035145100206136703, -0.01776316575706005, -0.01801425777375698, -0.040313851088285446, -0.06036468222737312, -0.03330269455909729, -0.03165218234062195, 0.04236451908946037, -0.0792340561747551, 0.0005864605191163719, 0.040686942636966705, 0.053291138261556625, -0.015484340488910675, -0.044675543904304504, 0.022063734009861946, 0.04322353005409241, -0.016651112586259842, -0.016438445076346397, -0.0182638056576252, 0.004814984276890755, 0.00388540280982852, 0.0016130392905324697, -0.003433392383158207, 0.0033941539004445076, 0.008246646262705326, -0.03409227356314659, -0.00110438943374902, 0.009701215662062168, -0.029766464605927467, -0.0405694805085659, -0.01427029725164175, 0.039705682545900345, 0.08180101960897446, -0.05336252599954605, 0.06913357228040695, 0.02416900359094143, -0.1387770175933838, 0.07504381984472275, 0.07431022077798843, 0.08763262629508972, 0.10137353837490082, -0.02709086239337921, -0.018031306564807892, 0.025073807686567307, -0.0018525845371186733, 0.048368506133556366, -0.020555594936013222, 0.05140256509184837, -0.09137776494026184, -0.0048928712494671345, -0.07234033197164536, 0.019378256052732468, 0.0386882945895195, -0.024503584951162338, -0.012921443209052086, 0.0031700243707746267, 0.01760982535779476, 0.04089301452040672, -0.03418469429016113, -0.046055376529693604, 0.0612882636487484, 0.051247622817754745, -0.012753891758620739, -0.04840495437383652, 0.06796903163194656, 0.03642404451966286, 0.06448998302221298, 0.010580410249531269, 0.03434213623404503, -0.014080150984227657, 0.008186356164515018, -0.002456797519698739, -0.05774089694023132, 0.037718500941991806, -0.036069322377443314, 0.001340091461315751, 0.054720908403396606, -0.022113800048828125, -0.07449522614479065, -0.03436821699142456, 0.009191745892167091, 0.042305268347263336, 0.12333220988512039, 0.03461835905909538, 4.402745030711767e-33, 0.057903096079826355, -0.03907445818185806, 0.003561632940545678, -0.04548274353146553, -0.021644579246640205, -0.021842893213033676, -0.07297306507825851, -0.007623767014592886, 0.010640926659107208, 0.018671832978725433, -0.059313397854566574, 0.11129437386989594, 0.02943875640630722, -0.029706351459026337, 0.06255849450826645, 0.0668090432882309, -0.016084007918834686, 0.10829686373472214, 0.06511004269123077, -0.0373041145503521, 0.020986121147871017, -0.10088212043046951, -0.013491950929164886, -0.007976023480296135, 0.0762203261256218, 0.01380601804703474, -0.016217738389968872, 0.023243140429258347, -0.11612901091575623, 0.004530075937509537, 0.022644205018877983, -0.03354986757040024, 0.07628589868545532, 0.014549809508025646, -0.07314888387918472, -0.02263585291802883, -0.019579842686653137, 0.000171503474120982, -0.06985161453485489, -0.0555683970451355, -0.010976542718708515, -0.00801563449203968, -0.09426389634609222, -0.041815560311079025, -0.04445002228021622, -0.0024510249495506287, 0.008247113786637783, -0.08765053749084473, 0.1442856788635254, -0.03699812293052673, -0.05181357264518738, 0.01867859624326229, 0.11139796674251556, -0.03985543176531792, 0.057023871690034866, 0.09131910651922226, 0.12955868244171143, -0.042881548404693604, -0.02042151615023613, -0.02060471661388874, -0.08818068355321884, 0.02530667930841446, 0.0011493486817926168, -0.06338465213775635, 0.06859876215457916, 0.035350244492292404, 0.006926531437784433, 0.10062495619058609, -0.02527276799082756, -0.006787410005927086, -0.04690910130739212, -0.008346129208803177, 0.017535362392663956, 0.080182746052742, -0.002056792378425598, -0.04790720343589783, 0.005753746256232262, -0.015201901085674763, -0.027260759845376015, 0.004428716376423836, -0.04853678494691849, -0.0761682391166687, 0.009775510989129543, 0.08503594249486923, 0.010428911074995995, -0.06264123320579529, 0.0026960328686982393, -0.008125499822199345, -0.032928552478551865, 0.05978766083717346, -0.015053517185151577, -0.006325644440948963, -0.12035868316888809, 0.07116895914077759, -0.15301690995693207, -4.2442185972438426e-33, 0.033509645611047745, 0.024638764560222626, -0.036791346967220306, 0.042324937880039215, 0.012180430814623833, -0.009152351878583431, 0.047604937106370926, 0.12462815642356873, 0.008822674863040447, 0.007997020147740841, 0.05768692493438721, 0.020390870049595833, 0.021877093240618706, 0.03712339326739311, -0.026455869898200035, 0.07104653120040894, -0.07785312831401825, -0.012902136892080307, -0.010518255643546581, -0.0443117581307888, -0.019911233335733414, -0.03913237527012825, 0.004235500935465097, -0.03248707577586174, -0.04221207648515701, 0.021402133628726006, 0.05846993997693062, -0.02617032825946808, -0.07971762120723724, -0.08202262222766876, 0.002316513331606984, -0.017575986683368683, -0.005344826262444258, 0.004625321831554174, 0.006713503040373325, -0.05359553173184395, 0.0396684855222702, 0.0362045019865036, -0.0016259733820334077, 0.01289819460362196, 0.02895430102944374, 0.04800548031926155, -0.025859376415610313, 0.007183917798101902, -0.02455330826342106, 0.013487334363162518, -0.011846030130982399, -0.004469422157853842, -0.010253798216581345, -0.10431012511253357, -0.009553265757858753, 0.009242636151611805, -0.017079856246709824, 0.08363357931375504, -0.07407137751579285, 0.03695685416460037, 0.045692458748817444, 0.013948061503469944, -0.031587399542331696, 0.008443007245659828, 0.026740102097392082, -0.11280374228954315, 0.01573447324335575, 0.12683968245983124, 0.04658440873026848, -0.02333858422935009, -0.02817392162978649, 0.0005828135181218386, -0.04114425182342529, 0.002280430868268013, -0.0033540078438818455, -0.0636461153626442, -0.028095059096813202, -0.02256285957992077, 0.009907640516757965, 0.036455001682043076, 0.06151162087917328, -0.08660847693681717, 0.021797683089971542, -0.035715457051992416, 0.00006380347622325644, 0.02716032788157463, -0.04211694374680519, -0.028293853625655174, 0.01853705197572708, 0.06073815003037453, -0.009724673815071583, 0.10136374086141586, 0.023723648861050606, 0.08747550845146179, -0.09085208177566528, 0.036296870559453964, -0.07253898680210114, 0.049563128501176834, -0.03510570526123047, -5.794784385670937e-8, -0.06550038605928421, 0.0838029757142067, -0.0031037363223731518, 0.05280216410756111, -0.07014768570661545, 0.03756042942404747, 0.051861152052879333, 0.03954668343067169, -0.022614862769842148, 0.0346473827958107, -0.0174790620803833, 0.019702237099409103, -0.09310006350278854, 0.04764863848686218, 0.004906396381556988, -0.010785882361233234, -0.0357886403799057, 0.025400642305612564, -0.018854593858122826, -0.09691344201564789, -0.023410996422171593, 0.029990263283252716, 0.029918186366558075, -0.061120614409446716, 0.05079105496406555, 0.004276973661035299, 0.03406907990574837, 0.06589346379041672, 0.021166928112506866, -0.014386164955794811, -0.025877391919493675, 0.008189654909074306, -0.05651286244392395, 0.07094184309244156, -0.030491095036268234, 0.05633703991770744, -0.14781996607780457, 0.04720090702176094, 0.054252129048109055, 0.1296907514333725, -0.019017575308680534, -0.014907503500580788, -0.10595329105854034, 0.03159996494650841, 0.06625670939683914, 0.13572295010089874, 0.004590884316712618, 0.12346354871988297, -0.005830078385770321, -0.03328321501612663, -0.008570040576159954, -0.1347568780183792, -0.00756075931712985, -0.011564417742192745, -0.011385167948901653, -0.05678129196166992, 0.0041426923125982285, -0.04944371432065964, 0.0663815513253212, 0.0417361743748188, -0.009851817972958088, -0.007421452086418867, -0.0028934692963957787, -0.028816882520914078 ]
0.172299
that release. The version is expressed as x.y, where x is the major version, y is the minor version. The patch version is not needed even though a metrics can be deprecated in a patch release, the reason for that is the metrics deprecation policy runs against the minor release. The flag can only take the previous minor version as its value. If you want to show all metrics hidden in the previous release, you can set the `show-hidden-metrics-for-version` flag to the previous version. Using a version that is too old is not allowed because it violates the metrics deprecation policy. For example, let's assume metric `A` is deprecated in `1.29`. The version in which metric `A` becomes hidden depends on its stability level: \* If metric `A` is \*\*ALPHA\*\*, it could be hidden in `1.29`. \* If metric `A` is \*\*BETA\*\*, it will be hidden in `1.30` at the earliest. If you are upgrading to `1.30` and still need `A`, you must use the command-line flag `--show-hidden-metrics-for-version=1.29`. \* If metric `A` is \*\*STABLE\*\*, it will be hidden in `1.32` at the earliest. If you are upgrading to `1.32` and still need `A`, you must use the command-line flag `--show-hidden-metrics-for-version=1.31`. ## Component metrics ### kube-controller-manager metrics Controller manager metrics provide important insight into the performance and health of the controller manager. These metrics include common Go language runtime metrics such as go\_routine count and controller specific metrics such as etcd request latencies or Cloudprovider (AWS, GCE, OpenStack) API latencies that can be used to gauge the health of a cluster. Starting from Kubernetes 1.7, detailed Cloudprovider metrics are available for storage operations for GCE, AWS, Vsphere and OpenStack. These metrics can be used to monitor health of persistent volume operations. For example, for GCE these metrics are called: ``` cloudprovider\_gce\_api\_request\_duration\_seconds { request = "instance\_list"} cloudprovider\_gce\_api\_request\_duration\_seconds { request = "disk\_insert"} cloudprovider\_gce\_api\_request\_duration\_seconds { request = "disk\_delete"} cloudprovider\_gce\_api\_request\_duration\_seconds { request = "attach\_disk"} cloudprovider\_gce\_api\_request\_duration\_seconds { request = "detach\_disk"} cloudprovider\_gce\_api\_request\_duration\_seconds { request = "list\_disk"} ``` ### kube-scheduler metrics {{< feature-state for\_k8s\_version="v1.21" state="beta" >}} The scheduler exposes optional metrics that reports the requested resources and the desired limits of all running pods. These metrics can be used to build capacity planning dashboards, assess current or historical scheduling limits, quickly identify workloads that cannot schedule due to lack of resources, and compare actual usage to the pod's request. The kube-scheduler identifies the resource [requests and limits](/docs/concepts/configuration/manage-resources-containers/) configured for each Pod; when either a request or limit is non-zero, the kube-scheduler reports a metrics timeseries. The time series is labelled by: - namespace - pod name - the node where the pod is scheduled or an empty string if not yet scheduled - priority - the assigned scheduler for that pod - the name of the resource (for example, `cpu`) - the unit of the resource if known (for example, `cores`) Once a pod reaches completion (has a `restartPolicy` of `Never` or `OnFailure` and is in the `Succeeded` or `Failed` pod phase, or has been deleted and all containers have a terminated state) the series is no longer reported since the scheduler is now free to schedule other pods to run. The two metrics are called `kube\_pod\_resource\_request` and `kube\_pod\_resource\_limit`. The metrics are exposed at the HTTP endpoint `/metrics/resources`. They require authorization for the `/metrics/resources` endpoint, usually granted by a ClusterRole with the `get` verb for the `/metrics/resources` non-resource URL. On Kubernetes 1.21 you must use the `--show-hidden-metrics-for-version=1.20` flag to expose these alpha stability metrics. ### kubelet Pressure Stall Information (PSI) metrics {{< feature-state for\_k8s\_version="v1.34" state="beta" >}} As a beta feature, Kubernetes lets you configure kubelet to collect Linux
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-metrics.md
[ 0.0033301941584795713, -0.0005714569706469774, 0.024032341316342354, -0.03263326361775398, 0.04343370348215103, 0.04194813594222069, -0.0006802196148782969, -0.036717429757118225, 0.015089327469468117, 0.010027818381786346, 0.049746204167604446, 0.00910651683807373, -0.059247687458992004, -0.02490653097629547, 0.004989992827177048, -0.012373195961117744, -0.0015652086585760117, -0.011204995214939117, -0.022493312135338783, -0.045424994081258774, -0.03140901029109955, -0.012058774940669537, -0.022046176716685295, 0.07907383888959885, 0.03350871801376343, 0.017391137778759003, -0.07473906874656677, 0.02741132117807865, -0.01356868352741003, 0.042405664920806885, -0.03583372011780739, 0.10330390185117722, -0.02329700067639351, 0.0063304235227406025, 0.03574984520673752, -0.02983947843313217, -0.03273891285061836, 0.04224943369626999, 0.02606908604502678, -0.00427332753315568, -0.05139349773526192, 0.021927502006292343, 0.0364699549973011, -0.002272161189466715, -0.09416820108890533, -0.015595887787640095, -0.08479026705026627, 0.026922641322016716, -0.055867213755846024, 0.022184114903211594, 0.005397900473326445, -0.030217990279197693, -0.034860193729400635, -0.021123886108398438, 0.08704700320959091, -0.044403620064258575, -0.05642223358154297, 0.038731127977371216, -0.10276332497596741, 0.055780451744794846, -0.025433141738176346, -0.01635419763624668, -0.03298930451273918, -0.021393556147813797, 0.003208071691915393, -0.05871915444731712, 0.05015898123383522, -0.1032327339053154, 0.0076055582612752914, 0.04728667438030243, -0.08993282169103622, -0.02786378562450409, -0.009927342645823956, -0.10546346753835678, -0.05686766654253006, 0.06591455638408661, 0.06167374551296234, 0.01745752803981304, 0.019555097445845604, -0.15924321115016937, 0.049623362720012665, -0.014937939122319221, 0.014131621457636356, 0.009737181477248669, -0.04285329580307007, -0.029554901644587517, 0.0515562929213047, -0.09518390893936157, 0.09853212535381317, -0.012838427908718586, 0.05507957935333252, -0.026526426896452904, 0.05666620284318924, 0.03349224105477333, 0.03845273703336716, -0.0627313032746315, -0.0402650311589241, 0.092970110476017, -0.008337783627212048, 0.10069962590932846, 0.01794867031276226, 0.000148228500620462, -0.005484734661877155, 0.08354979753494263, 0.03337468206882477, 0.008737266063690186, 0.04278060793876648, 0.012119089253246784, 0.0013558495556935668, 0.09036149084568024, 0.10000655055046082, 0.029025372117757797, -0.01641009747982025, -0.03678238391876221, -0.030857423320412636, -0.03274562954902649, 0.011509510688483715, -0.010484864935278893, -0.0022700184490531683, 0.03507475182414055, 0.04464821517467499, -0.009479045867919922, 0.04809476062655449, -0.039155807346105576, -0.08344615995883942, 0.03871886059641838, 0.044187963008880615, 2.5807188687036364e-33, 0.030204443261027336, -0.037523332983255386, -0.0004967889981344342, -0.029823994264006615, -0.03536878898739815, 0.06839820742607117, -0.007270833011716604, -0.0017140100244432688, -0.03689553961157799, 0.008371854200959206, -0.005486451089382172, 0.06531987339258194, -0.10396479070186615, 0.0010218744864687324, 0.040020257234573364, 0.026515144854784012, 0.029933735728263855, 0.04294798895716667, 0.004179851617664099, 0.011834592558443546, 0.0782572329044342, -0.08456584066152573, -0.047254905104637146, -0.06214539334177971, 0.042895156890153885, -0.020528161898255348, 0.002006152644753456, 0.01781417801976204, -0.07561696320772171, 0.0034140339121222496, -0.029579591006040573, 0.029660573229193687, 0.06111089140176773, -0.0543392188847065, 0.007140140049159527, -0.07134830206632614, -0.0064010643400251865, -0.014481661841273308, 0.004568670876324177, -0.03802921250462532, 0.07777715474367142, 0.015525265596807003, -0.06509055942296982, -0.0684976652264595, 0.0835207998752594, -0.011850470677018166, 0.03519095480442047, 0.03825300559401512, 0.0744498074054718, -0.06552666425704956, 0.08706539124250412, 0.05541833117604256, -0.07277757674455643, -0.10723657160997391, -0.06070179492235184, -0.06008283793926239, 0.043535731732845306, -0.0864519402384758, -0.011291529051959515, 0.03993922099471092, 0.020447835326194763, 0.025898069143295288, 0.06392449140548706, -0.05679118260741234, -0.022123239934444427, 0.09600277990102768, 0.017270280048251152, 0.011542258784174919, 0.008137920871376991, 0.04162155091762543, -0.1167176142334938, -0.00140025292057544, -0.05609184503555298, 0.03365272283554077, 0.04087566211819649, -0.0034511047415435314, 0.08200808614492416, 0.016704533249139786, 0.07198362797498703, -0.05895443260669708, -0.03921206295490265, -0.01670176163315773, -0.02611730620265007, 0.05140851065516472, -0.01460082083940506, -0.06318379938602448, 0.05829077214002609, 0.06852229684591293, -0.013828071765601635, -0.036725111305713654, -0.03461374714970589, -0.024051601067185402, -0.046401940286159515, -0.001944239134900272, -0.015103350393474102, -6.29499118447619e-33, -0.045287687331438065, 0.052929412573575974, -0.012800726108253002, -0.01959230937063694, -0.06033100560307503, -0.05706735700368881, -0.0034925290383398533, 0.07671117037534714, -0.04779159277677536, -0.00315771228633821, -0.01171166729182005, -0.026683401316404343, -0.03290567174553871, -0.04148636758327484, -0.00025388578069396317, 0.05144312232732773, -0.0856008231639862, -0.03926011174917221, -0.07997270673513412, 0.06880396604537964, 0.02245284430682659, 0.030627872794866562, -0.01001549232751131, 0.06861240416765213, -0.013322788290679455, -0.07377152889966965, 0.04232381284236908, -0.027272425591945648, 0.05299856513738632, -0.08624905347824097, 0.05292484536767006, -0.03661305084824562, -0.04783613234758377, -0.05397092178463936, -0.0373871736228466, -0.05623990669846535, -0.026490995660424232, -0.09530556946992874, -0.029071185737848282, 0.10057239979505539, -0.02163025550544262, -0.005072772968560457, -0.10605635493993759, 0.05045901611447334, 0.007303713355213404, 0.0780642181634903, 0.02859381027519703, 0.018834302201867104, -0.020589953288435936, -0.1010897159576416, 0.06521746516227722, -0.04559953883290291, 0.04991577938199043, 0.017106186598539352, -0.07092080265283585, 0.027588486671447754, -0.08609940111637115, 0.056952472776174545, -0.07566668838262558, 0.033226728439331055, 0.09961862117052078, -0.04897666722536087, 0.007581733632832766, -0.06303935497999191, 0.05638320744037628, -0.007752234116196632, 0.009535562247037888, 0.019641321152448654, -0.012029477395117283, 0.07920566946268082, 0.027233809232711792, 0.00997158233076334, -0.08783423900604248, -0.09160549193620682, 0.0022920400369912386, 0.0724153146147728, 0.004385707434266806, -0.039307091385126114, 0.06720270216464996, -0.005614272318780422, -0.05183729529380798, 0.06689237803220749, 0.026756303384900093, 0.04748125746846199, 0.04267751798033714, -0.010206179693341255, 0.034245286136865616, 0.04688434302806854, 0.04866044223308563, 0.04594140872359276, -0.07342122495174408, -0.03533190116286278, -0.14815957844257355, -0.005367064382880926, -0.03632769361138344, -6.009615560742532e-8, 0.03654337674379349, 0.048532016575336456, -0.05551712214946747, 0.031012024730443954, 0.03242988884449005, 0.06089458614587784, -0.03634631633758545, 0.026627380400896072, 0.04135211557149887, 0.03020298294723034, -0.028831753879785538, -0.02572343312203884, -0.07037312537431717, 0.020540785044431686, -0.016556572169065475, 0.0012771225301548839, -0.09580712765455246, 0.05702728033065796, -0.04404822364449501, 0.04401664435863495, -0.060249533504247665, 0.0584416389465332, 0.03618659824132919, -0.06531718373298645, -0.05996282398700714, -0.11307919770479202, 0.039909131824970245, 0.07899776101112366, -0.03579365462064743, 0.010766956955194473, 0.09162955731153488, 0.0021459776908159256, 0.13858424127101898, -0.024479903280735016, 0.0126959765329957, 0.0340978279709816, 0.003123984904959798, 0.11156667023897171, 0.0904393345117569, 0.12790806591510773, -0.034014955163002014, -0.06184897944331169, -0.0406017042696476, 0.043168190866708755, -0.042667120695114136, -0.004015869926661253, -0.054802387952804565, -0.036631811410188675, -0.11854109168052673, -0.003951934166252613, 0.03446194529533386, -0.007189358584582806, -0.05990779027342796, 0.032013021409511566, 0.02741069905459881, -0.03392680734395981, -0.06946458667516708, 0.014022271148860455, 0.026293160393834114, -0.025582922622561455, 0.007722089067101479, -0.061122260987758636, -0.0026592914946377277, 0.0101978974416852 ]
0.007389
a ClusterRole with the `get` verb for the `/metrics/resources` non-resource URL. On Kubernetes 1.21 you must use the `--show-hidden-metrics-for-version=1.20` flag to expose these alpha stability metrics. ### kubelet Pressure Stall Information (PSI) metrics {{< feature-state for\_k8s\_version="v1.34" state="beta" >}} As a beta feature, Kubernetes lets you configure kubelet to collect Linux kernel [Pressure Stall Information](https://docs.kernel.org/accounting/psi.html) (PSI) for CPU, memory and I/O usage. The information is collected at node, pod and container level. The metrics are exposed at the `/metrics/cadvisor` endpoint with the following names: ``` container\_pressure\_cpu\_stalled\_seconds\_total container\_pressure\_cpu\_waiting\_seconds\_total container\_pressure\_memory\_stalled\_seconds\_total container\_pressure\_memory\_waiting\_seconds\_total container\_pressure\_io\_stalled\_seconds\_total container\_pressure\_io\_waiting\_seconds\_total ``` This feature is enabled by default, by setting the `KubeletPSI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/). The information is also exposed in the [Summary API](/docs/reference/instrumentation/node-metrics#psi). You can learn how to interpret the PSI metrics in [Understand PSI Metrics](/docs/reference/instrumentation/understand-psi-metrics/). #### Requirements Pressure Stall Information requires: - [Linux kernel versions 4.20 or later](/docs/reference/node/kernel-version-requirements#requirements-psi). - [cgroup v2](/docs/concepts/architecture/cgroups) ## Disabling metrics You can explicitly turn off metrics via command line flag `--disabled-metrics`. This may be desired if, for example, a metric is causing a performance problem. The input is a list of disabled metrics (i.e. `--disabled-metrics=metric1,metric2`). ## Metric cardinality enforcement Metrics with unbounded dimensions could cause memory issues in the components they instrument. To limit resource use, you can use the `--allow-metric-labels` command line option to dynamically configure an allow-list of label values for a metric. In alpha stage, the flag can only take in a series of mappings as metric label allow-list. Each mapping is of the format `,=` where `` is a comma-separated list of acceptable label names. The overall format looks like: ``` --allow-metric-labels ,=', ...', ,=', ...', ... ``` Here is an example: ```none --allow-metric-labels number\_count\_metric,odd\_number='1,3,5', number\_count\_metric,even\_number='2,4,6', date\_gauge\_metric,weekend='Saturday,Sunday' ``` In addition to specifying this from the CLI, this can also be done within a configuration file. You can specify the path to that configuration file using the `--allow-metric-labels-manifest` command line argument to a component. Here's an example of the contents of that configuration file: ```yaml "metric1,label2": "v1,v2,v3" "metric2,label1": "v1,v2,v3" ``` Additionally, the `cardinality\_enforcement\_unexpected\_categorizations\_total` meta-metric records the count of unexpected categorizations during cardinality enforcement, that is, whenever a label value is encountered that is not allowed with respect to the allow-list constraints. ## {{% heading "whatsnext" %}} \* Read about the [Prometheus text format](https://github.com/prometheus/docs/blob/main/docs/instrumenting/exposition\_formats.md#text-based-format) for metrics \* See the list of [stable Kubernetes metrics](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml) \* Read about the [Kubernetes deprecation policy](/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-metrics.md
[ 0.0191586185246706, 0.013065081089735031, -0.013477301225066185, 0.05365779623389244, -0.019561437889933586, -0.011368341743946075, 0.009014077484607697, -0.012263360433280468, 0.07831578701734543, -0.030720287933945656, -0.049739062786102295, -0.09426254779100418, -0.04604566842317581, -0.08749981969594955, -0.07629505544900894, -0.05701790004968643, 0.054382722824811935, 0.03550030291080475, -0.019636554643511772, -0.05022094026207924, 0.019334465265274048, 0.03847404569387436, 0.045938290655612946, -0.008273625746369362, -0.021458830684423447, 0.006872520316392183, -0.06726797670125961, -0.02494141459465027, 0.08411024510860443, -0.0451333187520504, -0.05266008898615837, -0.03633737564086914, 0.002963706385344267, 0.05207311362028122, 0.10962527990341187, 0.07168643921613693, 0.03483597934246063, -0.039391521364450455, -0.08151252567768097, 0.07804778218269348, 0.006121779326349497, -0.02262657880783081, -0.05592312663793564, -0.011636140756309032, -0.002664236119017005, 0.04794064164161682, -0.07609062641859055, -0.004128800239413977, -0.03094303049147129, -0.01034991629421711, -0.005571978632360697, -0.07554430514574051, 0.07039264589548111, 0.01942349784076214, 0.08509977906942368, 0.027584170922636986, 0.012058421969413757, -0.003080091206356883, 0.030231010168790817, 0.008801436983048916, 0.03651148080825806, -0.0432487353682518, 0.01611803099513054, -0.01333999540656805, 0.01101093739271164, 0.0512554869055748, 0.034213561564683914, 0.03786035627126694, -0.008676603436470032, -0.020137013867497444, 0.021698279306292534, -0.004284920636564493, -0.059841036796569824, -0.021270491182804108, -0.02133253961801529, 0.023946868255734444, -0.02485995553433895, 0.033988598734140396, 0.020384209230542183, -0.09173890948295593, 0.05248688906431198, 0.02319335751235485, 0.04583674669265747, -0.03943602740764618, -0.06789937615394592, 0.007092658430337906, 0.04231870919466019, -0.008463543839752674, 0.06903336197137833, -0.032365962862968445, -0.0026187764015048742, 0.030227016657590866, -0.019536882638931274, -0.07720519602298737, 0.070996955037117, 0.002871992066502571, -0.0062905787490308285, -0.005661563947796822, 0.025193842127919197, -0.013572927564382553, 0.018402261659502983, 0.0506243035197258, -0.01015660259872675, 0.019283784553408623, 0.06354935467243195, -0.017535028979182243, 0.022959375753998756, 0.043448254466056824, 0.012305614538490772, 0.09976880997419357, 0.040830254554748535, 0.053241852670907974, -0.032279957085847855, 0.0017495615174993873, 0.073612280189991, -0.05405597388744354, 0.007695856038480997, -0.029513750225305557, 0.06474432349205017, 0.045200735330581665, 0.052713192999362946, -0.057258497923612595, -0.033512845635414124, -0.0046052164398133755, -0.02971910685300827, 0.02672160044312477, -0.08139030635356903, -8.730942046404308e-34, 0.04434971511363983, -0.0644485279917717, 0.05095094069838524, -0.011999732814729214, -0.09295683354139328, -0.053170107305049896, -0.07155101001262665, -0.052515264600515366, -0.03451456502079964, -0.005969203542917967, -0.08541767299175262, 0.0003887060156557709, -0.08589866757392883, -0.050550077110528946, 0.019946889951825142, -0.013511049561202526, -0.027509130537509918, 0.0600566603243351, 0.07268601655960083, -0.009302535094320774, 0.10592588037252426, -0.08226077258586884, -0.02665586955845356, 0.023317785933613777, 0.10166769474744797, -0.005455683451145887, 0.02367444336414337, -0.04472086951136589, -0.06627339124679565, 0.014024602249264717, 0.01447093766182661, 0.026445064693689346, -0.02624063938856125, -0.018086817115545273, -0.14037959277629852, -0.02264101430773735, -0.02534487098455429, 0.05318453535437584, -0.0037683744449168444, -0.012480267323553562, -0.042304929345846176, 0.004793894477188587, -0.01532822661101818, -0.11885254085063934, 0.003026463557034731, -0.06607412546873093, 0.03079676814377308, -0.11732799559831619, 0.03428184986114502, 0.009052214212715626, -0.03970075771212578, 0.0048332540318369865, 0.02159533090889454, 0.005510301794856787, 0.04197227209806442, 0.003746350994333625, 0.12200964242219925, -0.053743403404951096, -0.05080447718501091, 0.10883701592683792, -0.07003216445446014, 0.01752859726548195, 0.02786756120622158, -0.07957811653614044, -0.006316841579973698, 0.0663619413971901, -0.05570755898952484, 0.06298907846212387, -0.0335596427321434, 0.031944531947374344, -0.0858391523361206, -0.006433574482798576, 0.015518007799983025, 0.015283158048987389, -0.03356504067778587, -0.064821258187294, -0.04200395196676254, -0.01890072226524353, -0.1705518513917923, 0.038515355437994, 0.0060598719865083694, -0.09400168806314468, 0.024069901555776596, 0.03761480376124382, 0.004872904624789953, -0.0673070028424263, 0.022432737052440643, 0.03805910795927048, -0.08979084342718124, 0.03204068914055824, -0.026961512863636017, 0.005716767627745867, -0.05293084308505058, 0.034766875207424164, -0.16440586745738983, -1.3043965817750633e-33, 0.05106573551893234, 0.025176672264933586, 0.010971377603709698, 0.06144041568040848, 0.04281597211956978, 0.01095148827880621, -0.02309860661625862, 0.060264214873313904, -0.009491859003901482, -0.04025881364941597, -0.06657927483320236, -0.03861755505204201, -0.02141779474914074, 0.013121848925948143, -0.001424815971404314, 0.04932086542248726, -0.06277690082788467, -0.02382376231253147, 0.015357405878603458, 0.045139700174331665, -0.05842231586575508, -0.02534295804798603, -0.017027251422405243, -0.0033625829964876175, -0.03425946831703186, 0.030640676617622375, 0.03417440131306648, -0.03397412225604057, -0.005536308512091637, -0.05925522372126579, 0.01732337474822998, -0.09354229271411896, -0.018289055675268173, 0.06726959347724915, 0.0165657177567482, -0.0469730868935585, -0.020037684589624405, 0.03285745158791542, -0.011985358782112598, 0.0288236103951931, 0.06307598948478699, 0.09366043657064438, -0.04605068266391754, -0.029118604958057404, -0.02850128524005413, 0.09266677498817444, 0.044764839112758636, -0.08693132549524307, -0.042920034378767014, -0.10699471086263657, 0.06567928940057755, -0.005548004060983658, -0.02252468839287758, 0.14699023962020874, -0.04151300713419914, 0.020440807566046715, -0.020696185529232025, 0.10792136937379837, -0.05444232374429703, 0.011040489189326763, 0.06225448474287987, -0.10942435264587402, 0.010452223010361195, 0.005429111421108246, 0.024735596030950546, -0.05946314334869385, 0.030246566981077194, -0.017399104312062263, -0.047235846519470215, 0.0725831538438797, 0.025906400755047798, 0.028722047805786133, 0.05794195085763931, 0.0799005776643753, -0.015906594693660736, 0.017260732129216194, 0.027800893411040306, -0.028435135260224342, 0.06231110170483589, 0.011835983954370022, -0.04607486352324486, 0.09082520008087158, -0.019518369808793068, 0.039355501532554626, 0.07033322751522064, 0.0992136299610138, 0.06396959722042084, 0.054239433258771896, 0.07101326435804367, 0.01952294446527958, -0.03922107443213463, 0.006372523494064808, -0.10974323004484177, 0.038047436624765396, 0.0008005985873751342, -5.0802167805841236e-8, 0.0947469100356102, -0.04029678925871849, -0.009408102370798588, 0.030059505254030228, 0.008406410925090313, -0.02010134980082512, 0.03138262405991554, 0.057691942900419235, -0.04787187650799751, 0.05847642943263054, 0.02088182233273983, 0.03277043625712395, 0.0011739283800125122, -0.008547552861273289, 0.029200708493590355, -0.02145294100046158, -0.019425449892878532, 0.08965697139501572, 0.030000783503055573, -0.06464800238609314, -0.027287757024168968, -0.007431867532432079, -0.006179779302328825, -0.029685690999031067, 0.02790263295173645, -0.04293310269713402, 0.04439985752105713, -0.017035629600286484, -0.012948139570653439, -0.04707162827253342, -0.026540908962488174, -0.009891215711832047, -0.040175408124923706, -0.01384330540895462, 0.05746651068329811, 0.08907170593738556, -0.18721283972263336, 0.06172318756580353, 0.09148968011140823, 0.12171021848917007, -0.015475951135158539, -0.02268996462225914, -0.056087393313646317, 0.020497802644968033, 0.021748391911387444, 0.09376925975084305, -0.052533023059368134, 0.07256193459033966, -0.020903918892145157, -0.023302029818296432, 0.016929863020777702, -0.04581890255212784, -0.03193154186010361, 0.053709860891103745, -0.03529396653175354, 0.002178231719881296, -0.05904253199696541, -0.03585488721728325, 0.041146885603666306, -0.0023598831612616777, 0.01948329247534275, -0.03443458676338196, -0.08035773038864136, -0.013267448171973228 ]
0.182175
In order to run workloads in your cluster, you need {{< glossary\_tooltip text="Nodes" term\_id="node" >}}. Nodes in your cluster can be \_autoscaled\_ - dynamically [\_provisioned\_](#provisioning), or [\_consolidated\_](#consolidation) to provide needed capacity while optimizing cost. Autoscaling is performed by Node [\_autoscalers\_](#autoscalers). ## Node provisioning {#provisioning} If there are Pods in a cluster that can't be scheduled on existing Nodes, new Nodes can be automatically added to the clusterβ€”\_provisioned\_β€”to accommodate the Pods. This is especially useful if the number of Pods changes over time, for example as a result of [combining horizontal workload with Node autoscaling](#horizontal-workload-autoscaling). Autoscalers provision the Nodes by creating and deleting cloud provider resources backing them. Most commonly, the resources backing the Nodes are Virtual Machines. The main goal of provisioning is to make all Pods schedulable. This goal is not always attainable because of various limitations, including reaching configured provisioning limits, provisioning configuration not being compatible with a particular set of pods, or the lack of cloud provider capacity. While provisioning, Node autoscalers often try to achieve additional goals (for example minimizing the cost of the provisioned Nodes or balancing the number of Nodes between failure domains). There are two main inputs to a Node autoscaler when determining Nodes to provisionβ€”[Pod scheduling constraints](#provisioning-pod-constraints), and [Node constraints imposed by autoscaler configuration](#provisioning-node-constraints). Autoscaler configuration may also include other Node provisioning triggers (for example the number of Nodes falling below a configured minimum limit). {{< note >}} Provisioning was formerly known as \_scale-up\_ in Cluster Autoscaler. {{< /note >}} ### Pod scheduling constraints {#provisioning-pod-constraints} Pods can express [scheduling constraints](/docs/concepts/scheduling-eviction/assign-pod-node/) to impose limitations on the kind of Nodes they can be scheduled on. Node autoscalers take these constraints into account to ensure that the pending Pods can be scheduled on the provisioned Nodes. The most common kind of scheduling constraints are the resource requests specified by Pod containers. Autoscalers will make sure that the provisioned Nodes have enough resources to satisfy the requests. However, they don't directly take into account the real resource usage of the Pods after they start running. In order to autoscale Nodes based on actual workload resource usage, you can combine [horizontal workload autoscaling](#horizontal-workload-autoscaling) with Node autoscaling. Other common Pod scheduling constraints include [Node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity), [inter-Pod affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity), or a requirement for a particular [storage volume](/docs/concepts/storage/volumes/). ### Node constraints imposed by autoscaler configuration {#provisioning-node-constraints} The specifics of the provisioned Nodes (for example the amount of resources, the presence of a given label) depend on autoscaler configuration. Autoscalers can either choose them from a pre-defined set of Node configurations, or use [auto-provisioning](#autoprovisioning). ### Auto-provisioning {#autoprovisioning} Node auto-provisioning is a mode of provisioning in which a user doesn't have to fully configure the specifics of the Nodes that can be provisioned. Instead, the autoscaler dynamically chooses the Node configuration based on the pending Pods it's reacting to, as well as pre-configured constraints (for example, the minimum amount of resources or the need for a given label). ## Node consolidation {#consolidation} The main consideration when running a cluster is ensuring that all schedulable pods are running, whilst keeping the cost of the cluster as low as possible. To achieve this, the Pods' resource requests should utilize as much of the Nodes' resources as possible. From this perspective, the overall Node utilization in a cluster can be used as a proxy for how cost-effective the cluster is. {{< note >}} Correctly setting the resource requests of your Pods is as important to the overall cost-effectiveness of a cluster as optimizing Node utilization. Combining Node autoscaling with [vertical workload autoscaling](#vertical-workload-autoscaling) can help you achieve this. {{< /note >}} Nodes in your cluster can be
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-autoscaling.md
[ -0.004501106217503548, -0.036114830523729324, 0.023538930341601372, 0.08067838102579117, -0.004300824366509914, 0.010965080931782722, -0.004799526184797287, -0.03754241019487381, -0.014169741421937943, 0.04802984371781349, -0.013468308374285698, -0.06494645774364471, 0.021495064720511436, -0.014252599328756332, 0.013949096202850342, -0.019729550927877426, 0.0445062518119812, -0.0649113655090332, -0.03484565019607544, -0.03574051335453987, 0.030907446518540382, -0.022711152210831642, -0.026129143312573433, 0.0652487501502037, 0.01034147385507822, 0.023584848269820213, -0.08920632302761078, -0.00751557108014822, 0.06705214828252792, 0.055719804018735886, -0.04085773229598999, 0.010932160541415215, 0.004381460137665272, 0.09209105372428894, 0.1072988361120224, 0.09506160020828247, -0.015465090982615948, -0.03300003334879875, -0.08231797814369202, -0.013163255527615547, 0.10185041278600693, -0.06066293269395828, -0.1403362900018692, -0.01339733600616455, -0.02943899668753147, 0.029225416481494904, -0.055983297526836395, -0.003367423778399825, -0.03156181052327156, -0.0015157276066020131, 0.009181942790746689, -0.12573456764221191, 0.02699948474764824, 0.0511261411011219, -0.009967821650207043, 0.07932818681001663, 0.04207099601626396, -0.0221722349524498, 0.10440336912870407, -0.015248578041791916, 0.012094011530280113, -0.07003742456436157, 0.012345434166491032, -0.03692887723445892, 0.015277267433702946, 0.010671354830265045, 0.030709274113178253, -0.008613602258265018, 0.015385990962386131, 0.0022899191826581955, 0.05796316638588905, 0.006826243828982115, -0.03064761497080326, 0.005772995762526989, -0.015260579064488411, 0.038900382816791534, 0.00414293585345149, -0.011686562560498714, -0.0016110053984448314, -0.059655655175447464, -0.0076432484202086926, 0.06555144488811493, 0.025938838720321655, 0.06569672375917435, -0.07570500671863556, 0.0005467497976496816, -0.008631940931081772, -0.025340689346194267, 0.0765807032585144, -0.03041055053472519, 0.018836716189980507, 0.022527413442730904, -0.037691984325647354, -0.07334953546524048, 0.04858895763754845, -0.027847232297062874, 0.013092473149299622, -0.042505789548158646, 0.05028139799833298, -0.010900728404521942, 0.0337408110499382, -0.040278542786836624, 0.07671795040369034, 0.012620024383068085, -0.03435921296477318, -0.007488430943340063, -0.10177301615476608, -0.005177815444767475, 0.02237085811793804, 0.03054187260568142, 0.01993561163544655, 0.08042808622121811, -0.01599886082112789, -0.0003989210817962885, -0.018738383427262306, 0.06373126059770584, -0.00014786639076191932, -0.044450778514146805, 0.025845494121313095, 0.05898968130350113, 0.043169837445020676, -0.09680525213479996, -0.014917274937033653, -0.06197661533951759, 0.0087332334369421, 0.003567262552678585, -0.05722110718488693, 5.060348896656402e-33, 0.014391684904694557, -0.08143918961286545, -0.011266154237091541, -0.008654488250613213, 0.028475133702158928, -0.04467953369021416, -0.04917469993233681, 0.04770871251821518, -0.055216170847415924, -0.08657428622245789, -0.08237892389297485, 0.08099903911352158, -0.012584405019879341, 0.060666002333164215, 0.05353625863790512, -0.08918239921331406, 0.022597763687372208, 0.08324019610881805, 0.10567813366651535, -0.014569423161447048, 0.019455406814813614, -0.022280165925621986, -0.0321362130343914, -0.005446114577353001, -0.02348759025335312, -0.037212491035461426, 0.06400635093450546, -0.10530859231948853, 0.02083687297999859, 0.027701569721102715, -0.005087582394480705, 0.0070228599943220615, 0.05090872198343277, 0.06905800849199295, -0.12088462710380554, 0.013463889248669147, -0.061159856617450714, -0.00940005574375391, -0.04340637847781181, -0.029147226363420486, 0.10699321329593658, 0.06149453669786453, 0.051684342324733734, -0.07765880972146988, 0.004700479097664356, 0.03547568619251251, 0.06737922877073288, -0.0922863557934761, 0.037362031638622284, -0.016832593828439713, 0.06213995814323425, -0.034627240151166916, 0.05547776818275452, -0.035183753818273544, 0.050385769456624985, 0.03145851567387581, 0.02263622172176838, -0.0723576471209526, 0.0507705993950367, 0.0032986048609018326, -0.07948365062475204, -0.07588966190814972, -0.04418289661407471, 0.0527338944375515, 0.052430734038352966, 0.006908788345754147, 0.017713570967316628, 0.08867181837558746, 0.034548982977867126, 0.043059468269348145, -0.04375346004962921, 0.03355742245912552, 0.013488193042576313, 0.036136213690042496, -0.008069523610174656, -0.059218429028987885, 0.03544110804796219, 0.006164148449897766, -0.17723789811134338, 0.057495925575494766, -0.027410289272665977, 0.0035289167426526546, -0.021756188943982124, 0.014305044896900654, 0.031304143369197845, -0.07468324154615402, 0.04304085671901703, 0.010530115105211735, -0.04395582899451256, 0.0012893382227048278, 0.0023531161714345217, -0.09465900808572769, -0.046043332666158676, -0.0021928781643509865, -0.12222378700971603, -6.250104932690041e-33, 0.05011449381709099, -0.021828722208738327, -0.03365854546427727, 0.08409296721220016, 0.02098747529089451, 0.010512802749872208, -0.01356021873652935, 0.020763026550412178, -0.028790222480893135, -0.02385018952190876, -0.05450884997844696, 0.003269196255132556, 0.006554985418915749, 0.03298189118504524, -0.08493205904960632, 0.0013697115937247872, -0.08021429181098938, -0.03364694491028786, 0.016056640073657036, 0.049569372087717056, -0.007137561682611704, -0.02072659134864807, 0.06470117717981339, -0.002960641635581851, 0.09454904496669769, -0.04466870427131653, -0.02094479463994503, 0.05381351336836815, 0.0057067545130848885, -0.017978664487600327, -0.016829963773489, -0.033304233103990555, -0.0554472953081131, -0.004988149739801884, 0.0472324900329113, -0.016986437141895294, -0.06294163316488266, 0.0505555085837841, 0.0343673899769783, -0.012094981968402863, 0.09555218368768692, -0.05517687648534775, -0.11201886832714081, -0.09243287891149521, 0.025009848177433014, 0.02892918698489666, -0.02734917588531971, -0.007585436105728149, -0.06631147116422653, -0.04313838481903076, -0.007234657648950815, -0.031926773488521576, -0.051585715264081955, 0.09601914882659912, -0.006251057609915733, 0.011437932960689068, 0.059654898941516876, 0.039521224796772, -0.08371468633413315, -0.035332828760147095, 0.04267984628677368, -0.0850304514169693, 0.036897268146276474, -0.018679866567254066, -0.021217981353402138, -0.07345430552959442, -0.0035384809598326683, -0.036055900156497955, -0.08459673821926117, -0.000812283658888191, -0.09950381517410278, 0.026575997471809387, 0.0050147417932748795, 0.030111044645309448, -0.09369000047445297, -0.022835975512862206, 0.0013395942514762282, -0.08166167140007019, 0.019624117761850357, -0.0035609393380582333, -0.053751397877931595, 0.09481972455978394, -0.0032718409784138203, 0.03981069102883339, -0.03242035582661629, 0.0248746108263731, 0.060273099690675735, 0.1287265568971634, 0.019935058429837227, 0.13490964472293854, -0.01904372125864029, -0.036930620670318604, -0.021492524072527885, 0.16121280193328857, -0.024279091507196426, -5.669791036666538e-8, 0.01513790525496006, 0.12528668344020844, -0.0038007155526429415, 0.017227936536073685, 0.01709243841469288, -0.0822627916932106, 0.08303352445363998, 0.04538102447986603, 0.03435662016272545, 0.03346047177910805, 0.0359659269452095, -0.06559585779905319, 0.009672396816313267, 0.04416054114699364, -0.03514861315488815, 0.04862496629357338, -0.018202459439635277, 0.020106563344597816, -0.008409867063164711, -0.10161623358726501, -0.041571952402591705, 0.004379634279757738, 0.017114782705903053, 0.044980838894844055, -0.022853940725326538, 0.018510818481445312, 0.04950385540723801, 0.025970829650759697, -0.02839132770895958, -0.010016496293246746, -0.07525543868541718, 0.004908841103315353, -0.05048058182001114, 0.039742663502693176, -0.07060033828020096, 0.016032246872782707, -0.12727254629135132, 0.03665132075548172, 0.08046578615903854, 0.034343041479587555, 0.029430145397782326, -0.0068409498780965805, -0.03627709299325943, -0.04599861055612564, 0.03954879567027092, 0.021503299474716187, -0.10035772621631622, 0.06796343624591827, 0.0041235024109482765, 0.05935490503907204, -0.0118314940482378, 0.0012044159229844809, -0.004403361119329929, 0.07036111503839493, 0.033502090722322464, -0.03850903362035751, 0.011127893812954426, -0.04971645027399063, 0.06669788807630539, 0.019947368651628494, -0.03199475258588791, -0.03761559724807739, 0.0012200759956613183, -0.03876107186079025 ]
0.121571
cost-effective the cluster is. {{< note >}} Correctly setting the resource requests of your Pods is as important to the overall cost-effectiveness of a cluster as optimizing Node utilization. Combining Node autoscaling with [vertical workload autoscaling](#vertical-workload-autoscaling) can help you achieve this. {{< /note >}} Nodes in your cluster can be automatically \_consolidated\_ in order to improve the overall Node utilization, and in turn the cost-effectiveness of the cluster. Consolidation happens through removing a set of underutilized Nodes from the cluster. Optionally, a different set of Nodes can be [provisioned](#provisioning) to replace them. Consolidation, like provisioning, only considers Pod resource requests and not real resource usage when making decisions. For the purpose of consolidation, a Node is considered \_empty\_ if it only has DaemonSet and static Pods running on it. Removing empty Nodes during consolidation is more straightforward than non-empty ones, and autoscalers often have optimizations designed specifically for consolidating empty Nodes. Removing non-empty Nodes during consolidation is disruptiveβ€”the Pods running on them are terminated, and possibly have to be recreated (for example by a Deployment). However, all such recreated Pods should be able to schedule on existing Nodes in the cluster, or the replacement Nodes provisioned as part of consolidation. \_\_No Pods should normally become pending as a result of consolidation.\_\_ {{< note >}} Autoscalers predict how a recreated Pod will likely be scheduled after a Node is provisioned or consolidated, but they don't control the actual scheduling. Because of this, some Pods might become pending as a result of consolidation - if for example a completely new Pod appears while consolidation is being performed. {{< /note >}} Autoscaler configuration may also enable triggering consolidation by other conditions (for example, the time elapsed since a Node was created), in order to optimize different properties (for example, the maximum lifespan of Nodes in a cluster). The details of how consolidation is performed depend on the configuration of a given autoscaler. {{< note >}} Consolidation was formerly known as \_scale-down\_ in Cluster Autoscaler. {{< /note >}} ## Autoscalers {#autoscalers} The functionalities described in previous sections are provided by Node \_autoscalers\_. In addition to the Kubernetes API, autoscalers also need to interact with cloud provider APIs to provision and consolidate Nodes. This means that they need to be explicitly integrated with each supported cloud provider. The performance and feature set of a given autoscaler can differ between cloud provider integrations. {{< mermaid >}} graph TD na[Node autoscaler] k8s[Kubernetes] cp[Cloud Provider] k8s --> |get Pods/Nodes|na na --> |drain Nodes|k8s na --> |create/remove resources backing Nodes|cp cp --> |get resources backing Nodes|na classDef white\_on\_blue fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; classDef blue\_on\_white fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5; class na blue\_on\_white; class k8s,cp white\_on\_blue; {{}} ### Autoscaler implementations [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) and [Karpenter](https://github.com/kubernetes-sigs/karpenter) are the two Node autoscalers currently sponsored by [SIG Autoscaling](https://github.com/kubernetes/community/tree/master/sig-autoscaling). From the perspective of a cluster user, both autoscalers should provide a similar Node autoscaling experience. Both will provision new Nodes for unschedulable Pods, and both will consolidate the Nodes that are no longer optimally utilized. Different autoscalers may also provide features outside the Node autoscaling scope described on this page, and those additional features may differ between them. Consult the sections below, and the linked documentation for the individual autoscalers to decide which autoscaler fits your use case better. #### Cluster Autoscaler Cluster Autoscaler adds or removes Nodes to pre-configured \_Node groups\_. Node groups generally map to some sort of cloud provider resource group (most commonly a Virtual Machine group). A single instance of Cluster Autoscaler can simultaneously manage multiple Node groups. When provisioning, Cluster Autoscaler will add Nodes to the group that best fits the requests of pending Pods. When consolidating,
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-autoscaling.md
[ 0.03887953236699104, 0.012217674404382706, 0.035519350320100784, 0.09353583306074142, 0.0038700737059116364, -0.04221871867775917, -0.01691466197371483, 0.024825135245919228, -0.0006258703651838005, 0.05504588037729263, -0.012520493939518929, -0.008794039487838745, -0.001419347943738103, -0.03769524022936821, 0.015658099204301834, -0.0013955533504486084, 0.06345861405134201, -0.014436913654208183, -0.05403297394514084, -0.054950863122940063, -0.03350678086280823, -0.07670797407627106, 0.0000827629555715248, 0.03305916115641594, 0.038036245852708817, 0.027387475594878197, -0.06606102734804153, -0.03888639435172081, 0.09026233851909637, -0.0017099996330216527, -0.044266656041145325, 0.048211704939603806, 0.07223480939865112, 0.04831811413168907, 0.04867473244667053, 0.09567774832248688, -0.004112899303436279, -0.04323331639170647, -0.06182396039366722, 0.0021669375710189342, 0.04232620820403099, -0.02332489751279354, -0.13343676924705505, 0.009429363533854485, -0.0634627416729927, 0.027283521369099617, -0.09106411039829254, -0.015694892033934593, -0.03661356866359711, -0.05133901908993721, 0.03628883510828018, -0.09311892837285995, 0.04522107541561127, 0.03671228885650635, 0.017452117055654526, 0.06777337193489075, 0.04265616461634636, -0.028014833107590675, 0.05766209959983826, 0.014025934971868992, 0.08095824718475342, -0.03435735031962395, -0.023840995505452156, -0.034025996923446655, 0.06952647864818573, -0.03134578466415405, 0.06640186160802841, 0.020537052303552628, 0.04731438681483269, 0.0411047525703907, 0.11129152774810791, 0.003307943930849433, -0.0009952452965080738, -0.025693247094750404, 0.013852794654667377, 0.03142833709716797, 0.028471870347857475, -0.016061220318078995, 0.011685263365507126, 0.06067822873592377, -0.009360728785395622, 0.06531774997711182, -0.004170038737356663, -0.018585940822958946, -0.06279145181179047, -0.02045697718858719, -0.021681226789951324, -0.10937315225601196, 0.03391323611140251, -0.009020078927278519, 0.027796532958745956, 0.07762692868709564, -0.018359018489718437, -0.0721220001578331, 0.03546477481722832, -0.007794595323503017, 0.006872220430523157, -0.05364106968045235, 0.038639578968286514, 0.012017407454550266, 0.06755971163511276, 0.01298615150153637, 0.04479902237653732, -0.05037471279501915, 0.010312516242265701, -0.05168304592370987, -0.05467899888753891, 0.005582774057984352, 0.05298185721039772, 0.08798188716173172, 0.019639842212200165, 0.03163228929042816, -0.040974024683237076, 0.051657553762197495, -0.05673003941774368, 0.09363625943660736, 0.05172359198331833, -0.03183339536190033, 0.04262363165616989, 0.09515129774808884, -0.001631165505386889, -0.10657478123903275, 0.0017499211244285107, -0.01117877196520567, 0.021906133741140366, -0.016298417001962662, -0.09884496033191681, 6.493599771255247e-33, -0.048028357326984406, -0.06587089598178864, -0.027542361989617348, -0.05296281352639198, -0.00018007063772529364, -0.038871437311172485, -0.0367879718542099, 0.011989434249699116, -0.044989217072725296, -0.09239132702350616, -0.07464678585529327, 0.09276315569877625, -0.011657626368105412, 0.03143083304166794, 0.02331116981804371, -0.17167295515537262, 0.013309936039149761, 0.08532831072807312, 0.07674725353717804, -0.04094378650188446, 0.010253704153001308, -0.02470613457262516, -0.038418449461460114, 0.024711715057492256, 0.008620149455964565, -0.0665525496006012, 0.06383679807186127, -0.10643748193979263, -0.05538700148463249, 0.03958496078848839, -0.07082375884056091, 0.012150443159043789, 0.044656332582235336, 0.0498083233833313, -0.07845519483089447, 0.03371366858482361, -0.040419597178697586, -0.008223790675401688, -0.08087393641471863, -0.055779580026865005, 0.00988946296274662, 0.051403604447841644, 0.04245803505182266, -0.0835132822394371, 0.05035797134041786, -0.03496456518769264, 0.08650179952383041, -0.0698244571685791, -0.027739645913243294, -0.005678694229573011, 0.03212347626686096, -0.018191229552030563, 0.03748496621847153, -0.009565312415361404, 0.024621507152915, -0.02739429660141468, 0.03504694625735283, -0.0526108480989933, 0.015751374885439873, 0.031862419098615646, -0.03178488463163376, -0.08803490549325943, -0.03167962655425072, 0.03986072540283203, 0.07594820857048035, 0.053843192756175995, 0.013672301545739174, 0.08383733779191971, 0.028797853738069534, 0.07030505686998367, -0.03707069158554077, 0.04581936448812485, 0.019104762002825737, 0.00537535734474659, -0.03843613713979721, -0.03951667994260788, 0.030522530898451805, -0.009149051271378994, -0.1200641542673111, 0.042958471924066544, -0.024103688076138496, 0.08111706376075745, -0.03482184559106827, 0.05414051562547684, 0.031858883798122406, -0.053710922598838806, 0.07625303417444229, 0.03894606977701187, -0.07478678226470947, 0.0459502711892128, 0.019195307046175003, -0.01116430014371872, -0.04515954107046127, -0.009479685686528683, -0.07297724485397339, -6.1581493157030753e-33, 0.0917462632060051, 0.0186375230550766, -0.014423541724681854, 0.03393028676509857, -0.0020211306400597095, 0.014996130019426346, -0.04534322768449783, -0.0005192722892388701, -0.016091853380203247, -0.05950143188238144, -0.10601906478404999, 0.00048538678674958646, -0.0032618262339383364, 0.007016564253717661, -0.14303922653198242, 0.014142492786049843, -0.059897951781749725, -0.05602998286485672, 0.032026685774326324, 0.03322794660925865, -0.01769820600748062, -0.02994556352496147, 0.07887481898069382, -0.007495383266359568, 0.04658890143036842, -0.04584553837776184, -0.06117432191967964, 0.04395083710551262, -0.0013291393406689167, -0.0026945150457322598, 0.020530181005597115, -0.06952441483736038, 0.008166859857738018, -0.015801239758729935, 0.04076617583632469, 0.0034634408075362444, -0.04737021401524544, 0.08050017058849335, 0.058822162449359894, -0.03900456801056862, 0.031237343326210976, -0.0012442738516256213, -0.10078219324350357, -0.06056730076670647, 0.025527141988277435, 0.008648666553199291, -0.04755587875843048, -0.003967159893363714, -0.07617558538913727, -0.05302806943655014, 0.006220512092113495, -0.052923183888196945, -0.0931461751461029, 0.10217892378568649, -0.050864577293395996, 0.005908214021474123, 0.024651385843753815, 0.11328048259019852, -0.04563962295651436, -0.039899155497550964, 0.020576724782586098, -0.056937843561172485, -0.017886625602841377, -0.014881682582199574, -0.003964324947446585, -0.05685917288064957, 0.05077222362160683, -0.008047531358897686, -0.06902600824832916, 0.03542758896946907, -0.010365991853177547, 0.08069805800914764, -0.008436672389507294, 0.0605827271938324, -0.05560921132564545, 0.0087936045601964, 0.03924882039427757, -0.05612719804048538, 0.0657413974404335, 0.0080414405092597, -0.11572122573852539, 0.09960585087537766, -0.06412709504365921, 0.040528345853090286, -0.060126274824142456, 0.052909281104803085, 0.05708739534020424, 0.10369305312633514, 0.023383792489767075, 0.15174785256385803, -0.00011506282316986471, -0.015328110195696354, -0.012370261363685131, 0.08097387850284576, -0.03713078796863556, -5.556975679610332e-8, 0.05108504742383957, 0.006135119125247002, 0.02162729762494564, 0.06288828700780869, 0.019864708185195923, -0.09356388449668884, 0.03363878279924393, 0.10154607892036438, 0.0028330269269645214, 0.04419156536459923, 0.0546102374792099, -0.04010084643959999, -0.060014739632606506, -0.012888173572719097, 0.00866312999278307, 0.014047413133084774, 0.02163136936724186, 0.05350598692893982, -0.044998399913311005, -0.08233442157506943, -0.0587148554623127, -0.013222328387200832, 0.003958253655582666, 0.04587062820792198, -0.00762207293882966, 0.017038699239492416, 0.055946674197912216, 0.07068473845720291, -0.014559940434992313, -0.09128928929567337, -0.046339355409145355, 0.03417098522186279, -0.026264311745762825, 0.04567316174507141, -0.06155122444033623, 0.048373810946941376, -0.1107383742928505, 0.04060482606291771, -0.02349012903869152, 0.05484338849782944, 0.01382449734956026, -0.006642090156674385, -0.018263479694724083, -0.010792066343128681, -0.0064726038835942745, 0.010934422723948956, -0.06813806295394897, 0.07670871913433075, 0.020453274250030518, -0.005277856253087521, 0.007498472463339567, -0.012552928179502487, -0.032205455005168915, 0.06769315898418427, -0.0007408438250422478, -0.04296127334237099, -0.009747995994985104, -0.014974157325923443, 0.03641466051340103, 0.034294161945581436, 0.02382437139749527, -0.040610261261463165, -0.06601601094007492, -0.0524289645254612 ]
0.185159
Node groups generally map to some sort of cloud provider resource group (most commonly a Virtual Machine group). A single instance of Cluster Autoscaler can simultaneously manage multiple Node groups. When provisioning, Cluster Autoscaler will add Nodes to the group that best fits the requests of pending Pods. When consolidating, Cluster Autoscaler always selects specific Nodes to remove, as opposed to just resizing the underlying cloud provider resource group. Additional context: \* [Documentation overview](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/README.md) \* [Cloud provider integrations](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/README.md#faqdocumentation) \* [Cluster Autoscaler FAQ](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md) \* [Contact](https://github.com/kubernetes/community/tree/master/sig-autoscaling#contact) #### Karpenter Karpenter auto-provisions Nodes based on [NodePool](https://karpenter.sh/docs/concepts/nodepools/) configurations provided by the cluster operator. Karpenter handles all aspects of node lifecycle, not just autoscaling. This includes automatically refreshing Nodes once they reach a certain lifetime, and auto-upgrading Nodes when new worker Node images are released. It works directly with individual cloud provider resources (most commonly individual Virtual Machines), and doesn't rely on cloud provider resource groups. Additional context: \* [Documentation](https://karpenter.sh/) \* [Cloud provider integrations](https://github.com/kubernetes-sigs/karpenter?tab=readme-ov-file#karpenter-implementations) \* [Karpenter FAQ](https://karpenter.sh/docs/faq/) \* [Contact](https://github.com/kubernetes-sigs/karpenter#community-discussion-contribution-and-support) #### Implementation comparison Main differences between Cluster Autoscaler and Karpenter: \* Cluster Autoscaler provides features related to just Node autoscaling. Karpenter has a wider scope, and also provides features intended for managing Node lifecycle altogether (for example, utilizing disruption to auto-recreate Nodes once they reach a certain lifetime, or auto-upgrade them to new versions). \* Cluster Autoscaler doesn't support auto-provisioning, the Node groups it can provision from have to be pre-configured. Karpenter supports auto-provisioning, so the user only has to configure a set of constraints for the provisioned Nodes, instead of fully configuring homogenous groups. \* Cluster Autoscaler provides cloud provider integrations directly, which means that they're a part of the Kubernetes project. For Karpenter, the Kubernetes project publishes Karpenter as a library that cloud providers can integrate with to build a Node autoscaler. \* Cluster Autoscaler provides integrations with numerous cloud providers, including smaller and less popular providers. There are fewer cloud providers that integrate with Karpenter, including [AWS](https://github.com/aws/karpenter-provider-aws), and [Azure](https://github.com/Azure/karpenter-provider-azure). ## Combine workload and Node autoscaling ### Horizontal workload autoscaling {#horizontal-workload-autoscaling} Node autoscaling usually works in response to Podsβ€”it provisions new Nodes to accommodate unschedulable Pods, and then consolidates the Nodes once they're no longer needed. [Horizontal workload autoscaling](/docs/concepts/workloads/autoscaling#scaling-workloads-horizontally) automatically scales the number of workload replicas to maintain a desired average resource utilization across the replicas. In other words, it automatically creates new Pods in response to application load, and then removes the Pods once the load decreases. You can use Node autoscaling together with horizontal workload autoscaling to autoscale the Nodes in your cluster based on the average real resource utilization of your Pods. If the application load increases, the average utilization of its Pods should also increase, prompting workload autoscaling to create new Pods. Node autoscaling should then provision new Nodes to accommodate the new Pods. Once the application load decreases, workload autoscaling should remove unnecessary Pods. Node autoscaling should, in turn, consolidate the Nodes that are no longer needed. If configured correctly, this pattern ensures that your application always has the Node capacity to handle load spikes if needed, but you don't have to pay for the capacity when it's not needed. ### Vertical workload autoscaling {#vertical-workload-autoscaling} When using Node autoscaling, it's important to set Pod resource requests correctly. If the requests of a given Pod are too low, provisioning a new Node for it might not help the Pod actually run. If the requests of a given Pod are too high, it might incorrectly prevent consolidating its Node. [Vertical workload autoscaling](/docs/concepts/workloads/autoscaling#scaling-workloads-vertically) automatically adjusts the resource requests of your Pods based on their historical resource usage. You can use Node autoscaling together
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-autoscaling.md
[ -0.003697272390127182, -0.01786939799785614, 0.023130498826503754, 0.07122375071048737, 0.04105496406555176, -0.0233956016600132, 0.03542397916316986, -0.01697872206568718, 0.008246629498898983, 0.041971005499362946, -0.0016551167936995625, -0.03199441358447075, -0.022125178948044777, -0.031154533848166466, -0.03245777636766434, -0.04241156950592995, -0.04040173441171646, -0.027833998203277588, -0.041410695761442184, -0.06343896687030792, -0.01094456110149622, -0.05383070558309555, -0.036129292100667953, 0.0347452349960804, 0.007370540872216225, -0.024615414440631866, -0.10108153522014618, -0.00310885370709002, 0.07909008115530014, -0.01142357848584652, -0.03274970129132271, 0.032713115215301514, 0.08048070967197418, 0.08578062057495117, 0.02120305970311165, 0.06704819202423096, -0.01759536750614643, -0.038795795291662216, -0.06375493854284286, -0.03038797713816166, 0.0847252607345581, -0.0397493876516819, -0.06355512887239456, -0.03531365469098091, 0.04691290110349655, 0.04431868717074394, -0.10190381854772568, 0.006822465918958187, -0.05257890373468399, -0.018022580072283745, 0.0364636667072773, -0.07245016098022461, 0.00898917019367218, 0.055887892842292786, -0.004777874797582626, 0.0726483017206192, 0.013406037352979183, 0.018424201756715775, 0.06732460111379623, 0.008839075453579426, 0.029962675645947456, -0.04836256429553032, -0.015019227750599384, -0.030624600127339363, 0.037233851850032806, 0.050171226263046265, 0.06259720772504807, -0.021373728290200233, 0.053423501551151276, -0.009196346625685692, 0.14242346584796906, -0.051285579800605774, -0.015050399117171764, 0.01976160518825054, 0.058857813477516174, -0.0006533678970299661, -0.09898273646831512, 0.02926742099225521, -0.027917273342609406, 0.0146824074909091, -0.014179200865328312, 0.07414618879556656, 0.049609698355197906, 0.02918318472802639, -0.11790794879198074, -0.008018335327506065, -0.040563978254795074, -0.07163424044847488, 0.060419484972953796, 0.019981691613793373, -0.01808527112007141, -0.00109544035512954, -0.04198335111141205, -0.043627358973026276, 0.0104110362008214, -0.022604716941714287, 0.016258616000413895, -0.05457578971982002, 0.08688319474458694, -0.031729865819215775, 0.06884363293647766, -0.009969322942197323, 0.010358630679547787, 0.00723477266728878, 0.03364240378141403, -0.05703197047114372, -0.08412731438875198, 0.02710309810936451, 0.04199196770787239, 0.04115070402622223, -0.015129919163882732, 0.12442649155855179, 0.004381326027214527, 0.008961060084402561, -0.05753720551729202, 0.0374293327331543, 0.07505013048648834, -0.01813330128788948, 0.09767287969589233, 0.03522464632987976, -0.03401309251785278, -0.07612231373786926, 0.02854434959590435, -0.04408041387796402, 0.08709167689085007, 0.002820343943312764, -0.11305546015501022, 4.615366612178579e-33, -0.06010492891073227, -0.07190696895122528, 0.009770938195288181, -0.036855585873126984, 0.033050041645765305, -0.03925913944840431, -0.06971144676208496, 0.00028926378581672907, -0.04045722261071205, -0.10313102602958679, -0.08385096490383148, 0.08686073869466782, 0.01374091301113367, 0.05480297654867172, -0.015356361865997314, -0.09888247400522232, -0.027426978573203087, 0.05273904278874397, 0.08890578150749207, -0.04519154876470566, 0.02313222922384739, 0.025275278836488724, -0.06103266403079033, 0.06627080589532852, -0.013513914309442043, -0.019205961376428604, 0.0500960648059845, -0.009639016352593899, -0.050169527530670166, 0.021190790459513664, -0.050721634179353714, -0.0021804613061249256, 0.029905062168836594, 0.04612817242741585, -0.09007967263460159, 0.04351918026804924, -0.025893865153193474, 0.012452609837055206, -0.09973513334989548, -0.018111467361450195, 0.050926338881254196, 0.040565308183431625, 0.0031655016355216503, -0.07505534589290619, 0.04856351763010025, -0.053060270845890045, 0.017974987626075745, -0.0791349709033966, 0.01124807819724083, -0.03745086118578911, 0.029478102922439575, -0.06601867824792862, 0.04509017616510391, -0.0475580058991909, 0.03924095630645752, 0.04521428421139717, 0.03319869562983513, -0.05514468997716904, 0.013217977248132229, -0.00596593227237463, -0.008437023498117924, -0.07891672849655151, -0.049056898802518845, 0.03323601931333542, 0.08217856287956238, 0.014067539013922215, 0.046265870332717896, 0.03549875691533089, -0.009868605062365532, 0.060193635523319244, -0.034101419150829315, 0.03711014240980148, 0.025806378573179245, 0.009900259785354137, -0.04746398702263832, -0.03969433903694153, -0.025659041479229927, 0.03383329138159752, -0.13326527178287506, 0.05897456035017967, -0.04536304995417595, 0.0349692739546299, 0.022338304668664932, 0.082380510866642, -0.02214518003165722, -0.05636003240942955, 0.07410261780023575, 0.000722315686289221, -0.01173470914363861, -0.007154892664402723, 0.026479557156562805, -0.05204067751765251, -0.029410939663648605, 0.06584344804286957, -0.07674617320299149, -5.328928049984186e-33, 0.07517819106578827, -0.017642846331000328, 0.0042365374974906445, 0.0783887580037117, 0.04764166101813316, 0.005292121786624193, -0.0496724508702755, 0.04636440798640251, 0.04537685588002205, -0.0798683613538742, -0.041079167276620865, 0.0041132112964987755, 0.04218670353293419, 0.03710126504302025, -0.09966274350881577, 0.003261800156906247, -0.04276518523693085, -0.03693626821041107, 0.01695631630718708, 0.0800987109541893, -0.028916845098137856, -0.07839898765087128, 0.08092114329338074, 0.002274453639984131, 0.03313018009066582, -0.04500914737582207, -0.03664858639240265, 0.0483064167201519, -0.04909604787826538, 0.021629543974995613, 0.01732858456671238, -0.067145437002182, 0.02739640884101391, 0.007721489295363426, 0.050096191465854645, -0.03422372415661812, -0.07563281804323196, 0.10758119821548462, 0.0068300636485219, -0.00012200949277030304, 0.05939484387636185, -0.01445112843066454, -0.05052415654063225, -0.08491534739732742, 0.00114411860704422, 0.0647243782877922, 0.05753893032670021, 0.015222580172121525, -0.1038949191570282, -0.10613137483596802, -0.05725878104567528, 0.0015037063276395202, -0.001683986047282815, 0.09005426615476608, -0.03599556162953377, 0.06603948771953583, 0.06078026443719864, 0.09564462304115295, -0.04506948962807655, 0.004788272548466921, 0.06666595488786697, -0.10502780228853226, 0.035086099058389664, -0.013620049692690372, -0.04058244079351425, -0.06467106193304062, 0.009217212907969952, -0.04598323255777359, -0.10076265037059784, 0.06824963539838791, 0.004133111797273159, 0.03152225539088249, -0.017317017540335655, 0.0546189583837986, -0.03617415204644203, -0.046833086758852005, -0.02819138951599598, -0.04929325729608536, 0.022824645042419434, -0.043772485107183456, -0.0871099978685379, 0.0517788827419281, -0.06314654648303986, 0.10853509604930878, -0.08763901144266129, 0.03807942941784859, 0.030648965388536453, 0.10310479253530502, 0.04438550025224686, 0.12468801438808441, 0.03185240551829338, -0.01270673144608736, -0.04725253954529762, 0.06387592852115631, -0.10310732573270798, -4.820462962129568e-8, 0.049343280494213104, 0.06649670749902725, -0.06216799467802048, 0.017999237403273582, 0.05233146622776985, -0.037364233285188675, -0.006146507803350687, 0.09566470235586166, -0.014929522760212421, 0.0530109703540802, -0.0009265695116482675, -0.02433289773762226, -0.060711950063705444, -0.039226219058036804, 0.035459183156490326, -0.004978612530976534, 0.021234283223748207, 0.018863828852772713, -0.006246213801205158, -0.05251006782054901, -0.06177518889307976, -0.006075374316424131, 0.010356895625591278, -0.022867077961564064, 0.02383788675069809, 0.07793927937746048, 0.07352171838283539, 0.045920372009277344, -0.031685229390859604, -0.013275017030537128, -0.06595896184444427, 0.042114853858947754, -0.05932965129613876, 0.07590683549642563, -0.0421571284532547, 0.04610930010676384, -0.0935046449303627, 0.00912026409059763, 0.03311166539788246, 0.001483329338952899, 0.042113423347473145, -0.025672243908047676, -0.0645647794008255, 0.016508495435118675, 0.0002350531140109524, 0.0709117203950882, 0.0007346222409978509, 0.0269582811743021, 0.0031763040460646152, 0.0018211686983704567, 0.06328229606151581, -0.0539376325905323, -0.009254592470824718, 0.056696295738220215, -0.03694675862789154, -0.011016477830708027, -0.0052635809406638145, -0.06844397634267807, 0.08326680958271027, 0.03092769719660282, -0.0007162649417296052, 0.013172486796975136, 0.008757983334362507, -0.018482021987438202 ]
0.177465
Node for it might not help the Pod actually run. If the requests of a given Pod are too high, it might incorrectly prevent consolidating its Node. [Vertical workload autoscaling](/docs/concepts/workloads/autoscaling#scaling-workloads-vertically) automatically adjusts the resource requests of your Pods based on their historical resource usage. You can use Node autoscaling together with vertical workload autoscaling in order to adjust the resource requests of your Pods while preserving Node autoscaling capabilities in your cluster. {{< caution >}} When using Node autoscaling, it's not recommended to set up vertical workload autoscaling for DaemonSet Pods. Autoscalers have to predict what DaemonSet Pods on a new Node will look like in order to predict available Node resources. Vertical workload autoscaling might make these predictions unreliable, leading to incorrect scaling decisions. {{}} ## Related components This section describes components providing functionality related to Node autoscaling. ### Descheduler The [descheduler](https://github.com/kubernetes-sigs/descheduler) is a component providing Node consolidation functionality based on custom policies, as well as other features related to optimizing Nodes and Pods (for example deleting frequently restarting Pods). ### Workload autoscalers based on cluster size [Cluster Proportional Autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler) and [Cluster Proportional Vertical Autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-vertical-autoscaler) provide horizontal, and vertical workload autoscaling based on the number of Nodes in the cluster. You can read more in [autoscaling based on cluster size](/docs/concepts/workloads/autoscaling#autoscaling-based-on-cluster-size). ## {{% heading "whatsnext" %}} - Read about [workload-level autoscaling](/docs/concepts/workloads/autoscaling/)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-autoscaling.md
[ 0.01084120199084282, 0.045253630727529526, 0.04450245946645737, 0.046727024018764496, -0.03917819261550903, -0.029187260195612907, -0.04474545270204544, 0.0464504100382328, -0.0041420492343604565, 0.033660680055618286, -0.06760218739509583, 0.013363830745220184, -0.0356002114713192, -0.02989177405834198, -0.00266148685477674, -0.021651070564985275, 0.05279463529586792, 0.07895378768444061, -0.05568874254822731, -0.050600770860910416, -0.023692911490797997, -0.06404037028551102, 0.005687389522790909, 0.03192921727895737, 0.001475880271755159, -0.004082395229488611, -0.06787965446710587, -0.033148910850286484, 0.044212646782398224, -0.0219927616417408, -0.04969271272420883, 0.012889781035482883, 0.04266853630542755, 0.06952007114887238, -0.0024285183753818274, 0.0582013837993145, -0.007187671959400177, -0.10653077065944672, -0.10744945704936981, 0.006158117670565844, 0.05654417723417282, -0.014591652899980545, -0.07572738081216812, 0.0026145714800804853, -0.027790836989879608, 0.018991636112332344, -0.06073146313428879, 0.007975823245942593, -0.034655869007110596, -0.02364123798906803, 0.04985964670777321, -0.09121179580688477, 0.08842350542545319, 0.024417223408818245, 0.05495487526059151, 0.06963955610990524, 0.08239109069108963, 0.0027259867638349533, 0.10544703155755997, 0.021422334015369415, 0.004676424898207188, -0.009420499205589294, 0.0103944456204772, -0.0735710933804512, 0.036655113101005554, -0.001100036664865911, 0.05091651901602745, -0.021661557257175446, 0.035212885588407516, 0.03954678028821945, 0.13721966743469238, -0.03893590345978737, -0.012870780192315578, 0.008280119858682156, -0.0022839359007775784, 0.0027942932210862637, -0.0696260929107666, -0.0037720634136348963, -0.026553217321634293, -0.014309976249933243, 0.008687646128237247, 0.04281886667013168, 0.0022357807029038668, 0.008826483972370625, -0.06453332304954529, 0.016121650114655495, -0.022553449496626854, -0.07370714098215103, 0.01423785649240017, 0.018777379766106606, 0.05396297574043274, 0.023128312081098557, -0.05112287029623985, -0.039758022874593735, 0.008553982712328434, -0.05784527212381363, -0.03412538766860962, -0.05371609702706337, 0.03322548791766167, -0.035913147032260895, 0.09562572091817856, 0.007809290662407875, 0.037906672805547714, 0.03344692289829254, 0.05996046960353851, -0.04988894239068031, -0.0409933365881443, 0.006850545760244131, 0.038633424788713455, 0.0897226333618164, 0.014700159430503845, 0.09198468178510666, 0.006930676754564047, 0.039110779762268066, -0.0009415561216883361, 0.04816650599241257, 0.025261465460062027, -0.029160363599658012, -0.021939603611826897, 0.06197914481163025, 0.002795391483232379, -0.08226125687360764, -0.037312448024749756, 0.0025115604512393475, 0.05730617791414261, 0.017093375325202942, -0.05725740268826485, 8.008624645053013e-33, -0.007034503389149904, -0.09212379902601242, 0.017401164397597313, -0.040509678423404694, 0.011438301764428616, -0.04464738070964813, -0.06055464223027229, 0.010801375843584538, -0.06247411295771599, -0.0823298841714859, -0.08671510219573975, 0.11400831490755081, -0.008547022938728333, 0.030557740479707718, 0.001690044766291976, -0.1126306802034378, -0.006199497263878584, 0.01611287146806717, 0.0823635458946228, -0.0371721014380455, 0.031071025878190994, -0.09332505613565445, -0.049061745405197144, 0.024479268118739128, -0.02479204721748829, -0.05995843559503555, 0.03428914397954941, -0.07298159599304199, -0.08041229844093323, 0.032000645995140076, -0.08020976185798645, -0.04849101975560188, 0.04739439859986305, 0.03740642964839935, -0.09827616810798645, -0.010549582540988922, -0.027821630239486694, 0.014632901176810265, -0.1106182113289833, -0.03466898947954178, 0.01729668490588665, 0.03956383466720581, 0.03563692048192024, -0.055366151034832, 0.02243565395474434, 0.0038908408023416996, 0.10799220204353333, -0.06945738196372986, -0.07265669852495193, -0.0036288609262555838, 0.07804803550243378, -0.014221245422959328, 0.05196887254714966, -0.05841091647744179, 0.06548206508159637, 0.017880041152238846, 0.10017453134059906, -0.0351257286965847, 0.027811933308839798, 0.01782539300620556, -0.0006468187784776092, -0.11266281455755234, -0.040361110121011734, 0.04328532516956329, 0.09587430953979492, 0.056560490280389786, 0.010651005432009697, 0.06846070289611816, -0.022586822509765625, 0.08750094473361969, 0.019549207761883736, 0.04254956170916557, 0.030368860810995102, 0.02693716250360012, -0.0422821119427681, -0.008740774355828762, 0.007414193823933601, 0.030048910528421402, -0.1181955337524414, 0.030219372361898422, 0.007716654799878597, 0.030951090157032013, 0.03826278820633888, 0.018493488430976868, 0.02034456469118595, -0.05841957777738571, 0.048087041825056076, 0.020970625802874565, -0.03875084966421127, 0.0733393132686615, 0.042130474001169205, -0.044887617230415344, -0.0012960569001734257, 0.01930992677807808, -0.09545844048261642, -6.676659506508802e-33, 0.06023727357387543, 0.005099198780953884, -0.0206448994576931, 0.04414108395576477, 0.016652174293994904, 0.012578433379530907, -0.06515194475650787, 0.026399759575724602, -0.023869672790169716, -0.047543324530124664, -0.031941670924425125, -0.053473442792892456, -0.00570000009611249, -0.007166152819991112, -0.07071597129106522, -0.013891760259866714, -0.07783564925193787, -0.04275379329919815, 0.018621832132339478, 0.027157442644238472, 0.0018833348294720054, -0.0403764583170414, 0.0529983751475811, 0.04383651912212372, 0.07393938302993774, -0.0806802362203598, -0.023168331012129784, 0.04161761701107025, -0.03367391228675842, -0.05503915622830391, 0.011287354864180088, -0.09295662492513657, 0.04654886946082115, -0.019407715648412704, 0.06186205893754959, -0.041766922920942307, -0.03959273174405098, 0.08962734043598175, 0.04763193801045418, -0.04804060608148575, 0.0195259228348732, 0.025317322462797165, -0.07980667054653168, -0.08757105469703674, -0.009203803725540638, -0.0014886712888255715, -0.059993281960487366, 0.03879864513874054, -0.0282769575715065, -0.047765590250492096, -0.015844108536839485, -0.0020777506288141012, -0.002968414220958948, 0.1288553774356842, -0.020255856215953827, 0.008146514184772968, 0.02328573912382126, 0.08115339279174805, -0.0017904009437188506, 0.01771557703614235, 0.04334433004260063, -0.10783003270626068, -0.004303856752812862, -0.036501917988061905, -0.016427671536803246, -0.04225087910890579, -0.0006736637442372739, -0.0013480156194418669, -0.03951459378004074, 0.060690298676490784, 0.012204459868371487, 0.02782188169658184, 0.049366120249032974, 0.07743895053863525, -0.09466865658760071, -0.08406797796487808, 0.03394032269716263, -0.058420587331056595, 0.07908691465854645, 0.0009533152915537357, -0.12078322470188141, 0.11111123114824295, -0.047009341418743134, 0.10589681565761566, -0.06702461838722229, 0.0838436707854271, 0.04884769767522812, 0.10902229696512222, 0.04582998529076576, 0.11998938769102097, 0.011436188593506813, -0.030053848400712013, -0.08243630081415176, 0.07923033088445663, 0.0048971413634717464, -5.2231911240596673e-8, 0.011227537877857685, 0.05566482990980148, -0.01579282619059086, 0.10421635210514069, 0.007295356132090092, -0.06758756190538406, 0.040048666298389435, 0.07276733219623566, 0.005122428294271231, 0.0627535879611969, 0.05389203876256943, -0.043292559683322906, -0.01486940961331129, -0.008889340795576572, 0.04859061911702156, -0.03443540632724762, 0.07943154126405716, 0.04100889340043068, -0.01684575341641903, -0.04747964069247246, -0.04200933501124382, 0.020395545288920403, 0.00899956002831459, 0.021419351920485497, -0.005013282410800457, 0.023922132328152657, 0.026992345228791237, 0.05202018469572067, 0.02622789889574051, -0.07508283108472824, -0.08853208273649216, 0.03408658131957054, -0.03144556283950806, 0.008156443014740944, -0.04040953889489174, 0.048111770302057266, -0.1475399285554886, 0.052548784762620926, 0.016383767127990723, 0.01746351458132267, 0.025879720225930214, -0.04144870117306709, -0.05583294481039047, -0.014031879603862762, -0.037461791187524796, 0.022777434438467026, -0.02185201272368431, 0.08400020748376846, 0.0303559061139822, 0.04325198382139206, 0.06325113028287888, -0.046451035887002945, 0.02093520201742649, 0.06477896869182587, 0.022157564759254456, -0.01817694678902626, -0.03504099324345589, -0.049090299755334854, 0.0033639154862612486, 0.020648259669542313, 0.03473501279950142, -0.029378138482570648, -0.06783802062273026, -0.015033985488116741 ]
0.134616
Application logs can help you understand what is happening inside your application. The logs are particularly useful for debugging problems and monitoring cluster activity. Most modern applications have some kind of logging mechanism. Likewise, container engines are designed to support logging. The easiest and most adopted logging method for containerized applications is writing to standard output and standard error streams. However, the native functionality provided by a container engine or runtime is usually not enough for a complete logging solution. For example, you may want to access your application's logs if a container crashes, a pod gets evicted, or a node dies. In a cluster, logs should have a separate storage and lifecycle independent of nodes, pods, or containers. This concept is called [cluster-level logging](#cluster-level-logging-architectures). Cluster-level logging architectures require a separate backend to store, analyze, and query logs. Kubernetes does not provide a native storage solution for log data. Instead, there are many logging solutions that integrate with Kubernetes. The following sections describe how to handle and store logs on nodes. ## Pod and container logs {#basic-logging-in-kubernetes} Kubernetes captures logs from each container in a running Pod. This example uses a manifest for a `Pod` with a container that writes text to the standard output stream, once per second. {{% code\_sample file="debug/counter-pod.yaml" %}} To run this pod, use the following command: ```shell kubectl apply -f https://k8s.io/examples/debug/counter-pod.yaml ``` The output is: ```console pod/counter created ``` To fetch the logs, use the `kubectl logs` command, as follows: ```shell kubectl logs counter ``` The output is similar to: ```console 0: Fri Apr 1 11:42:23 UTC 2022 1: Fri Apr 1 11:42:24 UTC 2022 2: Fri Apr 1 11:42:25 UTC 2022 ``` You can use `kubectl logs --previous` to retrieve logs from a previous instantiation of a container. If your pod has multiple containers, specify which container's logs you want to access by appending a container name to the command, with a `-c` flag, like so: ```shell kubectl logs counter -c count ``` ### Container log streams {{< feature-state feature\_gate\_name="PodLogsQuerySplitStreams" >}} As an alpha feature, the kubelet can split out the logs from the two standard streams produced by a container: [standard output](https://en.wikipedia.org/wiki/Standard\_streams#Standard\_output\_(stdout)) and [standard error](https://en.wikipedia.org/wiki/Standard\_streams#Standard\_error\_(stderr)). To use this behavior, you must enable the `PodLogsQuerySplitStreams` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/). With that feature gate enabled, Kubernetes {{< skew currentVersion >}} allows access to these log streams directly via the Pod API. You can fetch a specific stream by specifying the stream name (either `Stdout` or `Stderr`), using the `stream` query string. You must have access to read the `log` subresource of that Pod. To demonstrate this feature, you can create a Pod that periodically writes text to both the standard output and error stream. {{% code\_sample file="debug/counter-pod-err.yaml" %}} To run this pod, use the following command: ```shell kubectl apply -f https://k8s.io/examples/debug/counter-pod-err.yaml ``` To fetch only the stderr log stream, you can run: ```shell kubectl get --raw "/api/v1/namespaces/default/pods/counter-err/log?stream=Stderr" ``` See the [`kubectl logs` documentation](/docs/reference/generated/kubectl/kubectl-commands#logs) for more details. ### How nodes handle container logs ![Node level logging](/images/docs/user-guide/logging/logging-node-level.png) A container runtime handles and redirects any output generated to a containerized application's `stdout` and `stderr` streams. Different container runtimes implement this in different ways; however, the integration with the kubelet is standardized as the \_CRI logging format\_. By default, if a container restarts, the kubelet keeps one terminated container with its logs. If a pod is evicted from the node, all corresponding containers are also evicted, along with their logs. The kubelet makes logs available to clients via a special feature of the Kubernetes API. The usual way to access this is by running `kubectl logs`. ### Log rotation {{< feature-state
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/logging.md
[ 0.07313041388988495, 0.0030048845801502466, 0.062097594141960144, 0.012566030025482178, 0.05260855332016945, -0.047234270721673965, -0.00023561896523460746, 0.029974497854709625, 0.060063283890485764, 0.07127180695533752, -0.06639368832111359, -0.039375919848680496, -0.02510121650993824, 0.00038229161873459816, -0.012013074941933155, -0.019625505432486534, 0.008136049844324589, 0.04301811009645462, -0.06951051950454712, 0.005066550802439451, 0.023742254823446274, 0.022128436714410782, -0.03951345011591911, 0.07907306402921677, -0.07303690165281296, 0.06425094604492188, -0.022021694108843803, -0.06630772352218628, 0.012348992750048637, -0.005458460655063391, -0.07027776539325714, -0.041817426681518555, -0.010381295345723629, 0.10634057223796844, 0.00569120841100812, 0.062181975692510605, 0.04557270556688309, -0.07857658714056015, -0.10764539986848831, -0.015733135864138603, 0.02078215964138508, -0.04327999800443649, -0.06717319786548615, -0.0246591679751873, 0.0008046504226513207, -0.08937159925699234, -0.08540348708629608, -0.053224969655275345, -0.029068168252706528, 0.007856478914618492, 0.03458694741129875, -0.0022852288093417883, 0.09066848456859589, 0.039933715015649796, -0.010739107616245747, 0.04469297081232071, 0.01822919212281704, 0.006180779077112675, 0.04602597653865814, -0.025164147838950157, 0.03494471311569214, 0.021681448444724083, 0.008915225975215435, -0.025694552809000015, 0.01238568127155304, -0.039864297956228256, 0.025069495663046837, 0.0671006515622139, 0.0905301570892334, -0.03245200589299202, -0.03176697716116905, 0.019386770203709602, -0.046878620982170105, -0.08649929612874985, -0.03223997354507446, 0.00026820306084118783, -0.010264487005770206, 0.051133256405591965, -0.03522346913814545, 0.01367522869259119, 0.013753741048276424, 0.06993956863880157, 0.022137627005577087, 0.04536421224474907, -0.06838253140449524, -0.019130920991301537, -0.014042208902537823, 0.01998221129179001, 0.031169859692454338, -0.0029163945000618696, -0.033199064433574677, -0.007044903934001923, 0.031387075781822205, -0.08556845039129257, 0.07350161671638489, 0.0007935420144349337, -0.019445443525910378, 0.06545466929674149, 0.09076636284589767, -0.020565276965498924, 0.08414140343666077, 0.05193944275379181, -0.0029832881409674883, -0.02966875582933426, 0.07726816087961197, -0.05379160866141319, -0.037978965789079666, -0.038763511925935745, 0.021452071145176888, 0.05766447260975838, -0.00029013887979090214, 0.0614766851067543, -0.04329041391611099, 0.0770343765616417, 0.10387077927589417, -0.007773798890411854, -0.036081112921237946, -0.07584027945995331, -0.03715486824512482, 0.0887366309762001, 0.07154974341392517, -0.048991329967975616, 0.005873217713087797, -0.003664373653009534, 0.054537367075681686, 0.060531143099069595, -0.012833814136683941, 3.619191720522324e-33, 0.03294222801923752, -0.043304044753313065, 0.04994218796491623, 0.015190785750746727, 0.028385454788804054, 0.0035229723434895277, -0.07526779919862747, -0.019650103524327278, -0.0282298531383276, -0.019709518179297447, -0.11835736781358719, 0.10927893966436386, 0.025481892749667168, -0.08224621415138245, 0.041955865919589996, 0.017975017428398132, -0.07987723499536514, 0.025555377826094627, 0.08439122140407562, 0.001712134457193315, -0.01097657810896635, -0.07972244918346405, -0.006019320338964462, 0.013609838671982288, 0.030606145039200783, 0.02115456387400627, 0.04719947278499603, -0.0880582258105278, -0.052548106759786606, 0.015607393346726894, 0.025534385815262794, -0.017271509394049644, -0.015502489171922207, -0.025066349655389786, -0.0688420906662941, -0.002019968582317233, -0.009145199321210384, 0.019057950004935265, -0.10929928719997406, -0.011449961923062801, -0.05063880234956741, -0.03705758601427078, -0.01523218210786581, -0.0746724009513855, 0.02920280583202839, -0.031872477382421494, -0.003209920832887292, -0.03215792030096054, -0.007091088220477104, -0.016245633363723755, 0.03700514882802963, -0.045740753412246704, 0.026521271094679832, -0.009444387629628181, 0.03362637385725975, 0.07920938730239868, 0.128628209233284, -0.16762091219425201, -0.053991615772247314, 0.009969104081392288, -0.012682553380727768, -0.07628381997346878, 0.0010445096995681524, -0.03339407220482826, -0.019615810364484787, 0.03898870199918747, 0.08277717232704163, 0.08715547621250153, -0.027689576148986816, 0.0021440230775624514, -0.044373393058776855, -0.053957078605890274, 0.022037802264094353, 0.026772672310471535, -0.0018693089950829744, 0.0274515338242054, -0.020127464085817337, -0.0034026377834379673, -0.14257018268108368, 0.07209007441997528, 0.03118915855884552, -0.13014811277389526, -0.04668058082461357, 0.062296051532030106, -0.026850074529647827, -0.055438123643398285, -0.017571406438946724, 0.013076488859951496, -0.027115201577544212, 0.07629551738500595, 0.0030884970910847187, 0.008016197010874748, 0.0336022675037384, -0.007313054520636797, -0.07981537282466888, -4.701422349550371e-33, 0.01922810822725296, 0.05078311637043953, -0.05381355807185173, -0.03043000027537346, 0.030363567173480988, 0.009054592810571194, -0.013032278046011925, 0.03471691161394119, -0.0037920097820460796, -0.051010649651288986, -0.10210064798593521, -0.04996062070131302, 0.04241955280303955, 0.08569943159818649, -0.11231181025505066, 0.046500399708747864, -0.020789213478565216, -0.0501813106238842, 0.03374636545777321, -0.0014374220045283437, 0.012977934442460537, -0.049498215317726135, 0.023990202695131302, -0.01454049814492464, -0.05940397083759308, -0.01517021469771862, 0.025649448856711388, -0.03000052645802498, -0.06224547326564789, -0.0996122732758522, 0.05724290385842323, -0.1036524847149849, 0.029401293024420738, -0.005989554803818464, 0.0777263194322586, -0.0771528109908104, -0.019121749326586723, -0.02736746147274971, 0.041142452508211136, -0.08986711502075195, 0.003524320898577571, 0.062199681997299194, 0.032915618270635605, -0.021002262830734253, -0.03949609398841858, 0.02948879636824131, -0.04260428249835968, -0.009461143985390663, 0.02898464910686016, -0.049640119075775146, -0.03878834471106529, -0.016852375119924545, 0.028665808960795403, 0.08149750530719757, -0.05859741196036339, 0.055481456220149994, 0.02187776193022728, 0.09916235506534576, -0.06818261742591858, 0.0507022850215435, 0.0064766379073262215, -0.07703342288732529, 0.04050851985812187, 0.048226386308670044, -0.054490868002176285, -0.08341813087463379, 0.0581449493765831, -0.014022952876985073, -0.09673083573579788, 0.011361648328602314, 0.0037213624455034733, -0.007080047857016325, -0.010235762223601341, 0.12970146536827087, -0.02068636193871498, 0.017060555517673492, -0.005700953304767609, -0.0805816799402237, 0.023571588099002838, -0.013207180425524712, -0.016204969957470894, 0.013294418342411518, -0.07214828580617905, -0.0013473069993779063, 0.05389532074332237, -0.021248871460556984, 0.07068544626235962, 0.02114272117614746, 0.06529657542705536, -0.0021254285238683224, -0.02712819166481495, 0.0668989047408104, -0.1213899552822113, 0.0391278974711895, -0.022116441279649734, -4.8081435721769594e-8, -0.02754860371351242, -0.04381890594959259, -0.018427114933729172, 0.0319364033639431, 0.028285067528486252, 0.03147432208061218, 0.07993004471063614, 0.11879323422908783, -0.03270423412322998, 0.01120353676378727, -0.09152006357908249, -0.009402853436768055, -0.11116358637809753, -0.044107191264629364, 0.09598897397518158, 0.0022201717365533113, 0.04990965127944946, -0.03899521380662918, 0.014625630341470242, -0.05647704750299454, -0.011738719418644905, -0.02816764824092388, 0.01493779756128788, 0.04766741022467613, -0.029125746339559555, -0.03424888849258423, 0.13132868707180023, 0.04966115951538086, -0.012766952626407146, -0.040478721261024475, 0.014370088465511799, 0.059152763336896896, 0.010233364067971706, 0.06156118959188461, -0.02605079859495163, 0.041793446987867355, -0.042620252817869186, 0.0199517160654068, 0.03405044600367546, 0.02014758065342903, -0.03570658713579178, -0.0024423273280262947, 0.014847906306385994, -0.05898790806531906, 0.005570222623646259, 0.0425071120262146, -0.015058647841215134, 0.05666138231754303, 0.04689127579331398, 0.06800365447998047, 0.011686827056109905, -0.023546215146780014, -0.009711884893476963, 0.07138950377702713, 0.029001837596297264, 0.036098796874284744, 0.021384043619036674, -0.08937183767557144, 0.14119397103786469, -0.030088873580098152, 0.03430981934070587, 0.030087115243077278, 0.0016570945736020803, -0.0054212273098528385 ]
0.179116
logs. If a pod is evicted from the node, all corresponding containers are also evicted, along with their logs. The kubelet makes logs available to clients via a special feature of the Kubernetes API. The usual way to access this is by running `kubectl logs`. ### Log rotation {{< feature-state for\_k8s\_version="v1.21" state="stable" >}} The kubelet is responsible for rotating container logs and managing the logging directory structure. The kubelet sends this information to the container runtime (using CRI), and the runtime writes the container logs to the given location. You can configure two kubelet [configuration settings](/docs/reference/config-api/kubelet-config.v1beta1/), `containerLogMaxSize` (default 10Mi) and `containerLogMaxFiles` (default 5), using the [kubelet configuration file](/docs/tasks/administer-cluster/kubelet-config-file/). These settings let you configure the maximum size for each log file and the maximum number of files allowed for each container respectively. In order to perform an efficient log rotation in clusters where the volume of the logs generated by the workload is large, kubelet also provides a mechanism to tune how the logs are rotated in terms of how many concurrent log rotations can be performed and the interval at which the logs are monitored and rotated as required. You can configure two kubelet [configuration settings](/docs/reference/config-api/kubelet-config.v1beta1/), `containerLogMaxWorkers` and `containerLogMonitorInterval` using the [kubelet configuration file](/docs/tasks/administer-cluster/kubelet-config-file/). When you run [`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands#logs) as in the basic logging example, the kubelet on the node handles the request and reads directly from the log file. The kubelet returns the content of the log file. {{< note >}} Only the contents of the latest log file are available through `kubectl logs`. For example, if a Pod writes 40 MiB of logs and the kubelet rotates logs after 10 MiB, running `kubectl logs` returns at most 10MiB of data. {{< /note >}} ## System component logs There are two types of system components: those that typically run in a container, and those components directly involved in running containers. For example: \* The kubelet and container runtime do not run in containers. The kubelet runs your containers (grouped together in {{< glossary\_tooltip text="pods" term\_id="pod" >}}) \* The Kubernetes scheduler, controller manager, and API server run within pods (usually {{< glossary\_tooltip text="static Pods" term\_id="static-pod" >}}). The etcd component runs in the control plane, and most commonly also as a static pod. If your cluster uses kube-proxy, you typically run this as a `DaemonSet`. ### Log locations {#log-location-node} The way that the kubelet and container runtime write logs depends on the operating system that the node uses: {{< tabs name="log\_location\_node\_tabs" >}} {{% tab name="Linux" %}} On Linux nodes that use systemd, the kubelet and container runtime write to journald by default. You use `journalctl` to read the systemd journal; for example: `journalctl -u kubelet`. If systemd is not present, the kubelet and container runtime write to `.log` files in the `/var/log` directory. If you want to have logs written elsewhere, you can indirectly run the kubelet via a helper tool, `kube-log-runner`, and use that tool to redirect kubelet logs to a directory that you choose. By default, kubelet directs your container runtime to write logs into directories within `/var/log/pods`. For more information on `kube-log-runner`, read [System Logs](/docs/concepts/cluster-administration/system-logs/#klog). {{% /tab %}} {{% tab name="Windows" %}} By default, the kubelet writes logs to files within the directory `C:\var\logs` (notice that this is not `C:\var\log`). Although `C:\var\log` is the Kubernetes default location for these logs, several cluster deployment tools set up Windows nodes to log to `C:\var\log\kubelet` instead. If you want to have logs written elsewhere, you can indirectly run the kubelet via a helper tool, `kube-log-runner`, and use that tool to redirect kubelet logs to a directory that you choose. However, by
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/logging.md
[ 0.10599253326654434, 0.047901589423418045, 0.07745518535375595, 0.022281380370259285, -0.012802890501916409, -0.05061422288417816, -0.03922467678785324, -0.020438143983483315, 0.09933969378471375, 0.028316274285316467, -0.020651768893003464, -0.03295983374118805, -0.01153744850307703, -0.03813280165195465, -0.01332074124366045, -0.03806442394852638, -0.005495615769177675, 0.07757851481437683, -0.05888277664780617, -0.011948013678193092, 0.028109747916460037, 0.007771573029458523, 0.011419115588068962, 0.05496174842119217, -0.004286476876586676, -0.01756838709115982, -0.013904638588428497, -0.04947977885603905, 0.023727959021925926, -0.029284004122018814, -0.03736881539225578, 0.00491517735645175, -0.006694116163998842, 0.07322999835014343, 0.07086771726608276, 0.03305402770638466, 0.03636716678738594, -0.06987123191356659, -0.043641529977321625, -0.012319986708462238, 0.0784582793712616, 0.017386797815561295, -0.039895523339509964, -0.0438421256840229, -0.05547431483864784, 0.0035781487822532654, -0.07357145100831985, -0.013498575426638126, -0.02362924814224243, -0.0009659928036853671, 0.016459746286273003, -0.034178726375103, 0.09435534477233887, 0.10431832820177078, 0.02783053368330002, 0.052466150373220444, 0.030832761898636818, 0.008177204988896847, 0.10128017514944077, -0.016483789309859276, 0.06111806631088257, 0.03972934931516647, 0.015264262445271015, -0.011131612583994865, -0.02090671844780445, -0.034524619579315186, 0.015208794735372066, 0.018301086500287056, 0.04214448854327202, 0.02861860953271389, 0.05557418614625931, -0.013397037982940674, -0.05941690132021904, -0.06080121546983719, 0.04448907449841499, -0.019348254427313805, -0.04485485330224037, 0.0472213439643383, -0.05910636857151985, -0.03569260612130165, 0.024352576583623886, 0.03987371176481247, 0.10585493594408035, -0.007954169996082783, -0.10545870661735535, -0.07309096306562424, -0.029671479016542435, 0.0430881604552269, 0.06226295605301857, -0.023663341999053955, 0.000514081446453929, -0.03466801345348358, -0.007908406667411327, -0.12321504205465317, 0.05767824500799179, -0.0330837108194828, -0.04824209585785866, 0.051818378269672394, 0.06190916523337364, -0.0293872207403183, 0.04474594071507454, 0.05773056671023369, -0.04791382700204849, 0.007512492593377829, 0.09271072596311569, -0.04230036586523056, -0.04417453333735466, -0.07085184752941132, -0.004842205438762903, 0.0647943988442421, 0.007532303687185049, 0.052865445613861084, -0.01734933629631996, 0.06766198575496674, 0.06215479597449303, 0.026657139882445335, -0.02607547491788864, 0.006221968214958906, 0.007272189017385244, 0.06594238430261612, 0.10615953803062439, -0.0751984491944313, 0.009932111948728561, 0.013323298655450344, -0.003537125652655959, 0.0589093379676342, 0.005560426972806454, 2.5728463626309887e-33, 0.05791341885924339, -0.03710808604955673, 0.07373566925525665, -0.005665843840688467, 0.015767084434628487, -0.04043186083436012, -0.0747719407081604, -0.012174212373793125, 0.006534784100949764, -0.0321781188249588, -0.12182410806417465, 0.07153363525867462, 0.0023186858743429184, -0.060148611664772034, 0.02696836180984974, -0.00789418164640665, -0.09011104702949524, 0.050892699509859085, 0.05005589872598648, -0.008528617210686207, 0.02418549917638302, -0.05109516531229019, -0.03855850175023079, 0.04413416609168053, 0.0375823937356472, -0.06891624629497528, 0.054732516407966614, -0.0678449347615242, -0.10928785055875778, 0.017027640715241432, -0.03339870274066925, 0.010039471089839935, -0.0034598209895193577, 0.027182472869753838, -0.10746528208255768, 0.030460713431239128, -0.07191658765077591, 0.03727826103568077, -0.10486908257007599, 0.021771585568785667, 0.004190194886177778, -0.03380846232175827, -0.03987038508057594, -0.10320860147476196, 0.03366367891430855, -0.05915312096476555, 0.01889948919415474, -0.05799365043640137, 0.040739476680755615, 0.05284187197685242, 0.024445554241538048, -0.0055119809694588184, -0.019367307424545288, 0.010908548720180988, 0.05399026721715927, 0.07427593320608139, 0.16402941942214966, -0.14911878108978271, -0.008756816387176514, 0.03137309476733208, -0.024521982297301292, -0.017971940338611603, 0.04534263536334038, -0.006710260175168514, 0.014752949588000774, 0.026080600917339325, -0.008784016594290733, 0.04315657168626785, -0.02866176888346672, 0.010388541966676712, -0.021397925913333893, 0.020498136058449745, -0.024194961413741112, 0.0129378791898489, -0.04937950521707535, -0.0443507544696331, -0.05697397142648697, -0.0175839401781559, -0.17203491926193237, 0.06956148892641068, 0.04289387911558151, -0.11488604545593262, -0.005776288919150829, 0.039010319858789444, 0.018262648954987526, -0.09067603200674057, -0.004246389493346214, 0.020327340811491013, -0.08245201408863068, 0.03483721613883972, 0.00464753108099103, -0.014080495573580265, -0.02315959706902504, -0.00342964637093246, -0.07624723762273788, -3.764002706310045e-33, 0.06531503051519394, -0.0012093102559447289, 0.03176023066043854, -0.025953002274036407, -0.017403023317456245, 0.01739444024860859, -0.03477130085229874, 0.09254955500364304, -0.004470734391361475, -0.04219464212656021, -0.13054421544075012, -0.0385810025036335, 0.018608110025525093, 0.09088322520256042, -0.05853625014424324, 0.08326835185289383, -0.04272298514842987, -0.024258872494101524, -0.0020279863383620977, 0.017468729987740517, 0.017583325505256653, -0.058105140924453735, 0.014476423151791096, 0.050192367285490036, -0.02103060856461525, -0.01818515919148922, 0.09424398094415665, 0.026557615026831627, -0.06525267660617828, -0.09573687613010406, 0.008671148680150509, -0.15556098520755768, -0.028576849028468132, 0.059798724949359894, 0.03511122986674309, -0.0629519671201706, -0.06145099550485611, 0.07567623257637024, -0.020519286394119263, 0.016978925094008446, 0.021353023126721382, 0.0766715407371521, -0.039784274995326996, -0.025436321273446083, -0.040505893528461456, 0.03223866969347, -0.004977612290531397, 0.001971011282876134, 0.04162092134356499, -0.0989716574549675, -0.018949853256344795, 0.010249938815832138, 0.023254521191120148, 0.13514581322669983, -0.016455674543976784, 0.05482902377843857, 0.020896349102258682, 0.0929432362318039, -0.00847641471773386, -0.004876112565398216, 0.007621776778250933, -0.0686880424618721, 0.09382134675979614, 0.02841939777135849, -0.06017690524458885, -0.07563326507806778, 0.02915000356733799, -0.0002879907551687211, -0.06563908606767654, 0.04107734560966492, 0.02035912312567234, -0.00010893736180150881, -0.007315638940781355, 0.0796714797616005, -0.01946929655969143, 0.042645834386348724, 0.010389896109700203, -0.05720503628253937, 0.042878054082393646, -0.03696809336543083, -0.042813487350940704, 0.002380668418481946, -0.08333751559257507, 0.007055459078401327, 0.03705350682139397, -0.006024051923304796, 0.06980658322572708, 0.018337687477469444, 0.09207525104284286, 0.01860860362648964, 0.0018955840496346354, 0.036070313304662704, -0.09441500157117844, -0.016957323998212814, -0.004592672921717167, -4.650951623830224e-8, 0.0011626126943156123, -0.033604416996240616, -0.02621275559067726, 0.050115253776311874, 0.05216781422495842, -0.014818583615124226, 0.11201637238264084, 0.08026771247386932, -0.08504489809274673, 0.002011008094996214, -0.0405367948114872, 0.027247967198491096, -0.029029976576566696, -0.03203782066702843, 0.029170416295528412, -0.0339721217751503, 0.01656733639538288, -0.043025124818086624, 0.009684358723461628, -0.011577204801142216, -0.04740586876869202, -0.034910980612039566, 0.05902215093374252, 0.03861439973115921, -0.005720220506191254, 0.01713583432137966, 0.040490128099918365, 0.027453230693936348, 0.03969600424170494, -0.02524883672595024, -0.007314101327210665, 0.03971395641565323, -0.0744861513376236, 0.037034016102552414, -0.03929392993450165, 0.0536322221159935, -0.11626660078763962, 0.019428890198469162, 0.004048424307256937, 0.05457163229584694, -0.05254236236214638, -0.07236266136169434, -0.028778064996004105, -0.03811757639050484, 0.009351394139230251, 0.02597714029252529, 0.007523491978645325, 0.04386727884411812, 0.017653603106737137, -0.005673081614077091, -0.035936139523983, -0.058136533945798874, -0.026480460539460182, 0.11477530002593994, 0.002282720524817705, 0.033510249108076096, -0.015233727172017097, -0.06088830903172493, 0.0752943605184555, 0.0015599660109728575, -0.017918294295668602, 0.04978961497545242, -0.014105021953582764, -0.0033130296505987644 ]
0.108019
these logs, several cluster deployment tools set up Windows nodes to log to `C:\var\log\kubelet` instead. If you want to have logs written elsewhere, you can indirectly run the kubelet via a helper tool, `kube-log-runner`, and use that tool to redirect kubelet logs to a directory that you choose. However, by default, kubelet directs your container runtime to write logs within the directory `C:\var\log\pods`. For more information on `kube-log-runner`, read [System Logs](/docs/concepts/cluster-administration/system-logs/#klog). {{% /tab %}} {{< /tabs >}} For Kubernetes cluster components that run in pods, these write to files inside the `/var/log` directory, bypassing the default logging mechanism (the components do not write to the systemd journal). You can use Kubernetes' storage mechanisms to map persistent storage into the container that runs the component. Kubelet allows changing the pod logs directory from default `/var/log/pods` to a custom path. This adjustment can be made by configuring the `podLogsDir` parameter in the kubelet's configuration file. {{< caution >}} It's important to note that the default location `/var/log/pods` has been in use for an extended period and certain processes might implicitly assume this path. Therefore, altering this parameter must be approached with caution and at your own risk. Another caveat to keep in mind is that the kubelet supports the location being on the same disk as `/var`. Otherwise, if the logs are on a separate filesystem from `/var`, then the kubelet will not track that filesystem's usage, potentially leading to issues if it fills up. {{< /caution >}} For details about etcd and its logs, view the [etcd documentation](https://etcd.io/docs/). Again, you can use Kubernetes' storage mechanisms to map persistent storage into the container that runs the component. {{< note >}} If you deploy Kubernetes cluster components (such as the scheduler) to log to a volume shared from the parent node, you need to consider and ensure that those logs are rotated. \*\*Kubernetes does not manage that log rotation\*\*. Your operating system may automatically implement some log rotation - for example, if you share the directory `/var/log` into a static Pod for a component, node-level log rotation treats a file in that directory the same as a file written by any component outside Kubernetes. Some deploy tools account for that log rotation and automate it; others leave this as your responsibility. {{< /note >}} ## Cluster-level logging architectures While Kubernetes does not provide a native solution for cluster-level logging, there are several common approaches you can consider. Here are some options: \* Use a node-level logging agent that runs on every node. \* Include a dedicated sidecar container for logging in an application pod. \* Push logs directly to a backend from within an application. ### Using a node logging agent ![Using a node level logging agent](/images/docs/user-guide/logging/logging-with-node-agent.png) You can implement cluster-level logging by including a \_node-level logging agent\_ on each node. The logging agent is a dedicated tool that exposes logs or pushes logs to a backend. Commonly, the logging agent is a container that has access to a directory with log files from all of the application containers on that node. Because the logging agent must run on every node, it is recommended to run the agent as a `DaemonSet`. Node-level logging creates only one agent per node and doesn't require any changes to the applications running on the node. Containers write to stdout and stderr, but with no agreed format. A node-level agent collects these logs and forwards them for aggregation. ### Using a sidecar container with the logging agent {#sidecar-container-with-logging-agent} You can use a sidecar container in one of the following ways: \* The sidecar container streams application logs to
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/logging.md
[ 0.09136029332876205, -0.000925819156691432, 0.034332457929849625, 0.0539548322558403, -0.005439057480543852, 0.004450446926057339, -0.011030266992747784, 0.033887796103954315, 0.08878877758979797, 0.06581039726734161, -0.03428943455219269, -0.05869723856449127, -0.021747859194874763, 0.009501579217612743, -0.04591045901179314, -0.0447566919028759, -0.010570220649242401, 0.08318424224853516, -0.046081412583589554, 0.03522486612200737, 0.004001483786851168, 0.041539087891578674, 0.033055175095796585, 0.06598851084709167, -0.01183611061424017, -0.03262096643447876, -0.005891124717891216, -0.07466331124305725, -0.020153114572167397, 0.003338343696668744, -0.05888380855321884, -0.014272465370595455, -0.01201277319341898, 0.06582286953926086, 0.0791279673576355, 0.07079441845417023, 0.09158745408058167, -0.025966815650463104, -0.10377992689609528, -0.02140357531607151, 0.060419149696826935, 0.026335597038269043, -0.03903782367706299, -0.021703802049160004, -0.07744049280881882, -0.024930719286203384, -0.08109850436449051, -0.05275355279445648, -0.04094816371798515, 0.006384143605828285, 0.0053266906179487705, -0.029747484251856804, 0.07970433682203293, -0.029674701392650604, 0.024471454322338104, 0.06670287996530533, 0.014752930030226707, 0.015197653323411942, 0.09941917657852173, -0.0489552803337574, 0.07372038811445236, 0.003914023749530315, 0.028202330693602562, -0.024642646312713623, -0.02470594085752964, -0.028059443458914757, -0.01358136348426342, 0.08220642805099487, 0.044476062059402466, -0.008279619738459587, 0.0038516686763614416, 0.03252444416284561, -0.02917478233575821, -0.041434530168771744, 0.007670075632631779, 0.000054353138693841174, 0.012558884918689728, 0.09691395610570908, -0.056866761296987534, -0.07645723968744278, 0.03257304057478905, 0.061396900564432144, 0.1124303787946701, 0.032261624932289124, -0.08794647455215454, -0.017824681475758553, -0.03734481707215309, 0.0340275801718235, 0.08629793673753738, -0.04874269664287567, -0.03420853987336159, -0.06080485135316849, 0.012428533285856247, -0.10062474757432938, 0.03847559913992882, -0.025896966457366943, 0.029340026900172234, 0.10130281001329422, 0.12557744979858398, -0.04595635458827019, 0.07577449083328247, 0.07210589945316315, -0.0389823392033577, 0.033938921988010406, 0.07536357641220093, -0.06522374600172043, -0.07653513550758362, -0.025966132059693336, 0.02179311029613018, -0.008365483023226261, 0.03087504580616951, 0.06258337944746017, -0.06835068762302399, 0.05367524176836014, 0.060058776289224625, -0.033096130937337875, -0.0028217218350619078, 0.02005103789269924, -0.04283303767442703, 0.07156606763601303, 0.050476379692554474, -0.090275339782238, -0.020377200096845627, 0.017327463254332542, 0.020920151844620705, 0.02912089414894581, -0.009222236461937428, 3.933109966467812e-34, 0.09725043922662735, -0.05339619144797325, 0.05701707676053047, -0.0041389865800738335, 0.05471915379166603, -0.02614486962556839, -0.07515103369951248, -0.03904774412512779, -0.006469260435551405, -0.03584285452961922, -0.1410096436738968, 0.04874140024185181, 0.010133126750588417, -0.05681126192212105, 0.038961295038461685, 0.006770995911210775, -0.12131602317094803, 0.016059711575508118, 0.06272266060113907, -0.04316185787320137, 0.03227287903428078, -0.004024920053780079, -0.04249875620007515, -0.024204589426517487, 0.026438066735863686, -0.044117432087659836, 0.04955518618226051, -0.0670938491821289, -0.025696642696857452, 0.011444947682321072, -0.0245316531509161, 0.02820967324078083, 0.03921440616250038, 0.017727674916386604, -0.12517866492271423, 0.047748319804668427, -0.02946961298584938, 0.031832803040742874, -0.08057642728090286, 0.009986435994505882, 0.02741742692887783, -0.030963586643338203, -0.008748872205615044, -0.061461545526981354, 0.06240329518914223, -0.05118277296423912, -0.02052943781018257, -0.030522745102643967, 0.07690142095088959, -0.01719551347196102, -0.009644269943237305, -0.025458134710788727, 0.042900919914245605, 0.006556420587003231, 0.053652916103601456, 0.03440014645457268, 0.10031168162822723, -0.17045482993125916, -0.039791736751794815, 0.027657484635710716, -0.012958748266100883, 0.02746492624282837, 0.002995806746184826, 0.02908039651811123, -0.045369163155555725, 0.0023844349198043346, 0.05998934805393219, 0.04139828681945801, -0.004807466175407171, -0.015392018482089043, -0.062169600278139114, -0.023655259981751442, -0.04184655472636223, 0.012322299182415009, -0.039386339485645294, -0.013241205364465714, -0.011066578328609467, 0.0037910775281488895, -0.20326660573482513, 0.050218600779771805, 0.016154902055859566, -0.11797426640987396, -0.10079725086688995, 0.031303152441978455, 0.08750811219215393, -0.09986270219087601, -0.03395198658108711, 0.010131437331438065, -0.02147902548313141, 0.00655760895460844, 0.03510142117738724, -0.001759090693667531, -0.013970733620226383, 0.015727704390883446, -0.10226143151521683, -2.445649608677363e-33, 0.057496681809425354, 0.03597687929868698, 0.01717235893011093, -0.038413215428590775, -0.045312557369470596, 0.048086024820804596, -0.003967257682234049, 0.005649913102388382, -0.007272881921380758, -0.04686111956834793, -0.09367503225803375, -0.03100733272731304, 0.00040499045280739665, 0.08562405407428741, -0.0973183661699295, 0.06469246745109558, -0.010872202925384045, 0.019521746784448624, 0.006877297535538673, -0.037943944334983826, -0.0021263633389025927, -0.07206100225448608, 0.029765240848064423, 0.01879001036286354, -0.027646338567137718, -0.010091284289956093, 0.04978937655687332, 0.010563311167061329, -0.08766525983810425, -0.0682784914970398, 0.06264908611774445, -0.061112988740205765, -0.04103998467326164, -0.019022606313228607, 0.07234276831150055, -0.052815791219472885, -0.06954172253608704, -0.019497141242027283, 0.0035819413606077433, -0.015776148065924644, -0.017140576615929604, 0.042613327503204346, -0.01924312859773636, 0.01890752837061882, 0.0024390905164182186, 0.05532117933034897, 0.012318235822021961, -0.04860815405845642, 0.015088078565895557, -0.028748055920004845, -0.006533003877848387, -0.08052805066108704, 0.03873801231384277, 0.11248797923326492, -0.06206469237804413, 0.04941701889038086, 0.005737858824431896, 0.09081073850393295, -0.07779870927333832, 0.012292755767703056, 0.0417136624455452, -0.08075226098299026, 0.041807740926742554, -0.009974994696676731, -0.09372086822986603, -0.09823483228683472, 0.07826180756092072, 0.052674803882837296, -0.07040856778621674, -0.029170896857976913, -0.043229006230831146, 0.004954108502715826, -0.019633552059531212, 0.11805956065654755, -0.004458756186068058, 0.0003980776818934828, 0.0006083077169023454, -0.06465943157672882, 0.01126817986369133, 0.038185086101293564, 0.014364996924996376, 0.04575054347515106, -0.09288354963064194, -0.027676811441779137, 0.05836533010005951, -0.014866460114717484, 0.0644502341747284, 0.07017610222101212, 0.04550500959157944, 0.03243020549416542, -0.0015451686922460794, 0.04806405305862427, -0.012866816483438015, 0.029607128351926804, -0.016563568264245987, -4.560820343613159e-8, -0.012169460766017437, -0.010632188990712166, -0.061955776065588, 0.032937366515398026, 0.041389353573322296, 0.003245667787268758, 0.06633392721414566, 0.07077530771493912, -0.0934649258852005, -0.015056818723678589, -0.07512709498405457, 0.04825596511363983, -0.05218154937028885, -0.03906016796827316, -0.0007025093073025346, -0.031122557818889618, 0.004048860631883144, -0.046210337430238724, 0.04050978273153305, -0.03350238874554634, -0.0006036265986040235, -0.02656538411974907, 0.03837348148226738, 0.05067113786935806, -0.02979687973856926, 0.026239411905407906, 0.07998032867908478, 0.002219920977950096, -0.012426299042999744, 0.001506234286352992, 0.013102076016366482, 0.038223352283239365, -0.05347644165158272, 0.07819908857345581, -0.05390569940209389, 0.021702200174331665, -0.053342901170253754, 0.02102525718510151, 0.0488639734685421, 0.05613682419061661, -0.02440454252064228, -0.023880135267972946, -0.008597982116043568, -0.012825967743992805, -0.01878899335861206, 0.005234932526946068, -0.04466923326253891, 0.054469168186187744, -0.011403773911297321, -0.018873073160648346, -0.0455811582505703, -0.012629257515072823, 0.02271983213722706, 0.07861833274364471, -0.003482144558802247, 0.04314720630645752, -0.016551028937101364, -0.05932500585913658, 0.09616854041814804, 0.02154052071273327, -0.043795838952064514, 0.026559585705399513, 0.021277867257595062, 0.005853666458278894 ]
0.132086
to stdout and stderr, but with no agreed format. A node-level agent collects these logs and forwards them for aggregation. ### Using a sidecar container with the logging agent {#sidecar-container-with-logging-agent} You can use a sidecar container in one of the following ways: \* The sidecar container streams application logs to its own `stdout`. \* The sidecar container runs a logging agent, which is configured to pick up logs from an application container. #### Streaming sidecar container ![Sidecar container with a streaming container](/images/docs/user-guide/logging/logging-with-streaming-sidecar.png) By having your sidecar containers write to their own `stdout` and `stderr` streams, you can take advantage of the kubelet and the logging agent that already run on each node. The sidecar containers read logs from a file, a socket, or journald. Each sidecar container prints a log to its own `stdout` or `stderr` stream. This approach allows you to separate several log streams from different parts of your application, some of which can lack support for writing to `stdout` or `stderr`. The logic behind redirecting logs is minimal, so it's not a significant overhead. Additionally, because `stdout` and `stderr` are handled by the kubelet, you can use built-in tools like `kubectl logs`. For example, a pod runs a single container, and the container writes to two different log files using two different formats. Here's a manifest for the Pod: {{% code\_sample file="admin/logging/two-files-counter-pod.yaml" %}} It is not recommended to write log entries with different formats to the same log stream, even if you managed to redirect both components to the `stdout` stream of the container. Instead, you can create two sidecar containers. Each sidecar container could tail a particular log file from a shared volume and then redirect the logs to its own `stdout` stream. Here's a manifest for a pod that has two sidecar containers: {{% code\_sample file="admin/logging/two-files-counter-pod-streaming-sidecar.yaml" %}} Now when you run this pod, you can access each log stream separately by running the following commands: ```shell kubectl logs counter count-log-1 ``` The output is similar to: ```console 0: Fri Apr 1 11:42:26 UTC 2022 1: Fri Apr 1 11:42:27 UTC 2022 2: Fri Apr 1 11:42:28 UTC 2022 ... ``` ```shell kubectl logs counter count-log-2 ``` The output is similar to: ```console Fri Apr 1 11:42:29 UTC 2022 INFO 0 Fri Apr 1 11:42:30 UTC 2022 INFO 0 Fri Apr 1 11:42:31 UTC 2022 INFO 0 ... ``` If you installed a node-level agent in your cluster, that agent picks up those log streams automatically without any further configuration. If you like, you can configure the agent to parse log lines depending on the source container. Even for Pods that only have low CPU and memory usage (order of a couple of millicores for cpu and order of several megabytes for memory), writing logs to a file and then streaming them to `stdout` can double how much storage you need on the node. If you have an application that writes to a single file, it's recommended to set `/dev/stdout` as the destination rather than implement the streaming sidecar container approach. Sidecar containers can also be used to rotate log files that cannot be rotated by the application itself. An example of this approach is a small container running `logrotate` periodically. However, it's more straightforward to use `stdout` and `stderr` directly, and leave rotation and retention policies to the kubelet. #### Sidecar container with a logging agent ![Sidecar container with a logging agent](/images/docs/user-guide/logging/logging-with-sidecar-agent.png) If the node-level logging agent is not flexible enough for your situation, you can create a sidecar container with a separate logging agent that you have configured specifically to run with your application.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/logging.md
[ 0.0349295474588871, 0.038673482835292816, 0.018082736060023308, 0.04742436483502388, 0.010390745475888252, -0.0005325479432940483, -0.05090419575572014, 0.010012172162532806, 0.020739376544952393, -0.026954563334584236, -0.02140381745994091, -0.04542052000761032, -0.005210301373153925, -0.01950681023299694, 0.0028375997208058834, -0.05583471804857254, 0.004627775400876999, 0.10609062016010284, -0.02299044281244278, -0.09969977289438248, 0.0007188283489085734, -0.05249873548746109, 0.0031358383130282164, 0.01817561499774456, -0.053799089044332504, 0.03216687589883804, 0.005277504678815603, -0.057247307151556015, 0.043743912130594254, -0.05596185475587845, 0.027391409501433372, 0.0077726757153868675, -0.058856040239334106, 0.06577173620462418, -0.015633072704076767, 0.03961719200015068, 0.025109998881816864, -0.06102544814348221, -0.046040698885917664, -0.019431527704000473, 0.08428660780191422, 0.0017382443184033036, -0.0875275656580925, -0.035790279507637024, -0.05865040048956871, -0.0919632762670517, -0.09600300341844559, 0.022242281585931778, -0.047537658363580704, -0.020237445831298828, 0.05311558023095131, -0.030251186341047287, 0.002580212661996484, 0.0631265640258789, -0.038656070828437805, 0.04365117475390434, -0.03149440512061119, -0.0063912407495081425, 0.07697354257106781, -0.011673874221742153, -0.005308317951858044, 0.03952392563223839, 0.039310336112976074, -0.02998812310397625, -0.006651205476373434, -0.034775201231241226, 0.010745319537818432, 0.14192058145999908, 0.00897260569036007, 0.04543323814868927, -0.03858239948749542, -0.008201591670513153, -0.04969291388988495, -0.06545694172382355, -0.017881108447909355, -0.015464776195585728, -0.01558898389339447, 0.015825094655156136, -0.08380132913589478, -0.030896242707967758, 0.0002163207536796108, 0.028391489759087563, 0.03983582556247711, 0.03403190150856972, -0.04814373701810837, 0.0011083974968641996, -0.032120056450366974, 0.03793467953801155, 0.0035892711021006107, -0.03643372654914856, -0.0703834667801857, -0.012754742056131363, 0.017257221043109894, -0.04278058186173439, 0.05228990688920021, 0.0004932141164317727, -0.010084682144224644, 0.05662795156240463, 0.114549420773983, -0.02410995401442051, 0.022763419896364212, 0.07735103368759155, 0.03388876095414162, -0.046052247285842896, 0.03831547498703003, -0.04982155188918114, -0.037455081939697266, 0.0007441119523718953, 0.06664802879095078, -0.004768505692481995, -0.05950303003191948, 0.08173973113298416, -0.017302369698882103, -0.009355690330266953, 0.0772339478135109, -0.01766732707619667, -0.041401710361242294, -0.010653371922671795, 0.039722051471471786, 0.01668994314968586, 0.12008696049451828, -0.05226500704884529, -0.008093449287116528, 0.04628074914216995, 0.1670331209897995, -0.011431259103119373, 0.01261702086776495, 4.07840887424662e-33, 0.025743426755070686, -0.043385379016399384, 0.06697525084018707, 0.020910192281007767, 0.03943988308310509, 0.08322474360466003, -0.043124400079250336, -0.048259321600198746, -0.06794022023677826, 0.06222868338227272, -0.08616012334823608, 0.1030527874827385, -0.07779121398925781, 0.024068418890237808, 0.054410986602306366, -0.03461811691522598, -0.11495086550712585, 0.027644667774438858, 0.04196900874376297, -0.010491004213690758, -0.022967340424656868, -0.025913013145327568, -0.034210287034511566, 0.009592012502253056, 0.041489895433187485, 0.0005030235624872148, 0.05184289813041687, -0.061479661613702774, 0.018562767654657364, -0.003028915263712406, 0.08861369639635086, 0.012346411123871803, 0.007172648794949055, 0.019131291657686234, -0.06776728481054306, -0.0312500037252903, -0.06117638200521469, -0.01436528842896223, -0.13028579950332642, -0.023919695988297462, -0.06385623663663864, -0.036772750318050385, -0.045955266803503036, -0.15381373465061188, -0.04995214194059372, -0.031056437641382217, -0.04343554377555847, 0.006931100971996784, 0.019696101546287537, -0.02321488969027996, 0.026945553719997406, 0.050692301243543625, 0.004355074372142553, 0.04251788556575775, 0.06387700140476227, 0.013060375116765499, 0.1202741265296936, -0.06994280964136124, -0.01672949828207493, 0.04384685680270195, -0.03369155898690224, 0.03198140487074852, 0.0070021855644881725, 0.02369699254631996, -0.0043914723210036755, 0.08351782709360123, 0.04149825870990753, 0.01961396634578705, 0.012029184959828854, -0.05600621923804283, -0.05203843116760254, 0.044809699058532715, 0.03483274206519127, -0.022911295294761658, 0.015247276052832603, 0.019820284098386765, -0.004329314921051264, 0.04306633397936821, -0.07796557247638702, 0.03442009538412094, -0.016142792999744415, -0.12450132519006729, -0.004805583506822586, 0.008603539317846298, 0.01532005611807108, -0.033445440232753754, -0.05254426971077919, -0.01675688661634922, -0.04228730499744415, 0.09565538167953491, -0.0891486257314682, 0.037433624267578125, 0.010498312301933765, -0.02430153079330921, -0.032256416976451874, -5.0471635234600226e-33, -0.013580436818301678, 0.06360675394535065, -0.01684793457388878, 0.020906029269099236, 0.022640837356448174, 0.03185422718524933, 0.042486753314733505, -0.00920210313051939, 0.00856861099600792, -0.015016294084489346, -0.1143355518579483, -0.033968642354011536, -0.021607594564557076, 0.037043213844299316, -0.007562614046037197, 0.03514648973941803, 0.009410347789525986, -0.025021076202392578, 0.03665463626384735, -0.052420392632484436, -0.015281092375516891, 0.030665012076497078, 0.012345226481556892, 0.06339400261640549, 0.02127503603696823, 0.04361338913440704, 0.07045334577560425, 0.041404880583286285, -0.05883009359240532, -0.0707039162516594, 0.06840842962265015, -0.1386178582906723, 0.04980570077896118, -0.028122399002313614, 0.019197478890419006, -0.08412791788578033, -0.014421799220144749, 0.08681647479534149, 0.02658935822546482, -0.02229470945894718, 0.05574651062488556, -0.01594359055161476, -0.055119458585977554, -0.02304602973163128, -0.04439093917608261, 0.029466377571225166, -0.09095753729343414, 0.005084649194031954, 0.03506932035088539, -0.022424042224884033, -0.018378404900431633, 0.015181290917098522, -0.034499552100896835, 0.034280501306056976, -0.024642417207360268, 0.00718552665784955, 0.09430496394634247, 0.013585575856268406, -0.032547637820243835, 0.002906321082264185, 0.022046048194169998, -0.0440780408680439, 0.02624261938035488, 0.004389241337776184, -0.03338479623198509, -0.14177891612052917, 0.04916668310761452, -0.07570665329694748, 0.03513216972351074, -0.02737155370414257, 0.04999899864196777, -0.020416423678398132, 0.0248112790286541, 0.13987693190574646, 0.02323465794324875, 0.06499410420656204, -0.019421853125095367, -0.10075712949037552, 0.027602095156908035, -0.008342768996953964, -0.10161536186933517, -0.012701810337603092, 0.0183333158493042, 0.030530882999300957, 0.09523217380046844, -0.0351225771009922, 0.022591667249798775, 0.008800291456282139, 0.12582966685295105, -0.024394892156124115, 0.012345666997134686, 0.07300762832164764, -0.03813077509403229, 0.01614299789071083, 0.0007182381232269108, -4.732429204068467e-8, -0.04473554342985153, -0.14784345030784607, -0.008672350086271763, 0.010288143530488014, -0.003940823953598738, -0.029166337102651596, 0.057567618787288666, 0.07002700865268707, -0.05997365340590477, 0.008846760727465153, -0.010430150665342808, -0.048252806067466736, -0.06515634804964066, -0.021767186000943184, 0.09695669263601303, -0.04646732285618782, 0.05389932543039322, -0.02639959566295147, -0.017101755365729332, -0.07993580400943756, -0.056297417730093, -0.004621253814548254, 0.0037560067139565945, 0.02960611879825592, -0.06400665640830994, 0.006012916564941406, 0.12168464809656143, 0.0877704992890358, -0.0012850906932726502, -0.046660926192998886, 0.034590981900691986, 0.03414434194564819, 0.018912287428975105, 0.05947646126151085, 0.026927974075078964, 0.027306869626045227, -0.07449399679899216, 0.05204202979803085, -0.03655143827199936, 0.032983552664518356, -0.03027779795229435, -0.001066479948349297, -0.0016845559002831578, -0.04106856882572174, 0.032212793827056885, 0.002953555667772889, -0.06870821863412857, -0.017527086660265923, 0.054927531629800797, 0.05572829395532608, -0.020348811522126198, -0.07093662023544312, -0.011442615650594234, 0.07809183746576309, 0.04674607887864113, -0.014377303421497345, -0.00861264020204544, -0.09520835429430008, 0.17405548691749573, 0.010152410715818405, 0.03801703080534935, 0.033521927893161774, 0.030466711148619652, 0.026015810668468475 ]
0.096295
policies to the kubelet. #### Sidecar container with a logging agent ![Sidecar container with a logging agent](/images/docs/user-guide/logging/logging-with-sidecar-agent.png) If the node-level logging agent is not flexible enough for your situation, you can create a sidecar container with a separate logging agent that you have configured specifically to run with your application. {{< note >}} Using a logging agent in a sidecar container can lead to significant resource consumption. Moreover, you won't be able to access those logs using `kubectl logs` because they are not controlled by the kubelet. {{< /note >}} Here are two example manifests that you can use to implement a sidecar container with a logging agent. The first manifest contains a [`ConfigMap`](/docs/tasks/configure-pod-container/configure-pod-configmap/) to configure fluentd. {{% code\_sample file="admin/logging/fluentd-sidecar-config.yaml" %}} {{< note >}} In the sample configurations, you can replace fluentd with any logging agent, reading from any source inside an application container. {{< /note >}} The second manifest describes a pod that has a sidecar container running fluentd. The pod mounts a volume where fluentd can pick up its configuration data. {{% code\_sample file="admin/logging/two-files-counter-pod-agent-sidecar.yaml" %}} ### Exposing logs directly from the application ![Exposing logs directly from the application](/images/docs/user-guide/logging/logging-from-application.png) Cluster-logging that exposes or pushes logs directly from every application is outside the scope of Kubernetes. ## {{% heading "whatsnext" %}} \* Read about [Kubernetes system logs](/docs/concepts/cluster-administration/system-logs/) \* Learn about [Traces For Kubernetes System Components](/docs/concepts/cluster-administration/system-traces/) \* Learn how to [customise the termination message](/docs/tasks/debug/debug-application/determine-reason-pod-failure/#customizing-the-termination-message) that Kubernetes records when a Pod fails
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/logging.md
[ 0.06469742953777313, 0.0888444185256958, 0.06228388473391533, 0.021324114874005318, -0.0021400321274995804, -0.04105761647224426, -0.0021980449091643095, -0.008375891484320164, 0.014091506600379944, 0.0339767262339592, 0.007726238574832678, -0.07771427929401398, -0.03372824192047119, 0.006179326679557562, 0.04648539051413536, -0.013960602693259716, 0.051529351621866226, 0.059149451553821564, -0.05929848551750183, 0.008277149870991707, 0.022953974083065987, -0.03775705769658089, 0.03296438232064247, 0.05855283886194229, -0.08087719231843948, -0.046429309993982315, 0.017235042527318, -0.055054958909749985, 0.02315193973481655, -0.02787892147898674, -0.03345274552702904, 0.0038621665444225073, -0.05117901414632797, 0.0584617517888546, 0.04777386412024498, 0.05489305779337883, 0.03919976204633713, -0.051564548164606094, -0.06901661306619644, 0.01664729416370392, 0.01800994575023651, -0.005606233142316341, -0.09719981998205185, -0.016100088134407997, -0.027693195268511772, -0.09161132574081421, -0.08933838456869125, -0.018410686403512955, -0.0021561605390161276, -0.03352140262722969, 0.05318808928132057, -0.04358933866024017, 0.10409685224294662, -0.002225879579782486, -0.006626558490097523, 0.03326079621911049, 0.02183924801647663, 0.04560115933418274, 0.12192360311746597, 0.02127769961953163, 0.025916332378983498, 0.013646683655679226, 0.014063325710594654, -0.03991461917757988, -0.05945569649338722, -0.03127787634730339, -0.007171917241066694, 0.07483827322721481, -0.012386283837258816, 0.06099037826061249, 0.008062832988798618, -0.05037415027618408, -0.007540903519839048, -0.06972943246364594, 0.035924699157476425, -0.05037812143564224, -0.03737471625208855, 0.05280819535255432, -0.02838943526148796, -0.09323865920305252, 0.002485382603481412, 0.03251565620303154, 0.0865272581577301, -0.014107790775597095, -0.08367795497179031, -0.0460011288523674, -0.04765639826655388, 0.011498164385557175, 0.07436878234148026, 0.002762732794508338, -0.001325886812992394, -0.060430072247982025, 0.03426826000213623, -0.12073719501495361, 0.08965753763914108, -0.0009606130770407617, -0.045724209398031235, 0.06545747071504593, 0.033654168248176575, -0.053318317979574203, 0.06258071959018707, 0.07466325163841248, -0.026065124198794365, 0.01434696838259697, 0.07924415916204453, -0.03022121638059616, -0.040037479251623154, -0.0039045847952365875, 0.05120639130473137, 0.025536881759762764, -0.03456290811300278, 0.07040520012378693, -0.0038727542851120234, 0.031483422964811325, 0.0542851984500885, -0.0075395917519927025, -0.03337612748146057, 0.002437716582790017, 0.018356112763285637, 0.07445600628852844, 0.11442579329013824, -0.08193453401327133, -0.014794991351664066, 0.0006099410820752382, 0.06566476076841354, 0.02147413231432438, -0.006751366890966892, 1.6864407864934494e-33, 0.09253358840942383, -0.012263166718184948, 0.033252157270908356, -0.022674623876810074, 0.006618758197873831, -0.01692226715385914, -0.07802187651395798, -0.028848771005868912, -0.09624294191598892, -0.017523881047964096, -0.08901394158601761, 0.07641444355249405, -0.05717030540108681, 0.005368122365325689, 0.04913349077105522, 0.03558903560042381, -0.1520502269268036, 0.04732131585478783, 0.08720080554485321, 0.008411147631704807, -0.009873118251562119, -0.09201198816299438, -0.0378434844315052, -0.00021194374130573124, 0.06710547208786011, -0.007609340362250805, 0.07273531705141068, -0.09418988227844238, -0.01235491968691349, 0.021484466269612312, 0.05362311378121376, 0.009073054417967796, 0.024254698306322098, 0.02040063589811325, -0.12624473869800568, -0.029841486364603043, -0.015814222395420074, 0.03757911175489426, -0.11925933510065079, -0.015966203063726425, -0.006179269403219223, -0.01695958338677883, -0.01601937972009182, -0.1478813737630844, -0.002719805808737874, -0.04403743892908096, 0.056083522737026215, 0.015652038156986237, 0.06843569129705429, 0.011856934987008572, -0.001272242865525186, 0.005201226565986872, -0.011557584628462791, -0.00732601759955287, 0.06940042972564697, 0.01357225514948368, 0.15193642675876617, -0.06721673160791397, -0.03726707398891449, 0.016924139112234116, -0.05169317126274109, -0.0025619787629693747, 0.04399554431438446, 0.03641205653548241, -0.01558260153979063, 0.04825541377067566, -0.008679377846419811, 0.01806689240038395, -0.06320822983980179, -0.07879579812288284, -0.056827716529369354, 0.007275095209479332, -0.011963870376348495, -0.007151685189455748, -0.02072119526565075, -0.012082339264452457, -0.006112856790423393, 0.048874083906412125, -0.13849446177482605, 0.0563829243183136, 0.001593597000464797, -0.09183377772569656, 0.013951661996543407, 0.04999213665723801, 0.020794786512851715, -0.07712756097316742, -0.029861541464924812, -0.001501616439782083, -0.05542268976569176, 0.1034388616681099, -0.059828951954841614, 0.0386207215487957, -0.04730582609772682, 0.028380393981933594, -0.08342413604259491, -3.0458875135919474e-33, 0.03245735168457031, 0.03498808294534683, 0.03353627398610115, -0.020421501249074936, -0.004841589834541082, 0.05486330762505531, 0.016244815662503242, 0.02288706973195076, -0.002178627997636795, -0.03711991384625435, -0.07344592362642288, -0.0490853488445282, 0.007327263243496418, 0.0543689951300621, -0.06415142118930817, 0.054215773940086365, -0.04946915805339813, -0.0013742208248004317, -0.01229793205857277, -0.022390807047486305, -0.02482607774436474, 0.0006998779717832804, 0.012231940403580666, 0.051985882222652435, 0.021391911432147026, 0.022792600095272064, 0.02088409662246704, 0.045414626598358154, -0.051110535860061646, -0.10496433079242706, 0.026471123099327087, -0.13018229603767395, -0.006880754604935646, -0.01008341833949089, 0.02931942045688629, -0.07146623730659485, -0.033806268125772476, 0.08095904439687729, -0.028342178091406822, 0.009887875989079475, 0.03590665012598038, 0.04076224938035011, -0.0463680773973465, -0.018838241696357727, -0.08184345811605453, -0.00933938380330801, -0.020468244329094887, -0.048230867832899094, 0.036038413643836975, -0.06594942510128021, -0.01594388112425804, -0.012057007290422916, 0.032578930258750916, 0.0783991739153862, -0.06747723370790482, 0.047396477311849594, 0.0709729790687561, 0.06414031982421875, -0.0286258477717638, -0.023506823927164078, 0.0068311127834022045, -0.02513483352959156, 0.057027269154787064, 0.02346433326601982, -0.014648305252194405, -0.09198933839797974, 0.04702266678214073, 0.000804729585070163, 0.038074493408203125, -0.025326913222670555, 0.03715266287326813, -0.04092174023389816, 0.002681136829778552, 0.12263160198926926, 0.01405926700681448, 0.07838445901870728, 0.0186871699988842, -0.10159037262201309, 0.0470702201128006, 0.022881576791405678, -0.022797677665948868, -0.009799950756132603, -0.024402061477303505, -0.030451936647295952, 0.047124918550252914, -0.001446206122636795, -0.0008698474848642945, 0.022555364295840263, 0.07286201417446136, 0.0451483428478241, -0.025972913950681686, 0.046824485063552856, -0.03881729021668434, 0.05464239791035652, -0.005548436660319567, -4.814524601215453e-8, 0.003913619089871645, -0.0926385149359703, 0.0006088477675803006, 0.010646919719874859, 0.02934492565691471, -0.03717586025595665, 0.06417448818683624, 0.06745726615190506, -0.09744030237197876, 0.04380595311522484, -0.06398340314626694, 0.02495938539505005, -0.05057863891124725, 0.02472851052880287, 0.03968004882335663, -0.0824664980173111, 0.06798205524682999, 0.008616366423666477, -0.0007850949768908322, -0.043182652443647385, -0.03653748705983162, -0.038092225790023804, -0.006856357213109732, 0.023892128840088844, -0.008652688935399055, 0.02292906492948532, 0.09592926502227783, 0.058798953890800476, 0.053973183035850525, -0.007569597102701664, -0.030888520181179047, 0.019633442163467407, -0.0593251995742321, 0.06160270795226097, -0.028139976784586906, 0.03388906270265579, -0.16481275856494904, 0.021041741594672203, 0.022957976907491684, 0.03829878196120262, -0.010221882723271847, -0.012144564650952816, -0.01924324966967106, -0.03349951282143593, 0.03025592863559723, -0.01600932702422142, -0.03578778728842735, 0.028918588533997536, 0.05100769177079201, -0.005120497662574053, -0.05104724317789078, -0.0749589204788208, 0.006507247686386108, 0.09396528452634811, 0.02104651927947998, 0.05135096237063408, 0.03441780060529709, -0.0795304924249649, 0.1536550223827362, -0.005139748565852642, 0.013790927827358246, 0.0034450364764779806, 0.003279494820162654, 0.026970814913511276 ]
0.121635
In a Kubernetes cluster, a {{< glossary\_tooltip text="node" term\_id="node" >}} can be shut down in a planned graceful way or unexpectedly because of reasons such as a power outage or something else external. A node shutdown could lead to workload failure if the node is not drained before the shutdown. A node shutdown can be either \*\*graceful\*\* or \*\*non-graceful\*\*. ## Graceful node shutdown {#graceful-node-shutdown} The kubelet attempts to detect node system shutdown and terminates pods running on the node. Kubelet ensures that pods follow the normal [pod termination process](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) during the node shutdown. During node shutdown, the kubelet does not accept new Pods (even if those Pods are already bound to the node). ### Enabling graceful node shutdown {{< tabs name="graceful\_shutdown\_os" >}} {{% tab name="Linux" %}} {{< feature-state feature\_gate\_name="GracefulNodeShutdown" >}} On Linux, the graceful node shutdown feature is controlled with the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) which is enabled by default in 1.21. {{< note >}} The graceful node shutdown feature depends on systemd since it takes advantage of [systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to delay the node shutdown with a given duration. {{}} {{% /tab %}} {{% tab name="Windows" %}} {{< feature-state feature\_gate\_name="WindowsGracefulNodeShutdown" >}} On Windows, the graceful node shutdown feature is controlled with the `WindowsGracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) which is introduced in 1.32 as an alpha feature. In Kubernetes 1.34 the feature is Beta and is enabled by default. {{< note >}} The Windows graceful node shutdown feature depends on kubelet running as a Windows service, it will then have a registered [service control handler](https://learn.microsoft.com/en-us/windows/win32/services/service-control-handler-function) to delay the preshutdown event with a given duration. {{}} Windows graceful node shutdown can not be cancelled. If kubelet is not running as a Windows service, it will not be able to set and monitor the [Preshutdown](https://learn.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service\_preshutdown\_info) event, the node will have to go through the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure mentioned above. In the case where the Windows graceful node shutdown feature is enabled, but the kubelet is not running as a Windows service, the kubelet will continue running instead of failing. However, it will log an error indicating that it needs to be run as a Windows service. {{% /tab %}} {{< /tabs >}} ### Configuring graceful node shutdown Note that by default, both configuration options described below, `shutdownGracePeriod` and `shutdownGracePeriodCriticalPods`, are set to zero, thus not activating the graceful node shutdown functionality. To activate the feature, both options should be configured appropriately and set to non-zero values. Once the kubelet is notified of a node shutdown, it sets a `NotReady` condition on the Node, with the `reason` set to `"node is shutting down"`. The kube-scheduler honors this condition and does not schedule any Pods onto the affected node; other third-party schedulers are expected to follow the same logic. This means that new Pods won't be scheduled onto that node and therefore none will start. The kubelet \*\*also\*\* rejects Pods during the `PodAdmission` phase if an ongoing node shutdown has been detected, so that even Pods with a {{< glossary\_tooltip text="toleration" term\_id="toleration" >}} for `node.kubernetes.io/not-ready:NoSchedule` do not start there. When kubelet is setting that condition on its Node via the API, the kubelet also begins terminating any Pods that are running locally. During a graceful shutdown, kubelet terminates pods in two phases: 1. Terminate regular pods running on the node. 1. Terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) running on the node. The graceful node shutdown feature is configured with two [`KubeletConfiguration`](/docs/tasks/administer-cluster/kubelet-config-file/) options: - `shutdownGracePeriod`: Specifies the total duration that the node should delay the shutdown by. This is the total grace period for pod termination for both regular and [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical). - `shutdownGracePeriodCriticalPods`: Specifies the duration used to terminate
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-shutdown.md
[ 0.03780701011419296, 0.05554505065083504, 0.10802757740020752, 0.04688433185219765, -0.01686350628733635, -0.02371012419462204, -0.02259250544011593, -0.04084815829992294, 0.09499695897102356, 0.02411526069045067, -0.04814794659614563, 0.014450010843575, -0.029809532687067986, -0.03936973586678505, -0.016520719975233078, 0.014336892403662205, 0.022157534956932068, 0.02676267921924591, -0.0512908399105072, 0.015457084402441978, 0.014232566580176353, 0.00616075424477458, 0.0030771188903599977, 0.06628130376338959, -0.06154865771532059, -0.0006678818608634174, -0.0464942641556263, -0.037733789533376694, 0.015125810168683529, -0.007853851653635502, -0.08102068305015564, -0.008860168047249317, -0.04544120281934738, 0.022417791187763214, 0.07615084201097488, 0.0774611309170723, 0.00773267075419426, -0.017048846930265427, -0.04523288458585739, -0.0015407754108309746, 0.04068969190120697, -0.04580669105052948, -0.11364719271659851, -0.0017652293900027871, -0.0486263632774353, 0.04158646613359451, -0.058482397347688675, -0.04909142106771469, -0.05660584568977356, -0.013304480351507664, 0.019009286537766457, -0.10496369749307632, 0.08712335675954819, 0.07592625170946121, 0.10226529836654663, 0.039098724722862244, 0.01668434962630272, -0.04526128992438316, 0.08799786120653152, 0.042936619371175766, 0.01785757951438427, 0.016312208026647568, -0.035715218633413315, -0.009833772666752338, 0.04807793349027634, 0.05463245511054993, 0.022804241627454758, -0.006018053274601698, 0.026515807956457138, 0.01050843857228756, 0.0899931862950325, -0.02056621015071869, -0.03965456038713455, 0.01962348259985447, -0.01735074073076248, 0.03813444450497627, -0.029897863045334816, 0.0009927712380886078, -0.03861038759350777, -0.057513173669576645, 0.0029270846862345934, 0.019677869975566864, 0.05563196912407875, 0.00008507088932674378, -0.08095309883356094, -0.011407728306949139, -0.011224888265132904, -0.05370979383587837, 0.060416918247938156, -0.010422812774777412, -0.04268011823296547, 0.022715819999575615, 0.08210162073373795, -0.06279049068689346, 0.0497538186609745, -0.04151903837919235, 0.040008556097745895, -0.02266026847064495, -0.007645305711776018, -0.01131986454129219, 0.05124443769454956, 0.028464453294873238, 0.0009615024318918586, -0.007908966392278671, 0.04411071166396141, -0.05707591772079468, -0.049752265214920044, -0.029294319450855255, 0.06656844168901443, -0.022749943658709526, 0.003794900607317686, 0.007883504964411259, -0.011017176322638988, 0.045560404658317566, -0.027114544063806534, 0.01009115669876337, 0.012358909472823143, 0.04723246023058891, 0.059429917484521866, 0.02293618954718113, 0.08128912001848221, -0.06649830937385559, -0.027614958584308624, -0.05113343149423599, -0.039186082780361176, 0.007346607744693756, -0.04149847477674484, 5.586405393852423e-33, 0.08253149688243866, -0.14247818291187286, -0.01656496524810791, 0.03620367869734764, 0.048313289880752563, -0.11931825429201126, -0.10158886760473251, -0.031187349930405617, -0.0373554602265358, -0.022372839972376823, -0.05718885362148285, -0.02115624211728573, -0.0002110321947839111, -0.021809492260217667, 0.08267422020435333, -0.030877185985445976, -0.012879730202257633, 0.03621303290128708, 0.057911466807127, 0.008022507652640343, 0.10837850719690323, -0.05687578767538071, -0.010526266880333424, 0.020565928891301155, 0.033635154366493225, 0.011040743440389633, -0.005397143308073282, -0.07042514532804489, -0.015316284261643887, 0.04027983918786049, -0.03680577501654625, -0.021493487060070038, 0.0349956750869751, 0.02582813799381256, -0.19988323748111725, -0.003362982301041484, -0.09163899719715118, -0.01401611790060997, -0.03459947556257248, -0.05665408819913864, -0.0012302719987928867, 0.0024706944823265076, -0.045471303164958954, -0.01507597230374813, 0.10578741133213043, -0.07608337700366974, 0.04035491123795509, -0.08151920884847641, 0.07256735861301422, 0.009746715426445007, -0.0051572914235293865, -0.03831365332007408, 0.05642873793840408, 0.030529329553246498, 0.03305966407060623, 0.07545142620801926, 0.0935792326927185, -0.057920508086681366, -0.05674150213599205, 0.04804150015115738, -0.06192643567919731, -0.016822820529341698, -0.006955397315323353, -0.0440320149064064, 0.048368435353040695, 0.0655011236667633, -0.022033311426639557, 0.03234298527240753, -0.0647236630320549, -0.009043813683092594, -0.08608471602201462, 0.04332692176103592, -0.01965590938925743, -0.006060657557100058, -0.02676023729145527, -0.06094691529870033, -0.015926141291856766, -0.012098673731088638, -0.12323086708784103, 0.03204115480184555, 0.06833517551422119, -0.10955744981765747, -0.04565431922674179, 0.0556379072368145, 0.0683821439743042, -0.01942376419901848, 0.018886858597397804, -0.01582150161266327, -0.12890388071537018, 0.033353228121995926, 0.029649823904037476, 0.0006700608064420521, -0.0545787438750267, 0.01847677305340767, -0.10481630265712738, -6.384773973624058e-33, 0.04509127512574196, -0.0060211592353880405, -0.02910522371530533, 0.050079334527254105, -0.021067429333925247, -0.001795636024326086, -0.07235702872276306, 0.04233212769031525, -0.0324539951980114, 0.003270626999437809, -0.01580003648996353, -0.03747359663248062, -0.01970849558711052, 0.021659161895513535, -0.07412587106227875, -0.030903689563274384, -0.04327656701207161, -0.0183373112231493, -0.002815919229760766, 0.04383760690689087, -0.009341978468000889, -0.03890850394964218, -0.021876288577914238, -0.02451442740857601, -0.00942087173461914, -0.016626296564936638, -0.004538089502602816, 0.008649801835417747, -0.03940349072217941, -0.07519480586051941, 0.032563913613557816, -0.05531074106693268, -0.007399304304271936, 0.07113013416528702, 0.08115018159151077, -0.009668895974755287, -0.09932228177785873, 0.020178036764264107, 0.0018803589046001434, -0.014022033661603928, 0.0987807884812355, 0.09521348774433136, -0.04666365683078766, -0.03333403170108795, -0.001367270015180111, 0.03179061412811279, 0.004084819927811623, -0.006887838244438171, -0.007753749843686819, -0.07598189264535904, 0.013096911832690239, -0.05229799449443817, 0.007438137661665678, 0.1318049430847168, -0.036595456302165985, -0.028618037700653076, 0.07875391095876694, 0.0714418813586235, -0.07296618074178696, -0.019322475418448448, 0.020653730258345604, -0.10651125758886337, 0.11659611016511917, 0.07909718155860901, -0.004158350173383951, -0.05470629408955574, 0.011342894285917282, 0.10370281338691711, 0.02159002050757408, 0.030315987765789032, 0.0036404228303581476, 0.04574289545416832, 0.0361977219581604, 0.029769008979201317, -0.006876472849398851, 0.032963935285806656, -0.017396723851561546, -0.1078694686293602, -0.005575389135628939, -0.010029678232967854, -0.022788699716329575, 0.047288015484809875, -0.064658522605896, 0.03884714096784592, 0.04854218289256096, 0.02063462696969509, -0.007057504262775183, 0.14002275466918945, 0.07007357478141785, 0.11780719459056854, 0.0029162587597966194, 0.0029327734373509884, -0.02330636978149414, 0.10165797919034958, -0.06386430561542511, -5.440907102638448e-8, 0.031123919412493706, 0.029502887278795242, -0.041445545852184296, 0.0011555093806236982, 0.06309743225574493, -0.03386439010500908, 0.07661236077547073, 0.021144790574908257, -0.07428143173456192, -0.01736324280500412, -0.008778989315032959, 0.04646163433790207, -0.03297664597630501, 0.020831095054745674, 0.009887879714369774, 0.021498579531908035, 0.0036806410644203424, 0.0486067496240139, 0.011362532153725624, -0.034099459648132324, -0.11327587813138962, -0.05631611496210098, -0.0027777666691690683, 0.085597924888134, -0.01671021804213524, 0.032359037548303604, 0.04416884109377861, 0.020495804026722908, -0.00922238826751709, -0.014355624094605446, -0.0316210500895977, 0.03971593454480171, -0.07896525412797928, 0.07676824182271957, -0.056088581681251526, 0.0945185199379921, -0.1411517709493637, 0.02159976027905941, 0.05808332562446594, 0.07305128127336502, 0.006688766181468964, -0.02669128216803074, -0.09979826211929321, 0.027355484664440155, 0.0163422841578722, 0.04580391198396683, -0.011847038753330708, 0.07004030048847198, -0.025183431804180145, 0.0326874703168869, -0.0374421589076519, -0.0457831509411335, -0.016832152381539345, 0.042772624641656876, -0.052860334515571594, -0.019062161445617676, -0.02343718335032463, -0.02716628834605217, 0.02465759590268135, -0.011042117141187191, 0.04716496169567108, -0.004491210449486971, 0.04911170154809952, -0.01268982794135809 ]
0.189703
the node. The graceful node shutdown feature is configured with two [`KubeletConfiguration`](/docs/tasks/administer-cluster/kubelet-config-file/) options: - `shutdownGracePeriod`: Specifies the total duration that the node should delay the shutdown by. This is the total grace period for pod termination for both regular and [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical). - `shutdownGracePeriodCriticalPods`: Specifies the duration used to terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) during a node shutdown. This value should be less than `shutdownGracePeriod`. {{< note >}} There are cases when Node termination was cancelled by the system (or perhaps manually by an administrator). In either of those situations the Node will return to the `Ready` state. However, Pods which already started the process of termination will not be restored by kubelet and will need to be re-scheduled. {{< /note >}} For example, if `shutdownGracePeriod=30s`, and `shutdownGracePeriodCriticalPods=10s`, kubelet will delay the node shutdown by 30 seconds. During the shutdown, the first 20 (30-10) seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical). {{< note >}} When pods were evicted during the graceful node shutdown, they are marked as shutdown. Running `kubectl get pods` shows the status of the evicted pods as `Terminated`. And `kubectl describe pod` indicates that the pod was evicted because of node shutdown: ``` Reason: Terminated Message: Pod was terminated in response to imminent node shutdown. ``` {{< /note >}} ### Pod Priority based graceful node shutdown {#pod-priority-graceful-node-shutdown} {{< feature-state feature\_gate\_name="GracefulNodeShutdownBasedOnPodPriority" >}} To provide more flexibility during graceful node shutdown around the ordering of pods during shutdown, graceful node shutdown honors the PriorityClass for Pods, provided that you enabled this feature in your cluster. The feature allows cluster administrators to explicitly define the ordering of pods during graceful node shutdown based on [priority classes](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass). The [Graceful Node Shutdown](#graceful-node-shutdown) feature, as described above, shuts down pods in two phases, non-critical pods, followed by critical pods. If additional flexibility is needed to explicitly define the ordering of pods during shutdown in a more granular way, pod priority based graceful shutdown can be used. When graceful node shutdown honors pod priorities, this makes it possible to do graceful node shutdown in multiple phases, each phase shutting down a particular priority class of pods. The kubelet can be configured with the exact phases and shutdown time per phase. Assuming the following custom pod [priority classes](/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) in a cluster, | Pod priority class name | Pod priority class value | | ----------------------- | ------------------------ | | `custom-class-a` | 100000 | | `custom-class-b` | 10000 | | `custom-class-c` | 1000 | | `regular/unset` | 0 | Within the [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/) the settings for `shutdownGracePeriodByPodPriority` could look like: | Pod priority class value | Shutdown period | | ------------------------ | --------------- | | 100000 | 10 seconds | | 10000 | 180 seconds | | 1000 | 120 seconds | | 0 | 60 seconds | The corresponding kubelet config YAML configuration would be: ```yaml shutdownGracePeriodByPodPriority: - priority: 100000 shutdownGracePeriodSeconds: 10 - priority: 10000 shutdownGracePeriodSeconds: 180 - priority: 1000 shutdownGracePeriodSeconds: 120 - priority: 0 shutdownGracePeriodSeconds: 60 ``` The above table implies that any pod with `priority` value >= 100000 will get just 10 seconds to shut down, any pod with value >= 10000 and < 100000 will get 180 seconds to shut down, any pod with value >= 1000 and < 10000 will get 120 seconds to shut down. Finally, all other pods will get 60 seconds to shut down. One doesn't have to specify values corresponding to all of the classes. For example, you could instead use these settings: | Pod priority class value | Shutdown period | | ------------------------ | ---------------
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-shutdown.md
[ 0.032259903848171234, 0.047922391444444656, 0.08609181642532349, 0.055072393268346786, 0.023943452164530754, -0.0013762576272711158, -0.07145556062459946, -0.00219089281745255, 0.06998952478170395, 0.07413895428180695, -0.0320216566324234, 0.012091174721717834, -0.038819488137960434, -0.03694590926170349, -0.011837741360068321, -0.009951373562216759, 0.024434644728899002, 0.006355885416269302, -0.03257039934396744, 0.0069807893596589565, 0.05429787188768387, -0.00023046349815558642, 0.029639318585395813, 0.07753940671682358, -0.06254550069570541, -0.014866001904010773, -0.07070551812648773, -0.017803145572543144, 0.013496985659003258, 0.020501041784882545, -0.07102411985397339, -0.04364991933107376, 0.06263471394777298, -0.007974183186888695, 0.04278365895152092, 0.14453350007534027, -0.010477541014552116, -0.07763955742120743, -0.048150599002838135, -0.022252008318901062, 0.04189367592334747, -0.003967848606407642, -0.0837055966258049, 0.007411936763674021, -0.02092229202389717, 0.037499964237213135, -0.06572658568620682, -0.08686935156583786, -0.049559492617845535, 0.021256098523736, 0.003267850959673524, -0.03532100096344948, 0.07298684120178223, 0.05321172997355461, 0.05798234045505524, 0.10008075088262558, 0.007999899797141552, 0.014913907274603844, 0.07449764013290405, 0.0509454682469368, 0.007845980115234852, -0.026149649173021317, -0.0493694469332695, -0.032890304923057556, 0.06041393056511879, 0.03751508519053459, -0.013685385696589947, -0.04341826215386391, 0.039140909910202026, 0.01901804283261299, 0.09283853322267532, -0.019066739827394485, -0.0019778399728238583, 0.028304176405072212, -0.03177323564887047, 0.04450425133109093, 0.008796571753919125, 0.02879112772643566, -0.029337255284190178, -0.05516555905342102, -0.014230117201805115, -0.01928950473666191, 0.054773710668087006, -0.03639989718794823, -0.12619684636592865, 0.018380170688033104, 0.018423354253172874, -0.0627666637301445, 0.04229385778307915, 0.019141636788845062, 0.02150828391313553, 0.015157935209572315, 0.017089955508708954, -0.08293820172548294, 0.028436318039894104, -0.05092595890164375, 0.009531260468065739, 0.02722742408514023, -0.0012574810534715652, -0.012216554023325443, 0.03087555430829525, -0.014671267941594124, -0.037907667458057404, -0.0328470803797245, 0.06094534322619438, -0.05808977782726288, -0.06330948323011398, -0.036847904324531555, 0.03916294500231743, 0.028556382283568382, 0.018013570457696915, -0.011724908836185932, 0.010083187371492386, 0.059507712721824646, -0.010790087282657623, 0.09502127766609192, 0.008995230309665203, 0.037407372146844864, 0.11015274375677109, 0.017952406778931618, 0.12040103226900101, -0.056443434208631516, -0.012276076711714268, -0.03122621960937977, -0.0693008303642273, 0.01572052761912346, 0.00409524654969573, 2.0671066322500003e-33, 0.03477130085229874, -0.16962115466594696, 0.009318940341472626, 0.0036711804568767548, 0.07142507284879684, -0.08279246836900711, -0.11230167001485825, -0.00676407665014267, -0.016919942572712898, -0.027169257402420044, -0.059546180069446564, -0.03367425128817558, -0.01195613481104374, -0.042742807418107986, 0.03694557398557663, -0.06286556273698807, -0.012588296085596085, 0.02554885298013687, 0.025052877143025398, 0.013678397983312607, 0.12905070185661316, -0.0988532155752182, -0.047239795327186584, 0.04052405804395676, 0.02664174512028694, 0.0024277775082737207, 0.022403303533792496, -0.06291259825229645, -0.01894916035234928, 0.022235514596104622, -0.05119558423757553, 0.015492409467697144, 0.031488243490457535, 0.07016535103321075, -0.1598292589187622, -0.019264375790953636, -0.03662839159369469, 0.013956909067928791, -0.04767032712697983, -0.07857964932918549, 0.0031391310039907694, 0.00778789259493351, -0.03560204803943634, -0.02819780446588993, 0.09608826041221619, -0.1361875832080841, 0.0688714012503624, -0.07816379517316818, 0.07588467001914978, 0.048493027687072754, 0.0008604534668847919, -0.04299665242433548, 0.047821059823036194, -0.012624302878975868, -0.0020044324919581413, 0.05758034437894821, 0.11161147803068161, -0.007797447964549065, -0.06559207290410995, 0.021506480872631073, -0.005470640026032925, -0.010476917028427124, 0.028463296592235565, -0.0385529100894928, 0.013471814803779125, 0.10041947662830353, -0.05887303873896599, 0.01516428031027317, -0.011810273863375187, 0.0135452626273036, -0.08553510159254074, 0.039358459413051605, -0.012947093695402145, -0.010093605145812035, -0.0665910467505455, -0.06177623197436333, 0.0140885254368186, -0.022100811824202538, -0.11046596616506577, 0.045460447669029236, 0.05849894881248474, -0.051809899508953094, -0.015001462772488594, 0.021592386066913605, 0.05160021036863327, -0.05239269137382507, 0.017275160178542137, 0.02416982501745224, -0.05978218466043472, -0.005495848134160042, 0.023586014285683632, 0.0053741205483675, -0.00981306005269289, 0.077996626496315, -0.07853221148252487, -2.945646130799623e-33, 0.04889948293566704, -0.030447280034422874, -0.015901459380984306, 0.06535395979881287, 0.015242957510054111, -0.020720306783914566, -0.10998594760894775, 0.045901812613010406, -0.010565495118498802, -0.011111464351415634, 0.008271001279354095, -0.05762830376625061, 0.006022641435265541, -0.007577719632536173, -0.09895515441894531, -0.008525940589606762, 0.020003145560622215, -0.06136936694383621, 0.00076296366751194, 0.02299979142844677, 0.004492392763495445, -0.03459310904145241, -0.021491779014468193, -0.01197192445397377, 0.01209336705505848, -0.016717564314603806, 0.006094764918088913, 0.002750674495473504, -0.03639509156346321, -0.021564584225416183, 0.011958177201449871, -0.10476551204919815, -0.02692100778222084, 0.12306492030620575, 0.04841877892613411, -0.05304141342639923, -0.11040444672107697, 0.056855302304029465, 0.022761275991797447, 0.004614726640284061, 0.12290264666080475, 0.04383616894483566, -0.01834573782980442, -0.011526537127792835, -0.005913866218179464, -0.0025749250780791044, 0.02277439460158348, -0.029014432802796364, -0.01878225989639759, -0.07853545993566513, -0.04627933353185654, -0.05431850627064705, 0.014703961089253426, 0.13476942479610443, -0.030775662511587143, -0.061162468045949936, 0.04336291924118996, 0.04349931329488754, -0.0076536089181900024, -0.019543930888175964, 0.025957364588975906, -0.08164072036743164, 0.10986748337745667, 0.0375046469271183, 0.02008371613919735, -0.03015640377998352, 0.014745824970304966, 0.07469549775123596, 0.02228056825697422, 0.02425243891775608, 0.026501091197133064, 0.08529947698116302, 0.017871147021651268, 0.05699902027845383, -0.022358521819114685, 0.021876433864235878, -0.03600408136844635, -0.08142360299825668, 0.006906422786414623, -0.022313745692372322, -0.04295187070965767, 0.05517767742276192, -0.08544323593378067, 0.043977268040180206, 0.034480608999729156, 0.04073264077305794, -0.011520041152834892, 0.1427908092737198, 0.06936999410390854, 0.12589362263679504, 0.008517622947692871, 0.0006613198202103376, -0.01261854823678732, 0.0733654648065567, -0.04121307283639908, -4.797705344117276e-8, 0.05533725023269653, -0.005916583351790905, -0.04254952445626259, 0.00218627555295825, 0.11792858690023422, -0.03434515744447708, 0.03820662945508957, 0.032090045511722565, -0.07446788996458054, 0.014001820236444473, 0.021337319165468216, 0.044522300362586975, -0.02595689706504345, -0.03461312875151634, 0.02271387167274952, -0.039721157401800156, 0.00440713157877326, 0.0807720273733139, 0.02874591201543808, -0.00552811985835433, -0.109484001994133, -0.09243383258581161, -0.030305705964565277, -0.015329797752201557, -0.05423537641763687, 0.04153379052877426, 0.034456636756658554, 0.03464717045426369, -0.028764333575963974, 0.0052897450514137745, -0.07421319931745529, 0.023704273626208305, -0.04586799442768097, 0.04773213714361191, -0.06466597318649292, 0.08368151634931564, -0.08948708325624466, 0.027377640828490257, 0.012397407554090023, 0.06994825601577759, 0.03871777653694153, 0.0055726259015500546, -0.0713539868593216, 0.006134828086942434, 0.03418200463056564, 0.022442439571022987, -0.001571047119796276, 0.08736240118741989, -0.005926009267568588, 0.043150223791599274, -0.008805964142084122, -0.05130850523710251, -0.017639441415667534, 0.009771594777703285, -0.020054146647453308, -0.03310243785381317, -0.015330547466874123, -0.045298315584659576, -0.02875421568751335, 0.008737493306398392, 0.015173487365245819, -0.017894815653562546, 0.024064378812909126, -0.0396927110850811 ]
0.184795
get 120 seconds to shut down. Finally, all other pods will get 60 seconds to shut down. One doesn't have to specify values corresponding to all of the classes. For example, you could instead use these settings: | Pod priority class value | Shutdown period | | ------------------------ | --------------- | | 100000 | 300 seconds | | 1000 | 120 seconds | | 0 | 60 seconds | In the above case, the pods with `custom-class-b` will go into the same bucket as `custom-class-c` for shutdown. If there are no pods in a particular range, then the kubelet does not wait for pods in that priority range. Instead, the kubelet immediately skips to the next priority class value range. If this feature is enabled and no configuration is provided, then no ordering action will be taken. Using this feature requires enabling the `GracefulNodeShutdownBasedOnPodPriority` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), and setting `ShutdownGracePeriodByPodPriority` in the [kubelet config](/docs/reference/config-api/kubelet-config.v1beta1/) to the desired configuration containing the pod priority class values and their respective shutdown periods. {{< note >}} The ability to take Pod priority into account during graceful node shutdown was introduced as an Alpha feature in Kubernetes v1.23. In Kubernetes {{< skew currentVersion >}} the feature is Beta and is enabled by default. {{< /note >}} Metrics `graceful\_shutdown\_start\_time\_seconds` and `graceful\_shutdown\_end\_time\_seconds` are emitted under the kubelet subsystem to monitor node shutdowns. ## Non-graceful node shutdown handling {#non-graceful-node-shutdown} {{< feature-state feature\_gate\_name="NodeOutOfServiceVolumeDetach" >}} A node shutdown action may not be detected by kubelet's Node Shutdown Manager, either because the command does not trigger the inhibitor locks mechanism used by kubelet or because of a user error, i.e., the ShutdownGracePeriod and ShutdownGracePeriodCriticalPods are not configured properly. Please refer to above section [Graceful Node Shutdown](#graceful-node-shutdown) for more details. When a node is shutdown but not detected by kubelet's Node Shutdown Manager, the pods that are part of a {{< glossary\_tooltip text="StatefulSet" term\_id="statefulset" >}} will be stuck in terminating status on the shutdown node and cannot move to a new running node. This is because kubelet on the shutdown node is not available to delete the pods so the StatefulSet cannot create a new pod with the same name. If there are volumes used by the pods, the VolumeAttachments will not be deleted from the original shutdown node so the volumes used by these pods cannot be attached to a new running node. As a result, the application running on the StatefulSet cannot function properly. If the original shutdown node comes up, the pods will be deleted by kubelet and new pods will be created on a different running node. If the original shutdown node does not come up, these pods will be stuck in terminating status on the shutdown node forever. To mitigate the above situation, a user can manually add the taint `node.kubernetes.io/out-of-service` with either `NoExecute` or `NoSchedule` effect to a Node marking it out-of-service. If a Node is marked out-of-service with this taint, the pods on the node will be forcefully deleted if there are no matching tolerations on it and volume detach operations for the pods terminating on the node will happen immediately. This allows the Pods on the out-of-service node to recover quickly on a different node. During a non-graceful shutdown, Pods are terminated in the two phases: 1. Force delete the Pods that do not have matching `out-of-service` tolerations. 1. Immediately perform detach volume operation for such pods. {{< note >}} - Before adding the taint `node.kubernetes.io/out-of-service`, it should be verified that the node is already in shutdown or power off state (not in the middle of restarting). - The user is required to manually remove
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-shutdown.md
[ 0.024070682004094124, 0.04631830006837845, 0.05518294870853424, -0.008361442014575005, -0.07611869275569916, 0.05190674960613251, -0.04489189386367798, -0.016011841595172882, 0.08708833903074265, 0.04922070354223251, -0.020242657512426376, -0.03181929513812065, -0.058777738362550735, -0.04969504848122597, 0.009105078876018524, -0.009324673563241959, 0.0194089412689209, -0.014206206426024437, -0.10771022737026215, -0.00495585473254323, 0.04237467050552368, -0.016492731869220734, 0.01518002338707447, 0.06625635921955109, -0.057296134531497955, -0.014175347052514553, -0.030969370156526566, -0.03000837378203869, 0.015839971601963043, -0.019421759992837906, -0.09907004237174988, -0.02002931758761406, 0.07393491268157959, 0.01164743397384882, 0.03133371099829674, 0.04358106851577759, 0.02413383685052395, -0.01895034685730934, 0.013502468355000019, -0.023939652368426323, -0.02058870531618595, -0.05664295703172684, -0.07940632104873657, 0.01017144974321127, -0.012186164036393166, 0.05144674703478813, -0.05901392176747322, -0.06843571364879608, -0.004775863140821457, -0.046995628625154495, 0.005251571536064148, -0.07524603605270386, 0.08495955169200897, 0.0442044660449028, 0.0818217545747757, 0.12551987171173096, 0.03756984695792198, 0.010820846073329449, 0.10108666867017746, 0.019099313765764236, -0.05052811652421951, -0.05898667499423027, -0.015980159863829613, -0.026166662573814392, 0.006376570090651512, -0.002931883791461587, -0.008559077978134155, 0.01379129197448492, 0.02965187467634678, 0.05036858096718788, 0.10206304490566254, 0.013421365059912205, 0.05006596818566322, 0.03851886838674545, -0.009565554559230804, 0.020501144230365753, -0.028148483484983444, 0.05783797428011894, -0.05294698476791382, -0.09730806946754456, 0.005954586900770664, 0.010602876543998718, 0.04355978965759277, 0.011486508883535862, -0.05411659553647041, -0.0448254719376564, 0.03594136983156204, -0.03712880238890648, -0.007869063876569271, 0.03998103737831116, -0.027295680716633797, 0.005369456484913826, 0.016620436683297157, -0.07052037119865417, -0.0004454786831047386, -0.01580927148461342, 0.010668599978089333, 0.023247504606842995, -0.004936400335282087, -0.02313518151640892, -0.012730066664516926, 0.0006470237858593464, -0.08577501028776169, -0.0261917132884264, 0.10201521962881088, -0.05052753910422325, -0.04881162568926811, -0.04668836295604706, 0.048305027186870575, -0.006434478331357241, 0.008884837850928307, -0.04101851209998131, -0.02369341440498829, 0.03394287824630737, -0.018823819234967232, 0.09712012857198715, 0.05286424234509468, 0.015124068595468998, 0.07808847725391388, -0.027462642639875412, 0.05539105087518692, -0.03581549599766731, -0.0020115540828555822, -0.0875476524233818, -0.035782888531684875, 0.0530351847410202, -0.0030327525455504656, 6.031617634412626e-34, 0.05190085992217064, -0.12409065663814545, -0.027016645297408104, -0.031112156808376312, 0.019261298701167107, -0.12941454350948334, -0.05676725134253502, -0.002760677132755518, 0.021954726427793503, 0.005020680837333202, -0.047232650220394135, 0.015187823213636875, -0.013532470911741257, -0.01606203429400921, 0.053512271493673325, -0.0284982118755579, -0.04774514585733414, 0.011314419098198414, 0.034550443291664124, -0.03231145069003105, 0.10226792842149734, -0.04516562074422836, -0.07338321954011917, -0.008256536908447742, 0.05303453281521797, 0.018829593434929848, 0.03766384348273277, -0.08226165920495987, -0.04644590988755226, 0.03496239706873894, -0.025297164916992188, -0.016755053773522377, -0.005590720567852259, 0.019842831417918205, -0.14911161363124847, -0.02635764516890049, -0.0441204272210598, 0.07983118295669556, -0.00925423763692379, -0.06882228702306747, -0.018530240282416344, -0.0325559563934803, -0.05575723573565483, -0.03148359805345535, 0.03293784707784653, -0.04705677181482315, 0.07229437679052353, -0.04094475507736206, 0.0288864616304636, 0.026165463030338287, 0.008899918757379055, -0.004565178416669369, 0.004550854209810495, 0.0027164930943399668, 0.005978096276521683, -0.0064479089342057705, 0.11533871293067932, 0.035476960241794586, -0.06221625208854675, 0.02466784603893757, -0.014052735641598701, 0.012730932794511318, 0.0400092788040638, -0.020672239363193512, -0.0036470298655331135, 0.07781975716352463, -0.04978429898619652, -0.005557149648666382, -0.024350114166736603, -0.04064885899424553, 0.001580549287609756, 0.05617966502904892, -0.04953734949231148, -0.07562390714883804, 0.023860955610871315, -0.015667008236050606, 0.05642937123775482, 0.010641894303262234, -0.10437335073947906, -0.02291709929704666, 0.06962169706821442, -0.043824322521686554, -0.005974217783659697, 0.010625838302075863, 0.03760764002799988, 0.022448347881436348, 0.07086757570505142, 0.018162952736020088, -0.0940421000123024, 0.03441089019179344, -0.04903709515929222, -0.023003054782748222, -0.012138803489506245, 0.07295314222574234, -0.06761950999498367, -1.193675023996685e-33, 0.12132371217012405, 0.036906883120536804, 0.037645407021045685, 0.05658520758152008, 0.035432811826467514, 0.02336318977177143, -0.07537513971328735, 0.060608573257923126, -0.04764954000711441, 0.058005690574645996, 0.016514848917722702, -0.03851593658328056, -0.022096026688814163, 0.015119528397917747, -0.032135259360075, 0.013273723423480988, 0.009678002446889877, -0.08800774067640305, -0.004517856519669294, 0.0038007658440619707, 0.017689716070890427, 0.014833003282546997, -0.0558309480547905, 0.026921922340989113, -0.05304437130689621, -0.006096470635384321, -0.008030039258301258, 0.031810905784368515, 0.02008676528930664, -0.045410558581352234, -0.037374164909124374, -0.10798615962266922, -0.011248412542045116, 0.06076548993587494, -0.010852222330868244, -0.03197646886110306, -0.11630649119615555, 0.04636075347661972, -0.02662140317261219, 0.09895341843366623, 0.062174052000045776, 0.029196519404649734, -0.06394810229539871, -0.005865746643394232, -0.04773423448204994, 0.03348131105303764, 0.03576241061091423, -0.016048608347773552, -0.010407141409814358, -0.07750165462493896, -0.01673218607902527, -0.023370645940303802, 0.013313072733581066, 0.1387687772512436, 0.030701421201229095, -0.014661135151982307, 0.06471269577741623, -0.006343407090753317, -0.06783823668956757, 0.014964960515499115, 0.045938052237033844, -0.06290154159069061, 0.12867499887943268, 0.03197957202792168, -0.007639079354703426, -0.0016726554604247212, 0.034366022795438766, 0.10328700393438339, 0.0020708958618342876, -0.004274136386811733, 0.062449514865875244, 0.011507491581141949, 0.042246006429195404, 0.021331021562218666, -0.07734455168247223, 0.018995311111211777, 0.0009136679000221193, 0.008381140418350697, 0.08351606875658035, 0.008877316489815712, -0.04286419600248337, 0.06625093519687653, -0.051343660801649094, 0.030258970335125923, 0.010906399227678776, 0.07288360595703125, 0.07345174252986908, 0.10333714634180069, 0.11225443333387375, 0.0926930382847786, 0.03442759811878204, 0.07505069673061371, 0.05505489557981491, 0.09743693470954895, -0.04289425164461136, -4.527251107333541e-8, 0.08414270728826523, -0.08403488993644714, 0.0001454417797503993, 0.06287293881177902, 0.06955280900001526, -0.06519012898206711, -0.025672977790236473, 0.053814832121133804, -0.09231019765138626, 0.012556620873510838, 0.006495448760688305, 0.059196945279836655, -0.015209817327558994, -0.009356056340038776, -0.00555813405662775, -0.029609713703393936, 0.001457743113860488, -0.01096249371767044, 0.02242378145456314, -0.02227156050503254, -0.11258986592292786, -0.08902730792760849, 0.060748159885406494, -0.013323635794222355, -0.007185373455286026, 0.08289280533790588, 0.08843231946229935, -0.026506207883358, 0.05332329124212265, 0.021074632182717323, -0.0701742023229599, 0.042865511029958725, -0.13308018445968628, 0.02905617095530033, -0.008329318836331367, 0.04650642350316048, -0.13091836869716644, 0.031543880701065063, 0.0329962894320488, 0.0397569015622139, -0.006002000533044338, -0.1480753868818283, -0.11471780389547348, 0.024216027930378914, 0.020471801981329918, 0.024675380438566208, -0.04203290864825249, -0.001757818041369319, 0.020705342292785645, 0.05574078485369682, -0.05986529216170311, -0.0381254181265831, 0.01065411139279604, 0.03854094445705414, -0.05197513476014137, 0.007898220792412758, -0.047128722071647644, -0.06686990708112717, -0.010361477732658386, -0.02931603044271469, 0.03259676694869995, -0.037007350474596024, -0.037490833550691605, 0.024242527782917023 ]
0.083613
matching `out-of-service` tolerations. 1. Immediately perform detach volume operation for such pods. {{< note >}} - Before adding the taint `node.kubernetes.io/out-of-service`, it should be verified that the node is already in shutdown or power off state (not in the middle of restarting). - The user is required to manually remove the out-of-service taint after the pods are moved to a new node and the user has checked that the shutdown node has been recovered since the user was the one who originally added the taint. {{< /note >}} ### Forced storage detach on timeout {#storage-force-detach-on-timeout} In any situation where a pod deletion has not succeeded for 6 minutes, kubernetes will force detach volumes being unmounted if the node is unhealthy at that instant. Any workload still running on the node that uses a force-detached volume will cause a violation of the [CSI specification](https://github.com/container-storage-interface/spec/blob/master/spec.md#controllerunpublishvolume), which states that `ControllerUnpublishVolume` "\*\*must\*\* be called after all `NodeUnstageVolume` and `NodeUnpublishVolume` on the volume are called and succeed". In such circumstances, volumes on the node in question might encounter data corruption. The forced storage detach behaviour is optional; users might opt to use the "Non-graceful node shutdown" feature instead. Force storage detach on timeout can be disabled by setting the `disable-force-detach-on-timeout` config field in `kube-controller-manager`. Disabling the force detach on timeout feature means that a volume that is hosted on a node that is unhealthy for more than 6 minutes will not have its associated [VolumeAttachment](/docs/reference/kubernetes-api/config-and-storage-resources/volume-attachment-v1/) deleted. After this setting has been applied, unhealthy pods still attached to volumes must be recovered via the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure mentioned above. {{< note >}} - Caution must be taken while using the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure. - Deviation from the steps documented above can result in data corruption. {{< /note >}} ## {{% heading "whatsnext" %}} Learn more about the following: - Blog: [Non-Graceful Node Shutdown](/blog/2023/08/16/kubernetes-1-28-non-graceful-node-shutdown-ga/). - Cluster Architecture: [Nodes](/docs/concepts/architecture/nodes/).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/node-shutdown.md
[ 0.0005279184551909566, 0.0549805611371994, 0.08725173026323318, 0.029335992410779, 0.04723621532320976, -0.0187209602445364, 0.01792796701192856, -0.02751694805920124, 0.0780952200293541, 0.07595718652009964, 0.011347910389304161, 0.047226157039403915, 0.007185736671090126, 0.019539935514330864, -0.017892420291900635, -0.029375016689300537, 0.060720887035131454, 0.024788575246930122, -0.025470377877354622, 0.02939450740814209, 0.008163883350789547, 0.017566634342074394, -0.018570972606539726, 0.032416507601737976, -0.023108428344130516, -0.018013548105955124, -0.09096746146678925, -0.0621786005795002, 0.030277352780103683, 0.0012638645712286234, -0.049255069345235825, -0.0018717494094744325, -0.042787618935108185, -0.0289617832750082, 0.06890379637479782, 0.10164766758680344, -0.002936854725703597, -0.030828256160020828, -0.07141094654798508, 0.03113728016614914, 0.04589438810944557, -0.00576467951759696, -0.07940168678760529, -0.011946535669267178, -0.04675069823861122, 0.02498720772564411, -0.02553614415228367, -0.09461832791566849, 0.004109440837055445, -0.0038200130220502615, 0.00913230236619711, -0.03765302523970604, 0.08217277377843857, 0.12627525627613068, 0.05339775234460831, 0.007295612245798111, 0.05754245072603226, -0.00032817292958498, 0.036180831491947174, 0.05015779286623001, 0.0595049224793911, -0.0003034090914297849, 0.0415278859436512, -0.048941854387521744, 0.1132357195019722, 0.055890727788209915, 0.05343163385987282, -0.024513540789484978, -0.01939421147108078, 0.025664720684289932, 0.08725373446941376, 0.024697396904230118, -0.021657362580299377, 0.01240526046603918, -0.0071358587592840195, 0.04780734330415726, -0.018282676115632057, 0.017639407888054848, -0.03029787726700306, -0.039978597313165665, -0.013901972211897373, -0.00039319792995229363, 0.00047706509940326214, -0.01836460642516613, -0.14829128980636597, -0.004016810096800327, -0.07603546977043152, -0.0465833805501461, 0.0483924001455307, -0.005857089534401894, 0.011363192461431026, 0.07383093237876892, 0.05381272733211517, -0.06686929613351822, 0.06959997117519379, -0.08734079450368881, -0.004863282665610313, 0.049599312245845795, -0.002161996904760599, -0.004868402611464262, 0.015195545740425587, 0.04836885631084442, -0.06782996654510498, -0.019709855318069458, 0.08985007554292679, -0.08492208272218704, -0.03046252951025963, -0.054467082023620605, -0.0023174965754151344, 0.009346353821456432, 0.06316973268985748, 0.07385272532701492, 0.011816166341304779, 0.07212980091571808, 0.01705859787762165, 0.08191591501235962, -0.005805262830108404, 0.026290496811270714, 0.008151940070092678, 0.04378300905227661, 0.08639092743396759, -0.05286068841814995, -0.0035631891805678606, 0.00034124526428058743, -0.04087729752063751, -0.005491744261234999, 0.011977032758295536, 3.185419978731499e-33, 0.009610848501324654, -0.10061269998550415, 0.018418284133076668, 0.06361733376979828, 0.09170006960630417, -0.15238676965236664, -0.044093433767557144, -0.03799927607178688, 0.004640537779778242, -0.0037990089040249586, -0.0711069256067276, 0.08387238532304764, -0.018219953402876854, -0.07935942709445953, 0.025519713759422302, -0.06639747321605682, 0.021704012528061867, -0.0043145823292434216, 0.055745918303728104, -0.04523881897330284, 0.12885820865631104, -0.05295133218169212, -0.03193381428718567, 0.016032960265874863, 0.01640876941382885, -0.022040843963623047, -0.01489217672497034, -0.0710267499089241, 0.011974270455539227, 0.031182220205664635, -0.07944672554731369, 0.018387123942375183, 0.024562807753682137, 0.05303431674838066, -0.14141418039798737, -0.07363313436508179, -0.05445146560668945, 0.02517864853143692, -0.11028445512056351, -0.08397071808576584, 0.04235248267650604, 0.02104712463915348, -0.03819718956947327, 0.02971583791077137, 0.028805691748857498, -0.12462494522333145, 0.03347620740532875, -0.12109198421239853, 0.036375872790813446, 0.021093938499689102, 0.020904066041111946, -0.021266520023345947, 0.012877635657787323, -0.05413496494293213, -0.04348563775420189, 0.00280511612072587, 0.06460801512002945, -0.0534164160490036, -0.048998862504959106, 0.06864341348409653, -0.02984757162630558, 0.023088540881872177, 0.029405981302261353, -0.007894421927630901, -0.01225998718291521, 0.020549291744828224, -0.030971596017479897, -0.0021565575152635574, -0.020570069551467896, -0.046017296612262726, -0.08726077526807785, 0.08305934071540833, -0.010138791054487228, -0.013256683014333248, -0.07312660664319992, -0.07128925621509552, -0.004176392685621977, -0.02419269271194935, -0.09890817105770111, -0.03690619766712189, 0.03878020867705345, -0.08462207764387131, 0.0032261796295642853, 0.09870021045207977, 0.014111233875155449, -0.02974015660583973, -0.003706577466800809, -0.024786999449133873, -0.05953961983323097, 0.011727933771908283, 0.017566734924912453, -0.0012498440919443965, 0.018336590379476547, -0.026612842455506325, -0.036201272159814835, -3.374672732503964e-33, 0.03691168874502182, -0.03384743258357048, -0.029810508713126183, 0.008288776502013206, 0.005244038999080658, -0.0008282175986096263, -0.06857897341251373, 0.10266029089689255, -0.04104384779930115, -0.04804997891187668, -0.07598549872636795, -0.05312593653798103, -0.008675510995090008, 0.024656113237142563, -0.10432661324739456, -0.009762288071215153, -0.03966420888900757, -0.08111351728439331, -0.0462348610162735, 0.07172607630491257, 0.022420117631554604, -0.02114371582865715, 0.07131073623895645, 0.004286744631826878, -0.04072292521595955, 0.04154125601053238, 0.0006939939339645207, 0.03560216352343559, -0.05005929619073868, -0.06949011236429214, -0.0019912156276404858, -0.10845449566841125, 0.06798248738050461, -0.0006295903003774583, 0.03860703483223915, -0.05097314342856407, -0.05417180806398392, 0.06491846591234207, -0.017689712345600128, -0.004226740915328264, 0.060590703040361404, 0.07247321307659149, -0.05394966900348663, -0.013575604185461998, -0.048985451459884644, 0.0475953072309494, 0.0073171197436749935, -0.04844585433602333, 0.029264522716403008, -0.021139683201909065, 0.012084892019629478, -0.025652099400758743, -0.004136138595640659, 0.11517316848039627, -0.016881193965673447, 0.004328614100813866, 0.06319482624530792, 0.037542279809713364, -0.045921966433525085, 0.02770003117620945, 0.08035968989133835, -0.05627458915114403, 0.026432082056999207, 0.018509743735194206, 0.025761771947145462, -0.046076029539108276, -0.0035108765587210655, 0.07841596752405167, -0.0016454190481454134, 0.0119804497808218, 0.07728675752878189, 0.04177580028772354, 0.06556781381368637, 0.0402996689081192, 0.024397648870944977, -0.04092923924326897, -0.037758100777864456, -0.1382702887058258, 0.041222475469112396, -0.012434727512300014, -0.11289872974157333, 0.055506765842437744, -0.09619836509227753, 0.03126046434044838, 0.06408277899026871, 0.012427286244928837, 0.03856448456645012, 0.07733713835477829, 0.034205347299575806, 0.05479751154780388, -0.023962100967764854, 0.00269216182641685, -0.0275722648948431, 0.07279263436794281, -0.005547448061406612, -5.383382983836782e-8, 0.052673887461423874, 0.02464720793068409, -0.026942498981952667, 0.08216923475265503, 0.04346659779548645, -0.056892212480306625, 0.04597806558012962, 0.04639081284403801, -0.05176601558923721, 0.014151757583022118, 0.039317794144153595, 0.045116305351257324, -0.013652297668159008, -0.04628254100680351, -0.019993051886558533, -0.009872487746179104, 0.003305194666609168, 0.019917935132980347, -0.017449110746383667, -0.05838022008538246, -0.07517433166503906, -0.039083778858184814, 0.004584312904626131, 0.04250204190611839, 0.0030751447193324566, 0.0675242468714714, 0.025853445753455162, 0.015178370289504528, 0.06743206828832626, -0.007330130320042372, -0.062370169907808304, -0.024687467142939568, -0.04259265214204788, 0.0899287611246109, -0.05449071153998375, 0.12306167185306549, -0.10836508870124817, 0.015300613828003407, 0.04711056500673294, 0.09640783071517944, -0.04073864966630936, 0.008075426332652569, -0.08123821765184402, 0.033598482608795166, 0.025789637118577957, 0.019457830116152763, -0.04446003958582878, 0.10382610559463501, -0.02199595235288143, 0.008517148904502392, -0.007754117250442505, -0.06680084764957428, -0.02583165466785431, 0.09041587263345718, 0.0030060189310461283, -0.011388704180717468, -0.00027653545839712024, 0.01245653536170721, 0.0027184460777789354, 0.04616042226552963, 0.0259377621114254, 0.0009065133053809404, 0.004778004717081785, -0.03899887576699257 ]
0.156185
In Kubernetes, observability is the process of collecting and analyzing metrics, logs, and tracesβ€”often referred to as the three pillars of observabilityβ€”in order to obtain a better understanding of the internal state, performance, and health of the cluster. Kubernetes control plane components, as well as many add-ons, generate and emit these signals. By aggregating and correlating them, you can gain a unified picture of the control plane, add-ons, and applications across the cluster. Figure 1 outlines how cluster components emit the three primary signal types. {{< mermaid >}} flowchart LR A[Cluster components] --> M[Metrics pipeline] A --> L[Log pipeline] A --> T[Trace pipeline] M --> S[(Storage and analysis)] L --> S T --> S S --> O[Operators and automation] {{< /mermaid >}} \*Figure 1. High-level signals emitted by cluster components and their consumers.\* ## Metrics Kubernetes components emit metrics in [Prometheus format](https://prometheus.io/docs/instrumenting/exposition\_formats/) from their `/metrics` endpoints, including: - kube-controller-manager - kube-proxy - kube-apiserver - kube-scheduler - kubelet The kubelet also exposes metrics at `/metrics/cadvisor`, `/metrics/resource`, and `/metrics/probes`, and add-ons such as [kube-state-metrics](/docs/concepts/cluster-administration/kube-state-metrics/) enrich those control plane signals with Kubernetes object status. A typical Kubernetes metrics pipeline periodically scrapes these endpoints and stores the samples in a time series database (for example with Prometheus). See the [system metrics guide](/docs/concepts/cluster-administration/system-metrics/) for details and configuration options. Figure 2 outlines a common Kubernetes metrics pipeline. {{< mermaid >}} flowchart LR C[Cluster components] --> P[Prometheus scraper] P --> TS[(Time series storage)] TS --> D[Dashboards and alerts] TS --> A[Automated actions] {{< /mermaid >}} \*Figure 2. Components of a typical Kubernetes metrics pipeline.\* For multi-cluster or multi-cloud visibility, distributed time series databases (for example Thanos or Cortex) can complement Prometheus. See [Common observability tools - metrics tools](#metrics-tools) for metrics scrapers and time series databases. #### {{% heading "seealso" %}} - [System metrics for Kubernetes components](/docs/concepts/cluster-administration/system-metrics/) - [Resource usage monitoring with metrics-server](/docs/tasks/debug/debug-cluster/resource-usage-monitoring/) - [kube-state-metrics concept](/docs/concepts/cluster-administration/kube-state-metrics/) - [Resource metrics pipeline overview](/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/) ## Logs Logs provide a chronological record of events inside applications, Kubernetes system components, and security-related activities such as audit logging. Container runtimes capture a containerized application’s output from standard output (`stdout`) and standard error (`stderr`) streams. While runtimes implement this differently, the integration with the kubelet is standardized through the \_CRI logging format\_, and the kubelet makes these logs available through `kubectl logs`. ![Node-level logging](/images/docs/user-guide/logging/logging-node-level.png) \*Figure 3a. Node-level logging architecture.\* System component logs capture events from the cluster and are often useful for debugging and troubleshooting. These components are classified in two different ways: those that run in a container and those that do not. For example, the `kube-scheduler` and `kube-proxy` usually run in containers, whereas the `kubelet` and the container runtime run directly on the host. - On machines with `systemd`, the kubelet and container runtime write to journald. Otherwise, they write to `.log` files in the `/var/log` directory. - System components that run inside containers always write to `.log` files in `/var/log`, bypassing the default container logging mechanism. System component and container logs stored under `/var/log` require log rotation to prevent uncontrolled growth. Some cluster provisioning scripts install log rotation by default; verify your environment and adjust as needed. See the [system logs reference](/docs/concepts/cluster-administration/system-logs/) for details on locations, formats, and configuration options. Most clusters run a node-level logging agent (for example, Fluent Bit or Fluentd) that tails these files and forwards entries to a central log store. The [logging architecture guidance](/docs/concepts/cluster-administration/logging/) explains how to design such pipelines, apply retention, and log flows to backends. Figure 3 outlines a common log aggregation pipeline. {{< mermaid >}} flowchart LR subgraph Sources A[Application stdout / stderr] B[Control plane logs] C[Audit records] end A --> N[Node log agent]
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/observability.md
[ 0.007982481271028519, -0.04428042471408844, 0.01217363215982914, 0.005678415298461914, 0.020589198917150497, -0.002341496990993619, -0.009273560717701912, -0.04515764117240906, 0.07822932302951813, 0.022383086383342743, -0.022729787975549698, -0.07990945875644684, -0.02270881086587906, -0.002549662720412016, -0.03536616265773773, 0.023341119289398193, 0.050064392387866974, -0.04446259140968323, -0.07035426795482635, -0.02362082712352276, 0.020406045019626617, 0.003254815237596631, -0.04479403793811798, 0.0383220873773098, -0.06941904127597809, 0.0328076146543026, -0.052783649414777756, -0.038847699761390686, 0.06577050685882568, -0.0512733981013298, -0.06586616486310959, -0.012271737679839134, 0.047574713826179504, 0.07035572826862335, -0.04618729278445244, 0.0603548102080822, 0.09768449515104294, -0.010145430453121662, -0.067255899310112, 0.057226452976465225, 0.02868398278951645, -0.06405895203351974, -0.04887605085968971, -0.07653863728046417, -0.03785928711295128, -0.030520036816596985, -0.061834100633859634, -0.11553103476762772, -0.09254666417837143, -0.005341653246432543, 0.031973712146282196, -0.032282572239637375, 0.0453602559864521, 0.10340231657028198, 0.08780764043331146, -0.00555688189342618, -0.0010081703076139092, -0.04098961129784584, 0.044626545161008835, -0.09840552508831024, 0.022289635613560677, 0.018997536972165108, -0.042997729033231735, 0.006864091381430626, -0.004625845234841108, 0.012820488773286343, 0.02164979837834835, 0.05054177716374397, 0.04820092394948006, 0.006662166211754084, -0.026154398918151855, -0.06130886822938919, -0.03531775623559952, -0.045390065759420395, 0.012117749080061913, 0.05415835976600647, -0.0023606675677001476, 0.01184896845370531, 0.012808790430426598, -0.09445910900831223, 0.011050967499613762, 0.03285955265164375, -0.021422190591692924, 0.017936227843165398, -0.03515308350324631, 0.05145107954740524, -0.022983558475971222, -0.05109656974673271, 0.051158878952264786, 0.03794766962528229, -0.059768807142972946, -0.015494493767619133, 0.007123352959752083, -0.07694835215806961, 0.08711427450180054, -0.03241077437996864, -0.02514205314218998, -0.03268434479832649, 0.165087029337883, 0.021785223856568336, 0.005601685494184494, 0.035931847989559174, -0.02320428006350994, 0.029572952538728714, -0.0012836673995479941, -0.08018244802951813, 0.005160562694072723, 0.035257987678050995, 0.05462649092078209, 0.04130091890692711, 0.02363590896129608, 0.010744140483438969, 0.02187124826014042, 0.007224240340292454, 0.03577128425240517, 0.01504820678383112, -0.008084838278591633, -0.019472317770123482, 0.00007466727402061224, 0.023168105632066727, 0.05765823274850845, -0.08321511000394821, 0.053148552775382996, 0.054469261318445206, 0.07255648821592331, 0.04620163142681122, 0.02705233357846737, 9.417374727631867e-34, 0.020221902057528496, -0.04810043051838875, 0.008006347343325615, -0.013164127245545387, 0.031726960092782974, 0.012691880576312542, -0.07046187669038773, -0.07764864712953568, 0.03622085601091385, 0.01753208227455616, -0.09137220680713654, 0.12773151695728302, -0.01583886705338955, -0.03498572111129761, 0.11519429832696915, -0.022089434787631035, -0.023531142622232437, 0.007526660803705454, -0.014369265176355839, 0.015455225482583046, 0.05416104942560196, -0.1055334135890007, -0.05237531661987305, -0.03005337528884411, 0.05025961250066757, -0.01559898629784584, 0.04811013117432594, 0.05828621983528137, -0.08873461931943893, 0.0405915342271328, 0.038218144327402115, -0.033671390265226364, -0.030897635966539383, 0.017642725259065628, -0.11297646909952164, -0.018122905865311623, -0.03999181091785431, -0.016982167959213257, -0.03269214928150177, -0.048029087483882904, -0.0235817339271307, -0.06977139413356781, -0.03862989693880081, -0.0613604336977005, -0.0034925676882267, -0.01044061966240406, -0.024708224460482597, -0.010960491374135017, 0.10140392184257507, 0.01328287087380886, 0.004550913814455271, -0.03221229836344719, 0.06749746948480606, -0.04403507336974144, 0.07197419553995132, 0.06942488998174667, 0.0867561623454094, -0.0554472953081131, -0.04070375859737396, 0.12050380557775497, -0.0634223222732544, 0.02361704409122467, -0.008581265807151794, -0.0383354090154171, 0.052127525210380554, 0.05135461688041687, 0.023238573223352432, 0.05941697955131531, 0.005438590422272682, -0.031081119552254677, -0.09146653115749359, 0.03417719528079033, -0.04383144900202751, 0.010428311303257942, 0.03199709579348564, -0.04337077587842941, 0.010943146422505379, 0.06089836359024048, -0.0921037420630455, 0.05584200471639633, -0.1158430427312851, -0.0252796970307827, 0.0034234493505209684, 0.08343387395143509, 0.001274265581741929, 0.000362712045898661, -0.05515974014997482, -0.016581732779741287, -0.10479853302240372, 0.022979892790317535, -0.03658188879489899, 0.023813974112272263, 0.006454092916101217, 0.0316961295902729, -0.1196763813495636, -2.6620094458507824e-33, -0.0021639580372720957, 0.08101120591163635, -0.052839312702417374, 0.024231405928730965, -0.0070563796907663345, -0.005822565406560898, -0.022323140874505043, 0.09081901609897614, -0.012596008367836475, -0.04462853819131851, -0.06170835718512535, 0.0075668939389288425, 0.019778838381171227, 0.031447067856788635, -0.012200569733977318, -0.0025210424792021513, -0.026792000979185104, -0.03662495315074921, 0.020625287666916847, -0.04537464305758476, 0.0635482519865036, 0.002089513698592782, -0.02437235601246357, -0.02959078922867775, -0.020647862926125526, 0.06988982856273651, 0.016596021130681038, 0.03722481429576874, -0.0381796658039093, -0.059369202703237534, -0.01686115562915802, -0.04836897552013397, 0.006173445377498865, 0.0421452522277832, 0.022638611495494843, -0.06619548797607422, 0.09916418790817261, 0.032528143376111984, -0.029204484075307846, -0.050600480288267136, -0.0007696803077124059, 0.09983444958925247, -0.062376055866479874, -0.02342691272497177, -0.06154528632760048, 0.07780569046735764, 0.017710471525788307, 0.026000892743468285, 0.005401992239058018, -0.10814063996076584, 0.014769471250474453, 0.041265130043029785, 0.010713271796703339, 0.13928942382335663, -0.0778125450015068, 0.08434882014989853, 0.10671091824769974, 0.05941452085971832, 0.011015208438038826, -0.009622673504054546, 0.03651062026619911, -0.1068999171257019, 0.061689380556344986, 0.05758025497198105, 0.01827351003885269, -0.020569106563925743, 0.07330268621444702, 0.018492713570594788, -0.06414539366960526, 0.0346963033080101, 0.023505831137299538, -0.013682725839316845, -0.022059746086597443, -0.000861670239828527, 0.007849320769309998, -0.0402802936732769, -0.02894275262951851, -0.0984768196940422, -0.0035447205882519484, 0.01863572560250759, -0.016549212858080864, 0.006758179981261492, -0.016113046556711197, -0.0042686318047344685, 0.09969919174909592, 0.04248280078172684, 0.023200787603855133, -0.01743919961154461, 0.04954515025019646, 0.044962961226701736, -0.08419770002365112, 0.05071745812892914, -0.12023835629224777, 0.07734225690364838, -0.04289109632372856, -5.5448545310810005e-8, -0.03501347452402115, -0.038618091493844986, -0.040437109768390656, -0.05186104029417038, -0.007713963743299246, 0.01782780885696411, -0.01919330283999443, -0.005996946711093187, -0.04494995251297951, -0.0460137277841568, 0.0017116181552410126, 0.020865341648459435, -0.06653594225645065, -0.020299790427088737, 0.07908634841442108, -0.05619336664676666, -0.027545560151338577, 0.010199779644608498, -0.05239196494221687, -0.08409625291824341, -0.008066447451710701, -0.006413265131413937, -0.03198552504181862, 0.006689032539725304, 0.018554937094449997, 0.004155047237873077, 0.062297504395246506, 0.06145760416984558, 0.0162629596889019, -0.02144252136349678, 0.00048557401169091463, 0.07593892514705658, 0.010717526078224182, 0.07059681415557861, -0.03413974866271019, 0.06031116843223572, -0.11603409051895142, 0.011514057405292988, -0.01390300877392292, 0.11112190783023834, -0.014561648480594158, -0.01836235262453556, -0.07856772094964981, 0.02172909863293171, 0.061293065547943115, 0.10339908301830292, -0.020376965403556824, 0.03373393416404724, -0.015814807265996933, 0.043535612523555756, 0.04606011137366295, -0.060351889580488205, -0.0054745422676205635, 0.06619063764810562, -0.057423047721385956, -0.06938034296035767, 0.016869405284523964, -0.11555275321006775, 0.07779952883720398, 0.07699932903051376, 0.025838784873485565, 0.04743700101971626, 0.07115437835454941, -0.04856275022029877 ]
0.229865
central log store. The [logging architecture guidance](/docs/concepts/cluster-administration/logging/) explains how to design such pipelines, apply retention, and log flows to backends. Figure 3 outlines a common log aggregation pipeline. {{< mermaid >}} flowchart LR subgraph Sources A[Application stdout / stderr] B[Control plane logs] C[Audit records] end A --> N[Node log agent] B --> N C --> N N --> L[Central log store] L --> Q[Dashboards, alerting, SIEM] {{< /mermaid >}} \*Figure 3. Components of a typical Kubernetes logs pipeline.\* See [Common observability tools - logging tools](#logging-tools) for logging agents and central log stores. #### {{% heading "seealso" %}} - [Logging architecture](/docs/concepts/cluster-administration/logging/) - [System logs](/docs/concepts/cluster-administration/system-logs/) - [Logging tasks and tutorials](/docs/tasks/debug/logging/) - [Configure audit logging](/docs/tasks/debug/debug-cluster/audit/) ## Traces Traces capture how requests moves across Kubernetes components and applications, linking latency, timing and relationships between operations.By collecting traces, you can visualize end-to-end request flow, diagnose performance issues, and identify bottlenecks or unexpected interactions in the control plane, add-ons, or applications. Kubernetes {{< skew currentVersion >}} can export spans over the [OpenTelemetry Protocol](/docs/concepts/cluster-administration/system-traces/) (OTLP), either directly via built-in gRPC exporters or by forwarding them through an OpenTelemetry Collector. The OpenTelemetry Collector receives spans from components and applications, processes them (for example by applying sampling or redaction), and forwards them to a tracing backend for storage and analysis. Figure 4 outlines a typical distributed tracing pipeline. {{< mermaid >}} flowchart LR subgraph Sources A[Control plane spans] B[Application spans] end A --> X[OTLP exporter] B --> X X --> COL[OpenTelemetry Collector] COL --> TS[(Tracing backend)] TS --> V[Visualization and analysis] {{< /mermaid >}} \*Figure 4. Components of a typical Kubernetes traces pipeline.\* See [Common observability tools - tracing tools](#tracing-tools) for tracing collectors and backends. #### {{% heading "seealso" %}} - [System traces for Kubernetes components](/docs/concepts/cluster-administration/system-traces/) - [OpenTelemetry Collector getting started guide](https://opentelemetry.io/docs/collector/getting-started/) - [Monitoring and tracing tasks](/docs/tasks/debug/monitoring/) ## Common observability tools {{% thirdparty-content %}} Note: This section links to third-party projects that provide observability capabilities required by Kubernetes. The Kubernetes project authors aren't responsible for these projects, which are listed alphabetically. To add a project to this list, read the [content guide](/docs/contribute/style/content-guide/) before submitting a change. ### Metrics tools - [Cortex](https://cortexmetrics.io/) offers horizontally scalable, long-term Prometheus storage. - [Grafana Mimir](https://grafana.com/oss/mimir/) is a Grafana Labs project that provides multi-tenant, horizontally scalable Prometheus-compatible storage. - [Prometheus](https://prometheus.io/) is the monitoring system that scrapes and stores metrics from Kubernetes components. - [Thanos](https://thanos.io/) extends Prometheus with global querying, downsampling, and object storage support. ### Logging tools - [Elasticsearch](https://www.elastic.co/elasticsearch/) delivers distributed log indexing and search. - [Fluent Bit](https://fluentbit.io/) collects and forwards container and node logs with a low resource footprint. - [Fluentd](https://www.fluentd.org/) routes and transforms logs to multiple destinations. - [Grafana Loki](https://grafana.com/oss/loki/) stores logs in a Prometheus-inspired, label-based format. - [OpenSearch](https://opensearch.org/) provides open source log indexing and search compatible with Elasticsearch APIs. ### Tracing tools - [Grafana Tempo](https://grafana.com/oss/tempo/) offers scalable, low-cost distributed tracing storage. - [Jaeger](https://www.jaegertracing.io/) captures and visualizes distributed traces for microservices. - [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) receives, processes, and exports telemetry data including traces. - [Zipkin](https://zipkin.io/) provides distributed tracing collection and visualization. ## {{% heading "whatsnext" %}} - Learn how to [collect resource usage metrics with metrics-server](/docs/tasks/debug/debug-cluster/resource-usage-monitoring/) - Explore [logging tasks and tutorials](/docs/tasks/debug/logging/) - Follow the [monitoring and tracing task guides](/docs/tasks/debug/monitoring/) - Review the [system metrics guide](/docs/concepts/cluster-administration/system-metrics/) for component endpoints and stability - Review the [common observability tools](#common-observability-tools) section for vetted third-party options
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/observability.md
[ 0.036999866366386414, -0.006375713273882866, 0.011724348179996014, 0.014822346158325672, 0.03348616510629654, -0.02885151095688343, -0.0033713786397129297, -0.0077064428478479385, 0.07161088287830353, 0.04314691945910454, -0.027332769706845284, -0.04162205010652542, -0.005606313701719046, 0.013299736194312572, 0.003613511100411415, 0.028419284150004387, -0.07857226580381393, 0.01568268984556198, -0.039320122450590134, -0.06608083099126816, 0.04157416895031929, 0.01741250418126583, -0.03973541408777237, 0.07407306879758835, -0.05932384356856346, 0.026305506005883217, -0.04576631635427475, -0.047099705785512924, 0.01581542380154133, -0.04345310106873512, -0.04578058049082756, 0.010347263887524605, 0.020813805982470512, 0.09924188256263733, -0.0054699331521987915, 0.04495245963335037, 0.061974409967660904, -0.04588746652007103, -0.044717177748680115, 0.046543627977371216, 0.060828402638435364, -0.0033560418523848057, -0.05106712132692337, -0.05930417776107788, -0.0544760525226593, -0.03526538982987404, -0.11630094796419144, -0.03834050893783569, -0.07221832871437073, 0.044581349939107895, 0.04878466948866844, -0.06612139195203781, 0.04290623217821121, 0.07464564591646194, -0.0017579315463081002, 0.07863093167543411, -0.016025179997086525, -0.039475247263908386, 0.04159949719905853, -0.0772324725985527, 0.03170020878314972, 0.011003139428794384, 0.0007866094820201397, -0.013021276332437992, -0.007513019256293774, -0.03360407426953316, 0.017954856157302856, 0.10096755623817444, 0.06490381807088852, -0.006637985352426767, -0.026973847299814224, -0.019921185448765755, -0.08125820010900497, -0.07184170186519623, -0.014632138423621655, 0.04608580097556114, 0.030060559511184692, 0.06596498191356659, -0.07147960364818573, -0.08148512244224548, -0.020899925380945206, 0.07096210867166519, 0.043333593755960464, 0.06526285409927368, -0.0548502579331398, -0.024894695729017258, -0.012823169119656086, -0.04486808553338051, 0.027445614337921143, -0.004710026551038027, -0.049287181347608566, -0.027841772884130478, 0.04495964199304581, -0.13129957020282745, 0.04023083671927452, 0.03586859628558159, -0.03940239176154137, 0.03911937028169632, 0.14432476460933685, -0.00658505829051137, 0.05288159102201462, 0.06011161208152771, 0.049001678824424744, -0.02680024690926075, 0.016793347895145416, -0.05424196645617485, -0.05298493802547455, 0.045582063496112823, 0.016291122883558273, 0.05044032260775566, -0.02437155321240425, 0.09061500430107117, 0.013017291203141212, 0.02889118902385235, 0.08861710876226425, 0.03245411813259125, -0.0029108927119523287, -0.05088161677122116, -0.008654817007482052, 0.07994422316551208, 0.10013407468795776, -0.02036449871957302, 0.02197672799229622, -0.0024443278089165688, 0.09365902841091156, 0.0958925411105156, 0.01228760089725256, 1.2225335939803645e-33, 0.05335807055234909, -0.0017926872242242098, 0.005892021581530571, -0.029229046776890755, 0.0646762102842331, 0.014027797617018223, -0.07022178173065186, -0.041542477905750275, -0.03897929564118385, 0.0021827269811183214, -0.15908704698085785, 0.12487483769655228, 0.0040414659306406975, -0.03182942792773247, 0.03237331286072731, -0.021146364510059357, -0.011929120868444443, 0.056016452610492706, 0.04689300060272217, -0.028210965916514397, 0.029669474810361862, -0.024995237588882446, -0.018988054245710373, 0.00005884407801204361, 0.05700395256280899, -0.0009502283646725118, 0.08409727364778519, -0.03049979731440544, -0.057356033474206924, 0.01628638245165348, 0.009535487741231918, -0.010151445865631104, 0.03360382467508316, -0.012761862017214298, -0.05477752164006233, 0.03175598382949829, -0.04808155447244644, 0.0031435724813491106, -0.044532641768455505, -0.07529206573963165, -0.019649848341941833, -0.01789199933409691, -0.052000053226947784, -0.06360068917274475, 0.014874436892569065, -0.04267995059490204, -0.04589027911424637, -0.005400795489549637, 0.07796976715326309, -0.021176937967538834, 0.04171060398221016, -0.045214392244815826, 0.029897540807724, -0.007684847339987755, 0.07647393643856049, 0.014341049827635288, 0.1358589380979538, -0.10109541565179825, -0.03325270116329193, 0.053620245307683945, -0.02140714041888714, -0.0028759727720171213, -0.006128828506916761, 0.03134676069021225, 0.01560053788125515, 0.037512607872486115, 0.07229249179363251, 0.09264560043811798, 0.006335875950753689, -0.07815820723772049, -0.053372226655483246, -0.00883586797863245, 0.02879933826625347, 0.024825138971209526, -0.005472714081406593, -0.031082088127732277, -0.04081271216273308, 0.01740531250834465, -0.11396367102861404, 0.047180838882923126, -0.04025520756840706, -0.10548576712608337, -0.02255360409617424, 0.10961209237575531, 0.03612206131219864, -0.05379651114344597, 0.027188194915652275, -0.01116778515279293, -0.060041770339012146, 0.06237321346998215, -0.05594409257173538, -0.015740729868412018, 0.025469554588198662, -0.0004223318537697196, -0.05426560342311859, -2.0064636133750477e-33, 0.02090015634894371, 0.06740502268075943, -0.004618420265614986, -0.015741948038339615, 0.0010489430278539658, -0.0015731287421658635, 0.02300315722823143, 0.022750766947865486, -0.015059834346175194, -0.03228217363357544, -0.09310703724622726, -0.04111688211560249, 0.019398340955376625, 0.014292244799435139, -0.02144949696958065, 0.04948561638593674, 0.004102030303329229, -0.05133984237909317, -0.021707620471715927, -0.03737306967377663, 0.0377693697810173, -0.038407422602176666, -0.03674887493252754, 0.04248133674263954, 0.00040886219358071685, 0.01785723678767681, 0.023151174187660217, -0.01181578915566206, -0.07800527662038803, -0.0726185068488121, -0.05258478596806526, -0.13971088826656342, 0.014314481988549232, -0.031357284635305405, 0.049202170222997665, -0.11426853388547897, 0.0002852731558959931, 0.05728789046406746, 0.003683343529701233, -0.020729832351207733, -0.009526515379548073, 0.04487794637680054, -0.021158553659915924, -0.03644480183720589, -0.04858021065592766, 0.05614602938294411, -0.030755065381526947, 0.004289729055017233, -0.026095466688275337, -0.04838308319449425, -0.09468945860862732, -0.03489592298865318, 0.01747152954339981, 0.08166041225194931, -0.07415538281202316, 0.061489079147577286, 0.06517847627401352, 0.07196935266256332, -0.04953103885054588, 0.0063903857953846455, 0.01896970346570015, -0.056599803268909454, 0.01383398286998272, 0.05873682722449303, -0.029519876465201378, -0.12643305957317352, 0.05173739418387413, -0.006066202186048031, -0.10233895480632782, 0.00627304520457983, 0.03136278688907623, -0.0040944600477814674, -0.003447392489761114, 0.10113364458084106, 0.023173918947577477, -0.002466080244630575, -0.03433813899755478, -0.09639307111501694, 0.008711741305887699, 0.017241884022951126, -0.06850261241197586, 0.03934966027736664, -0.05372975766658783, 0.021815545856952667, 0.07612324506044388, -0.023102305829524994, 0.049628905951976776, 0.04391726851463318, 0.06487437337636948, 0.027485406026244164, -0.06801094114780426, 0.019127152860164642, -0.09226825088262558, 0.01980603113770485, -0.034165941178798676, -4.650551232998623e-8, -0.0690973773598671, -0.044119931757450104, 0.002915328834205866, 0.04289785400032997, 0.07267212122678757, -0.016588158905506134, 0.039468925446271896, 0.15250623226165771, -0.04649525508284569, 0.008529046550393105, 0.011749419383704662, 0.0323568657040596, -0.09272552281618118, -0.0605127215385437, 0.06566231697797775, -0.04217894747853279, 0.05772029608488083, -0.043335579335689545, -0.024695001542568207, -0.0746353343129158, 0.010116222314536572, 0.013632421381771564, 0.0011801497312262654, 0.023043395951390266, -0.02911553345620632, -0.04046947881579399, 0.07922493666410446, 0.0915529802441597, -0.004040145315229893, -0.03654676675796509, 0.046483926475048065, 0.05199959874153137, -0.004709992092102766, 0.06171384081244469, -0.028464870527386665, 0.03763237223029137, -0.05442027747631073, 0.03711127117276192, -0.008171683177351952, 0.05699431151151657, -0.003910500556230545, -0.016062065958976746, -0.0069427695125341415, 0.005065152887254953, 0.023336490616202354, 0.030564337968826294, -0.053299400955438614, 0.026581760495901108, 0.05506779998540878, 0.0043298956006765366, -0.021706338971853256, -0.08940477669239044, 0.006437025032937527, 0.12306652218103409, 0.025359811261296272, -0.03370825573801994, 0.021166399121284485, -0.09757819771766663, 0.14486022293567657, -0.011932690627872944, 0.02832530066370964, 0.028265565633773804, 0.04342932254076004, -0.03030019998550415 ]
0.190229
{{< feature-state for\_k8s\_version="v1.27" state="beta" >}} System component traces record the latency of and relationships between operations in the cluster. Kubernetes components emit traces using the [OpenTelemetry Protocol](https://opentelemetry.io/docs/specs/otlp/) with the gRPC exporter and can be collected and routed to tracing backends using an [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector#-opentelemetry-collector). ## Trace Collection Kubernetes components have built-in gRPC exporters for OTLP to export traces, either with an OpenTelemetry Collector, or without an OpenTelemetry Collector. For a complete guide to collecting traces and using the collector, see [Getting Started with the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/). However, there are a few things to note that are specific to Kubernetes components. By default, Kubernetes components export traces using the grpc exporter for OTLP on the [IANA OpenTelemetry port](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=opentelemetry), 4317. As an example, if the collector is running as a sidecar to a Kubernetes component, the following receiver configuration will collect spans and log them to standard output: ```yaml receivers: otlp: protocols: grpc: exporters: # Replace this exporter with the exporter for your backend exporters: debug: verbosity: detailed service: pipelines: traces: receivers: [otlp] exporters: [debug] ``` To directly emit traces to a backend without utilizing a collector, specify the endpoint field in the Kubernetes tracing configuration file with the desired trace backend address. This method negates the need for a collector and simplifies the overall structure. For trace backend header configuration, including authentication details, environment variables can be used with `OTEL\_EXPORTER\_OTLP\_HEADERS`, see [OTLP Exporter Configuration](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/). Additionally, for trace resource attribute configuration such as Kubernetes cluster name, namespace, Pod name, etc., environment variables can also be used with `OTEL\_RESOURCE\_ATTRIBUTES`, see [OTLP Kubernetes Resource](https://opentelemetry.io/docs/specs/semconv/resource/k8s/). ## Component traces ### kube-apiserver traces The kube-apiserver generates spans for incoming HTTP requests, and for outgoing requests to webhooks, etcd, and re-entrant requests. It propagates the [W3C Trace Context](https://www.w3.org/TR/trace-context/) with outgoing requests but does not make use of the trace context attached to incoming requests, as the kube-apiserver is often a public endpoint. #### Enabling tracing in the kube-apiserver To enable tracing, provide the kube-apiserver with a tracing configuration file with `--tracing-config-file=`. This is an example config that records spans for 1 in 10000 requests, and uses the default OpenTelemetry endpoint: ```yaml apiVersion: apiserver.config.k8s.io/v1 kind: TracingConfiguration # default value #endpoint: localhost:4317 samplingRatePerMillion: 100 ``` For more information about the `TracingConfiguration` struct, see [API server config API (v1)](/docs/reference/config-api/apiserver-config.v1/#apiserver-k8s-io-v1-TracingConfiguration). ### kubelet traces {{< feature-state feature\_gate\_name="KubeletTracing" >}} The kubelet CRI interface and authenticated http servers are instrumented to generate trace spans. As with the apiserver, the endpoint and sampling rate are configurable. Trace context propagation is also configured. A parent span's sampling decision is always respected. A provided tracing configuration sampling rate will apply to spans without a parent. Enabled without a configured endpoint, the default OpenTelemetry Collector receiver address of "localhost:4317" is set. #### Enabling tracing in the kubelet To enable tracing, apply the [tracing configuration](https://github.com/kubernetes/component-base/blob/release-1.27/tracing/api/v1/types.go). This is an example snippet of a kubelet config that records spans for 1 in 10000 requests, and uses the default OpenTelemetry endpoint: ```yaml apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration tracing: # default value #endpoint: localhost:4317 samplingRatePerMillion: 100 ``` If the `samplingRatePerMillion` is set to one million (`1000000`), then every span will be sent to the exporter. The kubelet in Kubernetes v{{< skew currentVersion >}} collects spans from the garbage collection, pod synchronization routine as well as every gRPC method. The kubelet propagates trace context with gRPC requests so that container runtimes with trace instrumentation, such as CRI-O and containerd, can associate their exported spans with the trace context from the kubelet. The resulting traces will have parent-child links between kubelet and container runtime spans, providing helpful context when debugging node issues. Please note that exporting spans
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-traces.md
[ 0.04239460453391075, -0.03875475004315376, -0.00995351281017065, 0.05478626862168312, -0.006598426960408688, -0.04981396719813347, 0.009589994326233864, -0.03429456800222397, 0.06568654626607895, -0.002838902175426483, -0.015978172421455383, -0.09527306258678436, -0.08133389800786972, -0.037807002663612366, -0.007318596355617046, -0.06654814630746841, 0.0911690816283226, 0.007514116354286671, 0.0006591814453713596, -0.04498753324151039, -0.013995993882417679, -0.02570457011461258, 0.031084870919585228, 0.006284406874328852, -0.04187511280179024, -0.02918054349720478, 0.008462993428111076, -0.055787090212106705, 0.022689618170261383, -0.013809534721076488, -0.08737877756357193, 0.02516857348382473, 0.00611517857760191, 0.020599696785211563, 0.05205903947353363, 0.09755482524633408, 0.0984492301940918, 0.01602358929812908, -0.08554181456565857, 0.019183404743671417, 0.06229620426893234, -0.035207655280828476, -0.04445940628647804, 0.017560558393597603, 0.0289097148925066, -0.038012564182281494, -0.02299528941512108, -0.028311561793088913, -0.059441953897476196, -0.02244490385055542, 0.05613994598388672, -0.03008383885025978, 0.042196523398160934, 0.04387510567903519, 0.05032875016331673, 0.08062149584293365, 0.0004797188157681376, -0.02018546499311924, 0.01523643173277378, 0.0202331505715847, 0.010158984921872616, -0.0752081498503685, -0.039832860231399536, -0.0781112015247345, -0.021792929619550705, 0.021815579384565353, 0.05126110091805458, 0.041303589940071106, 0.06103227660059929, -0.0668349415063858, -0.009056673385202885, 0.01808987371623516, -0.04997502267360687, 0.005482970736920834, -0.032950811088085175, 0.016427285969257355, -0.01949184387922287, 0.0708039328455925, 0.00863863155245781, -0.080475814640522, 0.054574646055698395, 0.03866739571094513, -0.008112670853734016, 0.007082170341163874, -0.014421822503209114, -0.009537863545119762, -0.014332777820527554, -0.0019332603551447392, -0.006253320258110762, -0.03557279706001282, 0.0155032929033041, -0.02568742074072361, -0.010948401875793934, -0.13732406497001648, 0.0156268123537302, 0.030383655801415443, -0.009519494138658047, -0.007450072560459375, 0.10842980444431305, -0.004351039417088032, 0.0070832292549312115, 0.0264084804803133, -0.010227189399302006, 0.1062844842672348, -0.054878197610378265, -0.002627213019877672, -0.03660692647099495, 0.042616356164216995, -0.012597342021763325, 0.06963345408439636, -0.0004332561220508069, 0.08366802334785461, 0.027762137353420258, 0.0046444847248494625, 0.09444297105073929, 0.0003179705236107111, -0.0115546565502882, 0.03386928513646126, 0.06570955365896225, 0.10774866491556168, 0.0002416345087112859, -0.07988733053207397, 0.010278194211423397, 0.08135368674993515, 0.04931022971868515, 0.04301531985402107, 0.036028750240802765, 5.076982141720538e-33, 0.0873187780380249, 0.02610849216580391, -0.027274735271930695, -0.045242756605148315, -0.05359818786382675, -0.007258162368088961, -0.04934486001729965, -0.08165022730827332, 0.023877929896116257, 0.026381060481071472, -0.09407233446836472, 0.08410689234733582, -0.018239140510559082, -0.05733877047896385, 0.03632179647684097, 0.058079786598682404, -0.061108969151973724, 0.04170488566160202, 0.09052305668592453, 0.006568882614374161, 0.007628298830240965, -0.09318103641271591, -0.016406172886490822, -0.009038981981575489, 0.0761360377073288, 0.0005672936094924808, -0.011729530058801174, -0.056476738303899765, -0.043282631784677505, -0.016451362520456314, 0.05269293487071991, -0.007328642066568136, 0.0310206338763237, 0.034420281648635864, -0.09972085803747177, -0.010238663293421268, -0.02601838856935501, -0.059955328702926636, -0.043651092797517776, -0.03093930333852768, -0.04829211160540581, 0.006168555933982134, -0.019015586003661156, -0.07782647758722305, -0.005821686703711748, -0.026900572702288628, -0.01989581435918808, -0.04774561896920204, 0.11555107682943344, 0.052223533391952515, 0.030989518389105797, -0.011623401194810867, -0.006919329520314932, -0.06206858158111572, 0.0755932554602623, 0.04930303245782852, 0.14951865375041962, -0.09246275573968887, 0.02586234174668789, 0.1133192852139473, -0.022042427211999893, -0.0019448247039690614, 0.006911180447787046, -0.0551665835082531, -0.006788418162614107, 0.017223838716745377, -0.05247851088643074, 0.07285639643669128, -0.04099934548139572, -0.03683288395404816, -0.07023148983716965, 0.0443512462079525, 0.0013880339683964849, -0.013928094878792763, 0.059369031339883804, -0.016587506979703903, -0.06757277250289917, -0.03598294034600258, -0.09230804443359375, 0.01672038435935974, -0.04599114507436752, -0.05657866969704628, -0.0037351681385189295, 0.04200981929898262, 0.05839502811431885, 0.012980295345187187, -0.02270434983074665, -0.03653029352426529, -0.020886844024062157, 0.05338446423411369, -0.007905444130301476, 0.03286506235599518, -0.07810952514410019, 0.07840733230113983, -0.09816528856754303, -3.758514984401628e-33, 0.05280190333724022, 0.012118615210056305, 0.015004961751401424, -0.023649880662560463, -0.011594879440963268, -0.049635354429483414, -0.019278934225440025, 0.03318864852190018, -0.01598235033452511, -0.001420130836777389, -0.003180247265845537, -0.08617973327636719, 0.0033621785696595907, -0.02080507203936577, 0.0153475571423769, -0.0016235348302870989, -0.02078309655189514, -0.01579112932085991, 0.03677245229482651, -0.023461084812879562, -0.009699222631752491, -0.10784114897251129, 0.024448413401842117, -0.053806599229574203, -0.02288290113210678, 0.006289308425039053, 0.0872456431388855, -0.006128616631031036, -0.02778448350727558, -0.08955971896648407, -0.0011646233033388853, -0.0597183033823967, 0.03028845600783825, 0.052244629710912704, 0.0739368349313736, -0.010286983102560043, 0.03271067142486572, -0.013412362895905972, 0.02720443345606327, -0.08346440643072128, 0.02725045569241047, 0.09066230058670044, -0.03355119749903679, -0.06151077151298523, -0.09487724304199219, 0.048024360090494156, -0.04127581790089607, 0.06546339392662048, 0.019821127876639366, -0.11148543655872345, 0.08354097604751587, -0.00380087667144835, -0.03259285166859627, 0.09524308890104294, -0.010936468839645386, 0.10702211409807205, 0.0775655210018158, 0.008556777611374855, 0.022665344178676605, -0.02171119675040245, 0.029215505346655846, -0.13003209233283997, 0.03909437358379364, 0.025387519970536232, 0.05633698031306267, 0.014895088039338589, 0.07989630848169327, 0.026460587978363037, -0.06547024101018906, 0.10576844960451126, -0.0797501876950264, -0.04016130417585373, -0.003964534029364586, 0.026385881006717682, 0.016783293336629868, -0.015180225484073162, -0.048657506704330444, -0.04529485106468201, 0.06327994167804718, -0.020358994603157043, -0.06666334718465805, 0.01795254833996296, -0.04758667200803757, 0.011146912351250648, 0.09520559757947922, 0.02421080693602562, 0.05580588057637215, 0.02722957730293274, 0.11467887461185455, 0.06178061664104462, -0.013901661150157452, 0.03899232670664787, -0.03647053986787796, 0.021724672988057137, -0.027967391535639763, -5.1860290284366783e-8, -0.02739460952579975, -0.06373253464698792, -0.06601523607969284, -0.002720652846619487, 0.018084615468978882, 0.019197659566998482, 0.04661811888217926, 0.04016726836562157, -0.023581746965646744, -0.026211479678750038, 0.016282066702842712, 0.027374815195798874, -0.06962843239307404, -0.006522632669657469, 0.10711877793073654, -0.007713533937931061, 0.03561961278319359, -0.012266826815903187, 0.0001508504938101396, -0.07698099315166473, 0.011489477008581161, 0.007454901468008757, 0.03205760940909386, 0.009205360896885395, 0.0051312982104718685, 0.024906449019908905, 0.07394029200077057, 0.11451197415590286, 0.0628654733300209, -0.06652762740850449, -0.0322636142373085, 0.00432167761027813, -0.0003934400447178632, 0.03803158923983574, 0.00704768905416131, 0.06757277250289917, -0.09651429206132889, 0.06112992763519287, 0.04384153336286545, 0.11134304106235504, -0.014758936129510403, -0.048223983496427536, -0.12818147242069244, 0.01569322682917118, 0.08185352385044098, 0.026843979954719543, -0.07915634661912918, 0.02001361921429634, 0.0027541418094187975, 0.020842978730797768, -0.008081413805484772, -0.10247550904750824, 0.027700453996658325, 0.030943119898438454, -0.07670676708221436, -0.002582371002063155, -0.019115597009658813, -0.131898894906044, 0.09537001699209213, 0.05788591876626015, -0.007060844451189041, 0.007635119371116161, -0.0037278749514371157, -0.03326067700982094 ]
0.193806
requests so that container runtimes with trace instrumentation, such as CRI-O and containerd, can associate their exported spans with the trace context from the kubelet. The resulting traces will have parent-child links between kubelet and container runtime spans, providing helpful context when debugging node issues. Please note that exporting spans always comes with a small performance overhead on the networking and CPU side, depending on the overall configuration of the system. If there is any issue like that in a cluster which is running with tracing enabled, then mitigate the problem by either reducing the `samplingRatePerMillion` or disabling tracing completely by removing the configuration. ## Stability Tracing instrumentation is still under active development, and may change in a variety of ways. This includes span names, attached attributes, instrumented endpoints, etc. Until this feature graduates to stable, there are no guarantees of backwards compatibility for tracing instrumentation. ## {{% heading "whatsnext" %}} \* Read about [Getting Started with the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/) \* Read about [OTLP Exporter Configuration](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-traces.md
[ -0.008195462636649609, 0.039890676736831665, 0.04866749048233032, 0.034045349806547165, 0.024954630061984062, -0.08496595919132233, -0.047306422144174576, -0.01988108642399311, 0.009048903360962868, -0.056295279413461685, -0.02667861245572567, -0.10401687771081924, -0.05360892042517662, -0.08001464605331421, -0.019096525385975838, -0.026189226657152176, 0.022480357438325882, 0.06302818655967712, -0.03773120045661926, 0.02682558074593544, -0.020573105663061142, -0.005968309473246336, 0.04529712349176407, -0.003321494907140732, -0.03190753981471062, -0.06487780064344406, -0.009471972472965717, -0.031744252890348434, 0.06470467895269394, -0.06948904693126678, -0.013020188547670841, 0.08067762851715088, -0.07856734842061996, 0.01088370755314827, 0.12073622643947601, 0.09897986054420471, 0.10034966468811035, -0.01049096044152975, -0.08910597860813141, -0.03409213200211525, 0.07765227556228638, 0.027531377971172333, -0.06138142570853233, 0.026862336322665215, -0.013163863681256771, -0.06714366376399994, -0.0015440571587532759, -0.06351008266210556, -0.041136421263217926, 0.011006288230419159, 0.02786928601562977, -0.019936585798859596, 0.06102707237005234, 0.03815069422125816, 0.03001883067190647, 0.05151894688606262, 0.042724087834358215, 0.01993362419307232, 0.054274048656225204, 0.04578899219632149, -0.023542510345578194, -0.015451340936124325, 0.010000654496252537, -0.04569843411445618, -0.005212618503719568, 0.0401785783469677, -0.006363247986882925, 0.03290987387299538, 0.014351186342537403, 0.015425399877130985, -0.0037580481730401516, -0.019355015829205513, -0.0920947939157486, 0.014662064611911774, 0.028878141194581985, 0.07934670895338058, -0.07349957525730133, -0.01910323090851307, -0.023434093222022057, -0.09276425093412399, 0.01920551434159279, 0.03534635156393051, 0.031031154096126556, -0.04027504846453667, -0.034001775085926056, 0.0013097025221213698, 0.0031064392533153296, -0.027468662708997726, 0.016651300713419914, 0.012498457916080952, 0.05868661403656006, -0.03093913197517395, 0.049851611256599426, -0.04519537836313248, 0.02463655360043049, -0.0007287408807314932, 0.02936779148876667, 0.07415147125720978, 0.04880321025848389, 0.0007337251445278525, 0.03953538089990616, 0.05349325016140938, 0.009441369213163853, 0.10657176375389099, -0.01950196921825409, -0.043316278606653214, 0.03696121647953987, 0.014212756417691708, -0.05818502977490425, -0.011174038052558899, 0.024082256481051445, 0.06844764947891235, -0.03264091536402702, 0.014256483875215054, 0.04546155780553818, -0.03494284301996231, 0.0003712971811182797, -0.014910748228430748, 0.04415770620107651, 0.059989579021930695, 0.06708179414272308, -0.04455608129501343, 0.030205614864826202, 0.06293217092752457, 0.009762774221599102, -0.00023850370780564845, -0.014414090663194656, 5.913271067223746e-33, 0.038070838898420334, -0.014363879337906837, 0.037449825555086136, -0.03674853965640068, -0.047155652195215225, -0.04781928285956383, -0.058789800852537155, -0.06832755357027054, -0.02631004899740219, -0.02212156541645527, -0.12878015637397766, 0.05761532858014107, -0.03938625007867813, -0.049545884132385254, 0.12268908321857452, 0.009161151945590973, -0.07305518537759781, 0.06556788831949234, 0.06999620795249939, 0.046125657856464386, 0.03495796397328377, -0.10488688200712204, -0.04715937376022339, -0.03767405077815056, 0.05754971504211426, 0.02118838019669056, 0.020190143957734108, 0.00173765083309263, -0.06006214767694473, 0.01827264204621315, 0.010197790339589119, 0.006523126736283302, 0.05752239376306534, 0.03500007838010788, -0.11492542922496796, 0.006098784506320953, -0.004012977238744497, -0.019420841708779335, -0.12822039425373077, -0.013363538309931755, -0.05868583172559738, 0.012261615134775639, 0.03810511901974678, -0.03339049965143204, 0.008514604531228542, -0.05002589896321297, 0.007025477476418018, -0.03736104071140289, 0.02017003297805786, 0.05010756850242615, -0.026026403531432152, 0.049126993864774704, 0.014601211994886398, -0.03578680381178856, 0.034807298332452774, -0.0001916619366966188, 0.12856867909431458, -0.09753578901290894, 0.0038467026315629482, 0.11885656416416168, 0.006060388404875994, 0.010436803102493286, -0.032880205661058426, 0.01439464557915926, 0.015135115943849087, 0.0725727528333664, -0.03386891633272171, 0.03664953634142876, -0.08125979453325272, 0.0046510579995810986, -0.0955621674656868, 0.06201796233654022, 0.012239177711308002, 0.011553009040653706, 0.05924079939723015, -0.03291383013129234, -0.034750599414110184, 0.03031402826309204, -0.11807236820459366, -0.02990882843732834, -0.019945954903960228, -0.04413628950715065, -0.0011589379282668233, -0.0023599339183419943, 0.0393478088080883, -0.06645487993955612, -0.009149812161922455, -0.05360002815723419, -0.03303614631295204, 0.09246788918972015, 0.03453046828508377, 0.006687091663479805, -0.060630399733781815, 0.039716269820928574, -0.1365794986486435, -4.110974475868213e-33, 0.0629902258515358, -0.014691218733787537, 0.041078727692365646, 0.0030341302044689655, -0.035805556923151016, -0.014434060081839561, 0.018200349062681198, 0.0855848416686058, 0.015931207686662674, -0.04845837876200676, -0.055543746799230576, -0.08433617651462555, -0.017048632726073265, 0.024679308757185936, -0.004649615380913019, 0.03849905729293823, -0.004866085946559906, -0.012528881430625916, 0.05369850620627403, -0.030034340918064117, 0.02264108508825302, -0.03451022878289223, -0.00952052976936102, -0.010934445075690746, 0.004149748012423515, 0.04973195865750313, 0.05558880418539047, 0.0005025648861192167, -0.05620831623673439, -0.034722380340099335, 0.03102102316915989, -0.04916353151202202, 0.042826954275369644, 0.05264664813876152, 0.007761274464428425, -0.03481671214103699, -0.009311982430517673, 0.030064113438129425, 0.025285739451646805, -0.017825741320848465, 0.03121211566030979, 0.07962826639413834, -0.061572421342134476, -0.018987301737070084, -0.08058276027441025, 0.055023156106472015, -0.06474494934082031, 0.029620079323649406, -0.008470023982226849, -0.11582423001527786, 0.06805300712585449, -0.01271898578852415, 0.0435778982937336, 0.0416063517332077, 0.02204601652920246, 0.05338846519589424, 0.07822207361459732, 0.046778950840234756, -0.04529561847448349, -0.02407746948301792, 0.06743855774402618, -0.03664132580161095, 0.0330042839050293, -0.05873929336667061, 0.061886146664619446, -0.026576561853289604, 0.0612156018614769, -0.016742702573537827, -0.041316643357276917, 0.06636244803667068, -0.03518885374069214, -0.06535216420888901, -0.03445827588438988, 0.04228894039988518, -0.044062212109565735, 0.03162060305476189, -0.028827637434005737, -0.09341727197170258, 0.060831740498542786, 0.01643257774412632, -0.10838618129491806, -0.01154023502022028, -0.013703637756407261, -0.007154582533985376, 0.09260841459035873, -0.016072571277618408, 0.011192313395440578, 0.05539039894938469, 0.12662240862846375, 0.043627578765153885, 0.03367043286561966, 0.0021403480786830187, -0.08518064022064209, 0.07572437822818756, -0.02588503435254097, -5.3834764202065344e-8, 0.0018006154568865895, -0.052695684134960175, -0.08377635478973389, 0.06148901209235191, 0.019655872136354446, -0.0005855940980836749, 0.0586378313601017, 0.008568696677684784, -0.01110255066305399, -0.0018117662984877825, -0.02428099513053894, 0.0016861666226759553, -0.07834308594465256, -0.03918066993355751, 0.060001250356435776, -0.018538400530815125, -0.020809343084692955, 0.038967642933130264, -0.06143277511000633, -0.03122025914490223, -0.07698933780193329, 0.04317954182624817, -0.02253536507487297, 0.01919928751885891, -0.04112091660499573, 0.02549918182194233, 0.09909918904304504, 0.10408533364534378, 0.14558559656143188, -0.08616723865270615, -0.04621946066617966, 0.016168348491191864, -0.07047081738710403, 0.06597775965929031, -0.055845607072114944, 0.04126427322626114, -0.11929426342248917, 0.04970167577266693, 0.04812895134091377, 0.13727734982967377, -0.024795757606625557, -0.03152310103178024, -0.054461125284433365, 0.0038177818059921265, 0.06281779706478119, 0.00794829148799181, -0.09749720245599747, 0.07935217767953873, 0.03689166530966759, 0.027629371732473373, 0.010149224661290646, -0.09911805391311646, -0.01905168406665325, 0.06030019745230675, 0.0057872869074344635, -0.00006173634028527886, -0.029959149658679962, -0.06599003821611404, 0.050898924469947815, 0.04358571022748947, 0.024339506402611732, -0.052634503692388535, 0.07106266915798187, 0.037069641053676605 ]
0.112277
{{< feature-state state="stable" for\_k8s\_version="v1.29" >}} Controlling the behavior of the Kubernetes API server in an overload situation is a key task for cluster administrators. The {{< glossary\_tooltip term\_id="kube-apiserver" text="kube-apiserver" >}} has some controls available (i.e. the `--max-requests-inflight` and `--max-mutating-requests-inflight` command-line flags) to limit the amount of outstanding work that will be accepted, preventing a flood of inbound requests from overloading and potentially crashing the API server, but these flags are not enough to ensure that the most important requests get through in a period of high traffic. The API Priority and Fairness feature (APF) is an alternative that improves upon aforementioned max-inflight limitations. APF classifies and isolates requests in a more fine-grained way. It also introduces a limited amount of queuing, so that no requests are rejected in cases of very brief bursts. Requests are dispatched from queues using a fair queuing technique so that, for example, a poorly-behaved {{< glossary\_tooltip text="controller" term\_id="controller" >}} need not starve others (even at the same priority level). This feature is designed to work well with standard controllers, which use informers and react to failures of API requests with exponential back-off, and other clients that also work this way. {{< caution >}} Some requests classified as "long-running"β€”such as remote command execution or log tailingβ€”are not subject to the API Priority and Fairness filter. This is also true for the `--max-requests-inflight` flag without the API Priority and Fairness feature enabled. API Priority and Fairness \_does\_ apply to \*\*watch\*\* requests. When API Priority and Fairness is disabled, \*\*watch\*\* requests are not subject to the `--max-requests-inflight` limit. {{< /caution >}} ## Enabling/Disabling API Priority and Fairness The API Priority and Fairness feature is controlled by a command-line flag and is enabled by default. See [Options](/docs/reference/command-line-tools-reference/kube-apiserver/#options) for a general explanation of the available kube-apiserver command-line options and how to enable and disable them. The name of the command-line option for APF is "--enable-priority-and-fairness". This feature also involves an {{}} with: (a) a stable `v1` version, introduced in 1.29, and enabled by default (b) a `v1beta3` version, enabled by default, and deprecated in v1.29. You can disable the API group beta version `v1beta3` by adding the following command-line flags to your `kube-apiserver` invocation: ```shell kube-apiserver \ --runtime-config=flowcontrol.apiserver.k8s.io/v1beta3=false \ # …and other flags as usual ``` The command-line flag `--enable-priority-and-fairness=false` will disable the API Priority and Fairness feature. ## Recursive server scenarios API Priority and Fairness must be used carefully in recursive server scenarios. These are scenarios in which some server A, while serving a request, issues a subsidiary request to some server B. Perhaps server B might even make a further subsidiary call back to server A. In situations where Priority and Fairness control is applied to both the original request and some subsidiary ones(s), no matter how deep in the recursion, there is a danger of priority inversions and/or deadlocks. One example of recursion is when the `kube-apiserver` issues an admission webhook call to server B, and while serving that call, server B makes a further subsidiary request back to the `kube-apiserver`. Another example of recursion is when an `APIService` object directs the `kube-apiserver` to delegate requests about a certain API group to a custom external server B (this is one of the things called "aggregation"). When the original request is known to belong to a certain priority level, and the subsidiary controlled requests are classified to higher priority levels, this is one possible solution. When the original requests can belong to any priority level, the subsidiary controlled requests have to be exempt from Priority and Fairness limitation. One way to do that is with the objects that
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.020449478179216385, 0.019976023584604263, 0.07385524362325668, -0.01483129058033228, -0.0368318073451519, -0.02060418762266636, 0.016818402335047722, -0.041406597942113876, 0.060196150094270706, 0.11206693202257156, -0.0570090152323246, -0.0012412626529112458, -0.023580852895975113, -0.015321719460189342, 0.028846556320786476, 0.06149947643280029, 0.09939844161272049, -0.09967206418514252, -0.07431238889694214, -0.08781491965055466, 0.02054235152900219, 0.00327141466550529, -0.009353036992251873, 0.05395050346851349, -0.094662606716156, -0.01872457191348076, -0.06827136129140854, -0.02362172305583954, 0.06551907956600189, -0.020638063549995422, -0.06674841791391373, 0.012852204963564873, -0.030869606882333755, 0.04143098369240761, 0.00046663242392241955, 0.04297574609518051, -0.0298905149102211, -0.08448779582977295, -0.037370119243860245, 0.036847297102212906, -0.0021047601476311684, -0.04096287116408348, -0.12312909960746765, -0.018983762711286545, -0.04234086349606514, 0.01661178283393383, -0.0094605116173625, -0.03892171010375023, 0.015406336635351181, -0.015874717384576797, 0.07077126950025558, -0.06640259176492691, 0.014116363599896431, 0.0011342932702973485, 0.0890561118721962, -0.05667326971888542, -0.06731829047203064, 0.01979178749024868, 0.03625258058309555, 0.002604565117508173, -0.029815295711159706, -0.07938747107982635, 0.03307955339550972, 0.048057518899440765, -0.004681050311774015, -0.0052106804214417934, 0.02441694401204586, -0.0035066516138613224, -0.04433996602892876, 0.005616650450974703, 0.04571066051721573, 0.0012379288673400879, -0.05269373208284378, -0.0054075513035058975, 0.07584258913993835, 0.04160090535879135, -0.10705438256263733, 0.00869135931134224, 0.02476218342781067, -0.07310635596513748, 0.026104053482413292, 0.0004655721131712198, 0.030255470424890518, 0.04023727774620056, -0.033125098794698715, -0.06163861230015755, -0.008629019372165203, -0.0654730573296547, 0.08881398290395737, -0.0012506524799391627, 0.036731790751218796, -0.05606548488140106, 0.1000840812921524, -0.046350471675395966, 0.00919934269040823, 0.06258656084537506, -0.04301738739013672, -0.06097480282187462, -0.0514305904507637, 0.022812040522694588, 0.016265936195850372, -0.006780027411878109, 0.0029038379434496164, 0.035847049206495285, 0.06377609074115753, -0.09322650730609894, -0.025027941912412643, -0.010504971258342266, 0.023067597299814224, 0.04199395701289177, -0.020762985572218895, 0.07981299608945847, 0.017644895240664482, -0.02576909027993679, -0.04567912966012955, 0.028121469542384148, 0.0430334098637104, -0.0241402518004179, 0.06471405923366547, 0.038539133965969086, 0.005537920165807009, -0.09392901510000229, -0.046994615346193314, -0.0036867072340101004, -0.0003117404121439904, 0.06729628145694733, -0.022476639598608017, 4.96607939250824e-33, 0.04661916568875313, -0.03954005613923073, 0.005713694263249636, -0.07982748746871948, -0.0064847711473703384, -0.11912597715854645, 0.0034035539720207453, -0.04046958312392235, -0.05248288810253143, -0.07194961607456207, -0.04589207470417023, 0.07719741016626358, 0.04056446999311447, -0.017138198018074036, 0.04201856255531311, -0.05869276449084282, -0.020774850621819496, 0.07034436613321304, 0.08334237337112427, -0.003562160301953554, 0.014355316758155823, -0.16370923817157745, -0.04790358990430832, 0.011561122722923756, 0.02952559106051922, -0.0036679860204458237, 0.03872138634324074, -0.04495752975344658, -0.030190017074346542, 0.031460631638765335, -0.04937858507037163, -0.02792319841682911, -0.0337645560503006, 0.029592253267765045, -0.159134641289711, 0.001836065435782075, -0.08926594257354736, -0.022622516378760338, -0.02867833897471428, -0.009620822966098785, -0.060920003801584244, -0.0009048647480085492, -0.07725004106760025, -0.012092357501387596, 0.046883292496204376, -0.008858107961714268, 0.012452956289052963, -0.08701586723327637, -0.005970497615635395, 0.0773259773850441, -0.008923293091356754, 0.004102467093616724, 0.09298229962587357, -0.010846823453903198, 0.04177505895495415, 0.025244632735848427, 0.1469239592552185, -0.07157229632139206, -0.05753571540117264, 0.029668156057596207, -0.018117351457476616, -0.101300910115242, -0.029907703399658203, 0.026370840147137642, 0.042919691652059555, 0.026931822299957275, -0.0004952091840095818, 0.08361656218767166, -0.00018437528342474252, 0.008748221211135387, -0.012559938244521618, 0.03799296170473099, 0.02572246640920639, 0.001850621192716062, -0.04372630640864372, -0.04900435730814934, 0.05521973595023155, 0.05052868276834488, -0.05813229829072952, -0.011974277906119823, 0.02451416663825512, -0.04110293090343475, -0.0018210015259683132, 0.0469268336892128, -0.020198963582515717, -0.0503479540348053, 0.02416832558810711, -0.006418522447347641, -0.023363087326288223, 0.02642686665058136, -0.05256282910704613, -0.005825083702802658, -0.05091081187129021, 0.03463916853070259, -0.09868420660495758, -4.217704954819061e-33, 0.09339849650859833, -0.01842566207051277, -0.02330785058438778, 0.029312239959836006, 0.03374391794204712, 0.023228924721479416, 0.06536102294921875, 0.06941643357276917, 0.04819600284099579, -0.016008056700229645, -0.02417532354593277, -0.017420422285795212, 0.035598136484622955, -0.004584979731589556, -0.01960023120045662, -0.03340369090437889, -0.07478614151477814, 0.033343397080898285, 0.01663646288216114, 0.028944838792085648, -0.020229723304510117, -0.002190749393776059, -0.0023046755231916904, 0.032698094844818115, -0.024157777428627014, 0.00032097799703478813, -0.06081969290971756, 0.012797022238373756, -0.03263440355658531, -0.0591479130089283, 0.00014923005073796958, -0.08860523253679276, -0.00858254637569189, 0.013093504123389721, 0.03649131953716278, -0.06429238617420197, 0.052916329354047775, 0.08985622972249985, -0.0440414659678936, 0.01624355837702751, 0.05690738931298256, 0.005878272000700235, -0.019728288054466248, 0.0072012091986835, -0.002372857416048646, 0.0451563261449337, -0.0106095215305686, -0.030205773189663887, -0.04442308843135834, -0.1284189224243164, -0.014666524715721607, -0.01604636386036873, -0.006879784166812897, 0.14588186144828796, -0.04778365418314934, 0.035134267061948776, 0.04340285807847977, 0.02102765254676342, -0.00702925119549036, 0.05319356918334961, 0.05924145132303238, -0.09503903985023499, 0.03761895373463631, 0.07228732109069824, 0.01959141716361046, -0.03555404767394066, 0.031883083283901215, -0.014339201152324677, 0.005790638737380505, 0.06037379801273346, -0.036478545516729355, -0.06679956614971161, 0.018774064257740974, 0.043245021253824234, 0.005571685265749693, -0.02865968644618988, 0.05442912131547928, -0.06138119846582413, 0.018242938444018364, 0.03268913924694061, -0.06867790967226028, 0.04480840265750885, -0.06558670103549957, 0.07999084144830704, 0.050437044352293015, 0.04745066165924072, 0.03201346844434738, 0.043951623141765594, 0.03850219026207924, 0.059541650116443634, -0.04138847813010216, 0.008054477162659168, -0.04950757697224617, 0.14247296750545502, -0.05271175876259804, -5.7451096324712125e-8, 0.03881888464093208, 0.03427780419588089, -0.039276424795389175, 0.02876419760286808, 0.056063488125801086, -0.010812709107995033, 0.0058112069964408875, 0.015707723796367645, -0.02621912956237793, -0.040979206562042236, 0.06254152208566666, 0.03587805852293968, -0.0262347012758255, 0.055895913392305374, 0.060885507613420486, 0.02727455273270607, -0.04812654107809067, 0.03028411790728569, -0.0013970246072858572, -0.0296554546803236, -0.07678160071372986, -0.01066353265196085, 0.04336118698120117, -0.05144786462187767, 0.04208298400044441, 0.08858824521303177, 0.10234800726175308, 0.06551682204008102, 0.05782068520784378, -0.004155716393142939, -0.10773050785064697, 0.033784884959459305, -0.051863763481378555, 0.001609887694939971, 0.004067630041390657, 0.0654025599360466, -0.11405573040246964, 0.023372827097773552, 0.013292593881487846, 0.11876975744962692, 0.01110609620809555, 0.014280620962381363, -0.03890044614672661, 0.0034195170737802982, 0.09976217895746231, 0.12438441067934036, -0.039865463972091675, 0.11453185230493546, -0.0004172473563812673, -0.03715663030743599, -0.017072809860110283, -0.024583300575613976, -0.023798368871212006, 0.08875708281993866, -0.061275944113731384, -0.0268208310008049, -0.010446234606206417, -0.07614805549383163, 0.03145921975374222, -0.014291072264313698, 0.13494367897510529, 0.0418824702501297, -0.000542937486898154, 0.016626162454485893 ]
0.175453
level, and the subsidiary controlled requests are classified to higher priority levels, this is one possible solution. When the original requests can belong to any priority level, the subsidiary controlled requests have to be exempt from Priority and Fairness limitation. One way to do that is with the objects that configure classification and handling, discussed below. Another way is to disable Priority and Fairness on server B entirely, using the techniques discussed above. A third way, which is the simplest to use when server B is not `kube-apiserver`, is to build server B with Priority and Fairness disabled in the code. ## Concepts There are several distinct features involved in the API Priority and Fairness feature. Incoming requests are classified by attributes of the request using \_FlowSchemas\_, and assigned to priority levels. Priority levels add a degree of isolation by maintaining separate concurrency limits, so that requests assigned to different priority levels cannot starve each other. Within a priority level, a fair-queuing algorithm prevents requests from different \_flows\_ from starving each other, and allows for requests to be queued to prevent bursty traffic from causing failed requests when the average load is acceptably low. ### Priority Levels Without APF enabled, overall concurrency in the API server is limited by the `kube-apiserver` flags `--max-requests-inflight` and `--max-mutating-requests-inflight`. With APF enabled, the concurrency limits defined by these flags are summed and then the sum is divided up among a configurable set of \_priority levels\_. Each incoming request is assigned to a single priority level, and each priority level will only dispatch as many concurrent requests as its particular limit allows. The default configuration, for example, includes separate priority levels for leader-election requests, requests from built-in controllers, and requests from Pods. This means that an ill-behaved Pod that floods the API server with requests cannot prevent leader election or actions by the built-in controllers from succeeding. The concurrency limits of the priority levels are periodically adjusted, allowing under-utilized priority levels to temporarily lend concurrency to heavily-utilized levels. These limits are based on nominal limits and bounds on how much concurrency a priority level may lend and how much it may borrow, all derived from the configuration objects mentioned below. ### Seats Occupied by a Request The above description of concurrency management is the baseline story. Requests have different durations but are counted equally at any given moment when comparing against a priority level's concurrency limit. In the baseline story, each request occupies one unit of concurrency. The word "seat" is used to mean one unit of concurrency, inspired by the way each passenger on a train or aircraft takes up one of the fixed supply of seats. But some requests take up more than one seat. Some of these are \*\*list\*\* requests that the server estimates will return a large number of objects. These have been found to put an exceptionally heavy burden on the server. For this reason, the server estimates the number of objects that will be returned and considers the request to take a number of seats that is proportional to that estimated number. ### Execution time tweaks for watch requests API Priority and Fairness manages \*\*watch\*\* requests, but this involves a couple more excursions from the baseline behavior. The first concerns how long a \*\*watch\*\* request is considered to occupy its seat. Depending on request parameters, the response to a \*\*watch\*\* request may or may not begin with \*\*create\*\* notifications for all the relevant pre-existing objects. API Priority and Fairness considers a \*\*watch\*\* request to be done with its seat once that initial burst of notifications, if any, is over.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.04837249591946602, -0.01608189195394516, 0.04732135683298111, -0.07516082376241684, -0.07478426396846771, -0.046656299382448196, -0.016628604382276535, -0.07403810322284698, 0.05476624146103859, 0.06255412846803665, -0.08244900405406952, -0.045994535088539124, 0.01468967366963625, -0.026080340147018433, 0.06705884635448456, 0.03470027074217796, 0.07009046524763107, -0.03478945791721344, -0.1134064570069313, -0.03908180817961693, 0.0037099081091582775, -0.04284138232469559, -0.0010288790799677372, 0.01532573439180851, -0.10430535674095154, -0.08312477171421051, 0.005303727928549051, -0.0036602893378585577, 0.05317411571741104, -0.051791589707136154, -0.015291158109903336, -0.03198928013443947, -0.08913180977106094, 0.006855664774775505, -0.03825651854276657, 0.024049751460552216, -0.04889437556266785, -0.09977340698242188, 0.00038198166294023395, 0.0010650521144270897, -0.0020430570002645254, -0.02059980295598507, -0.11128871887922287, -0.016130108386278152, -0.053041890263557434, 0.05550440773367882, 0.005083877127617598, 0.020244907587766647, -0.05863901600241661, -0.09104599058628082, 0.017087042331695557, -0.046065863221883774, -0.018105415627360344, 0.05456242337822914, 0.05248704180121422, 0.00027970763039775193, -0.015495030209422112, 0.0048070792108774185, 0.023533686995506287, 0.04202459380030632, -0.1204538643360138, -0.06779057532548904, 0.03584523871541023, 0.010681780986487865, -0.020759524777531624, 0.014719381928443909, 0.013447832316160202, 0.042373914271593094, -0.00872335396707058, 0.04988257214426994, 0.10383298993110657, -0.02004598081111908, -0.03163581341505051, -0.035512421280145645, 0.040479086339473724, 0.01853155717253685, -0.09417113661766052, 0.054943718016147614, -0.05544305965304375, -0.06764984130859375, 0.0016639422392472625, -0.006253243423998356, -0.021219713613390923, 0.02277689427137375, -0.053272370249032974, -0.1017565131187439, 0.009051380679011345, -0.05527322739362717, 0.07042587548494339, 0.035864073783159256, 0.04983185604214668, 0.012841695919632912, 0.08023284375667572, -0.03253927826881409, 0.06623870134353638, 0.04504776373505592, 0.017548218369483948, -0.03808622434735298, -0.0005202078609727323, 0.021457849070429802, -0.008845403790473938, -0.0023094406351447105, -0.05391073226928711, 0.048991475254297256, 0.11646364629268646, -0.0704817995429039, 0.011565311811864376, -0.0029440652579069138, 0.025903988629579544, 0.010668626986443996, -0.025703664869070053, 0.06902900338172913, 0.02640935406088829, -0.016545355319976807, -0.0838201716542244, 0.01851988397538662, 0.14189742505550385, -0.07050631195306778, -0.01799016445875168, -0.026814168319106102, -0.0165614765137434, -0.04929347336292267, -0.012053675018250942, -0.037594567984342575, 0.024754386395215988, 0.00467348750680685, -0.036188896745443344, 5.805173708748082e-33, 0.027664804831147194, -0.0856943354010582, -0.002366339787840843, -0.10129272192716599, -0.0326615571975708, -0.024697501212358475, 0.00396729027852416, -0.017333196476101875, -0.048628319054841995, -0.06600416451692581, -0.04015958309173584, 0.031858425587415695, 0.02198525331914425, -0.04333267733454704, 0.04816300421953201, -0.05174024775624275, 0.006719477940350771, 0.0760364830493927, 0.10148757696151733, 0.002314748475328088, 0.04018247872591019, -0.07148496806621552, -0.06688366085290909, 0.01501342374831438, -0.021782873198390007, 0.004457080736756325, 0.020780593156814575, -0.02281082794070244, -0.016374055296182632, 0.028233446180820465, -0.01855369843542576, -0.05102969706058502, -0.006947960238903761, 0.04130689054727554, -0.12350048124790192, 0.01259614247828722, -0.06684843450784683, 0.03980773687362671, -0.06475690007209778, -0.03396385535597801, -0.014295442029833794, -0.01617085374891758, -0.059520233422517776, 0.031261637806892395, -0.01716090552508831, -0.059965550899505615, -0.025887057185173035, -0.04345730319619179, -0.014435716904699802, 0.0020542757119983435, 0.025099847465753555, 0.012701531872153282, 0.1215144619345665, 0.003422780893743038, 0.02201252058148384, -0.0008873941260389984, 0.10432376712560654, -0.028806421905755997, -0.06309349834918976, 0.07289367914199829, 0.05152102932333946, -0.08643928915262222, -0.09466962516307831, 0.05793929472565651, 0.026388943195343018, 0.030663950368762016, -0.015068070963025093, 0.035140808671712875, -0.020200034603476524, -0.02942676469683647, 0.022652260959148407, 0.04994126781821251, 0.020160537213087082, 0.0008056025835685432, -0.03363190218806267, 0.03611783683300018, 0.03952225297689438, 0.05907369405031204, -0.002836852800101042, -0.08301480859518051, -0.001627603778615594, -0.007549897767603397, 0.00820845365524292, 0.05190334469079971, -0.038730718195438385, -0.031049266457557678, 0.014260898344218731, -0.01446207519620657, -0.04751955345273018, 0.04286988079547882, -0.07951298356056213, 0.030034875497221947, 0.012925275601446629, 0.04727295786142349, 0.0070762624964118, -4.927002654209045e-33, 0.07037918269634247, -0.010166874155402184, 0.0027667260728776455, 0.04935090243816376, 0.06964773684740067, 0.03926989063620567, 0.008073198609054089, -0.023965299129486084, 0.026913972571492195, 0.06230134516954422, -0.05701024457812309, -0.02999669313430786, 0.07232946902513504, -0.006253342144191265, 0.014297089539468288, -0.02511685900390148, 0.01647295616567135, 0.020813506096601486, -0.0119887450709939, 0.05579671636223793, -0.015079407021403313, 0.05253002047538757, -0.03542222082614899, -0.004449250176548958, 0.005664086900651455, 0.05935090407729149, -0.09381695091724396, 0.05380480736494064, -0.00004571574754663743, -0.013815772719681263, -0.07250369340181351, -0.09771161526441574, -0.0056487563997507095, -0.045240696519613266, 0.022847207263112068, -0.06290065497159958, 0.001993141369894147, 0.07487395405769348, -0.03146009147167206, 0.0712457075715065, 0.018461769446730614, 0.007854701951146126, -0.07926119118928909, 0.040792856365442276, -0.010031650774180889, 0.026452690362930298, -0.009375697001814842, -0.04490223154425621, -0.008099925704300404, -0.11249537020921707, -0.0596662275493145, 0.0473407506942749, 0.010867652483284473, 0.1656339168548584, 0.021472834050655365, 0.01879337802529335, 0.04457251355051994, 0.046800319105386734, 0.04122665897011757, 0.05644223466515541, 0.08856280148029327, -0.061631910502910614, 0.045347921550273895, 0.03842189162969589, 0.04877931624650955, -0.01868726871907711, 0.051212187856435776, -0.05350043252110481, 0.05058658495545387, 0.059339698404073715, -0.01230576727539301, 0.03848635405302048, 0.005892325658351183, 0.03145274519920349, 0.07879623770713806, 0.007730422541499138, 0.020286904647946358, -0.0408882275223732, 0.02437525987625122, 0.07006055116653442, -0.06944140791893005, 0.08077602833509445, -0.03796817734837532, 0.08230993151664734, -0.02715279720723629, 0.03962121158838272, 0.05163218080997467, -0.008396758697926998, 0.10138330608606339, 0.0038927451241761446, -0.007189963012933731, 0.0068408893421292305, -0.033578403294086456, 0.08253880590200424, -0.07343054562807083, -5.088775623107722e-8, 0.017795631662011147, -0.06208263337612152, -0.025093503296375275, 0.10097391903400421, 0.026800507679581642, -0.013360596261918545, -0.06164100021123886, 0.019690172746777534, -0.01981666125357151, 0.004865520633757114, -0.010588787496089935, 0.032651931047439575, 0.025771114975214005, -0.006031539291143417, 0.04216964170336723, -0.0032029123976826668, 0.007097231689840555, -0.023972338065505028, -0.027709368616342545, -0.024052301421761513, -0.06786876916885376, -0.019000466912984848, 0.08166278898715973, -0.03815167397260666, 0.016085131093859673, 0.03907332569360733, 0.12412551790475845, -0.003531535156071186, 0.08532699942588806, 0.02048572152853012, -0.10312569886445999, -0.006767953746020794, -0.07856514304876328, -0.0007867786916904151, 0.03896356374025345, 0.0549977645277977, -0.10031206905841827, 0.028004594147205353, -0.05079365149140358, 0.10162033885717392, 0.05901317670941353, 0.0013345640618354082, -0.07775124907493591, 0.043366845697164536, 0.15708063542842865, 0.07325536757707596, -0.057713832706213, 0.057627368718385696, 0.02747705578804016, 0.006708493921905756, -0.010065058246254921, -0.02919885702431202, -0.017016548663377762, 0.09628518670797348, -0.06575784087181091, -0.029355138540267944, -0.037962786853313446, -0.0800238698720932, 0.0033707052934914827, 0.02193734422326088, 0.14250141382217407, 0.07444415241479874, -0.023830102756619453, 0.01004153210669756 ]
0.089763
its seat. Depending on request parameters, the response to a \*\*watch\*\* request may or may not begin with \*\*create\*\* notifications for all the relevant pre-existing objects. API Priority and Fairness considers a \*\*watch\*\* request to be done with its seat once that initial burst of notifications, if any, is over. The normal notifications are sent in a concurrent burst to all relevant \*\*watch\*\* response streams whenever the server is notified of an object create/update/delete. To account for this work, API Priority and Fairness considers every write request to spend some additional time occupying seats after the actual writing is done. The server estimates the number of notifications to be sent and adjusts the write request's number of seats and seat occupancy time to include this extra work. ### Queuing Even within a priority level there may be a large number of distinct sources of traffic. In an overload situation, it is valuable to prevent one stream of requests from starving others (in particular, in the relatively common case of a single buggy client flooding the kube-apiserver with requests, that buggy client would ideally not have much measurable impact on other clients at all). This is handled by use of a fair-queuing algorithm to process requests that are assigned the same priority level. Each request is assigned to a \_flow\_, identified by the name of the matching FlowSchema plus a \_flow distinguisher\_ β€” which is either the requesting user, the target resource's namespace, or nothing β€” and the system attempts to give approximately equal weight to requests in different flows of the same priority level. To enable distinct handling of distinct instances, controllers that have many instances should authenticate with distinct usernames After classifying a request into a flow, the API Priority and Fairness feature then may assign the request to a queue. This assignment uses a technique known as {{< glossary\_tooltip term\_id="shuffle-sharding" text="shuffle sharding" >}}, which makes relatively efficient use of queues to insulate low-intensity flows from high-intensity flows. The details of the queuing algorithm are tunable for each priority level, and allow administrators to trade off memory use, fairness (the property that independent flows will all make progress when total traffic exceeds capacity), tolerance for bursty traffic, and the added latency induced by queuing. ### Exempt requests Some requests are considered sufficiently important that they are not subject to any of the limitations imposed by this feature. These exemptions prevent an improperly-configured flow control configuration from totally disabling an API server. ## Resources The flow control API involves two kinds of resources. [PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1-flowcontrol-apiserver-k8s-io) define the available priority levels, the share of the available concurrency budget that each can handle, and allow for fine-tuning queuing behavior. [FlowSchemas](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1-flowcontrol-apiserver-k8s-io) are used to classify individual inbound requests, matching each to a single PriorityLevelConfiguration. ### PriorityLevelConfiguration A PriorityLevelConfiguration represents a single priority level. Each PriorityLevelConfiguration has an independent limit on the number of outstanding requests, and limitations on the number of queued requests. The nominal concurrency limit for a PriorityLevelConfiguration is not specified in an absolute number of seats, but rather in "nominal concurrency shares." The total concurrency limit for the API Server is distributed among the existing PriorityLevelConfigurations in proportion to these shares, to give each level its nominal limit in terms of seats. This allows a cluster administrator to scale up or down the total amount of traffic to a server by restarting `kube-apiserver` with a different value for `--max-requests-inflight` (or `--max-mutating-requests-inflight`), and all PriorityLevelConfigurations will see their maximum allowed concurrency go up (or down) by the same fraction. {{< caution >}} In the versions before
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.07041960209608078, -0.01855553686618805, 0.08065502345561981, 0.011678666807711124, -0.009685165248811245, -0.05445697903633118, 0.07063756138086319, -0.016690293326973915, 0.15425245463848114, 0.09969537705183029, -0.07544080168008804, -0.004746738355606794, 0.024209890514612198, -0.04291590303182602, -0.015532269142568111, -0.002619741950184107, 0.13956095278263092, -0.11892011761665344, -0.1592905968427658, -0.01340660359710455, 0.05133717134594917, -0.027499089017510414, -0.04302483797073364, 0.034400444477796555, -0.07270818948745728, -0.050278209149837494, -0.05140409991145134, -0.049156975001096725, 0.07623694092035294, -0.0209775622934103, -0.04283894971013069, -0.03236597403883934, 0.019839515909552574, -0.011331262066960335, -0.04689585417509079, 0.029798196628689766, 0.0040914337150752544, -0.12984712421894073, -0.0256898682564497, 0.014266862533986568, 0.04063000530004501, -0.016616662964224815, -0.09651882946491241, 0.005772867240011692, -0.01264998223632574, 0.05941629037261009, -0.0045334892347455025, -0.04289908707141876, -0.072276771068573, -0.06147977337241173, 0.0026377965696156025, -0.03135702759027481, 0.012638122774660587, 0.043887145817279816, 0.047590505331754684, -0.026506412774324417, -0.006886203773319721, 0.015179545618593693, -0.04320533946156502, -0.003865049686282873, -0.05207907035946846, -0.06254987418651581, -0.008439978584647179, 0.025437992066144943, 0.03943968936800957, -0.0788014754652977, -0.03255051374435425, 0.0128489900380373, 0.0017099068500101566, -0.0038047286216169596, 0.03139815479516983, 0.037616077810525894, -0.0060097044333815575, -0.00419990997761488, 0.08516135066747665, -0.04188445955514908, -0.034146469086408615, 0.0006683171377517283, 0.024393722414970398, -0.07569707930088043, -0.0005133716040290892, -0.011637764982879162, 0.028218481689691544, -0.014552740380167961, 0.02792750485241413, -0.050971318036317825, 0.0018206643871963024, -0.027330761775374413, 0.011605252511799335, 0.03539467602968216, 0.06933420896530151, -0.025659434497356415, 0.003389467252418399, 0.045462917536497116, -0.049053724855184555, 0.07885794341564178, -0.01745513454079628, 0.03198295831680298, -0.005909655708819628, 0.05973280966281891, 0.0026228728238493204, 0.027211980894207954, 0.013561312109231949, 0.0541602224111557, 0.08203474432229996, -0.08713172376155853, -0.06875961273908615, 0.004632674623280764, -0.0039012387860566378, -0.008605125360190868, -0.01916956715285778, -0.04138811305165291, 0.03436833247542381, 0.028181513771414757, -0.10083138942718506, 0.08325827866792679, -0.01312956027686596, -0.016722546890378, 0.037197183817625046, -0.008458741940557957, 0.02939494140446186, -0.05707115679979324, -0.03667011484503746, -0.029196634888648987, 0.025093749165534973, 0.0298879723995924, -0.010656867176294327, 4.972948320278873e-33, 0.014117741025984287, -0.04685494676232338, 0.0008352258591912687, -0.07732652872800827, -0.00929541327059269, -0.08883646130561829, -0.03363385424017906, 0.026484310626983643, 0.0030799335800111294, -0.046451255679130554, -0.01316159963607788, 0.009875592775642872, 0.04317624494433403, 0.009171728976070881, -0.002402439247816801, -0.0830421894788742, -0.023440897464752197, 0.05578504502773285, 0.008619129657745361, -0.020924683660268784, 0.01966756582260132, -0.028542058542370796, -0.08470465987920761, 0.019425397738814354, -0.030014701187610626, 0.032740041613578796, 0.017981674522161484, -0.033868689090013504, -0.05843188613653183, 0.059238169342279434, -0.017336757853627205, 0.0049780202098190784, -0.03461626172065735, 0.03130916506052017, -0.057155389338731766, 0.024792533367872238, -0.0440388061106205, -0.02947774901986122, -0.05428013578057289, -0.04752161726355553, -0.07723934203386307, 0.010612591169774532, -0.08488530665636063, -0.014377325773239136, -0.0431981235742569, -0.06567183881998062, -0.01928810589015484, -0.034683894366025925, -0.007322140038013458, 0.04015788063406944, 0.037911783903837204, 0.018853306770324707, 0.1583903580904007, 0.012371509335935116, -0.027373945340514183, 0.03193711116909981, 0.11489879339933395, -0.06160900741815567, -0.04812304303050041, 0.06529887020587921, -0.014219707809388638, -0.11985529959201813, -0.00027998967561870813, 0.024472566321492195, 0.05622567608952522, 0.023579999804496765, 0.03181781619787216, 0.020817751064896584, 0.06780508905649185, 0.009908702224493027, 0.01105085201561451, 0.10234025865793228, -0.004076563753187656, -0.016926590353250504, -0.0711987167596817, 0.005987079348415136, 0.06430463492870331, 0.014583775773644447, -0.031415265053510666, -0.047781024128198624, 0.005379933398216963, -0.010910967364907265, 0.003508529160171747, 0.00022861521574668586, -0.07160656154155731, -0.011867808178067207, 0.013424267992377281, -0.05013982206583023, -0.047074541449546814, 0.02538003958761692, 0.0027884223964065313, 0.0147215835750103, -0.035816557705402374, 0.020939677953720093, -0.08036641776561737, -5.133056160990638e-33, 0.04362219199538231, -0.04514847323298454, -0.08959368616342545, 0.028170187026262283, 0.014988671988248825, -0.011827611364424229, -0.04775364324450493, -0.04437784105539322, 0.03664015606045723, 0.050716839730739594, -0.08481106907129288, -0.02491655759513378, 0.03209858760237694, 0.06190723925828934, 0.0237702876329422, -0.03730420768260956, 0.0510091558098793, -0.04546934366226196, -0.056140005588531494, -0.00688029732555151, 0.0279424786567688, 0.003669164376333356, 0.0012340544490143657, -0.002293753670528531, 0.003906753845512867, 0.016601037234067917, -0.07035338133573532, 0.03194967657327652, 0.0007357850554399192, 0.006400994025170803, -0.04052242636680603, -0.107374407351017, -0.019770288839936256, 0.035940807312726974, 0.042198143899440765, -0.056668367236852646, 0.011416035704314709, 0.11385785043239594, -0.031034940853714943, -0.0045725335367023945, 0.06248415634036064, 0.010137708857655525, 0.014385474845767021, 0.05776209011673927, 0.02348276972770691, 0.04027184471487999, -0.029876383021473885, -0.03722917661070824, -0.03194485977292061, -0.07542997598648071, 0.03776917979121208, -0.005283161532133818, 0.04423341527581215, 0.1970060169696808, -0.021446453407406807, 0.036680418998003006, 0.004968638997524977, -0.012575576081871986, 0.032916728407144547, 0.05142702907323837, 0.07034865021705627, -0.007906337268650532, -0.00595035869628191, 0.01216569822281599, -0.0025803796015679836, -0.00816372875124216, 0.017618561163544655, -0.1341293454170227, 0.04665900394320488, 0.008482107892632484, 0.035962216556072235, -0.0010483245132490993, -0.09995187073945999, -0.007711238227784634, 0.01280185580253601, 0.04583648219704628, 0.05310414731502533, -0.029564673081040382, -0.039275556802749634, 0.05620362609624863, -0.12384741753339767, 0.014522119425237179, 0.005750767886638641, 0.034017592668533325, -0.04874097555875778, 0.011401278898119926, 0.051015328615903854, 0.017635535448789597, -0.0028940890915691853, 0.035630691796541214, -0.017848672345280647, 0.10853719711303711, -0.06333781033754349, 0.07869531214237213, -0.04865294694900513, -5.165344418855966e-8, 0.0071108159609138966, -0.04978277161717415, -0.06950612366199493, 0.030246933922171593, 0.06295018643140793, -0.09541650861501694, 0.0190020389854908, 0.018756840378046036, -0.07369332015514374, 0.006679309532046318, 0.09955884516239166, -0.04808509349822998, 0.017170405015349388, -0.02593744546175003, 0.10117688775062561, 0.03638472035527229, -0.037116143852472305, -0.04116518422961235, -0.06945250183343887, 0.022747917100787163, -0.020579267293214798, -0.0003478648141026497, -0.011733269318938255, -0.07960405200719833, 0.034042034298181534, 0.03875797614455223, 0.09919542819261551, 0.10453498363494873, 0.02862592227756977, -0.05796929821372032, -0.03769329562783241, 0.05014294758439064, -0.013011970557272434, -0.031129563227295876, 0.005451868288218975, 0.09662176668643951, -0.05284462124109268, -0.04563308134675026, 0.010938200168311596, 0.1206568107008934, 0.06272266805171967, -0.029346495866775513, 0.018756750971078873, 0.05427803471684456, 0.1207473874092102, 0.08271975070238113, -0.041038986295461655, 0.08705407381057739, 0.004498184192925692, -0.0691906064748764, -0.05579380691051483, -0.04522731155157089, -0.013504489324986935, 0.0815107449889183, -0.045516129583120346, -0.004767818376421928, 0.05748749524354935, -0.06042778864502907, 0.004890300799161196, 0.03949693217873573, 0.14740565419197083, 0.04971606656908989, -0.0029304870404303074, 0.0031503764912486076 ]
0.233661
cluster administrator to scale up or down the total amount of traffic to a server by restarting `kube-apiserver` with a different value for `--max-requests-inflight` (or `--max-mutating-requests-inflight`), and all PriorityLevelConfigurations will see their maximum allowed concurrency go up (or down) by the same fraction. {{< caution >}} In the versions before `v1beta3` the relevant PriorityLevelConfiguration field is named "assured concurrency shares" rather than "nominal concurrency shares". Also, in Kubernetes release 1.25 and earlier there were no periodic adjustments: the nominal/assured limits were always applied without adjustment. {{< /caution >}} The bounds on how much concurrency a priority level may lend and how much it may borrow are expressed in the PriorityLevelConfiguration as percentages of the level's nominal limit. These are resolved to absolute numbers of seats by multiplying with the nominal limit / 100.0 and rounding. The dynamically adjusted concurrency limit of a priority level is constrained to lie between (a) a lower bound of its nominal limit minus its lendable seats and (b) an upper bound of its nominal limit plus the seats it may borrow. At each adjustment the dynamic limits are derived by each priority level reclaiming any lent seats for which demand recently appeared and then jointly fairly responding to the recent seat demand on the priority levels, within the bounds just described. {{< caution >}} With the Priority and Fairness feature enabled, the total concurrency limit for the server is set to the sum of `--max-requests-inflight` and `--max-mutating-requests-inflight`. There is no longer any distinction made between mutating and non-mutating requests; if you want to treat them separately for a given resource, make separate FlowSchemas that match the mutating and non-mutating verbs respectively. {{< /caution >}} When the volume of inbound requests assigned to a single PriorityLevelConfiguration is more than its permitted concurrency level, the `type` field of its specification determines what will happen to extra requests. A type of `Reject` means that excess traffic will immediately be rejected with an HTTP 429 (Too Many Requests) error. A type of `Queue` means that requests above the threshold will be queued, with the shuffle sharding and fair queuing techniques used to balance progress between request flows. The queuing configuration allows tuning the fair queuing algorithm for a priority level. Details of the algorithm can be read in the [enhancement proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness), but in short: \* Increasing `queues` reduces the rate of collisions between different flows, at the cost of increased memory usage. A value of 1 here effectively disables the fair-queuing logic, but still allows requests to be queued. \* Increasing `queueLengthLimit` allows larger bursts of traffic to be sustained without dropping any requests, at the cost of increased latency and memory usage. \* Changing `handSize` allows you to adjust the probability of collisions between different flows and the overall concurrency available to a single flow in an overload situation. {{< note >}} A larger `handSize` makes it less likely for two individual flows to collide (and therefore for one to be able to starve the other), but more likely that a small number of flows can dominate the apiserver. A larger `handSize` also potentially increases the amount of latency that a single high-traffic flow can cause. The maximum number of queued requests possible from a single flow is `handSize \* queueLengthLimit`. {{< /note >}} Following is a table showing an interesting collection of shuffle sharding configurations, showing for each the probability that a given mouse (low-intensity flow) is squished by the elephants (high-intensity flows) for an illustrative collection of numbers of elephants. See https://play.golang.org/p/Gi0PLgVHiUg , which computes this table. {{< table caption = "Example Shuffle Sharding Configurations" >}}
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ 0.012042508460581303, -0.06727916747331619, 0.008674423210322857, -0.0391169935464859, -0.08615630865097046, 0.02963223308324814, -0.029702844098210335, 0.007633151486515999, 0.07268203794956207, 0.08976643532514572, -0.007098977919667959, -0.01376433577388525, 0.02655327506363392, -0.0012757437070831656, 0.023901812732219696, -0.029972288757562637, 0.07561178505420685, -0.016594108194112778, -0.11215277761220932, -0.01680329069495201, 0.00017476743960287422, -0.047407541424036026, 0.025054264813661575, 0.022259242832660675, -0.02454923652112484, -0.043009355664253235, -0.06907667219638824, 0.004263781011104584, 0.03804123029112816, -0.029629860073328018, -0.08568792790174484, -0.006253836210817099, 0.05182832479476929, 0.017665395513176918, -0.0374273918569088, 0.019611969590187073, -0.03016641177237034, -0.11239103227853775, -0.03692604973912239, 0.037711627781391144, 0.013742176815867424, -0.01637779176235199, -0.11637245118618011, -0.014327669516205788, -0.0555722638964653, 0.023401493206620216, -0.0581611692905426, -0.006977746728807688, -0.0732225701212883, -0.019223781302571297, 0.021962003782391548, -0.008702660910785198, 0.061820898205041885, 0.024219034239649773, 0.04309343546628952, 0.04801182076334953, -0.03038518689572811, 0.044311147183179855, 0.06561874598264694, 0.026335885748267174, -0.033377598971128464, -0.054544493556022644, 0.019000938162207603, -0.02378280647099018, 0.03384097293019295, -0.0418563075363636, 0.02123894914984703, -0.0052331178449094296, 0.0029371429700404406, 0.03759662061929703, 0.08653533458709717, -0.009338058531284332, -0.01607944443821907, 0.015534495003521442, 0.024260446429252625, 0.01915166527032852, -0.07692044973373413, 0.07778529077768326, 0.010537860915064812, -0.06286391615867615, -0.04140368476510048, 0.002096655312925577, 0.046561434864997864, -0.038545265793800354, -0.07739359885454178, -0.09709398448467255, -0.015103479847311974, -0.05168715491890907, 0.056269992142915726, 0.03930717706680298, 0.04834163933992386, 0.046730007976293564, 0.04421384632587433, -0.05457112565636635, 0.03635559231042862, 0.04131455719470978, -0.11137785017490387, -0.0009920095326378942, 0.02948031574487686, -0.023463262245059013, 0.018155133351683617, -0.006087582558393478, -0.016689371317625046, 0.009966198354959488, 0.024962101131677628, -0.07282163202762604, -0.02723611518740654, 0.0359160453081131, -0.014212280511856079, 0.017887180671095848, 0.021684948354959488, 0.07673009485006332, 0.06085702031850815, -0.01462865062057972, -0.07134277373552322, 0.014038940891623497, 0.06378582864999771, -0.055377230048179626, 0.0966615229845047, 0.025824371725320816, 0.039789147675037384, -0.08034398406744003, 0.023709233850240707, 0.013079657219350338, -0.007840526290237904, 0.10296764224767685, -0.01928604766726494, 4.2225075839261396e-33, 0.0200662799179554, -0.06792902946472168, 0.040775757282972336, -0.09617350250482559, -0.03196461498737335, -0.06458918005228043, -0.1094488650560379, -0.030739953741431236, -0.08041714876890182, -0.0723796933889389, -0.01675817370414734, 0.07398802787065506, 0.01692873425781727, -0.06709323078393936, 0.055848293006420135, -0.0582488551735878, 0.027139386162161827, 0.09254609048366547, 0.06895292550325394, -0.02209196798503399, 0.08300375193357468, -0.07569462060928345, -0.030469657853245735, 0.03607792407274246, 0.0021364963613450527, -0.016149094328284264, 0.009625477716326714, -0.04060878977179527, -0.0022712256759405136, 0.020723972469568253, -0.03934910520911217, 0.009868278168141842, -0.01167550403624773, -0.0027750995941460133, -0.08005915582180023, 0.05498071014881134, -0.04715847596526146, -0.009004696272313595, -0.060126177966594696, -0.017946893349289894, -0.03472819924354553, -0.03645024821162224, -0.012689589522778988, -0.04086786136031151, -0.00003592195935198106, 0.02019505761563778, 0.021293647587299347, 0.009181302972137928, -0.060213424265384674, 0.0792231559753418, -0.016896171495318413, 0.007263147737830877, 0.08419764786958694, -0.002575806574895978, 0.009440802969038486, 0.006639070808887482, 0.11899933964014053, -0.0027551453094929457, -0.05548504367470741, 0.08598872274160385, -0.03203793987631798, -0.07015291601419449, -0.019709767773747444, 0.00004624506618711166, -0.012185721658170223, 0.05384306609630585, -0.03098037838935852, 0.07373145967721939, -0.02413392812013626, 0.042656123638153076, -0.044295135885477066, 0.09016261249780655, -0.03252735733985901, 0.0026538909878581762, -0.030372794717550278, -0.04277435317635536, 0.0178922601044178, -0.001622020616196096, -0.07660691440105438, 0.00035979319363832474, -0.03613152354955673, 0.049699947237968445, 0.019749104976654053, 0.03426044061779976, -0.015863114967942238, -0.08403311669826508, 0.004874160513281822, 0.09677916765213013, -0.05818728730082512, -0.016775282099843025, 0.007880386896431446, -0.051609963178634644, 0.06581734120845795, 0.0944456160068512, -0.0495627336204052, -3.530962420627465e-33, 0.04979686439037323, 0.002888173796236515, -0.032600950449705124, 0.051675066351890564, 0.07143761962652206, 0.02358953282237053, 0.004752186592668295, 0.06900190562009811, -0.01244189590215683, -0.07935439795255661, -0.037532683461904526, -0.010033254511654377, 0.03444031998515129, 0.010788992047309875, -0.07111354172229767, -0.04774036258459091, -0.011741156689822674, 0.015581904910504818, 0.027654413133859634, -0.019032428041100502, 0.0341913066804409, -0.06721162050962448, 0.007733477745205164, 0.08801548182964325, 0.040444664657115936, 0.0098236920312047, -0.0874115452170372, 0.027171937748789787, -0.045299988240003586, -0.006512904539704323, -0.0054955026134848595, -0.1335788369178772, -0.015004239045083523, 0.04306101053953171, 0.030506163835525513, -0.10129757970571518, 0.014688311144709587, 0.034432459622621536, 0.01136573776602745, 0.06917200237512589, 0.04812260717153549, -0.015647483989596367, -0.027574647217988968, 0.02284478396177292, 0.03400024026632309, 0.04341363161802292, 0.02867131307721138, -0.09753485769033432, -0.06925396621227264, -0.1056317463517189, -0.04062123969197273, -0.00040155911119654775, 0.0435149185359478, 0.14058782160282135, 0.011793756857514381, 0.05687526613473892, 0.027385851368308067, 0.046310968697071075, 0.015157338231801987, 0.012549235485494137, 0.05244911089539528, -0.03566690906882286, 0.02336861751973629, 0.07091192156076431, 0.01053122989833355, -0.008774333633482456, 0.051865000277757645, -0.05014254152774811, -0.037898749113082886, 0.0659990981221199, -0.012043561786413193, -0.02089354209601879, 0.04519594460725784, 0.06009845808148384, -0.025305256247520447, -0.043612245470285416, 0.08498797565698624, -0.0245846975594759, 0.048730313777923584, 0.015168330632150173, -0.052677612751722336, 0.06547783315181732, -0.025800853967666626, 0.03285668045282364, 0.018476666882634163, 0.04536064341664314, 0.06859376281499863, 0.06414966285228729, 0.03773665428161621, 0.0787588432431221, -0.05710365250706673, -0.03184643015265465, -0.0417003333568573, 0.03580312058329582, -0.1155804991722107, -5.631174815334816e-8, 0.05847245827317238, -0.007249254267662764, -0.09164632856845856, 0.06175815314054489, 0.1107693538069725, 0.0010462957434356213, 0.012197711504995823, 0.016975849866867065, -0.054066382348537445, 0.06065291538834572, 0.07126761972904205, 0.03690313920378685, -0.047841232270002365, -0.0404750257730484, 0.053487181663513184, -0.03005630150437355, -0.031045762822031975, -0.013863838277757168, -0.01466141827404499, -0.021873217076063156, -0.039499275386333466, 0.029378309845924377, -0.03447267785668373, -0.025482511147856712, 0.014114062301814556, 0.03329063206911087, 0.05717219412326813, 0.12580198049545288, 0.0406293161213398, -0.01710725761950016, -0.09540630131959915, -0.03350284323096275, -0.02950340509414673, 0.022544873878359795, -0.0013565762201324105, 0.03822622820734978, -0.13752219080924988, 0.10403610020875931, 0.03197622299194336, 0.03274031728506088, 0.0445655882358551, -0.037102751433849335, 0.003437857376411557, 0.035504523664712906, 0.13772927224636078, 0.10044561326503754, -0.11041776835918427, 0.09994328767061234, 0.04016415774822235, -0.0524035207927227, -0.039146170020103455, 0.023302458226680756, -0.033118512481451035, 0.1255197525024414, -0.06512506306171417, -0.015084195882081985, -0.029297340661287308, -0.055986806750297546, 0.0075115845538675785, -0.012540234252810478, 0.05604138970375061, -0.005583532620221376, -0.09081455320119858, -0.006411825772374868 ]
0.07896
showing an interesting collection of shuffle sharding configurations, showing for each the probability that a given mouse (low-intensity flow) is squished by the elephants (high-intensity flows) for an illustrative collection of numbers of elephants. See https://play.golang.org/p/Gi0PLgVHiUg , which computes this table. {{< table caption = "Example Shuffle Sharding Configurations" >}} HandSize | Queues | 1 elephant | 4 elephants | 16 elephants |----------|-----------|------------|----------------|--------------------| | 12 | 32 | 4.428838398950118e-09 | 0.11431348830099144 | 0.9935089607656024 | | 10 | 32 | 1.550093439632541e-08 | 0.0626479840223545 | 0.9753101519027554 | | 10 | 64 | 6.601827268370426e-12 | 0.00045571320990370776 | 0.49999929150089345 | | 9 | 64 | 3.6310049976037345e-11 | 0.00045501212304112273 | 0.4282314876454858 | | 8 | 64 | 2.25929199850899e-10 | 0.0004886697053040446 | 0.35935114681123076 | | 8 | 128 | 6.994461389026097e-13 | 3.4055790161620863e-06 | 0.02746173137155063 | | 7 | 128 | 1.0579122850901972e-11 | 6.960839379258192e-06 | 0.02406157386340147 | | 7 | 256 | 7.597695465552631e-14 | 6.728547142019406e-08 | 0.0006709661542533682 | | 6 | 256 | 2.7134626662687968e-12 | 2.9516464018476436e-07 | 0.0008895654642000348 | | 6 | 512 | 4.116062922897309e-14 | 4.982983350480894e-09 | 2.26025764343413e-05 | | 6 | 1024 | 6.337324016514285e-16 | 8.09060164312957e-11 | 4.517408062903668e-07 | {{< /table >}} ### FlowSchema A FlowSchema matches some inbound requests and assigns them to a priority level. Every inbound request is tested against FlowSchemas, starting with those with the numerically lowest `matchingPrecedence` and working upward. The first match wins. {{< caution >}} Only the first matching FlowSchema for a given request matters. If multiple FlowSchemas match a single inbound request, it will be assigned based on the one with the highest `matchingPrecedence`. If multiple FlowSchemas with equal `matchingPrecedence` match the same request, the one with lexicographically smaller `name` will win, but it's better not to rely on this, and instead to ensure that no two FlowSchemas have the same `matchingPrecedence`. {{< /caution >}} A FlowSchema matches a given request if at least one of its `rules` matches. A rule matches if at least one of its `subjects` \*and\* at least one of its `resourceRules` or `nonResourceRules` (depending on whether the incoming request is for a resource or non-resource URL) match the request. For the `name` field in subjects, and the `verbs`, `apiGroups`, `resources`, `namespaces`, and `nonResourceURLs` fields of resource and non-resource rules, the wildcard `\*` may be specified to match all values for the given field, effectively removing it from consideration. A FlowSchema's `distinguisherMethod.type` determines how requests matching that schema will be separated into flows. It may be `ByUser`, in which one requesting user will not be able to starve other users of capacity; `ByNamespace`, in which requests for resources in one namespace will not be able to starve requests for resources in other namespaces of capacity; or blank (or `distinguisherMethod` may be omitted entirely), in which all requests matched by this FlowSchema will be considered part of a single flow. The correct choice for a given FlowSchema depends on the resource and your particular environment. ## Defaults Each kube-apiserver maintains two sorts of APF configuration objects: mandatory and suggested. ### Mandatory Configuration Objects The four mandatory configuration objects reflect fixed built-in guardrail behavior. This is behavior that the servers have before those objects exist, and when those objects exist their specs reflect this behavior. The four mandatory objects are as follows. \* The mandatory `exempt` priority level is used for requests that are not subject to flow control at all: they will always be dispatched immediately. The mandatory `exempt` FlowSchema classifies all requests from the `system:masters` group into this priority level. You may define other FlowSchemas that direct other requests to this priority level, if appropriate. \* The mandatory `catch-all` priority level is used
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ 0.009861105121672153, 0.004081215709447861, 0.04860716313123703, -0.016587989404797554, -0.06077481806278229, -0.010378805920481682, 0.08122807741165161, -0.05998590588569641, 0.013325667008757591, 0.001721867360174656, -0.015477070584893227, -0.05751229077577591, 0.025860756635665894, 0.013876868411898613, -0.0570390522480011, -0.046677663922309875, -0.0026557971723377705, 0.002834753831848502, -0.00712850084528327, -0.04274040460586548, -0.02812475524842739, -0.0616966150701046, 0.025030510500073433, -0.03540034219622612, -0.003920797724276781, -0.018830766901373863, -0.015561189502477646, -0.020819609984755516, -0.012848884798586369, -0.10844811052083969, -0.02156040072441101, 0.03171020373702049, -0.003976965323090553, -0.010215714573860168, -0.07229958474636078, -0.06649710237979889, -0.057949431240558624, -0.009189601056277752, -0.004226190969347954, 0.09988264739513397, 0.0621623769402504, 0.0015845531597733498, 0.02685345709323883, -0.022172674536705017, -0.028570814058184624, 0.012484311126172543, -0.16222186386585236, -0.04692311957478523, 0.002205788856372237, 0.057067498564720154, -0.05581941828131676, -0.019393544644117355, -0.03754042088985443, 0.014589400961995125, 0.06039571017026901, -0.029345445334911346, -0.017702797427773476, -0.06396103650331497, 0.06083273887634277, -0.027234742417931557, 0.05571502447128296, -0.005753036588430405, -0.011747373268008232, 0.00392318656668067, -0.06745433062314987, -0.029291916638612747, 0.0016962569206953049, 0.06516190618276596, 0.029143068939447403, 0.04103260859847069, 0.028587419539690018, 0.041863445192575455, -0.020482249557971954, 0.009473124518990517, -0.0059748198837041855, -0.008976503275334835, -0.058028947561979294, -0.028784632682800293, 0.009085971862077713, -0.004181112162768841, -0.023754877969622612, -0.07067013531923294, -0.059469856321811676, 0.009726567193865776, 0.03161875158548355, -0.01923695206642151, 0.027458947151899338, -0.0017665098421275616, -0.030030755326151848, -0.07340998947620392, -0.0870865136384964, 0.10724424570798874, 0.0056787035427987576, -0.041742321103811264, 0.05911245942115784, 0.09261777997016907, 0.06297450512647629, -0.02951548434793949, -0.008774952031672001, 0.07852191478013992, 0.03578609600663185, -0.016072537750005722, 0.11151035875082016, -0.013366454280912876, 0.04165545478463173, -0.004756825044751167, -0.055622849613428116, -0.0022793253883719444, -0.020080838352441788, -0.04537128284573555, 0.017001233994960785, 0.009959199465811253, 0.07511560618877411, 0.025376731529831886, -0.023243429139256477, 0.07806956768035889, -0.06992566585540771, -0.008145470172166824, -0.0027966462075710297, 0.04404008388519287, 0.04402535781264305, 0.009885702282190323, -0.008351970463991165, 0.018773170188069344, 0.009955096058547497, 0.032179564237594604, 0.03446526825428009, -4.312563308168589e-33, 0.030732082203030586, -0.14467421174049377, 0.04978116229176521, -0.0405690036714077, 0.15068288147449493, 0.0023261094465851784, 0.011950441636145115, -0.05252683907747269, 0.004947631154209375, 0.0390746183693409, -0.11011209338903427, 0.05125325173139572, -0.05552979186177254, 0.021484022960066795, -0.016844840720295906, -0.09493640810251236, 0.0345352478325367, 0.09845342487096786, -0.05580831319093704, -0.050974007695913315, 0.031986162066459656, 0.002730061300098896, 0.01437664870172739, -0.11122582107782364, 0.0227622389793396, 0.06327057629823685, -0.055339913815259933, -0.08481471985578537, 0.057251062244176865, 0.05424657464027405, -0.0058685108087956905, 0.001105999224819243, -0.12068134546279907, -0.09921054542064667, -0.08839982748031616, -0.029018934816122055, -0.031143654137849808, -0.06350564956665039, 0.06177787855267525, -0.0649060532450676, 0.048809491097927094, 0.008648775517940521, 0.006688330788165331, -0.08011874556541443, -0.08666040748357773, 0.03779278323054314, 0.03299457207322121, 0.026059012860059738, -0.05467405542731285, 0.011999440379440784, -0.011873897165060043, -0.026367612183094025, -0.021027076989412308, 0.05161721631884575, 0.06111763417720795, -0.03796360269188881, 0.08575242012739182, 0.05920629948377609, -0.013002386316657066, 0.15928016602993011, 0.02283925749361515, 0.08679290115833282, -0.024675728753209114, 0.008366120979189873, 0.10490187257528305, 0.049978744238615036, -0.08829277753829956, 0.004594231024384499, 0.047390591353178024, -0.008775674737989902, 0.006780910771340132, 0.01927965320646763, 0.004783347249031067, -0.07368860393762589, 0.006192061584442854, -0.013446767814457417, 0.025217391550540924, 0.02930719032883644, -0.10481636971235275, -0.04688192531466484, -0.0524895042181015, 0.05254993587732315, -0.04157974570989609, -0.06476983428001404, -0.04798762500286102, 0.005208187736570835, 0.05536506325006485, -0.001756704761646688, -0.1620291918516159, 0.0009014423121698201, -0.0065790764056146145, -0.006928001530468464, 0.020526528358459473, -0.08418679982423782, -0.0390896275639534, 4.929058575461534e-34, -0.07533381134271622, 0.03290819004178047, 0.034719038754701614, 0.07475830614566803, 0.06398377567529678, 0.03438534587621689, 0.08297348767518997, 0.04381557181477547, 0.008650220930576324, -0.01625782437622547, -0.07539589703083038, 0.06510937213897705, 0.01346676331013441, -0.027185074985027313, 0.13475067913532257, -0.03988198563456535, 0.04610530287027359, -0.007107588462531567, -0.005859264172613621, -0.03645229712128639, 0.017554374411702156, 0.02497764676809311, -0.05350673198699951, 0.09313087910413742, 0.020742403343319893, 0.03349938988685608, 0.021263299509882927, -0.11848209798336029, -0.032451774924993515, 0.03359521925449371, -0.035513993352651596, -0.06138550117611885, -0.07851295173168182, -0.015739116817712784, 0.012702691368758678, -0.11251169443130493, 0.04149404168128967, 0.11725613474845886, -0.02273622341454029, -0.0016306947218254209, -0.010352851822972298, -0.06842197477817535, -0.011950462125241756, -0.0026684412732720375, 0.05089880898594856, 0.04392380639910698, -0.05898278206586838, -0.0018545988714322448, -0.048239994794130325, 0.004490103106945753, -0.0741555318236351, 0.015772709622979164, -0.09975428134202957, 0.029804939404129982, 0.012233792804181576, 0.03752376139163971, -0.0345989353954792, 0.0010982698295265436, 0.02226824313402176, -0.024211304262280464, -0.07009546458721161, -0.06907421350479126, -0.05438469722867012, 0.01120510883629322, -0.022496841847896576, 0.017971493303775787, -0.12285461276769638, -0.10211547464132309, 0.0064735678024590015, 0.002306282054632902, 0.03614119812846184, 0.0711047574877739, -0.007722330745309591, 0.003794340183958411, 0.00651433365419507, 0.07530184835195541, 0.030239088460803032, 0.048127807676792145, 0.06997165828943253, 0.022899603471159935, -0.07797686755657196, 0.039098285138607025, 0.06313285231590271, -0.027605999261140823, 0.013873886317014694, -0.051971349865198135, 0.031839050352573395, -0.04864371195435524, 0.04666832089424133, 0.037252504378557205, 0.004544506780803204, -0.013881964609026909, -0.010738255456089973, -0.00354074127972126, 0.047690343111753464, -5.11523090551691e-8, -0.05758481100201607, 0.026811733841896057, 0.027795711532235146, 0.0532589927315712, 0.10788954794406891, 0.02746572531759739, 0.005584919359534979, 0.05794389173388481, -0.06167330592870712, -0.05069805681705475, 0.12298845499753952, 0.00648550596088171, 0.023187382146716118, 0.03942333906888962, 0.07848953455686569, 0.06325168907642365, -0.017320822924375534, 0.07805635780096054, -0.04403223842382431, 0.039386164397001266, -0.03314700350165367, 0.028322376310825348, -0.018972091376781464, -0.009622401557862759, -0.08013713359832764, -0.01833590865135193, -0.008058727718889713, -0.0015929534565657377, 0.02938389964401722, -0.03568306192755699, 0.007079186383634806, -0.02619505673646927, 0.0048291804268956184, -0.007309563457965851, -0.0002451192121952772, 0.06393944472074509, -0.09817010164260864, 0.04319241642951965, 0.04461913928389549, -0.017997900024056435, -0.06924769282341003, -0.03451811149716377, -0.004619937390089035, -0.006330445408821106, 0.015678497031331062, 0.034407030791044235, 0.00023079366656020284, -0.054149080067873, -0.01753496564924717, 0.014347167685627937, -0.09009192883968353, -0.011799418367445469, 0.03668880835175514, -0.04314360395073891, 0.052970852702856064, 0.009736220352351665, -0.05502984672784805, -0.038077857345342636, -0.017834700644016266, 0.017110606655478477, 0.036269400268793106, 0.010693245567381382, -0.023223983123898506, 0.0713752806186676 ]
0.043609
subject to flow control at all: they will always be dispatched immediately. The mandatory `exempt` FlowSchema classifies all requests from the `system:masters` group into this priority level. You may define other FlowSchemas that direct other requests to this priority level, if appropriate. \* The mandatory `catch-all` priority level is used in combination with the mandatory `catch-all` FlowSchema to make sure that every request gets some kind of classification. Typically you should not rely on this catch-all configuration, and should create your own catch-all FlowSchema and PriorityLevelConfiguration (or use the suggested `global-default` priority level that is installed by default) as appropriate. Because it is not expected to be used normally, the mandatory `catch-all` priority level has a very small concurrency share and does not queue requests. ### Suggested Configuration Objects The suggested FlowSchemas and PriorityLevelConfigurations constitute a reasonable default configuration. You can modify these and/or create additional configuration objects if you want. If your cluster is likely to experience heavy load then you should consider what configuration will work best. The suggested configuration groups requests into six priority levels: \* The `node-high` priority level is for health updates from nodes. \* The `system` priority level is for non-health requests from the `system:nodes` group, i.e. Kubelets, which must be able to contact the API server in order for workloads to be able to schedule on them. \* The `leader-election` priority level is for leader election requests from built-in controllers (in particular, requests for `endpoints`, `configmaps`, or `leases` coming from the `system:kube-controller-manager` or `system:kube-scheduler` users and service accounts in the `kube-system` namespace). These are important to isolate from other traffic because failures in leader election cause their controllers to fail and restart, which in turn causes more expensive traffic as the new controllers sync their informers. \* The `workload-high` priority level is for other requests from built-in controllers. \* The `workload-low` priority level is for requests from any other service account, which will typically include all requests from controllers running in Pods. \* The `global-default` priority level handles all other traffic, e.g. interactive `kubectl` commands run by nonprivileged users. The suggested FlowSchemas serve to steer requests into the above priority levels, and are not enumerated here. ### Maintenance of the Mandatory and Suggested Configuration Objects Each `kube-apiserver` independently maintains the mandatory and suggested configuration objects, using initial and periodic behavior. Thus, in a situation with a mixture of servers of different versions there may be thrashing as long as different servers have different opinions of the proper content of these objects. Each `kube-apiserver` makes an initial maintenance pass over the mandatory and suggested configuration objects, and after that does periodic maintenance (once per minute) of those objects. For the mandatory configuration objects, maintenance consists of ensuring that the object exists and, if it does, has the proper spec. The server refuses to allow a creation or update with a spec that is inconsistent with the server's guardrail behavior. Maintenance of suggested configuration objects is designed to allow their specs to be overridden. Deletion, on the other hand, is not respected: maintenance will restore the object. If you do not want a suggested configuration object then you need to keep it around but set its spec to have minimal consequences. Maintenance of suggested objects is also designed to support automatic migration when a new version of the `kube-apiserver` is rolled out, albeit potentially with thrashing while there is a mixed population of servers. Maintenance of a suggested configuration object consists of creating it --- with the server's suggested spec --- if the object does not exist. OTOH, if the object already exists, maintenance behavior
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.025121424347162247, -0.028608741238713264, -0.00878864899277687, -0.00648596603423357, 0.00007868016109568998, -0.04099133238196373, 0.008200340904295444, -0.05193939805030823, -0.0013799667358398438, 0.05042337626218796, -0.011596530675888062, -0.02192540653049946, -0.06593909114599228, -0.057610683143138885, 0.007106978911906481, -0.026642490178346634, 0.07643765211105347, -0.06700227409601212, -0.03513621911406517, 0.004898319952189922, -0.008129109628498554, -0.03614310547709465, 0.034052442759275436, 0.0016616203356534243, -0.14427529275417328, -0.011281266808509827, -0.05516386032104492, -0.02553301677107811, 0.03939523920416832, -0.031321898102760315, -0.03904074802994728, 0.0025569875724613667, -0.037137724459171295, 0.025968575850129128, -0.02457575500011444, 0.04685347527265549, -0.0020499774254858494, -0.07298754900693893, -0.07789087295532227, 0.05337080731987953, 0.01751338504254818, 0.009151660837233067, -0.04929633066058159, -0.0212186761200428, -0.03313330560922623, 0.009985985234379768, 0.001989545999094844, 0.0163249671459198, -0.03157278522849083, -0.01241831760853529, 0.011149958707392216, -0.002232270548120141, -0.014272992499172688, 0.08597779273986816, 0.02964700013399124, 0.04786766692996025, 0.04844049736857414, -0.09305815398693085, 0.03855016827583313, -0.031193211674690247, -0.07919949293136597, -0.09559309482574463, -0.025714419782161713, 0.000027545629563974217, -0.012769619934260845, 0.012153184972703457, -0.014095914550125599, 0.04249519482254982, 0.10962548106908798, 0.016535794362425804, 0.03915150836110115, 0.02121378853917122, -0.062429074198007584, -0.03100687637925148, -0.029845379292964935, 0.049104105681180954, -0.011428657919168472, -0.047154221683740616, -0.0926516056060791, -0.022522609680891037, -0.010247406549751759, 0.017802242189645767, 0.0033776010386645794, -0.011292285285890102, -0.014430418610572815, 0.002569579752162099, -0.039556439965963364, -0.01578288897871971, 0.1023407131433487, 0.024305246770381927, -0.03390311449766159, 0.05080149695277214, 0.003754299832507968, -0.042659979313611984, 0.08350707590579987, 0.10175245255231857, -0.0008419054793193936, -0.044109001755714417, -0.036881934851408005, -0.018568329513072968, 0.0711921751499176, -0.04374247044324875, -0.01996120996773243, 0.00539697939530015, 0.07500451058149338, -0.01645299606025219, -0.017991742119193077, 0.03228456526994705, 0.006103996653109789, -0.00563533091917634, 0.018166102468967438, 0.04380413889884949, 0.10668019205331802, -0.057344675064086914, -0.10276147723197937, 0.06622657924890518, 0.07204598933458328, -0.0814603641629219, -0.006639842409640551, 0.06870542466640472, -0.046180132776498795, 0.02331269532442093, 0.049502819776535034, -0.08138057589530945, 0.06681814789772034, 0.006201614625751972, -0.04784011095762253, 5.6121046390972754e-33, 0.0032059992663562298, -0.05145721137523651, -0.00822918675839901, -0.004563536029309034, -0.018136674538254738, -0.006874325219541788, 0.04101871699094772, -0.05332276225090027, 0.0012361921835690737, -0.05525974556803703, -0.040257055312395096, -0.04567341506481171, -0.05425761640071869, 0.015943951904773712, -0.07300315052270889, -0.07365982979536057, 0.05431300774216652, 0.03266327828168869, 0.07197286188602448, 0.020712556317448616, 0.029493143782019615, -0.10108743607997894, -0.10514041036367416, -0.038630496710538864, -0.0118010975420475, -0.014260315336287022, -0.0015640963101759553, -0.011500784195959568, -0.0004832212289329618, 0.03358498215675354, -0.02121628262102604, 0.002003867644816637, 0.01582854799926281, 0.02126019448041916, -0.03382021561264992, 0.0663372129201889, -0.05004070699214935, 0.027547689154744148, -0.010440410114824772, -0.0566236637532711, -0.06700128316879272, 0.022010289132595062, -0.05001915246248245, -0.020044397562742233, -0.013076364062726498, -0.07796800136566162, -0.0361621156334877, 0.013671432621777058, 0.08713629841804504, -0.0034078327007591724, 0.06327235698699951, 0.0028910753317177296, 0.09142366051673889, 0.011225434020161629, -0.027575256302952766, -0.022276420146226883, 0.02717745117843151, -0.016669167205691338, -0.03967168927192688, 0.10739932954311371, -0.018755285069346428, -0.05412536859512329, -0.10319327563047409, 0.02324855886399746, 0.08951698988676071, 0.03488351032137871, -0.014848318882286549, 0.042622700333595276, 0.014207444153726101, -0.029687896370887756, -0.056888557970523834, 0.005102095194160938, -0.016700895503163338, 0.04366592690348625, -0.004118717275559902, 0.06645689904689789, 0.050910379737615585, 0.031634166836738586, -0.038412708789110184, 0.03278458118438721, -0.04199216887354851, 0.03658396750688553, -0.008937853388488293, 0.07762503623962402, 0.01874532923102379, -0.006470437627285719, 0.03895719721913338, -0.023364728316664696, -0.015749836340546608, -0.003462469205260277, 0.03493565693497658, 0.027024701237678528, 0.10759695619344711, 0.029953014105558395, -0.06042573228478432, -6.139063695549537e-33, 0.021298985928297043, -0.041967231780290604, -0.018358085304498672, 0.0677557960152626, 0.04693179577589035, 0.017641210928559303, -0.022762181237339973, -0.06089301034808159, 0.07824107259511948, 0.007691361475735903, -0.03604733943939209, 0.005439638625830412, 0.010289672762155533, -0.05213775113224983, 0.038888875395059586, -0.04608791694045067, 0.009419971145689487, -0.09577471017837524, 0.0462486557662487, 0.038641322404146194, 0.040720134973526, -0.0074728974141180515, -0.04210870712995529, 0.024837782606482506, -0.02280684933066368, 0.013278312049806118, -0.10059375315904617, -0.04997735470533371, -0.04325438663363457, 0.01941043511033058, -0.012625065632164478, -0.04075276106595993, -0.0019296880345791578, 0.04344815015792847, 0.05055657774209976, -0.07879066467285156, -0.009558080695569515, 0.1368882805109024, 0.017964357510209084, 0.10649431496858597, -0.005524728912860155, 0.012797319330275059, -0.08210085332393646, 0.07226936519145966, -0.008614682592451572, 0.041471969336271286, -0.0095349857583642, -0.060573894530534744, -0.11618702113628387, 0.06140347197651863, -0.13223569095134735, 0.012534267269074917, 0.001961521804332733, 0.10578891634941101, 0.06374985724687576, 0.038899634033441544, 0.049208864569664, 0.0420854389667511, 0.023618508130311966, 0.03356359526515007, 0.08781976252794266, -0.027320699766278267, -0.05175118148326874, -0.08848710358142853, 0.020422251895070076, 0.044665250927209854, 0.04362592473626137, -0.09454458951950073, 0.013328216038644314, 0.024504801258444786, -0.03684365004301071, 0.0391155406832695, -0.03995177149772644, -0.006600102409720421, 0.022932417690753937, -0.023188961669802666, 0.0601731538772583, -0.05528493598103523, -0.0003697747306432575, 0.09472288936376572, -0.085441455245018, 0.11190459877252579, -0.04054301977157593, 0.06434967368841171, 0.01612437702715397, -0.031837597489356995, 0.008633245714008808, -0.059738755226135254, 0.08690939098596573, 0.03323240205645561, -0.05428842455148697, -0.03436777740716934, -0.02899487316608429, -0.006145327351987362, -0.1033591702580452, -5.959000759503397e-8, -0.024219952523708344, -0.006002654321491718, -0.04638443887233734, 0.08555981516838074, 0.017132632434368134, 0.02889835089445114, -0.0360976904630661, 0.029998021200299263, -0.007331955246627331, 0.012898579239845276, 0.12277284264564514, 0.026169637218117714, 0.026693783700466156, -0.08594733476638794, 0.08254587650299072, -0.0728592798113823, 0.05357855558395386, -0.027044136077165604, -0.08868967741727829, -0.0681895986199379, -0.02850182354450226, 0.031484249979257584, -0.0007263030274771154, 0.0554368793964386, -0.006022677291184664, -0.017560428008437157, 0.20155788958072662, 0.020900407806038857, -0.00997181050479412, 0.02338247001171112, -0.09669803082942963, -0.010793904773890972, -0.035474106669425964, 0.048898328095674515, -0.04964609816670418, 0.07723228633403778, -0.10421383380889893, 0.05363338068127632, 0.049981728196144104, 0.02918136492371559, 0.04750094935297966, 0.031172193586826324, 0.015397892333567142, -0.014249094761908054, -0.01316598430275917, 0.0629720538854599, -0.06644421815872192, 0.037344444543123245, 0.05163450539112091, -0.01067569199949503, -0.06274095177650452, -0.005958870053291321, 0.01577884890139103, 0.1741136908531189, 0.03197413682937622, 0.0025776911061257124, -0.0177410040050745, -0.08276958763599396, 0.027619479224085808, -0.03795761242508888, 0.09894482791423798, 0.051188331097364426, -0.026946362107992172, -0.04493660479784012 ]
0.078528
version of the `kube-apiserver` is rolled out, albeit potentially with thrashing while there is a mixed population of servers. Maintenance of a suggested configuration object consists of creating it --- with the server's suggested spec --- if the object does not exist. OTOH, if the object already exists, maintenance behavior depends on whether the `kube-apiservers` or the users control the object. In the former case, the server ensures that the object's spec is what the server suggests; in the latter case, the spec is left alone. The question of who controls the object is answered by first looking for an annotation with key `apf.kubernetes.io/autoupdate-spec`. If there is such an annotation and its value is `true` then the kube-apiservers control the object. If there is such an annotation and its value is `false` then the users control the object. If neither of those conditions holds then the `metadata.generation` of the object is consulted. If that is 1 then the kube-apiservers control the object. Otherwise the users control the object. These rules were introduced in release 1.22 and their consideration of `metadata.generation` is for the sake of migration from the simpler earlier behavior. Users who wish to control a suggested configuration object should set its `apf.kubernetes.io/autoupdate-spec` annotation to `false`. Maintenance of a mandatory or suggested configuration object also includes ensuring that it has an `apf.kubernetes.io/autoupdate-spec` annotation that accurately reflects whether the kube-apiservers control the object. Maintenance also includes deleting objects that are neither mandatory nor suggested but are annotated `apf.kubernetes.io/autoupdate-spec=true`. ## Health check concurrency exemption The suggested configuration gives no special treatment to the health check requests on kube-apiservers from their local kubelets --- which tend to use the secured port but supply no credentials. With the suggested config, these requests get assigned to the `global-default` FlowSchema and the corresponding `global-default` priority level, where other traffic can crowd them out. If you add the following additional FlowSchema, this exempts those requests from rate limiting. {{< caution >}} Making this change also allows any hostile party to then send health-check requests that match this FlowSchema, at any volume they like. If you have a web traffic filter or similar external security mechanism to protect your cluster's API server from general internet traffic, you can configure rules to block any health check requests that originate from outside your cluster. {{< /caution >}} {{% code\_sample file="priority-and-fairness/health-for-strangers.yaml" %}} ## Observability ### Metrics {{< note >}} In versions of Kubernetes before v1.20, the labels `flow\_schema` and `priority\_level` were inconsistently named `flowSchema` and `priorityLevel`, respectively. If you're running Kubernetes versions v1.19 and earlier, you should refer to the documentation for your version. {{< /note >}} When you enable the API Priority and Fairness feature, the kube-apiserver exports additional metrics. Monitoring these can help you determine whether your configuration is inappropriately throttling important traffic, or find poorly-behaved workloads that may be harming system health. #### Maturity level BETA \* `apiserver\_flowcontrol\_rejected\_requests\_total` is a counter vector (cumulative since server start) of requests that were rejected, broken down by the labels `flow\_schema` (indicating the one that matched the request), `priority\_level` (indicating the one to which the request was assigned), and `reason`. The `reason` label will be one of the following values: \* `queue-full`, indicating that too many requests were already queued. \* `concurrency-limit`, indicating that the PriorityLevelConfiguration is configured to reject rather than queue excess requests. \* `time-out`, indicating that the request was still in the queue when its queuing time limit expired. \* `cancelled`, indicating that the request is not purge locked and has been ejected from the queue. \* `apiserver\_flowcontrol\_dispatched\_requests\_total` is a counter vector (cumulative since server start) of requests
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.03132990002632141, 0.028088990598917007, 0.025543374940752983, 0.01589195244014263, -0.016005156561732292, -0.04178043082356453, 0.026096655055880547, -0.06068192049860954, 0.06966549158096313, 0.1067991778254509, -0.03798384964466095, -0.04885849356651306, -0.027600696310400963, -0.08467375487089157, 0.018687931820750237, 0.043852612376213074, 0.08278167247772217, -0.07994499057531357, -0.06373514980077744, -0.01096381526440382, -0.01158776693046093, -0.021316949278116226, 0.0019810867961496115, 0.013025774620473385, -0.08117600530385971, 0.014879439026117325, -0.021869083866477013, -0.02961808443069458, 0.029860280454158783, -0.03258560225367546, -0.07199843227863312, 0.05649124085903168, -0.03602730855345726, 0.02463502623140812, -0.008014329709112644, 0.0582922138273716, 0.01707644574344158, -0.02313699573278427, 0.008623180910944939, 0.06776022166013718, 0.009431459940969944, -0.03979167342185974, -0.07672282308340073, 0.00524349557235837, -0.012615836225450039, 0.05072321370244026, -0.028703007847070694, -0.05925888940691948, -0.06873631477355957, -0.045644160360097885, 0.05065661668777466, -0.05057251825928688, 0.042180512100458145, 0.03909185528755188, 0.1085900068283081, 0.02255011536180973, 0.03250639885663986, 0.013229645788669586, 0.0452304370701313, 0.043123770505189896, 0.025025827810168266, 0.01265726052224636, 0.01871432736515999, 0.01947924494743347, 0.03757674992084503, -0.007833831012248993, 0.06777855008840561, -0.07621452957391739, 0.015614496544003487, -0.028418350964784622, 0.01195494830608368, 0.0033428706228733063, -0.009589116089046001, -0.020937081426382065, 0.01252809353172779, 0.08352822810411453, -0.07057680189609528, 0.055404674261808395, 0.031224006786942482, -0.13830351829528809, 0.027591900900006294, 0.07194720953702927, 0.05422375351190567, -0.021207543089985847, -0.06425850093364716, -0.04791935905814171, 0.04271829128265381, 0.015071122907102108, 0.058716777712106705, 0.06737802922725677, 0.03309008851647377, -0.08083327114582062, 0.05450262874364853, -0.08286973834037781, 0.01857079192996025, 0.03928934037685394, -0.0418425090610981, -0.02457134611904621, 0.00773043604567647, 0.012892245315015316, 0.035412490367889404, 0.048828426748514175, -0.009029345586895943, 0.02562185563147068, 0.04686811938881874, -0.03994274511933327, -0.08367565274238586, 0.019515061751008034, 0.03585094213485718, 0.10435349494218826, -0.03542565554380417, 0.07635260373353958, 0.003426111303269863, -0.022515982389450073, -0.02890181541442871, -0.0008509785984642804, -0.013865724205970764, 0.035005439072847366, 0.050049830228090286, 0.02549789845943451, 0.03292851150035858, -0.08326122164726257, 0.03652781620621681, 0.019173042848706245, -0.016917670145630836, 0.06757180392742157, -0.0186840258538723, 6.671610941943012e-34, 0.056217730045318604, -0.040743887424468994, 0.02235589735209942, -0.05436424911022186, -0.05080985650420189, -0.051674749702215195, -0.032404422760009766, -0.04805567488074303, 0.022010227665305138, -0.08965540677309036, 0.0014782254584133625, 0.04722711071372032, -0.043949875980615616, -0.03045085072517395, 0.040125858038663864, 0.003382845316082239, -0.03499139845371246, 0.07123680412769318, 0.03266187757253647, 0.02196331135928631, 0.017303692176938057, -0.032097090035676956, -0.07836061716079712, 0.03012136183679104, 0.036959391087293625, 0.0438709631562233, 0.028692372143268585, 0.0052683609537780285, -0.10213886946439743, 0.03157629445195198, 0.0030457228422164917, -0.050709836184978485, 0.007705226074904203, 0.06082284450531006, -0.14634135365486145, -0.04767569527029991, -0.04731987789273262, 0.005764610134065151, -0.05565173551440239, -0.08810959756374359, 0.020520508289337158, 0.0009624532540328801, -0.038723018020391464, -0.02019750513136387, 0.026010461151599884, -0.09809054434299469, -0.00630215834826231, -0.031554508954286575, -0.012479043565690517, 0.03035840392112732, 0.008840198628604412, 0.003107293974608183, 0.052064307034015656, -0.027168110013008118, 0.008469040505588055, 0.05520278960466385, 0.12452292442321777, -0.07896161824464798, -0.031278327107429504, -0.007941016927361488, 0.04282333701848984, -0.010522862896323204, -0.046446338295936584, 0.024679698050022125, 0.021566223353147507, 0.037709370255470276, 0.012670529074966908, -0.007996140979230404, -0.022000500932335854, -0.016995683312416077, -0.03387516364455223, 0.04394140839576721, -0.089675173163414, 0.01807953044772148, -0.054892681539058685, -0.0843544527888298, 0.037763096392154694, 0.012239093892276287, -0.10843215137720108, 0.012564650736749172, 0.02626105025410652, 0.015759455040097237, 0.024566082283854485, 0.10154020041227341, -0.05730901658535004, -0.026313984766602516, -0.006281940266489983, 0.0541878305375576, -0.06643328815698624, 0.041158828884363174, 0.04847284406423569, -0.005502551328390837, -0.10013208538293839, 0.052553676068782806, -0.03946447744965553, -1.8337902890659694e-33, 0.09995071589946747, -0.033685412257909775, -0.04166919365525246, 0.05424303188920021, 0.004724210128188133, 0.017115801572799683, -0.08128050714731216, 0.07387982308864594, -0.060711439698934555, -0.10371453315019608, -0.028052810579538345, -0.04905649274587631, -0.029553605243563652, -0.02908945269882679, -0.042851004749536514, -0.011438537389039993, -0.09720805287361145, -0.05232465639710426, -0.04385943338274956, 0.06201643869280815, -0.025088977068662643, -0.0032343375496566296, 0.06269171088933945, 0.019758600741624832, -0.02960163913667202, 0.007705725729465485, -0.03593369573354721, 0.04330400377511978, -0.06637512147426605, -0.04758546128869057, 0.03119073435664177, -0.11554958671331406, -0.010914652608335018, 0.006760954856872559, -0.015604819171130657, -0.0712139680981636, 0.0139567069709301, 0.03459519147872925, -0.055612094700336456, 0.09640027582645416, 0.04702981188893318, 0.09755309671163559, -0.049567077308893204, 0.006168470252305269, -0.04787105694413185, 0.01650499738752842, -0.02227887697517872, -0.009993850253522396, 0.015515523962676525, -0.12951423227787018, -0.013304999098181725, -0.006770061329007149, 0.047878194600343704, 0.04834236204624176, -0.05817967653274536, 0.06893604248762131, 0.042752232402563095, 0.05295083299279213, -0.020908277481794357, 0.07069914788007736, 0.014162481762468815, -0.0009144555660896003, 0.12355636805295944, 0.07109425216913223, -0.046286724507808685, 0.046577926725149155, 0.06307162344455719, -0.013520495966076851, 0.03849990293383598, 0.041920121759176254, 0.10700201243162155, -0.045527953654527664, -0.08188796788454056, -0.004751215688884258, 0.0863402783870697, -0.005379693582653999, -0.0193122997879982, -0.07058391720056534, 0.04404463618993759, -0.013061133213341236, -0.050072915852069855, 0.038590967655181885, -0.06214159354567528, 0.06292612105607986, -0.008521158248186111, -0.044817086309194565, 0.03112848475575447, 0.021297752857208252, 0.028288373723626137, 0.06668555736541748, 0.015112016350030899, 0.02631593868136406, -0.14061672985553741, 0.02588144689798355, -0.08442524075508118, -5.590253948639656e-8, 0.03475111350417137, 0.04051955044269562, -0.01012613158673048, 0.03223491832613945, 0.10965106636285782, -0.03957867994904518, 0.03960685431957245, 0.004427035339176655, 0.021024122834205627, -0.004950643517076969, -0.000015283354514394887, 0.018670137971639633, -0.05333523824810982, 0.009280635975301266, 0.04605802148580551, -0.010031032375991344, 0.010585522279143333, 0.04360198602080345, -0.0713297426700592, -0.013968462124466896, -0.049963679164648056, -0.024454616010189056, 0.044946007430553436, -0.04892123490571976, 0.07762937992811203, 0.04815778508782387, 0.10508701205253601, 0.05506128817796707, 0.0720323920249939, 0.08707732707262039, -0.05308784544467926, 0.0415053553879261, -0.0620647668838501, 0.012343103997409344, 0.0004404478531796485, 0.08183236420154572, -0.10741937160491943, 0.001034157699905336, 0.016886884346604347, 0.09202934056520462, 0.004449801053851843, 0.011823329143226147, -0.07435903698205948, 0.027502516284585, 0.08569656312465668, 0.10064715147018433, -0.017465798184275627, 0.018287528306245804, -0.0956493392586708, -0.08158091455698013, -0.030979137867689133, -0.059259332716464996, -0.010473018512129784, 0.08461985737085342, -0.11394214630126953, 0.022749319672584534, 0.0344819612801075, -0.04109684005379677, 0.0700552687048912, -0.03164279833436012, -0.008300707675516605, 0.022943619638681412, 0.007002466823905706, -0.0007249010377563536 ]
0.20219
than queue excess requests. \* `time-out`, indicating that the request was still in the queue when its queuing time limit expired. \* `cancelled`, indicating that the request is not purge locked and has been ejected from the queue. \* `apiserver\_flowcontrol\_dispatched\_requests\_total` is a counter vector (cumulative since server start) of requests that began executing, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_current\_inqueue\_requests` is a gauge vector holding the instantaneous number of queued (not executing) requests, broken down by `priority\_level` and `flow\_schema`. \* `apiserver\_flowcontrol\_current\_executing\_requests` is a gauge vector holding the instantaneous number of executing (not waiting in a queue) requests, broken down by `priority\_level` and `flow\_schema`. \* `apiserver\_flowcontrol\_current\_executing\_seats` is a gauge vector holding the instantaneous number of occupied seats, broken down by `priority\_level` and `flow\_schema`. \* `apiserver\_flowcontrol\_request\_wait\_duration\_seconds` is a histogram vector of how long requests spent queued, broken down by the labels `flow\_schema`, `priority\_level`, and `execute`. The `execute` label indicates whether the request has started executing. {{< note >}} Since each FlowSchema always assigns requests to a single PriorityLevelConfiguration, you can add the histograms for all the FlowSchemas for one priority level to get the effective histogram for requests assigned to that priority level. {{< /note >}} \* `apiserver\_flowcontrol\_nominal\_limit\_seats` is a gauge vector holding each priority level's nominal concurrency limit, computed from the API server's total concurrency limit and the priority level's configured nominal concurrency shares. #### Maturity level ALPHA \* `apiserver\_current\_inqueue\_requests` is a gauge vector of recent high water marks of the number of queued requests, grouped by a label named `request\_kind` whose value is `mutating` or `readOnly`. These high water marks describe the largest number seen in the one second window most recently completed. These complement the older `apiserver\_current\_inflight\_requests` gauge vector that holds the last window's high water mark of number of requests actively being served. \* `apiserver\_current\_inqueue\_seats` is a gauge vector of the sum over queued requests of the largest number of seats each will occupy, grouped by labels named `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_read\_vs\_write\_current\_requests` is a histogram vector of observations, made at the end of every nanosecond, of the number of requests broken down by the labels `phase` (which takes on the values `waiting` and `executing`) and `request\_kind` (which takes on the values `mutating` and `readOnly`). Each observed value is a ratio, between 0 and 1, of the number of requests divided by the corresponding limit on the number of requests (queue volume limit for waiting and concurrency limit for executing). \* `apiserver\_flowcontrol\_request\_concurrency\_in\_use` is a gauge vector holding the instantaneous number of occupied seats, broken down by `priority\_level` and `flow\_schema`. \* `apiserver\_flowcontrol\_priority\_level\_request\_utilization` is a histogram vector of observations, made at the end of each nanosecond, of the number of requests broken down by the labels `phase` (which takes on the values `waiting` and `executing`) and `priority\_level`. Each observed value is a ratio, between 0 and 1, of a number of requests divided by the corresponding limit on the number of requests (queue volume limit for waiting and concurrency limit for executing). \* `apiserver\_flowcontrol\_priority\_level\_seat\_utilization` is a histogram vector of observations, made at the end of each nanosecond, of the utilization of a priority level's concurrency limit, broken down by `priority\_level`. This utilization is the fraction (number of seats occupied) / (concurrency limit). This metric considers all stages of execution (both normal and the extra delay at the end of a write to cover for the corresponding notification work) of all requests except WATCHes; for those it considers only the initial stage that delivers notifications of pre-existing objects. Each histogram in the vector is also labeled with `phase: executing` (there is no seat limit for the waiting phase). \* `apiserver\_flowcontrol\_request\_queue\_length\_after\_enqueue`
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.0878056064248085, -0.012147439643740654, -0.05018456280231476, 0.05542892590165138, -0.007774305529892445, -0.044557325541973114, 0.024806521832942963, -0.052854858338832855, 0.06765136867761612, 0.028764469549059868, -0.00816640816628933, 0.0058141532354056835, 0.0064545865170657635, -0.05448243021965027, -0.02368859574198723, 0.01638585701584816, 0.028893323615193367, -0.11806012690067291, -0.07666580379009247, 0.014099999330937862, 0.029127899557352066, 0.04363416135311127, -0.07821682840585709, 0.0395253449678421, -0.04733912646770477, -0.00433551799505949, -0.06570897996425629, -0.0700598657131195, 0.051778990775346756, 0.023174729198217392, -0.03060867264866829, 0.029895994812250137, -0.0739237368106842, 0.04423981159925461, -0.04784086346626282, 0.04608640447258949, 0.011917132884263992, -0.08230656385421753, -0.009878828190267086, 0.05756225809454918, 0.019032299518585205, -0.015005399473011494, -0.10174824297428131, 0.011868031695485115, 0.009255442768335342, 0.07378476113080978, -0.07412215322256088, -0.06241675838828087, -0.1210835874080658, 0.026753852143883705, -0.04786502942442894, 0.0006032067467458546, -0.02735201269388199, 0.025747448205947876, 0.03702959790825844, -0.043720170855522156, 0.0027550230734050274, -0.030530592426657677, -0.05367617309093475, -0.005292876623570919, -0.053932253271341324, -0.05460532382130623, -0.005218774080276489, 0.0750630721449852, 0.0009201146895065904, -0.03121381253004074, -0.051217250525951385, -0.00014210223162081093, 0.11865369230508804, -0.05111348628997803, -0.02930477447807789, 0.002350475173443556, -0.09064042568206787, -0.033355243504047394, 0.032625291496515274, 0.02126125991344452, 0.04451413080096245, -0.00981869362294674, -0.03403128311038017, -0.10145691782236099, 0.02786153368651867, 0.025869423523545265, -0.03220893070101738, 0.01695081777870655, -0.012899012304842472, 0.030923636630177498, 0.0466429777443409, -0.024569310247898102, 0.0710127204656601, 0.03234735131263733, 0.04250403493642807, 0.024660833179950714, 0.0028988411650061607, 0.015320858918130398, 0.16022604703903198, 0.09884446859359741, -0.013461488299071789, -0.012412859126925468, -0.02651749551296234, 0.02157110907137394, 0.05934693291783333, 0.01715059205889702, -0.030971797183156013, -0.01806657575070858, -0.006424476858228445, -0.034759629517793655, -0.041050806641578674, 0.05146181210875511, -0.006570290308445692, -0.04482995718717575, 0.00304419849999249, -0.022355301305651665, 0.039250198751688004, -0.052149318158626556, -0.021197210997343063, 0.07767585664987564, -0.019733024761080742, -0.019834378734230995, 0.024260710924863815, 0.05200308561325073, 0.006141349207609892, 0.00413012458011508, -0.01498879212886095, -0.1164250299334526, -0.03285373002290726, 0.051355063915252686, 0.04526817426085472, -1.619582892251501e-33, -0.05784976854920387, -0.10572323203086853, -0.06354978680610657, 0.008564298041164875, 0.03925701975822449, 0.030554383993148804, 0.06465961784124374, 0.056167006492614746, 0.02929423190653324, 0.01767796277999878, -0.04168350249528885, -0.015376623719930649, -0.04802805557847023, 0.05790606513619423, -0.017150351777672768, -0.08422588557004929, 0.039550524204969406, 0.03288853168487549, 0.028633754700422287, -0.005843029823154211, 0.07978519797325134, -0.01917933113873005, -0.11553055047988892, 0.05508046597242355, 0.036733418703079224, -0.016926735639572144, -0.02981400303542614, 0.015126045793294907, -0.11417243629693985, 0.023723723366856575, 0.03709975630044937, 0.02273198962211609, -0.06792636960744858, 0.03732002526521683, -0.01990063674747944, 0.015194714069366455, 0.01418243907392025, -0.012556401081383228, 0.010215983726084232, -0.087089903652668, -0.07151556760072708, -0.0021259940695017576, -0.10257117450237274, -0.00022153773170430213, -0.10083170980215073, -0.14160341024398804, -0.06226787716150284, -0.055218592286109924, -0.02164539135992527, 0.0027440800331532955, 0.013361720368266106, 0.06236270070075989, 0.11207227408885956, 0.020703580230474472, 0.01147534977644682, -0.03507378324866295, 0.03427344933152199, 0.020155582576990128, -0.06758542358875275, 0.06825151294469833, 0.01749579794704914, 0.01787274330854416, -0.03235970810055733, -0.023313166573643684, 0.07345318794250488, 0.03009578213095665, -0.02501934953033924, 0.031278904527425766, 0.05886984243988991, 0.03183140605688095, -0.049453750252723694, 0.07158739864826202, 0.04543893039226532, 0.003642674768343568, -0.04587123543024063, -0.03673253208398819, 0.03384338319301605, -0.03795541822910309, -0.043112434446811676, 0.01780802570283413, -0.06807007640600204, -0.00312887504696846, 0.03112323209643364, 0.012429149821400642, -0.05892553925514221, 0.02823340706527233, 0.025468017905950546, -0.06297408789396286, -0.014510913752019405, -0.041246626526117325, -0.008871881291270256, 0.006119008641690016, -0.04426996409893036, -0.010665418580174446, -0.03362303227186203, -1.591959142349162e-33, 0.004654237534850836, -0.014783254824578762, -0.09213350713253021, 0.03149575740098953, 0.019395677372813225, -0.05048491805791855, 0.0016646423609927297, 0.05879608169198036, 0.039155229926109314, -0.013875920325517654, -0.026359200477600098, 0.060104113072156906, 0.029507748782634735, 0.0004624188004527241, 0.07390770316123962, -0.026056358590722084, -0.07986623048782349, -0.08466606587171555, -0.02915538102388382, 0.09401857107877731, -0.028641214594244957, 0.03454264625906944, -0.06212367117404938, -0.045241065323352814, -0.028121132403612137, 0.03339207544922829, -0.03443581983447075, -0.002742921933531761, 0.01473294012248516, -0.020628470927476883, 0.06733708828687668, -0.1278417855501175, 0.014057298190891743, 0.09645450115203857, 0.007262547966092825, -0.09037043899297714, 0.0658416822552681, 0.044585470110177994, -0.019197506830096245, 0.005778443533927202, 0.055751316249370575, 0.015516111627221107, 0.020845985040068626, 0.04416642710566521, 0.03186934441328049, 0.07934214919805527, -0.03643049672245979, -0.03874962031841278, -0.029818810522556305, -0.04489491879940033, -0.04265817627310753, 0.06347682327032089, 0.013269046321511269, 0.17101570963859558, -0.000006686922461085487, 0.01097211055457592, -0.010608038865029812, -0.02412479929625988, -0.0009679719805717468, 0.02296157367527485, 0.08157895505428314, 0.0514204204082489, 0.009142221882939339, 0.007998893968760967, 0.062139034271240234, 0.0040678661316633224, -0.054689932614564896, -0.05178087577223778, -0.01816284842789173, 0.003782271407544613, 0.056879427284002304, 0.04183971509337425, -0.07500378787517548, 0.040295131504535675, 0.029047738760709763, -0.052655596286058426, -0.028026586398482323, -0.04960644990205765, -0.0037422648165374994, 0.043248120695352554, -0.09437582641839981, 0.03954513370990753, 0.019289089366793633, 0.09289612621068954, 0.007674596272408962, -0.03244917467236519, -0.019465724006295204, 0.017473386600613594, 0.015026277862489223, 0.011907573789358139, 0.003429624019190669, -0.03307178243994713, -0.09235703945159912, 0.02340811677277088, -0.008214924484491348, -4.61797498019223e-8, -0.020075829699635506, -0.04762427881360054, 0.014497406780719757, -0.0126063646748662, 0.094412662088871, 0.016448508948087692, -0.005276785232126713, 0.068636454641819, -0.03345080465078354, 0.028446586802601814, 0.0674823746085167, -0.012656614184379578, -0.03151508420705795, -0.10373716056346893, 0.049802374094724655, -0.012658055871725082, -0.04242689535021782, 0.02999984472990036, 0.0043417299166321754, -0.11067802459001541, -0.018052227795124054, 0.01254407037049532, -0.013454766944050789, -0.032556526362895966, -0.018643997609615326, -0.013249717652797699, 0.15320003032684326, 0.09283622354269028, 0.0012746272841468453, -0.062495164573192596, -0.06732886284589767, 0.03179214894771576, 0.09372124075889587, -0.03555959090590477, 0.018807772547006607, 0.11407974362373352, -0.08410311490297318, -0.03950100392103195, -0.001458348473533988, 0.06587664783000946, -0.0022043325006961823, 0.002961480990052223, 0.010695675387978554, 0.02110140025615692, 0.11600670218467712, 0.040905922651290894, -0.03732145577669144, 0.05988350138068199, -0.0055389804765582085, -0.03282257914543152, -0.07520749419927597, 0.062842458486557, -0.044093258678913116, 0.1733880490064621, -0.054219748824834824, -0.02216220274567604, -0.022751007229089737, -0.0649196207523346, -0.022159770131111145, 0.03676203638315201, 0.04219342768192291, 0.08609940856695175, 0.013983845710754395, -0.022739937528967857 ]
0.223577
a write to cover for the corresponding notification work) of all requests except WATCHes; for those it considers only the initial stage that delivers notifications of pre-existing objects. Each histogram in the vector is also labeled with `phase: executing` (there is no seat limit for the waiting phase). \* `apiserver\_flowcontrol\_request\_queue\_length\_after\_enqueue` is a histogram vector of queue lengths for the queues, broken down by `priority\_level` and `flow\_schema`, as sampled by the enqueued requests. Each request that gets queued contributes one sample to its histogram, reporting the length of the queue immediately after the request was added. Note that this produces different statistics than an unbiased survey would. {{< note >}} An outlier value in a histogram here means it is likely that a single flow (i.e., requests by one user or for one namespace, depending on configuration) is flooding the API server, and being throttled. By contrast, if one priority level's histogram shows that all queues for that priority level are longer than those for other priority levels, it may be appropriate to increase that PriorityLevelConfiguration's concurrency shares. {{< /note >}} \* `apiserver\_flowcontrol\_request\_concurrency\_limit` is the same as `apiserver\_flowcontrol\_nominal\_limit\_seats`. Before the introduction of concurrency borrowing between priority levels, this was always equal to `apiserver\_flowcontrol\_current\_limit\_seats` (which did not exist as a distinct metric). \* `apiserver\_flowcontrol\_lower\_limit\_seats` is a gauge vector holding the lower bound on each priority level's dynamic concurrency limit. \* `apiserver\_flowcontrol\_upper\_limit\_seats` is a gauge vector holding the upper bound on each priority level's dynamic concurrency limit. \* `apiserver\_flowcontrol\_demand\_seats` is a histogram vector counting observations, at the end of every nanosecond, of each priority level's ratio of (seat demand) / (nominal concurrency limit). A priority level's seat demand is the sum, over both queued requests and those in the initial phase of execution, of the maximum of the number of seats occupied in the request's initial and final execution phases. \* `apiserver\_flowcontrol\_demand\_seats\_high\_watermark` is a gauge vector holding, for each priority level, the maximum seat demand seen during the last concurrency borrowing adjustment period. \* `apiserver\_flowcontrol\_demand\_seats\_average` is a gauge vector holding, for each priority level, the time-weighted average seat demand seen during the last concurrency borrowing adjustment period. \* `apiserver\_flowcontrol\_demand\_seats\_stdev` is a gauge vector holding, for each priority level, the time-weighted population standard deviation of seat demand seen during the last concurrency borrowing adjustment period. \* `apiserver\_flowcontrol\_demand\_seats\_smoothed` is a gauge vector holding, for each priority level, the smoothed enveloped seat demand determined at the last concurrency adjustment. \* `apiserver\_flowcontrol\_target\_seats` is a gauge vector holding, for each priority level, the concurrency target going into the borrowing allocation problem. \* `apiserver\_flowcontrol\_seat\_fair\_frac` is a gauge holding the fair allocation fraction determined in the last borrowing adjustment. \* `apiserver\_flowcontrol\_current\_limit\_seats` is a gauge vector holding, for each priority level, the dynamic concurrency limit derived in the last adjustment. \* `apiserver\_flowcontrol\_request\_execution\_seconds` is a histogram vector of how long requests took to actually execute, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_watch\_count\_samples` is a histogram vector of the number of active WATCH requests relevant to a given write, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_work\_estimated\_seats` is a histogram vector of the number of estimated seats (maximum of initial and final stage of execution) associated with requests, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_request\_dispatch\_no\_accommodation\_total` is a counter vector of the number of events that in principle could have led to a request being dispatched but did not, due to lack of available concurrency, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_epoch\_advance\_total` is a counter vector of the number of attempts to jump a priority level's progress meter backward to avoid numeric overflow, grouped by `priority\_level` and `success`. ## Good practices
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.057554442435503006, 0.01501454971730709, -0.014234945178031921, 0.03316860273480415, 0.005752516444772482, -0.06072135642170906, 0.04918704926967621, -0.041410475969314575, 0.10793016105890274, 0.039554063230752945, -0.07470406591892242, -0.05278177186846733, 0.024708282202482224, -0.08526942878961563, -0.01920456811785698, -0.03872206062078476, 0.1460375189781189, -0.12193688750267029, -0.06602051109075546, -0.05902855470776558, 0.02414923720061779, 0.023549478501081467, -0.017257751896977425, 0.04103566333651543, -0.0733613520860672, -0.021389812231063843, -0.030574971809983253, -0.07452209293842316, 0.0261447262018919, -0.0046212258748710155, -0.02138858661055565, 0.021414244547486305, -0.012140384875237942, 0.033381905406713486, -0.015691285952925682, -0.01678246632218361, 0.019153691828250885, -0.06390171498060226, 0.01981002651154995, 0.031565111130476, 0.06276240944862366, 0.020221812650561333, -0.06599634885787964, 0.007827771827578545, -0.024097885936498642, 0.025493603199720383, -0.051711518317461014, -0.03633204102516174, -0.10544493794441223, 0.022836945950984955, -0.0214618518948555, -0.04057343304157257, 0.026386594399809837, -0.02069922164082527, 0.07657186686992645, -0.10525216907262802, -0.008763615041971207, -0.047277480363845825, -0.024448998272418976, -0.006572980433702469, -0.01271003670990467, -0.09129902720451355, -0.023128831759095192, 0.053401026874780655, 0.0024608271196484566, -0.010316937230527401, -0.01585131138563156, 0.07300147414207458, 0.09910720586776733, -0.008868993259966373, 0.038558654487133026, 0.050581518560647964, -0.044787727296352386, 0.00037712458288297057, 0.034158188849687576, -0.016789471730589867, -0.005246673710644245, -0.0011616110568866134, -0.0405292734503746, -0.12161142379045486, -0.03454038128256798, 0.02881031110882759, 0.029418084770441055, 0.015112579800188541, 0.036489374935626984, -0.019856002181768417, 0.048186711966991425, 0.004448037128895521, 0.046936262398958206, 0.001425931928679347, 0.03763802349567413, 0.03099764510989189, -0.06317675858736038, 0.0008460016106255352, 0.08753502368927002, 0.08638329803943634, -0.01756286434829235, -0.03967117518186569, 0.03088938444852829, 0.03970178961753845, 0.07700756192207336, 0.00117756356485188, -0.013917901553213596, 0.045572806149721146, 0.06322836130857468, -0.03536008298397064, -0.048895902931690216, 0.05548010766506195, -0.03142685443162918, 0.017350424081087112, -0.015501870773732662, -0.014455676078796387, 0.1133507490158081, -0.03786270320415497, -0.0167765524238348, 0.06780967116355896, -0.004567698109894991, -0.0061760577373206615, -0.025912636891007423, 0.046947091817855835, 0.04878949746489525, 0.000018548855223343708, -0.02290564589202404, -0.07252347469329834, 0.04314998909831047, 0.05351027101278305, 0.021136436611413956, 4.000364130875682e-33, 0.016955137252807617, -0.05124354735016823, 0.0012793142814189196, -0.059707000851631165, 0.0001269755739485845, 0.055091846734285355, 0.010805140249431133, 0.027044126763939857, 0.06661352515220642, -0.044446639716625214, -0.050216734409332275, 0.042928554117679596, 0.011691045947372913, 0.06322471052408218, -0.045940663665533066, -0.06523597985506058, 0.00778545206412673, 0.034613143652677536, -0.023341281339526176, 0.006435568910092115, -0.0178498774766922, -0.0996495708823204, -0.10481367260217667, 0.0501147024333477, 0.0009539912571199238, 0.005251032765954733, -0.039681579917669296, 0.009789420291781425, -0.0816958099603653, 0.05231019854545593, 0.03198383003473282, 0.06024618074297905, -0.05473614111542702, 0.0055544753558933735, -0.029395464807748795, -0.03521981090307236, 0.0044917697086930275, 0.028524570167064667, 0.011798804625868797, -0.05744941160082817, -0.03997909650206566, 0.011913927271962166, -0.1028137132525444, -0.00616674916818738, -0.16659021377563477, -0.06941685825586319, -0.06898260861635208, -0.03561980649828911, 0.01578434184193611, -0.06116730719804764, 0.08489194512367249, 0.043106045573949814, 0.13107770681381226, -0.004365585278719664, 0.03434176370501518, -0.011515984311699867, 0.06852958351373672, -0.009533068165183067, -0.035232413560152054, 0.12417574971914291, -0.0024570422247052193, -0.050777386873960495, -0.009135051630437374, -0.0028959112241864204, 0.0962388813495636, 0.047467924654483795, 0.0051072994247078896, 0.04815569519996643, 0.05000430718064308, -0.01828468032181263, -0.0013725266326218843, 0.07035240530967712, -0.018226418644189835, 0.004022383131086826, -0.023378564044833183, -0.0700916200876236, 0.023738853633403778, 0.02021743729710579, -0.07862040400505066, 0.003105778247117996, -0.024328194558620453, -0.07586722075939178, 0.007909256964921951, -0.03587527573108673, -0.030659036710858345, 0.03336305543780327, 0.05715178698301315, -0.027888135984539986, -0.09143859893083572, 0.018457334488630295, -0.013588527217507362, 0.008470887318253517, -0.01942872814834118, -0.0058348895981907845, -0.0121806301176548, -5.439786350816344e-33, -0.03959736227989197, -0.03396784886717796, -0.06581690162420273, 0.03281303867697716, 0.008265192620456219, -0.01576988399028778, -0.033074695616960526, 0.0930420309305191, 0.07659640908241272, 0.027473565191030502, -0.07379688322544098, 0.000695778988301754, 0.03208285942673683, 0.013657734729349613, 0.012987004593014717, -0.03556704893708229, -0.0005539661506190896, -0.09487395733594894, 0.022597311064600945, -0.01001689676195383, -0.020389210432767868, -0.00718575157225132, -0.06568651646375656, -0.05778716132044792, -0.023142050951719284, 0.05332712084054947, -0.07311972975730896, -0.020507659763097763, 0.00028482344350777566, -0.03691140189766884, -0.014353876933455467, -0.09675542265176773, -0.02775738760828972, 0.05478255823254585, 0.018990328535437584, -0.06189330667257309, 0.02160061150789261, 0.09023068845272064, -0.04294951632618904, 0.030536051839590073, 0.006636645179241896, 0.007898791693150997, 0.0005382935050874949, -0.013473463244736195, 0.025185056030750275, 0.03172273188829422, -0.051632218062877655, 0.007972666062414646, -0.07613274455070496, -0.02366992086172104, -0.045510683208703995, 0.10490041226148605, 0.01267830841243267, 0.22400932013988495, -0.017664682120084763, -0.01027818862348795, -0.0031740402337163687, -0.0398770309984684, 0.01978171430528164, 0.05054869502782822, 0.021671054884791374, 0.012878837995231152, -0.02172507904469967, -0.024819614365696907, 0.03643492981791496, -0.025244271382689476, 0.013228893280029297, -0.10425353050231934, 0.05964813753962517, -0.00196463312022388, 0.04113730415701866, 0.013595242984592915, -0.10709165781736374, 0.0055261943489313126, 0.016549749299883842, 0.022994475439190865, -0.015363816171884537, -0.09484710544347763, -0.042816001921892166, 0.021083999425172806, -0.1160515546798706, 0.029774298891425133, 0.07891103625297546, 0.052230317145586014, -0.018780477344989777, -0.021958669647574425, 0.03256741911172867, -0.047881338745355606, 0.0578315407037735, 0.05090317130088806, 0.021427741274237633, 0.003253056900575757, -0.06402114033699036, 0.0638284757733345, 0.01439959742128849, -6.209327096939887e-8, -0.033444955945014954, -0.058739569038152695, -0.002622120315209031, 0.02223336137831211, 0.10830198228359222, 0.050412364304065704, -0.03504719212651253, 0.07254170626401901, -0.038925569504499435, -0.028388256207108498, 0.1255875676870346, -0.03611849620938301, -0.002011155476793647, -0.05417842045426369, 0.06706491112709045, -0.019719185307621956, 0.024219144135713577, 0.008370745927095413, -0.04310349002480507, -0.04507647082209587, -0.011160858906805515, 0.05160916596651077, -0.04425695538520813, -0.09894304722547531, -0.026182198897004128, -0.015032810159027576, 0.15168330073356628, 0.05412861704826355, 0.01755141280591488, -0.10994245111942291, -0.10895873606204987, -0.0059012966230511665, 0.05898815393447876, -0.027407895773649216, 0.009119248017668724, 0.07491964846849442, -0.08052338659763336, -0.04123416170477867, 0.03657541424036026, 0.04152169078588486, 0.05909642577171326, -0.02901092730462551, -0.02418147213757038, 0.02721479721367359, 0.08689986914396286, 0.029362058266997337, -0.029827047139406204, 0.04044352471828461, 0.03278219699859619, -0.02114131860435009, -0.039484404027462006, -0.011453007347881794, 0.014041970483958721, 0.09543387591838837, -0.06481032818555832, -0.010911194607615471, -0.012881815433502197, -0.06471944600343704, -0.004104862455278635, 0.033383388072252274, 0.06817279756069183, 0.06236455589532852, -0.026219820603728294, 0.018688296899199486 ]
0.211489
a request being dispatched but did not, due to lack of available concurrency, broken down by `flow\_schema` and `priority\_level`. \* `apiserver\_flowcontrol\_epoch\_advance\_total` is a counter vector of the number of attempts to jump a priority level's progress meter backward to avoid numeric overflow, grouped by `priority\_level` and `success`. ## Good practices for using API Priority and Fairness When a given priority level exceeds its permitted concurrency, requests can experience increased latency or be dropped with an HTTP 429 (Too Many Requests) error. To prevent these side effects of APF, you can modify your workload or tweak your APF settings to ensure there are sufficient seats available to serve your requests. To detect whether requests are being rejected due to APF, check the following metrics: - apiserver\_flowcontrol\_rejected\_requests\_total: the total number of requests rejected per FlowSchema and PriorityLevelConfiguration. - apiserver\_flowcontrol\_current\_inqueue\_requests: the current number of requests queued per FlowSchema and PriorityLevelConfiguration. - apiserver\_flowcontrol\_request\_wait\_duration\_seconds: the latency added to requests waiting in queues. - apiserver\_flowcontrol\_priority\_level\_seat\_utilization: the seat utilization per PriorityLevelConfiguration. ### Workload modifications {#good-practice-workload-modifications} To prevent requests from queuing and adding latency or being dropped due to APF, you can optimize your requests by: - Reducing the rate at which requests are executed. A fewer number of requests over a fixed period will result in a fewer number of seats being needed at a given time. - Avoid issuing a large number of expensive requests concurrently. Requests can be optimized to use fewer seats or have lower latency so that these requests hold those seats for a shorter duration. List requests can occupy more than 1 seat depending on the number of objects fetched during the request. Restricting the number of objects retrieved in a list request, for example by using pagination, will use less total seats over a shorter period. Furthermore, replacing list requests with watch requests will require lower total concurrency shares as watch requests only occupy 1 seat during its initial burst of notifications. If using streaming lists in versions 1.27 and later, watch requests will occupy the same number of seats as a list request for its initial burst of notifications because the entire state of the collection has to be streamed. Note that in both cases, a watch request will not hold any seats after this initial phase. Keep in mind that queuing or rejected requests from APF could be induced by either an increase in the number of requests or an increase in latency for existing requests. For example, if requests that normally take 1s to execute start taking 60s, it is possible that APF will start rejecting requests because requests are occupying seats for a longer duration than normal due to this increase in latency. If APF starts rejecting requests across multiple priority levels without a significant change in workload, it is possible there is an underlying issue with control plane performance rather than the workload or APF settings. ### Priority and fairness settings {#good-practice-apf-settings} You can also modify the default FlowSchema and PriorityLevelConfiguration objects or create new objects of these types to better accommodate your workload. APF settings can be modified to: - Give more seats to high priority requests. - Isolate non-essential or expensive requests that would starve a concurrency level if it was shared with other flows. #### Give more seats to high priority requests 1. If possible, the number of seats available across all priority levels for a particular `kube-apiserver` can be increased by increasing the values for the `max-requests-inflight` and `max-mutating-requests-inflight` flags. Alternatively, horizontally scaling the number of `kube-apiserver` instances will increase the total concurrency per priority level across the cluster assuming there is
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ -0.022425197064876556, -0.05513906106352806, 0.020440666005015373, -0.016791261732578278, -0.03120661899447441, -0.07826604694128036, -0.0762958973646164, -0.083005391061306, 0.0952414721250534, 0.09739502519369125, -0.026956887915730476, -0.03144700080156326, -0.01360828522592783, 0.01122207660228014, 0.005412113852798939, 0.017684495076537132, 0.0337628573179245, -0.09010682255029678, -0.06321265548467636, 0.011872568167746067, -0.021373175084590912, 0.02212834358215332, 0.014252464286983013, 0.0755779817700386, -0.06755409389734268, -0.020147472620010376, -0.10785779356956482, -0.005142915062606335, 0.010285235941410065, -0.0030255489982664585, -0.005073625594377518, 0.004784499295055866, -0.09311102330684662, 0.009794685989618301, 0.013123014010488987, 0.04311949759721756, -0.03160981833934784, -0.04762432724237442, 0.01612336002290249, 0.05927243456244469, -0.019974658265709877, -0.025388550013303757, -0.05538715794682503, 0.030929315835237503, -0.032955557107925415, -0.04041709378361702, 0.024120895192027092, -0.06223734840750694, -0.005722432397305965, 0.022516407072544098, 0.028047386556863785, 0.06700711697340012, -0.013530398719012737, -0.03502640128135681, 0.02399122156202793, -0.03451184555888176, 0.04021144658327103, 0.03299504145979881, -0.05843628570437431, 0.014373812824487686, -0.07901298999786377, -0.11562290042638779, -0.028650980442762375, 0.025500277057290077, -0.038026999682188034, 0.03968396410346031, -0.006361458450555801, -0.08174120634794235, 0.029665770009160042, 0.004095406737178564, 0.07869269698858261, 0.03317519277334213, -0.09857447445392609, -0.06982838362455368, 0.09147237241268158, 0.05542411282658577, -0.02789127081632614, -0.026716556400060654, -0.03872310370206833, -0.06942781805992126, 0.04688765108585358, -0.04162607714533806, -0.0032540590036660433, 0.030380405485630035, 0.002372868126258254, -0.039096198976039886, 0.06036917492747307, 0.011267265304923058, 0.028374848887324333, -0.0301976315677166, 0.013356891460716724, -0.00925297848880291, 0.025056438520550728, 0.046765487641096115, 0.09205865859985352, 0.10003682971000671, -0.028356896713376045, -0.06015132740139961, -0.07490898668766022, 0.007286341395229101, 0.00817288551479578, -0.015943069010972977, -0.016573017463088036, 0.02819550223648548, 0.0526118129491806, -0.006705078762024641, -0.003373766550794244, 0.04384467750787735, -0.04227663576602936, 0.006088959518820047, 0.022242622449994087, 0.04276032745838165, 0.05452444404363632, -0.020764637738466263, -0.05384037643671036, 0.079709991812706, -0.01708039827644825, -0.07259231805801392, -0.051751792430877686, 0.08398118615150452, 0.004756741691380739, 0.03200443089008331, -0.017574451863765717, -0.05508800595998764, 0.021444592624902725, 0.01480471808463335, 0.027662402018904686, 3.1734233241973885e-33, 0.029490584507584572, -0.027858585119247437, 0.03453412279486656, -0.013850877992808819, 0.00762822525575757, -0.002634839853271842, 0.08761248737573624, -0.03737274929881096, 0.044707782566547394, -0.1005953773856163, -0.02196524851024151, -0.016498329117894173, -0.024238701909780502, -0.02462363988161087, -0.028772082179784775, -0.11981028318405151, 0.06251466274261475, -0.00008439106750302017, 0.046663954854011536, 0.10855386406183243, 0.05430879443883896, -0.1521279513835907, -0.10489588975906372, -0.003255621762946248, 0.011783590540289879, 0.0383695624768734, -0.04468027502298355, 0.04872307926416397, -0.04365144297480583, 0.019674109295010567, -0.047185350209474564, -0.032575976103544235, -0.018577948212623596, 0.014974651858210564, -0.02612939476966858, -0.06068229302763939, -0.03950958698987961, 0.01229568850249052, 0.006204309873282909, -0.083294577896595, -0.08807484805583954, 0.03529106453061104, -0.11067091673612595, 0.05994914472103119, -0.0020365631207823753, -0.09248612076044083, -0.03368431702256203, 0.010663822293281555, -0.06115636229515076, 0.08687230944633484, 0.02153567038476467, 0.07872883230447769, 0.10945040732622147, 0.055729545652866364, -0.03291706740856171, -0.059199851006269455, -0.009802588261663914, -0.06973101943731308, -0.02535993978381157, 0.04455696418881416, 0.06773419678211212, -0.011166133917868137, -0.06669879704713821, -0.02968280389904976, 0.033643532544374466, 0.01835879124701023, 0.009977728128433228, 0.04115332290530205, 0.06307964771986008, 0.008349461480975151, 0.011388844810426235, 0.010117046535015106, 0.0115791205316782, 0.014842716977000237, 0.0358230322599411, -0.07422730326652527, 0.08245961368083954, 0.053826913237571716, -0.04863930121064186, -0.044277213513851166, -0.02660868875682354, -0.02312065102159977, 0.08269397169351578, 0.026457611471414566, -0.014058024622499943, 0.02696765959262848, 0.007690283004194498, -0.008737829513847828, -0.051466334611177444, 0.0007812558906152844, 0.03686970844864845, 0.05400679260492325, 0.02113417722284794, 0.016899604350328445, 0.026544420048594475, -2.8753616705250276e-33, -0.030652975663542747, -0.05445577949285507, -0.022650346159934998, -0.010859253816306591, 0.04587030038237572, -0.027377843856811523, 0.04047570377588272, 0.04342213645577431, 0.07629165053367615, 0.012197294272482395, 0.008106405846774578, -0.0005987106123939157, -0.004842879716306925, -0.10385511815547943, -0.012538589537143707, -0.02446049079298973, 0.04958543926477432, 0.013507225550711155, 0.08017818629741669, 0.08996279537677765, 0.020800696685910225, 0.0676867887377739, -0.043040160089731216, -0.004452410154044628, -0.02142517641186714, 0.020489223301410675, -0.11959946155548096, -0.054569851607084274, -0.021188369020819664, -0.05187477543950081, 0.015235574916005135, -0.0441560372710228, -0.021992633119225502, 0.04370240494608879, 0.05097551271319389, -0.07087822258472443, -0.011842467822134495, 0.12968990206718445, -0.06402067840099335, 0.04432258754968643, 0.04988236725330353, 0.032829608768224716, -0.013560542836785316, 0.03958353400230408, 0.04956121742725372, 0.02571391686797142, -0.045012615621089935, -0.025465529412031174, -0.04385977238416672, -0.02109093777835369, -0.08188632875680923, 0.07948151975870132, 0.04969090595841408, 0.10661237686872482, 0.037240687757730484, 0.020760267972946167, 0.06060050427913666, -0.05797985568642616, -0.005974939558655024, 0.021292556077241898, 0.04266095533967018, 0.057074174284935, -0.017397239804267883, 0.019726980477571487, 0.10523858666419983, 0.024951834231615067, 0.020182764157652855, -0.0708916112780571, 0.030784809961915016, 0.05880627781152725, -0.031029408797621727, -0.030059702694416046, -0.006219699513167143, 0.1111961379647255, 0.13862276077270508, 0.026646826416254044, -0.06381213665008545, -0.046960607171058655, 0.018752016127109528, 0.06229656562209129, -0.04805832356214523, 0.10823307186365128, -0.06062348186969757, 0.08138421922922134, 0.01629094034433365, -0.021504290401935577, -0.01201203279197216, -0.07757321000099182, 0.018352175131440163, -0.0015600990736857057, 0.02759760618209839, -0.028475090861320496, -0.07874608784914017, 0.030605055391788483, 0.023911040276288986, -5.3079496353802824e-8, 0.02643274888396263, 0.038779355585575104, -0.03063175268471241, -0.01391918770968914, 0.03561697155237198, -0.03543558344244957, -0.0042718746699392796, 0.03529972583055496, 0.0665990337729454, -0.04629960656166077, 0.027243835851550102, 0.03572049364447594, 0.0178573839366436, 0.021806329488754272, 0.026407428085803986, -0.012732685543596745, 0.0222138911485672, -0.0294210035353899, -0.04116092249751091, -0.11457253247499466, -0.0862249955534935, -0.01936901919543743, 0.012922296300530434, -0.018836691975593567, 0.0029069134034216404, 0.007494237739592791, 0.1326545625925064, 0.006904268637299538, -0.014676791615784168, -0.045866768807172775, -0.07580728083848953, -0.05441005527973175, -0.025621937587857246, -0.04460423067212105, -0.032849594950675964, 0.12829916179180145, -0.028653735294938087, 0.02755492739379406, -0.05541384965181351, 0.04646824672818184, 0.02928623929619789, 0.005330087151378393, 0.05772853270173073, -0.03548150509595871, 0.12697559595108032, 0.06584382057189941, -0.047573454678058624, 0.06102008372545242, 0.0819157138466835, -0.03995213285088539, -0.0016842238837853074, 0.04766703397035599, -0.044750865548849106, 0.05627824366092682, -0.059256356209516525, -0.03488446772098541, -0.009252496995031834, -0.09229479730129242, 0.01850542426109314, -0.07967593520879745, 0.12915827333927155, 0.007424892857670784, -0.004300108645111322, 0.00590115413069725 ]
-0.028261
If possible, the number of seats available across all priority levels for a particular `kube-apiserver` can be increased by increasing the values for the `max-requests-inflight` and `max-mutating-requests-inflight` flags. Alternatively, horizontally scaling the number of `kube-apiserver` instances will increase the total concurrency per priority level across the cluster assuming there is sufficient load balancing of requests. 1. You can create a new FlowSchema which references a PriorityLevelConfiguration with a larger concurrency level. This new PriorityLevelConfiguration could be an existing level or a new level with its own set of nominal concurrency shares. For example, a new FlowSchema could be introduced to change the PriorityLevelConfiguration for your requests from global-default to workload-low to increase the number of seats available to your user. Creating a new PriorityLevelConfiguration will reduce the number of seats designated for existing levels. Recall that editing a default FlowSchema or PriorityLevelConfiguration will require setting the `apf.kubernetes.io/autoupdate-spec` annotation to false. 1. You can also increase the NominalConcurrencyShares for the PriorityLevelConfiguration which is serving your high priority requests. Alternatively, for versions 1.26 and later, you can increase the LendablePercent for competing priority levels so that the given priority level has a higher pool of seats it can borrow. #### Isolate non-essential requests from starving other flows For request isolation, you can create a FlowSchema whose subject matches the user making these requests or create a FlowSchema that matches what the request is (corresponding to the resourceRules). Next, you can map this FlowSchema to a PriorityLevelConfiguration with a low share of seats. For example, suppose list event requests from Pods running in the default namespace are using 10 seats each and execute for 1 minute. To prevent these expensive requests from impacting requests from other Pods using the existing service-accounts FlowSchema, you can apply the following FlowSchema to isolate these list calls from other requests. Example FlowSchema object to isolate list event requests: {{% code\_sample file="priority-and-fairness/list-events-default-service-account.yaml" %}} - This FlowSchema captures all list event calls made by the default service account in the default namespace. The matching precedence 8000 is lower than the value of 9000 used by the existing service-accounts FlowSchema so these list event calls will match list-events-default-service-account rather than service-accounts. - The catch-all PriorityLevelConfiguration is used to isolate these requests. The catch-all priority level has a very small concurrency share and does not queue requests. ## {{% heading "whatsnext" %}} - You can visit flow control [reference doc](/docs/reference/debug-cluster/flow-control/) to learn more about troubleshooting. - For background information on design details for API priority and fairness, see the [enhancement proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness). - You can make suggestions and feature requests via [SIG API Machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery) or the feature's [slack channel](https://kubernetes.slack.com/messages/api-priority-and-fairness).
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/flow-control.md
[ 0.009921629913151264, -0.06965576112270355, 0.003402477828785777, -0.06337212026119232, -0.10576772689819336, -0.019893212243914604, -0.04343344643712044, -0.03478756546974182, 0.053531914949417114, 0.08232782036066055, -0.0594789981842041, -0.06582317501306534, -0.00022851834364701062, -0.0039004054851830006, 0.06369061768054962, -0.013684135861694813, 0.04505721479654312, 0.006994272116571665, -0.08816016465425491, -0.03156894072890282, -0.008571915328502655, -0.055957309901714325, 0.026280663907527924, 0.0398825965821743, -0.10038425773382187, -0.04572398588061333, -0.029352596029639244, -0.009850678034126759, 0.03589951619505882, -0.04659285768866539, -0.0009033920941874385, -0.011508351191878319, 0.011161028407514095, 0.03264370188117027, 0.006619018502533436, 0.019016072154045105, -0.07309479266405106, -0.07344849407672882, -0.028245320543646812, 0.017788155004382133, 0.0020619030110538006, -0.006300248205661774, -0.11424866318702698, -0.025448832660913467, -0.04436911270022392, 0.053851936012506485, -0.06426180899143219, 0.02872285805642605, -0.013098189607262611, -0.008722927421331406, 0.016693171113729477, -0.029146280139684677, 0.01903548836708069, 0.007507764268666506, 0.038829587399959564, 0.02405278943479061, 0.02588243968784809, -0.005501329433172941, 0.011987552978098392, 0.02593880705535412, -0.03197033703327179, -0.0467374324798584, 0.043699149042367935, -0.04300381615757942, -0.00471546221524477, 0.012545369565486908, 0.020569810643792152, 0.005147825460880995, 0.024847673252224922, 0.047454722225666046, 0.09351955354213715, 0.010879677720367908, -0.010055399499833584, -0.05157981067895889, 0.019566791132092476, 0.04056699946522713, -0.0854177251458168, 0.061243411153554916, 0.0012233327142894268, -0.028795376420021057, -0.009966215118765831, 0.03316275030374527, 0.0003354405052959919, -0.020435921847820282, -0.05622273311018944, -0.13629457354545593, -0.0008583198650740087, -0.0660509541630745, -0.032333239912986755, 0.02047930285334587, 0.043178491294384, 0.02156984619796276, 0.04852294921875, -0.06019759550690651, 0.027807237580418587, 0.061662957072257996, -0.06435324251651764, 0.0035328862722963095, 0.04643438011407852, -0.015460195019841194, 0.019313273951411247, -0.01135485153645277, -0.029982374981045723, 0.03970108926296234, 0.017962807789444923, -0.060082659125328064, -0.03157807141542435, 0.022778263315558434, -0.026861809194087982, -0.014705990441143513, -0.007637881673872471, 0.09205064177513123, 0.03223608434200287, -0.011855672113597393, -0.055124904960393906, 0.06660584360361099, 0.08120303601026535, -0.06839317083358765, 0.05210921913385391, 0.05645036697387695, 0.04653022438287735, -0.08887182921171188, 0.016229426488280296, -0.006843396462500095, 0.04484497755765915, 0.03756736218929291, -0.0321011058986187, 6.18169483489203e-33, -0.006461488548666239, -0.056990738958120346, 0.06394988298416138, -0.060442496091127396, -0.03607397899031639, -0.038316261023283005, -0.05053552985191345, -0.035784415900707245, -0.06363935768604279, -0.11002139747142792, -0.04533810541033745, 0.08091668784618378, 0.012471027672290802, -0.040909409523010254, -0.0054444558918476105, -0.0942719504237175, -0.02985934540629387, 0.06185511127114296, 0.07206009328365326, -0.02496468834578991, 0.03669549524784088, -0.1169784665107727, -0.08744968473911285, 0.02534845471382141, 0.0169400405138731, 0.016885990276932716, 0.04381819814443588, -0.0614340677857399, -0.08469608426094055, 0.03350960463285446, -0.021107127889990807, -0.02380692958831787, -0.03669845312833786, 0.03464865684509277, -0.12661543488502502, 0.0016134028555825353, -0.01690305955708027, 0.05000375583767891, -0.032559823244810104, -0.010085509158670902, -0.0353025384247303, -0.006391135044395924, -0.009623351506888866, 0.0007795948185957968, -0.017133165150880814, 0.022143647074699402, 0.006646766327321529, 0.01047078799456358, -0.04228653386235237, 0.0896310806274414, 0.03201999142765999, -0.002998572774231434, 0.09631452709436417, -0.05735562741756439, 0.004203191492706537, -0.009581220336258411, 0.09349071234464645, -0.0419352687895298, 0.005334657616913319, 0.03443070128560066, -0.023675525560975075, -0.09102123975753784, -0.04866528883576393, 0.057977233082056046, 0.03154638782143593, 0.04105868190526962, 0.002383597893640399, 0.02346608228981495, 0.03548780456185341, 0.03055620566010475, -0.04263047128915787, 0.06411270052194595, 0.0007316917181015015, 0.002636567922309041, -0.07134155929088593, -0.015410445630550385, 0.03903765603899956, 0.022580793127417564, -0.10110320895910263, 0.03118721768260002, -0.01668284274637699, 0.02853606455028057, 0.04152631759643555, 0.03630302846431732, 0.05053062364459038, -0.03968405723571777, -0.00697686243802309, 0.00047873632865957916, -0.05411148443818092, 0.0045948270708322525, 0.010429597459733486, -0.0397687703371048, 0.03637304529547691, 0.04880170524120331, -0.009319997392594814, -4.786316184224772e-33, 0.09539557993412018, -0.0377761572599411, -0.014901427552103996, 0.029441766440868378, 0.11469771713018417, 0.027220413088798523, 0.02740887925028801, 0.03802400827407837, -0.02264978364109993, -0.022179851308465004, -0.06479724496603012, 0.004001110326498747, 0.06262359768152237, 0.011668099090456963, -0.04081322252750397, -0.018581200391054153, 0.02051524817943573, 0.030535932630300522, 0.06914132088422775, 0.05964180454611778, 0.027385123074054718, -0.029938863590359688, 0.019421741366386414, 0.03696544095873833, 0.05214745178818703, 0.023252833634614944, -0.09915515780448914, 0.015746744349598885, 0.013863770291209221, 0.005363375414162874, -0.015223483555018902, -0.1492558866739273, 0.003620463190600276, 0.018695972859859467, 0.05389517918229103, -0.06916923820972443, 0.02163420245051384, 0.07090016454458237, -0.04406844452023506, 0.09441160410642624, 0.03797313943505287, -0.05671171471476555, -0.009309012442827225, -0.0145283667370677, 0.03163667768239975, 0.04442863538861275, -0.029794957488775253, -0.07396397739648819, -0.09758754074573517, -0.0788460448384285, -0.09800694137811661, 0.032038912177085876, -0.014891219325363636, 0.14770829677581787, 0.05904267355799675, 0.06044293940067291, 0.017766397446393967, 0.007784949149936438, 0.006051441188901663, 0.011490876786410809, 0.05316707491874695, -0.046687934547662735, 0.04822050407528877, 0.01658048667013645, 0.03690161928534508, -0.013906441628932953, 0.03938603401184082, -0.10292203724384308, -0.06842992454767227, 0.09094156324863434, -0.03590046986937523, -0.046379417181015015, 0.003868138650432229, 0.08144596219062805, 0.019506556913256645, -0.022371897473931313, 0.058867331594228745, -0.008463758043944836, 0.05539676919579506, 0.043982699513435364, -0.07642150670289993, 0.053066372871398926, -0.01657714508473873, 0.02171655185520649, -0.01926336996257305, 0.04705062136054039, 0.03536324203014374, 0.06525298953056335, 0.06066877022385597, 0.06080416589975357, -0.025249850004911423, 0.0055213370360434055, -0.02731103077530861, -0.02549123764038086, -0.07758806645870209, -5.128307734025839e-8, 0.06387036293745041, -0.010579360648989677, -0.05799075961112976, 0.08091835677623749, 0.048920050263404846, -0.06826376914978027, -0.04630367085337639, 0.0697564035654068, -0.03162582591176033, 0.04284299165010452, 0.08299130946397781, 0.04910487309098244, 0.029200782999396324, 0.022451935335993767, 0.03469118848443031, 0.012102341279387474, 0.0016678745159879327, -0.014372256584465504, -0.008996029384434223, -0.04119287431240082, -0.06918277591466904, 0.06783588230609894, 0.05004153773188591, -0.03213920444250107, 0.06082848086953163, 0.04020142927765846, 0.12328870594501495, 0.04177634418010712, 0.07424936443567276, -0.04997533932328224, -0.11026352643966675, -0.03173770010471344, -0.07149636000394821, 0.0083156768232584, 0.022015482187271118, 0.01841924525797367, -0.1566937416791916, 0.10331623256206512, -0.027251070365309715, 0.04710589349269867, 0.04251862317323685, -0.026426898315548897, -0.04867590218782425, 0.03465927764773369, 0.1394018828868866, 0.10956398397684097, -0.09179044514894485, 0.06766944378614426, 0.038708314299583435, -0.025995109230279922, -0.08467233180999756, 0.011446699500083923, -0.010874737985432148, 0.0907054990530014, -0.0770544484257698, 0.049940671771764755, -0.023827502503991127, -0.0751655101776123, 0.06780940294265747, -0.03490471839904785, 0.056537844240665436, 0.016975339502096176, -0.06733810156583786, -0.002835956634953618 ]
0.085638
System component logs record events happening in cluster, which can be very useful for debugging. You can configure log verbosity to see more or less detail. Logs can be as coarse-grained as showing errors within a component, or as fine-grained as showing step-by-step traces of events (like HTTP access logs, pod state changes, controller actions, or scheduler decisions). {{< warning >}} In contrast to the command line flags described here, the \*log output\* itself does \*not\* fall under the Kubernetes API stability guarantees: individual log entries and their formatting may change from one release to the next! {{< /warning >}} ## Klog klog is the Kubernetes logging library. [klog](https://github.com/kubernetes/klog) generates log messages for the Kubernetes system components. Kubernetes is in the process of simplifying logging in its components. The following klog command line flags [are deprecated](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components) starting with Kubernetes v1.23 and removed in Kubernetes v1.26: - `--add-dir-header` - `--alsologtostderr` - `--log-backtrace-at` - `--log-dir` - `--log-file` - `--log-file-max-size` - `--logtostderr` - `--one-output` - `--skip-headers` - `--skip-log-headers` - `--stderrthreshold` Output will always be written to stderr, regardless of the output format. Output redirection is expected to be handled by the component which invokes a Kubernetes component. This can be a POSIX shell or a tool like systemd. In some cases, for example a distroless container or a Windows system service, those options are not available. Then the [`kube-log-runner`](https://github.com/kubernetes/kubernetes/blob/d2a8a81639fcff8d1221b900f66d28361a170654/staging/src/k8s.io/component-base/logs/kube-log-runner/README.md) binary can be used as wrapper around a Kubernetes component to redirect output. A prebuilt binary is included in several Kubernetes base images under its traditional name as `/go-runner` and as `kube-log-runner` in server and node release archives. This table shows how `kube-log-runner` invocations correspond to shell redirection: | Usage | POSIX shell (such as bash) | `kube-log-runner ` | | -----------------------------------------|----------------------------|-------------------------------------------------------------| | Merge stderr and stdout, write to stdout | `2>&1` | `kube-log-runner` (default behavior) | | Redirect both into log file | `1>>/tmp/log 2>&1` | `kube-log-runner -log-file=/tmp/log` | | Copy into log file and to stdout | `2>&1 \| tee -a /tmp/log` | `kube-log-runner -log-file=/tmp/log -also-stdout` | | Redirect only stdout into log file | `>/tmp/log` | `kube-log-runner -log-file=/tmp/log -redirect-stderr=false` | ### Klog output An example of the traditional klog native format: ``` I1025 00:15:15.525108 1 httplog.go:79] GET /api/v1/namespaces/kube-system/pods/metrics-server-v0.3.1-57c75779f-9p8wg: (1.512ms) 200 [pod\_nanny/v0.0.0 (linux/amd64) kubernetes/$Format 10.56.1.19:51756] ``` The message string may contain line breaks: ``` I1025 00:15:15.525108 1 example.go:79] This is a message which has a line break. ``` ### Structured Logging {{< feature-state for\_k8s\_version="v1.23" state="beta" >}} {{< warning >}} Migration to structured log messages is an ongoing process. Not all log messages are structured in this version. When parsing log files, you must also handle unstructured log messages. Log formatting and value serialization are subject to change. {{< /warning>}} Structured logging introduces a uniform structure in log messages allowing for programmatic extraction of information. You can store and process structured logs with less effort and cost. The code which generates a log message determines whether it uses the traditional unstructured klog output or structured logging. The default formatting of structured log messages is as text, with a format that is backward compatible with traditional klog: ``` "" ="" ="" ... ``` Example: ``` I1025 00:15:15.525108 1 controller\_utils.go:116] "Pod status updated" pod="kube-system/kubedns" status="ready" ``` Strings are quoted. Other values are formatted with [`%+v`](https://pkg.go.dev/fmt#hdr-Printing), which may cause log messages to continue on the next line [depending on the data](https://github.com/kubernetes/kubernetes/issues/106428). ``` I1025 00:15:15.525108 1 example.go:116] "Example" data="This is text with a line break\nand \"quotation marks\"." someInt=1 someFloat=0.1 someStruct={StringField: First line, second line.} ``` ### Contextual Logging {{< feature-state for\_k8s\_version="v1.30" state="beta" >}} Contextual logging builds on top of structured logging. It is primarily about how developers
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-logs.md
[ 0.039205700159072876, 0.020686941221356392, 0.059137579053640366, 0.04191473498940468, 0.03875146806240082, -0.03303243964910507, 0.03853433206677437, -0.02698606438934803, 0.06385532766580582, 0.06403690576553345, -0.042932428419589996, -0.06541899591684341, 0.0162638071924448, -0.011875856667757034, -0.03056018054485321, -0.00003127814125036821, -0.054039765149354935, -0.013970046304166317, -0.07688085734844208, -0.012464791536331177, 0.03962830826640129, 0.04366627335548401, -0.08949778974056244, 0.07509405165910721, -0.0364040806889534, 0.08142590522766113, -0.04770173877477646, -0.08039364963769913, 0.013760387897491455, -0.017188161611557007, -0.10236435383558273, -0.0031935512088239193, -0.009788860566914082, 0.08065026253461838, 0.0710899606347084, 0.03046516142785549, 0.06679017096757889, -0.05535652115941048, -0.06623005867004395, -0.0016304595628753304, 0.05168605595827103, -0.006686526816338301, -0.09622956067323685, -0.021129142493009567, -0.051285214722156525, -0.018667398020625114, -0.10605490952730179, -0.10809118300676346, -0.06377431005239487, -0.03497746214270592, 0.03368464857339859, -0.017490306869149208, 0.09948167949914932, -0.011236647143959999, 0.0802781879901886, 0.030727706849575043, -0.024264782667160034, 0.016592962667346, 0.07935731112957001, -0.021260572597384453, 0.017781581729650497, 0.01296691782772541, -0.03257405757904053, -0.010612969286739826, 0.025528911501169205, -0.030998310074210167, 0.010871706530451775, 0.030329300090670586, 0.06771254539489746, 0.01657644845545292, -0.04421587288379669, 0.00015089598309714347, -0.05329018458724022, 0.0009061913006007671, 0.0048627424985170364, 0.05881543830037117, -0.03777533024549484, 0.05699270963668823, -0.01891009882092476, -0.08521203696727753, 0.007151761092245579, 0.03937597945332527, 0.009739967994391918, 0.029999110847711563, -0.009254273027181625, 0.0018957280553877354, -0.03497960790991783, -0.04623594507575035, 0.05812520533800125, -0.013994419947266579, -0.011593732051551342, -0.07358869165182114, 0.03408285602927208, -0.03773728758096695, 0.03430061787366867, 0.019758928567171097, -0.06425152719020844, 0.01751645654439926, 0.0433092899620533, 0.01345225889235735, 0.014388710260391235, 0.08056329190731049, 0.021162422373890877, -0.007026592269539833, 0.06755594909191132, -0.06938765197992325, -0.03736554831266403, -0.02862471714615822, 0.04025162011384964, 0.04045785591006279, 0.01662612520158291, 0.05573475360870361, -0.015041201375424862, 0.03018128126859665, 0.08689633011817932, 0.012502682395279408, 0.023282360285520554, -0.026909898966550827, 0.028048012405633926, 0.08242223411798477, 0.0908060148358345, -0.10842504352331161, -0.011554320342838764, 0.06312016397714615, 0.051926665008068085, 0.05272131785750389, 0.021032683551311493, 6.164974162435553e-33, 0.07241566479206085, -0.020123925060033798, 0.024435177445411682, -0.04717346280813217, 0.014877701178193092, -0.020498106256127357, -0.08290180563926697, -0.05999453365802765, 0.012524302117526531, -0.0012626934330910444, -0.08595333248376846, 0.05062487721443176, 0.03645757958292961, -0.04150105267763138, 0.03509389981627464, 0.004026387818157673, -0.028586555272340775, 0.02609533816576004, 0.04228663444519043, 0.05771251022815704, 0.011878390796482563, -0.01668652705848217, -0.055925410240888596, -0.01399550586938858, 0.0027103954926133156, 0.001627675024792552, 0.034277498722076416, -0.06833551824092865, -0.029325347393751144, 0.016380872577428818, -0.013796201907098293, -0.06829513609409332, 0.05856409668922424, 0.0075968485325574875, -0.05723026767373085, 0.007921230979263783, -0.06851987540721893, -0.007779768668115139, -0.07848836481571198, -0.013984222896397114, -0.08723700046539307, -0.05100616440176964, -0.0941881313920021, -0.062016259878873825, 0.07558730244636536, -0.03504189848899841, -0.0466972254216671, -0.027921445667743683, 0.06018799915909767, -0.0526561439037323, 0.0076614860445261, 0.04689665138721466, 0.08126244693994522, -0.04848635569214821, 0.07544013857841492, 0.03822622448205948, 0.19893687963485718, -0.13302944600582123, -0.039522141218185425, 0.06348071992397308, -0.02045983262360096, -0.04912840202450752, -0.017970742657780647, -0.04099426791071892, -0.008540863171219826, 0.03798595815896988, 0.02357521839439869, 0.09843093156814575, -0.02718392387032509, -0.018548719584941864, -0.09639453887939453, 0.005808192305266857, 0.002042726380750537, 0.01694381982088089, 0.007718561217188835, -0.021013230085372925, 0.007129691541194916, 0.012879062443971634, -0.09338896721601486, 0.047913726419210434, 0.0313945934176445, -0.09828564524650574, -0.021586814895272255, 0.09263555705547333, -0.0027669277042150497, -0.06299391388893127, 0.013384580612182617, 0.01221462246030569, -0.06255224347114563, 0.06237637251615524, 0.02147356979548931, -0.0139619130641222, -0.016559554263949394, 0.01777692139148712, -0.12367323786020279, -7.909154313086431e-33, 0.03580614551901817, 0.0714639350771904, -0.02387380041182041, -0.03495640680193901, -0.038242340087890625, -0.00934204738587141, 0.040553852915763855, 0.050042763352394104, 0.018246013671159744, -0.05218636617064476, -0.009324511513113976, -0.04164978489279747, 0.009552891366183758, 0.04258223995566368, -0.006788637954741716, 0.058013081550598145, -0.08978048712015152, -0.0037611410953104496, 0.02624320238828659, 0.010058951564133167, 0.046695251017808914, -0.00024401982955168933, -0.01339807454496622, 0.04773183912038803, -0.04169074818491936, -0.014665392227470875, 0.0569612942636013, 0.041215281933546066, -0.043155472725629807, -0.07862655818462372, 0.07252183556556702, -0.06924339383840561, -0.03176942467689514, 0.08185643702745438, 0.07151202112436295, -0.08724843710660934, -0.0010839790338650346, 0.005026485305279493, -0.0029993688222020864, -0.05099540948867798, 0.014624379575252533, 0.08719462901353836, 0.009705446660518646, 0.03521084412932396, -0.028647031635046005, -0.02716648392379284, 0.02186497114598751, 0.007881111465394497, -0.017639102414250374, -0.08164094388484955, -0.00837248656898737, -0.051527030766010284, -0.0008103687432594597, 0.10863624513149261, -0.09814976900815964, 0.0506940633058548, 0.012592887505888939, 0.06305227428674698, -0.04431755095720291, 0.03968355059623718, -0.07150018215179443, -0.09844428300857544, 0.059954866766929626, 0.03643380105495453, -0.02189902774989605, -0.0814765989780426, 0.05472303554415703, 0.011338074691593647, 0.006285446230322123, -0.0033577720168977976, 0.04525759816169739, -0.03038879856467247, -0.08703760802745819, 0.06628422439098358, 0.003630537772551179, 0.018889499828219414, -0.0070586237125098705, -0.07785801589488983, -0.008381894789636135, 0.02399366721510887, -0.05440685153007507, -0.012270317412912846, -0.0512181892991066, 0.03827487304806709, 0.056965459138154984, 0.04028782248497009, 0.0286834929138422, 0.10680080950260162, 0.014598146080970764, 0.031234456226229668, -0.041859693825244904, 0.044136423617601395, -0.06549303978681564, 0.07354172319173813, -0.03312419354915619, -5.528139368493612e-8, -0.02355770952999592, -0.05046337470412254, -0.04028422757983208, -0.002942995633929968, 0.11139748245477676, -0.010246225632727146, 0.03734079748392105, -0.017808718606829643, -0.10426230728626251, -0.0250458475202322, -0.030347732827067375, 0.03841361403465271, -0.10523098707199097, -0.09857633709907532, 0.051338303834199905, -0.0043486119247972965, -0.028213681653141975, -0.0023320335894823074, 0.007655611261725426, -0.048408105969429016, -0.023372814059257507, -0.005013435147702694, -0.008496655151247978, -0.023103954270482063, -0.07080601900815964, 0.03332361578941345, 0.0743483230471611, 0.14844530820846558, 0.001347681856714189, -0.04749194532632828, 0.0695008635520935, 0.04885806143283844, -0.014801198616623878, 0.009259345009922981, -0.04191385954618454, 0.05741545930504799, -0.00891362689435482, 0.006685221567749977, 0.05025063082575798, 0.06963302940130234, -0.04317254200577736, -0.0022698580287396908, -0.017795784398913383, 0.0270155668258667, -0.028471263125538826, 0.06797514110803604, -0.04552840813994408, 0.038718465715646744, 0.020992429926991463, -0.06058391556143761, -0.03474821522831917, -0.033941660076379776, -0.07982349395751953, 0.09608592092990875, -0.06121231988072395, -0.024216918274760246, -0.014144301414489746, -0.09918443113565445, 0.12257043272256851, 0.023628948256373405, 0.03556901961565018, -0.006127462722361088, 0.028558196499943733, 0.00047796053695492446 ]
0.174449
line [depending on the data](https://github.com/kubernetes/kubernetes/issues/106428). ``` I1025 00:15:15.525108 1 example.go:116] "Example" data="This is text with a line break\nand \"quotation marks\"." someInt=1 someFloat=0.1 someStruct={StringField: First line, second line.} ``` ### Contextual Logging {{< feature-state for\_k8s\_version="v1.30" state="beta" >}} Contextual logging builds on top of structured logging. It is primarily about how developers use logging calls: code based on that concept is more flexible and supports additional use cases as described in the [Contextual Logging KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging). If developers use additional functions like `WithValues` or `WithName` in their components, then log entries contain additional information that gets passed into functions by their caller. For Kubernetes {{< skew currentVersion >}}, this is gated behind the `ContextualLogging` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and is enabled by default. The infrastructure for this was added in 1.24 without modifying components. The [`component-base/logs/example`](https://github.com/kubernetes/kubernetes/blob/v1.24.0-beta.0/staging/src/k8s.io/component-base/logs/example/cmd/logger.go) command demonstrates how to use the new logging calls and how a component behaves that supports contextual logging. ```console $ cd $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/component-base/logs/example/cmd/ $ go run . --help ... --feature-gates mapStringBool A set of key=value pairs that describe feature gates for alpha/experimental features. Options are: AllAlpha=true|false (ALPHA - default=false) AllBeta=true|false (BETA - default=false) ContextualLogging=true|false (BETA - default=true) $ go run . --feature-gates ContextualLogging=true ... I0222 15:13:31.645988 197901 example.go:54] "runtime" logger="example.myname" foo="bar" duration="1m0s" I0222 15:13:31.646007 197901 example.go:55] "another runtime" logger="example" foo="bar" duration="1h0m0s" duration="1m0s" ``` The `logger` key and `foo="bar"` were added by the caller of the function which logs the `runtime` message and `duration="1m0s"` value, without having to modify that function. With contextual logging disable, `WithValues` and `WithName` do nothing and log calls go through the global klog logger. Therefore this additional information is not in the log output anymore: ```console $ go run . --feature-gates ContextualLogging=false ... I0222 15:14:40.497333 198174 example.go:54] "runtime" duration="1m0s" I0222 15:14:40.497346 198174 example.go:55] "another runtime" duration="1h0m0s" duration="1m0s" ``` ### JSON log format {{< feature-state for\_k8s\_version="v1.19" state="alpha" >}} {{}} JSON output does not support many standard klog flags. For list of unsupported klog flags, see the [Command line tool reference](/docs/reference/command-line-tools-reference/). Not all logs are guaranteed to be written in JSON format (for example, during process start). If you intend to parse logs, make sure you can handle log lines that are not JSON as well. Field names and JSON serialization are subject to change. {{< /warning >}} The `--logging-format=json` flag changes the format of logs from klog native format to JSON format. Example of JSON log format (pretty printed): ```json { "ts": 1580306777.04728, "v": 4, "msg": "Pod status updated", "pod":{ "name": "nginx-1", "namespace": "default" }, "status": "ready" } ``` Keys with special meaning: \* `ts` - timestamp as Unix time (required, float) \* `v` - verbosity (only for info and not for error messages, int) \* `err` - error string (optional, string) \* `msg` - message (required, string) List of components currently supporting JSON format: \* {{< glossary\_tooltip term\_id="kube-controller-manager" text="kube-controller-manager" >}} \* {{< glossary\_tooltip term\_id="kube-apiserver" text="kube-apiserver" >}} \* {{< glossary\_tooltip term\_id="kube-scheduler" text="kube-scheduler" >}} \* {{< glossary\_tooltip term\_id="kubelet" text="kubelet" >}} ### Log verbosity level The `-v` flag controls log verbosity. Increasing the value increases the number of logged events. Decreasing the value decreases the number of logged events. Increasing verbosity settings logs increasingly less severe events. A verbosity setting of 0 logs only critical events. ### Log location There are two types of system components: those that run in a container and those that do not run in a container. For example: \* The Kubernetes scheduler and kube-proxy run in a container. \* The kubelet and {{}} do not run in containers. On machines with systemd, the kubelet and container runtime write to journald. Otherwise, they write to `.log` files in the `/var/log` directory. System components inside containers
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-logs.md
[ -0.008938915096223354, 0.05425256863236427, 0.11501137167215347, -0.0004421605553943664, -0.003951121121644974, -0.026135750114917755, 0.0718739926815033, 0.015623241662979126, 0.08497346937656403, 0.029910018667578697, -0.03790384531021118, -0.10642867535352707, -0.007556526456028223, 0.03577697277069092, 0.04422253370285034, 0.0160693246871233, -0.006832669489085674, 0.014104656875133514, -0.09641563892364502, 0.005061097908765078, 0.09614415466785431, 0.0717271938920021, -0.002471181796863675, 0.05736607313156128, 0.02267978899180889, 0.04578934237360954, -0.02225714549422264, -0.027241788804531097, 0.07252395898103714, 0.04705331474542618, -0.077713742852211, 0.035885922610759735, -0.02960284799337387, 0.08097928762435913, 0.04387196898460388, 0.047023266553878784, 0.020089777186512947, -0.03316039592027664, -0.06767485290765762, 0.03687357157468796, 0.008216530084609985, -0.029660969972610474, -0.051562342792749405, 0.027213728055357933, 0.07132618874311447, -0.0038612703792750835, -0.03124897927045822, -0.03482157364487648, -0.022859379649162292, -0.008413935080170631, -0.01567051187157631, -0.001854232861660421, 0.070970319211483, 0.017041414976119995, 0.026622069999575615, 0.016709573566913605, -0.009983141906559467, 0.08481542766094208, 0.09556601196527481, 0.0590432807803154, -0.00046334421494975686, -0.022852661088109016, -0.0074073211289942265, 0.001569629879668355, 0.024462072178721428, -0.01555926539003849, 0.008501719683408737, 0.03830491751432419, 0.011459649540483952, 0.02825259417295456, -0.02865082584321499, -0.009379575029015541, -0.0683891698718071, -0.016008848324418068, 0.015645328909158707, 0.07653661072254181, -0.017188994213938713, 0.07620425522327423, 0.04531794786453247, -0.08354310691356659, 0.015536281280219555, -0.009645579382777214, 0.04704190418124199, -0.009668341837823391, -0.025103937834501266, -0.06310315430164337, -0.02981359139084816, -0.037762369960546494, 0.05605432018637657, 0.039075203239917755, -0.01977243274450302, -0.0884113684296608, 0.06340634077787399, -0.06494434922933578, 0.07609478384256363, 0.026566630229353905, -0.07700338959693909, 0.05096188187599182, 0.0673913061618805, -0.025603685528039932, 0.012791241519153118, 0.030476273968815804, 0.008182237856090069, 0.03598032146692276, 0.029666366055607796, -0.048257023096084595, -0.022002192214131355, -0.031208811327815056, -0.044670503586530685, 0.022871196269989014, 0.013558655977249146, 0.11440613120794296, -0.02682504802942276, -0.017603490501642227, 0.10311921685934067, -0.03911140188574791, 0.008027688600122929, -0.06743890047073364, 0.04122261703014374, 0.13556380569934845, 0.001102995127439499, -0.11290993541479111, -0.08227083832025528, 0.06146720424294472, -0.02532673068344593, 0.03498842939734459, 0.049965884536504745, 6.317784019938634e-33, 0.08153524994850159, -0.016675107181072235, 0.012507658451795578, -0.0665026381611824, 0.02639148011803627, 0.005401236470788717, -0.10229392349720001, -0.04383151978254318, -0.04080076515674591, 0.009426448494195938, -0.08405856043100357, 0.05911412090063095, 0.0003431102086324245, -0.08777352422475815, 0.0443909727036953, 0.0016974798636510968, -0.07705359905958176, 0.020553505048155785, 0.045151762664318085, 0.047602578997612, 0.02165529504418373, -0.05518114194273949, 0.004505624063313007, -0.03313162177801132, 0.048846907913684845, -0.04524580016732216, 0.013007363304495811, -0.10995927453041077, -0.08243075013160706, 0.011255592107772827, -0.08206037431955338, -0.11683975160121918, 0.02679654210805893, 0.012453834526240826, -0.08446771651506424, -0.04466574266552925, -0.007569888141006231, 0.007569501642137766, -0.10528168827295303, -0.048316292464733124, -0.07274440675973892, 0.010143408551812172, -0.04242522269487381, -0.023688210174441338, -0.009742599911987782, -0.05520595237612724, -0.06333798915147781, 0.033711809664964676, 0.04419095814228058, -0.032296281307935715, 0.0429079644382, 0.05442952737212181, 0.045093752443790436, -0.0819837749004364, 0.09663515537977219, 0.03128831461071968, 0.17690308392047882, -0.10155636817216873, -0.053243886679410934, -0.00002275997758260928, -0.021138757467269897, 0.011305494233965874, 0.009089374914765358, 0.0093583008274436, 0.03397445008158684, 0.047678593546152115, 0.0411505252122879, 0.06074637547135353, -0.01575232669711113, -0.08852259814739227, -0.06840024888515472, 0.0018395656952634454, -0.07922831922769547, 0.013682284392416477, -0.01942901685833931, -0.05095801129937172, -0.03229905664920807, 0.010546406731009483, -0.09341106563806534, 0.0608011931180954, 0.03710155561566353, -0.05551804602146149, -0.049399688839912415, 0.11224900931119919, -0.015156690962612629, -0.013292547315359116, -0.028875913470983505, -0.05108143761754036, -0.04898218810558319, -0.021816985681653023, -0.0014006898272782564, -0.03771049156785011, -0.05177194997668266, -0.010734706185758114, -0.04769422858953476, -7.162799888970744e-33, 0.06560492515563965, 0.044532909989356995, 0.013682123273611069, 0.008994649164378643, 0.012630080804228783, -0.017875894904136658, 0.05805443227291107, 0.04120851680636406, 0.056619174778461456, -0.048551276326179504, -0.01465490274131298, -0.0497891828417778, -0.006439898628741503, 0.03967835381627083, -0.030592037364840508, 0.016544345766305923, -0.12195432186126709, 0.013958924449980259, 0.030219577252864838, -0.015338081866502762, 0.058558620512485504, -0.024749495089054108, -0.06081870570778847, 0.07159792631864548, -0.05019543319940567, -0.039896409958601, -0.01973164826631546, 0.008313008584082127, -0.040423568338155746, -0.05768217518925667, 0.025133704766631126, -0.07470148056745529, -0.03263748064637184, 0.010928758420050144, 0.010965435765683651, -0.07199360430240631, 0.024984242394566536, 0.017498889937996864, 0.005845683626830578, -0.00835355930030346, 0.06845156103372574, 0.1146046593785286, 0.012221522629261017, 0.00038983183912932873, -0.05872005224227905, 0.020822687074542046, 0.003575893584638834, -0.006956497207283974, -0.0007309808279387653, -0.12389131635427475, -0.03300756588578224, -0.010989746078848839, -0.048182837665081024, 0.1126883327960968, -0.1124807745218277, 0.009947159327566624, 0.007171206641942263, 0.034118469804525375, -0.06151891127228737, -0.029935823753476143, -0.01622978039085865, -0.061578549444675446, 0.06544812023639679, 0.02856183797121048, 0.03523353859782219, -0.06281835585832596, 0.024934403598308563, -0.021066416054964066, -0.021970072761178017, -0.08151330798864365, -0.0008427937282249331, -0.10114580392837524, -0.04834810644388199, 0.09790341556072235, 0.004290467593818903, 0.037073880434036255, -0.01323066744953394, -0.0628514289855957, 0.05815973877906799, 0.050665389746427536, -0.0006614035228267312, -0.001226333319209516, -0.04127879813313484, 0.06895148754119873, 0.06492646783590317, 0.02184321917593479, 0.048637863248586655, 0.07421807199716568, 0.03937123343348503, 0.004240154754370451, 0.0060089463368058205, 0.03721732273697853, -0.14175288379192352, 0.11380798369646072, -0.03854009136557579, -5.938384717296685e-8, -0.04849940165877342, -0.017130641266703606, -0.05359237268567085, -0.019645515829324722, 0.06642866134643555, 0.02312568947672844, 0.028390252962708473, 0.025686008855700493, -0.012505077756941319, -0.03294292464852333, -0.04755305498838425, 0.03449631854891777, -0.09349483996629715, -0.04092036560177803, 0.0141878267750144, -0.035547830164432526, -0.011067896150052547, -0.01875723898410797, 0.01767098531126976, -0.004645591136068106, 0.0525062158703804, -0.039645884186029434, -0.026998141780495644, -0.03649692237377167, -0.007988433353602886, 0.001798966433852911, 0.010760617442429066, 0.15579426288604736, 0.049786657094955444, -0.005174021236598492, 0.057604365050792694, 0.05707088112831116, -0.027189161628484726, 0.025661788880825043, -0.0462564080953598, 0.049934498965740204, 0.00396521994844079, 0.004412382375448942, 0.030291272327303886, 0.023715602234005928, -0.03145332634449005, -0.051865529268980026, -0.06596589088439941, 0.015266751870512962, 0.016032874584197998, 0.07210106402635574, 0.005736882332712412, 0.06223493069410324, 0.01519542932510376, 0.005394919775426388, -0.02342134714126587, -0.044626522809267044, -0.03306405618786812, 0.08457881212234497, -0.017067059874534607, -0.04815356060862541, 0.034329310059547424, -0.049990035593509674, 0.09721065312623978, 0.004888184834271669, 0.03327583149075508, 0.0020666730124503374, 0.016323931515216827, -0.03234841302037239 ]
0.162457
a container. For example: \* The Kubernetes scheduler and kube-proxy run in a container. \* The kubelet and {{}} do not run in containers. On machines with systemd, the kubelet and container runtime write to journald. Otherwise, they write to `.log` files in the `/var/log` directory. System components inside containers always write to `.log` files in the `/var/log` directory, bypassing the default logging mechanism. Similar to the container logs, you should rotate system component logs in the `/var/log` directory. In Kubernetes clusters created by the `kube-up.sh` script, log rotation is configured by the `logrotate` tool. The `logrotate` tool rotates logs daily, or once the log size is greater than 100MB. ## Log query {{< feature-state feature\_gate\_name="NodeLogQuery" >}} To help with debugging issues on nodes, Kubernetes v1.27 introduced a feature that allows viewing logs of services running on the node. To use the feature, ensure that the `NodeLogQuery` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled for that node, and that the kubelet configuration options `enableSystemLogHandler` and `enableSystemLogQuery` are both set to true. On Linux the assumption is that service logs are available via journald. On Windows the assumption is that service logs are available in the application log provider. On both operating systems, logs are also available by reading files within `/var/log/`. Provided you are authorized to interact with node objects, you can try out this feature on all your nodes or just a subset. Here is an example to retrieve the kubelet service logs from a node: ```shell # Fetch kubelet logs from a node named node-1.example kubectl get --raw "/api/v1/nodes/node-1.example/proxy/logs/?query=kubelet" ``` You can also fetch files, provided that the files are in a directory that the kubelet allows for log fetches. For example, you can fetch a log from `/var/log` on a Linux node: ```shell kubectl get --raw "/api/v1/nodes//proxy/logs/?query=/" ``` The kubelet uses heuristics to retrieve logs. This helps if you are not aware whether a given system service is writing logs to the operating system's native logger like journald or to a log file in `/var/log/`. The heuristics first checks the native logger and if that is not available attempts to retrieve the first logs from `/var/log/` or `/var/log/.log` or `/var/log//.log`. The complete list of options that can be used are: Option | Description ------ | ----------- `boot` | boot show messages from a specific system boot `pattern` | pattern filters log entries by the provided PERL-compatible regular expression `query` | query specifies services(s) or files from which to return logs (required) `sinceTime` | an [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp from which to show logs (inclusive) `untilTime` | an [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp until which to show logs (inclusive) `tailLines` | specify how many lines from the end of the log to retrieve; the default is to fetch the whole log Example of a more complex query: ```shell # Fetch kubelet logs from a node named node-1.example that have the word "error" kubectl get --raw "/api/v1/nodes/node-1.example/proxy/logs/?query=kubelet&pattern=error" ``` ## {{% heading "whatsnext" %}} \* Read about the [Kubernetes Logging Architecture](/docs/concepts/cluster-administration/logging/) \* Read about [Structured Logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging) \* Read about [Contextual Logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging) \* Read about [deprecation of klog flags](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components) \* Read about the [Conventions for logging severity](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md) \* Read about [Log Query](https://kep.k8s.io/2258)
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/system-logs.md
[ 0.05544699355959892, 0.018081247806549072, 0.019425611943006516, 0.017087258398532867, 0.028778498992323875, -0.05995369702577591, -0.020388413220643997, -0.009541175328195095, 0.09846780449151993, 0.0929437130689621, -0.016301000490784645, 0.04061621055006981, -0.00937408022582531, -0.03123311512172222, 0.0012424991000443697, -0.035817377269268036, -0.018673790618777275, 0.058755554258823395, -0.03635420277714729, 0.003931960090994835, 0.042873676866292953, 0.02258237451314926, -0.01183218602091074, 0.09119544923305511, -0.039183471351861954, 0.00044233660446479917, -0.005609599873423576, -0.08851441740989685, -0.022617511451244354, -0.029238898307085037, -0.06192641705274582, -0.009844191372394562, -0.06667426228523254, 0.06528225541114807, 0.01702297478914261, 0.04915193095803261, 0.1003919392824173, -0.04629826545715332, -0.08926595747470856, 0.0009142578928731382, 0.08955603092908859, 0.01647191308438778, -0.01312519796192646, -0.05558757483959198, -0.02909071557223797, -0.029890088364481926, -0.08124968409538269, -0.047528769820928574, -0.040432676672935486, -0.0037327029276639223, 0.014684838242828846, -0.04085201397538185, 0.05961127579212189, 0.04829947650432587, 0.030306991189718246, 0.04278448596596718, 0.03234947845339775, 0.015243077650666237, 0.09359873831272125, -0.030162598937749863, 0.03374693915247917, 0.06974314153194427, 0.011294534429907799, 0.007028970867395401, 0.011232342571020126, -0.03706502914428711, 0.03209696337580681, 0.047598209232091904, 0.025789368897676468, 0.016908446326851845, -0.027497202157974243, 0.014022245071828365, -0.04204609990119934, -0.043080367147922516, 0.015760505571961403, -0.01242345292121172, 0.003319131676107645, 0.011904444545507431, -0.03593685105443001, -0.08035429567098618, -0.017376750707626343, 0.05189663916826248, 0.08599156141281128, 0.06403206288814545, -0.057635508477687836, -0.03171224147081375, -0.04034097492694855, 0.014402447268366814, 0.07831383496522903, -0.017608609050512314, -0.029045797884464264, -0.022211700677871704, -0.007557171396911144, -0.1077272891998291, 0.06619713455438614, 0.03345191478729248, -0.0011322980280965567, 0.08352947980165482, 0.08825327455997467, -0.019693639129400253, 0.05774971470236778, 0.06287127733230591, 0.030367620289325714, 0.040002238005399704, 0.06581372022628784, -0.032982729375362396, -0.065358467400074, -0.06750740855932236, -0.02301664836704731, 0.028665028512477875, 0.025231819599866867, 0.11028490960597992, -0.040918465703725815, 0.06395744532346725, 0.0898645892739296, -0.03144516795873642, 0.022299792617559433, -0.0512596070766449, -0.04862436652183533, 0.1014651283621788, 0.0930405780673027, -0.04806702211499214, -0.014548234641551971, 0.028839649632573128, 0.06338924169540405, 0.08070825785398483, 0.025441909208893776, 2.8814439354355713e-33, 0.06905049085617065, -0.02237446792423725, 0.09193574637174606, 0.033187925815582275, 0.04575325921177864, 0.020393047481775284, -0.06775301694869995, -0.03806952387094498, -0.011185447685420513, 0.01617281697690487, -0.12419501692056656, 0.09335912019014359, 0.01925400272011757, -0.06699468195438385, 0.028241608291864395, -0.026627305895090103, -0.06924518942832947, 0.005730548407882452, 0.05618170648813248, -0.0475604310631752, 0.02025909349322319, -0.062243204563856125, -0.05399636924266815, 0.023663995787501335, 0.028577864170074463, -0.07759591937065125, 0.048236846923828125, -0.06963994354009628, -0.11775445938110352, 0.009789567440748215, 0.024364853277802467, -0.025504974648356438, 0.024320414289832115, 0.026193443685770035, -0.07981793582439423, 0.02421850897371769, -0.0159319955855608, 0.02195127122104168, -0.11719632893800735, 0.012915980070829391, -0.014441519044339657, -0.027959812432527542, -0.05216232314705849, -0.07593140006065369, 0.033804673701524734, -0.014092757366597652, -0.025839224457740784, -0.015931714326143265, 0.059181321412324905, 0.003131412435323, 0.06596165150403976, 0.020313609391450882, 0.01710554212331772, -0.059083472937345505, 0.10061146318912506, 0.06938232481479645, 0.16146810352802277, -0.1805739551782608, -0.050834301859140396, 0.028969954699277878, 0.0014175617834553123, -0.04666777327656746, -0.013470171950757504, -0.012613990344107151, -0.0019025993533432484, -0.002284030895680189, 0.0905950665473938, 0.046947479248046875, -0.01698535680770874, -0.027038488537073135, -0.044047582894563675, -0.0758892223238945, -0.010522197000682354, 0.008046366274356842, 0.013586079701781273, -0.005492952652275562, -0.03677939623594284, -0.007305582519620657, -0.18624483048915863, 0.05770808085799217, 0.035347942262887955, -0.08673371374607086, -0.0873967781662941, 0.046990711241960526, 0.034252095967531204, -0.08344535529613495, -0.05093305930495262, 0.0014691801043227315, -0.03275303915143013, 0.03644557669758797, 0.02086300402879715, 0.008249540813267231, 0.054906971752643585, -0.002523320261389017, -0.0872139036655426, -3.909298216175495e-33, -0.01917177252471447, 0.01344430260360241, 0.0002877495135180652, 0.026522181928157806, -0.03287925943732262, 0.02154754102230072, 0.006817660294473171, 0.03233606368303299, -0.0036577978171408176, -0.06474361568689346, -0.07835810631513596, -0.07375909388065338, -0.03973716124892235, 0.07663392275571823, -0.04781629517674446, 0.061134371906518936, -0.0439845472574234, -0.007375322747975588, 0.01864975318312645, 0.009715227410197258, -0.0021152596455067396, 0.00032669113716110587, 0.08102991431951523, 0.06275026500225067, -0.010990447364747524, 0.0014461526880040765, 0.03431522846221924, 0.029153216630220413, -0.07948601990938187, -0.09933352470397949, 0.005760116968303919, -0.0964430570602417, -0.01244135107845068, 0.02273785136640072, 0.013800478540360928, -0.0626588985323906, -0.08698512613773346, 0.022184735164046288, 0.009814134798943996, -0.023548312485218048, -0.002875583479180932, 0.0411083921790123, -0.027975626289844513, -0.005015544593334198, -0.06409000605344772, 0.0018336847424507141, -0.024296367540955544, -0.012806096114218235, 0.021881956607103348, -0.044778045266866684, -0.04946769028902054, -0.04439932852983475, 0.06841888278722763, 0.12897349894046783, -0.04099622741341591, 0.07438068836927414, 0.016248730942606926, 0.08672495186328888, -0.011236853897571564, 0.051039718091487885, 0.0312507227063179, -0.06958592683076859, 0.025500580668449402, 0.01952119544148445, -0.09518208354711533, -0.09569206088781357, 0.04880477860569954, 0.009941759519279003, -0.02479434572160244, 0.009490257129073143, -0.004196160938590765, 0.0098823057487607, -0.006339536048471928, 0.09193108230829239, -0.04119756072759628, 0.0028692493215203285, 0.02261202223598957, -0.12039059400558472, -0.012528156861662865, -0.00051773531595245, -0.036807648837566376, 0.014465303160250187, -0.114314004778862, -0.011925049126148224, -0.01441570557653904, -0.03975658863782883, 0.02690296806395054, 0.019555263221263885, 0.0875055342912674, 0.02099655568599701, -0.02305443212389946, 0.03214017301797867, -0.08880405128002167, 0.03262028098106384, -0.00376684102229774, -4.986561918940424e-8, -0.04627605527639389, -0.011056369170546532, 0.0007935126777738333, 0.0303859431296587, 0.03404191508889198, 0.007027309387922287, 0.10781966894865036, 0.07811935991048813, -0.05955829843878746, 0.020508425310254097, -0.0026500278618186712, 0.019273485988378525, -0.029643215239048004, -0.04313775897026062, 0.06449824571609497, -0.0261975284665823, 0.034310419112443924, -0.030943304300308228, -0.015880364924669266, -0.054753076285123825, 0.011295918375253677, -0.016594277694821358, -0.008324372582137585, 0.023554310202598572, -0.028973910957574844, -0.015316607430577278, 0.09295056015253067, 0.05134423449635506, 0.006792747415602207, 0.012159752659499645, -0.033926576375961304, 0.04687342420220375, -0.03650563210248947, 0.01866438053548336, -0.07530876249074936, 0.04311612993478775, -0.05138250067830086, -0.0033527452033013105, 0.04786786064505577, 0.037842027842998505, -0.03812607005238533, -0.0037005788180977106, 0.0047030262649059296, -0.019852498546242714, -0.04607363045215607, 0.004504012875258923, -0.036811333149671555, 0.06368040293455124, 0.012054639868438244, -0.016498351469635963, -0.023854000493884087, -0.047798462212085724, 0.032803721725940704, 0.11001203209161758, -0.019244777038693428, 0.025533117353916168, 0.04481002315878868, -0.09548772126436234, 0.09011834859848022, 0.0019882977940142155, -0.05142799764871597, 0.04182496294379234, 0.00030329261790029705, -0.02562902495265007 ]
0.101132
{{% thirdparty-content %}} Add-ons extend the functionality of Kubernetes. This page lists some of the available add-ons and links to their respective installation instructions. The list does not try to be exhaustive. ## Networking and Network Policy \* [ACI](https://www.github.com/noironetworks/aci-containers) provides integrated container networking and network security with Cisco ACI. \* [Antrea](https://antrea.io/) operates at Layer 3/4 to provide networking and security services for Kubernetes, leveraging Open vSwitch as the networking data plane. Antrea is a [CNCF project at the Sandbox level](https://www.cncf.io/projects/antrea/). \* [Calico](https://www.tigera.io/project-calico/) is a networking and network policy provider. Calico supports a flexible set of networking options so you can choose the most efficient option for your situation, including non-overlay and overlay networks, with or without BGP. Calico uses the same engine to enforce network policy for hosts, pods, and (if using Istio & Envoy) applications at the service mesh layer. \* [Canal](https://projectcalico.docs.tigera.io/getting-started/kubernetes/flannel/flannel) unites Flannel and Calico, providing networking and network policy. \* [Cilium](https://github.com/cilium/cilium) is a networking, observability, and security solution with an eBPF-based data plane. Cilium provides a simple flat Layer 3 network with the ability to span multiple clusters in either a native routing or overlay/encapsulation mode, and can enforce network policies on L3-L7 using an identity-based security model that is decoupled from network addressing. Cilium can act as a replacement for kube-proxy; it also offers additional, opt-in observability and security features. Cilium is a [CNCF project at the Graduated level](https://www.cncf.io/projects/cilium/). \* [CNI-Genie](https://github.com/cni-genie/CNI-Genie) enables Kubernetes to seamlessly connect to a choice of CNI plugins, such as Calico, Canal, Flannel, or Weave. CNI-Genie is a [CNCF project at the Sandbox level](https://www.cncf.io/projects/cni-genie/). \* [Contiv](https://contivpp.io/) provides configurable networking (native L3 using BGP, overlay using vxlan, classic L2, and Cisco-SDN/ACI) for various use cases and a rich policy framework. Contiv project is fully [open sourced](https://github.com/contiv). The [installer](https://github.com/contiv/install) provides both kubeadm and non-kubeadm based installation options. \* [Contrail](https://www.juniper.net/us/en/products-services/sdn/contrail/contrail-networking/), based on [Tungsten Fabric](https://tungsten.io), is an open source, multi-cloud network virtualization and policy management platform. Contrail and Tungsten Fabric are integrated with orchestration systems such as Kubernetes, OpenShift, OpenStack and Mesos, and provide isolation modes for virtual machines, containers/pods and bare metal workloads. \* [Flannel](https://github.com/flannel-io/flannel#deploying-flannel-manually) is an overlay network provider that can be used with Kubernetes. \* [Gateway API](/docs/concepts/services-networking/gateway/) is an open source project managed by the [SIG Network](https://github.com/kubernetes/community/tree/master/sig-network) community and provides an expressive, extensible, and role-oriented API for modeling service networking. \* [Knitter](https://github.com/ZTE/Knitter/) is a plugin to support multiple network interfaces in a Kubernetes pod. \* [Multus](https://github.com/k8snetworkplumbingwg/multus-cni) is a Multi plugin for multiple network support in Kubernetes to support all CNI plugins (e.g. Calico, Cilium, Contiv, Flannel), in addition to SRIOV, DPDK, OVS-DPDK and VPP based workloads in Kubernetes. \* [OVN-Kubernetes](https://github.com/ovn-org/ovn-kubernetes/) is a networking provider for Kubernetes based on [OVN (Open Virtual Network)](https://github.com/ovn-org/ovn/), a virtual networking implementation that came out of the Open vSwitch (OVS) project. OVN-Kubernetes provides an overlay based networking implementation for Kubernetes, including an OVS based implementation of load balancing and network policy. \* [Nodus](https://github.com/akraino-edge-stack/icn-nodus) is an OVN based CNI controller plugin to provide cloud native based Service function chaining(SFC). \* [NSX-T](https://docs.vmware.com/en/VMware-NSX-T-Data-Center/index.html) Container Plug-in (NCP) provides integration between VMware NSX-T and container orchestrators such as Kubernetes, as well as integration between NSX-T and container-based CaaS/PaaS platforms such as Pivotal Container Service (PKS) and OpenShift. \* [Nuage](https://github.com/nuagenetworks/nuage-kubernetes/blob/v5.1.1-1/docs/kubernetes-1-installation.rst) is an SDN platform that provides policy-based networking between Kubernetes Pods and non-Kubernetes environments with visibility and security monitoring. \* [Romana](https://github.com/romana) is a Layer 3 networking solution for pod networks that also supports the [NetworkPolicy](/docs/concepts/services-networking/network-policies/) API. \* [Spiderpool](https://github.com/spidernet-io/spiderpool) is an underlay and RDMA networking solution for Kubernetes. Spiderpool is supported on bare metal, virtual machines, and public cloud environments. \* [Terway](https://github.com/AliyunContainerService/terway/) is a suite of
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/addons.md
[ -0.009927945211529732, -0.009221131913363934, -0.03684476763010025, -0.006658402271568775, 0.01064317487180233, 0.009590556845068932, 0.006811989936977625, -0.019357237964868546, 0.005477186292409897, -0.016306094825267792, -0.02451389469206333, -0.05505085363984108, -0.08273474872112274, -0.02407434582710266, 0.040991976857185364, 0.02036317251622677, 0.12683284282684326, -0.025666581466794014, -0.023740708827972412, -0.08463159203529358, 0.006467011757194996, -0.04105959087610245, 0.0008615276892669499, -0.045066650956869125, -0.09593239426612854, -0.010950488969683647, -0.06381037086248398, -0.013675911352038383, -0.005891100969165564, 0.025825321674346924, -0.04622484743595123, 0.02556084655225277, 0.007359618786722422, 0.017331775277853012, -0.006211950909346342, -0.02045821212232113, -0.05341118574142456, -0.0751027911901474, -0.06138277426362038, -0.003992341458797455, 0.033829398453235626, -0.019569065421819687, -0.12207336723804474, 0.05591508001089096, -0.08402033895254135, -0.09094160795211792, -0.01827092282474041, -0.05632248893380165, 0.06257876753807068, -0.03825399652123451, -0.0014411680167540908, -0.016463186591863632, 0.007202242035418749, 0.05939234048128128, -0.015472682192921638, 0.019598467275500298, -0.03346405550837517, 0.0440191850066185, 0.034885186702013016, 0.0004121328820474446, 0.0623021237552166, -0.03701047971844673, 0.027894901111721992, 0.038840703666210175, -0.020571893081068993, 0.019569633528590202, -0.03751377761363983, 0.08681059628725052, 0.04687012359499931, -0.022798961028456688, 0.013717858120799065, 0.030865443870425224, 0.00835086777806282, 0.005419974680989981, 0.05208660662174225, 0.012124445289373398, 0.057989075779914856, 0.018470395356416702, 0.03719661012291908, -0.09018263965845108, 0.026269396767020226, 0.05728816241025925, 0.045364078134298325, -0.013490439392626286, -0.058303218334913254, -0.04933839291334152, 0.02180531620979309, -0.0024681182112544775, 0.062055278569459915, 0.007271819747984409, 0.013683020137250423, 0.055017340928316116, 0.026561014354228973, -0.06378611922264099, 0.12795080244541168, -0.036702096462249756, -0.01819520816206932, -0.09352477639913559, -0.049918338656425476, 0.023737860843539238, -0.0015589288668707013, -0.02792046032845974, 0.023908650502562523, 0.02259763516485691, 0.07312782853841782, -0.005207705777138472, -0.07250313460826874, 0.0055992198176681995, 0.008538692258298397, 0.05681613087654114, -0.010393409058451653, 0.034268900752067566, 0.002619237406179309, -0.05062674358487129, -0.05660969018936157, 0.006707895081490278, 0.005350313615053892, 0.02372175268828869, 0.09889862686395645, 0.04065902158617973, 0.00290963938459754, -0.10410010069608688, -0.05660003051161766, -0.03752877935767174, 0.0113370381295681, -0.006198395974934101, -0.08819840103387833, 4.2543913988242556e-33, -0.0015679476782679558, 0.036824002861976624, -0.08835852146148682, -0.03465713933110237, 0.1218295767903328, -0.06461332738399506, 0.03302877023816109, -0.05652552470564842, -0.10949602723121643, -0.013960347510874271, -0.04613950848579407, 0.07334448397159576, -0.01224638894200325, 0.024929851293563843, 0.07730504870414734, -0.05480807647109032, -0.05911173298954964, 0.013575510121881962, 0.12629099190235138, 0.02773785963654518, 0.027082113549113274, -0.06546987593173981, -0.017839055508375168, -0.016309436410665512, 0.07982691377401352, -0.011377014219760895, 0.006157766096293926, -0.036755435168743134, -0.07784943282604218, 0.036758363246917725, 0.023288123309612274, -0.004413962829858065, 0.019343124702572823, 0.06385170668363571, -0.08018943667411804, -0.016355570405721664, -0.03888634592294693, -0.06650623679161072, -0.06312980502843857, 0.052931398153305054, -0.026454176753759384, 0.026006899774074554, 0.018649177625775337, -0.04238075762987137, -0.01799875870347023, -0.0401792973279953, -0.028652381151914597, 0.025985771790146828, 0.10156352818012238, 0.06684916466474533, 0.00022599189833272249, -0.06594624370336533, -0.012106498703360558, -0.04953453689813614, 0.03467067331075668, -0.06374483555555344, 0.012960306368768215, 0.0049569616094231606, 0.011266134679317474, 0.06471676379442215, -0.031866464763879776, -0.04727008566260338, -0.023338213562965393, 0.023265888914465904, -0.04210077226161957, 0.0718633234500885, -0.0588400661945343, 0.020203910768032074, 0.068720243871212, -0.05102444812655449, -0.14455664157867432, 0.0791739672422409, 0.06131724640727043, 0.050119224935770035, -0.022016551345586777, -0.005515781231224537, -0.07709681987762451, -0.0026169572956860065, -0.02209189534187317, 0.07646794617176056, -0.03102690540254116, 0.06062405928969383, 0.03880099579691887, 0.11411111056804657, -0.03280014917254448, -0.02252211421728134, 0.0014181631850078702, 0.04726095870137215, 0.000534821127075702, 0.023220177739858627, -0.024187123402953148, -0.058464016765356064, 0.021248647943139076, 0.054392918944358826, -0.06465577334165573, -3.431861267355438e-33, 0.03608334809541702, 0.015883183106780052, -0.007126064971089363, -0.011777961626648903, -0.03110450506210327, -0.009762577712535858, 0.08054152876138687, -0.060438454151153564, 0.04379313066601753, -0.07479444146156311, -0.038453493267297745, -0.0195278599858284, 0.06756626814603806, -0.020435113459825516, -0.05525020509958267, 0.03387920558452606, -0.03174541890621185, -0.10742661356925964, -0.024249430745840073, -0.006186358630657196, -0.003966374322772026, 0.04095692187547684, -0.015078773722052574, 0.009481647051870823, 0.010528122074902058, -0.021151404827833176, 0.030716001987457275, -0.011510302312672138, -0.027593092992901802, -0.029288003221154213, -0.05355818569660187, -0.06645351648330688, 0.008519611321389675, -0.03175407275557518, 0.040695372968912125, 0.043348927050828934, 0.07172106951475143, 0.1050698459148407, -0.018007492646574974, 0.0019172783941030502, 0.07105201482772827, -0.046915385872125626, -0.07911689579486847, 0.047854188829660416, -0.07955790311098099, 0.05336940288543701, -0.030023006722331047, 0.02555033378303051, -0.0777246281504631, -0.031181365251541138, -0.04541124403476715, -0.0715857595205307, -0.06503289192914963, 0.08831053972244263, -0.007949118502438068, 0.11285669356584549, 0.0640646368265152, 0.06749342381954193, -0.049762576818466187, 0.020249949768185616, 0.11663208901882172, -0.07126637548208237, 0.05773591622710228, 0.05790092051029205, 0.03858426958322525, 0.02277650125324726, -0.036139361560344696, 0.021203745156526566, 0.006451610010117292, 0.007419119589030743, 0.03762208670377731, -0.01530147809535265, 0.05739132687449455, 0.03880637511610985, -0.033956244587898254, -0.03569852560758591, 0.06351044774055481, 0.010810678824782372, -0.01941942237317562, 0.09061860293149948, -0.11116359382867813, 0.062087319791316986, -0.023899288848042488, 0.05231412500143051, 0.09101270884275436, 0.08343805372714996, 0.03825210779905319, 0.02227884717285633, 0.07726617902517319, 0.04714769124984741, -0.05059429630637169, 0.004012397490441799, -0.020832285284996033, 0.10922088474035263, -0.034834109246730804, -5.742671049802084e-8, 0.07406830042600632, 0.014662540517747402, -0.08338481932878494, -0.010692523792386055, -0.02240837924182415, 0.0499178022146225, 0.05994225665926933, -0.0021706304978579283, -0.04380401596426964, 0.030884012579917908, -0.03425408527255058, 0.07511594146490097, -0.061973247677087784, 0.0009932739194482565, -0.03786583989858627, 0.053552426397800446, 0.02105683460831642, 0.02034478262066841, 0.017330411821603775, -0.07303410768508911, -0.06915483623743057, -0.0063985432498157024, 0.0073834932409226894, 0.038491129875183105, -0.022106952965259552, 0.11809347569942474, 0.043358881026506424, -0.02646453119814396, 0.05316275730729103, 0.05256635323166847, -0.041447486728429794, -0.03053065948188305, -0.05384960025548935, 0.0714508593082428, 0.009867897257208824, 0.06471583247184753, -0.038824666291475296, 0.04305073246359825, -0.005611727945506573, 0.050087857991456985, 0.020702846348285675, -0.059369731694459915, 0.00458538020029664, 0.005365338642150164, 0.13064514100551605, 0.003732297569513321, -0.12618505954742432, 0.04538866505026817, 0.0729055181145668, -0.04338033124804497, 0.039036672562360764, -0.014758966863155365, -0.06736329197883606, 0.09703846275806427, 0.017059514299035072, 0.03359941393136978, -0.029557934030890465, -0.06498302519321442, 0.06665614247322083, 0.10680381208658218, -0.0417170450091362, 0.015124158933758736, 0.018330173566937447, -0.06959816068410873 ]
0.253605
visibility and security monitoring. \* [Romana](https://github.com/romana) is a Layer 3 networking solution for pod networks that also supports the [NetworkPolicy](/docs/concepts/services-networking/network-policies/) API. \* [Spiderpool](https://github.com/spidernet-io/spiderpool) is an underlay and RDMA networking solution for Kubernetes. Spiderpool is supported on bare metal, virtual machines, and public cloud environments. \* [Terway](https://github.com/AliyunContainerService/terway/) is a suite of CNI plugins based on AlibabaCloud's VPC and ECS network products. It provides native VPC networking and network policies in AlibabaCloud environments. \* [Weave Net](https://github.com/rajch/weave#using-weave-on-kubernetes) provides networking and network policy, will carry on working on both sides of a network partition, and does not require an external database. ## Service Discovery \* [CoreDNS](https://coredns.io) is a flexible, extensible DNS server which can be [installed](https://github.com/coredns/helm) as the in-cluster DNS for pods. ## Visualization & Control \* [Dashboard](https://github.com/kubernetes/dashboard#kubernetes-dashboard) is a dashboard web interface for Kubernetes. \* [Headlamp](https://headlamp.dev/) is an extensible Kubernetes UI that can be deployed in-cluster or used as a desktop application. ## Infrastructure \* [KubeVirt](https://kubevirt.io/user-guide/#/installation/installation) is an add-on to run virtual machines on Kubernetes. Usually run on bare-metal clusters. \* The [node problem detector](https://github.com/kubernetes/node-problem-detector) runs on Linux nodes and reports system issues as either [Events](/docs/reference/kubernetes-api/cluster-resources/event-v1/) or [Node conditions](/docs/concepts/architecture/nodes/#condition). ## Instrumentation \* [kube-state-metrics](/docs/concepts/cluster-administration/kube-state-metrics) ## Legacy Add-ons There are several other add-ons documented in the deprecated [cluster/addons](https://git.k8s.io/kubernetes/cluster/addons) directory. Well-maintained ones should be linked to here. PRs welcome!
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/addons.md
[ -0.0706414058804512, -0.03904158994555473, -0.032340340316295624, -0.04443102329969406, 0.021243277937173843, 0.0049331034533679485, 0.029977045953273773, -0.02870563603937626, 0.029942357912659645, 0.01310061663389206, -0.019889164716005325, -0.02790413424372673, 0.033781997859478, -0.03946439176797867, -0.0052728294394910336, 0.020604029297828674, 0.11761423200368881, -0.035482510924339294, -0.02326466329395771, -0.10750270634889603, -0.05715598911046982, -0.01568969152867794, -0.020318813621997833, -0.034873057156801224, -0.10383161902427673, 0.05698951706290245, 0.01607074961066246, -0.019232740625739098, -0.009087113663554192, -0.029208214953541756, -0.003330994863063097, 0.006003525573760271, -0.07088584452867508, 0.01563575677573681, -0.010174770839512348, 0.015537325292825699, -0.002019901294261217, -0.058782629668712616, -0.06958286464214325, -0.021650739014148712, 0.029608886688947678, -0.057209186255931854, -0.12329230457544327, -0.011000492610037327, -0.008869607001543045, -0.06529849767684937, -0.048305898904800415, 0.004441757220774889, 0.00544696906581521, -0.05598142743110657, 0.03488142788410187, -0.10777650773525238, 0.07736103981733322, 0.09881323575973511, 0.07642929255962372, 0.00372596038505435, -0.028553128242492676, -0.042906638234853745, -0.017170492559671402, 0.048543546348810196, 0.10208582878112793, -0.05230259150266647, -0.019532915204763412, 0.017359450459480286, 0.0011651997920125723, 0.0014504535356536508, -0.002408511471003294, 0.06641053408384323, 0.08825744688510895, -0.09819869697093964, -0.01835276000201702, 0.03046315535902977, -0.0714825913310051, 0.053560398519039154, -0.014343993738293648, 0.04091436788439751, 0.037791658192873, 0.0024730926379561424, 0.01851753331720829, -0.09978146851062775, 0.009265287779271603, 0.09028957784175873, 0.04016231745481491, 0.05967407673597336, -0.03993982821702957, -0.04919702559709549, -0.002032866468653083, -0.004715955350548029, 0.0159956905990839, 0.009623820893466473, 0.01662043295800686, 0.0215501356869936, 0.009488948620855808, -0.10726790875196457, 0.057035185396671295, 0.002291883109137416, -0.02837224304676056, -0.03880329802632332, 0.011936388909816742, 0.028860338032245636, 0.0022980032954365015, -0.01262572780251503, -0.034669000655412674, -0.02837243117392063, 0.028480155393481255, -0.022384610027074814, 0.001207691035233438, 0.019180068746209145, 0.08409266918897629, 0.11593201756477356, -0.05644587427377701, -0.03564890846610069, -0.0431678369641304, -0.04788621887564659, -0.04377900809049606, 0.025136414915323257, 0.0036436673253774643, 0.008865931071341038, 0.08944428712129593, 0.07129503041505814, 0.012660224922001362, -0.004010925069451332, -0.0016242694109678268, 0.010279437527060509, 0.07477854192256927, 0.03268629312515259, -0.06198761612176895, 2.155501970721913e-33, 0.05683007091283798, -0.02193967066705227, -0.02065306156873703, -0.07515980303287506, 0.0972352921962738, -0.042907580733299255, 0.03803990036249161, -0.07195962965488434, -0.057899344712495804, 0.022133953869342804, -0.10753612965345383, 0.11349458247423172, -0.0175299234688282, -0.03539443016052246, 0.08292441070079803, 0.0032093715853989124, -0.06776443123817444, 0.037373512983322144, 0.13905860483646393, 0.028102677315473557, 0.028460871428251266, -0.04203164950013161, 0.054261501878499985, 0.05853744596242905, 0.10764504224061966, -0.06527872383594513, -0.0014313221909105778, -0.04678897187113762, 0.10538632422685623, 0.04355400428175926, 0.013444923795759678, -0.01455710269510746, -0.01166642364114523, 0.022342650219798088, -0.07809777557849884, 0.01707391068339348, -0.13388194143772125, -0.03623992204666138, -0.057846955955028534, 0.011921596713364124, -0.023933613672852516, -0.011230767704546452, -0.029329227283596992, -0.09722474217414856, -0.06607059389352798, -0.03435966745018959, -0.04004986211657524, 0.016127506271004677, 0.024000678211450577, -0.012950105592608452, -0.018167009577155113, -0.044989634305238724, 0.002904483349993825, -0.015874214470386505, 0.038967493921518326, -0.00820997916162014, 0.11385023593902588, -0.011090700514614582, -0.012543856166303158, 0.07186546921730042, -0.051897116005420685, -0.021178919821977615, -0.031825002282857895, 0.028181670233607292, 0.0020574606023728848, 0.010175775736570358, -0.0228425282984972, 0.06583601981401443, 0.027156412601470947, -0.03198553994297981, -0.09017947316169739, 0.06457856297492981, 0.054270222783088684, 0.027750147506594658, -0.020286060869693756, -0.037934914231300354, -0.10589873045682907, -0.025920484215021133, -0.06198129057884216, 0.03321963921189308, -0.061966829001903534, -0.01326823327690363, -0.0017914873315021396, 0.09087549149990082, -0.0657394602894783, -0.03634919598698616, 0.007188028190284967, 0.02552040107548237, -0.058987583965063095, 0.034933894872665405, 0.04219495877623558, 0.008931715041399002, 0.03743353486061096, 0.010729673318564892, -0.07185197621583939, -3.1433850354300634e-33, 0.019377335906028748, 0.011025877669453621, 0.02632913738489151, -0.0001340207818429917, 0.01653345301747322, -0.0172532070428133, -0.019282246008515358, 0.07304456830024719, -0.03413190692663193, 0.005088882055133581, -0.01586008444428444, -0.0015678334748372436, 0.037207622081041336, -0.009511067532002926, -0.034542638808488846, -0.013325918465852737, -0.0470116063952446, -0.11000075191259384, -0.02539764530956745, 0.04615585505962372, -0.046362049877643585, 0.05113775283098221, -0.025789637118577957, -0.03378196060657501, -0.012640774250030518, -0.019879870116710663, 0.0036925242748111486, -0.01528562419116497, -0.03944331407546997, -0.016367854550480843, -0.02623782306909561, -0.08274143934249878, -0.016024036332964897, -0.021567879244685173, -0.0009456491097807884, 0.004500664304941893, 0.07313144952058792, 0.0338822603225708, 0.0015030659269541502, -0.0392799973487854, 0.03201507404446602, 0.016863500699400902, -0.04353330284357071, 0.008968080393970013, -0.08232821524143219, 0.01688961312174797, -0.1008681058883667, 0.08788084983825684, -0.08598599582910538, -0.05348871275782585, -0.01581328548491001, 0.0028665168210864067, 0.004944120068103075, 0.09683767706155777, -0.012395632453262806, 0.0711846649646759, 0.045354362577199936, 0.10870277881622314, -0.013605167157948017, 0.08537589758634567, 0.08587687462568283, -0.12806273996829987, -0.029595594853162766, 0.10555871576070786, -0.02074131928384304, 0.014656100422143936, -0.017976125702261925, 0.0460842028260231, -0.019561007618904114, 0.03240977227687836, 0.04790830612182617, 0.008040595799684525, 0.048747770488262177, 0.045646071434020996, 0.026302045211195946, -0.05199747905135155, 0.06529434770345688, -0.03317753225564957, -0.015871986746788025, 0.07061082124710083, -0.07665944844484329, 0.04547775164246559, -0.07409448176622391, -0.022518189623951912, 0.155573308467865, -0.0007571304449811578, 0.07714886218309402, 0.03317198157310486, 0.03144892305135727, 0.05632450804114342, -0.11229345202445984, -0.023305591195821762, -0.07849754393100739, 0.11823994666337967, -0.01022290252149105, -5.193096086486548e-8, 0.002458973089233041, -0.020516542717814445, -0.06162673979997635, -0.0007462469511665404, 0.015737028792500496, -0.00860046036541462, 0.07157756388187408, 0.016288070008158684, -0.03320642560720444, 0.06899463385343552, 0.060408808290958405, 0.04388537257909775, -0.06137247756123543, 0.001168136834166944, 0.034048017114400864, -0.0031874789856374264, 0.08200845122337341, 0.02007201686501503, 0.005939903203397989, -0.07324118912220001, -0.06949888914823532, -0.001893797074444592, -0.060462601482868195, 0.026781735941767693, 0.02749902941286564, 0.0596938394010067, 0.03833555430173874, -0.020416568964719772, 0.005005561746656895, 0.001664433628320694, -0.012388912960886955, 0.02289706841111183, 0.04409158602356911, -0.0033569138031452894, -0.021574942395091057, 0.10215567797422409, -0.10199709981679916, 0.04214279726147652, -0.005240334663540125, 0.07430354505777359, -0.014143700711429119, 0.007921982556581497, -0.042703256011009216, -0.017637373879551888, 0.06799046695232391, -0.00005260828402242623, -0.04428822919726372, 0.0426979698240757, 0.017715275287628174, 0.006819479633122683, 0.01989905722439289, -0.06270474940538406, 0.0640237107872963, 0.07854299992322922, 0.007631990592926741, 0.06808963418006897, -0.020084483548998833, -0.09588001668453217, 0.07644388824701309, 0.09489987790584564, -0.011607212014496326, 0.015541985630989075, 0.04502760246396065, -0.013681283220648766 ]
0.29902
The cluster administration overview is for anyone creating or administering a Kubernetes cluster. It assumes some familiarity with core Kubernetes [concepts](/docs/concepts/). ## Planning a cluster See the guides in [Setup](/docs/setup/) for examples of how to plan, set up, and configure Kubernetes clusters. The solutions listed in this article are called \*distros\*. {{< note >}} Not all distros are actively maintained. Choose distros which have been tested with a recent version of Kubernetes. {{< /note >}} Before choosing a guide, here are some considerations: - Do you want to try out Kubernetes on your computer, or do you want to build a high-availability, multi-node cluster? Choose distros best suited for your needs. - Will you be using \*\*a hosted Kubernetes cluster\*\*, such as [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/), or \*\*hosting your own cluster\*\*? - Will your cluster be \*\*on-premises\*\*, or \*\*in the cloud (IaaS)\*\*? Kubernetes does not directly support hybrid clusters. Instead, you can set up multiple clusters. - \*\*If you are configuring Kubernetes on-premises\*\*, consider which [networking model](/docs/concepts/cluster-administration/networking/) fits best. - Will you be running Kubernetes on \*\*"bare metal" hardware\*\* or on \*\*virtual machines (VMs)\*\*? - Do you \*\*want to run a cluster\*\*, or do you expect to do \*\*active development of Kubernetes project code\*\*? If the latter, choose an actively-developed distro. Some distros only use binary releases, but offer a greater variety of choices. - Familiarize yourself with the [components](/docs/concepts/overview/components/) needed to run a cluster. ## Managing a cluster \* Learn how to [manage nodes](/docs/concepts/architecture/nodes/). \* Read about [Node autoscaling](/docs/concepts/cluster-administration/node-autoscaling/). \* Learn how to set up and manage the [resource quota](/docs/concepts/policy/resource-quotas/) for shared clusters. ## Securing a cluster \* [Generate Certificates](/docs/tasks/administer-cluster/certificates/) describes the steps to generate certificates using different tool chains. \* [Kubernetes Container Environment](/docs/concepts/containers/container-environment/) describes the environment for Kubelet managed containers on a Kubernetes node. \* [Controlling Access to the Kubernetes API](/docs/concepts/security/controlling-access) describes how Kubernetes implements access control for its own API. \* [Authenticating](/docs/reference/access-authn-authz/authentication/) explains authentication in Kubernetes, including the various authentication options. \* [Authorization](/docs/reference/access-authn-authz/authorization/) is separate from authentication, and controls how HTTP calls are handled. \* [Using Admission Controllers](/docs/reference/access-authn-authz/admission-controllers/) explains plug-ins which intercepts requests to the Kubernetes API server after authentication and authorization. \* [Admission Webhook Good Practices](/docs/concepts/cluster-administration/admission-webhooks-good-practices/) provides good practices and considerations when designing mutating admission webhooks and validating admission webhooks. \* [Using Sysctls in a Kubernetes Cluster](/docs/tasks/administer-cluster/sysctl-cluster/) describes to an administrator how to use the `sysctl` command-line tool to set kernel parameters . \* [Auditing](/docs/tasks/debug/debug-cluster/audit/) describes how to interact with Kubernetes' audit logs. ### Securing the kubelet \* [Control Plane-Node communication](/docs/concepts/architecture/control-plane-node-communication/) \* [TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/) \* [Kubelet authentication/authorization](/docs/reference/access-authn-authz/kubelet-authn-authz/) ## Optional Cluster Services \* [DNS Integration](/docs/concepts/services-networking/dns-pod-service/) describes how to resolve a DNS name directly to a Kubernetes service. \* [Logging and Monitoring Cluster Activity](/docs/concepts/cluster-administration/logging/) explains how logging in Kubernetes works and how to implement it.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/_index.md
[ 0.022568481042981148, -0.06485623121261597, 0.03666147217154503, -0.007866906933486462, -0.039742134511470795, 0.049020469188690186, -0.030870508402585983, 0.03885012865066528, -0.003829609602689743, 0.057232312858104706, -0.0401008315384388, -0.06317170709371567, -0.013724555261433125, -0.06291673332452774, 0.0019756373949348927, -0.009818073362112045, 0.061509475111961365, -0.07677697390317917, -0.04109549522399902, -0.06107725948095322, 0.005672565195709467, -0.04854275658726692, -0.007271862123161554, -0.04325828701257706, -0.07026262581348419, 0.05573758855462074, -0.011196302250027657, -0.00872087199240923, 0.0252799391746521, 0.04208297282457352, -0.049586739391088486, -0.03626934066414833, 0.08603907376527786, 0.0838601291179657, 0.009495809674263, 0.08052302151918411, 0.05388721451163292, -0.023876430466771126, -0.09060917049646378, 0.07356155663728714, 0.03336421027779579, -0.05593670904636383, -0.09861087054014206, -0.07803304493427277, 0.033260561525821686, 0.007974646985530853, -0.07673381268978119, -0.011334744282066822, 0.01579817570745945, -0.02232864685356617, 0.027034029364585876, -0.10425163805484772, 0.03674015402793884, 0.07283663749694824, -0.009819180704653263, 0.06080198287963867, -0.0139156524091959, -0.01783769205212593, 0.052489541471004486, -0.08527520298957825, 0.11504387855529785, -0.04141959920525551, -0.01324239932000637, 0.0009485906921327114, -0.027781164273619652, 0.01613544300198555, 0.07138858735561371, 0.027716195210814476, 0.06882407516241074, -0.062014125287532806, 0.023502163589000702, 0.008229841478168964, -0.0297109205275774, 0.01582205295562744, -0.06160007417201996, -0.0021759553346782923, 0.03351648896932602, 0.019574416801333427, 0.01885022595524788, 0.038969509303569794, 0.05016682669520378, 0.07722881436347961, 0.011522172018885612, 0.027324514463543892, -0.13470423221588135, -0.03936658054590225, -0.055867668241262436, -0.02365531586110592, 0.018958596512675285, -0.04105377942323685, 0.029354486614465714, 0.040758319199085236, 0.06321003288030624, -0.08227758854627609, 0.06957115232944489, 0.06598217785358429, -0.046975281089544296, -0.05501938611268997, 0.08427086472511292, -0.02340853214263916, 0.03539826348423958, -0.04110096022486687, -0.03853486105799675, -0.06801547110080719, -0.026317637413740158, 0.009412664920091629, -0.03159342706203461, 0.0005629668594338, 0.062089767307043076, 0.023687593638896942, -0.01961367391049862, 0.07293420284986496, -0.04036819934844971, 0.01578613370656967, -0.012391122989356518, 0.011079433374106884, 0.04464809596538544, -0.03362521529197693, 0.08761683851480484, 0.09106796979904175, 0.01777142845094204, -0.09959091991186142, 0.03786877915263176, -0.0191322211176157, 0.014183951541781425, 0.051292553544044495, -0.11114563047885895, 4.6903929064617964e-33, 0.01096793171018362, 0.02209494076669216, 0.010271853767335415, -0.06918273121118546, 0.039367083460092545, -0.06915009766817093, -0.061724573373794556, -0.029925962910056114, -0.08692324161529541, -0.06074850633740425, -0.012116421945393085, 0.0414317362010479, -0.010869327932596207, -0.033400263637304306, 0.031375352293252945, -0.0181758813560009, 0.011725190095603466, 0.020219992846250534, 0.10299752652645111, -0.02175261825323105, -0.014669216237962246, -0.04270462691783905, -0.0021646199747920036, 0.024478966370224953, 0.020957468077540398, -0.05859391391277313, 0.05197431147098541, -0.06382989138364792, 0.021760165691375732, -0.004529529716819525, -0.026720892637968063, -0.05576012656092644, 0.0015648261178284883, -0.01565105840563774, -0.11180465668439865, 0.03450658172369003, -0.1010911762714386, 0.0033569540828466415, -0.047715552151203156, -0.04714849963784218, -0.0791347399353981, 0.03802914917469025, 0.014108347706496716, -0.10782571136951447, 0.12141375243663788, 0.04652007669210434, 0.0768820196390152, -0.08034650981426239, 0.09494978189468384, -0.04389878734946251, -0.03761902078986168, -0.05188124626874924, 0.07596755772829056, -0.004159226082265377, 0.0034536586608737707, 0.1305965632200241, 0.11074024438858032, -0.09548778086900711, -0.025867503136396408, 0.030006900429725647, -0.050472572445869446, -0.05092450976371765, 0.01128164678812027, -0.020776819437742233, -0.0058103930205106735, -0.02781030535697937, -0.045277610421180725, 0.12125126272439957, -0.019025014713406563, 0.018865030258893967, -0.04927205666899681, -0.01524821575731039, 0.0037835128605365753, 0.0522821806371212, -0.00449533574283123, -0.03633103519678116, 0.007679701782763004, 0.01367899775505066, -0.08742984384298325, 0.04878026992082596, -0.029682401567697525, 0.006308279931545258, -0.04942876100540161, 0.11441577970981598, 0.028420425951480865, 0.0274982750415802, 0.023174328729510307, 0.05496891215443611, -0.020656565204262733, 0.05151156336069107, 0.023810062557458878, -0.017670609056949615, 0.02678983099758625, 0.053570326417684555, -0.0590459443628788, -6.430561682640494e-33, 0.053572021424770355, 0.06538969278335571, -0.0386064238846302, 0.04692244529724121, 0.05974796786904335, 0.06722193956375122, -0.04455038160085678, 0.026397649198770523, 0.0161752812564373, -0.07485634088516235, -0.039441220462322235, -0.028505919501185417, 0.03667445108294487, 0.004048636648803949, -0.13104160130023956, -0.016869572922587395, -0.013299279846251011, -0.06724809110164642, -0.011892404407262802, -0.008669476956129074, -0.03240237012505531, -0.09936941415071487, 0.006612222641706467, -0.012165470980107784, -0.020539958029985428, -0.0022982500959187746, 0.0009431863436475396, 0.018147097900509834, -0.059360403567552567, 0.03860751539468765, -0.0041688778437674046, -0.06410425156354904, 0.04160434007644653, 0.03700648993253708, 0.04662773385643959, -0.05787806957960129, 0.010181969031691551, -0.05222766473889351, 0.03785105422139168, -0.03348807245492935, 0.03652730956673622, -0.0022676449734717607, -0.006306671537458897, -0.10656620562076569, -0.01387871615588665, 0.04534424468874931, -0.0035285267513245344, 0.02584533765912056, -0.031913649290800095, -0.08320318907499313, -0.07079096883535385, -0.04711784049868584, -0.09653116017580032, 0.032219476997852325, -0.023923955857753754, 0.04421466216444969, -0.006831109523773193, 0.12489929795265198, -0.04012426361441612, -0.004093775525689125, -0.018821895122528076, -0.09990625828504562, 0.015473575331270695, 0.07216069847345352, -0.04674658924341202, -0.02803230658173561, 0.008975185453891754, 0.06102122366428375, -0.09490944445133209, 0.01550531666725874, -0.11314657330513, 0.02491980791091919, 0.04327790439128876, 0.039003144949674606, -0.04683459922671318, -0.043890610337257385, 0.041407205164432526, -0.01738235168159008, 0.06447958946228027, 0.009769445285201073, -0.008846400305628777, 0.040940139442682266, -0.09933768212795258, 0.009434295818209648, 0.051393914967775345, 0.0372602604329586, 0.08453092724084854, -0.00396974291652441, 0.03385079279541969, 0.05470709875226021, -0.03249727934598923, 0.03981126844882965, -0.004456773400306702, 0.09896184504032135, -0.033412449061870575, -5.868878005799161e-8, 0.07315781712532043, 0.025927620008587837, -0.031573597341775894, -0.002629778580740094, -0.031154470518231392, 0.007989010773599148, 0.008021731860935688, -0.05752493441104889, -0.002697770483791828, 0.01694224216043949, -0.002988136140629649, -0.015424279496073723, -0.04632069170475006, -0.022221878170967102, -0.01815943978726864, 0.00733926659449935, 0.004827254917472601, 0.00785851664841175, 0.03785032033920288, -0.005424325820058584, -0.002602682216092944, -0.05483495816588402, 0.024719921872019768, 0.04293844848871231, 0.01628568209707737, 0.034425850957632065, 0.08328329026699066, -0.00018495983385946602, -0.04055735468864441, -0.006747925188392401, -0.060447558760643005, 0.02119140513241291, -0.07015911489725113, 0.05156565085053444, 0.014622712507843971, 0.012559190392494202, -0.1562092900276184, 0.08143148571252823, 0.08773829787969589, 0.06401550769805908, 0.09716753661632538, 0.02276935800909996, -0.0368654727935791, -0.027808718383312225, 0.032967373728752136, 0.06726574897766113, -0.0046394928358495235, 0.03056528978049755, -0.018589869141578674, 0.02349759265780449, 0.009828772395849228, 0.003929374739527702, 0.014707443304359913, 0.12424886226654053, 0.022643325850367546, 0.005903174635022879, -0.020905915647745132, -0.03239855170249939, 0.09296706318855286, -0.018533706665039062, 0.0357939712703228, 0.040257297456264496, -0.06154017522931099, 0.008644302375614643 ]
0.171211
Since release v1.32, we introduced configurable version compatibility and emulation options to Kubernetes control plane components to make upgrades safer by providing more control and increasing the granularity of steps available to cluster administrators. ## Emulated Version The emulation option is set by the `--emulated-version` flag of control plane components. It allows the component to emulate the behavior (APIs, features, ...) of an earlier version of Kubernetes. When used, the capabilities available will match the emulated version: \* Any capabilities present in the binary version that were introduced after the emulation version will be unavailable. \* Any capabilities removed after the emulation version will be available. This enables a binary from a particular Kubernetes release to emulate the behavior of a previous version with sufficient fidelity that interoperability with other system components can be defined in terms of the emulated version. The `--emulated-version` must be <= `binaryVersion`. See the help message of the `--emulated-version` flag for supported range of emulated versions.
https://github.com/kubernetes/website/blob/main//content/en/docs/concepts/cluster-administration/compatibility-version.md
[ 0.04390259087085724, -0.02428428828716278, 0.06447262316942215, -0.03222138062119484, 0.04571005329489708, 0.0032971063628792763, -0.06420700997114182, -0.053485844284296036, 0.0018883916782215238, 0.019586855545639992, -0.0025844285264611244, -0.04691092297434807, 0.022405045107007027, -0.06599000841379166, 0.040389277040958405, 0.014849729835987091, 0.14878696203231812, -0.04211939871311188, -0.04334309697151184, -0.005072018597275019, -0.008123239502310753, -0.03432599455118179, -0.008931944146752357, 0.0025153744500130415, -0.04254009947180748, -0.009899557568132877, -0.08251727372407913, -0.0036651541013270617, 0.03694864362478256, -0.04038158431649208, -0.05492196977138519, 0.0035755017306655645, 0.0529940240085125, 0.01652846299111843, 0.021626431494951248, -0.002252858364954591, 0.03418617323040962, -0.010962890461087227, -0.08813699334859848, 0.04100579768419266, -0.005746425595134497, -0.01675732433795929, -0.11468047648668289, -0.02155807986855507, -0.0235733725130558, -0.004343515262007713, -0.007256933953613043, -0.06844867020845413, -0.08452645689249039, -0.011255310848355293, 0.06583530455827713, -0.06965846568346024, 0.021741311997175217, 0.00021887014736421406, 0.08323623239994049, -0.013595128431916237, -0.032068848609924316, 0.07987457513809204, 0.03534666821360588, 0.017804430797696114, -0.010202372446656227, -0.020100558176636696, 0.017049700021743774, -0.03036094456911087, -0.06553656607866287, -0.06104934215545654, 0.06405292451381683, -0.040599528700113297, 0.057497866451740265, -0.06768060475587845, 0.02574031800031662, -0.023979872465133667, -0.0410754568874836, -0.05509670078754425, -0.045635536313056946, 0.07228421419858932, -0.018337838351726532, 0.020991239696741104, 0.03424763306975365, -0.08723143488168716, 0.020741768181324005, -0.010361573658883572, -0.024517182260751724, -0.02210092544555664, -0.0825348049402237, 0.0019540144130587578, -0.0005003710393793881, -0.08302941173315048, 0.10286137461662292, 0.025290926918387413, -0.01807819865643978, -0.03424417972564697, 0.08755576610565186, -0.030711481347680092, 0.07252219319343567, -0.04332488030195236, -0.03786953166127205, -0.0335129052400589, 0.025157537311315536, 0.01791268028318882, -0.010582092218101025, -0.017866281792521477, 0.03041730262339115, 0.055777691304683685, -0.018215730786323547, -0.050654660910367966, 0.024491777643561363, -0.047780852764844894, -0.0075242300517857075, 0.02981533296406269, -0.002008631592616439, 0.0659952163696289, -0.026349946856498718, -0.04499706253409386, -0.019090507179498672, -0.025614136829972267, -0.0021813567727804184, -0.022278863936662674, 0.03796500712633133, 0.04461926966905594, 0.04265955463051796, -0.11609628051519394, 0.07737121731042862, 0.04633895307779312, 0.004972077906131744, 0.01532699167728424, -0.05306563526391983, 5.063951419499688e-33, -0.0073054078966379166, -0.052316367626190186, -0.027685919776558876, 0.018419604748487473, 0.08607036620378494, -0.03938979655504227, -0.002889742609113455, 0.0009472919628024101, -0.07661028206348419, -0.04158978536725044, -0.09635242074728012, 0.060970455408096313, -0.015366176143288612, 0.009835164062678814, 0.1373695433139801, 0.0025651552714407444, -0.07058783620595932, 0.04351240396499634, 0.07913608103990555, 0.02039695903658867, 0.056586477905511856, -0.044201966375112534, -0.03442086651921272, -0.03580687940120697, 0.013144237920641899, -0.06026500463485718, 0.06356605887413025, -0.0197285246104002, -0.005135399755090475, 0.023719772696495056, -0.04994496330618858, -0.008301201276481152, 0.05741402879357338, 0.009333149529993534, -0.12035864591598511, 0.02149343304336071, -0.058927983045578, -0.01908869296312332, -0.057936929166316986, -0.01756524294614792, 0.035196345299482346, 0.01408140268176794, 0.014731616713106632, -0.10888974368572235, 0.09041397273540497, -0.0009973456617444754, 0.0360771082341671, -0.04125526547431946, 0.010770427994430065, -0.004746133927255869, 0.022036602720618248, 0.030766526237130165, 0.05201428011059761, -0.076641745865345, 0.08310249447822571, -0.07377001643180847, 0.1255819946527481, -0.03133378177881241, -0.029921725392341614, 0.04744153842329979, -0.027869446203112602, 0.0012537131551653147, 0.01848377101123333, -0.019041620194911957, 0.05458485707640648, 0.049155667424201965, -0.016006937250494957, 0.029240533709526062, -0.03130614012479782, 0.027470700442790985, -0.11355683207511902, 0.013196716085076332, -0.0760609358549118, 0.03117513842880726, -0.00863636564463377, -0.09075233340263367, -0.03902018442749977, 0.026609722524881363, 0.006533750798553228, 0.03871353343129158, -0.009516472928225994, -0.025806806981563568, -0.08138911426067352, 0.08664081990718842, 0.01887810230255127, -0.07869168370962143, -0.027661725878715515, 0.0440935380756855, 0.0008190729422494769, 0.012356064282357693, 0.0716179832816124, -0.06212443485856056, -0.00008416538912570104, 0.08264772593975067, -0.05446881055831909, -5.450127027683734e-33, 0.011212920770049095, -0.0031999805942177773, -0.06187039613723755, 0.029688257724046707, -0.060660943388938904, 0.016536235809326172, -0.019625727087259293, 0.05625572428107262, -0.07183974981307983, -0.09540997445583344, -0.022830018773674965, -0.032954007387161255, 0.059506338089704514, 0.0006986599764786661, -0.11289526522159576, -0.03674524277448654, -0.13726046681404114, -0.05439033359289169, 0.024777567014098167, 0.006346982903778553, 0.0052595422603189945, -0.04207842797040939, 0.08467688411474228, 0.05430024117231369, 0.01861761510372162, 0.0010581433307379484, -0.011857232078909874, 0.07599914073944092, 0.007200323510915041, -0.054461635649204254, 0.017612963914871216, -0.09645649045705795, -0.0023538905661553144, 0.0422229990363121, 0.025671154260635376, -0.01385312806814909, 0.05686921253800392, 0.010341781191527843, -0.010799624025821686, -0.05177212879061699, 0.019703008234500885, -0.015678444877266884, -0.005414408165961504, 0.016879238188266754, 0.021898625418543816, 0.07095684111118317, 0.05062365159392357, -0.01618712581694126, 0.057311560958623886, -0.1474805325269699, 0.025048721581697464, 0.009119929745793343, 0.01739288680255413, 0.05919664725661278, -0.04079272970557213, 0.021746408194303513, 0.056715674698352814, 0.0975799486041069, 0.0022117970511317253, 0.02167818509042263, 0.08011403679847717, -0.10880378633737564, 0.07446548342704773, 0.020589765161275864, 0.00023270589008461684, 0.020131470635533333, 0.03659635782241821, 0.13541792333126068, -0.05218930169939995, 0.08616016805171967, -0.012847158126533031, -0.04687263071537018, -0.02235877700150013, -0.009181607514619827, 0.010435004718601704, -0.02679597958922386, 0.02707010507583618, -0.01929783821105957, 0.017573054879903793, -0.03416339308023453, -0.0810432955622673, 0.048681486397981644, -0.0053182668052613735, 0.009766447357833385, 0.08543462306261063, 0.04024769365787506, 0.047415267676115036, 0.010348965413868427, 0.10177601873874664, 0.02666984125971794, -0.03721469268202782, 0.029894115403294563, -0.0894191786646843, 0.1586047261953354, -0.03676766902208328, -5.655154566852616e-8, 0.06074736267328262, 0.016227224841713905, -0.04164159670472145, 0.001830554916523397, 0.06231490150094032, 0.03091086633503437, -0.027533646672964096, -0.06025789678096771, -0.003920078277587891, -0.016650378704071045, -0.017099568620324135, 0.0906408354640007, -0.037599120289087296, 0.05485299602150917, 0.11164268106222153, 0.04686423018574715, -0.06834050267934799, 0.0042226132936775684, 0.051723551005125046, -0.04048255831003189, -0.028799626976251602, -0.031599923968315125, 0.007499005179852247, -0.025569621473550797, -0.01751537434756756, -0.0100540891289711, -0.0019463705830276012, 0.0680495947599411, 0.027766549959778786, 0.05258966609835625, 0.030967259779572487, -0.0034796474501490593, -0.031075850129127502, 0.07827932387590408, -0.02838566154241562, 0.03492622449994087, -0.11398737132549286, 0.09662648290395737, 0.08280020207166672, 0.008268791250884533, 0.0026943304110318422, -0.01599714159965515, -0.1104159727692604, 0.017043551430106163, 0.06430640071630478, 0.06554272770881653, -0.039785586297512054, -0.024786239489912987, -0.07119769603013992, 0.004104280844330788, 0.026078512892127037, 0.021628880873322487, -0.04750606045126915, 0.07692388445138931, -0.010218326933681965, 0.01672319322824478, -0.05849020555615425, -0.08628907799720764, 0.11308109760284424, 0.036296725273132324, 0.018772440031170845, -0.023152044042944908, 0.0422406941652298, -0.012233098968863487 ]
0.130414
This tutorial shows you how to run a sample app on Kubernetes using minikube. The tutorial provides a container image that uses NGINX to echo back all the requests. ## {{% heading "objectives" %}} \* Deploy a sample application to minikube. \* Run the app. \* View application logs. ## {{% heading "prerequisites" %}} This tutorial assumes that you have already set up `minikube`. See \_\_Step 1\_\_ in [minikube start](https://minikube.sigs.k8s.io/docs/start/) for installation instructions. {{< note >}} Only execute the instructions in \_\_Step 1, Installation\_\_. The rest is covered on this page. {{< /note >}} You also need to install `kubectl`. See [Install tools](/docs/tasks/tools/#kubectl) for installation instructions. ## Create a minikube cluster ```shell minikube start ``` ## Check the status of the minikube cluster Verify the status of the minikube cluster to ensure all the components are in a running state. ```shell minikube status ``` The output from the above command should show all components Running or Configured, as shown in the example output below: ``` minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured ``` ## Open the Dashboard Open the Kubernetes dashboard. You can do this two different ways: {{< tabs name="dashboard" >}} {{% tab name="Launch a browser" %}} Open a \*\*new\*\* terminal, and run: ```shell # Start a new terminal, and leave this running. minikube dashboard ``` Now, switch back to the terminal where you ran `minikube start`. {{< note >}} The `dashboard` command enables the dashboard add-on and opens the proxy in the default web browser. You can create Kubernetes resources on the dashboard such as Deployment and Service. To find out how to avoid directly invoking the browser from the terminal and get a URL for the web dashboard, see the "URL copy and paste" tab. By default, the dashboard is only accessible from within the internal Kubernetes virtual network. The `dashboard` command creates a temporary proxy to make the dashboard accessible from outside the Kubernetes virtual network. To stop the proxy, run `Ctrl+C` to exit the process. After the command exits, the dashboard remains running in the Kubernetes cluster. You can run the `dashboard` command again to create another proxy to access the dashboard. {{< /note >}} {{% /tab %}} {{% tab name="URL copy and paste" %}} If you don't want minikube to open a web browser for you, run the `dashboard` subcommand with the `--url` flag. `minikube` outputs a URL that you can open in the browser you prefer. Open a \*\*new\*\* terminal, and run: ```shell # Start a new terminal, and leave this running. minikube dashboard --url ``` Now, you can use this URL and switch back to the terminal where you ran `minikube start`. {{% /tab %}} {{< /tabs >}} ## Create a Deployment A Kubernetes [\*Pod\*](/docs/concepts/workloads/pods/) is a group of one or more Containers, tied together for the purposes of administration and networking. The Pod in this tutorial has only one Container. A Kubernetes [\*Deployment\*](/docs/concepts/workloads/controllers/deployment/) checks on the health of your Pod and restarts the Pod's Container if it terminates. Deployments are the recommended way to manage the creation and scaling of Pods. 1. Use the `kubectl create` command to create a Deployment that manages a Pod. The Pod runs a Container based on the provided Docker image. ```shell # Run a test container image that includes a webserver kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.53 -- /agnhost netexec --http-port=8080 ``` 1. View the Deployment: ```shell kubectl get deployments ``` The output is similar to: ``` NAME READY UP-TO-DATE AVAILABLE AGE hello-node 1/1 1 1 1m ``` (It may take some time for the pod to become available. If you
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/hello-minikube.md
[ 0.01731846109032631, 0.058221034705638885, 0.02022448740899563, -0.023290935903787613, -0.010459482669830322, 0.0232338048517704, -0.07710320502519608, 0.08635837584733963, 0.008156074211001396, 0.026639442890882492, -0.07180413603782654, -0.057238832116127014, 0.023571902886033058, -0.04775058105587959, 0.037890978157520294, -0.016753913834691048, 0.07504690438508987, 0.009313046932220459, -0.00982888974249363, -0.06447385996580124, -0.024350440129637718, 0.022452956065535545, 0.04118593782186508, -0.05108038708567619, -0.06384194642305374, -0.02312549389898777, -0.007618102245032787, 0.0254207830876112, 0.05717591196298599, 0.022922057658433914, 0.04804367199540138, -0.011073239147663116, 0.004728052765130997, -0.0013808944495394826, 0.053040776401758194, 0.15662722289562225, 0.02507268451154232, -0.0460064671933651, -0.07413143664598465, 0.004632127936929464, 0.05739839747548103, -0.013169041834771633, -0.11632780730724335, -0.09190647304058075, -0.0019654042553156614, -0.06901174783706665, -0.06556567549705505, -0.08808763325214386, 0.00850662961602211, -0.07726182788610458, -0.010133759118616581, -0.08246126770973206, 0.017053231596946716, 0.009476023726165295, -0.019792985171079636, -0.033295441418886185, -0.03902069106698036, 0.009554996155202389, 0.13857579231262207, 0.01479332149028778, 0.01933310367166996, -0.011011469177901745, 0.11078404635190964, 0.01707414910197258, 0.005295376759022474, -0.07254107296466827, -0.02649729698896408, 0.005433118902146816, 0.03745679184794426, -0.005402080714702606, 0.029994890093803406, 0.05165046080946922, -0.08049461990594864, -0.030897485092282295, -0.06835876405239105, -0.09181796759366989, -0.006340593099594116, 0.042800091207027435, -0.09640264511108398, -0.012716684490442276, -0.046300943940877914, -0.010822060517966747, 0.028913266956806183, 0.07773897051811218, -0.11717778444290161, -0.04889999330043793, 0.006435899063944817, -0.04803254455327988, 0.0653318464756012, -0.0641716793179512, -0.002509595360606909, -0.020898809656500816, 0.004348515532910824, -0.021249324083328247, 0.06111321225762367, 0.008491436019539833, -0.01812559738755226, 0.02327384613454342, -0.005436242092400789, 0.029781516641378403, 0.0434705875813961, -0.09452978521585464, 0.03464100509881973, -0.02875538170337677, 0.05449651554226875, -0.004251192789524794, 0.002624796936288476, -0.05581125244498253, 0.04944829270243645, 0.01668456569314003, -0.049916986376047134, 0.03293928503990173, -0.011744390241801739, -0.012682976201176643, 0.014951472170650959, -0.05897597596049309, 0.04344833269715309, -0.020176973193883896, 0.02985468879342079, 0.13109681010246277, 0.06737406551837921, -0.04607074707746506, 0.0009292266913689673, 0.0013075958704575896, 0.0929892435669899, 0.08423865586519241, -0.0019848381634801626, 2.7490006195864396e-33, 0.09190645068883896, -0.0357770174741745, 0.029369672760367393, -0.04798120632767677, 0.004538340028375387, -0.10802098363637924, 0.006707650609314442, -0.047294262796640396, -0.04020001366734505, 0.02090165764093399, -0.06460174918174744, 0.04561760649085045, -0.02474675327539444, 0.0017596626421436667, 0.03212457895278931, -0.04343670234084129, -0.0596577450633049, 0.018590202555060387, 0.13267621397972107, 0.007946447469294071, 0.018966585397720337, -0.06298036873340607, -0.02214268408715725, 0.02495434135198593, 0.05132581666111946, -0.01872534677386284, 0.10769253969192505, -0.07905504107475281, -0.07069716602563858, -0.0059576621279120445, 0.010292557999491692, -0.047646380960941315, -0.040021903812885284, -0.013352637179195881, -0.06787146627902985, -0.0404888391494751, 0.045473095029592514, 0.07704941183328629, -0.08461758494377136, 0.013800082728266716, 0.028226736932992935, -0.027710717171430588, -0.08912738412618637, -0.0700918585062027, 0.033045221120119095, -0.010143744759261608, 0.021837003529071808, -0.0397547148168087, 0.16276764869689941, -0.000820718239992857, -0.0583493709564209, -0.08919072151184082, 0.03151775524020195, 0.005640460178256035, 0.0452713780105114, 0.04627695307135582, 0.0392514243721962, -0.10756397992372513, -0.02348482236266136, -0.06528094410896301, -0.011523525230586529, -0.05920400470495224, -0.002979132579639554, 0.03505575656890869, 0.006389355752617121, -0.037521231919527054, 0.03656312823295593, 0.042221300303936005, 0.023498469963669777, -0.046523317694664, -0.11016619950532913, 0.026748402044177055, 0.038698986172676086, -0.009211528114974499, 0.06656137108802795, 0.000052260907978052273, 0.02031005173921585, 0.0019286065362393856, 0.017893915995955467, 0.05045228824019432, 0.05154779925942421, -0.05896812677383423, -0.07504478842020035, 0.040356531739234924, 0.06675802171230316, -0.017657814547419548, 0.017902538180351257, 0.004659566096961498, -0.02882600761950016, -0.003490854287520051, -0.009724264964461327, -0.025891516357660294, -0.08419962972402573, 0.004522431641817093, -0.08867660164833069, -4.924569380902843e-33, 0.06340240687131882, 0.029235711321234703, 0.019823916256427765, 0.02393467165529728, 0.09421457350254059, 0.02808297798037529, 0.036395780742168427, 0.031864263117313385, -0.05229172855615616, -0.002472524531185627, -0.05248933285474777, -0.022548342123627663, 0.0326685905456543, 0.03242636099457741, -0.13378314673900604, 0.07161799818277359, -0.010532951913774014, 0.013539071194827557, 0.07426295429468155, -0.04268818348646164, -0.07093002647161484, -0.00876182783395052, 0.007559808902442455, -0.0036672644782811403, -0.008957654237747192, -0.0028951496351510286, 0.0980064645409584, -0.003954804036766291, -0.08518417924642563, -0.014845618978142738, 0.030918767675757408, -0.04107790067791939, -0.034090835601091385, 0.08893673121929169, -0.03182211145758629, -0.04426753148436546, -0.038717593997716904, -0.01744314841926098, 0.01890902779996395, -0.08915545791387558, 0.10599659383296967, 0.022228267043828964, -0.0006655554752796888, -0.06162125989794731, -0.10151710361242294, -0.03210136666893959, 0.035066913813352585, -0.06158456578850746, -0.026986394077539444, -0.09969290345907211, -0.028345903381705284, 0.012706698849797249, -0.042850613594055176, 0.0455498993396759, -0.0387507863342762, 0.03429694473743439, 0.04262533411383629, 0.10807027667760849, 0.005909454543143511, 0.053273122757673264, 0.026419851928949356, -0.10033554583787918, 0.09214980155229568, -0.0033075555693358183, -0.03977235406637192, 0.03699265420436859, 0.01237897202372551, 0.040861617773771286, -0.047735508531332016, -0.0143045699223876, -0.005085829645395279, -0.023147080093622208, 0.06492267549037933, 0.06696544587612152, 0.013660835102200508, 0.03853489086031914, 0.004523330833762884, -0.029119566082954407, 0.0016495807794854045, -0.039216700941324234, 0.023769108578562737, 0.02674979716539383, -0.09093152731657028, -0.06867407262325287, 0.032340578734874725, 0.037291020154953, -0.0107171181589365, 0.03354732692241669, 0.04518740996718407, 0.021936234086751938, 0.01208795327693224, 0.08209525048732758, 0.06501182913780212, 0.03684433549642563, -0.03309762105345726, -5.157999183325046e-8, 0.02595258317887783, -0.032389868050813675, -0.025913307443261147, 0.0463145412504673, -0.004341820254921913, -0.025648083537817, 0.03418383374810219, -0.06102779135107994, -0.009622523561120033, -0.010213776491582394, -0.039888300001621246, 0.03544123098254204, -0.0680461898446083, 0.0734645426273346, 0.02662644162774086, 0.0359259732067585, 0.023100566118955612, 0.025140805169939995, 0.08483007550239563, -0.0633033737540245, -0.04035569354891777, -0.0020062862895429134, 0.022151408717036247, -0.0107386140152812, 0.04182880371809006, 0.054568637162446976, 0.034340646117925644, 0.038581691682338715, 0.03432922065258026, -0.08887358754873276, -0.04309576004743576, 0.05912121757864952, -0.11182738840579987, 0.05023524910211563, 0.004480569623410702, 0.010823516175150871, -0.13343359529972076, 0.03892897441983223, 0.03501024469733238, -0.038781750947237015, -0.008255349472165108, 0.01795845665037632, 0.006989732384681702, -0.08080243319272995, -0.014449271373450756, 0.05951634421944618, -0.03304862976074219, -0.011064261198043823, -0.005454994272440672, -0.06448119133710861, 0.018185844644904137, -0.06979132443666458, 0.00014542494318448007, 0.03254847228527069, 0.012471652589738369, 0.11327704787254333, 0.02595733478665352, -0.040964823216199875, 0.0081752585247159, -0.01909094862639904, -0.001343855750747025, 0.09297551959753036, -0.03146873414516449, -0.013913503848016262 ]
0.03738
webserver kubectl create deployment hello-node --image=registry.k8s.io/e2e-test-images/agnhost:2.53 -- /agnhost netexec --http-port=8080 ``` 1. View the Deployment: ```shell kubectl get deployments ``` The output is similar to: ``` NAME READY UP-TO-DATE AVAILABLE AGE hello-node 1/1 1 1 1m ``` (It may take some time for the pod to become available. If you see "0/1", try again in a few seconds.) 1. View the Pod: ```shell kubectl get pods ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE hello-node-5f76cf6ccf-br9b5 1/1 Running 0 1m ``` 1. View cluster events: ```shell kubectl get events ``` 1. View the `kubectl` configuration: ```shell kubectl config view ``` 1. View application logs for a container in a pod (replace pod name with the one you got from `kubectl get pods`). {{< note >}} Replace `hello-node-5f76cf6ccf-br9b5` in the `kubectl logs` command with the name of the pod from the `kubectl get pods` command output. {{< /note >}} ```shell kubectl logs hello-node-5f76cf6ccf-br9b5 ``` The output is similar to: ``` I0911 09:19:26.677397 1 log.go:195] Started HTTP server on port 8080 I0911 09:19:26.677586 1 log.go:195] Started UDP server on port 8081 ``` {{< note >}} For more information about `kubectl` commands, see the [kubectl overview](/docs/reference/kubectl/). {{< /note >}} ## Create a Service By default, the Pod is only accessible by its internal IP address within the Kubernetes cluster. To make the `hello-node` Container accessible from outside the Kubernetes virtual network, you have to expose the Pod as a Kubernetes [\*Service\*](/docs/concepts/services-networking/service/). {{< warning >}} The agnhost container has a `/shell` endpoint, which is useful for debugging, but dangerous to expose to the public internet. Do not run this on an internet-facing cluster, or a production cluster. {{< /warning >}} 1. Expose the Pod to the public internet using the `kubectl expose` command: ```shell kubectl expose deployment hello-node --type=LoadBalancer --port=8080 ``` The `--type=LoadBalancer` flag indicates that you want to expose your Service outside of the cluster. The application code inside the test image only listens on TCP port 8080. If you used `kubectl expose` to expose a different port, clients could not connect to that other port. 2. View the Service you created: ```shell kubectl get services ``` The output is similar to: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-node LoadBalancer 10.108.144.78 8080:30369/TCP 21s kubernetes ClusterIP 10.96.0.1 443/TCP 23m ``` On cloud providers that support load balancers, an external IP address would be provisioned to access the Service. On minikube, the `LoadBalancer` type makes the Service accessible through the `minikube service` command. 3. Run the following command: ```shell minikube service hello-node ``` This opens up a browser window that serves your app and shows the app's response. ## Enable addons The minikube tool includes a set of built-in {{< glossary\_tooltip text="addons" term\_id="addons" >}} that can be enabled, disabled and opened in the local Kubernetes environment. 1. List the currently supported addons: ```shell minikube addons list ``` The output is similar to: ``` addon-manager: enabled dashboard: enabled default-storageclass: enabled efk: disabled freshpod: disabled gvisor: disabled helm-tiller: disabled ingress: disabled ingress-dns: disabled logviewer: disabled metrics-server: disabled nvidia-driver-installer: disabled nvidia-gpu-device-plugin: disabled registry: disabled registry-creds: disabled storage-provisioner: enabled storage-provisioner-gluster: disabled ``` 1. Enable an addon, for example, `metrics-server`: ```shell minikube addons enable metrics-server ``` The output is similar to: ``` The 'metrics-server' addon is enabled ``` 1. View the Pod and Service you created by installing that addon: ```shell kubectl get pod,svc -n kube-system ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE pod/coredns-5644d7b6d9-mh9ll 1/1 Running 0 34m pod/coredns-5644d7b6d9-pqd2t 1/1 Running 0 34m pod/metrics-server-67fb648c5 1/1 Running 0 26s pod/etcd-minikube 1/1 Running 0 34m pod/influxdb-grafana-b29w8 2/2 Running 0 26s pod/kube-addon-manager-minikube 1/1 Running
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/hello-minikube.md
[ 0.0676581934094429, -0.009622993879020214, 0.04374634847044945, 0.010220440104603767, -0.012913552112877369, -0.04894942045211792, -0.06944358348846436, 0.005539574194699526, 0.04546782746911049, 0.08748724311590195, 0.04281546175479889, -0.132842019200325, -0.03451940417289734, -0.04528450220823288, 0.04105716198682785, 0.00022541066573467106, 0.05597582831978798, -0.07585369795560837, -0.04372762516140938, -0.05121582746505737, -0.04446236789226532, -0.0009860353311523795, 0.02246141992509365, -0.07384482026100159, -0.04106205701828003, 0.003018943127244711, -0.11273372918367386, -0.004339361097663641, 0.003734591417014599, -0.0617467500269413, -0.024801108986139297, -0.003650158876553178, 0.018291352316737175, 0.039945799857378006, 0.09704427421092987, 0.11906147748231888, 0.05960503965616226, -0.012698641046881676, -0.09075184166431427, -0.006823658011853695, 0.0715060904622078, -0.024631932377815247, -0.06498569250106812, -0.032107770442962646, 0.008456462994217873, -0.008089631795883179, -0.03734927996993065, -0.050532083958387375, 0.025975367054343224, -0.06915100663900375, -0.05142781510949135, -0.09586318582296371, 0.04919566586613655, -0.04732072725892067, 0.04379589483141899, 0.05531281977891922, -0.06708141416311264, 0.05540645867586136, 0.11493703722953796, -0.00038596586091443896, 0.03374264016747475, -0.040083084255456924, 0.04338083416223526, -0.026028508320450783, -0.01341581717133522, -0.022248901426792145, 0.04510075971484184, -0.07403195649385452, 0.03813815116882324, -0.03694671764969826, -0.012971480377018452, 0.07537703961133957, -0.10067261755466461, 0.006407792214304209, -0.06908372044563293, 0.017801305279135704, 0.04340025782585144, 0.08718746900558472, 0.037825826555490494, -0.024402884766459465, -0.026891658082604408, 0.006689515896141529, -0.0035489664878696203, 0.012745518237352371, -0.09255849570035934, 0.00996087584644556, 0.009811820462346077, 0.012612281367182732, -0.03235558420419693, 0.010070255026221275, -0.028426790609955788, -0.04241076856851578, -0.03793526813387871, -0.0757516622543335, 0.024279912933707237, 0.007783311884850264, 0.006105734501034021, 0.09518525004386902, -0.0263742133975029, 0.004063116852194071, 0.032115206122398376, 0.0002690077817533165, -0.022206690162420273, 0.03318418934941292, -0.01155882142484188, -0.0584084652364254, -0.0660226047039032, 0.030495697632431984, 0.045180074870586395, 0.023096561431884766, -0.013161955401301384, -0.018851472064852715, -0.05175529420375824, 0.03865807130932808, -0.058240748941898346, -0.011776047758758068, -0.01821727678179741, -0.025659941136837006, 0.02997003309428692, 0.07848668843507767, 0.07465233653783798, -0.07030216604471207, -0.026632653549313545, 0.013361356221139431, -0.04474051669239998, 0.0423172265291214, 0.10084611922502518, 3.547097549960439e-33, 0.07560623437166214, -0.10482054203748703, 0.0027138066943734884, 0.04103808104991913, 0.08808020502328873, -0.10028117895126343, -0.03993945196270943, -0.0062311869114637375, -0.055669285356998444, -0.03961039334535599, -0.0683436244726181, 0.001228935900144279, -0.0014065407449379563, -0.04098086059093475, 0.007974530570209026, -0.015964383259415627, -0.017750045284628868, 0.011269636452198029, 0.07070928812026978, -0.04642970487475395, 0.02391425147652626, -0.1258670687675476, -0.05756280943751335, 0.022958282381296158, 0.013858233578503132, -0.05070798844099045, 0.06344136595726013, -0.04923732951283455, 0.014222186990082264, -0.0013698807451874018, 0.008306719362735748, -0.031512826681137085, 0.025807490572333336, 0.00780138373374939, -0.09209565073251724, -0.046806417405605316, 0.01680692285299301, 0.04872911423444748, -0.10843929648399353, 0.0026212711818516254, -0.0037854863330721855, -0.007397613022476435, -0.016809260472655296, -0.0051344879902899265, 0.05223464220762253, -0.072458416223526, -0.014141497202217579, -0.07499727606773376, 0.061865534633398056, 0.0538875050842762, -0.052790120244026184, -0.02484665811061859, 0.041206881403923035, -0.009951815940439701, 0.0282296109944582, 0.09164638072252274, 0.09174525737762451, -0.0603310689330101, -0.13572947680950165, -0.02514275349676609, 0.0002448994491714984, 0.0509805791079998, -0.006936201825737953, -0.019519394263625145, 0.03987191990017891, 0.02153231017291546, -0.012547205202281475, 0.052098311483860016, -0.0376310870051384, 0.09267708659172058, -0.019818438217043877, -0.004151750821620226, 0.0156673863530159, 0.0001271148503292352, 0.012990214861929417, -0.008099270984530449, 0.005533610004931688, -0.03024117276072502, -0.13124710321426392, 0.07623118907213211, 0.07024064660072327, -0.023777389898896217, -0.05989120155572891, 0.024820387363433838, 0.055094294250011444, -0.04207228496670723, -0.02230791561305523, 0.06046945974230766, -0.010857973247766495, 0.030968554317951202, 0.07048632204532623, 0.015959495678544044, -0.06812276691198349, -0.0021605270449072123, -0.07515720278024673, -5.574862039327348e-33, 0.06010584533214569, 0.04176095873117447, -0.03191249445080757, -0.0266087856143713, 0.0444161482155323, 0.009349622763693333, -0.01759932190179825, 0.11212766170501709, -0.05494021624326706, -0.028063734993338585, 0.023115700110793114, 0.028428878635168076, 0.018147943541407585, 0.015524297952651978, -0.10850133746862411, -0.016035525128245354, -0.04401114955544472, -0.02171667478978634, 0.04616629332304001, 0.03301900252699852, -0.049345020204782486, 0.04510236158967018, 0.06225711852312088, 0.05198098346590996, -0.023169131949543953, -0.017175549641251564, 0.06107407063245773, 0.0747268795967102, -0.09151378273963928, -0.043683264404535294, 0.05501667782664299, -0.026934949681162834, -0.019190331920981407, 0.08226325362920761, 0.015791751444339752, -0.04480797052383423, -0.0315176323056221, 0.002137279836460948, 0.04760407656431198, -0.03381752595305443, -0.007814109325408936, 0.018266908824443817, -0.04946045204997063, 0.0029172436334192753, -0.05967669561505318, -0.03154846653342247, 0.053483303636312485, -0.029517514631152153, 0.02868626080453396, -0.010038197971880436, -0.004446358419954777, 0.014856718480587006, -0.008832520805299282, 0.09632667899131775, -0.022325726225972176, 0.04944148287177086, -0.04572192206978798, 0.030927876010537148, -0.034787457436323166, 0.03403550758957863, 0.06916218250989914, -0.09011300653219223, 0.03741151839494705, 0.04891239479184151, -0.009713204577565193, -0.04422197490930557, -0.06293532997369766, 0.11505694687366486, -0.062195856124162674, 0.01556259673088789, 0.013741664588451385, 0.018275363370776176, -0.01593480072915554, 0.02393760159611702, 0.004475051071494818, -0.05712530016899109, -0.015041581355035305, 0.031447868794202805, 0.027629319578409195, 0.06093400716781616, -0.04743557423353195, 0.12054268270730972, -0.1185731366276741, -0.005206109490245581, 0.016317646950483322, 0.01978381536900997, 0.035885315388441086, 0.08306602388620377, 0.02870379202067852, 0.053741827607154846, -0.0052658552303910255, -0.009214604273438454, -0.10798923671245575, 0.14550544321537018, -0.029858557507395744, -5.1755730368086006e-8, 0.03458337485790253, -0.0015338034136220813, -0.031949128955602646, 0.052799101918935776, 0.08799732476472855, -0.012670106254518032, 0.02476765774190426, -0.026349790394306183, -0.06583146750926971, -0.03731713443994522, -0.04378791153430939, 0.0796988233923912, -0.10064899176359177, 0.026817137375473976, 0.07619734853506088, -0.061302680522203445, -0.05175504460930824, 0.0410764180123806, 0.05806780233979225, -0.098900206387043, -0.008509683422744274, -0.13085074722766876, 0.052696648985147476, -0.012844634242355824, 0.010304944589734077, 0.03529714047908783, 0.04892927035689354, 0.017143936827778816, -0.023897401988506317, -0.02290172129869461, -0.04857401177287102, 0.021542172878980637, -0.028495777398347855, 0.0007733916863799095, -0.01709146238863468, -0.0032897714991122484, -0.12031663954257965, 0.06405362486839294, -0.006094526499509811, -0.01083457749336958, 0.007726995274424553, 0.06323815882205963, 0.0024210482370108366, -0.0034093281719833612, 0.0011911395704373717, 0.09189591556787491, 0.05601153150200844, 0.08829836547374725, -0.014606920070946217, -0.054424941539764404, 0.011735877953469753, -0.09101449698209763, 0.0162002332508564, 0.05362394452095032, -0.015519190579652786, 0.02069413661956787, 0.031183946877717972, -0.0385890007019043, 0.017963318154215813, 0.09195860475301743, 0.021070975810289383, -0.005315688438713551, -0.022030217573046684, 0.01662340573966503 ]
0.124827
by installing that addon: ```shell kubectl get pod,svc -n kube-system ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE pod/coredns-5644d7b6d9-mh9ll 1/1 Running 0 34m pod/coredns-5644d7b6d9-pqd2t 1/1 Running 0 34m pod/metrics-server-67fb648c5 1/1 Running 0 26s pod/etcd-minikube 1/1 Running 0 34m pod/influxdb-grafana-b29w8 2/2 Running 0 26s pod/kube-addon-manager-minikube 1/1 Running 0 34m pod/kube-apiserver-minikube 1/1 Running 0 34m pod/kube-controller-manager-minikube 1/1 Running 0 34m pod/kube-proxy-rnlps 1/1 Running 0 34m pod/kube-scheduler-minikube 1/1 Running 0 34m pod/storage-provisioner 1/1 Running 0 34m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/metrics-server ClusterIP 10.96.241.45 80/TCP 26s service/kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP 34m service/monitoring-grafana NodePort 10.99.24.54 80:30002/TCP 26s service/monitoring-influxdb ClusterIP 10.111.169.94 8083/TCP,8086/TCP 26s ``` 1. Check the output from `metrics-server`: ```shell kubectl top pods ``` The output is similar to: ``` NAME CPU(cores) MEMORY(bytes) hello-node-ccf4b9788-4jn97 1m 6Mi ``` If you see the following message, wait, and try again: ``` error: Metrics API not available ``` 1. Disable `metrics-server`: ```shell minikube addons disable metrics-server ``` The output is similar to: ``` metrics-server was successfully disabled ``` ## Clean up Now you can clean up the resources you created in your cluster: ```shell kubectl delete service hello-node kubectl delete deployment hello-node ``` Stop the Minikube cluster ```shell minikube stop ``` Optionally, delete the Minikube VM: ```shell # Optional minikube delete ``` If you want to use minikube again to learn more about Kubernetes, you don't need to delete it. ## Conclusion This page covered the basic aspects to get a minikube cluster up and running. You are now ready to deploy applications. ## {{% heading "whatsnext" %}} \* Tutorial to \_[deploy your first app on Kubernetes with kubectl](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/)\_. \* Learn more about [Deployment objects](/docs/concepts/workloads/controllers/deployment/). \* Learn more about [Deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/). \* Learn more about [Service objects](/docs/concepts/services-networking/service/).
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/hello-minikube.md
[ 0.009314549155533314, -0.039053622633218765, -0.05792387202382088, -0.001483311876654625, -0.017300378531217575, 0.0027490316424518824, -0.06812120974063873, -0.010226214304566383, 0.07712946087121964, 0.07168056815862656, 0.01837518811225891, -0.04386183246970177, -0.0817219614982605, -0.04912412539124489, -0.005531588103622198, 0.01779765635728836, 0.05209631100296974, -0.021418025717139244, 0.007734062150120735, -0.08703793585300446, 0.0025120496284216642, 0.006607538089156151, -0.008868525736033916, -0.046156417578458786, -0.03452061489224434, -0.02817617356777191, -0.08773551136255264, 0.00037149092531763017, 0.003809206187725067, -0.06415912508964539, 0.010168677195906639, 0.03429190069437027, 0.032671865075826645, 0.02604670822620392, 0.03778959810733795, 0.11789143830537796, 0.07059374451637268, -0.03825853019952774, -0.07663983851671219, -0.015277470462024212, 0.056155428290367126, -0.06561841815710068, -0.057345084846019745, -0.03454601392149925, -0.045984331518411636, 0.03371541202068329, -0.10960172116756439, -0.09772418439388275, 0.05050238221883774, -0.07276804745197296, 0.039576999843120575, -0.04365630820393562, 0.0446869432926178, 0.026436809450387955, 0.07743163406848907, 0.03790482506155968, -0.02309216745197773, 0.05592847242951393, 0.12273374944925308, 0.04008029028773308, -0.010204347781836987, -0.017945345491170883, 0.03342824429273605, -0.0028781192377209663, -0.022426867857575417, -0.0737585574388504, -0.030308978632092476, 0.017064839601516724, 0.02874630130827427, -0.03554089739918709, 0.06681396812200546, 0.02135966718196869, -0.024229561910033226, -0.07036036998033524, -0.08187064528465271, -0.021691186353564262, 0.023982103914022446, 0.04877222329378128, -0.018808623775839806, -0.048840995877981186, -0.04377429559826851, 0.04648999497294426, -0.017354940995573997, 0.01853928156197071, -0.0940559133887291, 0.048450686037540436, -0.0032178328838199377, -0.044956013560295105, 0.008342771790921688, 0.004259370733052492, -0.0014696675352752209, -0.007789712864905596, -0.01035052165389061, -0.10233619809150696, -0.00733190169557929, 0.012269336730241776, 0.02387210540473461, 0.048623908311128616, 0.0004030536802019924, 0.00012008722842438146, 0.013205579482018948, 0.020991066470742226, 0.008030450902879238, 0.024368027225136757, 0.05557762458920479, -0.07579636573791504, -0.06293044239282608, 0.03772971034049988, 0.004011743701994419, 0.04718239977955818, 0.001146967988461256, 0.021080762147903442, 0.0008532776264473796, 0.049999020993709564, 0.011653768830001354, 0.01847987249493599, 0.04138655588030815, -0.017963437363505363, 0.020516186952590942, 0.04718313366174698, 0.09664049744606018, -0.08650672435760498, -0.0009971861727535725, 0.02621241845190525, -0.05023910477757454, 0.10134332627058029, 0.049104269593954086, 8.825365466844031e-33, 0.09881503134965897, -0.097938671708107, 0.03133708983659744, -0.02975665219128132, -0.007983285933732986, -0.005312780383974314, -0.04031438007950783, 0.014199985191226006, 0.02765093930065632, -0.028429489582777023, -0.08898280560970306, 0.026340043172240257, -0.040785208344459534, -0.00437998166307807, 0.00910558644682169, -0.07593877613544464, -0.04467111453413963, 0.0019984522368758917, 0.060634858906269073, -0.03040338307619095, 0.062148239463567734, -0.05878157913684845, -0.09586871415376663, -0.0003509823582135141, 0.10430776327848434, -0.05065721645951271, 0.07116550952196121, -0.08413593471050262, -0.04088544100522995, 0.00812864676117897, 0.04129545018076897, -0.009840227663516998, -0.026200441643595695, 0.029145149514079094, -0.07468380779027939, -0.02150256559252739, 0.03585885092616081, 0.06761197745800018, -0.14639531075954437, -0.037025053054094315, 0.03158173710107803, -0.020771346986293793, -0.07884352654218674, -0.053218550980091095, 0.04932297021150589, -0.04434210807085037, 0.03245506435632706, -0.06380809843540192, 0.05831978842616081, 0.025075091049075127, -0.0265963114798069, -0.01571224443614483, 0.04377886652946472, -0.023369917646050453, 0.06638790667057037, 0.05543992295861244, 0.06902259588241577, -0.06177196279168129, -0.0639074370265007, -0.014347896911203861, -0.036057934165000916, 0.030120395123958588, 0.012177265249192715, 0.02763385884463787, 0.07563307881355286, -0.014753435738384724, 0.01899602822959423, 0.008045831695199013, 0.029474537819623947, 0.04658167436718941, -0.05356135964393616, -0.03958617150783539, 0.023960188031196594, 0.00800714734941721, 0.006292345002293587, -0.05522073432803154, 0.006296397186815739, -0.007616611663252115, -0.13996560871601105, 0.025770576670765877, 0.06479828804731369, -0.046807337552309036, -0.02957955002784729, 0.01723969541490078, 0.07134770601987839, 0.003434539772570133, 0.0008321629138663411, 0.0059250290505588055, -0.0628717690706253, 0.001993047073483467, -0.007588392123579979, 0.0062160552479326725, -0.015284789726138115, 0.012650277465581894, -0.1543935239315033, -9.101577251928498e-33, 0.03403552249073982, -0.01829533465206623, 0.05521253123879433, 0.009715725667774677, 0.055011723190546036, 0.0370543897151947, -0.007915320806205273, 0.09870254248380661, -0.03267884626984596, -0.0034656552597880363, -0.02936016209423542, -0.018000032752752304, 0.027667807415127754, 0.00805243756622076, -0.05650235339999199, 0.09864861518144608, -0.06521456688642502, -0.0040614125318825245, -0.021579114720225334, 0.04193371906876564, -0.08719933778047562, 0.07791406661272049, 0.0855795294046402, 0.02323509380221367, 0.020027857273817062, -0.0030322661623358727, 0.07217702269554138, 0.037952978163957596, -0.0940202921628952, -0.046471673995256424, 0.054076120257377625, -0.10960730910301208, -0.07799387723207474, 0.11482776701450348, 0.0006069847149774432, -0.05079440400004387, -0.04214558005332947, 0.08473809063434601, -0.029742373153567314, 0.00030880142003297806, 0.023438049480319023, 0.007822412997484207, -0.11660216003656387, -0.0034617914352566004, -0.06570104509592056, -0.03244486078619957, 0.04528801143169403, 0.006455062888562679, -0.028152957558631897, -0.08958641439676285, -0.020980704575777054, -0.041328128427267075, -0.04136138781905174, 0.17764626443386078, 0.007174741942435503, 0.015907594934105873, 0.08039591461420059, 0.07708082348108292, -0.03808349743485451, 0.0004849338729400188, 0.06442466378211975, -0.1513901650905609, 0.03951314091682434, 0.03150736168026924, 0.021872205659747124, -0.05441702902317047, 0.007949182763695717, 0.05948232486844063, -0.040818504989147186, -0.031903576105833054, 0.03704012557864189, -0.012004929594695568, -0.0011589409550651908, 0.03116532415151596, -0.02153007686138153, -0.03557499870657921, -0.041625604033470154, -0.05759941413998604, 0.01714811846613884, 0.028860367834568024, -0.11305927485227585, 0.0389367900788784, -0.03691578283905983, -0.028955945745110512, 0.009444251656532288, 0.015859192237257957, 0.03459028899669647, 0.09588035941123962, 0.08428985625505447, 0.07089868187904358, -0.020639533177018166, 0.0666324719786644, -0.06175415590405464, 0.0568520724773407, -0.01059173233807087, -5.4848712238708686e-8, 0.08798322081565857, -0.083529032766819, -0.008223451673984528, 0.04091578722000122, 0.10097398608922958, -0.030314534902572632, 0.04384353384375572, 0.007262547500431538, -0.08931510150432587, 0.00002488547033863142, -0.013411814346909523, 0.09291750937700272, -0.0890004113316536, 0.012727850116789341, 0.09995917975902557, -0.03477579355239868, 0.06405404210090637, 0.08608251810073853, 0.02164028212428093, -0.04553535208106041, -0.03365553542971611, -0.011096269823610783, 0.0052253613248467445, -0.025289002805948257, -0.0058433921076357365, 0.03215279430150986, 0.08062733709812164, -0.0009955452987924218, 0.030305108055472374, -0.015169719234108925, -0.03784021735191345, 0.023081835359334946, -0.05512377619743347, -0.02452091872692108, -0.007211796939373016, 0.06631278246641159, -0.08804164081811905, 0.028530530631542206, -0.012524434365332127, 0.03436298668384552, -0.006010254379361868, 0.0055293426848948, -0.015764625743031502, 0.020165476948022842, -0.005388235207647085, 0.05077085271477699, -0.04130665957927704, 0.04334168881177902, -0.008299196138978004, -0.03341669216752052, -0.002786551369354129, -0.0697113424539566, 0.0519430935382843, 0.007735558785498142, -0.043349526822566986, 0.022563055157661438, -0.017419079318642616, -0.05382366105914116, 0.010410824790596962, 0.06179060414433479, 0.014297242276370525, 0.05101557448506355, 0.0060859182849526405, 0.008971129544079304 ]
0.13938
This section of the Kubernetes documentation contains tutorials. A tutorial shows how to accomplish a goal that is larger than a single [task](/docs/tasks/). Typically a tutorial has several sections, each of which has a sequence of steps. Before walking through each tutorial, you may want to bookmark the [Standardized Glossary](/docs/reference/glossary/) page for later references. ## Basics \* [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) is an in-depth interactive tutorial that helps you understand the Kubernetes system and try out some basic Kubernetes features. \* [Introduction to Kubernetes (edX)](https://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x#) \* [Hello Minikube](/docs/tutorials/hello-minikube/) ## Configuration \* [Configuring Redis Using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/) ## Authoring Pods \* [Adopting Sidecar Containers](/docs/tutorials/configuration/pod-sidecar-containers/) ## Stateless Applications \* [Exposing an External IP Address to Access an Application in a Cluster](/docs/tutorials/stateless-application/expose-external-ip-address/) \* [Example: Deploying PHP Guestbook application with Redis](/docs/tutorials/stateless-application/guestbook/) ## Stateful Applications \* [StatefulSet Basics](/docs/tutorials/stateful-application/basic-stateful-set/) \* [Example: WordPress and MySQL with Persistent Volumes](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) \* [Example: Deploying Cassandra with Stateful Sets](/docs/tutorials/stateful-application/cassandra/) \* [Running ZooKeeper, A CP Distributed System](/docs/tutorials/stateful-application/zookeeper/) ## Services \* [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/) \* [Using Source IP](/docs/tutorials/services/source-ip/) ## Security \* [Apply Pod Security Standards at Cluster level](/docs/tutorials/security/cluster-level-pss/) \* [Apply Pod Security Standards at Namespace level](/docs/tutorials/security/ns-level-pss/) \* [Restrict a Container's Access to Resources with AppArmor](/docs/tutorials/security/apparmor/) \* [Seccomp](/docs/tutorials/security/seccomp/) ## Cluster Management \* [Configuring Swap Memory on Kubernetes Nodes](/docs/tutorials/cluster-management/provision-swap-memory/) \* [Running Kubelet in Standalone Mode](/docs/tutorials/cluster-management/kubelet-standalone/) \* [Install Drivers and Allocate Devices with DRA](/docs/tutorials/cluster-management/install-use-dra/) ## {{% heading "whatsnext" %}} If you would like to write a tutorial, see [Content Page Types](/docs/contribute/style/page-content-types/) for information about the tutorial page type.
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/_index.md
[ 0.004703354090452194, -0.03436261788010597, 0.03820551559329033, -0.007855864241719246, -0.051711395382881165, -0.016336645931005478, -0.013392040506005287, 0.048384420573711395, -0.0045189750380814075, 0.046205323189496994, -0.022888803854584694, -0.027670273557305336, 0.004235376138240099, -0.05955809727311134, 0.022859817370772362, -0.008955514058470726, 0.057140715420246124, 0.012592678889632225, -0.08911138772964478, -0.15389670431613922, 0.01922481693327427, -0.03382159397006035, 0.003512631868943572, -0.05368931218981743, -0.08562322705984116, -0.01930833049118519, -0.02857144922018051, 0.013256872072815895, 0.0005356427864171565, -0.01995738223195076, -0.029754936695098877, -0.02494700625538826, 0.04589550197124481, 0.01842726767063141, -0.003808997105807066, 0.14793287217617035, 0.04830029606819153, -0.032252825796604156, -0.11180641502141953, 0.041887979954481125, -0.015391725115478039, -0.02937558852136135, -0.06710541993379593, -0.00956694595515728, 0.05401454120874405, -0.0007547735585831106, -0.11108756810426712, -0.039874929934740067, 0.07320746034383774, -0.06802967935800552, 0.00443232711404562, -0.09658338874578476, 0.019899817183613777, 0.06639920920133591, 0.036684367805719376, 0.0536392405629158, -0.03761327639222145, -0.006915286183357239, 0.10853233933448792, -0.09403522312641144, 0.03405559062957764, -0.0230034738779068, -0.017530499026179314, -0.02492739073932171, -0.029191788285970688, -0.02906312607228756, 0.02399361878633499, 0.016743211075663567, 0.042659275233745575, -0.029278937727212906, -0.03192935883998871, -0.0040426612831652164, -0.05622674152255058, 0.022842010483145714, -0.04135622829198837, -0.03640339896082878, 0.0009035488474182785, 0.09475007653236389, -0.0779777243733406, -0.023440709337592125, 0.008410744369029999, 0.08417113125324249, 0.06725627928972244, 0.04229928180575371, -0.058221641927957535, -0.022147417068481445, 0.027402745559811592, -0.027350150048732758, 0.03966427594423294, -0.021550670266151428, 0.027542566880583763, -0.04954662546515465, 0.03189314901828766, -0.09893273562192917, 0.07818247377872467, 0.018617136403918266, -0.033101703971624374, -0.07284184545278549, 0.011245795525610447, 0.011624496430158615, 0.02016468346118927, -0.04268154501914978, 0.05722350627183914, -0.0349985808134079, 0.01524995919317007, -0.029941445216536522, -0.051680564880371094, -0.00528021389618516, 0.028879692777991295, -0.021405667066574097, -0.03946156054735184, 0.012403715401887894, 0.006497470196336508, 0.012200950644910336, 0.03420409932732582, -0.0003944903437513858, 0.034295838326215744, -0.055456385016441345, 0.024845317006111145, 0.07938988506793976, 0.058974090963602066, -0.09129036217927933, -0.002803838113322854, -0.013838125392794609, 0.05062638595700264, 0.029151109978556633, -0.05167488381266594, 5.196117024808438e-33, 0.05859788879752159, 0.0028536890167742968, -0.0021586876828223467, 0.042486418038606644, 0.049962058663368225, -0.08146116137504578, 0.014971205964684486, -0.03147506341338158, -0.048000313341617584, 0.00650740647688508, -0.03703987970948219, 0.08977267146110535, -0.023753592744469643, -0.021754708141088486, -0.005043534561991692, -0.06707091629505157, -0.04279208555817604, 0.032687511295080185, 0.06113308295607567, 0.03508283570408821, 0.0036148065701127052, -0.05629424750804901, 0.021365661174058914, -0.03229418396949768, 0.13404642045497894, -0.03877318277955055, 0.05172337219119072, -0.07446756958961487, -0.014142928645014763, -0.014478988945484161, -0.036566123366355896, -0.04639500007033348, -0.019437048584222794, 0.044209349900484085, -0.11854112148284912, -0.0002252435515401885, -0.017819061875343323, 0.019770197570323944, -0.022925328463315964, -0.048591189086437225, -0.057515956461429596, -0.015296070836484432, -0.04637706279754639, -0.04938159137964249, 0.04866174980998039, 0.007294697221368551, 0.043068576604127884, -0.06693164259195328, 0.13629235327243805, 0.016468441113829613, -0.01806681975722313, -0.009541088715195656, 0.062292248010635376, -0.049028415232896805, 0.004045100416988134, 0.05269279330968857, 0.11883921921253204, -0.04659178853034973, -0.08575981110334396, 0.03069080039858818, -0.04112628474831581, 0.002201721305027604, -0.03605397045612335, -0.0005641895113512874, 0.04953489825129509, 0.002680428558960557, -0.041021913290023804, 0.0755738690495491, 0.03705398365855217, -0.06348339468240738, -0.07693604379892349, 0.03830352798104286, 0.07167968899011612, -0.02965547889471054, 0.060357898473739624, -0.013596543110907078, 0.021042652428150177, -0.060828160494565964, -0.08811493217945099, 0.013040708377957344, -0.006669685244560242, 0.0004485512909013778, -0.050816576927900314, 0.08367005735635757, 0.010043991729617119, -0.0409686341881752, 0.0028495797887444496, 0.03214378282427788, -0.026003669947385788, 0.0024411070626229048, 0.038390547037124634, -0.013491432182490826, -0.08132266998291016, 0.0337030291557312, 0.010730033740401268, -4.893698327856357e-33, 0.09788952022790909, 0.03583139926195145, -0.05234270915389061, 0.0491284616291523, 0.09984784573316574, 0.028488852083683014, 0.03507189452648163, 0.10021849721670151, 0.0006380077102221549, -0.07398144900798798, -0.07292046397924423, -0.015151065774261951, -0.023192163556814194, 0.06921857595443726, -0.09802553802728653, 0.0020170649513602257, -0.02966112084686756, 0.031393904238939285, 0.027026882395148277, -0.0002660462923813611, -0.03208446130156517, 0.03882451355457306, -0.04269922897219658, -0.043366868048906326, -0.01804426498711109, 0.016912000253796577, 0.05507718771696091, 0.05280125513672829, -0.10066371411085129, -0.05931587144732475, 0.006925264373421669, -0.09190312027931213, 0.002815593732520938, 0.04351097345352173, -0.000026341384000261314, -0.009434261359274387, -0.007429749239236116, 0.029387053102254868, 0.003985212650150061, -0.02301623299717903, 0.11815816909074783, -0.02491854317486286, 0.010386425070464611, -0.12438792735338211, -0.048757996410131454, -0.001100770547054708, -0.02625645138323307, 0.028715582564473152, -0.08167873322963715, -0.0925505980849266, -0.002993805566802621, 0.016348836943507195, -0.09916525334119797, 0.02997475303709507, -0.024214114993810654, 0.02129935286939144, 0.06425388157367706, 0.04125792533159256, 0.007554931566119194, 0.05986542999744415, -0.02551315538585186, -0.10496332496404648, 0.06526798009872437, 0.1265479326248169, -0.029324118047952652, -0.06077747792005539, 0.006738280411809683, 0.04062884300947189, -0.02943340316414833, 0.03243289515376091, -0.07285361737012863, 0.02376437745988369, 0.062493178993463516, 0.050214994698762894, 0.02133270539343357, -0.06534827500581741, 0.005420288536697626, -0.023194286972284317, 0.028024369850754738, 0.00230959290638566, 0.016449565067887306, 0.0049173831939697266, -0.0613836906850338, 0.054362423717975616, 0.06642500311136246, 0.10926122218370438, 0.06874910742044449, 0.05623580142855644, 0.04640708118677139, 0.02394956722855568, -0.01972903311252594, 0.03472203016281128, 0.030580559745430946, 0.15899977087974548, -0.04213669151067734, -5.227686017406086e-8, 0.045138612389564514, 0.039989572018384933, -0.05174332857131958, 0.02566438354551792, 0.001935288542881608, 0.004563234746456146, 0.047513216733932495, -0.016094433143734932, -0.07849915325641632, 0.017206478863954544, -0.03168083354830742, 0.05515015870332718, -0.02996378391981125, -0.018479056656360626, 0.029860377311706543, 0.04471411183476448, 0.01866775192320347, 0.005938552785664797, 0.031379278749227524, -0.05431238189339638, 0.03772490844130516, -0.02508341707289219, -0.044968634843826294, 0.01669142208993435, 0.03680126368999481, 0.04588920623064041, 0.06990396976470947, 0.033543072640895844, 0.05835239216685295, -0.021950403228402138, 0.0008319422486238182, 0.03685849532485008, -0.07737254351377487, 0.0897955447435379, 0.003516264958307147, -0.018360760062932968, -0.12572884559631348, 0.07667279988527298, 0.03117755427956581, -0.021318349987268448, -0.025666028261184692, 0.040495578199625015, -0.04451297968626022, -0.029789013788104057, 0.019934872165322304, 0.10291394591331482, -0.0665714219212532, -0.03861888870596886, 0.02006468176841736, -0.053399961441755295, -0.0037605436518788338, -0.045284807682037354, 0.003221405204385519, 0.05017644539475441, -0.006879967637360096, 0.054883673787117004, 0.02953546866774559, -0.03324558585882187, 0.08676411956548691, 0.044491805136203766, -0.07767204195261002, 0.13072575628757477, -0.06433022767305374, 0.06403634697198868 ]
0.151179
This section is relevant for people adopting a new built-in [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) feature for their workloads. Sidecar container is not a new concept as posted in the [blog post](/blog/2015/06/the-distributed-system-toolkit-patterns/). Kubernetes allows running multiple containers in a Pod to implement this concept. However, running a sidecar container as a regular container has a lot of limitations being fixed with the new built-in sidecar containers support. {{< feature-state feature\_gate\_name="SidecarContainers" >}} ## {{% heading "objectives" %}} - Understand the need for sidecar containers - Be able to troubleshoot issues with the sidecar containers - Understand options to universally "inject" sidecar containers to any workload ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Sidecar containers overview Sidecar containers are secondary containers that run along with the main application container within the same {{< glossary\_tooltip text="Pod" term\_id="pod" >}}. These containers are used to enhance or to extend the functionality of the primary \_app container\_ by providing additional services, or functionalities such as logging, monitoring, security, or data synchronization, without directly altering the primary application code. You can read more in the [Sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/) concept page. The concept of sidecar containers is not new and there are multiple implementations of this concept. As well as sidecar containers that you, the person defining the Pod, want to run, you can also find that some {{< glossary\_tooltip text="addons" term\_id="addons" >}} modify Pods - before the Pods start running - so that there are extra sidecar containers. The mechanisms to \_inject\_ those extra sidecars are often [mutating webhooks](/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook). For example, a service mesh addon might inject a sidecar that configures mutual TLS and encryption in transit between different Pods. While the concept of sidecar containers is not new, the native implementation of this feature in Kubernetes, however, is new. And as with every new feature, adopting this feature may present certain challenges. This tutorial explores challenges and solutions that can be experienced by end users as well as by authors of sidecar containers. ## Benefits of a built-in sidecar container Using Kubernetes' native support for sidecar containers provides several benefits: 1. You can configure a native sidecar container to start ahead of {{< glossary\_tooltip text="init containers" term\_id="init-container" >}}. 1. The built-in sidecar containers can be authored to guarantee that they are terminated last. Sidecar containers are terminated with a `SIGTERM` signal once all the regular containers are completed and terminated. If the sidecar container isn’t gracefully shut down, a `SIGKILL` signal will be used to terminate it. 1. With Jobs, when Pod's `restartPolicy: OnFailure` or `restartPolicy: Never`, native sidecar containers do not block Pod completion. With legacy sidecar containers, special care is needed to handle this situation. 1. Also, with Jobs, built-in sidecar containers would keep being restarted once they are done, even if regular containers would not with Pod's `restartPolicy: Never`. See [differences from init containers](/docs/concepts/workloads/pods/sidecar-containers/#differences-from-application-containers) to learn more about it. ## Adopting built-in sidecar containers The `SidecarContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is in beta state starting from Kubernetes version 1.29 and is enabled by default. Some clusters may have this feature disabled or have software installed that is incompatible with the feature. When this happens, the Pod may be rejected or the sidecar containers may block Pod startup, rendering the Pod useless. This condition is easy to detect as the Pod simply gets stuck on initialization. However, it is often unclear what caused the problem. Here are the considerations and troubleshooting steps that one can take while adopting sidecar containers for their workload. ### Ensure the feature gate is enabled As a very first step, make sure that both API server and Nodes are
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/pod-sidecar-containers.md
[ 0.039293043315410614, 0.03559015691280365, 0.06257530301809311, 0.055772166699171066, 0.02599000371992588, 0.00767988245934248, -0.053867828100919724, -0.029012901708483696, -0.08371267467737198, 0.01924312673509121, -0.024521391838788986, -0.012872292660176754, -0.03352731466293335, 0.008276792243123055, 0.07600727677345276, -0.02123863436281681, 0.11865098774433136, -0.025774052366614342, -0.027269592508673668, 0.0025672800838947296, -0.040478359907865524, -0.026503117755055428, 0.011057685129344463, 0.02146252989768982, -0.11821287125349045, 0.036955345422029495, -0.024561682716012, -0.02092529833316803, -0.0037001047749072313, 0.01997806504368782, -0.00010129692236660048, 0.016764283180236816, -0.04111330583691597, 0.013641138561069965, 0.05390267074108124, 0.06152453273534775, 0.03329068422317505, -0.027085456997156143, -0.030621115118265152, -0.04296411573886871, -0.022149674594402313, -0.04495502635836601, -0.13913586735725403, 0.03471151366829872, -0.01922849379479885, -0.11140082776546478, -0.05732758715748787, -0.07707206159830093, 0.01099567860364914, -0.0012060662265866995, 0.04114250838756561, -0.09217563271522522, 0.07919221371412277, 0.04816699028015137, 0.0015622102655470371, 0.009173200465738773, -0.046649593859910965, 0.06507405638694763, 0.07621455937623978, 0.03508957847952843, 0.026644699275493622, -0.03220288082957268, 0.05062389001250267, -0.04731591418385506, 0.026865322142839432, -0.025684243068099022, -0.0029981699772179127, 0.023977462202310562, -0.028174228966236115, 0.037413839250802994, 0.03011717088520527, 0.03293144330382347, 0.03264809399843216, -0.03672151267528534, 0.05198659747838974, -0.048695504665374756, -0.012272555381059647, 0.01672929711639881, -0.03502235189080238, -0.03931618854403496, -0.012901317328214645, 0.06836885213851929, 0.008208422921597958, -0.08951893448829651, -0.07691480964422226, -0.02705356292426586, -0.052057452499866486, -0.034133486449718475, -0.01089175883680582, -0.057480718940496445, 0.01684826985001564, -0.10287410020828247, 0.07358554750680923, -0.13886848092079163, 0.10377419739961624, -0.012922697700560093, -0.07095897942781448, 0.014424287714064121, 0.03438955172896385, -0.04352828487753868, -0.007894127629697323, -0.004873240366578102, 0.048095595091581345, -0.0030280810315161943, 0.09735686331987381, 0.02282780595123768, -0.0352347157895565, -0.020846374332904816, 0.043259844183921814, 0.023878009989857674, -0.04442113637924194, 0.07660990953445435, 0.008763978257775307, -0.0005083658033981919, -0.05421319231390953, -0.04210029914975166, -0.029755765572190285, -0.010547623038291931, 0.04755030944943428, 0.0794445276260376, 0.07086892426013947, -0.10566164553165436, 0.059692513197660446, -0.010803469456732273, 0.029889140278100967, -0.024937620386481285, -0.0794936865568161, 4.337397463039633e-33, 0.024090632796287537, -0.08428344130516052, 0.024837607517838478, 0.06680706888437271, 0.05190977081656456, -0.06178557127714157, 0.053381651639938354, 0.021363666281104088, -0.04130975902080536, 0.026976026594638824, -0.012557148933410645, 0.0748540461063385, -0.023481978103518486, 0.015635626390576363, -0.012341747060418129, -0.06475430727005005, -0.14878614246845245, 0.04129597917199135, 0.057639509439468384, -0.027309531345963478, -0.03222443908452988, -0.0717807412147522, -0.06502754241228104, -0.03185984492301941, 0.07322269678115845, -0.031766436994075775, 0.10737527161836624, -0.06861487776041031, 0.013268213719129562, 0.030529260635375977, 0.0069069224409759045, 0.01618955284357071, 0.03562852367758751, 0.0954170674085617, -0.1367407888174057, -0.027390306815505028, 0.0019297857070341706, 0.0029067478608340025, -0.04309661686420441, -0.05616211146116257, 0.0025032719131559134, -0.03150322288274765, 0.022527821362018585, -0.10496416687965393, -0.03126046806573868, -0.03828711435198784, 0.0641024261713028, -0.0404464453458786, 0.062410276383161545, -0.013736098073422909, -0.03493905067443848, -0.03794616088271141, -0.03314242884516716, 0.0010527416598051786, 0.030409419909119606, -0.07963021099567413, 0.020496487617492676, -0.004604355897754431, 0.022430334240198135, 0.015358000993728638, -0.08503617346286774, 0.009392763487994671, -0.053922638297080994, -0.011785092763602734, 0.010700693354010582, 0.0327819399535656, -0.009774867445230484, 0.04284557327628136, 0.020632203668355942, -0.009049754589796066, -0.061630990356206894, 0.017061853781342506, -0.015115980058908463, -0.00467314338311553, 0.008528917096555233, -0.0510968379676342, 0.018004214391112328, 0.02997480519115925, -0.061114970594644547, 0.037224747240543365, -0.0008093798533082008, -0.007411271799355745, -0.024546969681978226, 0.08405952900648117, 0.030100015923380852, -0.05709337070584297, -0.06662656366825104, -0.012380278669297695, -0.05882240831851959, 0.04009387269616127, 0.025792982429265976, 0.020557545125484467, -0.04640669748187065, 0.026718776673078537, -0.060587409883737564, -5.1445018025478006e-33, 0.04152333363890648, 0.008149308152496815, -0.051347751170396805, 0.024936772882938385, 0.053632158786058426, 0.04413758963346481, 0.05482897162437439, -0.029602093622088432, -0.020111462101340294, -0.07360773533582687, -0.08751168102025986, -0.018291518092155457, 0.001662042341195047, 0.03799804672598839, -0.08821559697389603, 0.04608234390616417, -0.06301762908697128, -0.07355967909097672, 0.05960192531347275, 0.02216724306344986, -0.03320690616965294, 0.024989983066916466, 0.012964609079062939, 0.06663040071725845, 0.024851076304912567, 0.00019905540102627128, 0.03353581205010414, 0.011389011517167091, 0.012037943117320538, -0.006898561492562294, -0.0084070460870862, -0.11231519281864166, 0.04362020641565323, 0.0641346275806427, 0.0062682186253368855, -0.041953276842832565, -0.09950791299343109, 0.05325617641210556, -0.017679361626505852, 0.015961727127432823, 0.060937147587537766, -0.04277419671416283, -0.054595306515693665, 0.0193980410695076, -0.08180920034646988, 0.024215180426836014, 0.03547000139951706, 0.02306682989001274, -0.0006494261906482279, -0.06697981804609299, -0.037484802305698395, 0.010149743407964706, -0.11517144739627838, 0.024587711319327354, -0.0017662057653069496, 0.008940710686147213, 0.030999252572655678, 0.014690174721181393, 0.03246435523033142, 0.042305897921323776, 0.08118114620447159, 0.01848934032022953, 0.10464944690465927, -0.009725435636937618, 0.006484711077064276, -0.05962358042597771, -0.02083105593919754, -0.03062228299677372, -0.012530505657196045, 0.009722898714244366, -0.002596283331513405, -0.038634736090898514, 0.04708605259656906, 0.036417558789253235, -0.020473333075642586, -0.006408844143152237, 0.07206665724515915, -0.10094847530126572, 0.04293130338191986, 0.005086871329694986, -0.030756760388612747, -0.0008766136015765369, -0.04812967777252197, 0.015786591917276382, 0.05225664749741554, 0.018135445192456245, 0.030797027051448822, 0.09899882972240448, 0.03524230420589447, 0.057400863617658615, 0.05042564496397972, 0.06185607984662056, -0.033576078712940216, 0.12891362607479095, 0.021936077624559402, -5.620017873297911e-8, 0.06334022432565689, -0.027757462114095688, -0.011936087161302567, -0.009328409098088741, -0.06283244490623474, -0.022121969610452652, 0.10731406509876251, 0.05871090665459633, -0.09570182114839554, 0.012376264669001102, 0.00703913439065218, 0.04494023323059082, -0.08330801874399185, 0.026244046166539192, 0.029367374256253242, -0.024005120620131493, -0.005885954946279526, 0.1029931828379631, -0.019864007830619812, -0.05761261656880379, -0.023952612653374672, -0.030292214825749397, 0.03091307543218136, 0.008268114179372787, -0.010858613066375256, 0.07249648869037628, 0.03747906535863876, 0.03363744914531708, 0.10803862661123276, -0.028587989509105682, -0.024289293214678764, -0.01061256229877472, -0.06121089309453964, 0.09374477714300156, 0.030166391283273697, 0.015095004811882973, -0.13896891474723816, 0.09798653423786163, 0.040716882795095444, 0.014938865788280964, -0.014774850569665432, 0.00929263699799776, -0.07187589257955551, -0.014989607967436314, 0.02685348317027092, 0.05974864587187767, -0.11807255446910858, 0.058542873710393906, -0.008085320703685284, -0.03261198848485947, -0.022391678765416145, -0.0747823640704155, 0.03819772228598595, 0.10437551885843277, 0.07182864844799042, 0.07104339450597763, 0.018721697852015495, -0.04262131452560425, 0.1387905329465866, -0.027024973183870316, 0.02508988417685032, 0.06480836123228073, 0.025877365842461586, 0.06109347566962242 ]
0.080174
on initialization. However, it is often unclear what caused the problem. Here are the considerations and troubleshooting steps that one can take while adopting sidecar containers for their workload. ### Ensure the feature gate is enabled As a very first step, make sure that both API server and Nodes are at Kubernetes version v1.29 or later. The feature will break on clusters where Nodes are running earlier versions where it is not enabled. {{< alert title="Note" color="info" >}} The feature can be enabled on nodes with the version 1.28. The behavior of built-in sidecar container termination was different in version 1.28, and it is not recommended to adjust the behavior of a sidecar to that behavior. However, if the only concern is the startup order, the above statement can be changed to Nodes running version 1.28 with the feature gate enabled. {{< /alert >}} You should ensure that the feature gate is enabled for the API server(s) within the control plane \*\*and\*\* for all nodes. One of the ways to check the feature gate enablement is to run a command like this: - For API Server: ```shell kubectl get --raw /metrics | grep kubernetes\_feature\_enabled | grep SidecarContainers ``` - For the individual node: ```shell kubectl get --raw /api/v1/nodes//proxy/metrics | grep kubernetes\_feature\_enabled | grep SidecarContainers ``` If you see something like this: ``` kubernetes\_feature\_enabled{name="SidecarContainers",stage="BETA"} 1 ``` it means that the feature is enabled. ### Check for 3rd party tooling and mutating webhooks If you experience issues when validating the feature, it may be an indication that one of the 3rd party tools or mutating webhooks are broken. When the `SidecarContainers` feature gate is enabled, Pods gain a new field in their API. Some tools or mutating webhooks might have been built with an earlier version of Kubernetes API. If tools pass unknown fields as-is using various patching strategies to mutate a Pod object, this will not be a problem. However, there are tools that will strip out unknown fields; if you have those, they must be recompiled with the v1.28+ version of Kubernetes API client code. The way to check this is to use the `kubectl describe pod` command with your Pod that has passed through mutating admission. If any tools stripped out the new field (`restartPolicy:Always`), you will not see it in the command output. If you hit an issue like this, please advise the author of the tools or the webhooks use one of the patching strategies for modifying objects instead of a full object update. {{< alert title="Note" color="info" >}} Mutating webhook may update Pods based on some conditions. Thus, sidecar containers may work for some Pods and fail for others. {{< /alert >}} ### Automatic injection of sidecars If you are using software that injects sidecars automatically, there are a few possible strategies you may follow to ensure that native sidecar containers can be used. All strategies are generally options you may choose to decide whether the Pod the sidecar will be injected to will land on a Node supporting the feature or not. As an example, you can follow [this conversation in Istio community](https://github.com/istio/istio/issues/48794). The discussion explores the options listed below. 1. Mark Pods that land to nodes supporting sidecars. You can use node labels and node affinity to mark nodes supporting sidecar containers and Pods landing on those nodes. 1. Check Nodes compatibility on injection. During sidecar injection, you may use the following strategies to check node compatibility: - query node version and assume the feature gate is enabled on the version 1.29+ - query node prometheus metrics and check feature enablement status - assume
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/pod-sidecar-containers.md
[ 0.05757439136505127, 0.04317620024085045, 0.11642178148031235, 0.04920070245862007, 0.021486608311533928, 0.008934669196605682, -0.07681787014007568, -0.051429834216833115, -0.017534157261252403, 0.04081819951534271, 0.00024936837144196033, -0.013676795177161694, -0.028526578098535538, 0.035396456718444824, 0.08310943841934204, 0.06122804805636406, 0.08171534538269043, -0.06961378455162048, -0.025533998385071754, -0.00847422145307064, -0.052701033651828766, -0.05793339014053345, -0.022963179275393486, 0.05801268294453621, -0.08212738484144211, 0.0050918543711304665, -0.006451163440942764, -0.009407280944287777, 0.05010122060775757, 0.03474070876836777, -0.09547823667526245, -0.008041718043386936, -0.019693536683917046, 0.00439003249630332, 0.016819339245557785, 0.03981237858533859, 0.005624875891953707, -0.0368335098028183, -0.009002262726426125, 0.02084539458155632, 0.044497955590486526, -0.030966857448220253, -0.12084188312292099, -0.008246923796832561, 0.02983873523771763, -0.06787335872650146, 0.0006046791095286608, -0.014958914369344711, -0.03455360233783722, 0.04672553017735481, 0.05192473530769348, -0.02973189763724804, 0.040322232991456985, -0.01525175292044878, -0.0018973259720951319, 0.006545179523527622, -0.032088011503219604, 0.1094508022069931, 0.11955860257148743, 0.045084770768880844, 0.036218807101249695, -0.07568464428186417, 0.059009190648794174, -0.044707924127578735, -0.029427729547023773, 0.0038012340664863586, 0.04823370650410652, -0.0764237716794014, -0.051886431872844696, -0.0013741013826802373, 0.10577532649040222, 0.0018913819221779704, -0.02091258205473423, -0.004265847150236368, 0.05611303821206093, 0.010343901813030243, 0.01811123639345169, 0.04558054357767105, -0.02946607768535614, -0.10511153191328049, -0.00822067353874445, -0.021041473373770714, 0.029876980930566788, 0.009730314835906029, -0.0874861478805542, -0.015075970441102982, -0.07440587133169174, -0.04211730137467384, -0.03198109567165375, -0.009717907756567001, -0.00006407257751561701, -0.1284235119819641, -0.021398989483714104, -0.128426656126976, 0.11667044460773468, -0.020219292491674423, -0.07955458015203476, -0.006119790952652693, 0.012173119932413101, -0.08529756218194962, -0.0239423681050539, 0.024039756506681442, -0.012407212518155575, 0.057242974638938904, 0.11399440467357635, -0.005097974091768265, -0.015365879982709885, -0.02295665442943573, 0.0027305653784424067, 0.03627018257975578, 0.007752968464046717, 0.09283573925495148, 0.06396739184856415, 0.012665103189647198, -0.031253546476364136, 0.023752111941576004, -0.08601782470941544, -0.02661607414484024, 0.03916545212268829, 0.08296588063240051, 0.08191459625959396, -0.1394505798816681, -0.03152769058942795, 0.01732339709997177, -0.01801086962223053, 0.008606504648923874, -0.0013549149734899402, 5.745889487874283e-33, -0.0012634574668481946, -0.09731464087963104, 0.06936901062726974, 0.03047719970345497, 0.04145904630422592, -0.04975500330328941, 0.029939686879515648, -0.03649799898266792, -0.094340018928051, -0.034945059567689896, -0.029847970232367516, 0.011603442020714283, -0.005083201453089714, -0.08774564415216446, -0.025968506932258606, -0.018470967188477516, -0.061822470277547836, -0.02090460993349552, -0.012185350060462952, -0.002949212910607457, 0.018837030977010727, -0.11802443861961365, -0.04149775579571724, -0.043161582201719284, 0.014879987575113773, -0.024135267361998558, 0.009271780960261822, -0.03995024040341377, -0.015016015619039536, -0.010472534224390984, -0.04998409003019333, -0.01972130686044693, 0.10292808711528778, 0.0655079334974289, -0.13092322647571564, -0.08948185294866562, -0.0003362443239893764, -0.007355919107794762, -0.07045745104551315, -0.02171274833381176, -0.021735534071922302, 0.031203417107462883, -0.03029915690422058, -0.15580475330352783, -0.005484056193381548, 0.01771063543856144, 0.03222084045410156, -0.015878716483712196, 0.08976370841264725, 0.015599138103425503, -0.04198695346713066, 0.04203528165817261, 0.009534650482237339, 0.0007212727214209735, 0.0339578315615654, -0.07273740321397781, 0.06589294970035553, -0.07884702831506729, -0.0747707337141037, 0.01272705476731062, -0.04387325420975685, -0.009010708890855312, 0.00363421649672091, -0.04429246112704277, 0.001732918550260365, 0.013548783026635647, -0.02413315698504448, 0.04310895502567291, -0.051940739154815674, -0.06525154411792755, -0.028421835973858833, 0.06763969361782074, -0.008832011371850967, -0.028134001418948174, 0.018404627218842506, -0.06486160308122635, 0.03769535571336746, 0.006999711971729994, -0.015443526208400726, 0.015769867226481438, 0.04713447019457817, -0.029261888936161995, 0.030454430729150772, 0.049713656306266785, 0.002667823573574424, -0.037358008325099945, -0.03853658214211464, -0.023002464324235916, -0.006931577809154987, 0.06600124388933182, 0.028370387852191925, 0.04227833077311516, 0.011726507917046547, 0.0626072958111763, -0.0398610420525074, -7.13322959389184e-33, 0.023723650723695755, 0.01812995970249176, -0.024042142555117607, -0.05801623314619064, 0.018413439393043518, 0.020675260573625565, 0.027386315166950226, 0.06830491125583649, -0.02869533561170101, -0.056363943964242935, 0.042336978018283844, -0.006567669101059437, -0.07715950906276703, 0.0479634627699852, -0.050558820366859436, 0.05768529325723648, -0.03001750260591507, -0.008572054095566273, 0.08399814367294312, 0.04690610244870186, 0.006960420869290829, -0.01731337048113346, -0.018295926973223686, 0.06710827350616455, -0.002670137444511056, 0.02727842517197132, 0.009435129351913929, 0.08060812950134277, -0.014084489084780216, -0.03868306055665016, 0.006496322341263294, -0.07378014922142029, 0.06456369906663895, 0.10471111536026001, 0.029634762555360794, -0.06832817196846008, -0.030336886644363403, 0.0008966355235315859, 0.011265324428677559, -0.010705242864787579, 0.054636385291814804, -0.026294859126210213, -0.06377474218606949, 0.008693273179233074, -0.05838754400610924, 0.006279242690652609, 0.07006631046533585, 0.022244786843657494, -0.03434053063392639, -0.11934108287096024, -0.026187608018517494, 0.05591157078742981, -0.05101979151368141, 0.052371054887771606, -0.055850155651569366, 0.01896579936146736, 0.07081401348114014, 0.06508989632129669, 0.013977880589663982, 0.02185574173927307, 0.007973757572472095, 0.00959545373916626, 0.0674024373292923, 0.012801017612218857, -0.007685084827244282, -0.03070315346121788, 0.024330174550414085, 0.052378516644239426, 0.06403186172246933, -0.024945413693785667, -0.06573175638914108, -0.026679929345846176, -0.01641109399497509, 0.04126240685582161, -0.05475490912795067, 0.025026574730873108, 0.046749603003263474, -0.11794237792491913, 0.04717230424284935, 0.015455519780516624, -0.0280549768358469, 0.009525192901492119, -0.054597947746515274, 0.07191267609596252, 0.062064867466688156, 0.03474274277687073, -0.007984094321727753, 0.07569455355405807, 0.0453491173684597, 0.06308181583881378, 0.008161792531609535, -0.00993899255990982, -0.04453441500663757, 0.14086803793907166, 0.03095116652548313, -5.8231716337786565e-8, -0.006481151562184095, -0.03999190405011177, -0.003610417479649186, 0.004520382732152939, 0.019208047538995743, -0.03701067343354225, 0.12006286531686783, 0.01886572688817978, -0.11940556764602661, -0.013237465173006058, -0.08302734047174454, 0.08071642369031906, -0.06085711345076561, 0.0009263420943170786, 0.03427533805370331, -0.05849403515458107, -0.028477633371949196, 0.022374173626303673, 0.035719167441129684, -0.036237604916095734, -0.07458920031785965, -0.08566408604383469, 0.0151417450979352, -0.048348091542720795, -0.049159348011016846, 0.0037646039854735136, 0.040546298027038574, 0.055016424506902695, 0.0581866092979908, -0.028078313916921616, -0.0850076973438263, -0.02960752509534359, -0.01622004620730877, 0.09690047055482864, 0.01846046932041645, 0.013513711281120777, -0.06623099744319916, 0.09365508705377579, 0.054982852190732956, 0.013115580193698406, 0.030340781435370445, 0.05587625876069069, -0.06878191232681274, -0.037188977003097534, 0.04246412590146065, 0.07228326797485352, -0.041767995804548264, 0.09091486036777496, 0.056100767105817795, -0.02900099568068981, -0.019877158105373383, -0.052039746195077896, 0.0179654061794281, 0.06486406922340393, 0.055387768894433975, 0.008425273932516575, -0.062196794897317886, -0.006719674449414015, 0.09663435071706772, -0.005235303193330765, 0.04934723302721977, 0.04490407928824425, 0.009812257252633572, -0.019304150715470314 ]
-0.014859
landing on those nodes. 1. Check Nodes compatibility on injection. During sidecar injection, you may use the following strategies to check node compatibility: - query node version and assume the feature gate is enabled on the version 1.29+ - query node prometheus metrics and check feature enablement status - assume the nodes are running with a [supported version skew](/releases/version-skew-policy/#supported-version-skew) from the API server - there may be other custom ways to detect nodes compatibility. 1. Develop a universal sidecar injector. The idea of a universal sidecar injector is to inject a sidecar container as a regular container as well as a native sidecar container. And have a runtime logic to decide which one will work. The universal sidecar injector is wasteful, as it will account for requests twice, but may be considered as a workable solution for special cases. - One way would be on start of a native sidecar container detect the node version and exit immediately if the version does not support the sidecar feature. - Consider a runtime feature detection design: - Define an empty dir so containers can communicate with each other - Inject an init container, let's call it `NativeSidecar` with `restartPolicy=Always`. - `NativeSidecar` must write a file to an empty directory indicating the first run and exit immediately with exit code `0`. - `NativeSidecar` on restart (when native sidecars are supported) checks that file already exists in the empty dir and changes it - indicating that the built-in sidecar containers are supported and running. - Inject regular container, let's call it `OldWaySidecar`. - `OldWaySidecar` on start checks the presence of a file in an empty dir. - If the file indicates that the `NativeSidecar` is NOT running, it assumes that the sidecar feature is not supported and works assuming it is the sidecar. - If the file indicates that the `NativeSidecar` is running, it either does nothing and sleeps forever (in the case when Pod’s `restartPolicy=Always`) or exits immediately with exit code `0` (in the case when Pod’s `restartPolicy!=Always`). ## {{% heading "whatsnext" %}} - Learn more about [sidecar containers](/docs/concepts/workloads/pods/sidecar-containers/).
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/pod-sidecar-containers.md
[ -0.012385313399136066, 0.04161494970321655, 0.039550215005874634, 0.02733631432056427, 0.05986049026250839, -0.06958204507827759, -0.09913183748722076, -0.044087670743465424, -0.14466527104377747, -0.03901388496160507, 0.01829787716269493, -0.051518093794584274, -0.016718951985239983, 0.009527873247861862, 0.03773201256990433, -0.00462649529799819, 0.11133727431297302, -0.025523658841848373, 0.029258301481604576, 0.016353199258446693, -0.07188072055578232, -0.013273037038743496, -0.030441798269748688, 0.037106193602085114, -0.14417096972465515, -0.031115127727389336, -0.011549094691872597, 0.008576964028179646, 0.012503016740083694, 0.02304180897772312, -0.0023345923982560635, 0.08405580371618271, -0.10195896774530411, 0.015852168202400208, -0.036986496299505234, 0.04349733889102936, -0.011269334703683853, -0.06291180849075317, 0.014064441435039043, -0.015774080529808998, 0.058709755539894104, -0.0024044306483119726, -0.07790561020374298, 0.014604000374674797, 0.0003528785891830921, -0.14359436929225922, -0.08324265480041504, 0.04668677970767021, -0.04120500013232231, 0.023151500150561333, 0.03264859691262245, -0.05777258425951004, -0.02338668704032898, 0.016906997188925743, -0.05962705239653587, -0.003363181371241808, -0.06288494169712067, 0.059020012617111206, 0.019069282338023186, 0.02306869998574257, 0.034538157284259796, -0.043653085827827454, 0.04795222356915474, -0.04999661445617676, -0.04260474443435669, 0.03610922768712044, 0.015789484605193138, -0.06637724488973618, 0.02853947877883911, -0.006331180687993765, 0.05787799507379532, -0.014560728333890438, -0.08190909773111343, -0.0189223550260067, -0.011742591857910156, 0.07367425411939621, 0.06708746403455734, 0.010521642863750458, -0.05205528438091278, -0.09026741981506348, -0.02915078215301037, 0.01007617637515068, -0.022808874025940895, -0.0066477577202022076, -0.039598818868398666, 0.026065681129693985, -0.02840832620859146, 0.008017138577997684, -0.016460653394460678, -0.010300022549927235, -0.006709499284625053, -0.09171859920024872, -0.002514238003641367, -0.12173744291067123, 0.07777231931686401, 0.06494347006082535, -0.046775076538324356, -0.007163608446717262, 0.036282978951931, 0.01529946643859148, 0.00966724380850792, -0.041233550757169724, -0.05703258514404297, -0.030460646376013756, 0.048534464091062546, 0.09602200239896774, 0.0003385495219845325, -0.10995924472808838, 0.03035013936460018, 0.018328988924622536, -0.01247774250805378, 0.07575299590826035, 0.00935586728155613, -0.03083568811416626, -0.09892182797193527, -0.03810414671897888, -0.00968127604573965, -0.046662282198667526, -0.015958018600940704, 0.015607225708663464, 0.01928987167775631, -0.04959606006741524, 0.06268547475337982, -0.051741015166044235, 0.07316214591264725, -0.018382707610726357, -0.013400301337242126, 4.9340082331979614e-33, -0.03930786997079849, -0.033982835710048676, 0.08283279836177826, 0.04720426723361015, 0.008271555416285992, 0.05385107547044754, 0.050412364304065704, 0.046577077358961105, -0.06089742109179497, -0.031298041343688965, -0.06524855643510818, 0.05456700176000595, -0.023045945912599564, -0.06576012820005417, 0.046790096908807755, -0.00809213612228632, -0.06970013678073883, -0.015319281257689, 0.029919497668743134, -0.00904660951346159, 0.023537244647741318, -0.11070182919502258, -0.10897402465343475, -0.004889101721346378, 0.06952317804098129, -0.01277224626392126, -0.007429359946399927, -0.016910770907998085, 0.010637943632900715, 0.006443733349442482, 0.04173598811030388, 0.009122667834162712, 0.04473144933581352, 0.09201590716838837, -0.07045269012451172, -0.06896607577800751, -0.02526208758354187, -0.025196615606546402, -0.10868333280086517, -0.10806255042552948, -0.003500047605484724, 0.0788630023598671, -0.03776413947343826, -0.07522483170032501, -0.007913922891020775, -0.015577154234051704, 0.012157267890870571, -0.057289380580186844, 0.07733914256095886, -0.06911744177341461, -0.02238435484468937, 0.03448506444692612, 0.01340223103761673, -0.04636717215180397, 0.02174975909292698, -0.03737107291817665, 0.03715536743402481, 0.045108355581760406, 0.04737104848027229, 0.034421082586050034, 0.00693817762658, -0.01964585669338703, -0.010578114539384842, -0.014014564454555511, 0.030031822621822357, 0.1030985563993454, -0.05258147418498993, -0.055303771048784256, -0.02784314937889576, 0.0014360124478116632, -0.014908811077475548, 0.023990847170352936, -0.026610467582941055, 0.005327071528881788, -0.004981350153684616, -0.020896682515740395, 0.008089981973171234, -0.005985295865684748, 0.03711191192269325, -0.023572193458676338, -0.1052277460694313, -0.014233400113880634, 0.006215224042534828, 0.04881369322538376, 0.03162698075175285, -0.08670014142990112, -0.06671826541423798, 0.007978536188602448, 0.045063868165016174, 0.07099395990371704, 0.045823972672224045, 0.07125883549451828, -0.03906739130616188, -0.017520161345601082, 0.04694312438368797, -4.9902589439626695e-33, -0.086154043674469, 0.008910955861210823, 0.01655428484082222, 0.04823511093854904, 0.004164630547165871, -0.03750133886933327, -0.0010467707179486752, 0.008612602017819881, 0.0036817595828324556, 0.0255633145570755, -0.022417502477765083, 0.053595371544361115, 0.037839967757463455, -0.040333110839128494, -0.040943875908851624, 0.04519140347838402, -0.040412385016679764, -0.06783921271562576, 0.07724067568778992, 0.08654744178056717, 0.021046867594122887, 0.09767104685306549, -0.008767382241785526, 0.050119295716285706, 0.0421939343214035, 0.0094892717897892, -0.03234858810901642, 0.06192779168486595, 0.006450684275478125, -0.0823165625333786, -0.0037400182336568832, -0.054777175188064575, 0.04277815669775009, 0.06341663002967834, 0.026980362832546234, -0.031196294352412224, -0.01495547965168953, 0.07114806771278381, 0.005488098599016666, -0.010929977521300316, 0.001110923127271235, -0.050531018525362015, -0.14670078456401825, 0.07521268725395203, -0.05054564028978348, -0.0005247435183264315, 0.0017521457048133016, 0.050293538719415665, 0.04395683482289314, -0.048099253326654434, -0.06999730318784714, 0.056105684489011765, -0.005149315111339092, 0.07945652306079865, 0.011381324380636215, -0.045278050005435944, 0.037675198167562485, 0.00792583916336298, 0.025131024420261383, 0.04826473444700241, 0.0961378887295723, -0.03820833936333656, 0.054431311786174774, 0.03856608271598816, -0.0129659753292799, -0.07633957266807556, -0.02218228578567505, 0.008081767708063126, -0.04401688650250435, 0.04157362878322601, 0.04197761043906212, 0.017785562202334404, -0.01771821267902851, 0.017507225275039673, 0.00000873805311130127, 0.02894839085638523, 0.03490776568651199, -0.10394497960805893, 0.036744244396686554, 0.013881714083254337, -0.09089833498001099, 0.04344163462519646, 0.0006493585533462465, 0.09012512862682343, 0.03157111257314682, 0.028754184022545815, 0.002844266826286912, 0.04829775169491768, 0.0713491216301918, 0.03668095916509628, -0.009053897112607956, -0.0067696948535740376, -0.13458865880966187, 0.02024184912443161, 0.032960955053567886, -4.9822190817394585e-8, -0.03997159004211426, -0.022990191355347633, -0.010244164615869522, 0.03012133575975895, -0.05020025745034218, 0.02641741931438446, 0.04022584855556488, 0.04998990520834923, -0.04085337370634079, 0.03941298648715019, 0.005333491135388613, -0.014790371991693974, 0.012272137217223644, 0.023779625073075294, 0.08482411503791809, -0.027055984362959862, 0.009603041224181652, 0.07941433787345886, -0.04675870016217232, 0.04605308920145035, -0.0678175687789917, -0.00022014974092599005, 0.04567369073629379, -0.011779818683862686, -0.012565716169774532, -0.020306242629885674, 0.07905270159244537, 0.02709881216287613, 0.04618068411946297, -0.020070485770702362, -0.05267666280269623, -0.03745700418949127, 0.015589592047035694, 0.10572293400764465, 0.00348977604880929, 0.036852262914180756, -0.0950683057308197, 0.1803233027458191, 0.07023581117391586, 0.050486624240875244, 0.033703673630952835, 0.04470895603299141, -0.13854938745498657, -0.021704329177737236, 0.040509600192308426, 0.064380943775177, 0.006622254848480225, -0.010340595617890358, 0.03388313204050064, 0.05838412046432495, -0.016271119937300682, -0.12762387096881866, 0.01697525754570961, 0.025713585317134857, 0.05967336520552635, 0.011768286116421223, -0.03761022910475731, -0.02536560595035553, 0.12903982400894165, 0.020296473056077957, 0.03921321779489517, 0.044270146638154984, 0.0538923442363739, 0.01403734553605318 ]
0.07065
This page provides a step-by-step example of updating configuration within a Pod via a ConfigMap and builds upon the [Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) task. At the end of this tutorial, you will understand how to change the configuration for a running application. This tutorial uses the `alpine` and `nginx` images as examples. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You need to have the [curl](https://curl.se/) command-line tool for making HTTP requests from the terminal or command prompt. If you do not have `curl` available, you can install it. Check the documentation for your local operating system. ## {{% heading "objectives" %}} \* Update configuration via a ConfigMap mounted as a Volume \* Update environment variables of a Pod via a ConfigMap \* Update configuration via a ConfigMap in a multi-container Pod \* Update configuration via a ConfigMap in a Pod possessing a Sidecar Container ## Update configuration via a ConfigMap mounted as a Volume {#rollout-configmap-volume} Use the `kubectl create configmap` command to create a ConfigMap from [literal values](/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-literal-values): ```shell kubectl create configmap sport --from-literal=sport=football ``` Below is an example of a Deployment manifest with the ConfigMap `sport` mounted as a {{< glossary\_tooltip text="volume" term\_id="volume" >}} into the Pod's only container. {{% code\_sample file="deployments/deployment-with-configmap-as-volume.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-as-volume.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-volume ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE configmap-volume-6b976dfdcf-qxvbm 1/1 Running 0 72s configmap-volume-6b976dfdcf-skpvm 1/1 Running 0 72s configmap-volume-6b976dfdcf-tbc6r 1/1 Running 0 72s ``` On each node where one of these Pods is running, the kubelet fetches the data for that ConfigMap and translates it to files in a local volume. The kubelet then mounts that volume into the container, as specified in the Pod template. The code running in that container loads the information from the file and uses it to print a report to stdout. You can check this report by viewing the logs for one of the Pods in that Deployment: ```shell # Pick one Pod that belongs to the Deployment, and view its logs kubectl logs deployments/configmap-volume ``` You should see an output similar to: ``` Found 3 pods, using pod/configmap-volume-76d9c5678f-x5rgj Thu Jan 4 14:06:46 UTC 2024 My preferred sport is football Thu Jan 4 14:06:56 UTC 2024 My preferred sport is football Thu Jan 4 14:07:06 UTC 2024 My preferred sport is football Thu Jan 4 14:07:16 UTC 2024 My preferred sport is football Thu Jan 4 14:07:26 UTC 2024 My preferred sport is football ``` Edit the ConfigMap: ```shell kubectl edit configmap sport ``` In the editor that appears, change the value of key `sport` from `football` to `cricket`. Save your changes. The kubectl tool updates the ConfigMap accordingly (if you see an error, try again). Here's an example of how that manifest could look after you edit it: ```yaml apiVersion: v1 data: sport: cricket kind: ConfigMap # You can leave the existing metadata as they are. # The values you'll see won't exactly match these. metadata: creationTimestamp: "2024-01-04T14:05:06Z" name: sport namespace: default resourceVersion: "1743935" uid: 024ee001-fe72-487e-872e-34d6464a8a23 ``` You should see the following output: ``` configmap/sport edited ``` Tail (follow the latest entries in) the logs of one of the pods that belongs to this Deployment: ```shell kubectl logs deployments/configmap-volume --follow ``` After few seconds, you should see the log output change as follows: ``` Thu Jan 4 14:11:36 UTC 2024 My preferred sport is football Thu Jan 4 14:11:46 UTC 2024 My preferred sport is football
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.021312672644853592, -0.004178306553512812, 0.018395015969872475, 0.006265217904001474, -0.015336725860834122, -0.04953588917851448, -0.06954348832368851, 0.02340572699904442, -0.04909810423851013, 0.11216431856155396, -0.06875470280647278, -0.018280964344739914, 0.0280796829611063, -0.011644110083580017, 0.10231658816337585, -0.013550879433751106, 0.017819833010435104, 0.0016347556374967098, 0.02448335476219654, -0.02958793379366398, -0.04016983136534691, 0.07095791399478912, 0.06458308547735214, 0.013188740238547325, -0.019681457430124283, 0.052307162433862686, -0.023081211373209953, -0.017116643488407135, -0.011641663499176502, 0.029236726462841034, 0.011197290383279324, -0.010878692381083965, 0.03594793379306793, 0.024559760466217995, 0.005364130716770887, 0.18647611141204834, 0.020459428429603577, -0.04830785095691681, -0.035785019397735596, 0.0206723902374506, 0.01759367808699608, -0.007944086566567421, -0.10837271809577942, -0.09022285044193268, -0.018740622326731682, -0.012916188687086105, -0.03109050914645195, -0.0663466826081276, 0.015693169087171555, -0.005725440103560686, -0.06369855254888535, -0.13569407165050507, 0.0361463688313961, -0.03533696010708809, 0.009425691328942776, 0.023543957620859146, 0.0011204900220036507, 0.08919794857501984, 0.08966141194105148, -0.02619508095085621, 0.02585938386619091, -0.07809128612279892, 0.004545529838651419, -0.027503879740834236, 0.006318306550383568, -0.031782474368810654, -0.0288936085999012, 0.0041106934659183025, 0.07718262821435928, -0.027503348886966705, 0.006889641284942627, 0.02464347332715988, -0.02998036891222, -0.13583754003047943, -0.04703411087393761, 0.0020817199256271124, 0.002071993425488472, 0.05662696808576584, -0.05462905392050743, 0.035291146486997604, 0.057471442967653275, 0.04221145808696747, 0.040566813200712204, 0.056346237659454346, 0.004162730649113655, -0.0029712473042309284, 0.05311291664838791, -0.02828112430870533, 0.029070870950818062, -0.05824054777622223, 0.023778703063726425, -0.11797159165143967, -0.05058765783905983, -0.0980784147977829, 0.03831527382135391, 0.053082726895809174, -0.06436902284622192, 0.006761154625564814, -0.016067834571003914, 0.028928512707352638, 0.061203617602586746, -0.10957879573106766, 0.01041681319475174, -0.033264223486185074, 0.06297626346349716, -0.022576209157705307, -0.008713551796972752, 0.05655001848936081, 0.04172486811876297, 0.07927170395851135, 0.00428652111440897, -0.03987472504377365, 0.02130771614611149, 0.012456443160772324, -0.0540803000330925, 0.030043091624975204, 0.014789588749408722, 0.02238033339381218, 0.006707743741571903, 0.08593831956386566, 0.07734142243862152, -0.05110862851142883, 0.03927202522754669, 0.03201441839337349, 0.016404949128627777, -0.0007011924171820283, 0.014494640752673149, 3.278040117368664e-33, 0.09189410507678986, -0.05569448322057724, 0.03103005699813366, 0.013520346023142338, 0.045970574021339417, -0.050867851823568344, 0.03293154016137123, -0.010551088489592075, 0.049236927181482315, 0.0022648319136351347, -0.013140682131052017, 0.08847730606794357, -0.030855339020490646, 0.06573520600795746, -0.059071507304906845, -0.09584753215312958, -0.054911866784095764, 0.021548861637711525, 0.13940100371837616, -0.00741983437910676, 0.011607347056269646, -0.05551789700984955, -0.059337981045246124, 0.018343579024076462, 0.04361627250909805, 0.010200316086411476, 0.0706016942858696, -0.06784258037805557, -0.0348588190972805, -0.01672529987990856, 0.07029008865356445, -0.022037729620933533, -0.038641974329948425, 0.011927648447453976, -0.12019271403551102, -0.06557966768741608, -0.0026049285661429167, 0.05190960317850113, -0.0894293561577797, -0.007062298245728016, 0.06544610857963562, -0.020532919093966484, -0.019527705386281013, -0.021711528301239014, 0.011318515986204147, -0.024520669132471085, 0.036661989986896515, -0.04880062863230705, 0.11079354584217072, -0.009336438030004501, -0.04728559032082558, -0.057871006429195404, 0.014424815773963928, -0.07975856959819794, 0.030657311901450157, -0.0006088126683607697, 0.03457910940051079, -0.03212372213602066, -0.028539827093482018, -0.09847566485404968, -0.019872037693858147, -0.006339831743389368, 0.011267738416790962, 0.010953810065984726, 0.06643832474946976, 0.012529066763818264, 0.019871171563863754, 0.028810568153858185, 0.08692004531621933, 0.08472077548503876, -0.07393542677164078, 0.028968457132577896, -0.06618925929069519, 0.0694689005613327, -0.059630729258060455, -0.02998957596719265, 0.02358097769320011, 0.08007680624723434, -0.029401756823062897, 0.024756427854299545, 0.040429871529340744, 0.036771178245544434, -0.04935362935066223, 0.10362369567155838, 0.045162383466959, -0.030353514477610588, 0.05004375800490379, 0.02906477265059948, -0.059777215123176575, 0.019546207040548325, 0.013762526214122772, 0.01868956722319126, -0.12527358531951904, 0.013223284855484962, -0.08062361925840378, -4.421105517787642e-33, 0.10402797162532806, -0.06749062985181808, -0.023930462077260017, 0.02926243469119072, -0.006775242742151022, 0.02486146241426468, 0.044522155076265335, -0.009176704101264477, 0.0006150364060886204, -0.043423257768154144, -0.06854946166276932, 0.015094036236405373, 0.0163338053971529, 0.016441937536001205, -0.14644162356853485, 0.004813190083950758, -0.12986968457698822, -0.00939532183110714, -0.006743309088051319, -0.036706022918224335, -0.08308582007884979, 0.024517284706234932, 0.06261446326971054, 0.03882695361971855, -0.0380285382270813, -0.02402622066438198, 0.12345446646213531, -0.01578531600534916, -0.035376615822315216, -0.0019978550262749195, -0.008418707177042961, -0.04163714870810509, -0.04549436271190643, 0.06292610615491867, -0.03680103272199631, 0.003243621438741684, -0.021518679335713387, 0.08129877597093582, -0.03822139650583267, 0.006380883976817131, 0.10300257056951523, -0.0014788501430302858, -0.0204702690243721, -0.05231498181819916, -0.011638439260423183, -0.05345790833234787, 0.006715572439134121, -0.019907213747501373, -0.09789126366376877, -0.057336658239364624, 0.005231477320194244, -0.006591217592358589, -0.058359261602163315, 0.016722407191991806, 0.02175140008330345, 0.0008052318589761853, -0.015330662950873375, 0.018132248893380165, -0.008550570346415043, 0.021303335204720497, 0.026134252548217773, -0.03552344813942909, 0.06505724787712097, -0.008255976252257824, -0.03406601399183273, -0.032687872648239136, -0.11095593124628067, -0.0558609738945961, -0.03122132644057274, 0.07564021646976471, -0.028908584266901016, -0.05151697248220444, 0.07673917710781097, 0.021606680005788803, 0.07305962592363358, -0.023026827722787857, -0.005100410897284746, -0.027402706444263458, 0.06879924982786179, -0.02917339839041233, -0.01168274786323309, 0.07325957715511322, -0.09157586842775345, -0.0002397852367721498, 0.026958703994750977, 0.11074352264404297, 0.04885067045688629, 0.09570740908384323, 0.04970067739486694, 0.028273001313209534, 0.04095260798931122, 0.004500398878008127, -0.008446195162832737, 0.014996902085840702, -0.03493090346455574, -5.690207061093133e-8, 0.08709250390529633, 0.026003031060099602, -0.0501805879175663, 0.0956755056977272, 0.014593733474612236, 0.04587901011109352, 0.026281023398041725, -0.055821824818849564, -0.013288857415318489, -0.0003417086263652891, -0.06163671240210533, -0.000016580681403866038, -0.05332378298044205, 0.0636785551905632, -0.015139822848141193, 0.006833646446466446, -0.00929336715489626, 0.0991271436214447, 0.027746913954615593, -0.0693695917725563, -0.06783150136470795, -0.0062910388223826885, 0.020182136446237564, 0.012156134471297264, 0.10419756174087524, 0.03882983326911926, 0.03803420439362526, 0.017518175765872, -0.012582797557115555, -0.02842540852725506, 0.008048979565501213, -0.03860282525420189, -0.027007514610886574, -0.000008639437510282733, -0.011789160780608654, -0.05851408466696739, -0.1342884600162506, 0.00142094143666327, -0.011079968884587288, -0.04630196467041969, -0.03980684280395508, 0.02520122192800045, -0.022896330803632736, -0.07550201565027237, -0.09231436252593994, 0.0028789215721189976, 0.02985531836748123, 0.061100590974092484, -0.018119482323527336, 0.03151530399918556, 0.026397813111543655, -0.045059312134981155, 0.03367581591010094, 0.03111846372485161, 0.03765867277979851, 0.0523957759141922, 0.04170094430446625, -0.11930344998836517, 0.0031731133349239826, -0.0016726691974326968, 0.02684493362903595, -0.015352281741797924, -0.019888795912265778, -0.041955165565013885 ]
0.07973
one of the pods that belongs to this Deployment: ```shell kubectl logs deployments/configmap-volume --follow ``` After few seconds, you should see the log output change as follows: ``` Thu Jan 4 14:11:36 UTC 2024 My preferred sport is football Thu Jan 4 14:11:46 UTC 2024 My preferred sport is football Thu Jan 4 14:11:56 UTC 2024 My preferred sport is football Thu Jan 4 14:12:06 UTC 2024 My preferred sport is cricket Thu Jan 4 14:12:16 UTC 2024 My preferred sport is cricket ``` When you have a ConfigMap that is mapped into a running Pod using either a `configMap` volume or a `projected` volume, and you update that ConfigMap, the running Pod sees the update almost immediately. However, your application only sees the change if it is written to either poll for changes, or watch for file updates. An application that loads its configuration once at startup will not notice a change. {{< note >}} 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. Also check [Mounted ConfigMaps are updated automatically](/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically). {{< /note >}} ## Update environment variables of a Pod via a ConfigMap {#rollout-configmap-env} Use the `kubectl create configmap` command to create a ConfigMap from [literal values](/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-literal-values): ```shell kubectl create configmap fruits --from-literal=fruits=apples ``` Below is an example of a Deployment manifest with an environment variable configured via the ConfigMap `fruits`. {{% code\_sample file="deployments/deployment-with-configmap-as-envvar.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-as-envvar.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-env-var ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE configmap-env-var-59cfc64f7d-74d7z 1/1 Running 0 46s configmap-env-var-59cfc64f7d-c4wmj 1/1 Running 0 46s configmap-env-var-59cfc64f7d-dpr98 1/1 Running 0 46s ``` The key-value pair in the ConfigMap is configured as an environment variable in the container of the Pod. Check this by viewing the logs of one Pod that belongs to the Deployment. ```shell kubectl logs deployment/configmap-env-var ``` You should see an output similar to: ``` Found 3 pods, using pod/configmap-env-var-7c994f7769-l74nq Thu Jan 4 16:07:06 UTC 2024 The basket is full of apples Thu Jan 4 16:07:16 UTC 2024 The basket is full of apples Thu Jan 4 16:07:26 UTC 2024 The basket is full of apples ``` Edit the ConfigMap: ```shell kubectl edit configmap fruits ``` In the editor that appears, change the value of key `fruits` from `apples` to `mangoes`. Save your changes. The kubectl tool updates the ConfigMap accordingly (if you see an error, try again). Here's an example of how that manifest could look after you edit it: ```yaml apiVersion: v1 data: fruits: mangoes kind: ConfigMap # You can leave the existing metadata as they are. # The values you'll see won't exactly match these. metadata: creationTimestamp: "2024-01-04T16:04:19Z" name: fruits namespace: default resourceVersion: "1749472" ``` You should see the following output: ``` configmap/fruits edited ``` Tail the logs of the Deployment and observe the output for few seconds: ```shell # As the text explains, the output does NOT change kubectl logs deployments/configmap-env-var --follow ``` Notice that the output remains \*\*unchanged\*\*, even though you edited the ConfigMap: ``` Thu Jan 4 16:12:56 UTC 2024 The basket is full of apples Thu Jan 4 16:13:06 UTC 2024 The basket is full of apples Thu Jan 4 16:13:16 UTC 2024 The basket is full of apples Thu Jan 4 16:13:26 UTC 2024 The basket is full of apples ``` {{< note >}} Although the value of the key inside the
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.07083563506603241, -0.01694737933576107, 0.0510840006172657, -0.01667792536318302, 0.05206407234072685, -0.061059579253196716, -0.05276304483413696, 0.00463462108746171, 0.1100086197257042, 0.08786560595035553, -0.007514092605561018, -0.06253647804260254, 0.0009164253133349121, -0.050744831562042236, 0.0046646613627672195, -0.019697073847055435, 0.02104175090789795, -0.06216990575194359, -0.06344539672136307, -0.024327972903847694, -0.028972595930099487, 0.05681770294904709, 0.005103940609842539, 0.0436721071600914, -0.003141962457448244, 0.0017437228234484792, -0.03230087831616402, -0.011441250331699848, -0.011676071211695671, -0.020798977464437485, -0.10725105553865433, 0.038383521139621735, 0.023115748539566994, 0.09764730930328369, 0.005318432115018368, 0.03393786773085594, -0.0011954577639698982, -0.047442514449357986, -0.05022989958524704, -0.021807726472616196, 0.024660957977175713, -0.06020963564515114, -0.05530564486980438, 0.012818707153201103, -0.06404626369476318, 0.03374592214822769, -0.03752171993255615, -0.019936509430408478, -0.0170755535364151, -0.012257198803126812, -0.03634268417954445, -0.06766316294670105, 0.051337212324142456, 0.0021474878303706646, 0.09087797999382019, 0.09103086590766907, 0.001920577371492982, 0.135231152176857, 0.11687146127223969, -0.029808199033141136, 0.016573596745729446, -0.02855381742119789, -0.028176654130220413, -0.029121655970811844, 0.03550509735941887, -0.036225561052560806, 0.022801760584115982, 0.018065273761749268, 0.09414847940206528, 0.037816714495420456, 0.04451413452625275, 0.11958153545856476, 0.035952720791101456, -0.07787264138460159, -0.03869989141821861, 0.011516857892274857, 0.01806611381471157, 0.06208576261997223, -0.020231928676366806, -0.0998748391866684, 0.0032177153043448925, 0.03355244919657707, -0.014589713886380196, 0.005936363711953163, 0.0039688702672719955, -0.04937029257416725, 0.06343388557434082, -0.02668875828385353, -0.013574058189988136, 0.03306855261325836, 0.029626652598381042, -0.06778163462877274, 0.016030045226216316, -0.08243376761674881, 0.03320946916937828, 0.023135118186473846, 0.0001431281998520717, 0.038924235850572586, 0.038475219160318375, 0.015643205493688583, 0.07640287280082703, 0.021998800337314606, -0.005813672672957182, 0.05175919458270073, 0.08575271815061569, -0.09251949191093445, -0.025795992463827133, 0.01467170286923647, -0.02328961342573166, 0.08795879036188126, 0.05397534742951393, -0.008625734597444534, 0.020429514348506927, 0.04678695276379585, -0.06311351805925369, 0.09250061959028244, -0.017876697704195976, 0.0285081397742033, -0.04870246350765228, 0.09066792577505112, 0.06051276624202728, -0.08876785635948181, -0.0038196430541574955, -0.027139555662870407, 0.00045606784988194704, 0.07665897160768509, 0.03752157837152481, 7.222515736676485e-33, 0.02257869392633438, -0.12766815721988678, -0.054372429847717285, -0.038195863366127014, -0.008509619161486626, -0.05971913784742355, -0.0476473867893219, -0.006464172620326281, -0.006588425487279892, -0.06227872893214226, -0.08307145535945892, 0.13162514567375183, -0.04439949989318848, -0.011364562436938286, -0.0027707817498594522, -0.08158248662948608, -0.052705325186252594, 0.09484758228063583, 0.0022149679716676474, 0.010664393194019794, 0.0508904866874218, -0.07747391611337662, -0.07456615567207336, -0.06153222545981407, 0.020495295524597168, 0.010274057276546955, 0.033755455166101456, -0.09214410185813904, -0.024378908798098564, 0.06480522453784943, -0.0038706802297383547, 0.019923923537135124, -0.03202980384230614, -0.013994473032653332, -0.1248660758137703, -0.11111625283956528, 0.020854126662015915, -0.04549415037035942, -0.08150585740804672, -0.06390011310577393, 0.01774727739393711, -0.00514546874910593, -0.0823284164071083, -0.08306226879358292, -0.010224717669188976, -0.032207001000642776, -0.014693276025354862, 0.03424609825015068, -0.013239780440926552, 0.008854161947965622, 0.03873606398701668, 0.04739679768681526, 0.01928708516061306, -0.10297762602567673, 0.029860971495509148, -0.017507662996649742, 0.13028690218925476, -0.12151143699884415, -0.0609615221619606, 0.02809554897248745, -0.007724360562860966, 0.028541985899209976, 0.004595236387103796, -0.005301679950207472, 0.03900900483131409, 0.07232815772294998, 0.04422186687588692, -0.005595360416918993, 0.027942081913352013, 0.01913013495504856, -0.035002388060092926, 0.03008217178285122, -0.05129646882414818, -0.01060221903026104, -0.00366166140884161, -0.02082708664238453, 0.014324444346129894, 0.049121249467134476, -0.15357449650764465, 0.008732400834560394, 0.06535676121711731, -0.008492979221045971, -0.09122300148010254, 0.04076271504163742, 0.02158360928297043, -0.0029579708352684975, 0.018230734393000603, -0.02479599229991436, -0.13969163596630096, 0.06273411214351654, -0.018295221030712128, 0.021880436688661575, -0.04294043406844139, 0.02932121977210045, -0.08538537472486496, -7.263971749010141e-33, 0.0646466612815857, -0.042853374034166336, 0.03943704068660736, 0.04000042378902435, 0.04769017547369003, 0.02714250050485134, -0.03826440870761871, 0.07961006462574005, -0.0129706971347332, -0.05429805442690849, -0.015843486413359642, -0.10584022849798203, -0.06164179742336273, 0.05242011696100235, -0.05769248306751251, 0.0456361398100853, -0.04292355850338936, -0.06712375581264496, 0.007964501157402992, 0.006080381106585264, -0.001448128023184836, 0.027428368106484413, 0.04572781175374985, 0.03773152828216553, -0.056474652141332626, -0.0101721016690135, -0.008736162446439266, 0.05485692247748375, -0.07697310298681259, -0.05474461615085602, -0.020917216315865517, -0.033999472856521606, -0.07567565888166428, -0.015794092789292336, 0.010946418158710003, 0.015922384336590767, -0.015364263206720352, 0.038960378617048264, -0.004494791384786367, 0.01220590341836214, 0.04589986801147461, 0.056389324367046356, -0.009730362333357334, -0.02082601748406887, -0.06714523583650589, -0.040764372795820236, 0.027202805504202843, -0.011180361732840538, -0.024838224053382874, -0.06409700959920883, 0.059567224234342575, 0.006925659254193306, 0.04053548350930214, 0.050500862300395966, 0.012242394499480724, 0.0710732489824295, -0.03396003320813179, -0.0021279624197632074, -0.07639819383621216, 0.03199705854058266, 0.03651668503880501, -0.07256083190441132, 0.03969314321875572, -0.028458748012781143, -0.00699812825769186, 0.019651934504508972, 0.03833790495991707, 0.009405001066625118, 0.03585647791624069, 0.014467271976172924, 0.061374224722385406, -0.05176442861557007, -0.04644687846302986, 0.024249929934740067, -0.01280230563133955, -0.02597176469862461, -0.03198891505599022, -0.03707408159971237, 0.008247489109635353, 0.0571192167699337, -0.07784247398376465, 0.10510005056858063, -0.04762069135904312, 0.02909323200583458, 0.0007620839751325548, 0.07415501028299332, 0.04654949530959129, 0.0730184018611908, 0.10359742492437363, 0.10396390408277512, 0.025469686836004257, 0.06865561008453369, -0.10574743151664734, 0.09055481106042862, -0.034647442400455475, -5.470366204463062e-8, 0.03865035995841026, 0.0026763142086565495, -0.04476003348827362, 0.13241785764694214, 0.06404224038124084, -0.021945565938949585, 0.04680808261036873, -0.0041160015389323235, -0.08006482571363449, -0.043207742273807526, -0.01866070181131363, 0.016429957002401352, -0.058018866926431656, 0.033717080950737, 0.0691765695810318, -0.024543408304452896, -0.052135199308395386, -0.01745413988828659, -0.059507809579372406, -0.1017717570066452, -0.04325365275144577, 0.01744670979678631, 0.015086030587553978, -0.014182737097144127, -0.0061309137381613255, 0.017913414165377617, 0.08090520650148392, -0.01810532622039318, 0.025413502007722855, -0.026629306375980377, -0.029674705117940903, 0.03892938047647476, -0.05724646896123886, 0.014134196564555168, -0.06569645553827286, 0.026270614936947823, -0.02107957936823368, 0.017775457352399826, 0.03158319741487503, 0.08674541115760803, 0.003193335607647896, -0.017551414668560028, -0.04473662003874779, 0.02292126603424549, -0.060592614114284515, -0.010281264781951904, 0.018498167395591736, 0.0303436741232872, -0.01168852485716343, -0.0067605976946651936, -0.023607103154063225, -0.022762790322303772, -0.00578811950981617, 0.06794314086437225, 0.033777762204408646, 0.01493846159428358, 0.0065092723816633224, -0.09607585519552231, 0.05166872590780258, 0.04507703334093094, 0.003981279209256172, -0.032680582255125046, -0.03173699229955673, 0.024491770192980766 ]
0.171115
of apples Thu Jan 4 16:13:06 UTC 2024 The basket is full of apples Thu Jan 4 16:13:16 UTC 2024 The basket is full of apples Thu Jan 4 16:13:26 UTC 2024 The basket is full of apples ``` {{< note >}} Although the value of the key inside the ConfigMap has changed, the environment variable in the Pod still shows the earlier value. This is because environment variables for a process running inside a Pod are \*\*not\*\* updated when the source data changes; if you wanted to force an update, you would need to have Kubernetes replace your existing Pods. The new Pods would then run with the updated information. {{< /note >}} You can trigger that replacement. Perform a rollout for the Deployment, using [`kubectl rollout`](/docs/reference/kubectl/generated/kubectl\_rollout/): ```shell # Trigger the rollout kubectl rollout restart deployment configmap-env-var # Wait for the rollout to complete kubectl rollout status deployment configmap-env-var --watch=true ``` Next, check the Deployment: ```shell kubectl get deployment configmap-env-var ``` You should see an output similar to: ``` NAME READY UP-TO-DATE AVAILABLE AGE configmap-env-var 3/3 3 3 12m ``` Check the Pods: ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-env-var ``` The rollout causes Kubernetes to make a new {{< glossary\_tooltip term\_id="replica-set" text="ReplicaSet" >}} for the Deployment; that means the existing Pods eventually terminate, and new ones are created. After few seconds, you should see an output similar to: ``` NAME READY STATUS RESTARTS AGE configmap-env-var-6d94d89bf5-2ph2l 1/1 Running 0 13s configmap-env-var-6d94d89bf5-74twx 1/1 Running 0 8s configmap-env-var-6d94d89bf5-d5vx8 1/1 Running 0 11s ``` {{< note >}} Please wait for the older Pods to fully terminate before proceeding with the next steps. {{< /note >}} View the logs for a Pod in this Deployment: ```shell # Pick one Pod that belongs to the Deployment, and view its logs kubectl logs deployment/configmap-env-var ``` You should see an output similar to the below: ``` Found 3 pods, using pod/configmap-env-var-6d9ff89fb6-bzcf6 Thu Jan 4 16:30:35 UTC 2024 The basket is full of mangoes Thu Jan 4 16:30:45 UTC 2024 The basket is full of mangoes Thu Jan 4 16:30:55 UTC 2024 The basket is full of mangoes ``` This demonstrates the scenario of updating environment variables in a Pod that are derived from a ConfigMap. Changes to the ConfigMap values are applied to the Pod during the subsequent rollout. If Pods get created for another reason, such as scaling up the Deployment, then the new Pods also use the latest configuration values; if you don't trigger a rollout, then you might find that your app is running with a mix of old and new environment variable values. ## Update configuration via a ConfigMap in a multi-container Pod {#rollout-configmap-multiple-containers} Use the `kubectl create configmap` command to create a ConfigMap from [literal values](/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-literal-values): ```shell kubectl create configmap color --from-literal=color=red ``` Below is an example manifest for a Deployment that manages a set of Pods, each with two containers. The two containers share an `emptyDir` volume that they use to communicate. The first container runs a web server (`nginx`). The mount path for the shared volume in the web server container is `/usr/share/nginx/html`. The second helper container is based on `alpine`, and for this container the `emptyDir` volume is mounted at `/pod-data`. The helper container writes a file in HTML that has its content based on a ConfigMap. The web server container serves the HTML via HTTP. {{% code\_sample file="deployments/deployment-with-configmap-two-containers.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-two-containers.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-two-containers ``` You should see an output similar to:
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.06949646025896072, -0.019348127767443657, 0.07371097058057785, -0.009837078861892223, 0.01295323483645916, -0.049420151859521866, -0.02021949551999569, -0.026291949674487114, 0.031228292733430862, 0.0480816587805748, 0.05861957371234894, -0.06941235810518265, 0.019864466041326523, -0.1001630425453186, 0.06705564260482788, 0.03919461369514465, -0.0011127706384286284, -0.016944201663136482, -0.051152195781469345, -0.05186004191637039, -0.03415888920426369, 0.017889127135276794, -0.004464198835194111, 0.01584419421851635, -0.014394834637641907, 0.035948533564805984, -0.03577380254864693, -0.004739329218864441, -0.015412362292408943, 0.013199994340538979, -0.09756027162075043, 0.06059675291180611, 0.027339987456798553, 0.05723658949136734, 0.05725672096014023, 0.0738106369972229, 0.06098382920026779, -0.006914806552231312, -0.016525819897651672, -0.022390158846974373, 0.027383476495742798, 0.011024462059140205, -0.09433629363775253, 0.02312455326318741, -0.02831987850368023, 0.06660819053649902, -0.053192611783742905, -0.009296917356550694, 0.009175390005111694, 0.03528890758752823, -0.015365122817456722, -0.044171303510665894, -0.008259772323071957, -0.012637173756957054, 0.0648617297410965, 0.08073770254850388, 0.01783672161400318, 0.09911739081144333, 0.14424993097782135, 0.015176697634160519, 0.081064872443676, -0.025607412680983543, 0.02154299058020115, -0.01581171527504921, 0.004352504853159189, -0.06950996816158295, -0.0331486314535141, -0.010204341262578964, 0.07771395891904831, -0.040893640369176865, 0.035443224012851715, 0.05079519376158714, 0.01862344890832901, -0.13789837062358856, -0.045377012342214584, 0.016197938472032547, -0.004143266007304192, 0.0652444064617157, 0.01450648158788681, -0.033601313829422, 0.021515751257538795, 0.03265848383307457, 0.000602060230448842, -0.01328626275062561, -0.04695134982466698, -0.03619162738323212, 0.011632797308266163, -0.06134849786758423, -0.02500164695084095, 0.05659850686788559, 0.015187251381576061, -0.12060082703828812, 0.03162265568971634, -0.11087600886821747, 0.02960761822760105, 0.03132274001836777, -0.03138415142893791, -0.013734783977270126, 0.05712360888719559, 0.059522341936826706, 0.003736249404028058, 0.006979005411267281, 0.010802985168993473, 0.018132399767637253, 0.0930463969707489, -0.061858661472797394, -0.033269137144088745, -0.022340862080454826, -0.02193383127450943, 0.08301261067390442, 0.054082222282886505, 0.01638263836503029, 0.05302942544221878, 0.007183638866990805, -0.031094996258616447, 0.03024061769247055, 0.013304990716278553, 0.02352714352309704, -0.019791461527347565, 0.07846219092607498, 0.057863686233758926, -0.10430007427930832, 0.007710494101047516, 0.022509776055812836, -0.08822134882211685, 0.07539292424917221, 0.04633631929755211, 7.792898656474076e-33, 0.034734562039375305, -0.12253568321466446, 0.018339363858103752, -0.013634640723466873, 0.07983636111021042, -0.06270000338554382, -0.019762655720114708, -0.0064703417010605335, 0.018644332885742188, -0.06386718899011612, -0.04070121794939041, 0.03977172449231148, -0.06010812148451805, -0.039410725235939026, -0.042032815515995026, -0.10288320481777191, -0.0833008885383606, 0.09271329641342163, 0.09053198248147964, -0.00949772447347641, 0.036963123828172684, -0.07565799355506897, -0.07455215603113174, -0.03772389516234398, 0.03229222446680069, 0.005709765944629908, 0.024177106097340584, -0.04839210957288742, -0.014758158475160599, 0.0008886381983757019, 0.026900624856352806, 0.013484560884535313, 0.045090995728969574, 0.013356930576264858, -0.14146333932876587, -0.07357345521450043, 0.004825735930353403, -0.006851671729236841, -0.10168243199586868, -0.06274981796741486, 0.05138513073325157, 0.03722604736685753, -0.014662511646747589, -0.0632271096110344, 0.04214232787489891, -0.05821852758526802, 0.05584372952580452, 0.012189115397632122, 0.05899735540151596, -0.03904012590646744, -0.023492516949772835, 0.004340049345046282, -0.007516585290431976, -0.1179586797952652, -0.034338705241680145, -0.02994699776172638, 0.0889715850353241, -0.08804280310869217, -0.05290922522544861, -0.037491362541913986, -0.04332941770553589, 0.08698887377977371, 0.017199942842125893, 0.015582374297082424, 0.06660185754299164, 0.04902388155460358, 0.022997498512268066, 0.019611909985542297, 0.030029097571969032, 0.045839209109544754, -0.06033540144562721, 0.016283154487609863, -0.08495931327342987, 0.0498744361102581, -0.035343870520591736, -0.043696481734514236, -0.004270175006240606, 0.042946957051754, -0.10611669719219208, 0.018871799111366272, 0.06778685003519058, 0.025796210393309593, -0.07784584909677505, 0.08645673096179962, 0.02137676253914833, 0.021427419036626816, 0.01334212813526392, 0.026998573914170265, -0.042366474866867065, 0.03977558761835098, 0.007027759216725826, -0.009000408463180065, -0.06480899453163147, 0.006016007158905268, -0.07236990332603455, -7.9016399654488e-33, 0.08749836683273315, -0.020815934985876083, -0.0038334568962454796, 0.009469909593462944, -0.0280955508351326, 0.03178158402442932, -0.035287726670503616, 0.08577631413936615, -0.012372104451060295, -0.048238396644592285, -0.028300894424319267, -0.014931811951100826, 0.021254325285553932, 0.020593203604221344, -0.08836398273706436, 0.05946565419435501, -0.06811830401420593, 0.013758804649114609, -0.06158832833170891, 0.017031237483024597, -0.0614091157913208, -0.010753883048892021, 0.033984601497650146, 0.04709751904010773, -0.001669147051870823, -0.027377210557460785, 0.037800319492816925, 0.08118559420108795, -0.04837493598461151, -0.05702337250113487, -0.013247636146843433, -0.06671754270792007, -0.06671912223100662, 0.06794174760580063, -0.02489841729402542, -0.06645972281694412, -0.03552521392703056, -0.012912796810269356, -0.02140663005411625, 0.0824558287858963, 0.07546382397413254, 0.03278475999832153, -0.09278938919305801, 0.005309795029461384, -0.0006525702774524689, 0.03922785818576813, 0.04134804755449295, -0.0027191198896616697, -0.011130870319902897, -0.09744109213352203, 0.05938621237874031, -0.01732780411839485, -0.055914733558893204, 0.008387421257793903, -0.011686322279274464, 0.08617105334997177, 0.010301634669303894, 0.05010860413312912, -0.08447978645563126, -0.0264884140342474, -0.006980652920901775, -0.09571804851293564, 0.11112743616104126, -0.005108092911541462, 0.0013057031901553273, -0.012269662693142891, 0.008060548454523087, 0.031160501763224602, -0.06529588997364044, -0.03649348020553589, 0.06812994182109833, -0.018227335065603256, -0.030664877966046333, -0.015333735384047031, 0.010803631506860256, -0.05358888953924179, -0.0008708596578799188, -0.033485379070043564, 0.018326623365283012, 0.019252991303801537, -0.07874587178230286, 0.0685347318649292, -0.0404747873544693, 0.03985162451863289, 0.014794932678341866, 0.0795617625117302, 0.053789351135492325, 0.10814161598682404, 0.08417769521474838, 0.12279383093118668, -0.051546309143304825, 0.02506428025662899, -0.07310771942138672, 0.04656391590833664, -0.05966619402170181, -5.731937235964324e-8, 0.019203202798962593, 0.05101082846522331, -0.07770753651857376, 0.1115887239575386, 0.05265356972813606, 0.0037070633843541145, 0.0033161654137074947, -0.012458917684853077, -0.047074493020772934, -0.03456204757094383, -0.021497221663594246, 0.08497057855129242, -0.0720658004283905, 0.029076319187879562, -0.0038295660633593798, 0.0030272009316831827, 0.00015427221660502255, 0.022379070520401, 0.02647322416305542, -0.05976960062980652, -0.06312955170869827, 0.00217399257235229, 0.031827736645936966, 0.021885138005018234, 0.051143579185009, 0.017687909305095673, 0.030142147094011307, 0.04549090936779976, 0.04999595507979393, -0.016124755144119263, 0.03496290370821953, -0.02391166053712368, -0.06077124923467636, 0.016224035993218422, -0.06846901774406433, -0.0456559881567955, -0.09096017479896545, 0.0686781033873558, 0.019267376512289047, 0.10914165526628494, -0.0286017507314682, -0.003942585084587336, -0.10824742168188095, -0.006590256467461586, -0.10323993116617203, 0.017218202352523804, -0.009695990942418575, 0.05182983726263046, -0.04043567553162575, 0.03188366815447807, -0.02991499938070774, -0.04517117887735367, 0.06060986965894699, 0.04277832806110382, 0.02490043453872204, -0.010653502307832241, 0.011128357611596584, -0.05738171562552452, 0.03016754612326622, 0.024965152144432068, -0.038281381130218506, -0.021573109552264214, -0.020275216549634933, -0.01539010088890791 ]
0.110677
container serves the HTML via HTTP. {{% code\_sample file="deployments/deployment-with-configmap-two-containers.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-two-containers.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-two-containers ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE configmap-two-containers-565fb6d4f4-2xhxf 2/2 Running 0 20s configmap-two-containers-565fb6d4f4-g5v4j 2/2 Running 0 20s configmap-two-containers-565fb6d4f4-mzsmf 2/2 Running 0 20s ``` Expose the Deployment (the `kubectl` tool creates a {{}} for you): ```shell kubectl expose deployment configmap-two-containers --name=configmap-service --port=8080 --target-port=80 ``` Use `kubectl` to forward the port: ```shell # this stays running in the background kubectl port-forward service/configmap-service 8080:8080 & ``` Access the service. ```shell curl http://localhost:8080 ``` You should see an output similar to: ``` Fri Jan 5 08:08:22 UTC 2024 My preferred color is red ``` Edit the ConfigMap: ```shell kubectl edit configmap color ``` In the editor that appears, change the value of key `color` from `red` to `blue`. Save your changes. The kubectl tool updates the ConfigMap accordingly (if you see an error, try again). Here's an example of how that manifest could look after you edit it: ```yaml apiVersion: v1 data: color: blue kind: ConfigMap # You can leave the existing metadata as they are. # The values you'll see won't exactly match these. metadata: creationTimestamp: "2024-01-05T08:12:05Z" name: color namespace: configmap resourceVersion: "1801272" uid: 80d33e4a-cbb4-4bc9-ba8c-544c68e425d6 ``` Loop over the service URL for few seconds. ```shell # Cancel this when you're happy with it (Ctrl-C) while true; do curl --connect-timeout 7.5 http://localhost:8080; sleep 10; done ``` You should see the output change as follows: ``` Fri Jan 5 08:14:00 UTC 2024 My preferred color is red Fri Jan 5 08:14:02 UTC 2024 My preferred color is red Fri Jan 5 08:14:20 UTC 2024 My preferred color is red Fri Jan 5 08:14:22 UTC 2024 My preferred color is red Fri Jan 5 08:14:32 UTC 2024 My preferred color is blue Fri Jan 5 08:14:43 UTC 2024 My preferred color is blue Fri Jan 5 08:15:00 UTC 2024 My preferred color is blue ``` ## Update configuration via a ConfigMap in a Pod possessing a sidecar container {#rollout-configmap-sidecar} The above scenario can be replicated by using a [Sidecar Container](/docs/concepts/workloads/pods/sidecar-containers/) as a helper container to write the HTML file. As a Sidecar Container is conceptually an Init Container, it is guaranteed to start before the main web server container. This ensures that the HTML file is always available when the web server is ready to serve it. If you are continuing from the previous scenario, you can reuse the ConfigMap named `color` for this scenario. If you are executing this scenario independently, use the `kubectl create configmap` command to create a ConfigMap from [literal values](/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-literal-values): ```shell kubectl create configmap color --from-literal=color=blue ``` Below is an example manifest for a Deployment that manages a set of Pods, each with a main container and a sidecar container. The two containers share an `emptyDir` volume that they use to communicate. The main container runs a web server (NGINX). The mount path for the shared volume in the web server container is `/usr/share/nginx/html`. The second container is a Sidecar Container based on Alpine Linux which acts as a helper container. For this container the `emptyDir` volume is mounted at `/pod-data`. The Sidecar Container writes a file in HTML that has its content based on a ConfigMap. The web server container serves the HTML via HTTP. {{% code\_sample file="deployments/deployment-with-configmap-and-sidecar-container.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-and-sidecar-container.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.018218232318758965, 0.02192177064716816, 0.07191134989261627, -0.0014411179581657052, -0.025377461686730385, -0.05530213192105293, 0.0015200208872556686, -0.03926869109272957, 0.02889299765229225, 0.03969913721084595, 0.0018426553579047322, -0.13090786337852478, 0.015343322418630123, -0.05303259938955307, 0.06421194225549698, 0.019749347120523453, 0.02663230709731579, -0.007921194657683372, 0.013518581166863441, -0.02799445204436779, 0.02999250404536724, 0.05560868978500366, 0.04005309194326401, 0.0016296253306791186, -0.06457878649234772, 0.06418386846780777, -0.07404256612062454, -0.00110987841617316, 0.025601567700505257, -0.00030513358069583774, -0.01801142655313015, -0.006986073683947325, -0.06299038976430893, 0.08063648641109467, 0.11138203740119934, 0.10462651401758194, -0.001258695381693542, -0.01716597191989422, -0.008651722222566605, 0.013525465503334999, 0.03286048397421837, -0.03213513270020485, -0.09618223458528519, -0.022809332236647606, 0.016876965761184692, -0.03182380273938179, -0.06540293246507645, -0.04034595936536789, 0.010338152758777142, 0.0021377303637564182, -0.03089083731174469, -0.12746378779411316, 0.019498363137245178, -0.02019592374563217, 0.018426937982439995, 0.05683467537164688, -0.07274279743432999, 0.04449338838458061, 0.12531207501888275, 0.059348251670598984, 0.017834236845374107, -0.019577927887439728, 0.024775085970759392, -0.025255925953388214, 0.034382764250040054, -0.018758514896035194, -0.0033567764330655336, -0.003940603695809841, 0.011717360466718674, 0.0039677745662629604, 0.05259498581290245, -0.025054844096302986, 0.05652303621172905, -0.07411152124404907, -0.006291577126830816, -0.03455989807844162, -0.00838888343423605, 0.08989621698856354, -0.04246700555086136, -0.07185143977403641, 0.06312110275030136, 0.04456370323896408, 0.08957389742136002, 0.054708562791347504, -0.06907419115304947, -0.04555472359061241, -0.005878994707018137, -0.03962947428226471, -0.002153589390218258, -0.0402245856821537, 0.004808294586837292, -0.07081156224012375, -0.033819545060396194, -0.15193887054920197, 0.04419075325131416, 0.022727038711309433, -0.05898129567503929, 0.03584206476807594, -0.033701784908771515, 0.009874694980680943, 0.021322760730981827, -0.10999121516942978, 0.003997917752712965, -0.0305732861161232, 0.05234602838754654, -0.05803992599248886, -0.05531419813632965, -0.017854880541563034, -0.00937111210078001, 0.03316415473818779, 0.020961778238415718, 0.03051537647843361, -0.02681000903248787, 0.05249761790037155, -0.02915150299668312, -0.021923761814832687, 0.01995752938091755, -0.02049308456480503, 0.07288657128810883, 0.08159416913986206, 0.021351806819438934, -0.07053544372320175, -0.005482285283505917, -0.01212395541369915, -0.07934468239545822, 0.040742479264736176, 0.02282155118882656, 3.919302040442977e-33, 0.08766262233257294, -0.08953936398029327, -0.022916115820407867, 0.02816850319504738, 0.046499043703079224, -0.07193573564291, -0.04265397787094116, -0.09111519157886505, -0.05901818349957466, 0.002178864786401391, -0.019580181688070297, 0.06816893070936203, -0.07078047841787338, -0.017476174980401993, -0.020349308848381042, -0.03017335757613182, -0.056256573647260666, 0.07208837568759918, 0.04627789556980133, -0.05778035894036293, 0.009054954163730145, -0.05078809708356857, -0.030126383528113365, -0.01770978607237339, 0.05648251250386238, -0.011347325518727303, -0.009192736819386482, -0.05978310480713844, -0.03569062054157257, 0.011671006679534912, 0.036661822348833084, -0.006404300220310688, 0.008922935463488102, 0.00011137563706142828, -0.13151748478412628, -0.07537121325731277, 0.02345983497798443, 0.011947175487875938, -0.08289974927902222, -0.00612724618986249, 0.0034211010206490755, -0.013315016403794289, 0.018085362389683723, -0.043150417506694794, 0.020282180979847908, -0.02376563288271427, -0.011361380107700825, -0.06946147233247757, 0.0904441773891449, -0.037295788526535034, -0.004718564450740814, -0.06130305305123329, -0.008120149374008179, -0.025555847212672234, 0.02290901355445385, 0.04118911176919937, 0.013864165171980858, -0.03630894050002098, -0.021835148334503174, -0.025755418464541435, -0.09904995560646057, 0.005587873514741659, -0.04212190583348274, -0.08172543346881866, 0.09352261573076248, -0.00702208885923028, -0.018957749009132385, 0.06059938296675682, -0.005668232683092356, 0.045666925609111786, -0.03518437594175339, 0.021980563178658485, -0.0053384993225336075, 0.06062920764088631, 0.049509115517139435, -0.051550619304180145, -0.000020184928871458396, 0.0209948793053627, -0.05272666737437248, 0.06347057968378067, 0.047610826790332794, -0.028644731268286705, -0.03635197877883911, 0.05606258660554886, 0.0763409286737442, -0.05820359289646149, 0.03675263747572899, -0.013795719482004642, -0.05313161760568619, 0.04868941754102707, -0.08684059232473373, -0.009312961250543594, -0.11851492524147034, -0.05152660608291626, -0.11478900164365768, -5.9031085512189024e-33, 0.09600964188575745, 0.02434627339243889, 0.017263593152165413, 0.0555683970451355, 0.020574798807501793, 0.034746553748846054, 0.06046406924724579, 0.04921722784638405, 0.013493346981704235, 0.003991486504673958, 0.005360609386116266, 0.02687605656683445, 0.0635807067155838, 0.09641098976135254, -0.08657685667276382, 0.050115641206502914, -0.11433560401201248, 0.03256755322217941, 0.05910268798470497, -0.020033905282616615, 0.0033648491371423006, -0.020056361332535744, 0.061756737530231476, 0.061762742698192596, -0.04409138858318329, -0.05163653567433357, 0.058791324496269226, 0.046051301062107086, -0.043134547770023346, -0.0151370232924819, 0.02052154950797558, -0.007344033569097519, -0.005383169278502464, 0.0861668512225151, 0.012876981869339943, -0.05898018181324005, -0.033004846423864365, 0.01691492833197117, -0.02188904397189617, 0.0320439450442791, 0.03555586189031601, 0.0022536746691912413, -0.03514742851257324, -0.028048448264598846, -0.05575937777757645, -0.04348576068878174, 0.06968141347169876, -0.01661987043917179, -0.046519823372364044, -0.1064101979136467, 0.03463875129818916, -0.024166138842701912, -0.07827465981245041, 0.03155513480305672, -0.05107010155916214, 0.0022089763078838587, -0.034655261784791946, 0.010360371321439743, -0.07971098273992538, 0.013445223681628704, 0.046348802745342255, -0.08668733388185501, 0.0655258297920227, 0.0086272694170475, 0.0412961021065712, -0.035051580518484116, -0.04417542368173599, 0.029622100293636322, -0.07191440463066101, -0.00625578174367547, 0.000018786466171150096, -0.07354995608329773, 0.040850356221199036, -0.01037965714931488, 0.03258797526359558, -0.004239299800246954, 0.025621211156249046, -0.026538526639342308, 0.11485741287469864, -0.010178020223975182, 0.004834265913814306, 0.08001481741666794, -0.03830178827047348, 0.012505601160228252, 0.031799737364053726, 0.0572940930724144, 0.08380410820245743, 0.1451985239982605, 0.04893422871828079, 0.06362422555685043, 0.001665700227022171, 0.00420766044408083, 0.0009731792961247265, 0.11869335919618607, -0.006956796627491713, -5.65257813889275e-8, 0.042626362293958664, 0.07268248498439789, -0.030887022614479065, 0.03561631217598915, -0.025540761649608612, 0.04585670679807663, 0.04832984507083893, -0.029894951730966568, -0.0686556026339531, -0.05261910706758499, -0.07295897603034973, 0.12095345556735992, -0.11026667058467865, 0.07054626941680908, -0.025510407984256744, 0.025456372648477554, -0.06106462702155113, 0.06043735146522522, 0.03942849859595299, -0.05583162605762482, -0.05677597597241402, -0.01241752877831459, 0.07073844224214554, 0.04801211133599281, 0.016594504937529564, 0.09337425231933594, 0.0009859232231974602, -0.019849296659231186, -0.005949965678155422, 0.017067503184080124, 0.0025379096623510122, -0.03875942528247833, -0.09898260235786438, 0.0397949181497097, 0.007787264417856932, -0.056348465383052826, -0.1529845893383026, 0.038742516189813614, 0.07168694585561752, 0.005132489837706089, 0.007384164724498987, -0.005440030712634325, -0.055369459092617035, -0.016131063923239708, -0.022387737408280373, 0.07103520631790161, 0.03792180120944977, 0.04449352249503136, -0.044515460729599, 0.024814188480377197, -0.01332609448581934, -0.1023944690823555, 0.024417640641331673, 0.07660672068595886, -0.06279569119215012, -0.04230446368455887, 0.03365113586187363, 0.0021753243636339903, 0.025741849094629288, 0.004104621708393097, 0.007390012964606285, 0.04102998226881027, 0.045985665172338486, 0.01036650687456131 ]
0.05997
Sidecar Container writes a file in HTML that has its content based on a ConfigMap. The web server container serves the HTML via HTTP. {{% code\_sample file="deployments/deployment-with-configmap-and-sidecar-container.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-configmap-and-sidecar-container.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=configmap-sidecar-container ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE configmap-sidecar-container-5fb59f558b-87rp7 2/2 Running 0 94s configmap-sidecar-container-5fb59f558b-ccs7s 2/2 Running 0 94s configmap-sidecar-container-5fb59f558b-wnmgk 2/2 Running 0 94s ``` Expose the Deployment (the `kubectl` tool creates a {{}} for you): ```shell kubectl expose deployment configmap-sidecar-container --name=configmap-sidecar-service --port=8081 --target-port=80 ``` Use `kubectl` to forward the port: ```shell # this stays running in the background kubectl port-forward service/configmap-sidecar-service 8081:8081 & ``` Access the service. ```shell curl http://localhost:8081 ``` You should see an output similar to: ``` Sat Feb 17 13:09:05 UTC 2024 My preferred color is blue ``` Edit the ConfigMap: ```shell kubectl edit configmap color ``` In the editor that appears, change the value of key `color` from `blue` to `green`. Save your changes. The kubectl tool updates the ConfigMap accordingly (if you see an error, try again). Here's an example of how that manifest could look after you edit it: ```yaml apiVersion: v1 data: color: green kind: ConfigMap # You can leave the existing metadata as they are. # The values you'll see won't exactly match these. metadata: creationTimestamp: "2024-02-17T12:20:30Z" name: color namespace: default resourceVersion: "1054" uid: e40bb34c-58df-4280-8bea-6ed16edccfaa ``` Loop over the service URL for few seconds. ```shell # Cancel this when you're happy with it (Ctrl-C) while true; do curl --connect-timeout 7.5 http://localhost:8081; sleep 10; done ``` You should see the output change as follows: ``` Sat Feb 17 13:12:35 UTC 2024 My preferred color is blue Sat Feb 17 13:12:45 UTC 2024 My preferred color is blue Sat Feb 17 13:12:55 UTC 2024 My preferred color is blue Sat Feb 17 13:13:05 UTC 2024 My preferred color is blue Sat Feb 17 13:13:15 UTC 2024 My preferred color is green Sat Feb 17 13:13:25 UTC 2024 My preferred color is green Sat Feb 17 13:13:35 UTC 2024 My preferred color is green ``` ## Update configuration via an immutable ConfigMap that is mounted as a volume {#rollout-configmap-immutable-volume} {{< note >}} Immutable ConfigMaps are especially used for configuration that is constant and is \*\*not\*\* expected to change over time. Marking a ConfigMap as immutable allows a performance improvement where the kubelet does not watch for changes. If you do need to make a change, you should plan to either: - change the name of the ConfigMap, and switch to running Pods that reference the new name - replace all the nodes in your cluster that have previously run a Pod that used the old value - restart the kubelet on any node where the kubelet previously loaded the old ConfigMap {{< /note >}} An example manifest for an [Immutable ConfigMap](/docs/concepts/configuration/configmap/#configmap-immutable) is shown below. {{% code\_sample file="configmap/immutable-configmap.yaml" %}} Create the Immutable ConfigMap: ```shell kubectl apply -f https://k8s.io/examples/configmap/immutable-configmap.yaml ``` Below is an example of a Deployment manifest with the Immutable ConfigMap `company-name-20150801` mounted as a {{< glossary\_tooltip text="volume" term\_id="volume" >}} into the Pod's only container. {{% code\_sample file="deployments/deployment-with-immutable-configmap-as-volume.yaml" %}} Create the Deployment: ```shell kubectl apply -f https://k8s.io/examples/deployments/deployment-with-immutable-configmap-as-volume.yaml ``` Check the pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=immutable-configmap-volume ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE immutable-configmap-volume-78b6fbff95-5gsfh 1/1 Running 0 62s immutable-configmap-volume-78b6fbff95-7vcj4 1/1 Running 0 62s immutable-configmap-volume-78b6fbff95-vdslm 1/1 Running 0 62s
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.010242336429655552, 0.03972792625427246, 0.05221619829535484, 0.02130243368446827, 0.00011447988072177395, -0.03232221305370331, 0.00874950923025608, -0.058095116168260574, -0.010485596023499966, 0.030124157667160034, 0.07222922891378403, -0.08666594326496124, -0.03563934564590454, -0.06536557525396347, 0.04905449599027634, 0.019379306584596634, 0.06984533369541168, -0.007521471474319696, 0.0010988815920427442, -0.015005018562078476, -0.020647985860705376, 0.0383467972278595, 0.01065925695002079, 0.03471808135509491, -0.08384007960557938, 0.054017357528209686, -0.02161702886223793, 0.035851724445819855, 0.016399411484599113, 0.013232639990746975, -0.03375479206442833, 0.018696879968047142, -0.05744245648384094, 0.04922354966402054, 0.08374012261629105, 0.10097470134496689, -0.008774343878030777, -0.023394417017698288, 0.0027885623276233673, 0.008626976050436497, 0.023296533152461052, -0.04469970613718033, -0.1084522008895874, 0.03211800754070282, 0.020786862820386887, -0.09084226191043854, -0.07552573829889297, -0.03839634731411934, -0.003343432443216443, 0.029472719877958298, -0.015375226736068726, -0.09014669060707092, 0.01545465737581253, -0.013797374442219734, -0.016377145424485207, 0.01685648038983345, -0.07766631990671158, 0.0900317057967186, 0.1520264595746994, 0.05486467853188515, 0.010083627887070179, -0.013563255779445171, 0.043219197541475296, -0.04148080199956894, 0.02664381079375744, -0.04265708476305008, -0.0001985931012313813, -0.026898594573140144, -0.030088700354099274, 0.0071329777128994465, 0.05255750194191933, -0.030321715399622917, 0.037428468465805054, -0.06401928514242172, 0.00232332618907094, -0.037638530135154724, -0.00784261990338564, 0.08672471344470978, -0.04353107884526253, -0.06840034574270248, 0.06369657069444656, 0.04902932792901993, 0.08666322380304337, 0.06505616754293442, -0.06038710102438927, -0.03625541925430298, 0.0129013666883111, -0.02126244828104973, -0.010358604602515697, -0.03060481883585453, -0.02098420448601246, -0.1266779899597168, -0.020183894783258438, -0.16788546741008759, 0.03116358257830143, 0.011348738335072994, -0.07337003946304321, 0.062188662588596344, -0.02213178016245365, -0.04791892692446709, 0.012829500250518322, -0.0567527674138546, -0.0011022918624803424, -0.029987161979079247, 0.0365864560008049, 0.00535684684291482, -0.049317583441734314, 0.00024037313414737582, 0.05248445272445679, 0.03193209692835808, -0.0485287569463253, 0.07917244732379913, -0.0123571353033185, 0.02086910605430603, -0.06580851972103119, -0.03823794797062874, -0.03577969968318939, -0.018800947815179825, 0.06527016311883926, 0.07394281774759293, 0.0600353367626667, -0.07422851026058197, -0.0027089340146631002, 0.00019054034783039242, -0.029901714995503426, 0.0026979250833392143, 0.03380256146192551, 3.23812988010634e-33, 0.06886022537946701, -0.09327071905136108, -0.02030392363667488, 0.05360634624958038, 0.00931636430323124, -0.06928959488868713, -0.016368500888347626, -0.04409348592162132, -0.1072094663977623, 0.025245292112231255, 0.01228784117847681, 0.07308086007833481, -0.06781138479709625, -0.013745029456913471, -0.02320089191198349, -0.00015613030700478703, -0.10791294276714325, 0.029467323794960976, 0.040323395282030106, -0.057778529822826385, -0.018945977091789246, -0.07190103828907013, -0.05237424001097679, -0.0336160883307457, 0.03407498821616173, 0.01659255102276802, 0.026838621124625206, -0.06862988322973251, -0.0037308300379663706, 0.022525163367390633, 0.07854735106229782, -0.014943823218345642, 0.04785118252038956, 0.00831824541091919, -0.11338421702384949, -0.09023089706897736, 0.03058238886296749, -0.005101652350276709, -0.09620977938175201, 0.0013729612110182643, 0.020821498706936836, -0.010718769393861294, -0.023755213245749474, -0.09467487037181854, -0.017383093014359474, -0.0025309566408395767, 0.017480989918112755, -0.06420838087797165, 0.09495152533054352, -0.02764655463397503, -0.04379161074757576, -0.02786453813314438, 0.008199301548302174, -0.00947947334498167, 0.013766590505838394, 0.0392911434173584, 0.018220754340291023, -0.020626170560717583, -0.0501718670129776, -0.006097877398133278, -0.0862092524766922, 0.02689150534570217, -0.03201540559530258, -0.08118903636932373, 0.055692754685878754, -0.016090625897049904, -0.017548272386193275, -0.0014766084495931864, -0.00996784120798111, -0.010711833834648132, -0.029793744906783104, -0.006152359303086996, 0.017645014449954033, 0.05368642136454582, 0.030588844791054726, -0.03884744271636009, -0.007420773152261972, 0.0729309469461441, -0.06111505627632141, 0.013182878494262695, 0.023093441501259804, -0.05620071291923523, -0.01962856575846672, 0.04620940610766411, 0.08049356192350388, -0.08919020742177963, -0.023180680349469185, -0.03809544816613197, -0.04930107295513153, 0.05924387276172638, -0.07339297980070114, -0.0028365608304739, -0.12122274935245514, -0.02566375769674778, -0.11213378608226776, -5.3810773874904786e-33, 0.06888540089130402, -0.0190118458122015, -0.015226026996970177, 0.057655636221170425, -0.010697783902287483, 0.036700423806905746, 0.07190381735563278, 0.08199924975633621, 0.023575911298394203, -0.012430880218744278, 0.01430265512317419, 0.050907768309116364, 0.018542999401688576, 0.06630754470825195, -0.03135180100798607, 0.07599591463804245, -0.11167339980602264, 0.0021919135469943285, 0.0407920703291893, -0.020429503172636032, -0.007416494656354189, -0.006342980079352856, 0.0756576657295227, 0.08900917321443558, 0.009288675151765347, -0.002019618870690465, 0.07799987494945526, 0.06592676043510437, -0.014218275435268879, -0.03586089238524437, 0.006597728002816439, -0.01753818802535534, -0.018735984340310097, 0.08716417849063873, -0.024504389613866806, -0.05623500794172287, -0.06266023963689804, 0.027364017441868782, -0.014981585554778576, 0.04109115153551102, 0.04904406517744064, -0.015794696286320686, -0.08501990884542465, -0.032916173338890076, -0.07187774777412415, -0.041133321821689606, 0.05122179910540581, 0.0029978868551552296, 0.025474239140748978, -0.0974075049161911, 0.06376425921916962, 0.010785387828946114, -0.05569102615118027, 0.03884720429778099, -0.018597766757011414, 0.040443237870931625, -0.009529964998364449, -0.04458913207054138, -0.06206478551030159, 0.011368724517524242, 0.06754697859287262, -0.03418717533349991, 0.07097671180963516, -0.03872087597846985, 0.0005537989200092852, -0.032088503241539, -0.02053682878613472, -0.027976423501968384, -0.0000450508450740017, -0.052988238632678986, 0.022596489638090134, -0.055463794618844986, 0.04020919278264046, 0.007846119813621044, -0.0007707385229878128, 0.026052061468362808, 0.06201612576842308, -0.07212047278881073, 0.08458857238292694, -0.002182610332965851, 0.025043554604053497, 0.04250229895114899, -0.03818465396761894, 0.044882260262966156, 0.06054634228348732, 0.02602950669825077, -0.0213102325797081, 0.15779323875904083, 0.05655887350440025, 0.046071141958236694, 0.010971875861287117, 0.013746976852416992, -0.017654720693826675, 0.13659507036209106, -0.001562811667099595, -5.479328279989204e-8, -0.006948062684386969, 0.04094448313117027, -0.020304078236222267, 0.021471822634339333, -0.03660615533590317, 0.04028281196951866, 0.11861805617809296, -0.015520384535193443, -0.09070547670125961, -0.03384224325418472, -0.05163855850696564, 0.10034087300300598, -0.10738975554704666, 0.10995765775442123, -0.023387299850583076, 0.00610688840970397, -0.03282752260565758, 0.09224333614110947, 0.03355684503912926, -0.058041904121637344, -0.06415868550539017, -0.04230920970439911, 0.04723457619547844, 0.0386761873960495, 0.01234221737831831, 0.04809914156794548, 0.03282906860113144, 0.016690568998456, 0.006460228003561497, 0.005698390770703554, -0.027487412095069885, -0.03969607874751091, -0.0614316426217556, 0.05366017296910286, 0.0017011933960020542, -0.029239997267723083, -0.1407105028629303, 0.0631953626871109, 0.04868205264210701, -0.005458784755319357, -0.0027674150187522173, 0.02599700167775154, -0.05958125367760658, -0.03510308638215065, 0.015981994569301605, 0.05422515794634819, 0.01959334872663021, 0.04962996765971184, -0.044779546558856964, -0.009049047715961933, -0.020761637017130852, -0.11316601186990738, 0.025402525439858437, 0.08348004519939423, -0.01871766336262226, -0.0138174369931221, 0.04059214144945145, -0.008934049867093563, 0.08791258186101913, -0.017637545242905617, -0.0049495394341647625, 0.06069130450487137, 0.04848335310816765, 0.03650781139731407 ]
0.061055
pods for this Deployment to ensure they are ready (matching by {{< glossary\_tooltip text="selector" term\_id="selector" >}}): ```shell kubectl get pods --selector=app.kubernetes.io/name=immutable-configmap-volume ``` You should see an output similar to: ``` NAME READY STATUS RESTARTS AGE immutable-configmap-volume-78b6fbff95-5gsfh 1/1 Running 0 62s immutable-configmap-volume-78b6fbff95-7vcj4 1/1 Running 0 62s immutable-configmap-volume-78b6fbff95-vdslm 1/1 Running 0 62s ``` The Pod's container refers to the data defined in the ConfigMap and uses it to print a report to stdout. You can check this report by viewing the logs for one of the Pods in that Deployment: ```shell # Pick one Pod that belongs to the Deployment, and view its logs kubectl logs deployments/immutable-configmap-volume ``` You should see an output similar to: ``` Found 3 pods, using pod/immutable-configmap-volume-78b6fbff95-5gsfh Wed Mar 20 03:52:34 UTC 2024 The name of the company is ACME, Inc. Wed Mar 20 03:52:44 UTC 2024 The name of the company is ACME, Inc. Wed Mar 20 03:52:54 UTC 2024 The name of the company is ACME, Inc. ``` {{< note >}} Once a ConfigMap is marked as immutable, it is not possible to revert this change nor to mutate the contents of the data or the binaryData field. In order to modify the behavior of the Pods that use this configuration, you will create a new immutable ConfigMap and edit the Deployment to define a slightly different pod template, referencing the new ConfigMap. {{< /note >}} Create a new immutable ConfigMap by using the manifest shown below: {{% code\_sample file="configmap/new-immutable-configmap.yaml" %}} ```shell kubectl apply -f https://k8s.io/examples/configmap/new-immutable-configmap.yaml ``` You should see an output similar to: ``` configmap/company-name-20240312 created ``` Check the newly created ConfigMap: ```shell kubectl get configmap ``` You should see an output displaying both the old and new ConfigMaps: ``` NAME DATA AGE company-name-20150801 1 22m company-name-20240312 1 24s ``` Modify the Deployment to reference the new ConfigMap. Edit the Deployment: ```shell kubectl edit deployment immutable-configmap-volume ``` In the editor that appears, update the existing volume definition to use the new ConfigMap. ```yaml volumes: - configMap: defaultMode: 420 name: company-name-20240312 # Update this field name: config-volume ``` You should see the following output: ``` deployment.apps/immutable-configmap-volume edited ``` This will trigger a rollout. Wait for all the previous Pods to terminate and the new Pods to be in a ready state. Monitor the status of the Pods: ```shell kubectl get pods --selector=app.kubernetes.io/name=immutable-configmap-volume ``` ``` NAME READY STATUS RESTARTS AGE immutable-configmap-volume-5fdb88fcc8-29v8n 1/1 Running 0 13s immutable-configmap-volume-5fdb88fcc8-52ddd 1/1 Running 0 14s immutable-configmap-volume-5fdb88fcc8-n5jx4 1/1 Running 0 15s immutable-configmap-volume-78b6fbff95-5gsfh 1/1 Terminating 0 32m immutable-configmap-volume-78b6fbff95-7vcj4 1/1 Terminating 0 32m immutable-configmap-volume-78b6fbff95-vdslm 1/1 Terminating 0 32m ``` You should eventually see an output similar to: ``` NAME READY STATUS RESTARTS AGE immutable-configmap-volume-5fdb88fcc8-29v8n 1/1 Running 0 43s immutable-configmap-volume-5fdb88fcc8-52ddd 1/1 Running 0 44s immutable-configmap-volume-5fdb88fcc8-n5jx4 1/1 Running 0 45s ``` View the logs for a Pod in this Deployment: ```shell # Pick one Pod that belongs to the Deployment, and view its logs kubectl logs deployment/immutable-configmap-volume ``` You should see an output similar to the below: ``` Found 3 pods, using pod/immutable-configmap-volume-5fdb88fcc8-n5jx4 Wed Mar 20 04:24:17 UTC 2024 The name of the company is Fiktivesunternehmen GmbH Wed Mar 20 04:24:27 UTC 2024 The name of the company is Fiktivesunternehmen GmbH Wed Mar 20 04:24:37 UTC 2024 The name of the company is Fiktivesunternehmen GmbH ``` Once all the deployments have migrated to use the new immutable ConfigMap, it is advised to delete the old one. ```shell kubectl delete configmap company-name-20150801 ``` ## Summary Changes to a ConfigMap mounted as a Volume on a Pod are available seamlessly after the subsequent kubelet sync. Changes to a ConfigMap that configures environment variables for a Pod are available after
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.03214607015252113, -0.01438036747276783, 0.06564964354038239, -0.005132684949785471, -0.0015785866416990757, -0.03525257483124733, 0.03009023331105709, -0.009831377305090427, 0.012272242456674576, 0.044170837849378586, 0.03575041890144348, -0.09507907181978226, 0.009203223511576653, -0.038177892565727234, -0.036365412175655365, 0.006405982654541731, 0.05160536617040634, -0.014830370433628559, -0.013505036942660809, -0.036990683525800705, 0.039782941341400146, 0.0841599702835083, 0.03436115384101868, 0.019672956317663193, -0.051424890756607056, 0.0614464245736599, -0.09603463113307953, -0.038343608379364014, -0.013428761623799801, -0.031082281842827797, -0.0886618122458458, 0.05773945152759552, 0.022791070863604546, 0.06842347979545593, 0.09962154924869537, 0.07314573228359222, 0.006381325889378786, -0.03710778430104256, -0.008666773326694965, -0.027233321219682693, 0.014264396391808987, -0.08181938529014587, -0.07567638903856277, -0.005945570766925812, -0.04136551171541214, 0.010493946261703968, -0.039110030978918076, -0.064727284014225, 0.0292721688747406, 0.05226271227002144, -0.023981474339962006, -0.08679470419883728, 0.019229117780923843, 0.041485872119665146, 0.060726817697286606, 0.05366702005267143, -0.04696713760495186, 0.06411825120449066, 0.1327309012413025, 0.02556542120873928, 0.01665581576526165, -0.01483731810003519, 0.04057353734970093, -0.03186266869306564, 0.0165422186255455, -0.046065378934144974, 0.018492408096790314, -0.016928870230913162, 0.03682276979088783, -0.028810691088438034, 0.06211112439632416, 0.042554933577775955, 0.004259319975972176, -0.04047001898288727, -0.05842876434326172, 0.048688896000385284, 0.0143557945266366, 0.06344985216856003, -0.02740071527659893, -0.04516875743865967, -0.00027577715809457004, 0.06254737824201584, 0.04663778468966484, 0.04318244382739067, -0.03230082616209984, -0.014219139702618122, 0.008180920034646988, -0.00518704392015934, -0.023715443909168243, 0.0162767693400383, -0.027347145602107048, -0.07012117654085159, -0.0031696264632046223, -0.11816640198230743, 0.042910028249025345, 0.019805777817964554, -0.009349147789180279, 0.03426501154899597, 0.03773793205618858, -0.005243790335953236, 0.013300557620823383, -0.03261009603738785, 0.004459777846932411, -0.030805213376879692, 0.02448541484773159, -0.07972131669521332, -0.06103893741965294, -0.05251012369990349, -0.03367568552494049, 0.04103609547019005, 0.01947009563446045, -0.02127978764474392, -0.012549432925879955, 0.052139006555080414, 0.0220781359821558, 0.005951430182904005, -0.07435808330774307, 0.012374968267977238, 0.03273686394095421, 0.06592049449682236, 0.031818315386772156, -0.0771113708615303, 0.016315031796693802, -0.011255046352744102, -0.04819437116384506, 0.0843287855386734, 0.03375374898314476, 5.506159904651555e-33, 0.05959703028202057, -0.10375990718603134, -0.004036892205476761, 0.06639698147773743, 0.027394073083996773, -0.051023900508880615, -0.05209776386618614, -0.03469565510749817, -0.03516526520252228, -0.019183939322829247, -0.0928812026977539, 0.12550561130046844, -0.0900505930185318, -0.04560044780373573, -0.004733047913759947, -0.05303595960140228, -0.08682739734649658, 0.06944173574447632, 0.014622622169554234, -0.04229874163866043, 0.04430752620100975, -0.06554511189460754, -0.07114176452159882, 0.010574445128440857, 0.07768148183822632, -0.02934129536151886, 0.012087594717741013, -0.07728114724159241, -0.01899123005568981, 0.03057810105383396, -0.059215907007455826, 0.019809020683169365, 0.01455416064709425, -0.031088363379240036, -0.17258334159851074, -0.059788621962070465, -0.042057108134031296, -0.00033534085378050804, -0.0943058654665947, -0.014093631878495216, 0.02855769358575344, 0.0029943399131298065, -0.02872939221560955, -0.06401671469211578, 0.03569703549146652, 0.021143658086657524, 0.0035566985607147217, -0.046179186552762985, 0.08979975432157516, 0.015010131523013115, -0.00409374525770545, -0.019874639809131622, 0.00282730208709836, -0.06833916157484055, 0.017555536702275276, 0.009097836911678314, 0.07063674926757812, -0.06272706389427185, -0.061508383601903915, -0.009881095960736275, -0.0504838228225708, 0.0447237491607666, -0.007332381792366505, -0.008957783691585064, 0.05550660565495491, 0.03843596950173378, -0.000399638491217047, 0.03100617416203022, 0.024220924824476242, 0.03465152904391289, -0.04977820813655853, -0.013049845583736897, -0.029188718646764755, -0.0010890222620218992, 0.033239759504795074, -0.05034280940890312, 0.00453380448743701, 0.007752750068902969, -0.14212936162948608, 0.029918614774942398, 0.043185558170080185, 0.01356931496411562, -0.10405474156141281, 0.04703015461564064, 0.04226407781243324, -0.029661525040864944, 0.0170453954488039, 0.004231143742799759, -0.10094626247882843, 0.0517285093665123, -0.007596478331834078, -0.0045534963719546795, -0.11159514635801315, -0.026054905727505684, -0.1272505223751068, -7.261041094656747e-33, 0.11942070722579956, -0.010926437564194202, 0.04371710121631622, 0.0526299849152565, -0.014293793588876724, 0.03511333465576172, 0.01508838590234518, 0.09073744714260101, -0.004737500101327896, -0.04734033718705177, -0.01920914649963379, 0.010191990062594414, 0.03098573163151741, 0.03471891209483147, -0.11480815708637238, 0.027093665674328804, -0.12032966315746307, 0.001442980719730258, 0.030957795679569244, 0.03353511542081833, -0.006504601798951626, 0.021759334951639175, 0.03872563689947128, 0.07451733946800232, -0.065861776471138, 0.0015150199178606272, 0.03567122295498848, 0.024487512186169624, -0.010263456031680107, -0.05297135189175606, 0.008000871166586876, -0.06607859581708908, -0.04178459942340851, 0.041513241827487946, 0.00955221988260746, -0.07646550238132477, -0.03891519084572792, 0.0025489700492471457, -0.019271597266197205, 0.02743159979581833, 0.03923344984650612, 0.017677804455161095, -0.07780212163925171, -0.014636067673563957, -0.07869106531143188, -0.03771907463669777, 0.06048104912042618, -0.03246360272169113, 0.041227564215660095, -0.09399006515741348, 0.05415751412510872, -0.007556202355772257, -0.0534529834985733, 0.05773966759443283, -0.04202307388186455, 0.038962945342063904, -0.05410359799861908, 0.002161649987101555, -0.09368408471345901, 0.04359300062060356, 0.05154326185584068, -0.08398611098527908, 0.09889281541109085, -0.02194867469370365, -0.05157007277011871, -0.05536624416708946, 0.016330910846590996, 0.028890015557408333, -0.047218047082424164, 0.009006558917462826, 0.0769602507352829, -0.08157552778720856, 0.024998582899570465, -0.017356552183628082, 0.046330664306879044, -0.058006081730127335, -0.006626353599131107, -0.04585282504558563, 0.06832055747509003, -0.0060777743346989155, -0.036315567791461945, 0.11940963566303253, -0.06482645869255066, 0.06606368720531464, 0.0641854777932167, 0.037830743938684464, 0.06419297307729721, 0.11020220071077347, 0.11815241724252701, 0.10288523137569427, 0.028710370883345604, 0.023908831179142, -0.06464563310146332, 0.09935969859361649, -0.030403507873415947, -5.8634640254240367e-8, 0.0660126656293869, 0.04192720726132393, -0.010627335868775845, 0.0739794597029686, 0.019514238461852074, 0.012916616164147854, 0.05255972594022751, 0.021009569987654686, -0.048758991062641144, 0.019292157143354416, -0.023344101384282112, 0.059120871126651764, -0.10622954368591309, 0.05181804671883583, 0.026634303852915764, 0.028233354911208153, -0.0794166624546051, 0.050303395837545395, 0.00018967852520290762, -0.09713791310787201, -0.08248693495988846, -0.032285768538713455, 0.05624328926205635, 0.021768834441900253, -0.01787571981549263, 0.05381902679800987, 0.049771036952733994, -0.02849648892879486, 0.012659714557230473, 0.018083158880472183, -0.0429152175784111, -0.006758742034435272, -0.04647664725780487, 0.01192203164100647, -0.01689901202917099, -0.007488443050533533, -0.10387357324361801, 0.06340914964675903, 0.04578248783946037, 0.003681866219267249, -0.03827745467424393, -0.012024027295410633, -0.05494267866015434, -0.005752923898398876, -0.047031667083501816, 0.025814061984419823, -0.014806877821683884, 0.05258233845233917, -0.09356161952018738, 0.049220502376556396, -0.02815278433263302, -0.05299368128180504, 0.0295705646276474, 0.1003827452659607, -0.04623686894774437, 0.022442197427153587, 0.009324184618890285, -0.011330552399158478, 0.04622531309723854, 0.054138462990522385, 0.013987169601023197, 0.009856527671217918, 0.04278719797730446, 0.0072140260599553585 ]
0.155138
ConfigMap, it is advised to delete the old one. ```shell kubectl delete configmap company-name-20150801 ``` ## Summary Changes to a ConfigMap mounted as a Volume on a Pod are available seamlessly after the subsequent kubelet sync. Changes to a ConfigMap that configures environment variables for a Pod are available after the subsequent rollout for the Pod. Once a ConfigMap is marked as immutable, it is not possible to revert this change (you cannot make an immutable ConfigMap mutable), and you also cannot make any change to the contents of the `data` or the `binaryData` field. You can delete and recreate the ConfigMap, or you can make a new different ConfigMap. When you delete a ConfigMap, running containers and their Pods maintain a mount point to any volume that referenced that existing ConfigMap. ## {{% heading "cleanup" %}} Terminate the `kubectl port-forward` commands in case they are running. Delete the resources created during the tutorial: ```shell kubectl delete deployment configmap-volume configmap-env-var configmap-two-containers configmap-sidecar-container immutable-configmap-volume kubectl delete service configmap-service configmap-sidecar-service kubectl delete configmap sport fruits color company-name-20240312 kubectl delete configmap company-name-20150801 # In case it was not handled during the task execution ```
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/updating-configuration-via-a-configmap.md
[ 0.03024832345545292, 0.04068386182188988, 0.055146899074316025, -0.043946925550699234, -0.010529923252761364, -0.06970266252756119, 0.0052721803076565266, -0.04978061839938164, 0.03439394012093544, 0.02858636900782585, 0.03535747900605202, -0.047402311116456985, 0.03592236712574959, -0.045690879225730896, -0.0009745871066115797, 0.018374383449554443, -0.04218814894556999, 0.008679650723934174, -0.009537693113088608, 0.02826479636132717, -0.07879883050918579, 0.04810873419046402, -0.02824869193136692, 0.02518157660961151, 0.0034145605750381947, 0.007090504746884108, -0.03221042454242706, 0.006816071458160877, -0.051482126116752625, -0.059232961386442184, -0.0524287186563015, 0.0572364442050457, 0.018914788961410522, 0.030553258955478668, 0.08291952311992645, 0.13102474808692932, 0.0070736343041062355, -0.008671866729855537, -0.02263532765209675, -0.0031761545687913895, 0.03093716688454151, 0.008006591349840164, -0.13336090743541718, -0.005094938445836306, -0.06105910241603851, 0.07725507020950317, -0.006928295828402042, -0.08203532546758652, 0.018793735653162003, 0.02072170004248619, -0.014013823121786118, -0.0057683358900249004, 0.0332016758620739, 0.05160147324204445, 0.07510494440793991, 0.029855115339159966, -0.03076194040477276, 0.10668828338384628, 0.10056911408901215, 0.06859362870454788, 0.013772130012512207, 0.03178196772933006, 0.04481693357229233, -0.030756965279579163, 0.0015081270830705762, -0.02473633363842964, 0.014169910922646523, -0.044082701206207275, 0.0753602609038353, 0.04804456979036331, 0.050645310431718826, 0.004824919160455465, -0.002754468936473131, -0.057365864515304565, 0.006680627819150686, 0.08723746985197067, -0.015353713184595108, 0.04228885471820831, -0.049180660396814346, -0.04389490559697151, -0.02179386466741562, 0.033941660076379776, 0.022935133427381516, -0.05376416817307472, -0.056101106107234955, -0.04193466529250145, -0.044128358364105225, -0.05953320488333702, 0.02158551663160324, 0.021753527224063873, -0.023824701085686684, -0.097959965467453, 0.048455167561769485, -0.0930313989520073, 0.09301329404115677, -0.03981493413448334, -0.040720727294683456, 0.04977443814277649, 0.03253306820988655, 0.03211899846792221, -0.011794314719736576, -0.01016170158982277, -0.01580895483493805, 0.04002036526799202, 0.009412712417542934, -0.11501649022102356, 0.00473283976316452, -0.012734522111713886, -0.07678945362567902, 0.06589081883430481, 0.02266865409910679, 0.02842073328793049, 0.0016370656667277217, 0.013882129453122616, 0.005693059880286455, 0.050699155777692795, -0.027898499742150307, 0.06318680197000504, -0.04275333136320114, 0.06357379257678986, 0.05164046958088875, -0.07504124194383621, 0.023605478927493095, 0.04877785965800285, -0.13678833842277527, 0.029720835387706757, 0.022414593026041985, 2.8804326429518795e-33, 0.04174922779202461, -0.08183396607637405, 0.00014134513912722468, 0.013776427134871483, 0.06438428163528442, 0.004153321031481028, -0.0026610377244651318, 0.023834072053432465, -0.02892887592315674, -0.04218688979744911, -0.021371398121118546, 0.09587737917900085, -0.060190409421920776, -0.023484183475375175, -0.020925400778651237, -0.046712808310985565, -0.06782828271389008, 0.05431968346238136, 0.02837705798447132, -0.04166017100214958, 0.0633465126156807, 0.03430285304784775, -0.06352552771568298, -0.008712227456271648, 0.024851184338331223, 0.009273948147892952, 0.030825119465589523, -0.03908827155828476, -0.017760299146175385, 0.017939463257789612, -0.02911400981247425, 0.030362926423549652, -0.0254941675812006, 0.061724819242954254, -0.1590869128704071, -0.040336739271879196, 0.011674070730805397, -0.013590157963335514, -0.14575977623462677, 0.023156234994530678, 0.0644257664680481, 0.043489132076501846, -0.026455286890268326, -0.08990561962127686, 0.0495600551366806, -0.03251970186829567, 0.10963790863752365, 0.009909791871905327, 0.062227990478277206, -0.013932997360825539, 0.012696418911218643, -0.002552733989432454, 0.00041863718070089817, -0.10629133880138397, -0.032689642161130905, -0.02391267754137516, 0.1091478168964386, -0.09800846129655838, -0.05251176282763481, -0.04070030152797699, -0.029345562681555748, 0.08750219643115997, 0.03282717987895012, 0.025953667238354683, 0.06099655106663704, 0.04517626017332077, -0.010552813299000263, 0.02514897845685482, -0.0025156985502690077, 0.02123943716287613, -0.06990985572338104, 0.04075859487056732, -0.12492312490940094, 0.06074413284659386, -0.04250452667474747, -0.047168001532554626, -0.016773752868175507, 0.021244797855615616, -0.08508218824863434, 0.010184334591031075, 0.07072709500789642, 0.0640006735920906, -0.06256525218486786, 0.04457873851060867, 0.01087014377117157, -0.025173185393214226, 0.06823711842298508, 0.008519966155290604, -0.051919057965278625, 0.06061446666717529, 0.005349240731447935, 0.0029355171136558056, -0.09321636706590652, 0.010308559983968735, -0.10780995339155197, -4.5486767768946e-33, 0.051160261034965515, -0.04235836863517761, 0.019669797271490097, 0.00620022788643837, -0.029195748269557953, 0.037730563431978226, 0.026296665892004967, 0.11122679710388184, -0.040246494114398956, -0.06210082396864891, -0.016026468947529793, -0.06999853253364563, 0.06420643627643585, -0.006558313500136137, -0.07087410241365433, 0.018792446702718735, -0.13075800240039825, -0.041063498705625534, -0.07208549976348877, 0.001538699958473444, -0.03534553200006485, 0.03872458636760712, 0.06068873032927513, 0.02249893546104431, -0.07993171364068985, -0.02036501094698906, 0.0024264247622340918, 0.06500605493783951, -0.001019864808768034, -0.0440138503909111, -0.02837606705725193, -0.022548526525497437, -0.02176447957754135, 0.0389956533908844, 0.012469233013689518, -0.048605624586343765, -0.03796689584851265, -0.025422031059861183, -0.03337336704134941, -0.0029526297003030777, 0.0061753978952765465, 0.058109499514102936, -0.049613066017627716, 0.009462784044444561, 0.003666345030069351, 0.02285989373922348, 0.025125164538621902, -0.05792735517024994, 0.021493306383490562, -0.11683780699968338, 0.004567145835608244, 0.006232719402760267, 0.0056924414820969105, -0.03498143330216408, -0.060423947870731354, 0.09309405088424683, 0.007357318885624409, 0.06663201749324799, 0.010482828132808208, -0.0511244498193264, 0.060263995081186295, -0.04743340611457825, 0.07209659367799759, 0.05320730805397034, 0.02513548731803894, -0.015756666660308838, 0.023997928947210312, -0.0508074052631855, -0.06893564015626907, -0.00016922612849157304, 0.02549048140645027, -0.046755991876125336, 0.00821810681372881, -0.0065871840342879295, 0.06462512165307999, -0.045747097581624985, -0.06709476560354233, 0.01288691908121109, 0.0294989924877882, 0.024042097851634026, 0.013700444251298904, 0.020514382049441338, -0.04957418143749237, 0.022924117743968964, 0.04983183741569519, 0.015216873027384281, 0.04421867057681084, 0.10088256746530533, 0.047551561146974564, 0.09895108640193939, -0.008271153084933758, -0.011694112792611122, -0.04220478981733322, 0.083213210105896, -0.031021038070321083, -4.7880654108212184e-8, 0.06992887705564499, 0.005578755401074886, -0.058184392750263214, 0.11630982160568237, 0.045957233756780624, -0.013395127840340137, -0.03115483745932579, 0.10092078894376755, -0.033424802124500275, 0.004964667372405529, -0.05022948235273361, 0.08757936954498291, -0.10671530663967133, 0.0424947552382946, -0.0318882018327713, -0.014970448799431324, -0.027521543204784393, -0.023013291880488396, 0.043570440262556076, -0.027608022093772888, -0.06894510984420776, 0.01673344150185585, -0.03200530633330345, -0.003106542397290468, 0.03565216064453125, 0.06907101720571518, 0.06752212345600128, 0.04831086844205856, 0.020085398107767105, -0.016352027654647827, -0.019978532567620277, -0.007651929743587971, -0.004341517109423876, 0.0799754336476326, -0.11715288460254669, -0.036857668310403824, -0.10213282704353333, 0.07197055220603943, -0.012207374908030033, 0.06548089534044266, -0.0022575734183192253, 0.04378015920519829, -0.11073794215917587, 0.01157309953123331, -0.0922745019197464, 0.01347370259463787, -0.004696328192949295, 0.10086174309253693, -0.08095365762710571, 0.014412252232432365, -0.022018447518348694, -0.006761649623513222, -0.0030291248112916946, 0.08575695753097534, -0.02992994152009487, -0.018379563465714455, -0.030612504109740257, -0.04911692813038826, -0.01826709322631359, 0.036648303270339966, -0.042878441512584686, -0.011522936634719372, 0.010262326337397099, -0.0477244071662426 ]
0.095321
This page provides a real world example of how to configure Redis using a ConfigMap and builds upon the [Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) task. ## {{% heading "objectives" %}} \* Create a ConfigMap with Redis configuration values \* Create a Redis Pod that mounts and uses the created ConfigMap \* Verify that the configuration was correctly applied. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* The example shown on this page works with `kubectl` 1.14 and above. \* Understand [Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/). ## Real World Example: Configuring Redis using a ConfigMap Follow the steps below to configure a Redis cache using data stored in a ConfigMap. First create a ConfigMap with an empty configuration block: ```shell cat <./example-redis-config.yaml apiVersion: v1 kind: ConfigMap metadata: name: example-redis-config data: redis-config: "" EOF ``` Apply the ConfigMap created above, along with a Redis pod manifest: ```shell kubectl apply -f example-redis-config.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/config/redis-pod.yaml ``` Examine the contents of the Redis pod manifest and note the following: \* A volume named `config` is created by `spec.volumes[1]` \* The `key` and `path` under `spec.volumes[1].configMap.items[0]` exposes the `redis-config` key from the `example-redis-config` ConfigMap as a file named `redis.conf` on the `config` volume. \* The `config` volume is then mounted at `/redis-master` by `spec.containers[0].volumeMounts[1]`. This has the net effect of exposing the data in `data.redis-config` from the `example-redis-config` ConfigMap above as `/redis-master/redis.conf` inside the Pod. {{% code\_sample file="pods/config/redis-pod.yaml" %}} Examine the created objects: ```shell kubectl get pod/redis configmap/example-redis-config ``` You should see the following output: ``` NAME READY STATUS RESTARTS AGE pod/redis 1/1 Running 0 8s NAME DATA AGE configmap/example-redis-config 1 14s ``` Recall that we left `redis-config` key in the `example-redis-config` ConfigMap blank: ```shell kubectl describe configmap/example-redis-config ``` You should see an empty `redis-config` key: ```shell Name: example-redis-config Namespace: default Labels: Annotations: Data ==== redis-config: ``` Use `kubectl exec` to enter the pod and run the `redis-cli` tool to check the current configuration: ```shell kubectl exec -it pod/redis -- redis-cli ``` Check `maxmemory`: ```shell 127.0.0.1:6379> CONFIG GET maxmemory ``` It should show the default value of 0: ```shell 1) "maxmemory" 2) "0" ``` Similarly, check `maxmemory-policy`: ```shell 127.0.0.1:6379> CONFIG GET maxmemory-policy ``` Which should also yield its default value of `noeviction`: ```shell 1) "maxmemory-policy" 2) "noeviction" ``` Now let's add some configuration values to the `example-redis-config` ConfigMap: {{% code\_sample file="pods/config/example-redis-config.yaml" %}} Apply the updated ConfigMap: ```shell kubectl apply -f example-redis-config.yaml ``` Confirm that the ConfigMap was updated: ```shell kubectl describe configmap/example-redis-config ``` You should see the configuration values we just added: ```shell Name: example-redis-config Namespace: default Labels: Annotations: Data ==== redis-config: ---- maxmemory 2mb maxmemory-policy allkeys-lru ``` Check the Redis Pod again using `redis-cli` via `kubectl exec` to see if the configuration was applied: ```shell kubectl exec -it pod/redis -- redis-cli ``` Check `maxmemory`: ```shell 127.0.0.1:6379> CONFIG GET maxmemory ``` It remains at the default value of 0: ```shell 1) "maxmemory" 2) "0" ``` Similarly, `maxmemory-policy` remains at the `noeviction` default setting: ```shell 127.0.0.1:6379> CONFIG GET maxmemory-policy ``` Returns: ```shell 1) "maxmemory-policy" 2) "noeviction" ``` The configuration values have not changed because the Pod needs to be restarted to grab updated values from associated ConfigMaps. Let's delete and recreate the Pod: ```shell kubectl delete pod redis kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/config/redis-pod.yaml ``` Now re-check the configuration values one last time: ```shell kubectl exec -it pod/redis -- redis-cli ``` Check `maxmemory`: ```shell 127.0.0.1:6379> CONFIG GET maxmemory ``` It should now return the updated value of 2097152: ```shell 1) "maxmemory" 2) "2097152" ``` Similarly, `maxmemory-policy` has also been updated: ```shell 127.0.0.1:6379> CONFIG GET maxmemory-policy ``` It now
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/configure-redis-using-configmap.md
[ 0.011426904238760471, -0.0329350009560585, -0.010101724416017532, -0.005308111198246479, 0.03018423728644848, -0.05315369740128517, 0.02355807088315487, -0.003993283491581678, -0.02409261278808117, 0.032967254519462585, 0.0050856624729931355, -0.04667351767420769, 0.03811115771532059, -0.03296251595020294, 0.04924046993255615, -0.01869659684598446, 0.03712320700287819, -0.04820512607693672, -0.039302095770835876, -0.0773802250623703, -0.0039493851363658905, -0.0016354206018149853, 0.013426091521978378, 0.016191069036722183, -0.0880565345287323, -0.04078209400177002, -0.04802226275205612, -0.011085493490099907, -0.08849214017391205, -0.013871924951672554, 0.017955267801880836, 0.01726493239402771, 0.029518453404307365, 0.01786927878856659, 0.07298772782087326, 0.20998075604438782, 0.021152552217245102, -0.07706144452095032, -0.07438063621520996, 0.006025937385857105, -0.047956325113773346, 0.013809135183691978, -0.04258023574948311, 0.010974014177918434, -0.005161244887858629, 0.01849965937435627, -0.08114498853683472, -0.013618593104183674, 0.006986094173043966, -0.023051267489790916, -0.043942295014858246, -0.05000116676092148, 0.057705242186784744, -0.052858591079711914, 0.06779097020626068, 0.10441110283136368, -0.044934120029211044, 0.033048972487449646, 0.07513647526502609, -0.03337955102324486, 0.027161629870533943, -0.05525088310241699, -0.03648581728339195, -0.08158640563488007, -0.07391456514596939, 0.018478987738490105, -0.046281006187200546, -0.04275878518819809, 0.07929876446723938, 0.02548833005130291, -0.038429852575063705, 0.016507819294929504, 0.04405461624264717, -0.08368715643882751, -0.008363197557628155, 0.037124183028936386, 0.02063099853694439, 0.09128858894109726, -0.07221680134534836, -0.127797469496727, -0.02187749370932579, 0.06928706169128418, 0.057034678757190704, 0.022702157497406006, 0.02550148032605648, 0.011746698059141636, 0.03378206863999367, -0.11911378800868988, 0.05504816398024559, 0.014925984665751457, 0.030810173600912094, -0.12692879140377045, -0.0022716177627444267, -0.11614208668470383, 0.08653734624385834, 0.007797843776643276, -0.06207489222288132, -0.0027206807862967253, 0.017640341073274612, 0.025116074830293655, -0.010234410874545574, -0.06552809476852417, 0.07226187735795975, -0.004565479699522257, 0.026075439527630806, -0.05858335271477699, -0.04518904536962509, 0.017015153542160988, 0.0017821238143369555, 0.04143355041742325, 0.030826978385448456, -0.0022732929792255163, 0.07133351266384125, -0.01983204483985901, -0.026973644271492958, 0.047478631138801575, 0.02542993798851967, -0.030946452170610428, -0.009881333447992802, 0.011698996648192406, 0.08671171963214874, -0.06375926733016968, 0.017791347578167915, -0.02808435447514057, -0.01359485648572445, -0.04152936860918999, -0.05341082438826561, 4.937271699389432e-33, 0.0786273255944252, -0.03540259227156639, 0.01945570483803749, 0.03947269544005394, 0.0175318643450737, -0.05019988492131233, -0.0358501598238945, -0.0003383072034921497, -0.02824866957962513, -0.009577680379152298, -0.00000935571915761102, 0.09475409984588623, -0.0899273157119751, 0.040873922407627106, -0.012317719869315624, -0.07254350930452347, -0.037773579359054565, 0.073850616812706, 0.015186943113803864, -0.04046158120036125, 0.020784664899110794, -0.07022913545370102, -0.048966504633426666, -0.06596777588129044, 0.07414374500513077, 0.018494896590709686, 0.058983057737350464, -0.056901104748249054, -0.0012795856455340981, 0.008873088285326958, 0.0214544665068388, -0.028673380613327026, 0.004998502321541309, 0.08239710330963135, -0.11869892477989197, -0.006301369052380323, -0.031060684472322464, 0.025916030630469322, -0.08563614636659622, -0.0005367291159927845, 0.03721272572875023, 0.03955378383398056, -0.017304887995123863, -0.027881670743227005, 0.053709059953689575, -0.048999834805727005, 0.05554792657494545, -0.012170793488621712, 0.16219571232795715, -0.01259193941950798, 0.0044683595187962055, -0.0152678731828928, 0.07129886746406555, -0.07790400087833405, 0.042716458439826965, -0.053641658276319504, 0.07165032625198364, -0.007765976712107658, -0.027396338060498238, -0.03209029510617256, -0.04320039972662926, 0.032654229551553726, -0.04904104769229889, 0.02108505554497242, 0.06901301443576813, 0.04763973876833916, -0.003018864430487156, 0.0027913779485970736, 0.07516186684370041, 0.026142263785004616, -0.07927557080984116, 0.0466085746884346, -0.042159900069236755, 0.04617031291127205, -0.026554549112915993, -0.03975282981991768, 0.01110735721886158, 0.059307489544153214, -0.04708833619952202, 0.02171841263771057, -0.0175981055945158, 0.036295901983976364, -0.0693025141954422, 0.12441553920507431, 0.023064136505126953, -0.06820313632488251, 0.029399726539850235, 0.05652208626270294, -0.0322028324007988, -0.00927482359111309, 0.036181509494781494, -0.04828694090247154, -0.11885777860879898, 0.016364911571145058, -0.023897401988506317, -5.111155599208865e-33, 0.10400038212537766, -0.06288837641477585, -0.01860847882926464, 0.02159556746482849, 0.018260708078742027, -0.0027488037012517452, 0.03630576655268669, 0.015059932135045528, 0.015140985138714314, -0.06376489251852036, -0.050189174711704254, -0.05483842268586159, -0.003639903152361512, 0.07811734825372696, -0.09691894054412842, 0.015393608249723911, -0.12382686138153076, -0.015658723190426826, -0.027835765853524208, 0.023882422596216202, -0.03826287388801575, 0.03389696776866913, 0.06715668737888336, 0.025550542399287224, 0.007450301665812731, -0.006700736470520496, 0.026388412341475487, 0.029969293624162674, -0.1057036742568016, -0.05322052910923958, -0.005291021429002285, -0.018407044932246208, -0.061318736523389816, 0.0008246107026934624, -0.03431965410709381, -0.04119434952735901, -0.08600834757089615, 0.07018263638019562, -0.0397111177444458, 0.005376988090574741, 0.11180994659662247, 0.006835554260760546, -0.05054745078086853, -0.04029005020856857, -0.012865307740867138, -0.011267917230725288, 0.07179094851016998, 0.008299769833683968, -0.08801250159740448, -0.09991876780986786, -0.016072098165750504, -0.018076516687870026, -0.04363061860203743, -0.03614039346575737, -0.036805715411901474, 0.03520601987838745, 0.0199833232909441, 0.05179040506482124, -0.03656260296702385, 0.05115005001425743, 0.020508097484707832, -0.08768897503614426, 0.08783632516860962, 0.03647620975971222, -0.0004901675274595618, -0.0645449087023735, -0.006385409273207188, 0.034465111792087555, 0.016640830785036087, 0.061544209718704224, -0.004140044096857309, -0.04631887003779411, 0.04458531737327576, 0.012119110673666, 0.039717551320791245, -0.041940391063690186, -0.006519131362438202, 0.031561050564050674, 0.05834141746163368, 0.06166568771004677, -0.010217275470495224, 0.02504422888159752, -0.025785040110349655, 0.06373155117034912, 0.0600898303091526, 0.059533800929784775, 0.049561772495508194, 0.07997416704893112, 0.062015991657972336, 0.06169857084751129, 0.03930472955107689, -0.03470991551876068, 0.01101343147456646, 0.10242777317762375, -0.0736078992486, -4.894789995546489e-8, 0.06323492527008057, 0.06610996276140213, -0.07046724855899811, 0.034411873668432236, 0.03928185999393463, 0.053529974073171616, 0.02584070712327957, -0.015990784391760826, -0.09254907816648483, 0.011165107600390911, -0.05616253986954689, 0.04844402149319649, -0.08482737094163895, -0.0053157261572778225, -0.02970685251057148, -0.02181362174451351, -0.012135833501815796, 0.11736339330673218, -0.009474559687077999, -0.01166585087776184, -0.016146669164299965, 0.026752084493637085, -0.05280904099345207, 0.036173950880765915, 0.06636293977499008, 0.04612763971090317, 0.03566360846161842, 0.006947631947696209, 0.065065898001194, 0.003927433863282204, 0.06203693524003029, 0.020035021007061005, -0.04492596909403801, 0.04367619752883911, -0.045441269874572754, -0.014117206446826458, -0.07363441586494446, 0.09659454226493835, 0.025602709501981735, -0.02912653423845768, -0.014814029447734356, 0.04699086770415306, -0.08195152133703232, -0.01153954304754734, -0.08725032955408096, 0.052909597754478455, -0.062030091881752014, -0.003078051144257188, -0.004300704225897789, -0.015859629958868027, -0.07766373455524445, -0.02613099105656147, 0.059026267379522324, 0.06323879212141037, -0.01827755756676197, 0.01864800788462162, 0.06072939932346344, -0.02540556900203228, 0.027241764590144157, 0.010463559068739414, 0.011228117160499096, 0.030381418764591217, 0.002403316320851445, 0.059102874249219894 ]
0.146137
configuration values one last time: ```shell kubectl exec -it pod/redis -- redis-cli ``` Check `maxmemory`: ```shell 127.0.0.1:6379> CONFIG GET maxmemory ``` It should now return the updated value of 2097152: ```shell 1) "maxmemory" 2) "2097152" ``` Similarly, `maxmemory-policy` has also been updated: ```shell 127.0.0.1:6379> CONFIG GET maxmemory-policy ``` It now reflects the desired value of `allkeys-lru`: ```shell 1) "maxmemory-policy" 2) "allkeys-lru" ``` Clean up your work by deleting the created resources: ```shell kubectl delete pod/redis configmap/example-redis-config ``` ## {{% heading "whatsnext" %}} \* Learn more about [ConfigMaps](/docs/tasks/configure-pod-container/configure-pod-configmap/). \* Follow an example of [Updating configuration via a ConfigMap](/docs/tutorials/configuration/updating-configuration-via-a-configmap/).
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/configuration/configure-redis-using-configmap.md
[ 0.05859634652733803, -0.002316736849024892, -0.042423319071531296, -0.03399048000574112, -0.017850643023848534, -0.06824379414319992, 0.024388829246163368, 0.03381805494427681, 0.023520158603787422, 0.047738008201122284, 0.014536597765982151, -0.06013351306319237, 0.03289775922894478, -0.04613997042179108, 0.0472133494913578, 0.00741178635507822, 0.0012252284213900566, -0.022280769422650337, -0.13440734148025513, -0.09773178398609161, 0.024969441816210747, 0.02349485456943512, 0.014631505124270916, -0.04919338971376419, -0.041757628321647644, -0.009627529419958591, -0.060303907841444016, -0.02698180079460144, -0.085308738052845, -0.08598127961158752, -0.03190778195858002, 0.0478396974503994, 0.04523849114775658, -0.024991648271679878, 0.08504293859004974, 0.16637536883354187, 0.0010343006579205394, -0.09361419826745987, -0.02181612327694893, 0.017889659851789474, -0.030627071857452393, 0.030601155012845993, -0.05925314500927925, 0.017960496246814728, 0.011442859657108784, 0.055717822164297104, -0.06576937437057495, -0.008515759371221066, 0.04659542068839073, -0.025149008259177208, 0.005430649500340223, 0.023098617792129517, 0.0370669960975647, -0.011713703162968159, 0.07109244167804718, 0.034328799694776535, -0.043514396995306015, 0.08018555492162704, 0.10641752183437347, -0.06318281590938568, 0.005835179705172777, 0.016444120556116104, -0.01820489577949047, -0.04937678202986717, -0.05491029471158981, -0.06501244008541107, -0.00020131315977778286, -0.06540896743535995, 0.004807146266102791, 0.06412242352962494, -0.004305744078010321, -0.007253442425280809, -0.007216048892587423, -0.08785980194807053, 0.0003700635570567101, 0.018875913694500923, -0.008069109171628952, 0.07378314435482025, -0.09129888564348221, -0.0846414864063263, -0.034722525626420975, -0.02014508657157421, 0.021189173683524132, -0.03562743961811066, 0.01726463995873928, 0.006789132487028837, -0.04284755513072014, -0.06883518397808075, 0.06796085089445114, 0.07573173195123672, 0.021129753440618515, -0.0627899095416069, 0.00833696685731411, -0.036856696009635925, 0.040323030203580856, 0.04987463727593422, -0.05059046298265457, 0.07814393937587738, -0.016121549531817436, 0.023553358390927315, 0.007715127430856228, -0.03741490840911865, 0.06679832935333252, 0.03707987815141678, 0.01486390084028244, -0.0930287316441536, -0.05297877639532089, 0.04443119838833809, -0.026427749544382095, 0.02888898178935051, -0.007223054300993681, -0.004952944349497557, 0.09502208232879639, 0.003481062361970544, 0.025977326557040215, 0.0904591828584671, 0.01096661202609539, 0.029011234641075134, -0.024373777210712433, 0.07692097127437592, 0.1571696251630783, -0.040594734251499176, -0.00008361029176739976, 0.030765065923333168, -0.06824538856744766, 0.026950586587190628, 0.028814632445573807, 3.590690757960684e-33, 0.039271093904972076, -0.08303780853748322, 0.04123872146010399, -0.0002653022820595652, 0.006789307575672865, 0.004434982314705849, -0.04219876974821091, 0.015148204751312733, -0.0012877496192231774, -0.01359032467007637, -0.031850963830947876, 0.08254697918891907, -0.09820414334535599, 0.01117910910397768, -0.023100342601537704, 0.0014013806357979774, -0.009332497604191303, 0.040845129638910294, 0.018250813707709312, -0.012861967086791992, 0.07891108840703964, -0.05380423739552498, -0.07830638438463211, -0.06258594989776611, 0.05585824325680733, 0.013118833303451538, 0.0780320018529892, -0.03556142747402191, -0.032877366989851, -0.021820534020662308, 0.019345508888363838, -0.01910964958369732, 0.02701948955655098, 0.06823715567588806, -0.11113373190164566, -0.01719178631901741, 0.0220019593834877, 0.029332822188735008, -0.07399729639291763, -0.038350753486156464, 0.03156231343746185, 0.028606055304408073, -0.05027000233530998, -0.0047955382615327835, 0.06896976381540298, -0.06501775979995728, 0.010699535720050335, 0.020136263221502304, 0.023415008559823036, 0.027005469426512718, 0.00430974829941988, -0.002450064290314913, 0.07717142254114151, -0.040084898471832275, -0.0015638562617823482, -0.0202413909137249, 0.0395006462931633, 0.0020856198389083147, -0.07862405478954315, -0.03017278201878071, -0.003395535983145237, 0.061061792075634, 0.030689768493175507, 0.07587020844221115, 0.08187470585107803, 0.051267389208078384, 0.0003822830622084439, 0.05574774742126465, 0.06808227300643921, 0.05389171838760376, -0.08134245872497559, 0.045457370579242706, 0.03849278390407562, 0.007938690483570099, -0.04435920715332031, -0.10291200876235962, 0.07504203915596008, -0.011782640591263771, -0.09561237692832947, 0.014893673360347748, 0.05384068563580513, 0.082211934030056, -0.065416119992733, 0.08397813141345978, 0.04075149819254875, -0.029588788747787476, -0.011308488436043262, 0.058353547006845474, -0.03746729716658592, -0.016813289374113083, 0.034643083810806274, -0.09769290685653687, -0.09764079004526138, -0.020887497812509537, -0.05852826312184334, -4.315916773146294e-33, 0.11543088406324387, -0.014446188695728779, -0.01837395690381527, 0.02109779231250286, 0.04015611857175827, -0.037982042878866196, 0.03810609504580498, 0.04130014777183533, 0.005069307517260313, -0.10553714632987976, 0.0017075701616704464, -0.010721865110099316, 0.06410792469978333, 0.03954584524035454, -0.03845706582069397, 0.06707201898097992, -0.10495027154684067, -0.04838309437036514, -0.035307347774505615, -0.02390962466597557, -0.07121221721172333, 0.03096301294863224, 0.07955136895179749, 0.12621793150901794, -0.039732374250888824, -0.04333058372139931, -0.012662701308727264, -0.0049330685287714005, -0.10623826831579208, -0.018865354359149933, 0.009183145128190517, -0.030082134529948235, -0.0986839309334755, 0.11480120569467545, -0.020810449495911598, -0.08136254549026489, -0.03204206004738808, 0.06962206214666367, -0.008104437030851841, 0.06664978712797165, 0.059166837483644485, 0.053070761263370514, -0.029497377574443817, -0.009135589003562927, -0.007463524583727121, 0.02473040111362934, 0.07116135209798813, -0.07377389073371887, -0.018437406048178673, -0.1402934491634369, 0.04492763802409172, -0.03853187710046768, -0.029578495770692825, 0.02220912091434002, 0.04147658869624138, -0.022182539105415344, -0.03168101981282234, 0.04815216362476349, -0.05506536364555359, -0.005062375217676163, -0.012767616659402847, -0.0015732023166492581, 0.01730315573513508, 0.0676935538649559, -0.011640483513474464, -0.035118941217660904, -0.041994769126176834, -0.020731238648295403, 0.03287971019744873, -0.014876768924295902, 0.060263730585575104, -0.0404934398829937, -0.014497889205813408, 0.05403474345803261, -0.001143495668657124, -0.04016922786831856, -0.02749307081103325, -0.030406035482883453, 0.03762516751885414, 0.09876257181167603, -0.019214829429984093, 0.030926739796996117, -0.04530366510152817, 0.02758261375129223, 0.007140946574509144, 0.03855660557746887, -0.00754963094368577, 0.10803809762001038, 0.06977545469999313, 0.05226555094122887, -0.012880709953606129, -0.06299638003110886, -0.03836224600672722, 0.04733162745833397, -0.06602419912815094, -4.060051850274249e-8, 0.05069296807050705, -0.013192884624004364, -0.09119716286659241, 0.058118559420108795, 0.07528426498174667, -0.0016045508673414588, 0.0027814230415970087, 0.03916507959365845, -0.06880750507116318, -0.07011216133832932, -0.007671683561056852, 0.05637368932366371, -0.09272393584251404, -0.022419366985559464, 0.0047979410737752914, -0.04005775228142738, 0.005303783807903528, 0.049077969044446945, 0.037836119532585144, -0.04968687891960144, 0.01504574716091156, 0.012186069041490555, -0.05810188502073288, 0.006565051153302193, 0.06208918243646622, 0.035821881145238876, 0.043552547693252563, 0.0033982431050390005, 0.05006294697523117, 0.025753602385520935, 0.04604554548859596, -0.072758249938488, 0.0005039473180659115, -0.00803307630121708, -0.03688538074493408, -0.07722719758749008, -0.09115112572908401, 0.09720402956008911, 0.02696055732667446, 0.03192076459527016, -0.020276909694075584, 0.03248746693134308, -0.04496365040540695, 0.009677560068666935, -0.11321108043193817, 0.007598410360515118, -0.010224109515547752, 0.05829532444477081, 0.047057416290044785, -0.07912211120128632, -0.032093435525894165, -0.0009816811652854085, 0.025659196078777313, 0.01731199212372303, -0.04531083628535271, 0.01167615968734026, 0.029692742973566055, 0.04860851541161537, 0.0008523787837475538, 0.012959178537130356, -0.02029489539563656, -0.03819610923528671, -0.06873591244220734, 0.041774824261665344 ]
0.104463
{{< feature-state feature\_gate\_name="AppArmor" >}} This page shows you how to load AppArmor profiles on your nodes and enforce those profiles in Pods. To learn more about how Kubernetes can confine Pods using AppArmor, see [Linux kernel security constraints for Pods and containers](/docs/concepts/security/linux-kernel-security-constraints/#apparmor). ## {{% heading "objectives" %}} \* See an example of how to load a profile on a Node \* Learn how to enforce the profile on a Pod \* Learn how to check that the profile is loaded \* See what happens when a profile is violated \* See what happens when a profile cannot be loaded ## {{% heading "prerequisites" %}} AppArmor is an optional kernel module and Kubernetes feature, so verify it is supported on your Nodes before proceeding: 1. AppArmor kernel module is enabled -- For the Linux kernel to enforce an AppArmor profile, the AppArmor kernel module must be installed and enabled. Several distributions enable the module by default, such as Ubuntu and SUSE, and many others provide optional support. To check whether the module is enabled, check the `/sys/module/apparmor/parameters/enabled` file: ```shell cat /sys/module/apparmor/parameters/enabled Y ``` The kubelet verifies that AppArmor is enabled on the host before admitting a pod with AppArmor explicitly configured. 1. Container runtime supports AppArmor -- All common Kubernetes-supported container runtimes should support AppArmor, including {{< glossary\_tooltip term\_id="containerd" >}} and {{< glossary\_tooltip term\_id="cri-o" >}}. Please refer to the corresponding runtime documentation and verify that the cluster fulfills the requirements to use AppArmor. 1. Profile is loaded -- AppArmor is applied to a Pod by specifying an AppArmor profile that each container should be run with. If any of the specified profiles are not loaded in the kernel, the kubelet will reject the Pod. You can view which profiles are loaded on a node by checking the `/sys/kernel/security/apparmor/profiles` file. For example: ```shell ssh gke-test-default-pool-239f5d02-gyn2 "sudo cat /sys/kernel/security/apparmor/profiles | sort" ``` ``` apparmor-test-deny-write (enforce) apparmor-test-audit-write (enforce) docker-default (enforce) k8s-nginx (enforce) ``` For more details on loading profiles on nodes, see [Setting up nodes with profiles](#setting-up-nodes-with-profiles). ## Securing a Pod {{< note >}} Prior to Kubernetes v1.30, AppArmor was specified through annotations. Use the documentation version selector to view the documentation with this deprecated API. {{< /note >}} AppArmor profiles can be specified at the pod level or container level. The container AppArmor profile takes precedence over the pod profile. ```yaml securityContext: appArmorProfile: type: ``` Where `` is one of: \* `RuntimeDefault` to use the runtime's default profile \* `Localhost` to use a profile loaded on the host (see below) \* `Unconfined` to run without AppArmor See [Specifying AppArmor Confinement](#specifying-apparmor-confinement) for full details on the AppArmor profile API. To verify that the profile was applied, you can check that the container's root process is running with the correct profile by examining its proc attr: ```shell kubectl exec -- cat /proc/1/attr/current ``` The output should look something like this: ``` cri-containerd.apparmor.d (enforce) ``` ## Example \*This example assumes you have already set up a cluster with AppArmor support.\* First, load the profile you want to use onto your Nodes. This profile blocks all file write operations: ``` #include profile k8s-apparmor-example-deny-write flags=(attach\_disconnected) { #include file, # Deny all file writes. deny /\*\* w, } ``` The profile needs to be loaded onto all nodes, since you don't know where the pod will be scheduled. For this example you can use SSH to install the profiles, but other approaches are discussed in [Setting up nodes with profiles](#setting-up-nodes-with-profiles). ```shell # This example assumes that node names match host names, and are reachable via SSH. NODES=($( kubectl get node -o jsonpath='{.items[\*].status.addresses[?(.type == "Hostname")].address}' )) for NODE in ${NODES[\*]};
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/apparmor.md
[ 0.04125595465302467, 0.02559712715446949, 0.05004219710826874, -0.029389282688498497, 0.04061996564269066, -0.015221339650452137, 0.012520890682935715, 0.05466856807470322, -0.03275103121995926, 0.006540813948959112, 0.0031509161926805973, -0.08580095320940018, 0.02607370726764202, 0.014053856022655964, 0.05572328343987465, -0.0034478541929274797, 0.062003396451473236, 0.03823734447360039, 0.015550273470580578, -0.03298494964838028, -0.019667528569698334, 0.026716366410255432, 0.014242901466786861, 0.02360488660633564, -0.10045723617076874, -0.012542721815407276, -0.029837654903531075, -0.011873135343194008, -0.014745490625500679, 0.016237443313002586, -0.022153442725539207, 0.012392356991767883, -0.019839860498905182, 0.0357995331287384, 0.060971472412347794, 0.05859314277768135, 0.020325031131505966, -0.08836103230714798, -0.07394025474786758, -0.03435269370675087, 0.026674069464206696, -0.08881703019142151, -0.11625764518976212, 0.011902335099875927, 0.00004475229434319772, -0.03889961540699005, -0.027895381674170494, -0.028943253681063652, -0.00458519347012043, -0.01837950013577938, -0.018070854246616364, -0.07582437992095947, 0.10151777416467667, 0.02314664237201214, 0.03729034587740898, 0.005276009906083345, -0.015256673097610474, 0.04665672779083252, 0.08250445872545242, 0.0493016242980957, 0.01724199205636978, -0.0338570773601532, -0.03338348865509033, 0.01900782249867916, -0.02232706919312477, 0.03955883905291557, -0.024413492530584335, -0.007015109062194824, 0.0391642227768898, 0.009099061600863934, 0.04631190001964569, -0.02752688154578209, -0.03195878863334656, -0.07180514186620712, -0.010448934510350227, -0.019032150506973267, -0.051408685743808746, 0.0622246228158474, 0.013441337272524834, -0.0933898389339447, -0.016520315781235695, 0.0013341736048460007, 0.04851757362484932, 0.014647304080426693, -0.07106732577085495, 0.032139215618371964, -0.026687223464250565, -0.09470908343791962, 0.025596164166927338, 0.07545575499534607, 0.0554414764046669, -0.08904064446687698, 0.07593022286891937, -0.13347965478897095, 0.0696561336517334, -0.01178361102938652, -0.00673298817127943, -0.010523158125579357, 0.009783945046365261, 0.04228240251541138, -0.0713624432682991, -0.08644255250692368, -0.028125077486038208, 0.055184200406074524, 0.08498126268386841, -0.005494314711540937, 0.002466064877808094, -0.096858449280262, -0.009168025106191635, 0.06650274991989136, 0.02883554995059967, 0.03281019628047943, 0.011371356435120106, 0.027257196605205536, 0.05577472597360611, -0.0157982986420393, 0.03042265772819519, -0.0064957900904119015, -0.0012569151585921645, 0.10025835782289505, 0.031348563730716705, -0.10603709518909454, 0.042913179844617844, -0.007024472579360008, -0.014181851409375668, 0.028611181303858757, -0.04626714065670967, 4.8300952672692404e-33, 0.08274798840284348, -0.06480496376752853, -0.0011986247263848782, 0.04866422340273857, -0.002780952723696828, -0.07581126689910889, -0.0187701266258955, -0.018020614981651306, -0.033369600772857666, 0.004314130637794733, -0.06214293837547302, 0.09252993762493134, -0.01857656240463257, 0.040018320083618164, 0.04063994809985161, -0.03579489141702652, -0.06890519708395004, 0.05511506646871567, 0.14893768727779388, -0.011342045851051807, 0.03324265778064728, -0.12217675149440765, -0.06384173780679703, -0.005508179776370525, 0.01601998694241047, 0.036156781017780304, -0.007896676659584045, -0.09895050525665283, -0.00918994378298521, 0.050432316958904266, -0.02391013875603676, -0.004681908991187811, 0.060283709317445755, 0.06759867817163467, -0.16147920489311218, -0.044975750148296356, -0.02552810125052929, 0.011663168668746948, -0.09757507592439651, -0.05996748432517052, 0.03848732262849808, -0.02901902236044407, -0.000656377524137497, -0.04297870025038719, 0.004165233578532934, -0.02435336448252201, 0.053534429520368576, -0.06457652151584625, 0.054550182074308395, -0.003101879730820656, -0.03981988504528999, -0.04125157743692398, 0.049394138157367706, -0.0397733673453331, 0.030545590445399284, -0.0202622190117836, -0.018111946061253548, -0.04022170603275299, -0.04662137106060982, 0.008910421282052994, -0.036578983068466187, 0.02112710289657116, -0.008539342321455479, 0.0016084136441349983, 0.006482561118900776, 0.03360167145729065, -0.02418186143040657, -0.008473926223814487, -0.007988727651536465, 0.045632682740688324, -0.12883394956588745, 0.05713953822851181, -0.00582809979096055, 0.0027151729445904493, -0.07219764590263367, -0.03557410463690758, 0.02482425421476364, 0.05718659982085228, -0.13889259099960327, 0.05203290656208992, 0.004020973574370146, -0.008288348093628883, -0.03278851509094238, 0.11390777677297592, 0.0003655495820567012, -0.05297813192009926, 0.004182102158665657, -0.020280851051211357, -0.0721239373087883, 0.036650579422712326, 0.05724683403968811, -0.048932988196611404, -0.024546543136239052, 0.030681651085615158, -0.09381239861249924, -7.210807812942295e-33, 0.11030356585979462, -0.006350957788527012, 0.04422428086400032, -0.049643367528915405, 0.0031378152780234814, 0.006815622095018625, -0.004819286055862904, 0.03673381730914116, -0.007149998564273119, -0.06258261948823929, -0.05566040426492691, -0.008870389312505722, 0.03432247042655945, 0.01261461153626442, -0.06037423387169838, 0.041835181415081024, -0.1657104790210724, -0.015323729254305363, -0.003087134100496769, 0.03444159775972366, -0.03946952149271965, 0.0038646876346319914, 0.03117537684738636, 0.05872504040598869, -0.03163156658411026, -0.03155751898884773, 0.004011536482721567, 0.01752411387860775, -0.057120803743600845, -0.021814437583088875, 0.04520599916577339, -0.05849030613899231, -0.032918915152549744, -0.009219123981893063, -0.0007003592909313738, -0.015188386663794518, -0.05262202024459839, 0.025476209819316864, 0.0026355874724686146, -0.006258603651076555, 0.11262698471546173, 0.034451890736818314, -0.10030931234359741, -0.022253843024373055, -0.033459533005952835, 0.017446311190724373, 0.06999339163303375, -0.034629665315151215, -0.005930289626121521, -0.13961613178253174, -0.0018235017778351903, 0.014822077006101608, 0.0031486228108406067, 0.08314167708158493, -0.042306020855903625, 0.06749191135168076, 0.07396972179412842, 0.037884071469306946, 0.01592092216014862, 0.04821120575070381, 0.06122085079550743, -0.0972868874669075, 0.05432438850402832, 0.014921663329005241, -0.019501395523548126, -0.12691983580589294, -0.012003021314740181, 0.058189380913972855, -0.029408680275082588, 0.058593444526195526, 0.004330271854996681, -0.04607301205396652, 0.049503207206726074, 0.03700818121433258, -0.015633130446076393, -0.0457940474152565, 0.012274928390979767, -0.09194213151931763, 0.010919604450464249, 0.032641928642988205, -0.021682705730199814, 0.0792333260178566, -0.11881565302610397, 0.019869307056069374, 0.060039911419153214, 0.03289945423603058, 0.06785566359758377, 0.07401299476623535, 0.09817098826169968, 0.057428982108831406, 0.02271975204348564, 0.02686731517314911, -0.06668137013912201, 0.08741298317909241, -0.06619935482740402, -5.399606806122392e-8, 0.07573449611663818, -0.03550834208726883, -0.012523965910077095, 0.061502374708652496, -0.0033884746953845024, 0.04568490758538246, 0.030403701588511467, -0.030120059847831726, -0.057636212557554245, -0.024207375943660736, -0.01889387145638466, 0.09116540849208832, -0.11814900487661362, -0.006076633930206299, 0.05833076313138008, -0.03316698968410492, -0.03520616143941879, 0.0955851599574089, -0.013715190812945366, -0.04490026459097862, -0.0915784016251564, -0.037157971411943436, 0.0025628518778830767, 0.01628117635846138, 0.0008756431052461267, 0.03259390965104103, 0.03716214746236801, -0.0335339717566967, 0.04306663200259209, 0.03788270056247711, -0.03726229816675186, 0.017346153035759926, -0.05336497724056244, 0.022753842175006866, -0.0006935602286830544, 0.06625261157751083, -0.11685004085302353, 0.031453121453523636, 0.03963134437799454, 0.05917397886514664, -0.023893868550658226, 0.005821785423904657, -0.053154200315475464, 0.019670838490128517, -0.05777175351977348, 0.08268566429615021, 0.00415944866836071, 0.027930935844779015, 0.04079661890864372, -0.0038186279125511646, -0.005292619112879038, -0.017688332125544548, 0.019858727231621742, 0.09310068190097809, -0.045634880661964417, 0.04124270752072334, -0.02346142940223217, -0.03692610561847687, 0.01604173518717289, -0.024430328980088234, 0.017913006246089935, 0.030555253848433495, 0.048899777233600616, -0.05332424119114876 ]
0.172345
this example you can use SSH to install the profiles, but other approaches are discussed in [Setting up nodes with profiles](#setting-up-nodes-with-profiles). ```shell # This example assumes that node names match host names, and are reachable via SSH. NODES=($( kubectl get node -o jsonpath='{.items[\*].status.addresses[?(.type == "Hostname")].address}' )) for NODE in ${NODES[\*]}; do ssh $NODE 'sudo apparmor\_parser -q < profile k8s-apparmor-example-deny-write flags=(attach\_disconnected) { #include file, # Deny all file writes. deny /\*\* w, } EOF' done ``` Next, run a simple "Hello AppArmor" Pod with the deny-write profile: {{% code\_sample file="pods/security/hello-apparmor.yaml" %}} ```shell kubectl create -f hello-apparmor.yaml ``` You can verify that the container is actually running with that profile by checking `/proc/1/attr/current`: ```shell kubectl exec hello-apparmor -- cat /proc/1/attr/current ``` The output should be: ``` k8s-apparmor-example-deny-write (enforce) ``` Finally, you can see what happens if you violate the profile by writing to a file: ```shell kubectl exec hello-apparmor -- touch /tmp/test ``` ``` touch: /tmp/test: Permission denied error: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1 ``` To wrap up, see what happens if you try to specify a profile that hasn't been loaded: ```shell kubectl create -f /dev/stdin < Annotations: container.apparmor.security.beta.kubernetes.io/hello=localhost/k8s-apparmor-example-allow-write Status: Pending ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 10s default-scheduler Successfully assigned default/hello-apparmor to gke-test-default-pool-239f5d02-x1kf Normal Pulled 8s kubelet Successfully pulled image "busybox:1.28" in 370.157088ms (370.172701ms including waiting) Normal Pulling 7s (x2 over 9s) kubelet Pulling image "busybox:1.28" Warning Failed 7s (x2 over 8s) kubelet Error: failed to get container spec opts: failed to generate apparmor spec opts: apparmor profile not found k8s-apparmor-example-allow-write Normal Pulled 7s kubelet Successfully pulled image "busybox:1.28" in 90.980331ms (91.005869ms including waiting) ``` An Event provides the error message with the reason, the specific wording is runtime-dependent: ``` Warning Failed 7s (x2 over 8s) kubelet Error: failed to get container spec opts: failed to generate apparmor spec opts: apparmor profile not found ``` ## Administration ### Setting up Nodes with profiles Kubernetes {{< skew currentVersion >}} does not provide any built-in mechanisms for loading AppArmor profiles onto Nodes. Profiles can be loaded through custom infrastructure or tools like the [Kubernetes Security Profiles Operator](https://github.com/kubernetes-sigs/security-profiles-operator). The scheduler is not aware of which profiles are loaded onto which Node, so the full set of profiles must be loaded onto every Node. An alternative approach is to add a Node label for each profile (or class of profiles) on the Node, and use a [node selector](/docs/concepts/scheduling-eviction/assign-pod-node/) to ensure the Pod is run on a Node with the required profile. ## Authoring Profiles Getting AppArmor profiles specified correctly can be a tricky business. Fortunately there are some tools to help with that: \* `aa-genprof` and `aa-logprof` generate profile rules by monitoring an application's activity and logs, and admitting the actions it takes. Further instructions are provided by the [AppArmor documentation](https://gitlab.com/apparmor/apparmor/wikis/Profiling\_with\_tools). \* [bane](https://github.com/jfrazelle/bane) is an AppArmor profile generator for Docker that uses a simplified profile language. To debug problems with AppArmor, you can check the system logs to see what, specifically, was denied. AppArmor logs verbose messages to `dmesg`, and errors can usually be found in the system logs or through `journalctl`. More information is provided in [AppArmor failures](https://gitlab.com/apparmor/apparmor/wikis/AppArmor\_Failures). ## Specifying AppArmor confinement {{< caution >}} Prior to Kubernetes v1.30, AppArmor was specified through annotations. Use the documentation version selector to view the documentation with this deprecated API. {{< /caution >}} ### AppArmor profile within security context {#appArmorProfile} You can specify the `appArmorProfile` on either a container's `securityContext` or on a Pod's `securityContext`. If the profile is set at the pod level, it will be
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/apparmor.md
[ 0.04114418849349022, 0.05123833939433098, 0.010723494924604893, -0.028289664536714554, -0.03483803570270538, -0.0382063128054142, -0.022168010473251343, 0.05442766845226288, 0.04298587888479233, 0.022163135930895805, 0.00795147754251957, -0.08318904042243958, 0.07952775061130524, 0.016894424334168434, 0.030245404690504074, -0.003510359674692154, 0.0066497367806732655, 0.05237298086285591, 0.07921617478132248, -0.07226274907588959, -0.06849199533462524, 0.016313770785927773, 0.06868086755275726, 0.008912317454814911, -0.08261580020189285, -0.002957729622721672, 0.020492572337388992, 0.0030224001966416836, -0.025249172002077103, -0.005342443473637104, 0.02350086160004139, -0.020882505923509598, -0.0144432308152318, 0.035612594336271286, 0.060169197618961334, 0.029541276395320892, 0.06288620829582214, -0.011760109104216099, -0.08022883534431458, -0.009654872119426727, 0.07101967930793762, -0.04463214427232742, -0.10414481908082962, -0.04191333428025246, -0.00725177489221096, -0.06996435672044754, -0.04421161487698555, -0.03488417714834213, -0.028281375765800476, -0.05861666798591614, -0.02268359810113907, -0.05465352162718773, 0.051431506872177124, 0.037615492939949036, 0.01604047231376171, 0.000994964735582471, -0.03675290569663048, 0.0611812062561512, 0.09191905707120895, 0.043180957436561584, 0.005502485670149326, 0.00769335962831974, 0.011822231113910675, -0.0015386419836431742, -0.035296354442834854, 0.06310591846704483, -0.04921144247055054, 0.027136070653796196, 0.02190323732793331, 0.05292132869362831, 0.045756321400403976, -0.010082880966365337, -0.05120209604501724, -0.08801279217004776, -0.04929051920771599, -0.056009430438280106, -0.08878478407859802, 0.07194051891565323, -0.063656285405159, -0.02317092753946781, 0.011099332012236118, -0.04769390821456909, -0.0014306509401649237, 0.04204709455370903, -0.12844964861869812, 0.021510854363441467, 0.008234137669205666, -0.08755684643983841, 0.037535570561885834, 0.03353240713477135, 0.030393317341804504, -0.06116201728582382, 0.046354614198207855, -0.15489837527275085, 0.05202618986368179, -0.009718185290694237, -0.02414116822183132, 0.035764243453741074, -0.0026265273336321115, -0.017629150301218033, -0.03357115387916565, -0.0872824490070343, -0.005302172154188156, 0.011799382045865059, 0.09930419921875, -0.005753329023718834, -0.008021598681807518, -0.09689728170633316, -0.008134646341204643, 0.06605127453804016, -0.03699083998799324, 0.08117007464170456, -0.044542647898197174, 0.03215741738677025, 0.039060160517692566, 0.01413917075842619, 0.10887234658002853, 0.0021434766240417957, 0.009335873648524284, 0.1060846671462059, 0.1041397824883461, -0.06672391295433044, 0.012306061573326588, 0.019471779465675354, -0.003999786451458931, 0.03418635204434395, 0.005519458558410406, 2.047809423113314e-33, 0.1315632313489914, 0.003979027271270752, 0.06896065175533295, -0.016683872789144516, 0.01744486577808857, -0.08924409002065659, -0.03276383504271507, -0.01600978896021843, -0.009695881977677345, -0.0014529949985444546, -0.05827426537871361, 0.06561478227376938, 0.024543385952711105, 0.033595532178878784, 0.0310285035520792, 0.028778990730643272, -0.0170047078281641, 0.07519979029893875, 0.12737052142620087, 0.011410951614379883, 0.016224006190896034, -0.09874361753463745, -0.04433717578649521, 0.0783625990152359, 0.01786935329437256, -0.01065881084650755, 0.018395159393548965, -0.06957726925611496, 0.015842704102396965, -0.0051717753522098064, -0.014908505603671074, -0.026772823184728622, 0.04133305698633194, 0.06677018105983734, -0.11259031295776367, -0.0656612291932106, -0.025023771449923515, 0.020870011299848557, -0.06934737414121628, -0.07193825393915176, 0.08363308757543564, 0.0058239419013261795, -0.003804133739322424, 0.02867022715508938, -0.028944313526153564, -0.01574663817882538, 0.010342306457459927, -0.07944921404123306, 0.08611105382442474, 0.023561565205454826, -0.020676353946328163, -0.043915458023548126, 0.011501017957925797, -0.04219895973801613, 0.055415015667676926, 0.009568375535309315, 0.02747357450425625, -0.020667457953095436, -0.029485508799552917, -0.004583485424518585, -0.042421936988830566, 0.031630661338567734, -0.009938417002558708, 0.013561430387198925, 0.021415086463093758, -0.036218591034412384, -0.0708673968911171, -0.001675706123933196, -0.040984127670526505, 0.013585667125880718, -0.11095885187387466, 0.09880942106246948, -0.015829110518097878, -0.05636690557003021, -0.023250527679920197, -0.06421129405498505, 0.0038735258858650923, 0.07065558433532715, -0.08041275292634964, 0.05873354524374008, 0.035569123923778534, -0.011987914331257343, -0.08703407645225525, 0.05970565974712372, -0.0029939913656562567, 0.005986472591757774, 0.009881637990474701, 0.0159902460873127, -0.07065990567207336, 0.010190825909376144, 0.036412905901670456, -0.030599772930145264, -0.027662957087159157, -0.024894030764698982, -0.10589159280061722, -3.9389746730879575e-33, 0.09424072504043579, -0.040201593190431595, 0.020361965522170067, -0.0330020971596241, 0.08350539952516556, 0.019312717020511627, -0.0059644547291100025, 0.07330632209777832, 0.0015645272796973586, -0.038711369037628174, -0.056706156581640244, 0.0071119628846645355, 0.0513119213283062, -0.005621928721666336, -0.0552080012857914, 0.03529113158583641, -0.08860733360052109, 0.05278833955526352, -0.017549993470311165, -0.04209405928850174, -0.05069303885102272, 0.007558960467576981, 0.09597907960414886, 0.052891917526721954, -0.03894754499197006, -0.032274141907691956, 0.0017565320013090968, 0.04646952077746391, -0.11549077183008194, 0.0021720887161791325, 0.0038779049646109343, -0.013570825569331646, -0.06770595908164978, -0.052954401820898056, -0.042595308274030685, -0.031018104404211044, -0.10340167582035065, 0.13532298803329468, -0.015818102285265923, -0.03478230908513069, 0.07052937895059586, 0.014582128264009953, -0.10626909136772156, -0.008160680532455444, -0.014468406327068806, 0.03384412080049515, 0.08535677194595337, -0.06264199316501617, -0.02827324904501438, -0.0754067674279213, -0.004966569598764181, 0.059559162706136703, -0.0016709687188267708, 0.08414509892463684, 0.004698659759014845, 0.014505742117762566, -0.0026191403158009052, 0.01113804243505001, -0.015373334288597107, 0.03291057050228119, 0.06767792999744415, -0.11621531844139099, 0.10991079360246658, 0.02039024978876114, -0.023079050704836845, -0.12285252660512924, 0.01756751909852028, 0.04806150868535042, -0.03929324075579643, 0.04402950778603554, -0.008943654596805573, -0.02974703721702099, 0.04413400590419769, 0.05720895901322365, 0.013077222742140293, -0.030874554067850113, 0.0012923800386488438, -0.058684248477220535, 0.008846653625369072, 0.0630982518196106, -0.005097525659948587, 0.09511326998472214, -0.13447605073451996, -0.008937932550907135, 0.0752519890666008, -0.031820159405469894, 0.024137362837791443, 0.08186705410480499, 0.06522121280431747, 0.08320062607526779, 0.02587231434881687, 0.005382858216762543, -0.035893842577934265, 0.036604560911655426, -0.0670284554362297, -4.530967956384302e-8, 0.07412943243980408, -0.08758637309074402, -0.06303118914365768, 0.07022357732057571, -0.02821166254580021, 0.03885474428534508, -0.035446472465991974, -0.01701907068490982, -0.0010491241700947285, -0.0633501186966896, -0.01220653299242258, 0.06525079160928726, -0.06033621355891228, 0.05346880108118057, 0.010593379847705364, -0.004383129067718983, 0.030371222645044327, 0.0504390224814415, 0.02274366095662117, 0.04728521406650543, -0.06145795062184334, -0.018925625830888748, -0.01145949400961399, 0.04583519324660301, 0.051706019788980484, 0.07357693463563919, 0.02543289214372635, -0.10710334032773972, -0.014653914608061314, 0.028974533081054688, -0.022595321759581566, -0.03209603577852249, -0.042963817715644836, 0.05089347064495087, 0.00858458410948515, 0.005510998424142599, -0.11484431475400925, 0.03953289985656738, -0.01149497739970684, 0.07277810573577881, 0.006651016417890787, -0.00498788570985198, -0.0706905871629715, 0.00544459605589509, -0.011808768846094608, 0.036793675273656845, 0.029819337651133537, 0.02781003713607788, 0.03539419174194336, 0.011149998754262924, -0.024675516411662102, -0.03819109499454498, -0.004554321989417076, 0.025642745196819305, 0.0016921514179557562, 0.002547292038798332, 0.02828395925462246, -0.04262429103255272, 0.03629550337791443, -0.00899561308324337, 0.03305058181285858, -0.01695493422448635, 0.04784848541021347, 0.009211324155330658 ]
0.067816
Use the documentation version selector to view the documentation with this deprecated API. {{< /caution >}} ### AppArmor profile within security context {#appArmorProfile} You can specify the `appArmorProfile` on either a container's `securityContext` or on a Pod's `securityContext`. If the profile is set at the pod level, it will be used as the default profile for all containers in the pod (including init, sidecar, and ephemeral containers). If both a pod & container AppArmor profile are set, the container's profile will be used. An AppArmor profile has 2 fields: `type` \_(required)\_ - indicates which kind of AppArmor profile will be applied. Valid options are: `Localhost` : a profile pre-loaded on the node (specified by `localhostProfile`). `RuntimeDefault` : the container runtime's default profile. `Unconfined` : no AppArmor enforcement. `localhostProfile` - The name of a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. This option must be provided if and only if the `type` is `Localhost`. ## {{% heading "whatsnext" %}} Additional resources: \* [Quick guide to the AppArmor profile language](https://gitlab.com/apparmor/apparmor/wikis/QuickProfileLanguage) \* [AppArmor core policy reference](https://gitlab.com/apparmor/apparmor/wikis/Policy\_Layout)
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/apparmor.md
[ 0.03151295706629753, 0.07565706968307495, 0.020466050133109093, -0.017898552119731903, 0.09285993129014969, -0.022188691422343254, -0.010458970442414284, 0.09666579216718674, -0.034498509019613266, 0.006103519815951586, 0.03611418977379799, -0.059234458953142166, -0.011508990079164505, 0.02825363352894783, 0.05297275260090828, -0.04373658448457718, 0.07146808505058289, 0.009385769255459309, 0.010889812372624874, 0.07065710425376892, -0.011550978757441044, 0.010003536939620972, 0.04135896638035774, 0.029285550117492676, -0.08542163670063019, -0.04489950090646744, -0.01735987886786461, 0.030453665181994438, -0.02178543619811535, 0.03705785423517227, 0.003539829747751355, 0.0720350369811058, -0.00939146988093853, 0.006473348010331392, 0.024019990116357803, 0.051766250282526016, 0.05004947632551193, -0.01886122114956379, -0.002513932529836893, -0.006358839105814695, 0.0005310164415277541, -0.03458605334162712, -0.12900786101818085, 0.08067086338996887, -0.03907380998134613, -0.1411675065755844, -0.008058685809373856, -0.03444088622927666, -0.04604984074831009, 0.08883332461118698, -0.004774594679474831, 0.001209591282531619, 0.06011156737804413, -0.026502415537834167, 0.007705354131758213, 0.017756696790456772, -0.048946864902973175, 0.11012472957372665, 0.045687537640333176, 0.07244616746902466, 0.007980328053236008, 0.0017914004856720567, -0.02569877728819847, 0.006629509851336479, -0.004036968108266592, 0.031739797443151474, 0.023869754746556282, -0.037544555962085724, 0.030756529420614243, -0.006169566884636879, -0.021201904863119125, -0.006577023770660162, 0.009819838218390942, -0.10201641172170639, -0.012398033402860165, -0.0012865737080574036, 0.002742863493040204, 0.041393499821424484, -0.07207158207893372, -0.10028483718633652, 0.02156175673007965, -0.0005241110920906067, 0.04308455437421799, 0.026172852143645287, -0.06762871891260147, 0.03707488626241684, 0.034024376422166824, -0.053560126572847366, 0.053194791078567505, 0.06452351808547974, 0.041926849633455276, -0.0952601283788681, 0.04977519437670708, -0.1142464280128479, 0.05314987525343895, -0.02835310995578766, -0.06458573043346405, 0.012013831175863743, 0.01568448543548584, 0.022420132532715797, -0.02802969329059124, -0.0765962228178978, -0.02530713938176632, 0.0399288609623909, 0.09294048696756363, 0.009203841909766197, -0.013746477663516998, -0.11077149957418442, 0.026852943003177643, 0.083250492811203, 0.008641134016215801, -0.008563699200749397, -0.025467494502663612, 0.0024336206261068583, -0.009046250022947788, 0.06313268840312958, -0.050446804612874985, -0.003894310910254717, 0.01925274357199669, 0.07373330742120743, 0.04976539686322212, -0.04720684140920639, 0.10024792701005936, -0.008262277580797672, -0.0721929669380188, -0.014597633853554726, 0.00978731270879507, 4.781814775545092e-33, 0.039227016270160675, -0.06618455052375793, 0.02888794057071209, 0.07174666970968246, 0.02300403080880642, -0.013436438515782356, 0.04972343519330025, 0.016843385994434357, -0.033579710870981216, -0.025295458734035492, -0.028013190254569054, 0.1061239093542099, -0.04584459960460663, 0.036605361849069595, -0.022122371941804886, 0.032730281352996826, -0.11516687273979187, 0.04147280752658844, 0.09861510992050171, 0.00553719000890851, -0.032680753618478775, -0.07827239483594894, -0.10123393684625626, -0.01834755577147007, 0.022474074736237526, 0.05814754217863083, 0.01338265836238861, -0.06603804975748062, 0.0011912928894162178, 0.027650626376271248, 0.057126570492982864, -0.005797366611659527, 0.031494561582803726, 0.05144938454031944, -0.06439188867807388, -0.052472785115242004, -0.016861049458384514, 0.039074528962373734, -0.09208519011735916, -0.045655034482479095, 0.06399276852607727, -0.017593197524547577, -0.0029034288600087166, -0.059597186744213104, -0.01402963139116764, -0.061905212700366974, 0.00766644487157464, -0.03145717829465866, 0.07436247169971466, -0.031321823596954346, -0.04786527529358864, -0.0070060729049146175, 0.01750844344496727, -0.03364129737019539, -0.01367852371186018, -0.08884336054325104, -0.039670150727033615, 0.00531216524541378, -0.014232061803340912, -0.04630809649825096, -0.023354971781373024, 0.04775911942124367, -0.014655115082859993, -0.011212932877242565, -0.006589322350919247, 0.07926236838102341, -0.06962157040834427, -0.07084952294826508, 0.031166626140475273, 0.035348158329725266, -0.11435049772262573, 0.05196645110845566, -0.008025264367461205, 0.040339395403862, -0.05496075004339218, -0.006036192178726196, 0.025134015828371048, 0.08171996474266052, -0.054993558675050735, 0.03979118540883064, -0.06216626986861229, 0.02040487341582775, -0.006899699568748474, 0.11794179677963257, -0.06712415814399719, -0.05641414597630501, -0.025000791996717453, -0.0038176800590008497, -0.010379749350249767, 0.07570569217205048, 0.06905146688222885, -0.026414768770337105, -0.055472392588853836, 0.01091214083135128, -0.06563784182071686, -6.711836909641128e-33, 0.0296116191893816, -0.06140604987740517, -0.001219209749251604, -0.011250227689743042, -0.04214087501168251, 0.010496437549591064, 0.06336086988449097, 0.06699620932340622, 0.03487098217010498, -0.02511148899793625, 0.00001487085046392167, -0.0024964623153209686, 0.030953610315918922, -0.009632818400859833, -0.03976794704794884, 0.07010983675718307, -0.15090034902095795, -0.04121701419353485, 0.04052741825580597, 0.02177867665886879, -0.01751483790576458, -0.020372450351715088, 0.09223664551973343, 0.09001191705465317, -0.006527766585350037, -0.05716710165143013, 0.03707069158554077, -0.03420382738113403, -0.06055449694395065, -0.09095693379640579, 0.06029922515153885, -0.04570402204990387, -0.0727810487151146, -0.005206976551562548, -0.09751046448945999, -0.03429419919848442, -0.09545743465423584, 0.031081972643733025, -0.04533584788441658, -0.018419824540615082, 0.06944242119789124, -0.016292423009872437, -0.09872189909219742, -0.009420019574463367, -0.06151347979903221, 0.004062522202730179, 0.04883216693997383, -0.040286075323820114, 0.044678233563899994, -0.09011544287204742, 0.015344236977398396, 0.03777268901467323, 0.037478335201740265, 0.0057443780824542046, 0.01706836372613907, 0.02878350205719471, 0.06230386719107628, -0.021864892914891243, -0.0386066772043705, 0.0923202857375145, 0.1338772475719452, 0.0034904670901596546, 0.01282255444675684, -0.014383558183908463, -0.046715859323740005, -0.08512693643569946, -0.0438765287399292, 0.02942398190498352, -0.03812922164797783, 0.05242089927196503, 0.037863776087760925, -0.0890592709183693, 0.03339574858546257, 0.022496866062283516, -0.002942922292277217, -0.03724226355552673, 0.03855443745851517, -0.15427127480506897, 0.011114050634205341, 0.0032805935479700565, -0.026045581325888634, 0.06931552290916443, -0.10106948763132095, 0.033315256237983704, 0.044471025466918945, -0.012609605677425861, 0.0030719737987965345, 0.06974669545888901, 0.0799126848578453, 0.06036759912967682, 0.018308382481336594, 0.0016573105240240693, -0.10788854211568832, 0.035353776067495346, -0.04748218134045601, -5.2289603758026715e-8, 0.06690727919340134, -0.03158768638968468, 0.014555634930729866, 0.025885747745633125, -0.025917790830135345, 0.05647389218211174, 0.06630566716194153, 0.01664201356470585, -0.040548261255025864, -0.02627180889248848, -0.022383637726306915, 0.03375490382313728, -0.0833420380949974, 0.02973342500627041, 0.023418832570314407, 0.007021087687462568, 0.043222103267908096, 0.10371967405080795, -0.031827978789806366, -0.04302959144115448, -0.12104153633117676, -0.06657638400793076, 0.009351195767521858, -0.00003279516749898903, 0.04138580709695816, 0.02993621490895748, 0.050079211592674255, 0.016760513186454773, 0.03029220923781395, -0.014010746963322163, -0.07541956752538681, -0.023649949580430984, -0.008775942027568817, 0.009678127244114876, -0.02476576343178749, 0.09458382427692413, -0.09797206521034241, 0.05357958376407623, -0.0006611306453123689, 0.028278958052396774, -0.019066058099269867, -0.04926414415240288, -0.04432741925120354, -0.014082797802984715, 0.007373505271971226, 0.018377406522631645, 0.010281008668243885, 0.011644783429801464, 0.015489965677261353, -0.007480349391698837, -0.05156540870666504, -0.04540913179516792, 0.05861286818981171, 0.05594141036272049, 0.011745339259505272, 0.06845932453870773, -0.03531249985098839, -0.05653291940689087, 0.0510852187871933, -0.06938988715410233, 0.03593936562538147, 0.03241802006959915, 0.08649728447198868, 0.01964263804256916 ]
0.104153
{{% alert title="Note" %}} This tutorial applies only for new clusters. {{% /alert %}} Pod Security is an admission controller that carries out checks against the Kubernetes [Pod Security Standards](/docs/concepts/security/pod-security-standards/) when new pods are created. It is a feature GA'ed in v1.25. This tutorial shows you how to enforce the `baseline` Pod Security Standard at the cluster level which applies a standard configuration to all namespaces in a cluster. To apply Pod Security Standards to specific namespaces, refer to [Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss). If you are running a version of Kubernetes other than v{{< skew currentVersion >}}, check the documentation for that version. ## {{% heading "prerequisites" %}} Install the following on your workstation: - [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) - [kubectl](/docs/tasks/tools/) This tutorial demonstrates what you can configure for a Kubernetes cluster that you fully control. If you are learning how to configure Pod Security Admission for a managed cluster where you are not able to configure the control plane, read [Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss). ## Choose the right Pod Security Standard to apply [Pod Security Admission](/docs/concepts/security/pod-security-admission/) lets you apply built-in [Pod Security Standards](/docs/concepts/security/pod-security-standards/) with the following modes: `enforce`, `audit`, and `warn`. To gather information that helps you to choose the Pod Security Standards that are most appropriate for your configuration, do the following: 1. Create a cluster with no Pod Security Standards applied: ```shell kind create cluster --name psa-wo-cluster-pss ``` The output is similar to: ``` Creating cluster "psa-wo-cluster-pss" ... βœ“ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) πŸ–Ό βœ“ Preparing nodes πŸ“¦ βœ“ Writing configuration πŸ“œ βœ“ Starting control-plane πŸ•ΉοΈ βœ“ Installing CNI πŸ”Œ βœ“ Installing StorageClass πŸ’Ύ Set kubectl context to "kind-psa-wo-cluster-pss" You can now use your cluster with: kubectl cluster-info --context kind-psa-wo-cluster-pss Thanks for using kind! 😊 ``` 1. Set the kubectl context to the new cluster: ```shell kubectl cluster-info --context kind-psa-wo-cluster-pss ``` The output is similar to this: ``` Kubernetes control plane is running at https://127.0.0.1:61350 CoreDNS is running at https://127.0.0.1:61350/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ``` 1. Get a list of namespaces in the cluster: ```shell kubectl get ns ``` The output is similar to this: ``` NAME STATUS AGE default Active 9m30s kube-node-lease Active 9m32s kube-public Active 9m32s kube-system Active 9m32s local-path-storage Active 9m26s ``` 1. Use `--dry-run=server` to understand what happens when different Pod Security Standards are applied: 1. Privileged ```shell kubectl label --dry-run=server --overwrite ns --all \ pod-security.kubernetes.io/enforce=privileged ``` The output is similar to: ``` namespace/default labeled namespace/kube-node-lease labeled namespace/kube-public labeled namespace/kube-system labeled namespace/local-path-storage labeled ``` 2. Baseline ```shell kubectl label --dry-run=server --overwrite ns --all \ pod-security.kubernetes.io/enforce=baseline ``` The output is similar to: ``` namespace/default labeled namespace/kube-node-lease labeled namespace/kube-public labeled Warning: existing pods in namespace "kube-system" violate the new PodSecurity enforce level "baseline:latest" Warning: etcd-psa-wo-cluster-pss-control-plane (and 3 other pods): host namespaces, hostPath volumes Warning: kindnet-vzj42: non-default capabilities, host namespaces, hostPath volumes Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged namespace/kube-system labeled namespace/local-path-storage labeled ``` 3. Restricted ```shell kubectl label --dry-run=server --overwrite ns --all \ pod-security.kubernetes.io/enforce=restricted ``` The output is similar to: ``` namespace/default labeled namespace/kube-node-lease labeled namespace/kube-public labeled Warning: existing pods in namespace "kube-system" violate the new PodSecurity enforce level "restricted:latest" Warning: coredns-7bb9c7b568-hsptc (and 1 other pod): unrestricted capabilities, runAsNonRoot != true, seccompProfile Warning: etcd-psa-wo-cluster-pss-control-plane (and 3 other pods): host namespaces, hostPath volumes, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot != true Warning: kindnet-vzj42: non-default capabilities, host namespaces, hostPath volumes, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot != true, seccompProfile Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot !=
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/cluster-level-pss.md
[ 0.05837471783161163, 0.0011229654774069786, 0.026817720383405685, 0.003998348489403725, 0.04591244459152222, -0.013314750976860523, 0.019830351695418358, -0.02429499477148056, 0.03487451747059822, 0.0398259311914444, 0.02757817879319191, -0.034655891358852386, 0.003463897155597806, 0.015764346346259117, 0.013291856274008751, -0.013668586499989033, 0.06548354029655457, -0.012656445614993572, 0.012325912714004517, -0.0006691941525787115, 0.037313416600227356, -0.01303285825997591, 0.04918474704027176, -0.00250870524905622, -0.10170387476682663, -0.0014055401552468538, -0.046970345079898834, 0.0651606097817421, -0.0032259293366223574, -0.03117465227842331, -0.024261105805635452, 0.003805141896009445, 0.11891878396272659, 0.05165616050362587, 0.0941573902964592, 0.01998615451157093, 0.05286071449518204, -0.04412448778748512, -0.05571126192808151, 0.020371589809656143, 0.023951025679707527, -0.06735700368881226, -0.08907438814640045, 0.008837742730975151, -0.043386053293943405, -0.019272634759545326, -0.0400194451212883, -0.09604330360889435, -0.013934385031461716, -0.016797026619315147, 0.03193090856075287, -0.08903368562459946, 0.07505574077367783, -0.01913381926715374, 0.037490978837013245, 0.029985466971993446, -0.02135985903441906, 0.10056785494089127, 0.08549520373344421, 0.015433819964528084, 0.04539904370903969, -0.06889256089925766, -0.018332570791244507, -0.034059926867485046, -0.01360996812582016, -0.004188313614577055, -0.01759815588593483, 0.07005590945482254, 0.013812985271215439, 0.022000446915626526, 0.03960278257727623, 0.021348852664232254, 0.012788756750524044, -0.024318866431713104, -0.02623452991247177, 0.02841075137257576, -0.030278977006673813, 0.06960777193307877, 0.006368608213961124, -0.052157096564769745, -0.019639454782009125, 0.0106308963149786, 0.03308200463652611, -0.006994656752794981, -0.05483587086200714, 0.07954028248786926, -0.047039467841386795, -0.07965131849050522, 0.04190823808312416, 0.016668876633048058, 0.0400143638253212, -0.15092577040195465, 0.04085120931267738, -0.04688341170549393, 0.058236800134181976, -0.01963849738240242, -0.04141084849834442, -0.022967040538787842, 0.0007058482733555138, 0.00253543583676219, -0.004931361880153418, -0.05758299678564072, -0.02436203695833683, 0.009682442992925644, 0.10018685460090637, -0.016010601073503494, -0.01465426106005907, -0.03938240930438042, 0.055436696857213974, 0.07681265473365784, -0.0004213073698338121, 0.035855259746313095, 0.0021378735546022654, 0.029132481664419174, -0.025786368176341057, -0.040297981351614, 0.01631973311305046, 0.009452089667320251, 0.06926670670509338, 0.04517960175871849, 0.11526257544755936, -0.06458980590105057, -0.0005368469282984734, 0.004041233099997044, -0.06712312996387482, 0.02951541543006897, -0.04555193707346916, 1.3699445344998141e-33, 0.03289171680808067, -0.003339120652526617, -0.0271943137049675, -0.011025992222130299, 0.014921894297003746, -0.11564157903194427, -0.06484206020832062, 0.012593942694365978, -0.035968177020549774, 0.00010571174061624333, -0.0336819589138031, 0.0502256378531456, 0.0547499842941761, -0.1024961993098259, -0.00026330346008762717, 0.06669700145721436, -0.06696759164333344, 0.08279670029878616, 0.127245232462883, 0.02355346642434597, 0.028069157153367996, -0.0788443461060524, -0.01876029372215271, 0.011098106391727924, 0.03965906798839569, -0.004445756319910288, -0.010749232955276966, -0.11221520602703094, 0.0007772221579216421, 0.011075538583099842, -0.0668637827038765, -0.050563473254442215, 0.09188640862703323, 0.012139870785176754, -0.10237793624401093, -0.01743469573557377, 0.02296636998653412, 0.03829953819513321, -0.10016729682683945, -0.09077280759811401, 0.034482017159461975, -0.019768001511693, -0.012349041178822517, -0.002263292670249939, 0.09915440529584885, 0.02497876062989235, 0.038553811609745026, -0.03287714719772339, 0.11645648628473282, 0.03509967029094696, -0.09246405959129333, -0.08039014786481857, 0.01465749554336071, -0.013073441572487354, -0.009165712632238865, -0.04910072311758995, 0.043709807097911835, -0.04642188549041748, -0.07789484411478043, -0.06003502383828163, -0.05338772386312485, -0.0037895706482231617, 0.020458674058318138, -0.03811988607048988, 0.013377332128584385, -0.005639801267534494, -0.03970188647508621, 0.05094477906823158, 0.03748505935072899, 0.02405310794711113, -0.14165014028549194, 0.02283119224011898, -0.05473977327346802, 0.09372378885746002, -0.04619833081960678, -0.10359732061624527, 0.01706557348370552, 0.06983890384435654, -0.047421857714653015, 0.03410201147198677, -0.0041789645329117775, -0.005086228251457214, -0.01638472080230713, 0.09567205607891083, -0.012035993859171867, -0.012591990642249584, -0.0069212098605930805, 0.024442460387945175, -0.06505845487117767, 0.03189624473452568, 0.033505719155073166, -0.0729428380727768, -0.026989972218871117, 0.07000655680894852, -0.09997477382421494, -2.8537202685134123e-33, 0.11441127955913544, -0.016964254900813103, -0.04894308000802994, -0.0027519213035702705, -0.04969720542430878, 0.0341167151927948, -0.01292460598051548, 0.0708770751953125, 0.010545162484049797, -0.06016992777585983, 0.006018432788550854, -0.01716938056051731, 0.09147883206605911, 0.0012929339427500963, -0.04757240042090416, 0.026674868538975716, -0.11194933950901031, 0.015450253151357174, -0.017105096951127052, 0.014996778219938278, -0.024801068007946014, -0.020279046148061752, 0.004341202322393656, 0.030071422457695007, 0.01419034507125616, 0.0069945757277309895, 0.004718884825706482, 0.022324077785015106, -0.04410528764128685, 0.0014165551401674747, -0.017958462238311768, -0.069123774766922, -0.049084000289440155, 0.0681222453713417, 0.015302332118153572, -0.09486657381057739, -0.022300248965620995, -0.002908918773755431, 0.0205752681940794, 0.017170602455735207, 0.061833396553993225, 0.07706961780786514, -0.06277403980493546, -0.02323826588690281, -0.07495681941509247, 0.0346522331237793, 0.09453271329402924, -0.0031263793352991343, -0.000003716858827829128, -0.11856632679700851, -0.010538001544773579, -0.06899859756231308, -0.048104178160429, 0.05089782923460007, -0.050016678869724274, 0.0394984595477581, 0.041486889123916626, 0.05953991040587425, -0.08541623502969742, 0.06138752028346062, 0.06592399626970291, -0.09181169420480728, 0.018647342920303345, 0.03696487843990326, -0.0407719649374485, -0.06030217930674553, -0.02706190198659897, 0.11752550303936005, 0.009439179673790932, 0.005955525673925877, -0.02860788069665432, -0.029513947665691376, 0.033937036991119385, 0.02921869419515133, -0.012292828410863876, -0.04058504104614258, 0.08437936753034592, -0.05442981421947479, 0.006617808248847723, 0.008159137330949306, -0.03553806245326996, 0.06439483910799026, -0.09519976377487183, 0.05073363706469536, 0.07374197989702225, 0.11712201684713364, 0.09145291894674301, 0.057103708386421204, 0.01933327130973339, 0.07998098433017731, 0.004083628766238689, 0.008193478919565678, 0.00033349244040437043, 0.0958067923784256, -0.06870000064373016, -5.169031425111825e-8, 0.040759921073913574, -0.016176337376236916, -0.017604298889636993, 0.04718595743179321, 0.07257170975208282, 0.03556332364678383, -0.02590291202068329, -0.06058533862233162, -0.05644293874502182, 0.003545940387994051, -0.04857593774795532, 0.07874689251184464, -0.08011133968830109, -0.027789443731307983, 0.030793756246566772, -0.0540095679461956, -0.050858382135629654, 0.11395437270402908, -0.03746063634753227, -0.04108355939388275, -0.07449662685394287, -0.05889624357223511, -0.01853850856423378, -0.04960593581199646, 0.006710932124406099, 0.060213129967451096, 0.02859068103134632, -0.01341192051768303, 0.05669887363910675, 0.011147978715598583, -0.03929959610104561, -0.002213281812146306, -0.0630641058087349, 0.03244119510054588, -0.02175358682870865, 0.07844575494527817, -0.035549063235521317, 0.05320354923605919, 0.05583161860704422, 0.08922195434570312, -0.05139957740902901, -0.01343498658388853, -0.04518003761768341, -0.006340815685689449, -0.07311920076608658, 0.07638804614543915, -0.0014014204498380423, 0.05430756136775017, 0.025058003142476082, 0.008820255286991596, 0.00028969976119697094, -0.03243616968393326, -0.02561577782034874, 0.0788763239979744, -0.03550257533788681, 0.015411232598125935, -0.008852771483361721, -0.0645039901137352, 0.017384879291057587, -0.034135058522224426, 0.030564364045858383, -0.007819821126759052, 0.03355105221271515, 0.01849065162241459 ]
0.17451
hostPath volumes, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot != true Warning: kindnet-vzj42: non-default capabilities, host namespaces, hostPath volumes, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot != true, seccompProfile Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged, allowPrivilegeEscalation != false, unrestricted capabilities, restricted volume types, runAsNonRoot != true, seccompProfile namespace/kube-system labeled Warning: existing pods in namespace "local-path-storage" violate the new PodSecurity enforce level "restricted:latest" Warning: local-path-provisioner-d6d9f7ffc-lw9lh: allowPrivilegeEscalation != false, unrestricted capabilities, runAsNonRoot != true, seccompProfile namespace/local-path-storage labeled ``` From the previous output, you'll notice that applying the `privileged` Pod Security Standard shows no warnings for any namespaces. However, `baseline` and `restricted` standards both have warnings, specifically in the `kube-system` namespace. ## Set modes, versions and standards In this section, you apply the following Pod Security Standards to the `latest` version: \* `baseline` standard in `enforce` mode. \* `restricted` standard in `warn` and `audit` mode. The `baseline` Pod Security Standard provides a convenient middle ground that allows keeping the exemption list short and prevents known privilege escalations. Additionally, to prevent pods from failing in `kube-system`, you'll exempt the namespace from having Pod Security Standards applied. When you implement Pod Security Admission in your own environment, consider the following: 1. Based on the risk posture applied to a cluster, a stricter Pod Security Standard like `restricted` might be a better choice. 1. Exempting the `kube-system` namespace allows pods to run as `privileged` in this namespace. For real world use, the Kubernetes project strongly recommends that you apply strict RBAC policies that limit access to `kube-system`, following the principle of least privilege. To implement the preceding standards, do the following: 1. Create a configuration file that can be consumed by the Pod Security Admission Controller to implement these Pod Security Standards: ``` mkdir -p /tmp/pss cat < /tmp/pss/cluster-level-pss.yaml apiVersion: apiserver.config.k8s.io/v1 kind: AdmissionConfiguration plugins: - name: PodSecurity configuration: apiVersion: pod-security.admission.config.k8s.io/v1 kind: PodSecurityConfiguration defaults: enforce: "baseline" enforce-version: "latest" audit: "restricted" audit-version: "latest" warn: "restricted" warn-version: "latest" exemptions: usernames: [] runtimeClasses: [] namespaces: [kube-system] EOF ``` {{< 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 >}} 1. Configure the API server to consume this file during cluster creation: ``` cat < /tmp/pss/cluster-config.yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane kubeadmConfigPatches: - | kind: ClusterConfiguration apiServer: extraArgs: admission-control-config-file: /etc/config/cluster-level-pss.yaml extraVolumes: - name: accf hostPath: /etc/config mountPath: /etc/config readOnly: false pathType: "DirectoryOrCreate" extraMounts: - hostPath: /tmp/pss containerPath: /etc/config # optional: if set, the mount is read-only. # default false readOnly: false # optional: if set, the mount needs SELinux relabeling. # default false selinuxRelabel: false # optional: set propagation mode (None, HostToContainer or Bidirectional) # see https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation # default None propagation: None EOF ``` {{}} If you use Docker Desktop with \*kind\* on macOS, you can add `/tmp` as a Shared Directory under the menu item \*\*Preferences > Resources > File Sharing\*\*. {{}} 1. Create a cluster that uses Pod Security Admission to apply these Pod Security Standards: ```shell kind create cluster --name psa-with-cluster-pss --config /tmp/pss/cluster-config.yaml ``` The output is similar to this: ``` Creating cluster "psa-with-cluster-pss" ... βœ“ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) πŸ–Ό βœ“ Preparing nodes πŸ“¦ βœ“ Writing configuration πŸ“œ βœ“ Starting control-plane πŸ•ΉοΈ βœ“ Installing CNI πŸ”Œ βœ“ Installing StorageClass πŸ’Ύ Set kubectl context to "kind-psa-with-cluster-pss" You can now use your cluster with: kubectl cluster-info --context kind-psa-with-cluster-pss Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community πŸ™‚ ``` 1. Point kubectl to the cluster: ```shell kubectl cluster-info --context kind-psa-with-cluster-pss ``` The output is similar to this: ``` Kubernetes control plane is running at https://127.0.0.1:63855 CoreDNS is
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/cluster-level-pss.md
[ 0.053780775517225266, -0.02865583635866642, 0.003511349903419614, -0.03824666887521744, 0.016292717307806015, 0.006536639761179686, -0.040295716375112534, -0.035089172422885895, 0.032358791679143906, 0.0655631273984909, 0.010668064467608929, -0.06719645112752914, -0.0066036563366651535, 0.00968005321919918, 0.012037686072289944, 0.023258375003933907, 0.051321860402822495, 0.005246487446129322, -0.0344017818570137, 0.03442265838384628, 0.015611394308507442, -0.0025357590056955814, 0.014910237863659859, -0.004718973767012358, -0.023359157145023346, -0.06551297008991241, -0.08536490052938461, 0.06002217158675194, 0.0006055054836906493, -0.06060410290956497, 0.016499780118465424, 0.03133813291788101, -0.009801034815609455, -0.0011855870252475142, 0.1322452276945114, 0.036857541650533676, 0.029807325452566147, -0.05876462906599045, -0.1219700425863266, -0.052736546844244, 0.07435129582881927, -0.06887470185756683, -0.07528487592935562, 0.0425545759499073, -0.047081828117370605, -0.0008417245117016137, 0.004257904831320047, -0.0797528475522995, 0.03736795485019684, -0.033983632922172546, -0.0146032040938735, -0.04526525363326073, 0.041675809770822525, 0.05145523324608803, 0.04645833000540733, -0.039092980325222015, -0.042603038251399994, 0.08752050995826721, 0.1411472111940384, 0.047337889671325684, 0.03378681838512421, -0.04060249403119087, 0.0094784339889884, -0.016086257994174957, -0.04813959077000618, -0.016522131860256195, -0.021090826019644737, 0.0046943542547523975, -0.03570156544446945, 0.006715209688991308, -0.008412804454565048, 0.061068881303071976, -0.05849188566207886, 0.039910849183797836, 0.05751538649201393, 0.020050955936312675, -0.01818307302892208, 0.047873951494693756, 0.04095544293522835, -0.11899439245462418, 0.00027482048608362675, 0.049125563353300095, 0.012491372413933277, 0.0010073567973449826, -0.07629232853651047, 0.0063186511397361755, -0.03662719950079918, -0.0754915326833725, 0.08250443637371063, 0.0019488927209749818, 0.08439966291189194, -0.04776608198881149, 0.03791237249970436, -0.03606562316417694, 0.0573885515332222, -0.05941919609904289, -0.013245893642306328, 0.013745774514973164, 0.012139689177274704, 0.000973513990174979, -0.030791455879807472, -0.02234627492725849, -0.00934581458568573, 0.028507186099886894, 0.05696600303053856, -0.03489377722144127, 0.00487133814021945, 0.07684656977653503, 0.009954285807907581, 0.01874854788184166, -0.0332326777279377, 0.024504898115992546, 0.0009860604768618941, 0.00776780815795064, 0.015118219889700413, 0.023407557979226112, -0.0385117381811142, -0.010130159556865692, 0.029023414477705956, 0.027901802211999893, 0.0021086884662508965, -0.11612284183502197, 0.0051191081292927265, -0.004951337818056345, -0.042030010372400284, -0.006164069287478924, -0.0029043774120509624, 1.1499883274613517e-32, 0.07669874280691147, -0.06654386967420578, 0.03204626962542534, 0.027948467060923576, 0.0672375038266182, -0.10609951615333557, -0.022937189787626266, -0.027089932933449745, -0.12119411677122116, -0.008537684567272663, -0.0803072452545166, 0.026589296758174896, -0.042469386011362076, 0.0010943561792373657, 0.06653650850057602, -0.03106982819736004, -0.0591001883149147, 0.06458596885204315, 0.11620970070362091, -0.016695475205779076, 0.015232028439640999, -0.0326547734439373, 0.0023904768750071526, -0.05830914154648781, -0.014629953540861607, -0.0017464078264310956, 0.05166154354810715, -0.0980445072054863, 0.05377521738409996, 0.0317692793905735, -0.055370792746543884, -0.014695837162435055, 0.06392470002174377, -0.018993806093931198, -0.09645228832960129, -0.014706484973430634, -0.01755170337855816, 0.023859865963459015, -0.13343584537506104, -0.02164503000676632, 0.043285682797431946, -0.020548051223158836, -0.013638048432767391, -0.006946276873350143, 0.05557754263281822, -0.052445847541093826, 0.012087167240679264, -0.03528304025530815, 0.041903045028448105, 0.11564265936613083, -0.06997120380401611, -0.0176069438457489, 0.04942327365279198, -0.04447188228368759, 0.05638238042593002, 0.00864763930439949, 0.030081886798143387, -0.011180144734680653, -0.08528310060501099, -0.07735125720500946, -0.035192761570215225, 0.07827290147542953, 0.016277989372611046, -0.0050483341328799725, 0.03639954701066017, -0.008588232100009918, -0.01624104008078575, 0.0500902459025383, -0.005472410935908556, 0.018851296976208687, -0.08982624858617783, 0.005764182191342115, -0.02745579369366169, 0.061677053570747375, -0.028203845024108887, -0.09912043809890747, -0.014538457617163658, 0.0006462266319431365, -0.06234395131468773, -0.01660268008708954, -0.0306814257055521, -0.0630069226026535, -0.04355185851454735, 0.06029173359274864, -0.06051085889339447, -0.03035556897521019, -0.019452771171927452, 0.05016138777136803, -0.017081191763281822, 0.01542434561997652, 0.09323626011610031, -0.013948981650173664, -0.02219035103917122, 0.007675371132791042, -0.1688997894525528, -1.156279132416571e-32, 0.03067193366587162, -0.025670329108834267, -0.027615930885076523, -0.03760337084531784, -0.0010793226538226008, 0.04337327927350998, -0.02297826111316681, 0.05886082351207733, -0.013899039477109909, -0.02900443598628044, -0.00922299548983574, -0.00538264587521553, 0.08583451062440872, -0.08087632060050964, -0.06316766887903214, -0.029359115287661552, -0.029108911752700806, -0.03356906399130821, -0.005507494322955608, 0.07484940439462662, -0.08491938561201096, 0.07779785245656967, 0.031918324530124664, 0.08827699720859528, -0.014357247389853, 0.030759593471884727, 0.017720429226756096, 0.10238494724035263, -0.047753408551216125, -0.002569969044998288, 0.07332616299390793, -0.05257922783493996, -0.08750003576278687, 0.013651442714035511, 0.03348256275057793, -0.08459949493408203, -0.002201980445533991, 0.04316194728016853, -0.04104234650731087, -0.0714431181550026, 0.0208430252969265, -0.005678178742527962, -0.05182117596268654, -0.02845662459731102, -0.010500611737370491, 0.020071381703019142, 0.08861397206783295, -0.041343286633491516, 0.016726655885577202, -0.0572640523314476, 0.03537306189537048, -0.034095924347639084, 0.03517073765397072, 0.08714664727449417, -0.04061214625835419, 0.0634501650929451, 0.03516571596264839, 0.03152427077293396, -0.03228539973497391, 0.03838929161429405, 0.11670811474323273, -0.0861823707818985, -0.02337690256536007, 0.00850354228168726, -0.005811386276036501, -0.0381443127989769, -0.025648463517427444, 0.09326834231615067, -0.014879046007990837, 0.0309403445571661, -0.024903247132897377, -0.06029083952307701, -0.0011981979478150606, -0.01870415359735489, 0.025027722120285034, -0.05162609741091728, 0.01932913437485695, -0.040798597037792206, -0.030109800398349762, 0.04365888610482216, -0.0424901582300663, 0.07634616643190384, -0.0598052479326725, 0.0033468841575086117, 0.08203921467065811, -0.01135387271642685, 0.049145594239234924, 0.0319947749376297, 0.03346691280603409, 0.09840374439954758, -0.010917154140770435, 0.017656467854976654, -0.08659055829048157, 0.1413581371307373, 0.010768637992441654, -5.7355695304295296e-8, 0.10638608783483505, -0.01898747868835926, -0.1063176691532135, 0.04764918237924576, 0.07172632217407227, -0.026395799592137337, -0.0028153755702078342, -0.03919750452041626, -0.08191151916980743, 0.019313931465148926, 0.028958076611161232, 0.04896623268723488, -0.11093269288539886, 0.020954621955752373, 0.049010034650564194, -0.06700647622346878, -0.05165616422891617, 0.07271578907966614, 0.0014168494381010532, -0.08874895423650742, -0.047323763370513916, -0.08883658796548843, -0.010983607731759548, -0.036322563886642456, 0.033919915556907654, 0.05041362717747688, 0.08441612124443054, -0.05372779443860054, 0.06598402559757233, 0.024589506909251213, -0.05747193843126297, -0.01983967050909996, -0.08796024322509766, 0.04249690845608711, -0.04958593100309372, 0.11540521681308746, -0.07368093729019165, 0.07883397489786148, 0.023173896595835686, 0.030779005959630013, -0.009000672027468681, 0.015054105781018734, -0.0002126428298652172, 0.0015643233200535178, -0.0015852220822125673, 0.06752939522266388, -0.042454157024621964, 0.12895804643630981, 0.01991240307688713, -0.001436599064618349, -0.015303507447242737, -0.0364484041929245, -0.03440696373581886, 0.0415668785572052, -0.010627737268805504, 0.039623599499464035, -0.05328584834933281, -0.005371154751628637, -0.0218568854033947, 0.0459386445581913, 0.06207698956131935, 0.007796047255396843, 0.015758061781525612, -0.0017172805964946747 ]
0.145622
now use your cluster with: kubectl cluster-info --context kind-psa-with-cluster-pss Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community πŸ™‚ ``` 1. Point kubectl to the cluster: ```shell kubectl cluster-info --context kind-psa-with-cluster-pss ``` The output is similar to this: ``` Kubernetes control plane is running at https://127.0.0.1:63855 CoreDNS is running at https://127.0.0.1:63855/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ``` 1. Create a Pod in the default namespace: {{% code\_sample file="security/example-baseline-pod.yaml" %}} ```shell kubectl apply -f https://k8s.io/examples/security/example-baseline-pod.yaml ``` The pod is started normally, but the output includes a warning: ``` Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "nginx" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "nginx" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "nginx" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "nginx" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost") pod/nginx created ``` ## Clean up Now delete the clusters which you created above by running the following command: ```shell kind delete cluster --name psa-with-cluster-pss ``` ```shell kind delete cluster --name psa-wo-cluster-pss ``` ## {{% heading "whatsnext" %}} - Run a [shell script](/examples/security/kind-with-cluster-level-baseline-pod-security.sh) to perform all the preceding steps at once: 1. Create a Pod Security Standards based cluster level Configuration 2. Create a file to let API server consume this configuration 3. Create a cluster that creates an API server with this configuration 4. Set kubectl context to this new cluster 5. Create a minimal pod yaml file 6. Apply this file to create a Pod in the new cluster - [Pod Security Admission](/docs/concepts/security/pod-security-admission/) - [Pod Security Standards](/docs/concepts/security/pod-security-standards/) - [Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss/)
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/cluster-level-pss.md
[ 0.023310044780373573, -0.0036574830301105976, -0.01602492481470108, 0.030435340479016304, -0.04203064367175102, 0.03448641672730446, -0.04373064637184143, -0.006647903937846422, 0.06865672767162323, 0.09046610444784164, -0.04151047021150589, -0.05937619507312775, -0.05349080264568329, -0.034786902368068695, 0.07471109181642532, 0.018307626247406006, 0.07432610541582108, -0.048167433589696884, 0.00859992764890194, -0.040994420647621155, -0.009836331941187382, 0.013084014877676964, 0.0030518483836203814, 0.03255952522158623, -0.08801713585853577, -0.02143324539065361, -0.03487522527575493, 0.011871004477143288, 0.010819027200341225, -0.004561869893223047, -0.033247966319322586, 0.02422168292105198, -0.016209235414862633, 0.04013722762465477, 0.11176254600286484, 0.07981330901384354, 0.06431995332241058, 0.00855273101478815, -0.09549637883901596, 0.028165580704808235, 0.14428500831127167, -0.018995851278305054, -0.05283569172024727, -0.020049136132001877, -0.005593179725110531, 0.004238346125930548, -0.04445458948612213, 0.0038900617510080338, 0.037160273641347885, -0.0722430869936943, 0.013674738816916943, -0.08919534832239151, 0.08635647594928741, -0.018108883872628212, 0.019415173679590225, 0.06343607604503632, 0.021036989986896515, 0.06951888650655746, 0.11865011602640152, -0.028341084718704224, 0.022113973274827003, -0.03894207626581192, 0.05068786069750786, -0.06628537178039551, -0.022604500874876976, 0.004220263101160526, 0.04030849412083626, 0.01941055618226528, -0.00026434328174218535, -0.004304947331547737, 0.06474330276250839, 0.04181713983416557, -0.03606767579913139, -0.042786855250597, 0.001353286555968225, 0.029834287241101265, -0.017535405233502388, -0.002069341018795967, -0.012186510488390923, -0.04795802757143974, 0.01003539189696312, 0.03287326917052269, 0.014509318396449089, 0.0400429293513298, -0.09212647378444672, -0.020426684990525246, -0.019792446866631508, -0.1316157579421997, 0.043769534677267075, 0.0022683388087898493, -0.015106950886547565, -0.05880790576338768, 0.007926381193101406, -0.09463049471378326, 0.0598144605755806, 0.002415366703644395, -0.0173004362732172, -0.010336225852370262, 0.014944210648536682, -0.02120506577193737, 0.05813027173280716, 0.04316342622041702, -0.04284854978322983, 0.0200569536536932, 0.010586949996650219, 0.013837761245667934, -0.04735345020890236, 0.011090235784649849, 0.027294769883155823, 0.10598725080490112, -0.013816258870065212, 0.05418992042541504, -0.02641294151544571, 0.02674591913819313, 0.006295329891145229, -0.011947286315262318, 0.051136281341314316, -0.02695520967245102, 0.016000155359506607, 0.012255555018782616, 0.03477252647280693, -0.09583933651447296, -0.04659508541226387, 0.04549937695264816, -0.04199516028165817, 0.04731638357043266, -0.025062397122383118, 1.3931201403102448e-33, 0.04972335323691368, -0.03830813989043236, 0.07385962456464767, -0.05895408242940903, 0.0059334635734558105, -0.10555562376976013, -0.07199019193649292, -0.03697751834988594, -0.03938033804297447, -0.008444251492619514, -0.10690564662218094, 0.040277425199747086, 0.04082572087645531, -0.08636703342199326, 0.008862021379172802, 0.040766771882772446, -0.016401546075940132, 0.02292512357234955, 0.08385412395000458, 0.044445283710956573, 0.04368426650762558, -0.059957291930913925, 0.005071206483989954, -0.019145086407661438, -0.04918516054749489, -0.0005817097844555974, -0.010291069746017456, -0.10720604658126831, 0.010854223743081093, -0.00896094273775816, -0.01959695853292942, -0.031074274331331253, 0.04324966296553612, 0.018802832812070847, -0.15364810824394226, -0.034287940710783005, 0.052054617553949356, 0.02303590252995491, -0.11279437690973282, -0.06630326062440872, 0.025593677535653114, 0.015131430700421333, -0.010741375386714935, -0.0005369079299271107, 0.07243607938289642, -0.014204327017068863, -0.0022169756703078747, -0.0578758642077446, 0.047373004257678986, 0.0807795450091362, -0.039074502885341644, -0.05231525003910065, 0.023150796070694923, -0.04928423836827278, 0.047989051789045334, 0.025503206998109818, 0.09133849292993546, -0.04190462455153465, -0.04211436212062836, -0.03219980746507645, 0.019349118694663048, -0.022326244041323662, -0.0033857969101518393, -0.06172703579068184, 0.06733397394418716, 0.006482363678514957, -0.0267857126891613, 0.10510493814945221, -0.011728968471288681, 0.0006413098308257759, -0.08035288006067276, 0.10609615594148636, -0.04920859634876251, 0.07762093096971512, 0.0059028975665569305, -0.12599678337574005, -0.0350014865398407, 0.010546574369072914, -0.08528188616037369, 0.09568309038877487, 0.07673794031143188, -0.03542526811361313, -0.05353658273816109, 0.04263118654489517, -0.019601669162511826, -0.0006885475013405085, 0.0045830244198441505, 0.052740421146154404, -0.07653577625751495, 0.006034350022673607, 0.03041553683578968, -0.027863794937729836, 0.04770798608660698, 0.10923805087804794, -0.11902113258838654, -2.8444950255823575e-33, 0.022417308762669563, -0.03947780653834343, -0.026283277198672295, 0.02858385629951954, -0.00015469591016881168, 0.024208061397075653, -0.021525053307414055, 0.11326907575130463, -0.032757800072431564, -0.041306350380182266, -0.033345308154821396, -0.08055544644594193, 0.07674108445644379, -0.020040763542056084, -0.03928887099027634, 0.036017581820487976, -0.034358639270067215, 0.009786183014512062, 0.022239726036787033, 0.020434778183698654, -0.026015913113951683, -0.009975162334740162, 0.023223377764225006, 0.03695407882332802, -0.01746603474020958, -0.0034338224213570356, 0.024671509861946106, 0.041378844529390335, -0.0878201499581337, -0.0022698217071592808, 0.019825799390673637, -0.028183743357658386, -0.025975514203310013, 0.07950516790151596, -0.0583626888692379, -0.03542986512184143, -0.019152719527482986, -0.007858604192733765, 0.04234148934483528, -0.07954508811235428, -0.004213365260511637, 0.05821918696165085, -0.05940425023436546, -0.004918338265269995, -0.036738429218530655, 0.020936978980898857, 0.07946059852838516, 0.018373554572463036, -0.006877328269183636, -0.01584436744451523, -0.006841923110187054, -0.010104644112288952, -0.06328654289245605, 0.11363723874092102, -0.009252497926354408, 0.04987691342830658, -0.012531863525509834, 0.08235909044742584, -0.033084891736507416, -0.002391150686889887, 0.03496727719902992, -0.13780511915683746, -0.0013231153134256601, 0.08320455998182297, 0.024080496281385422, -0.013413564302027225, 0.05993106961250305, 0.04308435693383217, 0.027851970866322517, 0.012528789229691029, -0.020689118653535843, 0.053727149963378906, 0.02686253748834133, 0.053760699927806854, 0.002449569059535861, -0.025091350078582764, 0.049129419028759, 0.022937379777431488, 0.01990571990609169, 0.05492391437292099, -0.06125888228416443, 0.029641462489962578, -0.09788352996110916, -0.036587465554475784, 0.08492329716682434, 0.10502635687589645, 0.09632407873868942, 0.10466599464416504, 0.04390094056725502, 0.07225735485553741, -0.005213914904743433, -0.01822015643119812, -0.025470172986388206, 0.07212332636117935, -0.04285234585404396, -5.12004056929527e-8, 0.10919112712144852, -0.011502188630402088, -0.07991495728492737, 0.00458673806861043, 0.02953389100730419, 0.024648698046803474, 0.005066571291536093, -0.031442247331142426, -0.09803353250026703, -0.023586886003613472, -0.038842909038066864, 0.07463686913251877, -0.08312516659498215, -0.0044297887943685055, 0.04219130054116249, -0.058693479746580124, 0.028452198952436447, 0.06481197476387024, 0.029049931094050407, -0.07462912052869797, -0.05705922096967697, -0.09333602339029312, -0.02918914519250393, -0.0004706273030024022, -0.008100969716906548, 0.05972175672650337, 0.04213519021868706, -0.0512431263923645, 0.04489634931087494, -0.03193124011158943, -0.0909373015165329, -0.02670600637793541, -0.09509509056806564, 0.006805111188441515, -0.04810410365462303, 0.05179782956838608, -0.051832910627126694, 0.06506471335887909, 0.007661404088139534, 0.054717276245355606, 0.02876252308487892, 0.0011203148169443011, -0.060604605823755264, -0.028805162757635117, -0.004034807439893484, 0.09599360823631287, 0.04469110816717148, 0.07405300438404083, 0.0026272544637322426, -0.01101753395050764, -0.014665823429822922, -0.08170459419488907, -0.007564113009721041, 0.032640241086483, -0.05867037922143936, -0.002841637236997485, -0.051060184836387634, -0.08284735679626465, 0.007362500298768282, 0.0002985411847475916, 0.013294767588376999, -0.010301475413143635, -0.0766684040427208, 0.026265252381563187 ]
0.108901
{{< feature-state for\_k8s\_version="v1.19" state="stable" >}} Seccomp stands for secure computing mode and has been a feature of the Linux kernel since version 2.6.12. It can be used to sandbox the privileges of a process, restricting the calls it is able to make from userspace into the kernel. Kubernetes lets you automatically apply seccomp profiles loaded onto a {{< glossary\_tooltip text="node" term\_id="node" >}} to your Pods and containers. Identifying the privileges required for your workloads can be difficult. In this tutorial, you will go through how to load seccomp profiles into a local Kubernetes cluster, how to apply them to a Pod, and how you can begin to craft profiles that give only the necessary privileges to your container processes. ## {{% heading "objectives" %}} \* Learn how to load seccomp profiles on a node \* Learn how to apply a seccomp profile to a container \* Observe auditing of syscalls made by a container process \* Observe behavior when a missing profile is specified \* Observe a violation of a seccomp profile \* Learn how to create fine-grained seccomp profiles \* Learn how to apply a container runtime default seccomp profile ## {{% heading "prerequisites" %}} In order to complete all steps in this tutorial, you must install [kind](/docs/tasks/tools/#kind) and [kubectl](/docs/tasks/tools/#kubectl). The commands used in the tutorial assume that you are using [Docker](https://www.docker.com/) as your container runtime. (The cluster that `kind` creates may use a different container runtime internally). You could also use [Podman](https://podman.io/) but in that case, you would have to follow specific [instructions](https://kind.sigs.k8s.io/docs/user/rootless/) in order to complete the tasks successfully. This tutorial shows some examples that are still beta (since v1.25) and others that use only generally available seccomp functionality. You should make sure that your cluster is [configured correctly](https://kind.sigs.k8s.io/docs/user/quick-start/#setting-kubernetes-version) for the version you are using. The tutorial also uses the `curl` tool for downloading examples to your computer. You can adapt the steps to use a different tool if you prefer. {{< note >}} It is not possible to apply a seccomp profile to a container running with `privileged: true` set in the container's `securityContext`. Privileged containers always run as `Unconfined`. {{< /note >}} ## Download example seccomp profiles {#download-profiles} The contents of these profiles will be explored later on, but for now go ahead and download them into a directory named `profiles/` so that they can be loaded into the cluster. {{< tabs name="tab\_with\_code" >}} {{< tab name="audit.json" >}} {{% code\_sample file="pods/security/seccomp/profiles/audit.json" %}} {{< /tab >}} {{< tab name="violation.json" >}} {{% code\_sample file="pods/security/seccomp/profiles/violation.json" %}} {{< /tab >}} {{< tab name="fine-grained.json" >}} {{% code\_sample file="pods/security/seccomp/profiles/fine-grained.json" %}} {{< /tab >}} {{< /tabs >}} Run these commands: ```shell mkdir ./profiles curl -L -o profiles/audit.json https://k8s.io/examples/pods/security/seccomp/profiles/audit.json curl -L -o profiles/violation.json https://k8s.io/examples/pods/security/seccomp/profiles/violation.json curl -L -o profiles/fine-grained.json https://k8s.io/examples/pods/security/seccomp/profiles/fine-grained.json ls profiles ``` You should see three profiles listed at the end of the final step: ``` audit.json fine-grained.json violation.json ``` ## Create a local Kubernetes cluster with kind For simplicity, [kind](https://kind.sigs.k8s.io/) can be used to create a single node cluster with the seccomp profiles loaded. Kind runs Kubernetes in Docker, so each node of the cluster is a container. This allows for files to be mounted in the filesystem of each container similar to loading files onto a node. {{% code\_sample file="pods/security/seccomp/kind.yaml" %}} Download that example kind configuration, and save it to a file named `kind.yaml`: ```shell curl -L -O https://k8s.io/examples/pods/security/seccomp/kind.yaml ``` You can set a specific Kubernetes version by setting the node's container image. See [Nodes](https://kind.sigs.k8s.io/docs/user/configuration/#nodes) within the kind documentation about configuration for more details on this. This tutorial assumes you are using Kubernetes {{< param "version" >}}. As a beta feature,
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/seccomp.md
[ 0.027684815227985382, 0.013379751704633236, 0.026118481531739235, -0.0024355535861104727, -0.02560477890074253, -0.0031473676208406687, 0.06641070544719696, 0.012598828412592411, -0.019100038334727287, 0.015392673201858997, -0.014009667560458183, -0.10453638434410095, 0.014519339427351952, -0.009991253726184368, 0.029621191322803497, -0.04124289005994797, 0.10880421847105026, 0.049035266041755676, -0.001550439279526472, -0.05252968519926071, -0.017193717882037163, -0.047686439007520676, 0.016236770898103714, 0.021471373736858368, -0.07735324651002884, -0.0066669899970293045, -0.008538857102394104, -0.006891257595270872, 0.026089347898960114, -0.005670742131769657, -0.0260396059602499, -0.004245662596076727, -0.018376873806118965, 0.026431726291775703, 0.09424068033695221, 0.07616867125034332, 0.041778311133384705, -0.11202013492584229, -0.052631162106990814, -0.025744520127773285, -0.01574760302901268, -0.0710238441824913, -0.15271702408790588, 0.040808968245983124, 0.005043714307248592, -0.02483290433883667, -0.01268922258168459, -0.07523002475500107, 0.0037483596242964268, -0.04739997908473015, 0.0062263961881399155, -0.05904260277748108, 0.06988779455423355, 0.03494052216410637, 0.0003897588758263737, 0.0024811159819364548, 0.03194585070014, 0.022616632282733917, 0.11530593782663345, 0.020209260284900665, 0.020134126767516136, -0.0682913139462471, -0.018805406987667084, -0.008401784114539623, 0.019001225009560585, 0.02284712716937065, 0.007399021647870541, 0.03984694555401802, 0.013339661993086338, 0.0151695990934968, -0.000786007207352668, -0.024770712479948997, -0.03142444044351578, -0.006200077477842569, -0.0009446793119423091, -0.008554755710065365, -0.09612894058227539, 0.02402574196457863, 0.008445894345641136, -0.1087820753455162, 0.042767737060785294, 0.08323339372873306, 0.04136406630277634, 0.00740889273583889, -0.08187571167945862, -0.0028712947387248278, 0.008313938044011593, -0.013048434630036354, 0.0701879933476448, 0.028204213827848434, 0.045184358954429626, -0.02111726440489292, 0.05567941814661026, -0.13634797930717468, 0.07458486407995224, -0.02008330076932907, -0.018309960141777992, -0.05245291069149971, 0.010526671074330807, 0.0034053525887429714, -0.03827615827322006, -0.00021604396170005202, -0.020850064232945442, 0.013128142803907394, 0.06228934973478317, 0.0038265916518867016, -0.04673576354980469, -0.016417304053902626, 0.023327259346842766, 0.06493110954761505, -0.015692923218011856, 0.08466978371143341, -0.07396559417247772, 0.034512974321842194, 0.040536507964134216, -0.003625046694651246, -0.019698994234204292, -0.011674086563289165, 0.05794908106327057, 0.09870728850364685, 0.08877819031476974, -0.09016910940408707, -0.019274534657597542, 0.03148913383483887, -0.03119828552007675, 0.01755731739103794, -0.0603557713329792, 3.64722762813142e-33, 0.0744360014796257, -0.05813898891210556, 0.0005621233722195029, 0.02495228685438633, 0.034181609749794006, -0.06952386349439621, -0.01564764603972435, -0.05762939900159836, -0.07931249588727951, 0.0018544549820944667, -0.05397820845246315, 0.053689781576395035, -0.004676657263189554, -0.017461741343140602, 0.0425795279443264, -0.03539690747857094, -0.06965965032577515, 0.05143379420042038, 0.12667132914066315, -0.01705600507557392, 0.04102044925093651, -0.02087419107556343, -0.041358478367328644, -0.0031938524916768074, 0.08178720623254776, -0.03180564567446709, -0.027324428781867027, -0.07262751460075378, 0.021252786740660667, 0.04790261760354042, -0.03413347154855728, -0.022715145722031593, 0.03665391728281975, 0.07292194664478302, -0.1030980721116066, -0.014891688711941242, -0.011130493134260178, -0.02561863325536251, 0.008985122665762901, -0.07692950963973999, 0.0592898465692997, -0.038794372230768204, 0.043999966233968735, -0.04287632554769516, -0.0005336669273674488, -0.013940789736807346, 0.012204314582049847, -0.031582921743392944, 0.07305771857500076, 0.013352242298424244, -0.021697571501135826, -0.03847997635602951, 0.0016396944411098957, -0.07104947417974472, 0.00395009433850646, -0.041676487773656845, 0.03567914292216301, -0.05173979699611664, -0.05523230880498886, -0.0019219014793634415, -0.0608040876686573, 0.024968355894088745, -0.02782447077333927, -0.034715913236141205, -0.0019621364772319794, 0.015122785232961178, -0.05332028120756149, 0.07482636719942093, 0.03525107353925705, 0.002266214694827795, -0.1648448407649994, 0.0800979882478714, -0.02762671746313572, 0.03276803344488144, -0.048160623759031296, -0.05824838951230049, 0.030499998480081558, 0.04354556277394295, -0.14211022853851318, 0.08229420334100723, -0.004007645417004824, -0.03489052876830101, -0.020086271688342094, 0.06554248929023743, 0.031097950413823128, -0.03404645249247551, -0.042228035628795624, 0.03092365339398384, -0.0670335441827774, 0.015862364321947098, 0.05738558620214462, -0.043841149657964706, -0.02152961865067482, 0.08096887916326523, -0.19618883728981018, -5.7603337420519966e-33, 0.06367222964763641, -0.02639279142022133, 0.009652024134993553, 0.016772285103797913, -0.02085789665579796, 0.031240377575159073, -0.013766874559223652, -0.022042440250515938, -0.03797490522265434, -0.051683731377124786, -0.08931391686201096, -0.015308617614209652, 0.07082171738147736, 0.013362225145101547, -0.04858851060271263, 0.023540839552879333, -0.13389785587787628, 0.027875497937202454, 0.001688350923359394, 0.0636349618434906, -0.056608956307172775, 0.013271075673401356, 0.06697216629981995, 0.07389505207538605, 0.0029298695735633373, -0.023953188210725784, -0.015513395890593529, 0.0008672280819155276, -0.004629178903996944, -0.00033458019606769085, 0.029516402631998062, -0.11279212683439255, -0.06633201241493225, -0.0067112804390490055, 0.0010425217915326357, -0.10651035606861115, -0.02449151873588562, 0.05016745626926422, -0.01423576194792986, 0.016218816861510277, 0.09031092375516891, 0.028868990018963814, -0.0763978436589241, -0.04171796515583992, -0.03300704434514046, 0.037762682884931564, 0.05139382928609848, -0.02312719263136387, -0.05187646672129631, -0.06604761630296707, 0.019412478432059288, 0.0005823896499350667, -0.03074541874229908, 0.07329416275024414, -0.07993023097515106, 0.03822335600852966, 0.05271938815712929, 0.01193663664162159, 0.017722664400935173, 0.04420071840286255, 0.06827391684055328, -0.08278927206993103, 0.07852037250995636, 0.043087784200906754, 0.013483347371220589, -0.04647311940789223, -0.04426991567015648, 0.06028157100081444, -0.05328456312417984, 0.052924562245607376, 0.03685588762164116, -0.04117048159241676, 0.03801906481385231, 0.008141471073031425, 0.016438866034150124, -0.03948479890823364, 0.025830604135990143, -0.07575928419828415, -0.000035108576412312686, 0.039906095713377, 0.005691747181117535, 0.11247782409191132, -0.05267789959907532, 0.02423831634223461, 0.026931513100862503, 0.05333679914474487, 0.08782988786697388, 0.09319622069597244, 0.08703336864709854, 0.04819995537400246, -0.011006620712578297, -0.016014842316508293, -0.031404413282871246, 0.12732689082622528, -0.003092049388214946, -5.161477290016592e-8, 0.07374871522188187, 0.03971357271075249, -0.032331034541130066, 0.0678257867693901, 0.029976477846503258, -0.002008697483688593, -0.02381172962486744, -0.040235843509435654, -0.042725395411252975, -0.003900618525221944, -0.009065345861017704, 0.02851198799908161, -0.07656461745500565, -0.015982186421751976, 0.03246026113629341, 0.006258049979805946, -0.017186246812343597, 0.10323724150657654, 0.009138801135122776, -0.05710669979453087, -0.016174767166376114, -0.07375748455524445, 0.04745819419622421, 0.07703983038663864, -0.015846237540245056, 0.05899067968130112, 0.012532073073089123, -0.012940690852701664, 0.07844562083482742, 0.029879199340939522, -0.036135777831077576, -0.048028796911239624, -0.08949904143810272, 0.05810325965285301, 0.003739825217053294, 0.03813987597823143, -0.1596864014863968, 0.010447440668940544, 0.05914387106895447, 0.07465413957834244, -0.02900347113609314, -0.004450955428183079, -0.03400735184550285, 0.03195405378937721, -0.021958181634545326, 0.07107467204332352, -0.02500336244702339, 0.021120337769389153, 0.0391981415450573, 0.0279279462993145, 0.02244248241186142, -0.06307168304920197, -0.021031705662608147, 0.11740242689847946, -0.01988491788506508, 0.03689452260732651, -0.017553893849253654, -0.025366226211190224, 0.04151792824268341, -0.005045088939368725, -0.01256053801625967, 0.02862883359193802, 0.012872442603111267, -0.023435350507497787 ]
0.201612
file named `kind.yaml`: ```shell curl -L -O https://k8s.io/examples/pods/security/seccomp/kind.yaml ``` You can set a specific Kubernetes version by setting the node's container image. See [Nodes](https://kind.sigs.k8s.io/docs/user/configuration/#nodes) within the kind documentation about configuration for more details on this. This tutorial assumes you are using Kubernetes {{< param "version" >}}. As a beta feature, you can configure Kubernetes to use the profile that the {{< glossary\_tooltip text="container runtime" term\_id="container-runtime" >}} prefers by default, rather than falling back to `Unconfined`. If you want to try that, see [enable the use of `RuntimeDefault` as the default seccomp profile for all workloads](#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads) before you continue. Once you have a kind configuration in place, create the kind cluster with that configuration: ```shell kind create cluster --config=kind.yaml ``` After the new Kubernetes cluster is ready, identify the Docker container running as the single node cluster: ```shell docker ps ``` You should see output indicating that a container is running with name `kind-control-plane`. The output is similar to: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6a96207fed4b kindest/node:v1.18.2 "/usr/local/bin/entr…" 27 seconds ago Up 24 seconds 127.0.0.1:42223->6443/tcp kind-control-plane ``` If observing the filesystem of that container, you should see that the `profiles/` directory has been successfully loaded into the default seccomp path of the kubelet. Use `docker exec` to run a command in the Pod: ```shell # Change 6a96207fed4b to the container ID you saw from "docker ps" docker exec -it 6a96207fed4b ls /var/lib/kubelet/seccomp/profiles ``` ``` audit.json fine-grained.json violation.json ``` You have verified that these seccomp profiles are available to the kubelet running within kind. ## Create a Pod that uses the container runtime default seccomp profile Most container runtimes provide a sane set of default syscalls that are allowed or not. You can adopt these defaults for your workload by setting the seccomp type in the security context of a pod or container to `RuntimeDefault`. {{< note >}} If you have the `seccompDefault` [configuration](/docs/reference/config-api/kubelet-config.v1beta1/) enabled, then Pods use the `RuntimeDefault` seccomp profile whenever no other seccomp profile is specified. Otherwise, the default is `Unconfined`. {{< /note >}} Here's a manifest for a Pod that requests the `RuntimeDefault` seccomp profile for all its containers: {{% code\_sample file="pods/security/seccomp/ga/default-pod.yaml" %}} Create that Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/default-pod.yaml ``` ```shell kubectl get pod default-pod ``` The Pod should be showing as having started successfully: ``` NAME READY STATUS RESTARTS AGE default-pod 1/1 Running 0 20s ``` Delete the Pod before moving to the next section: ```shell kubectl delete pod default-pod --wait --now ``` ## Create a Pod with a seccomp profile for syscall auditing To start off, apply the `audit.json` profile, which will log all syscalls of the process, to a new Pod. Here's a manifest for that Pod: {{% code\_sample file="pods/security/seccomp/ga/audit-pod.yaml" %}} {{< note >}} Older versions of Kubernetes allowed you to configure seccomp behavior using {{< glossary\_tooltip text="annotations" term\_id="annotation" >}}. Kubernetes {{< skew currentVersion >}} only supports using fields within `.spec.securityContext` to configure seccomp, and this tutorial explains that approach. {{< /note >}} Create the Pod in the cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/audit-pod.yaml ``` This profile does not restrict any syscalls, so the Pod should start successfully. ```shell kubectl get pod audit-pod ``` ``` NAME READY STATUS RESTARTS AGE audit-pod 1/1 Running 0 30s ``` In order to be able to interact with this endpoint exposed by this container, create a NodePort {{< glossary\_tooltip text="Service" term\_id="service" >}} that allows access to the endpoint from inside the kind control plane container. ```shell kubectl expose pod audit-pod --type NodePort --port 5678 ``` Check what port the Service has been assigned on the node. ```shell kubectl get service audit-pod ``` The output
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/seccomp.md
[ -0.0012452953960746527, 0.04707430675625801, 0.09918642044067383, 0.018609032034873962, -0.03713468834757805, 0.030014345422387123, -0.005698888096958399, -0.02456170879304409, 0.06093201786279678, 0.038934964686632156, -0.028523240238428116, -0.022803686559200287, -0.03735801577568054, -0.01187052857130766, 0.04096599668264389, -0.03339286148548126, 0.058987002819776535, -0.001199243706651032, -0.01358397863805294, 0.024547051638364792, -0.002663854043930769, 0.0163009874522686, 0.07152926921844482, 0.040280573070049286, -0.059717610478401184, -0.055794358253479004, -0.01014500018209219, 0.053578995168209076, 0.016609948128461838, -0.04418135806918144, -0.026367494836449623, 0.005517699755728245, -0.030345816165208817, 0.025605108588933945, 0.08092723786830902, 0.03175096958875656, 0.030531655997037888, 0.005609490443021059, -0.05669831484556198, 0.06076166778802872, 0.032916389405727386, -0.05521416664123535, -0.07876835763454437, 0.01867326721549034, 0.004199529066681862, -0.03809624910354614, -0.023930827155709267, -0.07254272699356079, 0.00458819093182683, 0.014279022812843323, 0.026244617998600006, -0.12145549058914185, 0.03609662503004074, 0.018356382846832275, 0.017187349498271942, 0.014810065738856792, -0.01609988510608673, 0.12832407653331757, 0.08068498969078064, 0.03806369751691818, -0.0039326888509094715, -0.07087302953004837, 0.031116049736738205, -0.03149593248963356, -0.006857655011117458, 0.04145649075508118, 0.019264964386820793, 0.013565943576395512, 0.0015995397698134184, -0.018585367128252983, 0.08677127212285995, -0.039863962680101395, -0.049558985978364944, -0.008769389241933823, -0.0033255626913160086, 0.005123402923345566, 0.0038925071712583303, 0.05149619281291962, -0.002207871526479721, -0.10032238066196442, 0.0007292009540833533, 0.03174039348959923, 0.06163635477423668, 0.04900636896491051, -0.06945233047008514, 0.029277414083480835, 0.021833673119544983, -0.0558171421289444, 0.10077992081642151, 0.01112193614244461, 0.02087760530412197, -0.03223288804292679, 0.03411225974559784, -0.1068662479519844, 0.07252690941095352, -0.019355781376361847, -0.032149456441402435, -0.009387248195707798, -0.014710628427565098, 0.015077967196702957, 0.010780096054077148, -0.03301044926047325, 0.021066486835479736, 0.03926273062825203, 0.09798178821802139, 0.012081027962267399, 0.006263131741434336, -0.03500529006123543, 0.030887307599186897, -0.0008881581015884876, 0.01443300861865282, 0.044990405440330505, -0.02292337454855442, 0.018908001482486725, -0.06298810243606567, -0.07871866226196289, -0.03025352954864502, -0.018319888040423393, -0.002495405962690711, 0.06196322292089462, 0.06945527344942093, -0.09800829738378525, -0.06241952255368233, -0.022829586640000343, -0.09735911339521408, 0.0047300527803599834, -0.011495579034090042, 7.613379822445885e-34, 0.02340076118707657, -0.013779707252979279, 0.01548378448933363, -0.020754508674144745, 0.021820008754730225, -0.13015417754650116, 0.008024835959076881, -0.04521307349205017, -0.117610864341259, 0.029231423512101173, -0.08782699704170227, 0.07733909785747528, -0.06246672570705414, -0.05065193772315979, 0.011316738091409206, 0.006250276695936918, -0.0735415369272232, 0.043773114681243896, 0.10865622758865356, -0.019229931756854057, 0.054186802357435226, -0.07077152281999588, -0.005270803347229958, -0.08513368666172028, 0.03470996394753456, -0.06884929537773132, 0.05638805031776428, -0.05291803181171417, 0.008297799155116081, -0.00023679518199060112, 0.009585455991327763, -0.05954471603035927, 0.03632250800728798, -0.002537182532250881, -0.10064821690320969, -0.08109224587678909, -0.009820212610065937, 0.042816922068595886, -0.015306494198739529, -0.0051325103268027306, 0.08451788872480392, 0.0483059361577034, 0.03880168870091438, -0.017828132957220078, 0.09268878400325775, 0.03299758583307266, 0.005459820851683617, -0.058259569108486176, 0.07872790843248367, 0.026417938992381096, 0.013905695639550686, -0.045194026082754135, 0.011945893056690693, -0.01166481152176857, 0.016629772260785103, -0.019514361396431923, 0.07574576139450073, -0.04008176922798157, -0.06602569669485092, -0.047314491122961044, -0.0013473033905029297, 0.03715724125504494, 0.029327964410185814, -0.11925740540027618, 0.002548339543864131, 0.02465870790183544, -0.035730116069316864, 0.08523920923471451, -0.013398205861449242, -0.010006383061408997, -0.09630853682756424, 0.08787171542644501, -0.09701661765575409, 0.038206230849027634, 0.03878733888268471, -0.11529815196990967, -0.013206788338720798, 0.04949953034520149, 0.012377891689538956, 0.04069835692644119, 0.008616270497441292, -0.041233185678720474, -0.029186856001615524, 0.09760206192731857, -0.017107650637626648, -0.055396199226379395, 0.0052777607925236225, 0.0700700655579567, 0.000019375342162675224, 0.012187491171061993, 0.05929315835237503, -0.018773281946778297, -0.010718625970184803, 0.04562124237418175, -0.1414240151643753, -1.9040997285955198e-33, 0.001968321856111288, -0.06301194429397583, -0.022723913192749023, 0.07858020812273026, -0.023197585716843605, -0.0035904257092624903, -0.0014566333265975118, 0.050860971212387085, 0.008347599767148495, 0.015824083238840103, 0.020989401265978813, -0.005912571679800749, 0.09454051405191422, -0.013078376650810242, -0.027338914573192596, 0.0011769538978114724, -0.16737790405750275, 0.003991240169852972, -0.007169700227677822, 0.02759530581533909, -0.04603666812181473, -0.042129985988140106, 0.06301114708185196, 0.05759334936738014, 0.05158044025301933, -0.012093733064830303, 0.01984660141170025, 0.07616650313138962, -0.005505309905856848, -0.057704225182533264, 0.020603330805897713, -0.09253644198179245, -0.10023495554924011, 0.00458955904468894, -0.005135045386850834, -0.07910459488630295, 0.010058212094008923, 0.028479842469096184, 0.028257999569177628, 0.034913744777441025, 0.04303107038140297, -0.009405412711203098, -0.056618690490722656, -0.019179023802280426, -0.026872754096984863, 0.05331742390990257, 0.07597269117832184, -0.03241611272096634, 0.005851770751178265, -0.06565747410058975, 0.062057770788669586, 0.0499429777264595, -0.03401852771639824, 0.07888332009315491, -0.08586480468511581, 0.006023278925567865, 0.007162896450608969, 0.03555506095290184, -0.117218516767025, 0.047949403524398804, 0.026302160695195198, -0.09846796840429306, 0.052648890763521194, 0.04744124412536621, -0.0023221755400300026, -0.06581790000200272, -0.04793664067983627, 0.019443895667791367, -0.0413501150906086, 0.01469785813242197, -0.052193574607372284, -0.0787847489118576, 0.020613616332411766, -0.06606749445199966, 0.031391918659210205, -0.06998521089553833, 0.08761536329984665, -0.07629753649234772, 0.06816427409648895, -0.0017929496243596077, -0.012791302986443043, 0.10714129358530045, -0.01648137718439102, 0.03215799853205681, 0.04606384411454201, 0.050324730575084686, 0.04254123196005821, 0.037137243896722794, 0.05405298247933388, 0.07936384528875351, 0.017021337524056435, -0.06323926895856857, -0.03840262442827225, 0.13001957535743713, -0.025103410705924034, -5.335709829523694e-8, 0.09832426905632019, 0.034796521067619324, -0.02273096702992916, 0.05736112967133522, 0.034961845725774765, -0.02839314565062523, -0.012552788481116295, -0.024951951578259468, -0.006918602157384157, 0.018554972484707832, -0.004311786498874426, 0.09700912237167358, -0.041970498859882355, 0.011003568768501282, 0.029860474169254303, -0.041012898087501526, -0.029081324115395546, 0.07893050462007523, 0.019076578319072723, -0.08222158998250961, -0.01816576160490513, -0.06845613569021225, 0.04008350521326065, 0.010330239310860634, 0.005357158835977316, 0.04924006387591362, -0.00065535434987396, -0.05681610479950905, 0.04970145598053932, 0.0287568811327219, -0.018120644614100456, -0.03985321894288063, -0.09663968533277512, 0.010947146452963352, -0.006130927242338657, 0.04322972893714905, -0.13228073716163635, 0.09697254002094269, 0.07196485996246338, 0.0780278891324997, 0.021911539137363434, -0.031761277467012405, -0.07569672912359238, -0.0003500096208881587, -0.037758976221084595, 0.005118569824844599, 0.0665416345000267, 0.018108943477272987, -0.003947976976633072, 0.04539472237229347, -0.012403764761984348, -0.07594814151525497, 0.012117745354771614, 0.057885389775037766, -0.054113563150167465, 0.016822785139083862, 0.004419454839080572, -0.07037021219730377, -0.010210035368800163, -0.01394274178892374, 0.026302365586161613, -0.06521502137184143, 0.05315430834889412, 0.01014614012092352 ]
0.079071
create a NodePort {{< glossary\_tooltip text="Service" term\_id="service" >}} that allows access to the endpoint from inside the kind control plane container. ```shell kubectl expose pod audit-pod --type NodePort --port 5678 ``` Check what port the Service has been assigned on the node. ```shell kubectl get service audit-pod ``` The output is similar to: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE audit-pod NodePort 10.111.36.142 5678:32373/TCP 72s ``` Now you can use `curl` to access that endpoint from inside the kind control plane container, at the port exposed by this Service. Use `docker exec` to run the `curl` command within the container belonging to that control plane container: ```shell # Change 6a96207fed4b to the control plane container ID and 32373 to the port number you saw from "docker ps" docker exec -it 6a96207fed4b curl localhost:32373 ``` ``` just made some syscalls! ``` You can see that the process is running, but what syscalls did it actually make? Because this Pod is running in a local cluster, you should be able to see those in `/var/log/syslog` on your local system. Open up a new terminal window and `tail` the output for calls from `http-echo`: ```shell # The log path on your computer might be different from "/var/log/syslog" tail -f /var/log/syslog | grep 'http-echo' ``` You should already see some logs of syscalls made by `http-echo`, and if you run `curl` again inside the control plane container you will see more output written to the log. For example: ``` Jul 6 15:37:40 my-machine kernel: [369128.669452] audit: type=1326 audit(1594067860.484:14536): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=51 compat=0 ip=0x46fe1f code=0x7ffc0000 Jul 6 15:37:40 my-machine kernel: [369128.669453] audit: type=1326 audit(1594067860.484:14537): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=54 compat=0 ip=0x46fdba code=0x7ffc0000 Jul 6 15:37:40 my-machine kernel: [369128.669455] audit: type=1326 audit(1594067860.484:14538): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=202 compat=0 ip=0x455e53 code=0x7ffc0000 Jul 6 15:37:40 my-machine kernel: [369128.669456] audit: type=1326 audit(1594067860.484:14539): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=288 compat=0 ip=0x46fdba code=0x7ffc0000 Jul 6 15:37:40 my-machine kernel: [369128.669517] audit: type=1326 audit(1594067860.484:14540): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=0 compat=0 ip=0x46fd44 code=0x7ffc0000 Jul 6 15:37:40 my-machine kernel: [369128.669519] audit: type=1326 audit(1594067860.484:14541): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=270 compat=0 ip=0x4559b1 code=0x7ffc0000 Jul 6 15:38:40 my-machine kernel: [369188.671648] audit: type=1326 audit(1594067920.488:14559): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=270 compat=0 ip=0x4559b1 code=0x7ffc0000 Jul 6 15:38:40 my-machine kernel: [369188.671726] audit: type=1326 audit(1594067920.488:14560): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=29064 comm="http-echo" exe="/http-echo" sig=0 arch=c000003e syscall=202 compat=0 ip=0x455e53 code=0x7ffc0000 ``` You can begin to understand the syscalls required by the `http-echo` process by looking at the `syscall=` entry on each line. While these are unlikely to encompass all syscalls it uses, it can serve as a basis for a seccomp profile for this container. Delete the Service and the Pod before moving to the next section: ```shell kubectl delete service audit-pod --wait kubectl delete pod audit-pod --wait --now ``` ## Create a Pod with a seccomp profile that causes violation For demonstration, apply a profile to the Pod that does not allow for any syscalls. The manifest for this demonstration is: {{% code\_sample file="pods/security/seccomp/ga/violation-pod.yaml" %}} Attempt to create the Pod in the cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/violation-pod.yaml ``` The Pod creates, but there is an issue. If you check the status of the Pod, you should see that it failed to start. ```shell kubectl get pod violation-pod ``` ``` NAME READY STATUS RESTARTS AGE violation-pod 0/1 CrashLoopBackOff 1 6s ``` As seen in the previous example, the `http-echo` process requires quite a few syscalls. Here seccomp has
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/seccomp.md
[ 0.011183519847691059, 0.05080092325806618, -0.025473302230238914, -0.022464007139205933, 0.008118415251374245, -0.00990556925535202, 0.06635169684886932, -0.04670848697423935, 0.06924708187580109, 0.06396926939487457, -0.011891275644302368, -0.06828419864177704, -0.04090594872832298, -0.04522448033094406, 0.028927363455295563, -0.04584783688187599, 0.07071521878242493, -0.009249484166502953, 0.062779501080513, -0.016329431906342506, -0.04060416668653488, 0.09292734414339066, 0.00529441237449646, -0.02554822526872158, -0.11041344702243805, -0.01413760520517826, -0.032044343650341034, 0.018817424774169922, 0.01301658432930708, -0.05943486467003822, -0.010878259316086769, 0.020084213465452194, -0.07262393832206726, 0.06443707644939423, 0.06227084994316101, 0.04807904735207558, 0.07179932296276093, 0.01761561445891857, -0.06582210958003998, -0.002144856844097376, 0.09656524658203125, -0.02957555651664734, -0.05081896856427193, -0.016823427751660347, -0.00803837925195694, -0.03162489831447601, -0.07804489880800247, -0.05081239342689514, 0.04861323907971382, -0.021917279809713364, -0.025436948984861374, -0.107819564640522, 0.03257540613412857, 0.024178944528102875, 0.02828906662762165, 0.011595849879086018, 0.020193949341773987, 0.04678129404783249, 0.0771278589963913, -0.002610436175018549, 0.004156183451414108, -0.045682601630687714, 0.031692031770944595, -0.0535786934196949, -0.04549498111009598, -0.04668721556663513, -0.032284948974847794, 0.03522462397813797, -0.021848848089575768, -0.05899382755160332, 0.018559381365776062, -0.01959020085632801, -0.056094180792570114, -0.0441679023206234, -0.0010884517105296254, 0.07569871097803116, -0.02376701310276985, 0.023532278835773468, -0.0807749480009079, -0.06586378812789917, 0.024519000202417374, 0.06925405561923981, 0.05173672363162041, 0.13140496611595154, -0.09617310017347336, 0.025611715391278267, -0.012783399783074856, -0.06324366480112076, 0.08063224703073502, 0.01157414074987173, -0.027936803176999092, -0.028166579082608223, -0.043425388634204865, -0.12544848024845123, 0.10009139776229858, -0.039687804877758026, -0.03808104619383812, -0.01588612236082554, 0.00610180851072073, -0.0036629189271479845, 0.06331837177276611, 0.005117395427078009, -0.06473023444414139, -0.04317452758550644, 0.02867181971669197, -0.01543007418513298, -0.07052115350961685, -0.023232294246554375, 0.06534380465745926, 0.04868979752063751, -0.01860327087342739, 0.048173170536756516, -0.02866198867559433, 0.006982949562370777, 0.020135127007961273, -0.03526509925723076, 0.02769949659705162, -0.0479198582470417, 0.0065566981211304665, 0.015449144877493382, 0.04955895245075226, -0.06862887740135193, 0.014219295233488083, 0.038547445088624954, -0.06756054610013962, 0.028030944988131523, 0.09479247033596039, 2.4808143385112194e-33, 0.05098505690693855, -0.056565579026937485, 0.052339907735586166, -0.01313091441988945, 0.02586887776851654, -0.018872838467359543, -0.0063170334324240685, 0.012728394940495491, -0.0570298433303833, 0.07336100935935974, -0.14628605544567108, 0.07414205372333527, 0.006374779623001814, -0.08357620239257812, -0.003904717043042183, 0.04902881011366844, -0.049781471490859985, 0.05270940437912941, 0.0376584418118, -0.010806484147906303, 0.022331835702061653, -0.09241601824760437, -0.009833513759076595, -0.09669854491949081, 0.08141385763883591, -0.036637306213378906, -0.02183106355369091, -0.0731620118021965, 0.029860202223062515, 0.01759243942797184, 0.026806609705090523, 0.010724086314439774, 0.05049993097782135, 0.029735976830124855, -0.10105639696121216, -0.07848188281059265, 0.026801662519574165, 0.008799035102128983, -0.06690460443496704, -0.05205204337835312, 0.023732716217637062, -0.06123446673154831, -0.013713079504668713, -0.004503503907471895, 0.008336605504155159, 0.008725454099476337, -0.0328674241900444, -0.06616675108671188, 0.0947335958480835, 0.025414040312170982, -0.011899909004569054, -0.06366667151451111, -0.0008634777623228729, -0.012693590484559536, 0.05444101244211197, 0.0415179468691349, 0.03945816680788994, 0.027288267388939857, -0.05695995315909386, 0.04653008654713631, -0.04204905405640602, 0.07441665232181549, -0.016566190868616104, -0.0050601358525455, 0.06943861395120621, 0.010740010999143124, -0.004725938197225332, 0.04984801635146141, 0.009101456962525845, 0.04177132993936539, -0.08803880959749222, 0.07306569069623947, 0.014597021974623203, 0.07981839030981064, 0.026573529466986656, -0.05869774892926216, -0.043914757668972015, 0.028097886592149734, 0.00036740864743478596, 0.006912501994520426, 0.022161422297358513, -0.08133041858673096, -0.002729012630879879, 0.05562659725546837, 0.01990930177271366, -0.062318719923496246, -0.019463611766695976, 0.014886983670294285, -0.052401088178157806, 0.04829544201493263, -0.05796477943658829, -0.01974550448358059, -0.057375453412532806, 0.015141376294195652, -0.14220711588859558, -5.649104425815361e-33, 0.036350082606077194, -0.050479814410209656, -0.0227102842181921, -0.01624397188425064, -0.02516311965882778, -0.04478971287608147, 0.010644936002790928, 0.03284692391753197, -0.039486370980739594, 0.051499560475349426, -0.027278972789645195, 0.021706322208046913, 0.09807541966438293, 0.05055362731218338, -0.039234645664691925, 0.019299710169434547, -0.13509444892406464, -0.029897237196564674, -0.029865223914384842, 0.03166975826025009, -0.04548845440149307, -0.030304983258247375, 0.12317049503326416, 0.017875520512461662, -0.08168505877256393, 0.002374964067712426, 0.1282109022140503, 0.021175658330321312, -0.10552046447992325, -0.036981016397476196, 0.012694261036813259, -0.015161908231675625, 0.016986466944217682, 0.1116635724902153, -0.02960257977247238, -0.05079834908246994, 0.046868812292814255, 0.03531491383910179, 0.03702625259757042, -0.048279084265232086, 0.0152440769597888, 0.023387616500258446, -0.07324152439832687, -0.09402857720851898, -0.05332377180457115, -0.008832519873976707, -0.006654168013483286, 0.04964294657111168, -0.00781408604234457, -0.059504225850105286, -0.023915981873869896, 0.014672350138425827, -0.02173510007560253, 0.15033632516860962, -0.05806312337517738, 0.058183200657367706, 0.04962547868490219, 0.00032846094109117985, -0.0683005228638649, 0.036529261618852615, 0.07407104223966599, -0.13769365847110748, 0.008285989984869957, 0.07029733061790466, 0.0510106198489666, -0.05632616579532623, 0.04171620309352875, 0.016388650983572006, -0.02451007068157196, -0.01713084802031517, 0.004077382851392031, -0.028715921565890312, 0.03856377676129341, 0.06262823939323425, 0.06082864850759506, 0.011532515287399292, 0.04698868468403816, -0.09410282969474792, 0.029318897053599358, 0.0020010508596897125, -0.0005720037152059376, 0.01924964413046837, -0.03287187218666077, -0.07230871170759201, 0.06449110060930252, 0.04039004072546959, 0.0235070139169693, 0.0684080719947815, 0.06348328292369843, 0.005582617130130529, -0.05791002884507179, -0.04083101451396942, -0.07117372751235962, 0.028530633077025414, 0.009328863583505154, -5.059533592088883e-8, 0.04078000783920288, 0.042823269963264465, 0.021145405247807503, 0.03534393757581711, -0.04442101716995239, 0.01177461352199316, -0.006056610494852066, 0.0008031342294998467, -0.043753549456596375, -0.00941332709044218, -0.06055419519543648, 0.04228797182440758, -0.02752370946109295, 0.020053543150424957, 0.041658706963062286, -0.03949489817023277, 0.014947067946195602, -0.038017142564058304, 0.055885206907987595, -0.0632791519165039, -0.0312945581972599, -0.03129105642437935, 0.05424688011407852, -0.00015002618602011353, -0.06758445501327515, 0.00716827530413866, -0.02749679982662201, 0.007612359710037708, 0.01969122514128685, -0.010699203237891197, -0.005082825664430857, -0.03787165507674217, -0.08038872480392456, 0.09271673113107681, -0.042148102074861526, 0.0518161877989769, -0.1430342197418213, 0.02433294989168644, 0.04838009178638458, 0.09393491595983505, -0.01006904523819685, 0.00508223008364439, -0.09640887379646301, -0.04043549299240112, -0.015114417299628258, 0.08259352296590805, 0.06268934905529022, 0.05311659723520279, 0.0029301366303116083, 0.025301089510321617, 0.0012856625253334641, -0.05815393105149269, 0.03441571071743965, 0.02349955402314663, -0.025028066709637642, 0.030692489817738533, -0.04236285015940666, -0.09539177268743515, -0.02775608003139496, 0.05989745259284973, -0.040538638830184937, 0.056333545595407486, 0.0386807806789875, 0.04570576176047325 ]
0.092952
you check the status of the Pod, you should see that it failed to start. ```shell kubectl get pod violation-pod ``` ``` NAME READY STATUS RESTARTS AGE violation-pod 0/1 CrashLoopBackOff 1 6s ``` As seen in the previous example, the `http-echo` process requires quite a few syscalls. Here seccomp has been instructed to error on any syscall by setting `"defaultAction": "SCMP\_ACT\_ERRNO"`. This is extremely secure, but removes the ability to do anything meaningful. What you really want is to give workloads only the privileges they need. Delete the Pod before moving to the next section: ```shell kubectl delete pod violation-pod --wait --now ``` ## Create a Pod with a seccomp profile that only allows necessary syscalls If you take a look at the `fine-grained.json` profile, you will notice some of the syscalls seen in syslog of the first example where the profile set `"defaultAction": "SCMP\_ACT\_LOG"`. Now the profile is setting `"defaultAction": "SCMP\_ACT\_ERRNO"`, but explicitly allowing a set of syscalls in the `"action": "SCMP\_ACT\_ALLOW"` block. Ideally, the container will run successfully and you will see no messages sent to `syslog`. The manifest for this example is: {{% code\_sample file="pods/security/seccomp/ga/fine-pod.yaml" %}} Create the Pod in your cluster: ```shell kubectl apply -f https://k8s.io/examples/pods/security/seccomp/ga/fine-pod.yaml ``` ```shell kubectl get pod fine-pod ``` The Pod should be showing as having started successfully: ``` NAME READY STATUS RESTARTS AGE fine-pod 1/1 Running 0 30s ``` Open up a new terminal window and use `tail` to monitor for log entries that mention calls from `http-echo`: ```shell # The log path on your computer might be different from "/var/log/syslog" tail -f /var/log/syslog | grep 'http-echo' ``` Next, expose the Pod with a NodePort Service: ```shell kubectl expose pod fine-pod --type NodePort --port 5678 ``` Check what port the Service has been assigned on the node: ```shell kubectl get service fine-pod ``` The output is similar to: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE fine-pod NodePort 10.111.36.142 5678:32373/TCP 72s ``` Use `curl` to access that endpoint from inside the kind control plane container: ```shell # Change 6a96207fed4b to the control plane container ID and 32373 to the port number you saw from "docker ps" docker exec -it 6a96207fed4b curl localhost:32373 ``` ``` just made some syscalls! ``` You should see no output in the `syslog`. This is because the profile allowed all necessary syscalls and specified that an error should occur if one outside of the list is invoked. This is an ideal situation from a security perspective, but required some effort in analyzing the program. It would be nice if there was a simple way to get closer to this security without requiring as much effort. Delete the Service and the Pod before moving to the next section: ```shell kubectl delete service fine-pod --wait kubectl delete pod fine-pod --wait --now ``` ## Enable the use of `RuntimeDefault` as the default seccomp profile for all workloads {{< feature-state state="stable" for\_k8s\_version="v1.27" >}} To use seccomp profile defaulting, you must run the kubelet with the `--seccomp-default` [command line flag](/docs/reference/command-line-tools-reference/kubelet) enabled for each node where you want to use it. If enabled, the kubelet will use the `RuntimeDefault` seccomp profile by default, which is defined by the container runtime, instead of using the `Unconfined` (seccomp disabled) mode. The default profiles aim to provide a strong set of security defaults while preserving the functionality of the workload. It is possible that the default profiles differ between container runtimes and their release versions, for example when comparing those from CRI-O and containerd. {{< note >}} Enabling the feature will neither change the Kubernetes `securityContext.seccompProfile` API field nor add the deprecated annotations of the workload. This
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/seccomp.md
[ 0.06747514009475708, 0.007964111864566803, 0.014976157806813717, -0.009419918060302734, -0.007861929014325142, -0.012201188132166862, -0.015918996185064316, 0.015652155503630638, -0.0148715665563941, 0.04690733551979065, 0.005584632977843285, -0.0404231995344162, -0.021615633741021156, 0.016947360709309578, 0.014404209330677986, -0.06291382759809494, 0.08276598900556564, 0.025353988632559776, -0.020902791991829872, -0.016142478212714195, -0.0375228077173233, -0.01510449405759573, 0.0331646129488945, 0.02629183419048786, -0.06102219596505165, 0.0162622332572937, -0.05136468634009361, -0.0372600294649601, -0.033553000539541245, -0.04786029830574989, -0.015361064113676548, -0.014782735146582127, 0.012846514582633972, -0.0267036110162735, 0.13012221455574036, 0.12778262794017792, 0.049221813678741455, -0.09369221329689026, -0.018821680918335915, -0.007796740625053644, -0.017055252566933632, -0.0700104758143425, -0.16860099136829376, 0.022150840610265732, -0.02722986787557602, -0.026996932923793793, -0.004548834171146154, -0.037920866161584854, 0.059375107288360596, -0.053329888731241226, 0.008220912888646126, -0.025448283180594444, 0.13267289102077484, 0.04991824924945831, 0.03942923620343208, 0.008245425298810005, 0.024140894412994385, 0.042614202946424484, 0.0894969254732132, 0.028677118942141533, -0.004883242305368185, -0.05091084912419319, -0.0005476814694702625, -0.05555933341383934, 0.048061493784189224, -0.004271937999874353, 0.02473982609808445, -0.03464842587709427, 0.01564272865653038, 0.08535527437925339, 0.038868602365255356, 0.003131878562271595, -0.040637847036123276, 0.03374373912811279, -0.04546765610575676, 0.016167882829904556, -0.040062110871076584, -0.0004777569556608796, -0.030781034380197525, -0.01795095205307007, 0.021841563284397125, 0.023679887875914574, -0.014343599788844585, -0.06271130591630936, -0.0861516147851944, 0.05626706779003143, 0.0001353036641376093, -0.01336752064526081, 0.06198946759104729, 0.012802339158952236, 0.06314107030630112, -0.001903134980238974, 0.08490658551454544, -0.09601335227489471, 0.07096568495035172, -0.04839625954627991, -0.0022835792042315006, -0.030025044456124306, -0.012754695490002632, 0.004063126631081104, 0.01557814422994852, -0.012092902325093746, 0.01511283591389656, 0.023109132423996925, 0.09339548647403717, -0.033537358045578, -0.03863558918237686, 0.04433729499578476, 0.03131982311606407, 0.0456746444106102, 0.005200895946472883, 0.015190009027719498, -0.018958410248160362, 0.06803136318922043, 0.01007892843335867, 0.04593603312969208, -0.06635875999927521, 0.01091446541249752, -0.020585160702466965, 0.03922438248991966, 0.14368371665477753, -0.05619607865810394, 0.0017441115342080593, 0.04305156692862511, -0.029398735612630844, -0.0021745613776147366, -0.008634315803647041, 2.692505442730959e-33, 0.06953509896993637, -0.04862889647483826, 0.0009051800007000566, 0.03217149153351784, 0.058755021542310715, -0.05133572593331337, -0.05219443514943123, -0.0040679615922272205, -0.04549538344144821, -0.001057897345162928, -0.0381108783185482, -0.018754776567220688, 0.02090558409690857, -0.03960006684064865, 0.04589055851101875, -0.04188646748661995, -0.09345076233148575, 0.018643710762262344, 0.14040715992450714, -0.02520836517214775, 0.0546921081840992, -0.058854348957538605, -0.053460992872714996, 0.025192741304636, 0.00888044387102127, -0.018523024395108223, -0.006278794724494219, -0.08896078914403915, 0.03980614244937897, 0.04100329056382179, -0.05497610941529274, -0.026078810915350914, 0.03675081580877304, 0.010729948058724403, -0.15110546350479126, -0.05602090060710907, -0.007549149449914694, 0.012496798299252987, -0.05027418211102486, -0.060840148478746414, 0.061546627432107925, -0.0045655290596187115, -0.024117406457662582, 0.027228519320487976, 0.05304792895913124, -0.06425465643405914, 0.009971004910767078, -0.021275242790579796, -0.016796400770545006, 0.04235261678695679, -0.0732639878988266, -0.03335307165980339, 0.08740757405757904, -0.08213841915130615, 0.020116498693823814, -0.014922795817255974, 0.06954846531152725, -0.07627426832914352, -0.08234981447458267, -0.036211345344781876, 0.015235239639878273, -0.003327452577650547, 0.02074693702161312, -0.02856418304145336, 0.024282274767756462, 0.005719645414501429, -0.0675707533955574, 0.06440617889165878, 0.017071669921278954, 0.06988684087991714, -0.13270695507526398, 0.050898075103759766, -0.017541425302624702, 0.04027269408106804, -0.05829685553908348, -0.0649937093257904, 0.046983275562524796, 0.030067885294556618, -0.132831871509552, 0.036491215229034424, 0.06265722960233688, -0.04356301575899124, -0.01228375919163227, 0.035745274275541306, 0.030429549515247345, 0.015537984669208527, -0.03294029086828232, 0.04444008693099022, -0.08980760723352432, 0.018331307917833328, 0.042290326207876205, -0.012366535142064095, -0.03743113577365875, 0.051935747265815735, -0.14800295233726501, -4.359497491519061e-33, 0.04240626469254494, -0.017541328445076942, -0.011643108911812305, 0.03301379084587097, -0.005856451578438282, 0.008569850586354733, -0.027400236576795578, 0.017268506810069084, -0.05491424351930618, -0.0262210201472044, -0.07638096064329147, -0.030510276556015015, 0.029126081615686417, -0.020073261111974716, -0.06718043982982635, 0.03685801476240158, -0.09545014053583145, -0.035886045545339584, -0.014142962172627449, 0.10269484668970108, -0.042217206209897995, 0.018585124984383583, 0.0745014101266861, 0.08057186007499695, -0.0011734861182048917, 0.00852782092988491, 0.009861420840024948, -0.004008255433291197, -0.04783347621560097, -0.0002587499038781971, 0.07697600871324539, -0.14031189680099487, -0.022530248388648033, 0.044042591005563736, 0.01775001361966133, -0.06959197670221329, -0.08230725675821304, 0.11266575753688812, 0.009027795866131783, -0.01009365264326334, 0.11285239458084106, 0.06971994787454605, -0.03264659643173218, -0.02696039527654648, -0.03187400847673416, -0.020588655024766922, 0.02547486126422882, -0.03550275042653084, -0.05467696487903595, -0.05565468221902847, -0.01323628332465887, -0.018054287880659103, 0.040695685893297195, 0.08591824024915695, -0.012428831309080124, 0.013811242766678333, 0.03270319849252701, -0.012100364081561565, -0.031792715191841125, 0.023576227948069572, 0.04062558710575104, -0.04254757985472679, 0.0610949769616127, 0.03643965721130371, 0.015573116019368172, -0.08857006579637527, -0.02193397283554077, 0.06126184016466141, -0.008694690652191639, 0.02923242561519146, 0.0708334818482399, -0.015936624258756638, 0.029662033542990685, 0.026090677827596664, 0.025261621922254562, -0.038303084671497345, -0.055470194667577744, -0.04834013804793358, -0.026974350214004517, 0.0340280756354332, -0.016095023602247238, 0.09904114902019501, -0.06258062273263931, 0.030594531446695328, 0.02355661615729332, 0.07676625996828079, 0.0259062759578228, 0.048401955515146255, 0.07565923035144806, 0.06898876279592514, -0.008893315680325031, -0.003950939979404211, 0.006292726844549179, 0.08285786956548691, 0.018096625804901123, -4.970503653112246e-8, 0.10061836242675781, -0.01009436510503292, -0.02345508337020874, 0.08559925854206085, 0.1196252778172493, -0.06699540466070175, -0.0457516610622406, -0.002968111075460911, -0.02910466678440571, 0.02422388270497322, -0.020158860832452774, 0.00967781338840723, -0.08425062894821167, 0.029656870290637016, 0.02867436408996582, -0.02731679193675518, -0.014838029630482197, 0.10727276653051376, 0.011823583394289017, -0.10121006518602371, -0.06321027874946594, -0.09320295602083206, 0.019875548779964447, 0.05068526789546013, 0.007593497633934021, 0.04214917868375778, 0.05735286325216293, -0.04642408341169357, 0.056720953434705734, -0.017177175730466843, -0.09918879717588425, -0.08376103639602661, -0.06082534044981003, 0.04413435980677605, -0.020387237891554832, 0.015685509890317917, -0.17044386267662048, 0.011422268114984035, -0.03895216062664986, 0.045893482863903046, -0.0007737944833934307, 0.02232629992067814, 0.008520235307514668, 0.01656787283718586, -0.02955963835120201, 0.0036354626063257456, -0.04437664896249771, 0.05828864127397537, 0.04351898282766342, 0.00785168819129467, 0.02516421675682068, -0.03472047299146652, -0.01588534563779831, 0.09634722024202347, 0.006962805986404419, 0.030900737270712852, -0.016393903642892838, -0.01997818611562252, -0.01902238465845585, 0.03778643533587456, 0.058252401649951935, 0.005125201307237148, -0.04176093265414238, -0.027007918804883957 ]
0.178854
of the workload. It is possible that the default profiles differ between container runtimes and their release versions, for example when comparing those from CRI-O and containerd. {{< note >}} Enabling the feature will neither change the Kubernetes `securityContext.seccompProfile` API field nor add the deprecated annotations of the workload. This provides users the possibility to rollback anytime without actually changing the workload configuration. Tools like [`crictl inspect`](https://github.com/kubernetes-sigs/cri-tools) can be used to verify which seccomp profile is being used by a container. {{< /note >}} Some workloads may require a lower amount of syscall restrictions than others. This means that they can fail during runtime even with the `RuntimeDefault` profile. To mitigate such a failure, you can: - Run the workload explicitly as `Unconfined`. - Disable the `SeccompDefault` feature for the nodes. Also making sure that workloads get scheduled on nodes where the feature is disabled. - Create a custom seccomp profile for the workload. If you were introducing this feature into production-like cluster, the Kubernetes project recommends that you enable this feature gate on a subset of your nodes and then test workload execution before rolling the change out cluster-wide. You can find more detailed information about a possible upgrade and downgrade strategy in the related Kubernetes Enhancement Proposal (KEP): [Enable seccomp by default](https://github.com/kubernetes/enhancements/tree/9a124fd29d1f9ddf2ff455c49a630e3181992c25/keps/sig-node/2413-seccomp-by-default#upgrade--downgrade-strategy). Kubernetes {{< skew currentVersion >}} lets you configure the seccomp profile that applies when the spec for a Pod doesn't define a specific seccomp profile. However, you still need to enable this defaulting for each node where you would like to use it. If you are running a Kubernetes {{< skew currentVersion >}} cluster and want to enable the feature, either run the kubelet with the `--seccomp-default` command line flag, or enable it through the [kubelet configuration file](/docs/tasks/administer-cluster/kubelet-config-file/). To enable the feature gate in [kind](https://kind.sigs.k8s.io), ensure that `kind` provides the minimum required Kubernetes version and enables the `SeccompDefault` feature [in the kind configuration](https://kind.sigs.k8s.io/docs/user/quick-start/#enable-feature-gates-in-your-cluster): ```yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c kubeadmConfigPatches: - | kind: JoinConfiguration nodeRegistration: kubeletExtraArgs: seccomp-default: "true" - role: worker image: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c kubeadmConfigPatches: - | kind: JoinConfiguration nodeRegistration: kubeletExtraArgs: seccomp-default: "true" ``` If the cluster is ready, then running a pod: ```shell kubectl run --rm -it --restart=Never --image=alpine alpine -- sh ``` Should now have the default seccomp profile attached. This can be verified by using `docker exec` to run `crictl inspect` for the container on the kind worker: ```shell docker exec -it kind-worker bash -c \ 'crictl inspect $(crictl ps --name=alpine -q) | jq .info.runtimeSpec.linux.seccomp' ``` ```json { "defaultAction": "SCMP\_ACT\_ERRNO", "architectures": ["SCMP\_ARCH\_X86\_64", "SCMP\_ARCH\_X86", "SCMP\_ARCH\_X32"], "syscalls": [ { "names": ["..."] } ] } ``` ## {{% heading "whatsnext" %}} You can learn more about Linux seccomp: \* [A seccomp Overview](https://lwn.net/Articles/656307/) \* [Seccomp Security Profiles for Docker](https://docs.docker.com/engine/security/seccomp/)
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/seccomp.md
[ 0.016363931819796562, 0.06190136447548866, 0.034877486526966095, 0.020371340215206146, 0.025949804112315178, -0.00586246233433485, 0.029521211981773376, -0.014998375438153744, 0.023903168737888336, -0.019337687641382217, 0.011251548305153847, -0.07891857624053955, 0.005704210139811039, 0.013814832083880901, 0.0183794517070055, -0.08990204334259033, 0.10020527243614197, 0.04972411319613457, -0.021107371896505356, -0.02741621807217598, -0.06634010374546051, -0.06943469494581223, 0.02352568693459034, 0.023458484560251236, -0.07774599641561508, -0.045073091983795166, -0.05240381509065628, 0.02642146125435829, 0.0001977056235773489, 0.004872131161391735, -0.04539957270026207, 0.054091595113277435, -0.058966536074876785, 0.01824851706624031, 0.07924940437078476, 0.04822203144431114, 0.06786978244781494, -0.06379316002130508, -0.028241654857993126, 0.034655407071113586, -0.02636237069964409, -0.04660887271165848, -0.12837369740009308, 0.048829685896635056, 0.007863480597734451, -0.05392041057348251, 0.011787591502070427, -0.08379627019166946, -0.028330229222774506, -0.0071756355464458466, 0.03509209305047989, -0.01960514485836029, 0.07825853675603867, 0.0503685288131237, 0.020624957978725433, 0.03176291286945343, 0.04690060392022133, 0.08265762776136398, 0.1263439655303955, 0.03252086043357849, 0.029681183397769928, -0.050227437168359756, -0.005004068836569786, -0.030919523909687996, 0.0017148390179499984, 0.043220389634370804, 0.03805208206176758, -0.08316237479448318, 0.035283103585243225, 0.016531024128198624, 0.020870348438620567, -0.020313605666160583, -0.05658818781375885, -0.04794691503047943, 0.046428583562374115, 0.036009255796670914, -0.0855460837483406, 0.000440508738392964, -0.0019445541547611356, -0.11664760112762451, 0.036273762583732605, 0.018922993913292885, 0.040284208953380585, -0.02886459231376648, -0.055431514978408813, 0.031934067606925964, -0.013910693116486073, -0.08648057281970978, 0.07999096065759659, 0.018992235884070396, 0.054171234369277954, -0.03669675812125206, 0.01455897931009531, -0.1267426759004593, 0.0832434669137001, -0.02556494250893593, -0.0498054213821888, -0.01862787827849388, 0.014252952300012112, -0.0029052458703517914, -0.033083390444517136, -0.013084585778415203, 0.0021300853695720434, 0.060769859701395035, 0.057650577276945114, -0.006863991264253855, 0.007595905568450689, 0.015801135450601578, 0.0045322999358177185, 0.04882047697901726, 0.020610731095075607, 0.08218711614608765, 0.0017702735494822264, 0.0027262973599135876, 0.04277890548110008, 0.015661025419831276, -0.03753550350666046, -0.0005686890799552202, 0.0025272779166698456, 0.07148651778697968, 0.08477749675512314, -0.06402449309825897, -0.01930530183017254, 0.005125842522829771, -0.04278011992573738, 0.02227933332324028, -0.0479184091091156, 5.8996867606320556e-33, 0.05445313826203346, -0.02774691954255104, 0.04902210831642151, 0.02312416583299637, -0.009709128178656101, -0.07335525006055832, -0.035029105842113495, -0.06458954513072968, -0.022361481562256813, -0.031698185950517654, -0.06459277868270874, 0.06894983351230621, -0.026636047288775444, -0.037151847034692764, 0.03657681122422218, -0.015499169938266277, -0.08988454937934875, 0.013636005111038685, 0.10712673515081406, 0.0011558346450328827, 0.04071655869483948, -0.06510280817747116, -0.017526822164654732, -0.07224270701408386, 0.06471269577741623, -0.053509850054979324, -0.003763090120628476, 0.02546827495098114, -0.03094807080924511, 0.030261699110269547, -0.03761044889688492, -0.007011511363089085, 0.07931201905012131, 0.07348781824111938, -0.09929189831018448, -0.03607591614127159, -0.005242271814495325, -0.007934917695820332, -0.05305653437972069, -0.03415437042713165, 0.050116486847400665, 0.021562382578849792, 0.04432060196995735, -0.029083486646413803, 0.0260308850556612, -0.06768690049648285, 0.025263169780373573, -0.04553442820906639, 0.05149155482649803, 0.00040769498446024954, -0.021525442600250244, 0.012933778576552868, 0.016339173540472984, -0.04098169505596161, -0.015812717378139496, -0.03510180488228798, 0.08090074360370636, -0.11410169303417206, -0.07736697047948837, 0.031912416219711304, -0.025757495313882828, -0.015114803798496723, -0.03480956330895424, -0.04386598989367485, 0.05240260809659958, 0.03848478943109512, -0.0475064255297184, 0.07549244910478592, -0.0316365621984005, -0.005343396682292223, -0.13091573119163513, 0.0561695396900177, -0.05576261132955551, 0.022122781723737717, 0.007600797805935144, -0.11338489502668381, 0.022679008543491364, 0.06322527676820755, -0.11869718879461288, 0.05870378762483597, 0.019744763150811195, -0.005903706885874271, 0.03479377180337906, 0.07457616180181503, 0.001273106667213142, -0.05564146116375923, -0.043265316635370255, 0.00037424187758006155, -0.0023405335377901793, 0.01969747059047222, 0.12823009490966797, -0.03255937993526459, 0.004072682932019234, 0.10187765210866928, -0.11699508130550385, -6.140073886007275e-33, -0.010056969709694386, -0.0538017563521862, 0.002561451168730855, 0.0007385881617665291, -0.04257247969508171, 0.007394472602754831, -0.016810420900583267, 0.029751228168606758, -0.016484370455145836, -0.06190598011016846, 0.001499353675171733, -0.07210534065961838, -0.008524283766746521, -0.039906371384859085, -0.07941077649593353, 0.04179983213543892, -0.11855427175760269, -0.0254684891551733, 0.021799825131893158, 0.10803650319576263, 0.04457880184054375, -0.039010025560855865, 0.07060506939888, 0.04782189056277275, 0.00015906411863397807, 0.005046319216489792, -0.0340595543384552, -0.01626357063651085, -0.037473712116479874, -0.0640653520822525, 0.03127007558941841, -0.10610466450452805, -0.03564264625310898, 0.01967322640120983, -0.012411394156515598, -0.08659385144710541, -0.08104566484689713, 0.09294819086790085, -0.006778118200600147, 0.0014777103206142783, 0.0861266627907753, 0.10651259124279022, -0.03635459765791893, -0.0006124078063294291, -0.032782185822725296, 0.06888248026371002, 0.06584586203098297, -0.04195502772927284, -0.010929137468338013, -0.03993040695786476, -0.017878616228699684, -0.01563487946987152, 0.025638459250330925, 0.05788671597838402, -0.01985427364706993, 0.06363053619861603, 0.04800533875823021, 0.04396515339612961, -0.02608325518667698, 0.06303803622722626, 0.08776211738586426, -0.018229836598038673, 0.07686471194028854, 0.06562568247318268, 0.07510976493358612, 0.038582123816013336, -0.021298373118042946, 0.07219717651605606, -0.02823866344988346, 0.05035591870546341, 0.021460210904479027, -0.07007070630788803, -0.00032559383544139564, -0.01957820914685726, -0.015380925498902798, -0.0684252679347992, -0.012103653512895107, -0.0716816782951355, -0.035469964146614075, 0.05608773231506348, 0.002153527457267046, 0.031589657068252563, -0.12260454148054123, 0.015471618622541428, 0.021680353209376335, 0.05916815996170044, 0.004578430205583572, 0.060334205627441406, 0.10307992994785309, 0.07627636939287186, -0.008209509775042534, -0.037777870893478394, -0.07265736907720566, 0.11023523658514023, 0.037422407418489456, -5.4074785538205106e-8, 0.035445600748062134, 0.03369840607047081, -0.06015452742576599, -0.022663068026304245, 0.0407925546169281, -0.05664123222231865, 0.018673714250326157, -0.05475989356637001, -0.05824829265475273, -0.015240645967423916, -0.027839533984661102, 0.033729735761880875, -0.03481128811836243, -0.04188055172562599, 0.011817221529781818, -0.02327216975390911, -0.018762169405817986, 0.07128309458494186, 0.017460767179727554, -0.04958118870854378, -0.06320473551750183, -0.07947775721549988, 0.021306704729795456, 0.08118551224470139, -0.014840894378721714, 0.04318898171186447, 0.051218293607234955, 0.01740950718522072, 0.11151585727930069, 0.03559012711048126, -0.06726231426000595, -0.06675602495670319, -0.05042015388607979, 0.03146229684352875, -0.05213435739278793, 0.08723316341638565, -0.11275374889373779, 0.017973491922020912, 0.04328488931059837, 0.08322417736053467, 0.011226075701415539, 0.005501787643879652, -0.04284641891717911, 0.02164720743894577, -0.0026912784669548273, 0.04705001041293144, -0.02089281938970089, 0.046431973576545715, 0.04190364107489586, -0.012222297489643097, 0.02631811425089836, -0.059954170137643814, -0.0009362924029119313, 0.11145529896020889, -0.011429209262132645, 0.02446046657860279, -0.01636042818427086, -0.026844540610909462, 0.06905987858772278, 0.011348148807883263, -0.01669415272772312, -0.01779288984835148, 0.031631529331207275, -0.003388795768842101 ]
0.140078
{{% alert title="Note" %}} This tutorial applies only for new clusters. {{% /alert %}} Pod Security Admission is an admission controller that applies [Pod Security Standards](/docs/concepts/security/pod-security-standards/) when pods are created. It is a feature GA'ed in v1.25. In this tutorial, you will enforce the `baseline` Pod Security Standard, one namespace at a time. You can also apply Pod Security Standards to multiple namespaces at once at the cluster level. For instructions, refer to [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/). ## {{% heading "prerequisites" %}} Install the following on your workstation: - [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) - [kubectl](/docs/tasks/tools/) ## Create cluster 1. Create a `kind` cluster as follows: ```shell kind create cluster --name psa-ns-level ``` The output is similar to this: ``` Creating cluster "psa-ns-level" ... βœ“ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) πŸ–Ό βœ“ Preparing nodes πŸ“¦ βœ“ Writing configuration πŸ“œ βœ“ Starting control-plane πŸ•ΉοΈ βœ“ Installing CNI πŸ”Œ βœ“ Installing StorageClass πŸ’Ύ Set kubectl context to "kind-psa-ns-level" You can now use your cluster with: kubectl cluster-info --context kind-psa-ns-level Not sure what to do next? πŸ˜… Check out https://kind.sigs.k8s.io/docs/user/quick-start/ ``` 1. Set the kubectl context to the new cluster: ```shell kubectl cluster-info --context kind-psa-ns-level ``` The output is similar to this: ``` Kubernetes control plane is running at https://127.0.0.1:50996 CoreDNS is running at https://127.0.0.1:50996/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ``` ## Create a namespace Create a new namespace called `example`: ```shell kubectl create ns example ``` The output is similar to this: ``` namespace/example created ``` ## Enable Pod Security Standards checking for that namespace 1. Enable Pod Security Standards on this namespace using labels supported by built-in Pod Security Admission. In this step you will configure a check to warn on Pods that don't meet the latest version of the \_baseline\_ pod security standard. ```shell kubectl label --overwrite ns example \ pod-security.kubernetes.io/warn=baseline \ pod-security.kubernetes.io/warn-version=latest ``` 2. You can configure multiple pod security standard checks on any namespace, using labels. The following command will `enforce` the `baseline` Pod Security Standard, but `warn` and `audit` for `restricted` Pod Security Standards as per the latest version (default value) ```shell kubectl label --overwrite ns example \ pod-security.kubernetes.io/enforce=baseline \ pod-security.kubernetes.io/enforce-version=latest \ pod-security.kubernetes.io/warn=restricted \ pod-security.kubernetes.io/warn-version=latest \ pod-security.kubernetes.io/audit=restricted \ pod-security.kubernetes.io/audit-version=latest ``` ## Verify the Pod Security Standard enforcement 1. Create a baseline Pod in the `example` namespace: ```shell kubectl apply -n example -f https://k8s.io/examples/security/example-baseline-pod.yaml ``` The Pod does start OK; the output includes a warning. For example: ``` Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "nginx" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "nginx" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "nginx" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "nginx" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost") pod/nginx created ``` 1. Create a baseline Pod in the `default` namespace: ```shell kubectl apply -n default -f https://k8s.io/examples/security/example-baseline-pod.yaml ``` Output is similar to this: ``` pod/nginx created ``` The Pod Security Standards enforcement and warning settings were applied only to the `example` namespace. You could create the same Pod in the `default` namespace with no warnings. ## Clean up Now delete the cluster which you created above by running the following command: ```shell kind delete cluster --name psa-ns-level ``` ## {{% heading "whatsnext" %}} - Run a [shell script](/examples/security/kind-with-namespace-level-baseline-pod-security.sh) to perform all the preceding steps all at once. 1. Create kind cluster 2. Create new namespace 3. Apply `baseline` Pod Security Standard in `enforce` mode while applying `restricted` Pod Security Standard also in `warn` and `audit` mode. 4. Create a new pod with the following pod security standards applied - [Pod Security Admission](/docs/concepts/security/pod-security-admission/) - [Pod Security Standards](/docs/concepts/security/pod-security-standards/) - [Apply
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/ns-level-pss.md
[ 0.04340675473213196, 0.0031550147105008364, 0.0139235258102417, 0.03451167419552803, 0.03028232418000698, -0.007182256318628788, 0.043072644621133804, -0.00011943767458433285, 0.02374703623354435, 0.028413545340299606, 0.0052966708317399025, -0.052996087819337845, 0.042492836713790894, 0.014267616905272007, 0.04929379001259804, -0.01834079995751381, 0.047527167946100235, -0.03460752218961716, 0.023600991815328598, -0.030397191643714905, 0.05198831111192703, -0.018766002729535103, 0.04786449298262596, 0.003797807265073061, -0.11574354022741318, 0.0076868352480232716, -0.03185611963272095, 0.06522628664970398, -0.0008884826092980802, -0.03294965624809265, 0.016268227249383926, 0.015536881051957607, 0.10680679231882095, 0.05887863039970398, 0.10950013995170593, 0.05135996639728546, 0.0486849881708622, -0.04823080077767372, -0.059283845126628876, 0.0039803204126656055, 0.027199761942029, -0.06379619985818863, -0.09314330667257309, -0.001238758908584714, -0.03169301524758339, -0.05937618389725685, -0.06394313275814056, -0.08717237412929535, 0.011750079691410065, -0.02565411850810051, 0.0380718894302845, -0.08454777300357819, 0.08542337268590927, -0.00958604458719492, 0.008247194811701775, 0.06916452944278717, 0.010072504170238972, 0.089174784719944, 0.06170663982629776, 0.004171811509877443, 0.02413018047809601, -0.0950826108455658, 0.003934435546398163, -0.03639629855751991, 0.022322868928313255, 0.005149192176759243, -0.037127137184143066, 0.07322338223457336, 0.0172308087348938, 0.035609468817710876, 0.03394332155585289, 0.03118005581200123, 0.0014917862135916948, -0.02750733681023121, -0.02228906936943531, 0.014111235737800598, -0.05320879444479942, 0.06698741763830185, -0.009182687848806381, -0.03457842394709587, -0.028825754299759865, 0.004704822786152363, 0.010648186318576336, -0.015302281826734543, -0.038447268307209015, 0.07423333823680878, -0.05937768518924713, -0.07640539854764938, 0.0202773604542017, 0.0007614460191689432, 0.033195625990629196, -0.12806616723537445, 0.050093770027160645, -0.05286374315619469, 0.037079792469739914, -0.023076575249433517, -0.050575751811265945, -0.03617538511753082, 0.011516138911247253, 0.001594323432072997, -0.01173523347824812, -0.05794764310121536, -0.025382721796631813, 0.005383589304983616, 0.08827792853116989, -0.01607016660273075, -0.05241432785987854, -0.041213829070329666, 0.06461624056100845, 0.07412949949502945, -0.014535385183990002, 0.035670388489961624, -0.011881363578140736, 0.04727154225111008, -0.056321121752262115, 0.0017592061776667833, 0.032353173941373825, 0.026746626943349838, 0.07726062834262848, 0.06445600092411041, 0.13157469034194946, -0.07049139589071274, -0.009550276212394238, -0.017930740490555763, -0.061766475439071655, -0.01951942965388298, -0.03387720137834549, 5.679076776696444e-34, 0.04169399291276932, -0.02312094159424305, -0.03120221570134163, -0.03380900248885155, 0.030250364914536476, -0.09976385533809662, -0.06835193186998367, 0.024393640458583832, -0.05783315747976303, -0.019670110195875168, -0.028701063245534897, 0.059985581785440445, 0.0658029317855835, -0.08740726113319397, -0.021062815561890602, 0.03733832761645317, -0.042416706681251526, 0.114878810942173, 0.1315443366765976, 0.025846978649497032, 0.03258548676967621, -0.07159819453954697, -0.01934310421347618, 0.01617724448442459, 0.05096156895160675, 0.027243388816714287, 0.007643548306077719, -0.12559451162815094, 0.022237248718738556, 0.008877099491655827, -0.05965247005224228, -0.04793606698513031, 0.04799920320510864, 0.028075452893972397, -0.1062750592827797, -0.02771911397576332, 0.020501023158431053, 0.043020427227020264, -0.0810314491391182, -0.12313911318778992, 0.0448521226644516, -0.021029386669397354, 0.03331124037504196, -0.006586950272321701, 0.06857291609048843, 0.025624394416809082, 0.026498692110180855, -0.03266759216785431, 0.11281442642211914, 0.03216208145022392, -0.07794426381587982, -0.10572653263807297, 0.015678398311138153, -0.006935993675142527, 0.00956654455512762, -0.06454537063837051, 0.018000999465584755, -0.020475422963500023, -0.04718814417719841, -0.07065314054489136, -0.052320804446935654, 0.009183976799249649, 0.009179339744150639, -0.019880151376128197, 0.013917668722569942, -0.002231134567409754, -0.037806957960128784, 0.04963773861527443, 0.06610094755887985, 0.04364858940243721, -0.14188189804553986, 0.048823729157447815, -0.06321004033088684, 0.08167624473571777, -0.05423096939921379, -0.09895987808704376, 0.011337182484567165, 0.07626224309206009, -0.07065212726593018, 0.05850939080119133, -0.009242504835128784, -0.024467693641781807, -0.033551767468452454, 0.09778798371553421, -0.0000638902565697208, 0.01786014251410961, 0.009488353505730629, 0.004555875901132822, -0.10731486976146698, -0.002877284539863467, 0.019180521368980408, -0.05017454922199249, -0.006376114673912525, 0.06517239660024643, -0.10100225359201431, -2.3406487594611545e-33, 0.10958344489336014, -0.014315558597445488, -0.029518242925405502, -0.012194766663014889, -0.019056348130106926, 0.029115011915564537, -0.002015897771343589, 0.05588613823056221, -0.0016834500711411238, -0.012156276032328606, -0.034318387508392334, -0.020800592377781868, 0.11738426238298416, 0.0006412302609533072, -0.04775678366422653, 0.03427882865071297, -0.0831468477845192, 0.029202844947576523, 0.00522657111287117, 0.012225017882883549, -0.05753226578235626, -0.0025157586205750704, 0.01390661858022213, 0.021100785583257675, 0.020671168342232704, -0.0003862479352392256, 0.013086971826851368, 0.018511047586798668, -0.04556318745017052, 0.017637724056839943, -0.019546542316675186, -0.062375761568546295, -0.07551680505275726, 0.0625791996717453, 0.015617500990629196, -0.10742833465337753, -0.019130801782011986, 0.010219407267868519, 0.030835475772619247, 0.029624270275235176, 0.07248206436634064, 0.05067513510584831, -0.06423086673021317, -0.005726143717765808, -0.07085173577070236, 0.019527845084667206, 0.10721097886562347, 0.010841840878129005, -0.04223465174436569, -0.09605301916599274, -0.023151515051722527, -0.06562904268503189, -0.0806957557797432, 0.048138197511434555, -0.04029282554984093, 0.011630894616246223, 0.03770088776946068, 0.038160499185323715, -0.09317194670438766, 0.03618047386407852, 0.06201217696070671, -0.07730619609355927, 0.03765334561467171, 0.07080930471420288, -0.04006022587418556, -0.10785387456417084, -0.020893506705760956, 0.07149799168109894, -0.011743449606001377, 0.009731934405863285, -0.01815662533044815, -0.007783301640301943, 0.051947809755802155, 0.0565725602209568, 0.02006497047841549, -0.02247052825987339, 0.060300007462501526, -0.06626284867525101, 0.003922682721167803, 0.018757516518235207, -0.0635189339518547, 0.06720153242349625, -0.07610152661800385, 0.05717097967863083, 0.0635162815451622, 0.07249496877193451, 0.11032918840646744, 0.09366216510534286, 0.028501076623797417, 0.08405716717243195, -0.0028542387299239635, 0.022535210475325584, 0.028174640610814095, 0.07117816805839539, -0.0842391848564148, -4.839760237018709e-8, 0.05637599155306816, -0.043641187250614166, -0.013939814642071724, 0.04140109196305275, 0.04728299751877785, 0.00143970747012645, -0.038267023861408234, -0.03263380378484726, -0.05383981019258499, -0.00865841843187809, -0.03472055494785309, 0.06545738130807877, -0.08219266682863235, -0.0364142507314682, -0.0055693998001515865, -0.039125923067331314, -0.007594795897603035, 0.11817625910043716, -0.03858153894543648, -0.03518931567668915, -0.022575071081519127, -0.06747601926326752, 0.008570905774831772, -0.04443219676613808, 0.022687923163175583, 0.07629609853029251, 0.022188842296600342, -0.04285353422164917, 0.03655112162232399, -0.006596599705517292, -0.04487183317542076, -0.031279467046260834, -0.061934392899274826, 0.04534842446446419, -0.016618845984339714, 0.03546890616416931, -0.02358381077647209, 0.033880945295095444, 0.0520157553255558, 0.07899810373783112, -0.04020702838897705, -0.023691296577453613, -0.05680469796061516, 0.003944352734833956, -0.05540310963988304, 0.064451664686203, -0.0024564580526202917, 0.022314395755529404, 0.038684528321027756, 0.03040521778166294, -0.02725876308977604, -0.04075457528233528, -0.018023665994405746, 0.05975063890218735, -0.011854591779410839, 0.013985181227326393, -0.008687899447977543, -0.07224013656377792, 0.03888993710279465, -0.028504865244030952, 0.04013500735163689, -0.01609780266880989, 0.027341853827238083, 0.0073225656524300575 ]
0.192041