content
stringlengths 3
20.5k
| original_id
null | file_path
stringlengths 27
155
| url
stringlengths 54
193
| embeddings
listlengths 384
384
| score
float64 -0.21
0.65
|
|---|---|---|---|---|---|
node kubectl uncordon ``` ## Upgrade worker nodes The upgrade procedure on worker nodes should be executed one node at a time or few nodes at a time, without compromising the minimum required capacity for running your workloads. The following pages show how to upgrade Linux and Windows worker nodes: \* [Upgrade Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/) \* [Upgrade Windows nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes/) ## Verify the status of the cluster After the kubelet is upgraded on all nodes verify that all nodes are available again by running the following command from anywhere kubectl can access the cluster: ```shell kubectl get nodes ``` The `STATUS` column should show `Ready` for all your nodes, and the version number should be updated. ## Recovering from a failure state If `kubeadm upgrade` fails and does not roll back, for example because of an unexpected shutdown during execution, you can run `kubeadm upgrade` again. This command is idempotent and eventually makes sure that the actual state is the desired state you declare. To recover from a bad state, you can also run `sudo kubeadm upgrade apply --force` without changing the version that your cluster is running. During upgrade kubeadm writes the following backup folders under `/etc/kubernetes/tmp`: - `kubeadm-backup-etcd--` - `kubeadm-backup-manifests--` `kubeadm-backup-etcd` contains a backup of the local etcd member data for this control plane Node. In case of an etcd upgrade failure and if the automatic rollback does not work, the contents of this folder can be manually restored in `/var/lib/etcd`. In case external etcd is used this backup folder will be empty. `kubeadm-backup-manifests` contains a backup of the static Pod manifest files for this control plane Node. In case of a upgrade failure and if the automatic rollback does not work, the contents of this folder can be manually restored in `/etc/kubernetes/manifests`. If for some reason there is no difference between a pre-upgrade and post-upgrade manifest file for a certain component, a backup file for it will not be written. {{< note >}} After the cluster upgrade using kubeadm, the backup directory `/etc/kubernetes/tmp` will remain and these backup files will need to be cleared manually. {{}} ## How it works `kubeadm upgrade apply` does the following: - Checks that your cluster is in an upgradeable state: - The API server is reachable - All nodes are in the `Ready` state - The control plane is healthy - Enforces the version skew policies. - Makes sure the control plane images are available or available to pull to the machine. - Generates replacements and/or uses user supplied overwrites if component configs require version upgrades. - Upgrades the control plane components or rollbacks if any of them fails to come up. - Applies the new `CoreDNS` and `kube-proxy` manifests and makes sure that all necessary RBAC rules are created. - Creates new certificate and key files of the API server and backs up old files if they're about to expire in 180 days. `kubeadm upgrade node` does the following on additional control plane nodes: - Fetches the kubeadm `ClusterConfiguration` from the cluster. - Optionally backups the kube-apiserver certificate. - Upgrades the static Pod manifests for the control plane components. - Upgrades the kubelet configuration for this node. `kubeadm upgrade node` does the following on worker nodes: - Fetches the kubeadm `ClusterConfiguration` from the cluster. - Upgrades the kubelet configuration for this node.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
|
[
0.017339246347546577,
0.006370896939188242,
-0.035223886370658875,
0.008157902397215366,
0.0058418987318873405,
-0.04043405503034592,
-0.0568680502474308,
-0.07244887948036194,
-0.009385152719914913,
0.0779670849442482,
-0.0036443634890019894,
-0.07951579242944717,
-0.015495628118515015,
-0.0903702899813652,
-0.0019683956634253263,
0.020236311480402946,
0.0012836918467655778,
0.019986003637313843,
-0.00015017992700450122,
-0.09940839558839798,
-0.06228462979197502,
-0.03734453767538071,
0.011325716972351074,
-0.02995225414633751,
-0.01847923919558525,
-0.035561058670282364,
-0.05480717122554779,
-0.05028526857495308,
-0.02284850738942623,
-0.06034094840288162,
-0.06076597422361374,
-0.011904415674507618,
-0.023210769519209862,
0.020276224240660667,
0.09899649769067764,
0.13468262553215027,
0.031131530180573463,
0.04302863031625748,
-0.06682166457176208,
-0.01574852131307125,
0.10279427468776703,
-0.0010594917694106698,
-0.09085693955421448,
-0.006336558610200882,
-0.03786294534802437,
0.03502097353339195,
-0.10675973445177078,
-0.02651371993124485,
-0.03624333068728447,
-0.031030841171741486,
0.02098451927304268,
-0.06331467628479004,
0.03499823808670044,
0.04991660639643669,
0.035254523158073425,
0.059462837874889374,
0.05334791913628578,
-0.007861853577196598,
0.0722438246011734,
-0.03312475606799126,
0.034088704735040665,
-0.0325503833591938,
0.022469323128461838,
-0.025689460337162018,
-0.025983985513448715,
0.025777583941817284,
0.014925459399819374,
-0.05552658811211586,
-0.015678992494940758,
0.018171263858675957,
-0.00036879905383102596,
-0.028233753517270088,
-0.05522659420967102,
-0.03948230668902397,
-0.052716612815856934,
0.07308193296194077,
0.054439444094896317,
0.05985309183597565,
-0.035416487604379654,
-0.046189744025468826,
-0.06400471925735474,
0.026518410071730614,
-0.003648496000096202,
-0.08316851407289505,
-0.10755188018083572,
0.0499853640794754,
-0.10621506720781326,
-0.028019307181239128,
0.029058480635285378,
0.033936697989702225,
0.007891379296779633,
0.007171199191361666,
0.0069023133255541325,
-0.05303626134991646,
0.04772626981139183,
-0.00010672404459910467,
-0.007848558947443962,
0.054294563829898834,
0.05442378297448158,
-0.0292801670730114,
0.033294156193733215,
0.015774011611938477,
0.01972380094230175,
-0.018129676580429077,
-0.06315130740404129,
0.00744697917252779,
-0.05164114385843277,
0.025550702586770058,
0.028623832389712334,
-0.04877665266394615,
-0.006217679940164089,
0.07616163045167923,
-0.04660365730524063,
0.019657008349895477,
-0.013445292599499226,
0.02320348657667637,
0.07328189164400101,
0.014609386213123798,
-0.04895728826522827,
0.06841997057199478,
0.09343137592077255,
-0.08175166696310043,
-0.005946469027549028,
-0.03265255317091942,
-0.12216134369373322,
-0.013641055673360825,
0.03580270707607269,
4.281368259491658e-33,
0.05305219441652298,
-0.09690607339143753,
0.05765770748257637,
0.021302223205566406,
0.05364615470170975,
-0.02888132445514202,
-0.04302534833550453,
-0.03222465515136719,
-0.04324278607964516,
-0.09536611288785934,
-0.07153228670358658,
-0.000005152597623236943,
-0.04887237399816513,
-0.0611877404153347,
0.051872506737709045,
-0.047996267676353455,
0.014935892075300217,
0.054094064980745316,
0.06958366930484772,
0.01931925117969513,
0.13207517564296722,
-0.07734984159469604,
-0.09101516753435135,
0.036655835807323456,
0.029660183936357498,
-0.025992225855588913,
0.11446689814329147,
-0.029468294233083725,
0.02532144822180271,
-0.0036517230328172445,
-0.03975372388958931,
0.014046999625861645,
0.014726831577718258,
0.05731021240353584,
-0.19366411864757538,
0.023445170372724533,
-0.0359523743391037,
0.030712906271219254,
-0.05079208314418793,
-0.11087460815906525,
-0.010290411300957203,
-0.020768431946635246,
0.06880711019039154,
-0.03755895420908928,
0.13704577088356018,
-0.06412004679441452,
-0.009430599398911,
-0.04080391302704811,
0.06865890324115753,
0.019525622949004173,
0.008637197315692902,
0.019023485481739044,
0.06156907230615616,
-0.04134618490934372,
0.019493302330374718,
0.052160412073135376,
0.1134047731757164,
0.014928041957318783,
-0.03489155322313309,
0.017891958355903625,
0.0014594224048778415,
-0.003037064103409648,
-0.025013970211148262,
0.02153473161160946,
0.02686559595167637,
0.0028291300404816866,
-0.050351377576589584,
0.03047596849501133,
-0.02765408344566822,
0.09402882307767868,
-0.0357016995549202,
0.04987063258886337,
-0.01004182267934084,
0.06639070808887482,
-0.033729154616594315,
-0.013205382041633129,
-0.03312075138092041,
-0.046045612543821335,
-0.11614945530891418,
0.08314768970012665,
0.047414787113666534,
-0.048604872077703476,
-0.08529802411794662,
-0.023205209523439407,
0.11513897776603699,
-0.03708171844482422,
-0.05578749626874924,
0.021693546324968338,
-0.019039209932088852,
0.022216027602553368,
0.05765988305211067,
-0.011484251357614994,
-0.028606444597244263,
0.01480815652757883,
-0.08457337319850922,
-6.019550082875481e-33,
0.08990489691495895,
0.008889371529221535,
0.03953908756375313,
0.04588666558265686,
0.005811221897602081,
0.04065732657909393,
-0.11560296267271042,
0.06338006258010864,
-0.09341616183519363,
-0.036404088139534,
-0.06250877678394318,
-0.013294371776282787,
0.013346063904464245,
-0.005705465096980333,
-0.07637128978967667,
0.00045796638005413115,
-0.02853238768875599,
0.007273878902196884,
0.003082862589508295,
0.10680750012397766,
0.009638953022658825,
0.07413718104362488,
0.05409993603825569,
0.02898484840989113,
0.00016680813860148191,
0.006995266303420067,
-0.03409301117062569,
0.07852879166603088,
-0.06653875857591629,
0.02049216255545616,
0.0636538490653038,
-0.07317429035902023,
-0.07984262704849243,
0.06587464362382889,
0.06764627993106842,
-0.038765035569667816,
0.05476883053779602,
-0.004428563639521599,
-0.006404372397810221,
0.0784752368927002,
0.03530414029955864,
-0.015462761744856834,
-0.06788621842861176,
-0.020518479868769646,
0.002682021353393793,
0.058039020746946335,
0.018081868067383766,
-0.015594540163874626,
-0.048838645219802856,
-0.047303006052970886,
-0.018684184178709984,
0.009766237810254097,
-0.02053713984787464,
0.11563475430011749,
-0.011322412639856339,
0.011378239840269089,
0.015787340700626373,
0.08980796486139297,
-0.07615203410387039,
-0.015965351834893227,
0.02943318337202072,
-0.07387594133615494,
0.05203317105770111,
0.05818042904138565,
-0.030305366963148117,
-0.025733288377523422,
0.03025376796722412,
0.051083337515592575,
-0.05162406340241432,
0.061491817235946655,
0.012427506037056446,
0.06357262283563614,
-0.053605493158102036,
0.04756191000342369,
-0.022461917251348495,
-0.03273722529411316,
0.030548300594091415,
-0.03384112939238548,
-0.01475610863417387,
0.023445812985301018,
-0.04443266987800598,
0.013191607780754566,
-0.03694397583603859,
0.011466984637081623,
0.025976495817303658,
0.020695481449365616,
0.09543640911579132,
0.05325505882501602,
0.02193542942404747,
0.048377491533756256,
-0.043745119124650955,
-0.020894847810268402,
-0.06687363982200623,
0.02779548056423664,
-0.03149786219000816,
-4.692135746608983e-8,
0.030071472749114037,
-0.014109006151556969,
-0.06611044704914093,
-0.002903488464653492,
0.09776362031698227,
-0.05568980798125267,
0.002043979475274682,
-0.014772722497582436,
-0.0633034035563469,
-0.05505512282252312,
-0.0014710797695443034,
0.021848957985639572,
0.01603761874139309,
0.023721374571323395,
0.04684260115027428,
-0.013101865537464619,
0.00006328771269181743,
-0.01229331735521555,
0.07705515623092651,
-0.03397161886096001,
-0.037277158349752426,
-0.024800244718790054,
0.03572993353009224,
0.08706225454807281,
-0.006257328670471907,
0.020171605050563812,
0.08374114334583282,
0.012379548512399197,
0.04074554890394211,
0.010034956969320774,
-0.039778053760528564,
-0.03513449430465698,
-0.01650231145322323,
0.07313057780265808,
0.01615028642117977,
0.034894123673439026,
-0.044957105070352554,
0.05897163972258568,
0.07665619254112244,
0.09191536903381348,
0.013059256598353386,
0.030169058591127396,
-0.05401831865310669,
0.06366641074419022,
-0.0037412995006889105,
0.037791263312101364,
-0.07692516595125198,
0.04624834656715393,
-0.05201888084411621,
-0.09201359748840332,
-0.04353487864136696,
-0.05683057755231857,
-0.017036274075508118,
0.035353705286979675,
-0.08300327509641647,
0.037253569811582565,
-0.04291589930653572,
-0.003549144836142659,
0.03303183242678642,
0.03622877597808838,
0.05834664776921272,
-0.006526622921228409,
-0.026796696707606316,
-0.040834296494722366
] | 0.155513
|
{{< feature-state for\_k8s\_version="v1.18" state="beta" >}} This page explains how to upgrade a Windows node created with kubeadm. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs-node-upgrade.md" >}} {{< version-check >}} \* Familiarize yourself with [the process for upgrading the rest of your kubeadm cluster](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade). You will want to upgrade the control plane nodes before upgrading your Windows nodes. ## Upgrading worker nodes ### Upgrade kubeadm 1. From the Windows node, upgrade kubeadm: ```powershell # replace {{< skew currentPatchVersion >}} with your desired version curl.exe -Lo "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubeadm.exe" ``` ### Drain the node 1. From a machine with access to the Kubernetes API, prepare the node for maintenance by marking it unschedulable and evicting the workloads: ```shell # replace with the name of your node you are draining kubectl drain --ignore-daemonsets ``` You should see output similar to this: ``` node/ip-172-31-85-18 cordoned node/ip-172-31-85-18 drained ``` ### Upgrade the kubelet configuration 1. From the Windows node, call the following command to sync new kubelet configuration: ```powershell kubeadm upgrade node ``` ### Upgrade kubelet and kube-proxy 1. From the Windows node, upgrade and restart the kubelet: ```powershell stop-service kubelet curl.exe -Lo "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubelet.exe" restart-service kubelet ``` 2. From the Windows node, upgrade and restart the kube-proxy. ```powershell stop-service kube-proxy curl.exe -Lo "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kube-proxy.exe" restart-service kube-proxy ``` {{< note >}} If you are running kube-proxy in a HostProcess container within a Pod, and not as a Windows Service, you can upgrade kube-proxy by applying a newer version of your kube-proxy manifests. {{< /note >}} ### Uncordon the node 1. From a machine with access to the Kubernetes API, bring the node back online by marking it schedulable: ```shell # replace with the name of your node kubectl uncordon ``` ## {{% heading "whatsnext" %}} \* See how to [Upgrade Linux nodes](/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes/).
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes.md
|
[
0.044049810618162155,
-0.007262672297656536,
0.046963226050138474,
0.016223646700382233,
-0.022104645147919655,
0.06010722741484642,
-0.040584128350019455,
-0.07914825528860092,
-0.04309512674808502,
0.10002948343753815,
-0.04550323635339737,
-0.08910734206438065,
-0.02288919873535633,
-0.061953358352184296,
0.043859533965587616,
0.09315375983715057,
0.021974699571728706,
-0.045174602419137955,
0.024167975410819054,
-0.04437471181154251,
-0.08581961691379547,
-0.03840452432632446,
-0.0036814569029957056,
-0.02519982121884823,
-0.03719332069158554,
-0.008440709672868252,
-0.01015869714319706,
-0.006003428716212511,
-0.007934702560305595,
0.03337112441658974,
-0.04564514383673668,
-0.0006099549354985356,
-0.0028087464161217213,
0.02574833668768406,
0.07645075023174286,
0.0671583041548729,
0.01723603717982769,
0.004891561809927225,
-0.06585491448640823,
-0.014719400554895401,
0.0945625826716423,
0.039606932550668716,
-0.07064860314130783,
-0.05579044669866562,
-0.006499727722257376,
0.035340968519449234,
-0.05048888176679611,
0.007394680753350258,
-0.04120413959026337,
-0.023096662014722824,
0.0029881035443395376,
-0.14830012619495392,
0.02969237230718136,
-0.03606795519590378,
0.02725156396627426,
0.05484790354967117,
0.04154278710484505,
0.05907444655895233,
0.08208364993333817,
-0.01878987066447735,
0.05430103838443756,
-0.11034850776195526,
0.017271827906370163,
-0.06323491036891937,
-0.0539681650698185,
0.005797852296382189,
0.008401017636060715,
-0.02851036563515663,
-0.005389143247157335,
-0.011191274970769882,
-0.07729236036539078,
-0.010316167958080769,
-0.051147203892469406,
-0.050848159939050674,
-0.023686710745096207,
0.046569131314754486,
0.012650420889258385,
0.1054215282201767,
0.02510429173707962,
-0.07921919971704483,
-0.04604692757129669,
-0.0006503667682409286,
0.015320493839681149,
-0.06212139129638672,
-0.08318515866994858,
0.016301777213811874,
-0.08030108362436295,
-0.09266559779644012,
0.035394154489040375,
0.04026022180914879,
-0.030252285301685333,
-0.10222099721431732,
0.02708839252591133,
-0.07919618487358093,
0.03828909620642662,
0.02073327824473381,
-0.05725301057100296,
0.013886724598705769,
0.05517587438225746,
-0.016992244869470596,
0.008293597027659416,
0.0034908500965684652,
0.0022069024853408337,
0.020771609619259834,
-0.023051435127854347,
0.011874408461153507,
-0.033874064683914185,
0.023086726665496826,
-0.008389169350266457,
0.009150293655693531,
0.0019080793717876077,
0.08327007293701172,
0.004663403611630201,
-0.054880473762750626,
-0.004816207103431225,
-0.0478324294090271,
0.08440927416086197,
-0.011549780145287514,
-0.02420683763921261,
0.08434075117111206,
0.08476362377405167,
-0.10725713521242142,
-0.02723035030066967,
-0.014129948802292347,
-0.11493546515703201,
-0.007562991697341204,
-0.05515056848526001,
3.1802184162291106e-33,
0.08272300660610199,
-0.01718408428132534,
0.04832921922206879,
0.01915966160595417,
0.0599384605884552,
-0.0649891123175621,
0.014843618497252464,
-0.05342821031808853,
-0.026399502530694008,
-0.07111363112926483,
-0.08305419236421585,
-0.006457737181335688,
-0.0035022131633013487,
-0.0680108442902565,
0.049637116491794586,
-0.05025685951113701,
-0.054190706461668015,
0.04499693214893341,
0.1335732340812683,
-0.00513572059571743,
0.04754559323191643,
-0.05310150235891342,
-0.05122901499271393,
-0.06295522302389145,
0.039768777787685394,
-0.005996950902044773,
0.07370829582214355,
-0.01258742157369852,
0.0010063883382827044,
-0.038739778101444244,
-0.032096121460199356,
0.01568443328142166,
-0.010399620048701763,
0.02357666566967964,
-0.20072884857654572,
-0.04647526517510414,
-0.010769429616630077,
0.0037893301341682673,
-0.036220889538526535,
-0.03327834978699684,
0.009300178848206997,
-0.01798839494585991,
0.05517042800784111,
-0.026450248435139656,
0.12916848063468933,
-0.015258293598890305,
0.045958567410707474,
-0.08784577250480652,
0.15010513365268707,
0.00010500305506866425,
-0.03637385368347168,
-0.015389124862849712,
0.02664080075919628,
-0.024331215769052505,
0.0071867345832288265,
0.04000527411699295,
0.11406291276216507,
-0.02652231603860855,
-0.02321511134505272,
-0.08305953443050385,
0.027090754359960556,
-0.004403943195939064,
0.018526777625083923,
0.0017187652410939336,
0.03542226552963257,
-0.028260963037610054,
0.009401493705809116,
0.0665561854839325,
-0.01055123656988144,
0.01331586204469204,
-0.05061597749590874,
0.0179057065397501,
-0.06579176336526871,
0.05573563277721405,
-0.0019208370940759778,
-0.05034288763999939,
-0.014132829383015633,
-0.014899872243404388,
-0.06586805731058121,
0.07702983915805817,
0.0348503403365612,
-0.018794609233736992,
-0.03225550800561905,
-0.0626475140452385,
0.10878394544124603,
-0.06389398872852325,
-0.01383210439234972,
0.020876314491033554,
0.0381331704556942,
-0.020329589024186134,
0.0346342995762825,
-0.053943537175655365,
-0.04820787161588669,
0.09286309778690338,
-0.06916649639606476,
-4.89864164894355e-33,
0.10339590907096863,
0.01986544020473957,
0.023340459913015366,
0.024567347019910812,
-0.004563246853649616,
0.031112512573599815,
-0.05339479818940163,
0.01907002367079258,
-0.07606465369462967,
-0.06398089230060577,
-0.02328980714082718,
0.006797569338232279,
0.03944757208228111,
0.010844874195754528,
-0.0512470006942749,
0.021938512101769447,
-0.03658256307244301,
0.04761862754821777,
0.034318313002586365,
0.005804246291518211,
-0.002760143717750907,
0.027515530586242676,
-0.007512589450925589,
0.03156772628426552,
-0.0479389913380146,
-0.06559883058071136,
0.05249141901731491,
0.08575088530778885,
0.002106991596519947,
0.05620626360177994,
0.029142167419195175,
-0.04107297956943512,
-0.03385227918624878,
0.053788915276527405,
0.028861185535788536,
-0.04297298565506935,
0.05012236163020134,
-0.07156424969434738,
0.0011729404795914888,
0.06412383913993835,
0.027471961453557014,
-0.03559560328722,
-0.055024825036525726,
-0.020160812884569168,
0.009524215012788773,
0.0818435326218605,
0.08490351587533951,
-0.008206543512642384,
-0.06079355627298355,
-0.04944533482193947,
-0.004783906973898411,
0.029137251898646355,
-0.05826741084456444,
0.07300447672605515,
-0.0597352460026741,
0.014157218858599663,
0.012515446171164513,
0.0915953516960144,
-0.036810390651226044,
-0.03020860068500042,
0.023954566568136215,
-0.06094769015908241,
0.08894751965999603,
-0.032936278730630875,
-0.01752266101539135,
0.03719618543982506,
0.04423394054174423,
0.08739784359931946,
-0.052471306174993515,
0.02284117415547371,
-0.09435196965932846,
0.01632726565003395,
-0.04532889649271965,
-0.0025748303160071373,
-0.0006890565273351967,
-0.03946300223469734,
0.10137062519788742,
0.03879455104470253,
0.03752564638853073,
-0.0011651827953755856,
-0.04757210984826088,
0.048870619386434555,
-0.05458826571702957,
-0.026552893221378326,
0.04750959575176239,
0.055146776139736176,
0.07508690655231476,
0.03455236926674843,
0.00090734229888767,
0.03579249605536461,
-0.024965940043330193,
-0.02507074549794197,
-0.008684932254254818,
0.049562107771635056,
-0.021752869710326195,
-5.32532524744056e-8,
0.03550738841295242,
0.0311413686722517,
-0.10389953851699829,
-0.0014268191298469901,
0.06313920766115189,
0.020826339721679688,
-0.04771968722343445,
0.0024339165538549423,
-0.057435840368270874,
-0.07932482659816742,
-0.03352653235197067,
0.08091184496879578,
0.00581567594781518,
0.05912955850362778,
0.033324237912893295,
-0.03405207395553589,
-0.07153443992137909,
0.07051602751016617,
0.08057518303394318,
-0.0024362998083233833,
0.004036430735141039,
0.009360064752399921,
0.10228719562292099,
0.05036117136478424,
0.047479066997766495,
0.014907249249517918,
0.013154028914868832,
0.009524146094918251,
0.035766586661338806,
0.028494074940681458,
-0.010427912697196007,
-0.0012719853548333049,
-0.03132609650492668,
0.06913065910339355,
0.03840334713459015,
0.019599413499236107,
-0.033599868416786194,
0.11236939579248428,
0.09360253810882568,
0.07503125071525574,
0.04346577450633049,
-0.015004010871052742,
-0.12228796631097794,
0.02631998620927334,
-0.05381966009736061,
0.07943378388881683,
-0.05753563344478607,
0.010890308767557144,
-0.028697561472654343,
-0.0802924856543541,
-0.018918557092547417,
0.00501839118078351,
0.015525131486356258,
0.03791075572371483,
-0.022202150896191597,
0.06208671256899834,
-0.06034444272518158,
-0.02740590274333954,
0.032997142523527145,
0.027668487280607224,
0.038205478340387344,
0.0033062156289815903,
-0.023324180394411087,
-0.056691959500312805
] | 0.062731
|
This page explains how to configure the kubelet's cgroup driver to match the container runtime cgroup driver for kubeadm clusters. ## {{% heading "prerequisites" %}} You should be familiar with the Kubernetes [container runtime requirements](/docs/setup/production-environment/container-runtimes). ## Configuring the container runtime cgroup driver The [Container runtimes](/docs/setup/production-environment/container-runtimes) page explains that the `systemd` driver is recommended for kubeadm based setups instead of the kubelet's [default](/docs/reference/config-api/kubelet-config.v1beta1) `cgroupfs` driver, because kubeadm manages the kubelet as a [systemd service](/docs/setup/production-environment/tools/kubeadm/kubelet-integration). The page also provides details on how to set up a number of different container runtimes with the `systemd` driver by default. ## Configuring the kubelet cgroup driver kubeadm allows you to pass a `KubeletConfiguration` structure during `kubeadm init`. This `KubeletConfiguration` can include the `cgroupDriver` field which controls the cgroup driver of the kubelet. {{< note >}} In v1.22 and later, if the user does not set the `cgroupDriver` field under `KubeletConfiguration`, kubeadm defaults it to `systemd`. In Kubernetes v1.28, you can enable automatic detection of the cgroup driver as an alpha feature. See [systemd cgroup driver](/docs/setup/production-environment/container-runtimes/#systemd-cgroup-driver) for more details. {{< /note >}} A minimal example of configuring the field explicitly: ```yaml # kubeadm-config.yaml kind: ClusterConfiguration apiVersion: kubeadm.k8s.io/v1beta4 kubernetesVersion: v1.21.0 --- kind: KubeletConfiguration apiVersion: kubelet.config.k8s.io/v1beta1 cgroupDriver: systemd ``` Such a configuration file can then be passed to the kubeadm command: ```shell kubeadm init --config kubeadm-config.yaml ``` {{< note >}} Kubeadm uses the same `KubeletConfiguration` for all nodes in the cluster. The `KubeletConfiguration` is stored in a [ConfigMap](/docs/concepts/configuration/configmap) object under the `kube-system` namespace. Executing the sub commands `init`, `join` and `upgrade` would result in kubeadm writing the `KubeletConfiguration` as a file under `/var/lib/kubelet/config.yaml` and passing it to the local node kubelet. On each node, kubeadm detects the CRI socket and stores its details into the `/var/lib/kubelet/instance-config.yaml` file. When executing the `init`, `join`, or `upgrade` subcommands, kubeadm patches the `containerRuntimeEndpoint` value from this instance configuration into `/var/lib/kubelet/config.yaml`. {{< /note >}} ## Using the `cgroupfs` driver To use `cgroupfs` and to prevent `kubeadm upgrade` from modifying the `KubeletConfiguration` cgroup driver on existing setups, you must be explicit about its value. This applies to a case where you do not wish future versions of kubeadm to apply the `systemd` driver by default. See the below section on "[Modify the kubelet ConfigMap](#modify-the-kubelet-configmap)" for details on how to be explicit about the value. If you wish to configure a container runtime to use the `cgroupfs` driver, you must refer to the documentation of the container runtime of your choice. ## Migrating to the `systemd` driver To change the cgroup driver of an existing kubeadm cluster from `cgroupfs` to `systemd` in-place, a similar procedure to a kubelet upgrade is required. This must include both steps outlined below. {{< note >}} Alternatively, it is possible to replace the old nodes in the cluster with new ones that use the `systemd` driver. This requires executing only the first step below before joining the new nodes and ensuring the workloads can safely move to the new nodes before deleting the old nodes. {{< /note >}} ### Modify the kubelet ConfigMap - Call `kubectl edit cm kubelet-config -n kube-system`. - Either modify the existing `cgroupDriver` value or add a new field that looks like this: ```yaml cgroupDriver: systemd ``` This field must be present under the `kubelet:` section of the ConfigMap. ### Update the cgroup driver on all nodes For each node in the cluster: - [Drain the node](/docs/tasks/administer-cluster/safely-drain-node) using `kubectl drain --ignore-daemonsets` - Stop the kubelet using `systemctl stop kubelet` - Stop the container runtime - Modify the container runtime cgroup driver to `systemd` - Set `cgroupDriver: systemd` in `/var/lib/kubelet/config.yaml` - Start the container runtime - Start
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver.md
|
[
0.009827880188822746,
0.01052035391330719,
0.011782938614487648,
-0.032304517924785614,
-0.08710639923810959,
0.03107900172472,
-0.06012469530105591,
0.007795748766511679,
0.047387197613716125,
-0.06613321602344513,
-0.04281741753220558,
-0.11372935771942139,
-0.00003124705472146161,
-0.058783162385225296,
0.006728941109031439,
-0.05603942647576332,
0.10014905780553818,
0.010966668836772442,
-0.008418896235525608,
-0.03878695145249367,
-0.07074373215436935,
-0.03083261288702488,
0.032036397606134415,
0.045237742364406586,
-0.08066580444574356,
-0.09648788720369339,
0.010877976194024086,
-0.04949062317609787,
-0.001425216905772686,
-0.03857922926545143,
-0.006228112615644932,
0.042572468519210815,
0.042204611003398895,
0.032524608075618744,
0.04422805458307266,
0.0758349820971489,
0.06900126487016678,
-0.019097210839390755,
-0.09680989384651184,
0.003139958018437028,
0.039936017245054245,
-0.002568155061453581,
-0.07194898277521133,
0.0258837528526783,
-0.0436091311275959,
0.022898677736520767,
-0.06245289742946625,
-0.014328920282423496,
-0.04711639881134033,
-0.04101741686463356,
0.07506966590881348,
-0.05532817915081978,
0.09150376170873642,
0.011243565939366817,
0.05183596909046173,
0.03346347436308861,
-0.02842353843152523,
0.06046351417899132,
0.10187084972858429,
-0.030830038711428642,
0.018106624484062195,
-0.00858356710523367,
0.028008347377181053,
0.008749937638640404,
-0.04219718649983406,
0.004958278499543667,
0.051287658512592316,
-0.0038738674484193325,
0.0069467732682824135,
-0.042587652802467346,
0.07629844546318054,
-0.0034722003620117903,
0.03867316618561745,
-0.006245038006454706,
0.008147075772285461,
0.018664129078388214,
-0.020355967804789543,
0.016466882079839706,
-0.0033549717627465725,
-0.06683345139026642,
-0.002304196823388338,
0.10648694634437561,
0.07663629204034805,
-0.06134934350848198,
-0.0741339698433876,
-0.05746188387274742,
-0.05054391920566559,
-0.022996339946985245,
0.04307867959141731,
0.009148621000349522,
0.01719162054359913,
-0.009961158037185669,
-0.008854004554450512,
-0.08552365750074387,
0.07985178381204605,
0.0033624195493757725,
0.015419424511492252,
0.041079238057136536,
0.08379770070314407,
-0.04783559590578079,
0.02664070762693882,
0.022995587438344955,
-0.022470789030194283,
0.08124446123838425,
0.035480767488479614,
-0.06192776933312416,
-0.032735180109739304,
0.011456990614533424,
0.019792087376117706,
-0.043946679681539536,
0.06529375910758972,
0.012285890989005566,
-0.019658762961626053,
0.005664271302521229,
-0.03487193584442139,
-0.03641452640295029,
0.07950964570045471,
-0.03656220808625221,
0.05292554944753647,
-0.01203747559338808,
0.01636403053998947,
-0.050648853182792664,
0.013228212483227253,
0.005684544797986746,
-0.01056488323956728,
0.06428297609090805,
-0.0587993822991848,
3.713075148244638e-33,
0.029683293774724007,
-0.11782369017601013,
0.08497883379459381,
-0.007911911234259605,
0.02906341478228569,
-0.09802567958831787,
-0.08272458612918854,
-0.007784842513501644,
-0.05839842930436134,
-0.08702195435762405,
-0.11280155926942825,
-0.007631522137671709,
-0.032789602875709534,
-0.027380088344216347,
0.05137086287140846,
0.004953276831656694,
-0.13774533569812775,
-0.005800803191959858,
0.07782535254955292,
-0.05572895705699921,
0.025508318096399307,
0.020161431282758713,
-0.04304979741573334,
0.006110952701419592,
0.006957626435905695,
0.01068937685340643,
0.023625677451491356,
-0.023337826132774353,
0.03007684089243412,
0.02975376881659031,
0.005986683536320925,
0.04218214377760887,
-0.03772229328751564,
0.0594242699444294,
-0.14210720360279083,
0.07320660352706909,
-0.02938893809914589,
0.04214002192020416,
-0.07494774460792542,
0.0002863217960111797,
-0.01633371226489544,
-0.02159208431839943,
-0.01130671426653862,
-0.1064104214310646,
0.0434567853808403,
-0.09807273745536804,
-0.009040536358952522,
-0.054189085960388184,
0.09106943011283875,
0.04436356574296951,
-0.0526871532201767,
-0.003473767079412937,
0.0589766725897789,
-0.021990003064274788,
0.07456943392753601,
0.030460448935627937,
0.09460380673408508,
-0.07117260992527008,
-0.02934996783733368,
0.023476051166653633,
-0.05966504290699959,
0.027857685461640358,
0.028977835550904274,
0.07522208243608475,
0.013277221471071243,
0.04058917239308357,
0.0029105404391884804,
0.042646463960409164,
-0.07340370863676071,
-0.00976859126240015,
-0.018842577934265137,
0.00999441184103489,
-0.062393058091402054,
0.07609500735998154,
0.024719025939702988,
-0.016603505238890648,
0.03959612920880318,
0.0005500715342350304,
-0.19382716715335846,
0.019605213776230812,
0.02081066183745861,
-0.052610814571380615,
-0.04622776433825493,
0.030164577066898346,
0.02446993812918663,
-0.052302367985248566,
0.0017454616026952863,
0.03351306915283203,
-0.0331592932343483,
0.021973058581352234,
0.00728887552395463,
-0.006001482717692852,
0.009831873700022697,
0.12176251411437988,
-0.11432167142629623,
-5.108378861147032e-33,
0.0886068195104599,
0.027298593893647194,
0.04012833163142204,
-0.012359214946627617,
0.02481340803205967,
0.05979547277092934,
0.006702825427055359,
-0.00017052370822057128,
0.011228741146624088,
-0.023581786081194878,
-0.019718879833817482,
-0.026792379096150398,
-0.011590980924665928,
0.061624880880117416,
-0.1282602995634079,
0.03502538800239563,
-0.037808433175086975,
-0.004530991427600384,
0.011571388691663742,
0.008279705420136452,
-0.050707053393125534,
0.006947127636522055,
0.002298163715749979,
0.024622894823551178,
-0.019548609852790833,
0.008246270939707756,
-0.014844265766441822,
0.03958803042769432,
-0.06210119649767876,
-0.0068948278203606606,
0.050660066306591034,
-0.08150338381528854,
-0.00013819999003317207,
0.046770814806222916,
-0.040348950773477554,
-0.010316835716366768,
-0.02841104194521904,
0.040439631789922714,
-0.027850445359945297,
0.0023016855120658875,
0.021832188591361046,
0.005688869394361973,
-0.07906129211187363,
-0.014594928361475468,
0.002924669301137328,
0.057533059269189835,
0.07288679480552673,
-0.057901911437511444,
-0.007091906853020191,
-0.054086800664663315,
-0.05836402252316475,
-0.01864025369286537,
0.06966628134250641,
0.08105121552944183,
-0.06527453660964966,
0.055488813668489456,
0.08469078689813614,
0.08982840180397034,
-0.04651603475213051,
0.00017175890388898551,
0.06532084941864014,
-0.07480446249246597,
0.06382220983505249,
0.0245601125061512,
-0.04052591696381569,
-0.05907745659351349,
-0.006326831877231598,
0.07082635164260864,
-0.0007658216636627913,
0.028100773692131042,
-0.0547877736389637,
-0.003646761877462268,
-0.006789457984268665,
0.07443124800920486,
-0.05665916949510574,
-0.014427706599235535,
0.013116619549691677,
0.01670701801776886,
0.050889648497104645,
0.017519008368253708,
-0.015090132132172585,
-0.032577093690633774,
0.006442381534725428,
0.03211797773838043,
-0.01736225001513958,
0.007430549245327711,
0.108548104763031,
0.01901986077427864,
0.0650242269039154,
0.03738488256931305,
-0.004094255156815052,
-0.01176759134978056,
-0.005288923159241676,
0.10035089403390884,
-0.02070092037320137,
-4.9597154827552004e-8,
0.0943576842546463,
-0.026078617200255394,
-0.11163610965013504,
-0.028358226642012596,
0.020860014483332634,
-0.039564553648233414,
-0.0159304216504097,
-0.025403575971722603,
-0.0867796540260315,
-0.01932344399392605,
-0.049977488815784454,
0.06858503818511963,
-0.03698603808879852,
0.0009495678823441267,
0.03562125191092491,
-0.024913372471928596,
-0.05748552456498146,
-0.006024534348398447,
0.01909608393907547,
-0.025402098894119263,
-0.06674063950777054,
-0.054370488971471786,
0.022636888548731804,
0.00855990406125784,
0.013876925222575665,
0.0812348872423172,
0.03362799808382988,
0.004718124866485596,
0.02795429900288582,
0.018018102273344994,
-0.07718454301357269,
0.05459250882267952,
-0.12719601392745972,
0.11978582292795181,
0.014304633252322674,
0.022411804646253586,
-0.16635428369045258,
0.0804905816912651,
0.09008246660232544,
0.058013636618852615,
0.02637624740600586,
0.001705725328065455,
-0.06299379467964172,
0.004219087306410074,
0.005799965001642704,
0.06571780890226364,
-0.05011238157749176,
0.07798592001199722,
0.008263162337243557,
0.0178814809769392,
0.006013599690049887,
0.028529517352581024,
-0.018704986199736595,
0.08206886798143387,
-0.007380181457847357,
0.05909126251935959,
-0.04275025054812431,
-0.03587289899587631,
0.0601479671895504,
-0.023829132318496704,
-0.021613148972392082,
0.0454561710357666,
0.026250401511788368,
-0.01278579793870449
] | 0.131517
|
nodes For each node in the cluster: - [Drain the node](/docs/tasks/administer-cluster/safely-drain-node) using `kubectl drain --ignore-daemonsets` - Stop the kubelet using `systemctl stop kubelet` - Stop the container runtime - Modify the container runtime cgroup driver to `systemd` - Set `cgroupDriver: systemd` in `/var/lib/kubelet/config.yaml` - Start the container runtime - Start the kubelet using `systemctl start kubelet` - [Uncordon the node](/docs/tasks/administer-cluster/safely-drain-node) using `kubectl uncordon ` Execute these steps on nodes one at a time to ensure workloads have sufficient time to schedule on different nodes. Once the process is complete ensure that all nodes and workloads are healthy.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver.md
|
[
-0.010947735980153084,
0.06734979152679443,
0.011788723058998585,
0.029795590788125992,
-0.04970702528953552,
-0.02800317294895649,
-0.050425637513399124,
-0.02278088964521885,
0.04764191061258316,
-0.013087895698845387,
-0.054509710520505905,
-0.06377141177654266,
-0.022352345287799835,
-0.057058531790971756,
-0.030448956415057182,
-0.04777511954307556,
0.024413710460066795,
0.06504951417446136,
0.01939638890326023,
-0.08977693319320679,
-0.038125764578580856,
-0.00012720639642793685,
0.03211439773440361,
0.04700750857591629,
-0.06278832256793976,
-0.03507009893655777,
-0.04916529729962349,
-0.07456669956445694,
0.020551422610878944,
-0.07391463220119476,
-0.009638876654207706,
-0.0044137341901659966,
0.015577265061438084,
0.01870359107851982,
0.0721360296010971,
0.15069988369941711,
0.031021535396575928,
-0.049191996455192566,
-0.08909922093153,
-0.012252157554030418,
0.08458628505468369,
0.0027730371803045273,
-0.06912606954574585,
0.013991527259349823,
-0.036397162824869156,
0.0077137332409620285,
-0.13535073399543762,
-0.05236554518342018,
-0.015416385605931282,
-0.013092043809592724,
0.05721506103873253,
-0.08659577369689941,
0.08791626989841461,
0.06071540340781212,
0.05153708904981613,
0.07755046337842941,
0.03051755577325821,
-0.03298322111368179,
0.0807509794831276,
-0.032692648470401764,
0.011961576528847218,
0.006021189969033003,
0.02967904880642891,
0.016766687855124474,
0.00866918545216322,
0.060692500323057175,
-0.004850319586694241,
-0.004649913404136896,
0.015465297736227512,
0.0031561823561787605,
0.052355870604515076,
-0.023012779653072357,
0.001169284456409514,
-0.01279397215694189,
-0.0389162041246891,
0.024635907262563705,
-0.00024096484412439167,
-0.04540377855300903,
-0.05920581892132759,
-0.027318693697452545,
-0.028865205124020576,
0.07031996548175812,
0.04558990150690079,
-0.03488026559352875,
-0.08144461363554001,
0.03739634156227112,
-0.06139114871621132,
-0.027548773214221,
0.061344970017671585,
0.00906014908105135,
-0.04420613497495651,
0.05225934088230133,
0.025344429537653923,
-0.10229608416557312,
0.03884747624397278,
-0.003703761612996459,
0.0279004517942667,
0.024944337084889412,
0.01889604516327381,
-0.01867712289094925,
0.028008388355374336,
0.028929738327860832,
0.002730695065110922,
0.03936347737908363,
0.0206941906362772,
-0.05048536881804466,
-0.031743358820676804,
-0.014713983982801437,
-0.025036338716745377,
-0.04014365375041962,
0.011081107892096043,
0.06507794559001923,
-0.030031204223632812,
0.0610896497964859,
-0.035997167229652405,
-0.0013730641221627593,
0.10115224868059158,
0.012690657749772072,
0.016060497611761093,
0.055404894053936005,
0.0631004124879837,
-0.052500370889902115,
-0.011354943737387657,
-0.006412915885448456,
-0.01804378256201744,
0.042513344436883926,
0.013753079809248447,
2.9477175722509626e-33,
-0.0012848780024796724,
-0.14447367191314697,
0.08827278763055801,
-0.007133368402719498,
0.03909880295395851,
-0.07672373205423355,
-0.10329222679138184,
-0.030624885112047195,
-0.03708924725651741,
-0.06052989140152931,
-0.09197552502155304,
-0.026563270017504692,
-0.01734416000545025,
-0.07675696164369583,
0.02723355032503605,
-0.0843156948685646,
-0.020622633397579193,
0.04126085340976715,
0.0702221691608429,
-0.08577036112546921,
0.11106053739786148,
-0.04363774135708809,
-0.06971707940101624,
-0.005350301507860422,
-0.005358141381293535,
-0.0425366647541523,
0.018046997487545013,
-0.047662511467933655,
0.05417884513735771,
0.022730639204382896,
-0.006670768838375807,
0.06471213698387146,
-0.026880038902163506,
0.09893407672643661,
-0.15031564235687256,
0.041059836745262146,
-0.017553560435771942,
0.06355152279138565,
-0.065334253013134,
-0.051373157650232315,
-0.042818523943424225,
0.00785699300467968,
0.03276605159044266,
-0.07689616084098816,
0.08110780268907547,
-0.08431828022003174,
-0.016094030812382698,
-0.0785466730594635,
0.04261980950832367,
0.03599235787987709,
0.0010701784631237388,
-0.005854486487805843,
0.025539835914969444,
-0.04142100363969803,
0.03032267838716507,
0.03358002379536629,
0.10216418653726578,
-0.03485208749771118,
-0.038760364055633545,
0.06612253934144974,
-0.01631917990744114,
0.031084278598427773,
-0.01936844363808632,
0.011503338813781738,
0.0276811420917511,
0.042120128870010376,
-0.02363397367298603,
0.026056110858917236,
-0.03916783630847931,
0.005757856648415327,
-0.06390558183193207,
0.056118108332157135,
0.02024436742067337,
0.04129118472337723,
-0.021511025726795197,
-0.018961498513817787,
0.022289501503109932,
-0.058672625571489334,
-0.2029391974210739,
0.04835996776819229,
0.03239737078547478,
-0.09124783426523209,
-0.06334429979324341,
0.022971170023083687,
0.09996246546506882,
-0.04577171057462692,
-0.020804353058338165,
0.0390930138528347,
-0.04980010539293289,
0.050025902688503265,
0.009317842312157154,
0.008617146871984005,
0.002234706189483404,
0.018407588824629784,
-0.1080576702952385,
-4.2163524016316464e-33,
0.0918717011809349,
0.01632184349000454,
0.06258805841207504,
0.020570017397403717,
0.07096275687217712,
-0.007935102097690105,
-0.040702179074287415,
0.019150342792272568,
-0.008660677820444107,
0.04090682044625282,
-0.07025250047445297,
-0.01944691129028797,
-0.04127878695726395,
0.013074010610580444,
-0.07913947850465775,
0.031229475513100624,
-0.008422596380114555,
-0.015136727131903172,
-0.023207945749163628,
0.0500432550907135,
-0.05367055535316467,
0.03858698904514313,
0.0050450274720788,
0.03767779469490051,
0.015520606189966202,
0.00659496895968914,
0.009725003503262997,
0.050863537937402725,
-0.08734716475009918,
-0.008356117643415928,
0.011703712865710258,
-0.06322237104177475,
-0.006706081796437502,
0.03862643614411354,
0.014178145676851273,
-0.019172754138708115,
-0.07659056037664413,
0.09668982028961182,
-0.004843815229833126,
-0.005568872205913067,
0.07037366926670074,
-0.008628743700683117,
-0.11975827068090439,
-0.01335466094315052,
0.006278739310801029,
0.04771028831601143,
0.021894754841923714,
-0.03447122126817703,
-0.0752338245511055,
-0.016991283744573593,
-0.06270305067300797,
-0.04026377573609352,
0.029883140698075294,
0.11546701937913895,
-0.009218200109899044,
-0.00003151208147755824,
0.07160867750644684,
0.030988989397883415,
-0.021258581429719925,
-0.02106880396604538,
0.06894242018461227,
-0.09306451678276062,
0.031194647774100304,
0.047887418419122696,
0.015165694989264011,
-0.1038617342710495,
0.007964206859469414,
0.06538847833871841,
-0.007971889339387417,
0.026568837463855743,
-0.005608929321169853,
0.0937599167227745,
-0.015572265721857548,
0.041193146258592606,
-0.03224363550543785,
-0.045641880482435226,
-0.010488932952284813,
-0.08207473158836365,
0.024407515302300453,
0.012960968539118767,
-0.05204783380031586,
0.028487756848335266,
-0.04002111777663231,
0.04830189421772957,
0.011105578392744064,
-0.004358165431767702,
0.051487840712070465,
0.05734432116150856,
0.05833625793457031,
0.10656611621379852,
-0.027065256610512733,
-0.0072319284081459045,
-0.015338780358433723,
0.07266071438789368,
-0.03342514485120773,
-4.1937148864690243e-8,
0.06927463412284851,
-0.021478882059454918,
-0.030467329546809196,
0.03487418591976166,
0.04382127895951271,
-0.07344585657119751,
0.03819567710161209,
0.06757231801748276,
-0.04609276354312897,
-0.012868300080299377,
0.016889262944459915,
0.07112329453229904,
0.013993149623274803,
-0.005341099575161934,
0.0318404920399189,
-0.013636643998324871,
-0.002285771770402789,
0.037638068199157715,
0.030563432723283768,
-0.02528982423245907,
-0.04753587767481804,
-0.05082407593727112,
0.009239901788532734,
0.04627528041601181,
-0.011095364578068256,
0.03262701630592346,
0.07528851181268692,
0.0067297848872840405,
0.03808634355664253,
-0.006722688674926758,
-0.055772166699171066,
-0.013651960529386997,
-0.08374106138944626,
0.11050266027450562,
-0.02692290209233761,
0.021569591015577316,
-0.13299350440502167,
0.04880896955728531,
0.057995520532131195,
0.1226823702454567,
0.013218119740486145,
0.05393374711275101,
-0.048823967576026917,
0.026672419160604477,
-0.042717210948467255,
0.02993948757648468,
-0.07441249489784241,
0.11558108776807785,
0.03526000306010246,
0.01597287319600582,
-0.012842755764722824,
-0.06419292837381363,
-0.04135791212320328,
0.06604966521263123,
0.00883998442441225,
0.007999181747436523,
0.03821936622262001,
-0.057966042309999466,
0.01621592976152897,
0.03601701185107231,
-0.010564909316599369,
0.024987468495965004,
0.018992392346262932,
-0.02475571259856224
] | 0.17493
|
kubeadm does not support automated ways of reconfiguring components that were deployed on managed nodes. One way of automating this would be by using a custom [operator](/docs/concepts/extend-kubernetes/operator/). To modify the components configuration you must manually edit associated cluster objects and files on disk. This guide shows the correct sequence of steps that need to be performed to achieve kubeadm cluster reconfiguration. ## {{% heading "prerequisites" %}} - You need a cluster that was deployed using kubeadm - Have administrator credentials (`/etc/kubernetes/admin.conf`) and network connectivity to a running kube-apiserver in the cluster from a host that has kubectl installed - Have a text editor installed on all hosts ## Reconfiguring the cluster kubeadm writes a set of cluster wide component configuration options in ConfigMaps and other objects. These objects must be manually edited. The command `kubectl edit` can be used for that. The `kubectl edit` command will open a text editor where you can edit and save the object directly. You can use the environment variables `KUBECONFIG` and `KUBE\_EDITOR` to specify the location of the kubectl consumed kubeconfig file and preferred text editor. For example: ``` KUBECONFIG=/etc/kubernetes/admin.conf KUBE\_EDITOR=nano kubectl edit ``` {{< note >}} Upon saving any changes to these cluster objects, components running on nodes may not be automatically updated. The steps below instruct you on how to perform that manually. {{< /note >}} {{< warning >}} Component configuration in ConfigMaps is stored as unstructured data (YAML string). This means that validation will not be performed upon updating the contents of a ConfigMap. You have to be careful to follow the documented API format for a particular component configuration and avoid introducing typos and YAML indentation mistakes. {{< /warning >}} ### Applying cluster configuration changes #### Updating the `ClusterConfiguration` During cluster creation and upgrade, kubeadm writes its [`ClusterConfiguration`](/docs/reference/config-api/kubeadm-config.v1beta4/) in a ConfigMap called `kubeadm-config` in the `kube-system` namespace. To change a particular option in the `ClusterConfiguration` you can edit the ConfigMap with this command: ```shell kubectl edit cm -n kube-system kubeadm-config ``` The configuration is located under the `data.ClusterConfiguration` key. {{< note >}} The `ClusterConfiguration` includes a variety of options that affect the configuration of individual components such as kube-apiserver, kube-scheduler, kube-controller-manager, CoreDNS, etcd and kube-proxy. Changes to the configuration must be reflected on node components manually. {{< /note >}} #### Reflecting `ClusterConfiguration` changes on control plane nodes kubeadm manages the control plane components as static Pod manifests located in the directory `/etc/kubernetes/manifests`. Any changes to the `ClusterConfiguration` under the `apiServer`, `controllerManager`, `scheduler` or `etcd` keys must be reflected in the associated files in the manifests directory on a control plane node. Such changes may include: - `extraArgs` - requires updating the list of flags passed to a component container - `extraVolumes` - requires updating the volume mounts for a component container - `\*SANs` - requires writing new certificates with updated Subject Alternative Names Before proceeding with these changes, make sure you have backed up the directory `/etc/kubernetes/`. To write new certificates you can use: ```shell kubeadm init phase certs --config ``` To write new manifest files in `/etc/kubernetes/manifests` you can use: ```shell # For Kubernetes control plane components kubeadm init phase control-plane --config # For local etcd kubeadm init phase etcd local --config ``` The `` contents must match the updated `ClusterConfiguration`. The `` value must be a name of a Kubernetes control plane component (`apiserver`, `controller-manager` or `scheduler`). {{< note >}} Updating a file in `/etc/kubernetes/manifests` will tell the kubelet to restart the static Pod for the corresponding component. Try doing these changes one node at a time to leave the cluster without downtime. {{< /note >}} ### Applying
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
[
0.0852709412574768,
-0.056524522602558136,
0.01648522913455963,
0.02597559429705143,
-0.052943937480449677,
0.038017526268959045,
-0.02369113825261593,
-0.03091247007250786,
-0.02592049539089203,
0.0810299664735794,
-0.023725664243102074,
-0.07430778443813324,
0.031461846083402634,
-0.041007544845342636,
0.013465284369885921,
-0.009685605764389038,
0.05455201491713524,
-0.0019431047840043902,
0.019320668652653694,
-0.07152039557695389,
-0.048309799283742905,
-0.02966700680553913,
0.01733933947980404,
-0.05814776197075844,
-0.05651644244790077,
-0.022592831403017044,
0.024419302120804787,
-0.006678090430796146,
-0.037176113575696945,
0.0004394895222503692,
-0.0051803491078317165,
0.010926018469035625,
0.014262652955949306,
0.03178981691598892,
-0.0323900543153286,
0.10560926795005798,
-0.034617818892002106,
-0.0037680151872336864,
-0.07684285193681717,
-0.051778484135866165,
0.08796456456184387,
-0.0229038018733263,
-0.08442644029855728,
-0.07591888308525085,
-0.0028605505358427763,
0.047240786254405975,
-0.07505200058221817,
-0.012005632743239403,
-0.05482758954167366,
-0.05735192447900772,
0.031014334410429,
-0.05481627956032753,
-0.013344651088118553,
-0.009044232778251171,
0.012344934977591038,
0.0861319899559021,
0.05481141060590744,
0.05271367356181145,
0.08757812529802322,
-0.06256256997585297,
0.02525644190609455,
-0.0112554170191288,
0.05451711267232895,
-0.04688941687345505,
-0.09589128941297531,
0.06394796073436737,
0.0594463087618351,
-0.03686459735035896,
0.01518548745661974,
-0.0024854582734405994,
0.06857610493898392,
0.010854982770979404,
0.029277123510837555,
-0.04579131677746773,
-0.028122110292315483,
0.049846187233924866,
-0.06787453591823578,
0.1172846183180809,
-0.0015913048991933465,
-0.011592850089073181,
-0.0001424093934474513,
0.09828169643878937,
0.038547415286302567,
0.0338701456785202,
-0.08831503242254257,
-0.028027964755892754,
-0.058210339397192,
-0.06973104178905487,
0.07303965836763382,
0.010309195145964622,
0.010241612792015076,
-0.08607397228479385,
0.0011904441053047776,
-0.13480669260025024,
0.027958709746599197,
-0.0060867322608828545,
0.0027264892123639584,
0.010295158252120018,
0.059743791818618774,
-0.025785384699702263,
0.02010233886539936,
0.037332337349653244,
-0.03381505236029625,
-0.05379318818449974,
-0.048323310911655426,
-0.01692957617342472,
-0.023997100070118904,
0.03769586980342865,
0.0496549978852272,
0.054094817489385605,
-0.022780925035476685,
0.08019102364778519,
0.02560402825474739,
-0.015561284497380257,
-0.0059983194805681705,
-0.00044347794027999043,
0.060398418456315994,
-0.045387670397758484,
0.023856529965996742,
0.038476601243019104,
0.008786402642726898,
-0.0778745636343956,
0.04236164689064026,
-0.014588379301130772,
0.03429180756211281,
0.07292123883962631,
-0.042751144617795944,
4.665119043235148e-33,
0.012777924537658691,
-0.012281938455998898,
0.03226187452673912,
0.0035983799025416374,
0.07210647314786911,
-0.07174306362867355,
-0.036325253546237946,
-0.010108486749231815,
-0.0012126625515520573,
-0.09678211063146591,
-0.03490622341632843,
0.09209927916526794,
0.015847094357013702,
-0.017865914851427078,
0.016643274575471878,
-0.06464613974094391,
-0.03567719832062721,
0.03652717545628548,
0.1120757907629013,
-0.041325535625219345,
-0.015638384968042374,
-0.017757637426257133,
0.017384765669703484,
0.001863147714175284,
0.002874127123504877,
0.012118794023990631,
0.047345180064439774,
-0.013517245650291443,
0.022864140570163727,
-0.029499433934688568,
0.0014698040904477239,
-0.0010149312438443303,
0.009000754915177822,
-0.00199934677220881,
-0.1584935039281845,
-0.04007722809910774,
-0.0528406985104084,
0.04692002013325691,
-0.11879110336303711,
-0.0006464651087298989,
0.03450263291597366,
-0.029348058626055717,
0.0006793902721256018,
-0.04962923377752304,
0.05639410391449928,
-0.006788913160562515,
0.06013259291648865,
-0.03704848513007164,
0.09128767251968384,
-0.07254990935325623,
0.010520393028855324,
-0.038389381021261215,
0.07987941801548004,
-0.04873231053352356,
0.09344805777072906,
0.07596948742866516,
0.08716172724962234,
-0.062273167073726654,
-0.04841834679245949,
-0.07797209173440933,
-0.012779717333614826,
0.029404455795884132,
-0.007609871216118336,
0.07964903861284256,
0.02047123573720455,
-0.040728725492954254,
-0.01782563328742981,
0.07206456363201141,
-0.007417358458042145,
-0.009229756891727448,
-0.038255803287029266,
0.03971589356660843,
-0.09901624172925949,
0.02237173728644848,
-0.013260944746434689,
-0.028126105666160583,
0.018015703186392784,
-0.00019021178013645113,
-0.1294834017753601,
0.028864625841379166,
0.04335201904177666,
-0.005420910194516182,
-0.004064787179231644,
0.08703893423080444,
0.09403713792562485,
-0.08915979415178299,
0.03428554907441139,
0.02253410965204239,
-0.00037169212009757757,
-0.00899436604231596,
0.04001329839229584,
-0.05057802051305771,
-0.015499215573072433,
0.057614754885435104,
-0.03251313418149948,
-5.999690840502308e-33,
0.08512317389249802,
-0.00045920247794128954,
0.02849395014345646,
0.02968279831111431,
0.07904896885156631,
0.036645933985710144,
-0.06888554990291595,
0.0808437168598175,
-0.028400354087352753,
-0.08636657148599625,
-0.023494534194469452,
-0.07840442657470703,
0.04338487237691879,
-0.05359610170125961,
-0.13297756016254425,
0.07521247118711472,
-0.055637460201978683,
0.032928310334682465,
-0.036468058824539185,
0.0002938825055025518,
-0.02262687310576439,
-0.033723700791597366,
0.0988466665148735,
0.004489396698772907,
-0.021497713401913643,
0.04180033504962921,
0.0420285202562809,
0.10155423730611801,
-0.08776440471410751,
0.010672295466065407,
-0.022560015320777893,
-0.0522712804377079,
0.0130483228713274,
0.055737465620040894,
-0.02428247034549713,
0.010627067647874355,
-0.00400449987500906,
0.025607021525502205,
-0.009819701313972473,
0.012200680561363697,
0.027555201202630997,
0.009655850939452648,
-0.09554019570350647,
-0.017932895570993423,
-0.0022968966513872147,
0.0063892025500535965,
0.024097438901662827,
-0.015928275883197784,
-0.06078918278217316,
-0.09044534713029861,
-0.09354643523693085,
-0.013335668481886387,
-0.02796102687716484,
0.006417316384613514,
-0.027543358504772186,
0.10891422629356384,
0.050526268780231476,
0.09790928661823273,
0.008337065577507019,
0.03965093195438385,
-0.008885685354471207,
-0.139980748295784,
0.09473545849323273,
0.055363986641168594,
-0.021720141172409058,
-0.023003824055194855,
0.04822535440325737,
0.03721152991056442,
-0.0777081772685051,
0.026879509910941124,
-0.0489419586956501,
-0.0028145804535597563,
-0.026561761274933815,
0.046722594648599625,
0.07751762121915817,
-0.07805070281028748,
0.0037144641391932964,
0.038574714213609695,
-0.0027936070691794157,
-0.011644359678030014,
0.06549191474914551,
-0.007340769749134779,
-0.1018623411655426,
-0.012590119615197182,
-0.002092755865305662,
0.05434025824069977,
0.03911928832530975,
0.07971592992544174,
0.060456398874521255,
0.08731731027364731,
-0.030380379408597946,
-0.020127303898334503,
0.009363039396703243,
0.07990606874227524,
-0.04836876317858696,
-5.353291143705974e-8,
0.020881470292806625,
-0.009370015934109688,
-0.0773400068283081,
-0.0074933674186468124,
0.07222256064414978,
-0.0024520508013665676,
-0.042944520711898804,
0.007995141670107841,
-0.07830469310283661,
-0.05896539241075516,
-0.023438697680830956,
0.0389067716896534,
-0.05229577422142029,
0.08161574602127075,
-0.03754790499806404,
-0.04511285573244095,
-0.029858877882361412,
0.03899194672703743,
0.04450100287795067,
-0.04616222530603409,
-0.03627447783946991,
-0.05494776740670204,
0.007296102587133646,
0.06598459184169769,
0.11023130267858505,
0.021346617490053177,
0.028188494965434074,
-0.015172465704381466,
0.018290966749191284,
0.07806940376758575,
-0.06797659397125244,
-0.013274472206830978,
-0.03075244277715683,
0.07323804497718811,
-0.040209610015153885,
-0.008950168266892433,
-0.05821027234196663,
0.03525238856673241,
0.04822608828544617,
-0.017027633264660835,
0.00017799001943785697,
0.0512336865067482,
-0.07834756374359131,
0.002554923528805375,
-0.02753029763698578,
0.0505814328789711,
-0.009904872626066208,
0.0615263506770134,
0.018540354445576668,
-0.06688058376312256,
-0.013769087381660938,
0.030656853690743446,
-0.02171567641198635,
0.025407366454601288,
-0.07505670189857483,
0.0218911562114954,
-0.015677135437726974,
-0.026128990575671196,
0.053685273975133896,
-0.03795400261878967,
-0.048925988376140594,
0.04080280661582947,
-0.008046905510127544,
-0.10623237490653992
] | 0.064589
|
a Kubernetes control plane component (`apiserver`, `controller-manager` or `scheduler`). {{< note >}} Updating a file in `/etc/kubernetes/manifests` will tell the kubelet to restart the static Pod for the corresponding component. Try doing these changes one node at a time to leave the cluster without downtime. {{< /note >}} ### Applying kubelet configuration changes #### Updating the `KubeletConfiguration` During cluster creation and upgrade, kubeadm writes its [`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/) in a ConfigMap called `kubelet-config` in the `kube-system` namespace. You can edit the ConfigMap with this command: ```shell kubectl edit cm -n kube-system kubelet-config ``` The configuration is located under the `data.kubelet` key. #### Reflecting the kubelet changes To reflect the change on kubeadm nodes you must do the following: - Log in to a kubeadm node - Run `kubeadm upgrade node phase kubelet-config` to download the latest `kubelet-config` ConfigMap contents into the local file `/var/lib/kubelet/config.yaml` - Edit the file `/var/lib/kubelet/kubeadm-flags.env` to apply additional configuration with flags - Restart the kubelet service with `systemctl restart kubelet` {{< note >}} Do these changes one node at a time to allow workloads to be rescheduled properly. {{< /note >}} {{< note >}} During `kubeadm upgrade`, kubeadm downloads the `KubeletConfiguration` from the `kubelet-config` ConfigMap and overwrite the contents of `/var/lib/kubelet/config.yaml`. This means that node local configuration must be applied either by flags in `/var/lib/kubelet/kubeadm-flags.env` or by manually updating the contents of `/var/lib/kubelet/config.yaml` after `kubeadm upgrade`, and then restarting the kubelet. {{< /note >}} ### Applying kube-proxy configuration changes #### Updating the `KubeProxyConfiguration` During cluster creation and upgrade, kubeadm writes its [`KubeProxyConfiguration`](/docs/reference/config-api/kube-proxy-config.v1alpha1/) in a ConfigMap in the `kube-system` namespace called `kube-proxy`. This ConfigMap is used by the `kube-proxy` DaemonSet in the `kube-system` namespace. To change a particular option in the `KubeProxyConfiguration`, you can edit the ConfigMap with this command: ```shell kubectl edit cm -n kube-system kube-proxy ``` The configuration is located under the `data.config.conf` key. #### Reflecting the kube-proxy changes Once the `kube-proxy` ConfigMap is updated, you can restart all kube-proxy Pods: Delete the Pods with: ```shell kubectl delete po -n kube-system -l k8s-app=kube-proxy ``` New Pods that use the updated ConfigMap will be created. {{< note >}} Because kubeadm deploys kube-proxy as a DaemonSet, node specific configuration is unsupported. {{< /note >}} ### Applying CoreDNS configuration changes #### Updating the CoreDNS Deployment and Service kubeadm deploys CoreDNS as a Deployment called `coredns` and with a Service `kube-dns`, both in the `kube-system` namespace. To update any of the CoreDNS settings, you can edit the Deployment and Service objects: ```shell kubectl edit deployment -n kube-system coredns kubectl edit service -n kube-system kube-dns ``` #### Reflecting the CoreDNS changes Once the CoreDNS changes are applied you can restart the CoreDNS deployment: ```shell kubectl rollout restart deployment -n kube-system coredns ``` {{< note >}} kubeadm does not allow CoreDNS configuration during cluster creation and upgrade. This means that if you execute `kubeadm upgrade apply`, your changes to the CoreDNS objects will be lost and must be reapplied. {{< /note >}} ## Persisting the reconfiguration During the execution of `kubeadm upgrade` on a managed node, kubeadm might overwrite configuration that was applied after the cluster was created (reconfiguration). ### Persisting Node object reconfiguration kubeadm writes Labels, Taints, CRI socket and other information on the Node object for a particular Kubernetes node. To change any of the contents of this Node object you can use: ```shell kubectl edit no ``` During `kubeadm upgrade` the contents of such a Node might get overwritten. If you would like to persist your modifications to the Node object after upgrade, you can prepare a [kubectl patch](/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/) and apply it to the Node object: ```shell kubectl patch no
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
[
0.06314665079116821,
-0.0017420552903786302,
0.04457804933190346,
0.041027650237083435,
-0.03140744939446449,
0.017323117703199387,
-0.08392556756734848,
-0.02935751900076866,
0.041687775403261185,
0.03147151321172714,
-0.04130155220627785,
-0.05772263929247856,
-0.01981782354414463,
-0.050586823374032974,
0.016459310427308083,
0.009948866441845894,
0.029372205957770348,
-0.009476464241743088,
-0.01609547808766365,
-0.037911102175712585,
-0.051979586482048035,
0.011679468676447868,
0.030223390087485313,
0.01649198681116104,
-0.045570626854896545,
-0.06369853019714355,
-0.005039257928729057,
-0.022112926468253136,
0.03981984406709671,
-0.055124811828136444,
-0.06861197203397751,
0.057353511452674866,
-0.005902144592255354,
0.03217105194926262,
0.02136659435927868,
0.1224660575389862,
0.003731303848326206,
-0.005562969949096441,
-0.0006343777640722692,
0.03903207927942276,
0.07235672324895859,
-0.009329157881438732,
-0.09086590260267258,
-0.07442311942577362,
-0.04251125082373619,
0.02475442737340927,
-0.031683214008808136,
-0.009812170639634132,
-0.013657135888934135,
-0.028970535844564438,
0.05626548454165459,
-0.044277120381593704,
0.03540417551994324,
-0.03434186428785324,
0.07784909009933472,
0.11849503219127655,
0.07051071524620056,
0.07755502313375473,
0.07609925419092178,
-0.04375780373811722,
0.05109719559550285,
0.013082098215818405,
0.058895714581012726,
-0.05395630747079849,
-0.03092706948518753,
0.023892519995570183,
0.008972866460680962,
0.00977960042655468,
0.03403124958276749,
0.006849542260169983,
0.06856170296669006,
0.012770703993737698,
-0.015278905630111694,
-0.029617978259921074,
-0.031841207295656204,
0.01851927675306797,
0.006789659149944782,
0.021949272602796555,
0.017690228298306465,
-0.007748031988739967,
0.01622425578534603,
0.04098574072122574,
0.034484561532735825,
-0.007012876216322184,
-0.08704432100057602,
-0.048105791211128235,
-0.051561255007982254,
-0.04887999966740608,
0.03792550787329674,
-0.038510169833898544,
0.012681107968091965,
0.00857347622513771,
0.04814251884818077,
-0.10317467153072357,
0.02054634690284729,
-0.02253863960504532,
-0.019282124936580658,
0.05006064102053642,
0.04651224613189697,
-0.004615840967744589,
0.04929931461811066,
0.030062733218073845,
-0.024526270106434822,
0.0681520402431488,
0.013599418103694916,
-0.08926095813512802,
0.026386981830000877,
-0.026144850999116898,
0.02382509782910347,
0.0047158170491456985,
0.025893501937389374,
0.06471796333789825,
0.018019720911979675,
0.02817811444401741,
-0.02943170815706253,
0.04320910573005676,
0.046882133930921555,
-0.005791134666651487,
-0.017744900658726692,
0.03961266577243805,
0.07832399010658264,
-0.04288727790117264,
0.01929509826004505,
0.03909647464752197,
-0.055171333253383636,
0.01725139655172825,
0.023989630863070488,
5.003662150955936e-33,
0.04213731735944748,
-0.10865135490894318,
0.0304546095430851,
-0.039247624576091766,
0.027280757203698158,
-0.08999885618686676,
-0.05484537407755852,
-0.03411538526415825,
-0.025813302025198936,
-0.08932379633188248,
-0.06809908151626587,
-0.039876122027635574,
-0.009118333458900452,
-0.0315091572701931,
0.04535228759050369,
-0.06388787925243378,
-0.03510218858718872,
0.031528543680906296,
0.10165084153413773,
-0.03007710538804531,
0.0726216658949852,
-0.05652358755469322,
-0.037449780851602554,
0.003429349744692445,
-0.009989077225327492,
0.016194164752960205,
0.08928138762712479,
-0.04893174022436142,
-0.029170570895075798,
-0.009466568939387798,
0.004303566180169582,
0.03658522665500641,
0.010027367621660233,
0.05060134828090668,
-0.16120025515556335,
-0.030514754354953766,
-0.058507174253463745,
0.049635812640190125,
-0.10147439688444138,
-0.039339471608400345,
-0.03801412135362625,
0.0038078967481851578,
-0.02664298005402088,
-0.07715143263339996,
0.10256972908973694,
-0.04237602278590202,
0.055841632187366486,
-0.0635562315583229,
0.048430003225803375,
0.013503991067409515,
-0.02177942544221878,
-0.003779884660616517,
0.03558356314897537,
-0.023681238293647766,
0.006030942313373089,
0.05614997074007988,
0.11991720646619797,
-0.08975810557603836,
-0.0517197884619236,
0.011565761640667915,
-0.007117907050997019,
-0.04177500307559967,
0.007535578217357397,
0.003049378050491214,
0.04622147977352142,
0.07367682456970215,
-0.008991993963718414,
0.07112552970647812,
-0.038301289081573486,
0.03186793625354767,
-0.053626660257577896,
0.051829930394887924,
-0.03892594575881958,
0.000287809845758602,
-0.044978152960538864,
-0.0753341019153595,
-0.027367401868104935,
-0.013956807553768158,
-0.18039071559906006,
0.049906741827726364,
0.10079897195100784,
-0.05032232403755188,
-0.02530253678560257,
0.021370060741901398,
0.08236853033304214,
-0.08488798141479492,
0.034640319645404816,
0.055038049817085266,
-0.044896554201841354,
0.04432941600680351,
0.007875567302107811,
-0.013196052052080631,
-0.01805983856320381,
0.021299105137586594,
-0.06552133709192276,
-5.6074731913550356e-33,
0.09523539245128632,
-0.027486586943268776,
-0.021124564111232758,
0.03464744612574577,
0.01960490271449089,
0.0024711964651942253,
-0.0878152996301651,
0.12412172555923462,
-0.03195445239543915,
-0.001541649573482573,
-0.016912108287215233,
-0.07775517553091049,
-0.010548098012804985,
-0.05651251971721649,
-0.11602003127336502,
0.035379841923713684,
-0.0676526203751564,
0.03068985976278782,
0.009788078255951405,
0.01662800833582878,
0.01514243334531784,
-0.06213720142841339,
-0.0011602905578911304,
-0.05664859339594841,
-0.00937643088400364,
0.03581713140010834,
-0.004045579582452774,
0.10086087882518768,
-0.06758527457714081,
0.0023731598630547523,
-0.004777179565280676,
-0.06567206233739853,
-0.020376576110720634,
0.06864709407091141,
-0.008057747036218643,
-0.015309383161365986,
-0.044957682490348816,
0.0021134151611477137,
-0.037128109484910965,
-0.019246285781264305,
0.05249912291765213,
0.07887639850378036,
-0.0036446526646614075,
-0.023409977555274963,
0.024408645927906036,
0.04838151857256889,
-0.002180910436436534,
-0.04877868667244911,
-0.021257691085338593,
-0.10635953396558762,
-0.05854405462741852,
-0.04243087396025658,
-0.004111768212169409,
0.06685929000377655,
-0.015704816207289696,
0.06053320690989494,
0.05999627709388733,
0.13185834884643555,
-0.025326060131192207,
0.00654990179464221,
-0.0010370491072535515,
-0.11619115620851517,
0.06793190538883209,
0.05129123851656914,
0.003429214470088482,
-0.05810197442770004,
0.05570513382554054,
0.06872835010290146,
-0.00784054771065712,
0.04559217765927315,
-0.025683965533971786,
0.07199864089488983,
0.009793294593691826,
0.06316299736499786,
-0.03187453746795654,
-0.046516042202711105,
-0.022541824728250504,
0.0009117553709074855,
0.03980470821261406,
-0.014498570933938026,
-0.058407168835401535,
-0.014687732793390751,
-0.07512965053319931,
0.011095637455582619,
0.05779287964105606,
0.07156543433666229,
0.018652895465493202,
0.11579741537570953,
0.08010939508676529,
0.08057916909456253,
-0.021120585501194,
-0.009125687181949615,
0.0045236144214868546,
0.0531093068420887,
-0.03366180509328842,
-5.421048143716689e-8,
0.08786560595035553,
0.020718282088637352,
-0.07601123303174973,
0.020782751962542534,
0.07553049921989441,
-0.021937210112810135,
0.025550439953804016,
0.013959551230072975,
-0.06868880987167358,
-0.04465791583061218,
-0.004032446071505547,
0.06200374662876129,
-0.046023499220609665,
0.011896977201104164,
0.019106581807136536,
-0.06653884053230286,
-0.05097020044922829,
0.004319014959037304,
0.06810680776834488,
-0.08643845468759537,
-0.06582058221101761,
-0.06774403899908066,
0.013192164711654186,
0.03630346804857254,
0.03574991598725319,
0.046925660222768784,
0.07894886285066605,
0.028378654271364212,
0.03123585879802704,
-0.03009910136461258,
-0.06642910093069077,
0.008026540279388428,
-0.031154531985521317,
0.060497578233480453,
-0.05114826187491417,
0.010491671040654182,
-0.17710572481155396,
0.08090461045503616,
0.03528156504034996,
0.08722938597202301,
0.0186054315418005,
-0.012849499471485615,
-0.12298126518726349,
-0.020628158003091812,
0.01413696352392435,
0.04545161873102188,
0.007622496224939823,
0.08031130582094193,
0.03017241694033146,
0.020425699651241302,
-0.025140827521681786,
-0.01779254339635372,
-0.025953983888030052,
0.02793853171169758,
-0.008903775364160538,
0.013089046813547611,
-0.04789375886321068,
-0.05466887727379799,
0.026171186938881874,
-0.013000445440411568,
-0.04927341639995575,
-0.012535219080746174,
-0.06482116878032684,
-0.08229830116033554
] | 0.107615
|
can use: ```shell kubectl edit no ``` During `kubeadm upgrade` the contents of such a Node might get overwritten. If you would like to persist your modifications to the Node object after upgrade, you can prepare a [kubectl patch](/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/) and apply it to the Node object: ```shell kubectl patch no --patch-file ``` #### Persisting control plane component reconfiguration The main source of control plane configuration is the `ClusterConfiguration` object stored in the cluster. To extend the static Pod manifests configuration, [patches](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#patches) can be used. These patch files must remain as files on the control plane nodes to ensure that they can be used by the `kubeadm upgrade ... --patches `. If reconfiguration is done to the `ClusterConfiguration` and static Pod manifests on disk, the set of node specific patches must be updated accordingly. #### Persisting kubelet reconfiguration Any changes to the `KubeletConfiguration` stored in `/var/lib/kubelet/config.yaml` will be overwritten on `kubeadm upgrade` by downloading the contents of the cluster wide `kubelet-config` ConfigMap. To persist kubelet node specific configuration either the file `/var/lib/kubelet/config.yaml` has to be updated manually post-upgrade or the file `/var/lib/kubelet/kubeadm-flags.env` can include flags. The kubelet flags override the associated `KubeletConfiguration` options, but note that some of the flags are deprecated. A kubelet restart will be required after changing `/var/lib/kubelet/config.yaml` or `/var/lib/kubelet/kubeadm-flags.env`. ## {{% heading "whatsnext" %}} - [Upgrading kubeadm clusters](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade) - [Customizing components with the kubeadm API](/docs/setup/production-environment/tools/kubeadm/control-plane-flags) - [Certificate management with kubeadm](/docs/tasks/administer-cluster/kubeadm/kubeadm-certs) - [Find more about kubeadm set-up](/docs/reference/setup-tools/kubeadm/)
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure.md
|
[
0.03198392316699028,
-0.026676708832383156,
-0.01111867930740118,
0.04779328405857086,
0.00001076328680937877,
0.05774702876806259,
-0.02758907899260521,
-0.038791704922914505,
0.013522767461836338,
0.09235159307718277,
0.01807302050292492,
-0.009489769116044044,
-0.0130279790610075,
-0.1299421638250351,
0.05684705823659897,
0.024916529655456543,
0.0223676897585392,
0.05200489982962608,
-0.0055630626156926155,
-0.01947118528187275,
-0.04738825932145119,
0.003945470321923494,
-0.0013987771235406399,
-0.01854528672993183,
-0.09236101061105728,
0.01044121477752924,
-0.011097759008407593,
-0.02197503112256527,
0.003634562250226736,
-0.0729031190276146,
-0.049487143754959106,
0.09458671510219574,
-0.03692786768078804,
0.03142135590314865,
-0.02100401557981968,
0.09186182171106339,
0.02625926584005356,
-0.004754137247800827,
-0.012507633306086063,
-0.021907079964876175,
0.0577862523496151,
0.000982432859018445,
-0.07490423321723938,
-0.07676909118890762,
-0.03560943901538849,
0.028076929971575737,
-0.036127008497714996,
-0.054157886654138565,
-0.02432008646428585,
-0.0348653644323349,
0.06964610517024994,
-0.08440915495157242,
-0.00536012789234519,
0.0150907002389431,
0.08353705704212189,
0.09098992496728897,
0.060014087706804276,
0.08626900613307953,
0.08483941853046417,
-0.03793586045503616,
0.03336598724126816,
0.02970408834517002,
0.0599978044629097,
-0.03256116807460785,
-0.031664855778217316,
-0.00819949060678482,
0.03102494217455387,
-0.011971044354140759,
0.048379819840192795,
-0.012907802127301693,
0.005540114361792803,
0.006577406544238329,
0.0060425433330237865,
-0.10030519217252731,
-0.001150451716966927,
0.06671737879514694,
-0.01273709163069725,
0.07279510796070099,
-0.00502703245729208,
-0.032215140759944916,
0.01670370250940323,
0.061500731855630875,
0.049157895147800446,
-0.06347321718931198,
-0.094657763838768,
0.0018021677387878299,
-0.02160525508224964,
-0.04933535307645798,
0.052822235971689224,
0.042346708476543427,
0.007627343293279409,
-0.07131887227296829,
0.04213113337755203,
-0.13454745709896088,
0.01028341893106699,
-0.014469888061285019,
-0.04819667339324951,
0.03110622614622116,
0.04813230037689209,
-0.005661132745444775,
0.04977719485759735,
-0.003921522758901119,
-0.04510773345828056,
0.052095867693424225,
-0.01595563068985939,
-0.020962655544281006,
-0.03393670544028282,
-0.026691405102610588,
-0.0020977987442165613,
0.029432369396090508,
-0.013720466755330563,
0.08251899480819702,
-0.033299848437309265,
-0.04952332377433777,
-0.020641079172492027,
-0.011950588785111904,
0.03352276235818863,
-0.04971527308225632,
-0.012098672799766064,
0.05718560516834259,
0.07965823262929916,
-0.05453447997570038,
0.07235204428434372,
0.060376476496458054,
-0.09917136281728745,
0.011563743464648724,
-0.034297291189432144,
1.2254461567410152e-33,
0.05510202422738075,
-0.04382191598415375,
-0.006507491692900658,
0.004918977152556181,
0.03202778846025467,
-0.010979103855788708,
0.014665540307760239,
-0.009670743718743324,
-0.007235740777105093,
-0.09247127920389175,
-0.06386047601699829,
0.019424550235271454,
-0.034754566848278046,
-0.014182929880917072,
0.03558817878365517,
-0.04996395856142044,
-0.054926637560129166,
0.031531840562820435,
0.05913010612130165,
0.00332375499419868,
0.03308991715312004,
-0.011455646716058254,
-0.07690497487783432,
0.017200985923409462,
0.051824864000082016,
0.004195516463369131,
0.04359959810972214,
-0.039497364312410355,
-0.07179907709360123,
-0.010393202304840088,
-0.010477871634066105,
0.03988439962267876,
0.05381700396537781,
0.06259510666131973,
-0.1804240643978119,
-0.04236068204045296,
-0.03594435751438141,
0.00856651458889246,
-0.09531369805335999,
-0.0859723761677742,
0.03965340927243233,
-0.03521621227264404,
-0.010066208429634571,
-0.018783288076519966,
0.09297139197587967,
-0.05907340720295906,
0.04956347122788429,
-0.04287227988243103,
0.08006276190280914,
-0.08903120458126068,
0.01955406181514263,
0.014481885358691216,
0.03959352523088455,
-0.09454985707998276,
0.01747933030128479,
0.01390616875141859,
0.07222592830657959,
-0.08980368077754974,
-0.0290534645318985,
0.009887196123600006,
0.002635373268276453,
-0.00479494733735919,
-0.021852442994713783,
0.046992018818855286,
0.05937010049819946,
0.08200553059577942,
-0.002085263840854168,
0.024497175589203835,
0.00010009000106947497,
-0.01593700796365738,
-0.05558371543884277,
0.016855411231517792,
-0.08760829269886017,
0.06533725559711456,
-0.057202015072107315,
-0.06649070233106613,
-0.04044874384999275,
0.026967080309987068,
-0.11783643811941147,
0.0481509268283844,
0.03715338185429573,
0.001302314456552267,
-0.04684770852327347,
0.05656500533223152,
0.09377992898225784,
-0.11505123227834702,
0.04134705662727356,
0.02750292234122753,
0.018476907163858414,
-0.01215286087244749,
0.03760538250207901,
-0.0776774138212204,
-0.05022932589054108,
0.002423548139631748,
-0.028882354497909546,
-3.372073053278724e-33,
0.09205259382724762,
-0.013142717070877552,
-0.0634642094373703,
0.03575122356414795,
-0.06344885379076004,
0.025054436177015305,
-0.046884432435035706,
0.077211894094944,
-0.052136197686195374,
-0.09050458669662476,
-0.07252182066440582,
-0.04840918630361557,
0.03351004421710968,
-0.07852663099765778,
-0.13835525512695312,
-0.001844495185650885,
-0.1459026336669922,
-0.06150641292333603,
-0.04794745147228241,
-0.008496486581861973,
0.003490583738312125,
-0.04187973216176033,
0.14216989278793335,
0.0187948290258646,
-0.036735255271196365,
-0.03965912386775017,
-0.00849663745611906,
0.0962023064494133,
-0.03785805031657219,
-0.000401259952923283,
-0.008338439278304577,
-0.05279664695262909,
-0.04710516706109047,
0.07108841091394424,
0.0036333040334284306,
-0.04208066686987877,
0.003915153443813324,
-0.0378875806927681,
-0.007362824864685535,
0.0025669115129858255,
0.004618838895112276,
0.06389068812131882,
-0.06550508737564087,
0.046494416892528534,
0.04003525897860527,
0.03480101749300957,
-0.005361428018659353,
-0.025040075182914734,
-0.021409083157777786,
-0.10945139825344086,
-0.05895529314875603,
0.014819562435150146,
-0.044557396322488785,
0.05505291000008583,
-0.008773020468652248,
0.10173574090003967,
0.037899501621723175,
0.0888853445649147,
0.03223804011940956,
-0.020439142361283302,
0.023915883153676987,
-0.08714495599269867,
0.05806069076061249,
0.011805782094597816,
-0.008223975077271461,
-0.018105752766132355,
0.08196128159761429,
0.03401126712560654,
0.00980310421437025,
0.04458378255367279,
0.024442803114652634,
0.0017058999510481954,
0.0011598201235756278,
0.04261144623160362,
0.023389523848891258,
-0.08861009776592255,
0.05512654408812523,
-0.014560875482857227,
0.06370772421360016,
-0.001108392607420683,
-0.05499591678380966,
0.008292132057249546,
-0.06429962813854218,
-0.008893749676644802,
0.05469132959842682,
0.061070606112480164,
0.04284636303782463,
0.09807313233613968,
0.07856247574090958,
0.03387684002518654,
-0.055740538984537125,
0.01603572629392147,
-0.04085692763328552,
0.02324534021317959,
-0.07453649491071701,
-5.243202849669615e-8,
0.02314683049917221,
0.049577951431274414,
-0.055364493280649185,
0.02430272102355957,
0.0773603543639183,
-0.006023189052939415,
0.005603855475783348,
0.029742568731307983,
-0.046836450695991516,
-0.05687477067112923,
-0.002584293484687805,
0.06390101462602615,
-0.03594537079334259,
-0.0018537436844781041,
-0.015148348174989223,
-0.005568488966673613,
0.021416161209344864,
0.018223151564598083,
0.04840172082185745,
-0.05129263550043106,
-0.0605023168027401,
0.009821760468184948,
0.029575493186712265,
0.07982880622148514,
0.08023834973573685,
0.032692063599824905,
0.09165314584970474,
0.028486574068665504,
0.037429288029670715,
0.06007383391261101,
-0.022143952548503876,
-0.020848220214247704,
0.007896505296230316,
0.0918368548154831,
0.005332161206752062,
-0.004181688651442528,
-0.07352838665246964,
0.08414753526449203,
0.04584446921944618,
0.09027469903230667,
0.020243270322680473,
0.004642045591026545,
-0.06612750142812729,
0.02260344661772251,
-0.03413734957575798,
0.04615785554051399,
-0.011777153238654137,
0.006378720980137587,
-0.02179167978465557,
-0.05573366954922676,
0.000016898109606700018,
0.02879311703145504,
-0.04912377893924713,
0.05191785469651222,
-0.07422107458114624,
0.027866899967193604,
-0.017482906579971313,
-0.017117829993367195,
0.0608467161655426,
0.0001624025753699243,
-0.08429215103387833,
0.006094561889767647,
-0.013623756356537342,
-0.08044525235891342
] | 0.102706
|
{{< feature-state for\_k8s\_version="v1.15" state="stable" >}} Client certificates generated by [kubeadm](/docs/reference/setup-tools/kubeadm/) expire after 1 year. This page explains how to manage certificate renewals with kubeadm. It also covers other tasks related to kubeadm certificate management. The Kubernetes project recommends upgrading to the latest patch releases promptly, and to ensure that you are running a supported minor release of Kubernetes. Following this recommendation helps you to stay secure. ## {{% heading "prerequisites" %}} You should be familiar with [PKI certificates and requirements in Kubernetes](/docs/setup/best-practices/certificates/). You should be familiar with how to pass a [configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) file to the kubeadm commands. This guide covers the usage of the `openssl` command (used for manual certificate signing, if you choose that approach), but you can use your preferred tools. Some of the steps here use `sudo` for administrator access. You can use any equivalent tool. ## Using custom certificates {#custom-certificates} By default, kubeadm generates all the certificates needed for a cluster to run. You can override this behavior by providing your own certificates. To do so, you must place them in whatever directory is specified by the `--cert-dir` flag or the `certificatesDir` field of kubeadm's `ClusterConfiguration`. By default this is `/etc/kubernetes/pki`. If a given certificate and private key pair exists before running `kubeadm init`, kubeadm does not overwrite them. This means you can, for example, copy an existing CA into `/etc/kubernetes/pki/ca.crt` and `/etc/kubernetes/pki/ca.key`, and kubeadm will use this CA for signing the rest of the certificates. ## Choosing an encryption algorithm {#choosing-encryption-algorithm} kubeadm allows you to choose an encryption algorithm that is used for creating public and private keys. That can be done by using the `encryptionAlgorithm` field of the kubeadm configuration: ```yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration encryptionAlgorithm: ``` `` can be one of `RSA-2048` (default), `RSA-3072`, `RSA-4096` or `ECDSA-P256`. ## Choosing certificate validity period {#choosing-cert-validity-period} kubeadm allows you to choose the validity period of CA and leaf certificates. That can be done by using the `certificateValidityPeriod` and `caCertificateValidityPeriod` fields of the kubeadm configuration: ```yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration certificateValidityPeriod: 8760h # Default: 365 days × 24 hours = 1 year caCertificateValidityPeriod: 87600h # Default: 365 days × 24 hours \* 10 = 10 years ``` The values of the fields follow the accepted format for [Go's `time.Duration` values](https://pkg.go.dev/time#ParseDuration), with the longest supported unit being `h` (hours). ## External CA mode {#external-ca-mode} It is also possible to provide only the `ca.crt` file and not the `ca.key` file (this is only available for the root CA file, not other cert pairs). If all other certificates and kubeconfig files are in place, kubeadm recognizes this condition and activates the "External CA" mode. kubeadm will proceed without the CA key on disk. Instead, run the controller-manager standalone with `--controllers=csrsigner` and point to the CA certificate and key. There are various ways to prepare the component credentials when using external CA mode. ### Manual preparation of component credentials [PKI certificates and requirements](/docs/setup/best-practices/certificates/) includes information on how to prepare all the required by kubeadm component credentials manually. This guide covers the usage of the `openssl` command (used for manual certificate signing, if you choose that approach), but you can use your preferred tools. ### Preparation of credentials by signing CSRs generated by kubeadm kubeadm can [generate CSR files](#signing-csr) that you can sign manually with tools like `openssl` and your external CA. These CSR files will include all the specification for credentials that components deployed by kubeadm require. ### Automated preparation of component credentials by using kubeadm phases Alternatively, it is possible to use kubeadm phase commands to automate this process. - Go to a host that you want to prepare as
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
0.004497040528804064,
0.055061377584934235,
0.05998627468943596,
-0.015507638454437256,
-0.047687284648418427,
0.010192694142460823,
-0.047294098883867264,
0.019185176119208336,
-0.003127078525722027,
-0.005042749457061291,
-0.0053306990303099155,
-0.04195231571793556,
0.057500630617141724,
0.009452897123992443,
0.03480352833867073,
0.045009057968854904,
-0.04664476215839386,
0.02689427137374878,
0.03433903306722641,
-0.0865463837981224,
-0.011644772253930569,
-0.007531062234193087,
0.01390952616930008,
0.00553799606859684,
-0.08339798450469971,
-0.034369803965091705,
0.04142460227012634,
0.01976599544286728,
-0.03315022215247154,
0.004785328172147274,
0.04272409528493881,
-0.013470988720655441,
0.01830458827316761,
-0.003963186871260405,
-0.02483079768717289,
0.0886126309633255,
0.07687932252883911,
0.019373714923858643,
-0.031041907146573067,
0.03352716937661171,
0.06258860975503922,
-0.06593222916126251,
-0.07930542528629303,
-0.03173571079969406,
0.014776002615690231,
0.04444485157728195,
-0.014702294953167439,
-0.05548317730426788,
-0.019806835800409317,
0.04731877148151398,
0.028174767270684242,
-0.11129345744848251,
-0.00009097031579585746,
0.025213712826371193,
-0.023947840556502342,
-0.01898576132953167,
-0.03775843605399132,
0.04185599088668823,
0.036579679697752,
-0.026648178696632385,
0.10812482237815857,
0.025413254275918007,
-0.03285179287195206,
0.006455646362155676,
-0.06021904945373535,
0.02468200773000717,
0.08258138597011566,
0.018091311678290367,
0.024442287161946297,
0.07262102514505386,
0.05572079122066498,
0.004719578195363283,
-0.028863051906228065,
-0.05880829319357872,
-0.03507689759135246,
-0.017791159451007843,
-0.0913921669125557,
0.02898584119975567,
0.04520265385508537,
-0.07649194449186325,
0.035505712032318115,
0.0142672723159194,
0.03356436267495155,
-0.06063852459192276,
-0.08711522072553635,
0.006086624227464199,
0.03199074789881706,
-0.046099092811346054,
0.028607001528143883,
0.0638163760304451,
0.09326466917991638,
-0.06800239533185959,
0.03389425203204155,
-0.10644570738077164,
0.05764026194810867,
0.05003783851861954,
0.009066617116332054,
0.00024213646247517318,
0.04913116991519928,
-0.03313900902867317,
0.000212563420063816,
-0.0322762168943882,
-0.03758055344223976,
-0.006882946938276291,
0.04036082327365875,
0.03268168494105339,
-0.0355447418987751,
-0.01065940409898758,
0.010472016409039497,
0.04943465068936348,
0.01654614508152008,
0.010776517912745476,
-0.05763206630945206,
-0.03205328807234764,
-0.0014931568875908852,
0.07291070371866226,
-0.01455327682197094,
-0.005248082336038351,
0.07019650191068649,
0.0797114297747612,
0.023705797269940376,
-0.04472051560878754,
-0.010607419535517693,
0.03316069766879082,
-0.08417630195617676,
0.051459088921546936,
0.008326981216669083,
4.075010226204805e-33,
0.06571639329195023,
0.03423516824841499,
-0.028730183839797974,
-0.01048695482313633,
0.011068573221564293,
-0.09673856943845749,
0.06971953809261322,
0.0008505688165314496,
-0.09303262829780579,
-0.02968022972345352,
-0.014266581274569035,
0.08572147786617279,
-0.055847711861133575,
-0.07541194558143616,
0.01599256694316864,
-0.018996937200427055,
-0.0679660513997078,
0.02592930570244789,
0.11329808831214905,
-0.008138432167470455,
0.019299276173114777,
-0.09238941967487335,
-0.01010329369455576,
0.03566504269838333,
0.06452751159667969,
-0.009740393608808517,
0.09377514570951462,
0.047317709773778915,
-0.04113209620118141,
-0.03640836849808693,
0.0018324973061680794,
-0.0010393190896138549,
0.03591569513082504,
-0.030719801783561707,
-0.10631222277879715,
0.00609382102265954,
0.0041615888476371765,
0.015306837856769562,
-0.04216579720377922,
-0.07165791094303131,
0.0021661913488060236,
-0.01723421923816204,
0.02420293539762497,
0.00341096892952919,
0.09068062156438828,
-0.014608011581003666,
0.009567939676344395,
-0.030067645013332367,
0.15848764777183533,
-0.0033714030869305134,
-0.04873810335993767,
-0.040264055132865906,
-0.030593236908316612,
-0.049236755818128586,
0.041666384786367416,
-0.01735418103635311,
0.05493801087141037,
-0.06574014574289322,
-0.15784867107868195,
-0.11969856172800064,
-0.030663980171084404,
-0.05780313163995743,
0.013196866028010845,
-0.030737146735191345,
0.008837061934173107,
-0.0004669543413911015,
-0.0270383283495903,
0.042153604328632355,
-0.05775238201022148,
-0.08811714500188828,
-0.05259096994996071,
-0.0031829692889004946,
-0.05613625794649124,
-0.042163968086242676,
-0.013677784241735935,
-0.01668921299278736,
0.011666449718177319,
0.07703156769275665,
-0.014911874197423458,
0.04366276413202286,
0.06231718137860298,
0.014192160218954086,
-0.02379542961716652,
0.09483813494443893,
0.05943596735596657,
0.044405583292245865,
0.06873388588428497,
0.04760778695344925,
-0.021542444825172424,
0.051977891474962234,
0.019581729546189308,
0.013294700533151627,
0.025177955627441406,
0.07256058603525162,
-0.04566986486315727,
-4.0038413901022084e-33,
0.10163074731826782,
-0.0029755430296063423,
0.04504826292395592,
0.061411309987306595,
0.05162109062075615,
0.006979384925216436,
-0.061772748827934265,
0.1262826770544052,
-0.04135701805353165,
-0.07102007418870926,
-0.0245133638381958,
-0.07370061427354813,
0.08043086528778076,
0.020998846739530563,
-0.06401577591896057,
-0.03652463108301163,
-0.09320971369743347,
0.08869381248950958,
-0.025035060942173004,
-0.032643940299749374,
0.0018755868077278137,
0.0164834912866354,
-0.00822136178612709,
0.05648808181285858,
-0.010910282842814922,
-0.005226049572229385,
-0.05095171183347702,
0.05529424175620079,
-0.052062731236219406,
0.029491223394870758,
0.04837648943066597,
-0.07365778088569641,
0.008099616505205631,
0.034390974789857864,
-0.03806816413998604,
-0.1024511530995369,
0.020644094794988632,
-0.022681662812829018,
0.051456283777952194,
0.05218948423862457,
0.07714969664812088,
0.006705817766487598,
-0.035805657505989075,
-0.04084886610507965,
0.02691795490682125,
0.012934471480548382,
0.1293347030878067,
-0.009016063064336777,
-0.013330633752048016,
-0.08068214356899261,
-0.03756484389305115,
-0.00804104283452034,
-0.08792978525161743,
-0.03302815556526184,
-0.03272170573472977,
0.08072849363088608,
-0.04243001341819763,
0.11183624714612961,
-0.01022680290043354,
0.008725292049348354,
0.01131381094455719,
-0.04646971821784973,
0.10465414077043533,
0.03666573762893677,
-0.011116201058030128,
-0.002005805494263768,
-0.009640135802328587,
0.0719752386212349,
-0.038281023502349854,
0.04195248708128929,
-0.05938001722097397,
-0.07229844480752945,
-0.03839116543531418,
-0.024605371057987213,
0.053080301731824875,
-0.0881405845284462,
0.023244285956025124,
0.012665822170674801,
0.05355827137827873,
0.003119708737358451,
0.0060457391664385796,
0.038766149431467056,
-0.11557488888502121,
0.05541741102933884,
0.055310238152742386,
0.011985943652689457,
0.1261051893234253,
-0.05229070037603378,
0.021888522431254387,
0.0633162334561348,
-0.012475015595555305,
0.02749616838991642,
-0.042238641530275345,
0.07504788786172867,
0.03488289192318916,
-4.9651763589508846e-8,
0.07188405096530914,
0.03018740750849247,
-0.10625774413347244,
-0.038611285388469696,
0.06365300714969635,
0.010539248585700989,
-0.004900919273495674,
-0.04568234831094742,
-0.0425109900534153,
-0.02154478244483471,
-0.011953918263316154,
0.02118741162121296,
-0.07523304224014282,
0.017835775390267372,
-0.04220811277627945,
-0.034802041947841644,
-0.04530235379934311,
0.012298793531954288,
0.003556367941200733,
-0.050441838800907135,
-0.009414756670594215,
-0.06615602225065231,
0.0681937038898468,
0.04164202883839607,
0.024292562156915665,
0.06432604789733887,
0.08522752672433853,
0.06456788629293442,
0.05579160526394844,
0.01615074835717678,
-0.07238432765007019,
-0.03369324281811714,
-0.040191400796175,
0.025919651612639427,
0.04637172073125839,
0.02400827966630459,
-0.12337422370910645,
0.025897711515426636,
0.07695368677377701,
0.11162052303552628,
-0.00515450956299901,
0.019249988719820976,
-0.07217045873403549,
0.06393461674451828,
-0.07182994484901428,
0.04040572792291641,
-0.03283140808343887,
0.0020322008058428764,
-0.06448231637477875,
-0.0036444487050175667,
-0.03621278330683708,
-0.04089182987809181,
0.01762862503528595,
0.03568695858120918,
-0.10935331135988235,
0.033998019993305206,
0.001161379856057465,
0.037610072642564774,
0.026953870430588722,
-0.0535765215754509,
0.01599152758717537,
-0.047769222408533096,
0.00974522065371275,
-0.030534200370311737
] | 0.050725
|
These CSR files will include all the specification for credentials that components deployed by kubeadm require. ### Automated preparation of component credentials by using kubeadm phases Alternatively, it is possible to use kubeadm phase commands to automate this process. - Go to a host that you want to prepare as a kubeadm control plane node with external CA. - Copy the external CA files `ca.crt` and `ca.key` that you have into `/etc/kubernetes/pki` on the node. - Prepare a temporary [kubeadm configuration file](/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file) called `config.yaml` that can be used with `kubeadm init`. Make sure that this file includes any relevant cluster wide or host-specific information that could be included in certificates, such as, `ClusterConfiguration.controlPlaneEndpoint`, `ClusterConfiguration.certSANs` and `InitConfiguration.APIEndpoint`. - On the same host execute the commands `kubeadm init phase kubeconfig all --config config.yaml` and `kubeadm init phase certs all --config config.yaml`. This will generate all required kubeconfig files and certificates under `/etc/kubernetes/` and its `pki` sub directory. - Inspect the generated files. Delete `/etc/kubernetes/pki/ca.key`, delete or move to a safe location the file `/etc/kubernetes/super-admin.conf`. - On nodes where `kubeadm join` will be called also delete `/etc/kubernetes/kubelet.conf`. This file is only required on the first node where `kubeadm init` will be called. - Note that some files such `pki/sa.\*`, `pki/front-proxy-ca.\*` and `pki/etc/ca.\*` are shared between control plane nodes, You can generate them once and [distribute them manually](/docs/setup/production-environment/tools/kubeadm/high-availability/#manual-certs) to nodes where `kubeadm join` will be called, or you can use the [`--upload-certs`](/docs/setup/production-environment/tools/kubeadm/high-availability/#stacked-control-plane-and-etcd-nodes) functionality of `kubeadm init` and `--certificate-key` of `kubeadm join` to automate this distribution. Once the credentials are prepared on all nodes, call `kubeadm init` and `kubeadm join` for these nodes to join the cluster. kubeadm will use the existing kubeconfig and certificate files under `/etc/kubernetes/` and its `pki` sub directory. ## Certificate expiry and management {#check-certificate-expiration} {{< note >}} `kubeadm` cannot manage certificates signed by an external CA. {{< /note >}} You can use the `check-expiration` subcommand to check when certificates expire: ```shell kubeadm certs check-expiration ``` The output is similar to this: ```console CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED admin.conf Dec 30, 2020 23:36 UTC 364d no apiserver Dec 30, 2020 23:36 UTC 364d ca no apiserver-etcd-client Dec 30, 2020 23:36 UTC 364d etcd-ca no apiserver-kubelet-client Dec 30, 2020 23:36 UTC 364d ca no controller-manager.conf Dec 30, 2020 23:36 UTC 364d no etcd-healthcheck-client Dec 30, 2020 23:36 UTC 364d etcd-ca no etcd-peer Dec 30, 2020 23:36 UTC 364d etcd-ca no etcd-server Dec 30, 2020 23:36 UTC 364d etcd-ca no front-proxy-client Dec 30, 2020 23:36 UTC 364d front-proxy-ca no scheduler.conf Dec 30, 2020 23:36 UTC 364d no CERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED ca Dec 28, 2029 23:36 UTC 9y no etcd-ca Dec 28, 2029 23:36 UTC 9y no front-proxy-ca Dec 28, 2029 23:36 UTC 9y no ``` The command shows expiration/residual time for the client certificates in the `/etc/kubernetes/pki` folder and for the client certificate embedded in the kubeconfig files used by kubeadm (`admin.conf`, `controller-manager.conf` and `scheduler.conf`). Additionally, kubeadm informs the user if the certificate is externally managed; in this case, the user should take care of managing certificate renewal manually/using other tools. The `kubelet.conf` configuration file is not included in the list above because kubeadm configures kubelet for [automatic certificate renewal](/docs/tasks/tls/certificate-rotation/) with rotatable certificates under `/var/lib/kubelet/pki`. To repair an expired kubelet client certificate see [Kubelet client certificate rotation fails](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert). {{< note >}} On nodes created with `kubeadm init` from versions prior to kubeadm version 1.17, there is a [bug](https://github.com/kubernetes/kubeadm/issues/1753) where you manually have to modify the contents of `kubelet.conf`. After `kubeadm init` finishes, you should update `kubelet.conf` to point to the rotated kubelet client certificates, by replacing
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
-0.02068728767335415,
-0.006064335349947214,
-0.05124763771891594,
0.000757189525756985,
-0.06295233964920044,
0.0037015664856880903,
-0.011507345363497734,
0.03108329139649868,
0.041176728904247284,
0.016480974853038788,
-0.017425833269953728,
-0.1647884100675583,
0.08857221156358719,
-0.058213260024785995,
0.050459232181310654,
0.03199067711830139,
0.010745844803750515,
0.030863715335726738,
0.0464584119617939,
-0.06329795718193054,
-0.037613559514284134,
0.001913903048262,
0.010655860416591167,
-0.0002041633997578174,
-0.08045917749404907,
-0.07469591498374939,
0.043673813343048096,
0.004771209787577391,
0.0025278956163674593,
-0.0055382391437888145,
0.006203920114785433,
0.009966320358216763,
0.018820222467184067,
0.05123134329915047,
-0.04209182411432266,
0.14292041957378387,
0.046336643397808075,
-0.0023412108421325684,
-0.06893544644117355,
-0.055612847208976746,
0.06734597682952881,
0.008099277503788471,
-0.07907845079898834,
-0.05032452940940857,
-0.010567131452262402,
0.02889404259622097,
-0.00910293497145176,
-0.05995950475335121,
-0.05858846753835678,
-0.019202962517738342,
-0.01059590745717287,
-0.04084527865052223,
0.01147188525646925,
-0.01110297255218029,
-0.03425483778119087,
0.03719072788953781,
0.02122599445283413,
0.0464075468480587,
0.13977645337581635,
-0.025394367054104805,
0.013702456839382648,
0.009413285180926323,
0.01600474677979946,
-0.007895419374108315,
-0.066880002617836,
0.052139539271593094,
0.07505271583795547,
0.029614204540848732,
-0.007303730584681034,
0.013134012930095196,
-0.004725797101855278,
-0.01269141398370266,
-0.05576714873313904,
-0.04868572950363159,
-0.05591225624084473,
0.004425070248544216,
-0.09900838136672974,
0.04620107635855675,
-0.028185006231069565,
-0.0860869288444519,
0.03398757800459862,
0.06341449171304703,
0.021870587021112442,
0.007866687141358852,
-0.10138623416423798,
0.022764336317777634,
0.028976231813430786,
-0.02162151411175728,
0.024178246036171913,
0.08054162561893463,
0.06513486057519913,
-0.09720674902200699,
-0.04250357300043106,
-0.10380234569311142,
0.033708520233631134,
0.030325349420309067,
-0.00048390598385594785,
0.015373144298791885,
0.08147772401571274,
-0.07112972438335419,
0.02275344915688038,
0.00799393281340599,
-0.021365951746702194,
-0.046199433505535126,
-0.03394410014152527,
0.004471969325095415,
-0.01632671058177948,
0.002247805008664727,
0.07401783764362335,
0.0899580866098404,
0.01752975955605507,
0.027331151068210602,
-0.01183902658522129,
-0.0470871776342392,
0.05249214917421341,
0.061060622334480286,
0.021747728809714317,
-0.06062765792012215,
0.09168453514575958,
0.028769779950380325,
-0.0419735386967659,
-0.10065137594938278,
-0.003649564227089286,
-0.04506339505314827,
-0.005195909179747105,
-0.02966986782848835,
-0.030238138511776924,
3.520369012474648e-33,
0.04168274998664856,
0.0009037105483002961,
0.017679652199149132,
0.03892838954925537,
0.06522440910339355,
-0.06310386210680008,
0.08339423686265945,
-0.027059603482484818,
-0.03385964408516884,
-0.039101965725421906,
-0.011663299053907394,
0.02235500141978264,
-0.05151678994297981,
-0.02210702747106552,
0.0037672424223273993,
-0.006670783739537001,
-0.08758794516324997,
-0.03287516161799431,
0.06578043848276138,
-0.0031778598204255104,
0.024158256128430367,
-0.02499775029718876,
-0.010051306337118149,
0.02905191108584404,
0.057771820574998856,
-0.004492070991545916,
0.036336373537778854,
0.016564344987273216,
-0.059742316603660583,
-0.04162077233195305,
0.07052114605903625,
-0.007948118261992931,
0.03395907208323479,
0.05680164322257042,
0.0006907487404532731,
-0.025763260200619698,
0.026453781872987747,
0.09042029082775116,
-0.09842103719711304,
-0.02296069823205471,
0.027441956102848053,
-0.04249223694205284,
0.023221533745527267,
0.007930899038910866,
-0.0019501078641042113,
-0.03947640582919121,
0.03248675912618637,
0.015457309782505035,
0.16083090007305145,
0.013830054551362991,
-0.039421528577804565,
0.0015932415844872594,
0.028390759602189064,
-0.0967840775847435,
0.0912894755601883,
0.06042078882455826,
0.029413167387247086,
-0.09603627771139145,
-0.1307518482208252,
-0.05730963125824928,
-0.06406930834054947,
-0.007697592955082655,
-0.036601584404706955,
0.06763115525245667,
0.020437106490135193,
-0.06511019170284271,
-0.02012314647436142,
0.01446483749896288,
-0.0033293345477432013,
-0.05657761171460152,
-0.04198478162288666,
0.023745134472846985,
-0.058294281363487244,
-0.034971725195646286,
-0.01460801251232624,
-0.02731720730662346,
-0.007156054489314556,
0.03970661014318466,
-0.08517707884311676,
0.08542022109031677,
0.02499396726489067,
0.014236734248697758,
-0.04959110543131828,
0.10026849806308746,
0.025970954447984695,
0.02572518028318882,
0.057864636182785034,
0.04095972329378128,
0.033435285091400146,
-0.009337149560451508,
0.08532791584730148,
-0.03836393728852272,
0.02589941769838333,
0.05516009032726288,
-0.11000030487775803,
-5.692526452450767e-33,
0.11569269746541977,
-0.027467532083392143,
0.0879945158958435,
0.06547679752111435,
0.04002990201115608,
0.06649141013622284,
-0.00404090341180563,
0.02693309634923935,
-0.016530388966202736,
-0.046936292201280594,
-0.002542113186791539,
0.0004948191926814616,
0.08137687295675278,
-0.037114959210157394,
-0.04396954923868179,
0.027285538613796234,
-0.06573802977800369,
0.07318872213363647,
-0.05030966177582741,
-0.03330262377858162,
0.005996403284370899,
0.025306623429059982,
0.05441954731941223,
0.04165651649236679,
-0.001992243342101574,
0.02004457823932171,
-0.00006482026947196573,
0.07490494102239609,
-0.09064802527427673,
0.04958203062415123,
-0.0024212757125496864,
-0.018572596833109856,
-0.009220351465046406,
0.036359477788209915,
-0.14190398156642914,
-0.1347055733203888,
0.011698842979967594,
0.028802992776036263,
-0.005011314991861582,
0.03630993142724037,
0.025983748957514763,
0.010458852164447308,
-0.12038272619247437,
-0.023270361125469208,
-0.023699315264821053,
-0.009661334566771984,
0.04487335681915283,
-0.02306191809475422,
-0.07697077840566635,
-0.0288047194480896,
-0.07504415512084961,
-0.01330130361020565,
-0.04150037840008736,
0.019003862515091896,
0.01317604724317789,
0.06480742245912552,
-0.006348957307636738,
0.11011188477277756,
0.036586061120033264,
-0.022533349692821503,
0.008817664347589016,
-0.09381038695573807,
0.10327854752540588,
0.03706476464867592,
-0.05939259007573128,
-0.0003251767484471202,
0.023970860987901688,
0.04511953890323639,
-0.030964890494942665,
0.015575159341096878,
-0.04165199398994446,
-0.05080212280154228,
-0.010430132038891315,
0.010008997283875942,
0.04296112060546875,
-0.07902371883392334,
-0.008866555988788605,
-0.04497431591153145,
-0.02721124328672886,
0.037504978477954865,
0.053747016936540604,
0.04205034673213959,
-0.0938880667090416,
-0.00042231453699059784,
0.016437964513897896,
-0.005938200745731592,
0.03806263953447342,
0.02500850334763527,
0.03436974808573723,
0.04404090344905853,
-0.0491911880671978,
0.012458104640245438,
0.047321729362010956,
0.07878077775239944,
-0.030230823904275894,
-5.2386692317440975e-8,
0.0068616801872849464,
0.006568751763552427,
-0.11293868720531464,
-0.051602866500616074,
-0.017745379358530045,
-0.00832669623196125,
0.00847819447517395,
-0.02331678383052349,
-0.05748232081532478,
0.003938695415854454,
-0.012619993649423122,
-0.0016923256916925311,
-0.0478491485118866,
0.05995359271764755,
-0.05663701519370079,
-0.04038393124938011,
0.01401771605014801,
0.053031716495752335,
0.026062216609716415,
-0.09964148700237274,
-0.04259365424513817,
-0.03851187974214554,
0.04142509028315544,
0.0600825771689415,
0.08935017138719559,
0.13249291479587555,
0.027324162423610687,
-0.015430314466357231,
0.048806194216012955,
0.06148460507392883,
-0.07262212038040161,
-0.023994415998458862,
-0.039128243923187256,
-0.04562896862626076,
-0.0012857923284173012,
0.05164099857211113,
-0.07660432904958725,
-0.003549778601154685,
0.06165247783064842,
0.04185423254966736,
-0.04328243434429169,
-0.0018929362995550036,
-0.08846762031316757,
0.020499741658568382,
-0.02736135944724083,
0.043853163719177246,
-0.06602917611598969,
0.047266341745853424,
-0.019526630640029907,
-0.04147496446967125,
0.05073315277695656,
-0.04001561179757118,
0.017223753035068512,
0.060607437044382095,
-0.054708223789930344,
0.07378145307302475,
-0.03234492987394333,
0.02346479520201683,
0.05816597118973732,
-0.022396842017769814,
-0.06354554742574692,
0.016860472038388252,
0.02009110152721405,
-0.10011334717273712
] | 0.046774
|
rotation fails](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert). {{< note >}} On nodes created with `kubeadm init` from versions prior to kubeadm version 1.17, there is a [bug](https://github.com/kubernetes/kubeadm/issues/1753) where you manually have to modify the contents of `kubelet.conf`. After `kubeadm init` finishes, you should update `kubelet.conf` to point to the rotated kubelet client certificates, by replacing `client-certificate-data` and `client-key-data` with: ```yaml client-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem client-key: /var/lib/kubelet/pki/kubelet-client-current.pem ``` {{< /note >}} ## Automatic certificate renewal kubeadm renews all the certificates during control plane [upgrade](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/). This feature is designed for addressing the simplest use cases; if you don't have specific requirements on certificate renewal and perform Kubernetes version upgrades regularly (less than 1 year in between each upgrade), kubeadm will take care of keeping your cluster up to date and reasonably secure. If you have more complex requirements for certificate renewal, you can opt out from the default behavior by passing `--certificate-renewal=false` to `kubeadm upgrade apply` or to `kubeadm upgrade node`. ## Manual certificate renewal You can renew your certificates manually at any time with the `kubeadm certs renew` command, with the appropriate command line options. If you are running cluster with a replicated control plane, this command needs to be executed on all the control-plane nodes. This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`. `kubeadm certs renew` uses the existing certificates as the authoritative source for attributes (Common Name, Organization, subject alternative name) and does not rely on the `kubeadm-config` ConfigMap. Even so, the Kubernetes project recommends keeping the served certificate and the associated values in that ConfigMap synchronized, to avoid any risk of confusion. After running the command you should restart the control plane Pods. This is required since dynamic certificate reload is currently not supported for all components and certificates. [Static Pods](/docs/tasks/configure-pod-container/static-pod/) are managed by the local kubelet and not by the API Server, thus kubectl cannot be used to delete and restart them. To restart a static Pod you can temporarily remove its manifest file from `/etc/kubernetes/manifests/` and wait for 20 seconds (see the `fileCheckFrequency` value in [KubeletConfiguration struct](/docs/reference/config-api/kubelet-config.v1beta1/)). The kubelet will terminate the Pod if it's no longer in the manifest directory. You can then move the file back and after another `fileCheckFrequency` period, the kubelet will recreate the Pod and the certificate renewal for the component can complete. `kubeadm certs renew` can renew any specific certificate or, with the subcommand `all`, it can renew all of them: ```shell # If you are running cluster with a replicated control plane, this command # needs to be executed on all the control-plane nodes. kubeadm certs renew all ``` ### Copying the administrator certificate (optional) {#admin-certificate-copy} Clusters built with kubeadm often copy the `admin.conf` certificate into `$HOME/.kube/config`, as instructed in [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). On such a system, to update the contents of `$HOME/.kube/config` after renewing the `admin.conf`, you could run the following commands: ```shell sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config ``` ## Renew certificates with the Kubernetes certificates API This section provides more details about how to execute manual certificate renewal using the Kubernetes certificates API. {{< caution >}} These are advanced topics for users who need to integrate their organization's certificate infrastructure into a kubeadm-built cluster. If the default kubeadm configuration satisfies your needs, you should let kubeadm manage certificates instead. {{< /caution >}} ### Set up a signer The Kubernetes Certificate Authority does not work out of the box. You can configure an external signer such as [cert-manager](https://cert-manager.io/docs/configuration/ca/), or you can use the built-in signer. The built-in signer is part of [`kube-controller-manager`](/docs/reference/command-line-tools-reference/kube-controller-manager/). To activate the built-in signer, you must pass
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
-0.004799812100827694,
0.03997993469238281,
0.03508177399635315,
-0.06673391908407211,
-0.06690595299005508,
-0.01703980192542076,
-0.07141520828008652,
-0.010973739437758923,
0.08262548595666885,
-0.0014929105527698994,
0.05858936905860901,
-0.03477737680077553,
0.07142247259616852,
-0.060940325260162354,
0.04290654510259628,
0.06771815568208694,
-0.07676143199205399,
0.06681763380765915,
0.04155929014086723,
-0.002091748407110572,
-0.10189461708068848,
-0.0022894141729921103,
-0.011811071075499058,
0.05489641800522804,
-0.05894500017166138,
-0.04996901750564575,
0.01223731692880392,
0.026476901024580002,
-0.01105108205229044,
-0.06285684555768967,
0.07116667181253433,
0.08503439277410507,
-0.06807651370763779,
0.005726168397814035,
-0.016461320221424103,
0.07651111483573914,
0.006047825329005718,
-0.011989766731858253,
-0.05580277368426323,
0.004857003688812256,
0.1373431384563446,
0.013812276534736156,
-0.005658092442899942,
-0.025982150807976723,
0.023673558607697487,
0.04966704174876213,
-0.04074406623840332,
-0.02420780062675476,
0.011596053838729858,
0.01698349416255951,
-0.027296805754303932,
-0.07616530358791351,
0.026092490181326866,
0.015219355933368206,
-0.030196910724043846,
0.043690167367458344,
0.04129982367157936,
0.07413104921579361,
0.10916091501712799,
-0.019682593643665314,
0.10731147974729538,
0.039379291236400604,
-0.002538943663239479,
-0.015232301317155361,
-0.10732461512088776,
0.011501907370984554,
0.038506414741277695,
-0.0297549981623888,
-0.07160136103630066,
0.08060488849878311,
0.10617928951978683,
-0.03374537453055382,
-0.04270857572555542,
0.002357236808165908,
0.049197718501091,
-0.045052941888570786,
-0.07752548903226852,
-0.022878354415297508,
-0.01981978677213192,
-0.08910611271858215,
0.009862026199698448,
0.012392946518957615,
0.057630617171525955,
0.002957490738481283,
-0.01658349297940731,
-0.06318136304616928,
-0.0477583222091198,
-0.0034158758353441954,
0.004226521588861942,
0.06029542163014412,
0.07826823741197586,
-0.03792456164956093,
-0.07199592143297195,
-0.0790979266166687,
0.04626861587166786,
0.01966581493616104,
0.03307277709245682,
0.05279933661222458,
-0.0030346254352480173,
-0.07095369696617126,
0.012362874113023281,
0.034161534160375595,
-0.043707702308893204,
0.05760795995593071,
0.0365719310939312,
0.009507259353995323,
0.002625319641083479,
-0.07016513496637344,
-0.03901508077979088,
0.015945831313729286,
0.031981516629457474,
0.019616268575191498,
-0.028479203581809998,
-0.015010464936494827,
-0.012118007056415081,
0.06966307014226913,
-0.0026183882728219032,
-0.016178561374545097,
-0.03099445439875126,
0.06712732464075089,
0.027964185923337936,
-0.0057371691800653934,
-0.03713400661945343,
0.07928641885519028,
-0.08187531679868698,
0.030722113326191902,
0.055195096880197525,
3.2016590658461244e-33,
0.0789981558918953,
-0.03477562591433525,
0.06279671937227249,
0.035161253064870834,
0.0022076249588280916,
-0.07210790365934372,
-0.008206839673221111,
-0.007753876969218254,
-0.04979943111538887,
-0.11024846881628036,
-0.027483049780130386,
0.03283509612083435,
-0.0376165509223938,
-0.09283174574375153,
-0.009274117648601532,
-0.05744883790612221,
-0.07488207519054413,
-0.009302036836743355,
0.06783496588468552,
-0.023897264152765274,
0.03918871656060219,
-0.057176873087882996,
-0.030271923169493675,
0.025433102622628212,
-0.0660630539059639,
0.03337547555565834,
0.07991069555282593,
0.015796370804309845,
-0.060912441462278366,
-0.0013733450323343277,
0.004776598419994116,
0.00948431994765997,
0.01826784946024418,
0.019383888691663742,
-0.11571265757083893,
-0.000767249206546694,
0.014991086907684803,
-0.0036670637782663107,
-0.15925805270671844,
-0.004626834765076637,
-0.05639339238405228,
0.021035227924585342,
-0.00894668884575367,
-0.07058335840702057,
0.04125269129872322,
-0.0007564314873889089,
0.057600803673267365,
0.0020304089412093163,
0.17136776447296143,
0.08230774849653244,
-0.05243806168437004,
0.05850844085216522,
0.005088181234896183,
-0.020123623311519623,
0.070184625685215,
0.07028630375862122,
0.0936998724937439,
-0.022398589178919792,
-0.13881154358386993,
-0.03429419919848442,
-0.04183368384838104,
0.025602690875530243,
0.007785618305206299,
-0.040949199348688126,
0.02416720986366272,
0.002385105239227414,
-0.04399304464459419,
0.03161144629120827,
-0.09712498635053635,
-0.01151106134057045,
-0.043782494962215424,
-0.006002997979521751,
-0.03304009884595871,
-0.003996983170509338,
0.03009198233485222,
-0.006126695778220892,
-0.02682938426733017,
0.026903249323368073,
-0.10498599708080292,
0.0067348359152674675,
0.0769212394952774,
0.00546405790373683,
-0.00043547869427129626,
-0.014437275007367134,
0.04338623955845833,
0.02960881218314171,
0.08837155997753143,
0.08005643635988235,
-0.04876534268260002,
0.08196239918470383,
0.0390801802277565,
0.04548202455043793,
0.02197030931711197,
0.08083374053239822,
-0.06233926862478256,
-3.861623471384005e-33,
-0.023741215467453003,
-0.020792042836546898,
0.014888144098222256,
0.08019450306892395,
0.033205050975084305,
0.013592288829386234,
0.004807048477232456,
0.11121506243944168,
-0.051033131778240204,
-0.030279720202088356,
-0.025770779699087143,
-0.06798908859491348,
0.0026155072264373302,
0.041025299578905106,
-0.03221331909298897,
-0.013425027951598167,
-0.08065520972013474,
0.13622091710567474,
-0.028907405212521553,
0.007763082627207041,
0.04191388189792633,
0.03397652134299278,
-0.03248237445950508,
0.05761006847023964,
-0.0045044757425785065,
0.04187928885221481,
0.02950477972626686,
0.09352438896894455,
-0.0098226647824049,
-0.00022542709484696388,
0.0430438406765461,
-0.06296378374099731,
0.0031981461215764284,
0.09047476202249527,
-0.049575209617614746,
-0.03262966126203537,
-0.04880524426698685,
0.01956912875175476,
-0.035151176154613495,
0.021997638046741486,
-0.0044654062949121,
0.019954657182097435,
-0.053382065147161484,
-0.026701919734477997,
0.012479282915592194,
-0.033358629792928696,
0.0865805596113205,
0.0034801394212991,
0.04518045857548714,
-0.052369408309459686,
-0.03591087460517883,
0.04049210250377655,
-0.005940835922956467,
0.039827216416597366,
0.0003881904704030603,
0.044511858373880386,
0.0055649601854383945,
0.12286867946386337,
0.008683241903781891,
-0.050221484154462814,
-0.01182155404239893,
-0.032310664653778076,
0.06030363216996193,
-0.05316205695271492,
-0.017339499667286873,
0.005873473826795816,
0.03822972998023033,
0.05161002650856972,
0.013486793264746666,
0.07134713232517242,
-0.06234069541096687,
0.03462047129869461,
-0.02020018920302391,
-0.06196751073002815,
0.0609876848757267,
0.04893460497260094,
0.029534250497817993,
-0.022511379793286324,
0.0014258300652727485,
-0.04057186096906662,
-0.029690230265259743,
-0.0413612499833107,
-0.025222472846508026,
0.02715999074280262,
0.009594638831913471,
0.014108851552009583,
0.022431980818510056,
0.0021699387580156326,
0.03911761939525604,
0.058955464512109756,
0.020532352849841118,
0.01423480175435543,
-0.014277052134275436,
0.036829348653554916,
0.07533123344182968,
-4.542533815765637e-8,
0.014941425994038582,
-0.034737177193164825,
-0.10049349069595337,
0.010458103381097317,
0.020860260352492332,
-0.044990383088588715,
0.06697279214859009,
-0.03960813209414482,
-0.09500975161790848,
-0.015037424862384796,
-0.0764010027050972,
0.04325035959482193,
-0.054081182926893234,
0.005380673334002495,
0.014986373484134674,
-0.07493798434734344,
-0.05920584127306938,
-0.015835287049412727,
0.027315272018313408,
-0.042849306017160416,
-0.04870596155524254,
-0.0663161650300026,
-0.0012721508974209428,
0.029779769480228424,
0.027773739770054817,
0.05841523036360741,
0.01472401898354292,
-0.01007311325520277,
0.04564610496163368,
-0.00009076476999325678,
-0.11759106814861298,
-0.05166942626237869,
-0.04813910648226738,
-0.008436520583927631,
-0.019676705822348595,
0.02546636201441288,
-0.09266048669815063,
0.03613799810409546,
0.07500039041042328,
0.04094185307621956,
-0.025490757077932358,
-0.006332783028483391,
-0.11960354447364807,
0.00850291270762682,
-0.07193242758512497,
0.04199940711259842,
-0.010986796580255032,
0.06051977351307869,
-0.01176430657505989,
-0.014322849921882153,
-0.038277897983789444,
-0.09645974636077881,
0.02157750353217125,
0.00007407304656226188,
-0.0775870680809021,
0.13312450051307678,
-0.01730303466320038,
-0.05068099871277809,
0.037819452583789825,
-0.08910679817199707,
0.004086395725607872,
-0.05489873141050339,
-0.016910534352064133,
-0.03765788674354553
] | -0.049464
|
{{< /caution >}} ### Set up a signer The Kubernetes Certificate Authority does not work out of the box. You can configure an external signer such as [cert-manager](https://cert-manager.io/docs/configuration/ca/), or you can use the built-in signer. The built-in signer is part of [`kube-controller-manager`](/docs/reference/command-line-tools-reference/kube-controller-manager/). To activate the built-in signer, you must pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` flags. If you're creating a new cluster, you can use a kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta4/): ```yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration controllerManager: extraArgs: - name: "cluster-signing-cert-file" value: "/etc/kubernetes/pki/ca.crt" - name: "cluster-signing-key-file" value: "/etc/kubernetes/pki/ca.key" ``` ### Create certificate signing requests (CSR) See [Create CertificateSigningRequest](/docs/reference/access-authn-authz/certificate-signing-requests/#create-certificatessigningrequest) for creating CSRs with the Kubernetes API. ## Renew certificates with external CA This section provide more details about how to execute manual certificate renewal using an external CA. To better integrate with external CAs, kubeadm can also produce certificate signing requests (CSRs). A CSR represents a request to a CA for a signed certificate for a client. In kubeadm terms, any certificate that would normally be signed by an on-disk CA can be produced as a CSR instead. A CA, however, cannot be produced as a CSR. ### Renewal by using certificate signing requests (CSR) Renewal of ceritficates is possible by generating new CSRs and signing them with the external CA. For more details about working with CSRs generated by kubeadm see the section [Signing certificate signing requests (CSR) generated by kubeadm](#signing-csr). ## Certificate authority (CA) rotation {#certificate-authority-rotation} Kubeadm does not support rotation or replacement of CA certificates out of the box. For more information about manual rotation or replacement of CA, see [manual rotation of CA certificates](/docs/tasks/tls/manual-rotation-of-ca-certificates/). ## Enabling signed kubelet serving certificates {#kubelet-serving-certs} By default the kubelet serving certificate deployed by kubeadm is self-signed. This means a connection from external services like the [metrics-server](https://github.com/kubernetes-sigs/metrics-server) to a kubelet cannot be secured with TLS. To configure the kubelets in a new kubeadm cluster to obtain properly signed serving certificates you must pass the following minimal configuration to `kubeadm init`: ```yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration --- apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration serverTLSBootstrap: true ``` If you have already created the cluster you must adapt it by doing the following: - Find and edit the `kubelet-config` ConfigMap in the `kube-system` namespace. In that ConfigMap, the `kubelet` key has a [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/) document as its value. Edit the KubeletConfiguration document to set `serverTLSBootstrap: true`. - On each node, add the `serverTLSBootstrap: true` field in `/var/lib/kubelet/config.yaml` and restart the kubelet with `systemctl restart kubelet` The field `serverTLSBootstrap: true` will enable the bootstrap of kubelet serving certificates by requesting them from the `certificates.k8s.io` API. One known limitation is that the CSRs (Certificate Signing Requests) for these certificates cannot be automatically approved by the default signer in the kube-controller-manager - [`kubernetes.io/kubelet-serving`](/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers). This will require action from the user or a third party controller. These CSRs can be viewed using: ```shell kubectl get csr ``` ```console NAME AGE SIGNERNAME REQUESTOR CONDITION csr-9wvgt 112s kubernetes.io/kubelet-serving system:node:worker-1 Pending csr-lz97v 1m58s kubernetes.io/kubelet-serving system:node:control-plane-1 Pending ``` To approve them you can do the following: ```shell kubectl certificate approve ``` By default, these serving certificate will expire after one year. Kubeadm sets the `KubeletConfiguration` field `rotateCertificates` to `true`, which means that close to expiration a new set of CSRs for the serving certificates will be created and must be approved to complete the rotation. To understand more see [Certificate Rotation](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#certificate-rotation). If you are looking for a solution for automatic approval of these CSRs it is recommended that you contact your cloud provider and ask if they have a CSR signer that verifies the node identity with an out of band mechanism. {{% thirdparty-content %}} Third party custom controllers
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
0.0348486453294754,
-0.014234725385904312,
0.00597592256963253,
0.010346608236432076,
0.0052667465060949326,
0.00673303846269846,
-0.025347605347633362,
0.00946691632270813,
0.06669070571660995,
0.03595405071973801,
0.010730903595685959,
-0.11482971906661987,
0.06867804378271103,
0.05400693416595459,
0.0622267946600914,
0.013854874297976494,
-0.02025417983531952,
0.017483465373516083,
0.02164524979889393,
-0.079078309237957,
-0.01622040756046772,
-0.03366829827427864,
0.004614402074366808,
0.021894393488764763,
-0.0810050368309021,
-0.08781730383634567,
0.0018109726952388883,
0.035673148930072784,
-0.02210288681089878,
-0.00795903243124485,
0.03192778676748276,
0.00229360512457788,
0.09146514534950256,
-0.0347001813352108,
0.008842791430652142,
0.08247970044612885,
0.12310965359210968,
0.028750408440828323,
-0.056066468358039856,
0.00020981012494303286,
0.11360789835453033,
-0.04683781415224075,
-0.05266641825437546,
-0.06787199527025223,
-0.010152637027204037,
0.014887949451804161,
-0.03325255215167999,
-0.030689513310790062,
-0.03215109929442406,
-0.004597108345478773,
0.05417780578136444,
-0.10993822664022446,
0.0076758298091590405,
-0.0028335268143564463,
-0.04325300455093384,
0.04119173064827919,
-0.011769185774028301,
0.04479019716382027,
0.11813046783208847,
-0.036908578127622604,
0.07026357203722,
0.01859719678759575,
0.030808163806796074,
-0.03458018973469734,
-0.0516902431845665,
0.03898938372731209,
0.040479741990566254,
0.0034216903150081635,
-0.020668083801865578,
0.049499694257974625,
0.11737057566642761,
-0.026041345670819283,
-0.010301513597369194,
-0.0321972593665123,
0.006876419298350811,
-0.012948461808264256,
-0.10302091389894485,
0.031222984194755554,
0.04131481423974037,
-0.04478197917342186,
-0.029010213911533356,
0.0028475853614509106,
0.05400672182440758,
-0.009399399161338806,
-0.10001788288354874,
0.027333129197359085,
-0.004338365979492664,
-0.0680079311132431,
0.04981205239892006,
0.03311627730727196,
0.03705790266394615,
-0.049792468547821045,
-0.04021992161870003,
-0.11306966096162796,
0.06890742480754852,
-0.0013594437623396516,
-0.02249378338456154,
0.000649362220428884,
0.0625150203704834,
-0.05219585821032524,
-0.01682286337018013,
-0.015435457229614258,
-0.05652175471186638,
-0.00392938544973731,
0.043927766382694244,
0.03343046456575394,
-0.05117522552609444,
-0.022195184603333473,
0.04235594719648361,
0.07534265518188477,
0.027094731107354164,
0.03894491866230965,
-0.0037101535126566887,
0.0039954353123903275,
-0.01684803143143654,
0.09563051164150238,
0.008646300993859768,
0.01184114534407854,
0.0575888492166996,
0.0002116622490575537,
0.0030401209369301796,
-0.10476446896791458,
-0.05567396432161331,
0.005159937310963869,
-0.04499977454543114,
0.0739058256149292,
-0.021067170426249504,
1.930313436289849e-33,
0.06476018577814102,
0.02861175313591957,
0.0554262213408947,
-0.013753953389823437,
0.04900228977203369,
-0.08119936287403107,
0.010278650559484959,
-0.031182028353214264,
-0.08376558870077133,
-0.03602531552314758,
-0.012922439724206924,
0.056354861706495285,
0.02236010879278183,
-0.0662691593170166,
0.008257357403635979,
0.010349671356379986,
-0.0616612508893013,
-0.04825657978653908,
0.08553910255432129,
-0.01086459681391716,
0.0025130247231572866,
-0.03456684574484825,
-0.0006972220726311207,
0.0008813409949652851,
-0.05108408257365227,
0.03302093595266342,
0.0637001246213913,
-0.03958416357636452,
0.015367841348052025,
-0.020313942804932594,
-0.022181371226906776,
-0.06450678408145905,
0.06667472422122955,
-0.026080146431922913,
-0.07532639801502228,
0.001142431516200304,
0.02520942874252796,
0.02015279233455658,
-0.07464542239904404,
-0.055567383766174316,
0.02112826518714428,
-0.06660772114992142,
0.018789304420351982,
-0.012309540994465351,
0.036949273198843,
0.014692811295390129,
0.03580865636467934,
-0.05131620913743973,
0.18836821615695953,
0.07717921584844589,
-0.06592553853988647,
-0.08174848556518555,
-0.014587830752134323,
-0.0762162134051323,
0.0701325461268425,
0.004600894171744585,
0.04714897274971008,
0.0001744920591590926,
-0.1490800678730011,
-0.08905453234910965,
-0.07986093312501907,
-0.04933830723166466,
0.016242751851677895,
0.02102264203131199,
0.021695643663406372,
0.012540353462100029,
-0.023168519139289856,
0.044425565749406815,
-0.04966195300221443,
-0.08410158008337021,
-0.07275570183992386,
0.027448542416095734,
-0.03026738204061985,
0.03308558464050293,
0.0005846400163136423,
-0.041348863393068314,
0.013988558202981949,
0.10014291852712631,
-0.05725497752428055,
0.03177313134074211,
-0.0028873393312096596,
-0.005457374267280102,
-0.008944275788962841,
0.10045216232538223,
0.06905543804168701,
-0.00609971908852458,
0.017014747485518456,
0.07588963955640793,
-0.002201265888288617,
0.01180148683488369,
0.011639262549579144,
0.025695443153381348,
0.05145297944545746,
0.11856033653020859,
-0.09640080481767654,
-2.2492713387579993e-33,
0.08036749064922333,
-0.012566035613417625,
0.0307451244443655,
0.034872446209192276,
0.03919781744480133,
0.008572569116950035,
-0.03334423154592514,
0.08222103118896484,
-0.017881853505969048,
-0.06021105870604515,
0.004126995801925659,
-0.07355699688196182,
0.08013295382261276,
-0.020053474232554436,
-0.04465541988611221,
-0.03158429265022278,
-0.038877833634614944,
0.09369094669818878,
-0.046609267592430115,
-0.03853647783398628,
0.0033976156264543533,
-0.05322466418147087,
0.04882724955677986,
0.04905881732702255,
-0.022270355373620987,
0.024899480864405632,
0.012852356769144535,
0.04662172868847847,
-0.06727118790149689,
-0.004786093719303608,
0.03456476703286171,
-0.045152295380830765,
0.0164262056350708,
0.06847310066223145,
-0.022880058735609055,
-0.11567968875169754,
0.0007960160146467388,
-0.02494531311094761,
0.0006788581958971918,
0.005896988790482283,
-0.02838045172393322,
0.009038287214934826,
-0.030769681558012962,
-0.008819947019219398,
0.006227897480130196,
0.043620962649583817,
0.13732822239398956,
-0.04963730275630951,
-0.03691874071955681,
-0.0008245643693953753,
-0.041186053305864334,
0.0007048940169624984,
-0.05718240886926651,
0.029118672013282776,
-0.03762185573577881,
0.08917640894651413,
0.047266777604818344,
0.14761760830879211,
-0.010299496352672577,
0.02956964634358883,
0.041235703974962234,
-0.10641918331384659,
0.031900227069854736,
0.04723155498504639,
-0.008122878149151802,
-0.004302260000258684,
0.022056883201003075,
0.055232904851436615,
0.0013450667029246688,
0.061203353106975555,
-0.03362099826335907,
-0.052801456302404404,
0.004305848386138678,
0.023377057164907455,
0.024211836978793144,
-0.05807743966579437,
0.026477225124835968,
-0.011626744642853737,
0.00046510886750184,
-0.06098295748233795,
0.0060339937917888165,
-0.015951139852404594,
-0.07651523500680923,
-0.03031185455620289,
0.10165880620479584,
0.07671413570642471,
0.08194847404956818,
0.01805771142244339,
0.02019503340125084,
0.06448975205421448,
-0.03045026957988739,
0.018160153180360794,
0.03283572942018509,
0.04480180889368057,
0.005769746843725443,
-5.0636518977853484e-8,
0.04614276811480522,
0.03232932090759277,
-0.08762983977794647,
-0.04702209681272507,
0.04227162525057793,
0.032377343624830246,
0.002791157690808177,
-0.07374684512615204,
-0.0958520844578743,
-0.026537509635090828,
-0.04030317813158035,
0.006790200248360634,
-0.08214690536260605,
-0.029270779341459274,
0.019584301859140396,
-0.05147212743759155,
-0.02340814843773842,
-0.003880120115354657,
0.03250160440802574,
-0.061525773257017136,
-0.02871176414191723,
-0.08671141415834427,
-0.02968611940741539,
0.028146717697381973,
-0.016281908378005028,
0.07438546419143677,
0.04249080270528793,
0.06977444887161255,
0.04792385920882225,
0.013126456178724766,
-0.07392913103103638,
-0.013551135547459126,
-0.05040404945611954,
0.04160161688923836,
-0.0011319360928609967,
0.06138518452644348,
-0.07091525197029114,
0.009917661547660828,
0.03402336686849594,
0.06670206785202026,
-0.008429517038166523,
0.051548071205616,
-0.0906444862484932,
0.004205543082207441,
-0.04595755785703659,
0.13790355622768402,
-0.013107030652463436,
0.05144660919904709,
0.013984628021717072,
0.024449821561574936,
0.01547566894441843,
-0.08209235966205597,
0.033131252974271774,
0.012094363570213318,
-0.11746992915868759,
0.0325772762298584,
-0.03307759761810303,
0.012097910046577454,
0.02418527938425541,
-0.04800515994429588,
0.05959571897983551,
-0.047410748898983,
0.0263898316770792,
-0.040624599903821945
] | 0.051253
|
[Certificate Rotation](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#certificate-rotation). If you are looking for a solution for automatic approval of these CSRs it is recommended that you contact your cloud provider and ask if they have a CSR signer that verifies the node identity with an out of band mechanism. {{% thirdparty-content %}} Third party custom controllers can be used: - [kubelet-csr-approver](https://github.com/postfinance/kubelet-csr-approver) Such a controller is not a secure mechanism unless it not only verifies the CommonName in the CSR but also verifies the requested IPs and domain names. This would prevent a malicious actor that has access to a kubelet client certificate to create CSRs requesting serving certificates for any IP or domain name. ## Generating kubeconfig files for additional users {#kubeconfig-additional-users} During cluster creation, `kubeadm init` signs the certificate in the `super-admin.conf` to have `Subject: O = system:masters, CN = kubernetes-super-admin`. [`system:masters`](/docs/reference/access-authn-authz/rbac/#user-facing-roles) is a break-glass, super user group that bypasses the authorization layer (for example, [RBAC](/docs/reference/access-authn-authz/rbac/)). The file `admin.conf` is also created by kubeadm on control plane nodes and it contains a certificate with `Subject: O = kubeadm:cluster-admins, CN = kubernetes-admin`. `kubeadm:cluster-admins` is a group logically belonging to kubeadm. If your cluster uses RBAC (the kubeadm default), the `kubeadm:cluster-admins` group is bound to the [`cluster-admin`](/docs/reference/access-authn-authz/rbac/#user-facing-roles) ClusterRole. {{< warning >}} Avoid sharing the `super-admin.conf` or `admin.conf` files. Instead, create least privileged access even for people who work as administrators and use that least privilege alternative for anything other than break-glass (emergency) access. {{< /warning >}} You can use the [`kubeadm kubeconfig user`](/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig) command to generate kubeconfig files for additional users. The command accepts a mixture of command line flags and [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) options. The generated kubeconfig will be written to stdout and can be piped to a file using `kubeadm kubeconfig user ... > somefile.conf`. Example configuration file that can be used with `--config`: ```yaml # example.yaml apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration # Will be used as the target "cluster" in the kubeconfig clusterName: "kubernetes" # Will be used as the "server" (IP or DNS name) of this cluster in the kubeconfig controlPlaneEndpoint: "some-dns-address:6443" # The cluster CA key and certificate will be loaded from this local directory certificatesDir: "/etc/kubernetes/pki" ``` Make sure that these settings match the desired target cluster settings. To see the settings of an existing cluster use: ```shell kubectl get cm kubeadm-config -n kube-system -o=jsonpath="{.data.ClusterConfiguration}" ``` The following example will generate a kubeconfig file with credentials valid for 24 hours for a new user `johndoe` that is part of the `appdevs` group: ```shell kubeadm kubeconfig user --config example.yaml --org appdevs --client-name johndoe --validity-period 24h ``` The following example will generate a kubeconfig file with administrator credentials valid for 1 week: ```shell kubeadm kubeconfig user --config example.yaml --client-name admin --validity-period 168h ``` ## Signing certificate signing requests (CSR) generated by kubeadm {#signing-csr} You can create certificate signing requests with `kubeadm certs generate-csr`. Calling this command will generate `.csr` / `.key` file pairs for regular certificates. For certificates embedded in kubeconfig files, the command will generate a `.csr` / `.conf` pair where the key is already embedded in the `.conf` file. A CSR file contains all relevant information for a CA to sign a certificate. kubeadm uses a [well defined specification](/docs/setup/best-practices/certificates/#all-certificates) for all its certificates and CSRs. The default certificate directory is `/etc/kubernetes/pki`, while the default directory for kubeconfig files is `/etc/kubernetes`. These defaults can be overridden with the flags `--cert-dir` and `--kubeconfig-dir`, respectively. To pass custom options to `kubeadm certs generate-csr` use the `--config` flag, which accepts a [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) file, similarly to commands such as `kubeadm init`. Any specification such as extra SANs and custom IP addresses must be stored in the same
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
-0.0950239971280098,
0.03248171880841255,
-0.06121159344911575,
-0.05412464961409569,
-0.05055856704711914,
0.014600214548408985,
0.015592854470014572,
-0.01693476177752018,
0.10886795073747635,
-0.02060306817293167,
0.03190621733665466,
-0.060056641697883606,
0.09171902388334274,
-0.04669353738427162,
-0.007085136603564024,
0.009684208780527115,
-0.004222533665597439,
0.04031652584671974,
-0.00981826987117529,
-0.06349966675043106,
-0.07856590300798416,
-0.01943693310022354,
-0.025679349899291992,
0.08765656501054764,
-0.11379742622375488,
-0.08283057808876038,
0.005166762508451939,
0.011880680918693542,
0.012832277454435825,
-0.05907241627573967,
0.08146071434020996,
0.024887094274163246,
-0.01545307133346796,
0.0365360826253891,
-0.04252699762582779,
0.02275393344461918,
0.002140903612598777,
-0.035503748804330826,
-0.08982578665018082,
-0.01665477827191353,
0.12454820424318314,
-0.047172632068395615,
-0.05041453614830971,
-0.06264794617891312,
-0.009818662889301777,
0.040369316935539246,
-0.03040909394621849,
-0.0507030226290226,
-0.03993958234786987,
0.004381661303341389,
0.02757040224969387,
-0.09524022042751312,
0.08992168307304382,
-0.011429633013904095,
-0.09332052618265152,
-0.007931661792099476,
0.024740519002079964,
0.007161306217312813,
0.15780550241470337,
0.007471227087080479,
0.09960166364908218,
-0.03531361743807793,
-0.0006731352768838406,
-0.01232394389808178,
-0.04117687791585922,
0.0029185202438384295,
0.00602506659924984,
-0.010669287294149399,
0.006662201602011919,
0.04538687318563461,
0.1032589003443718,
-0.05283258482813835,
-0.03791550546884537,
-0.0021111636888235807,
0.045034296810626984,
-0.027292534708976746,
-0.103611059486866,
-0.01989206299185753,
-0.0191583801060915,
-0.07402362674474716,
0.06203761324286461,
0.04860774800181389,
0.07352970540523529,
0.025234583765268326,
-0.05659269914031029,
-0.028470292687416077,
-0.039736922830343246,
0.0064650969579815865,
0.07355203479528427,
0.051827188581228256,
0.026435744017362595,
0.0004493093001656234,
0.015068008564412594,
-0.11500657349824905,
0.03230607137084007,
0.010452363640069962,
0.021957142278552055,
-0.027942193672060966,
0.020757529884576797,
-0.038488831371068954,
0.014429222792387009,
-0.004163972567766905,
-0.055533405393362045,
-0.013497868552803993,
0.03450014814734459,
0.013967236503958702,
-0.019209329038858414,
-0.04392341524362564,
0.11432141810655594,
0.06239212304353714,
-0.01815679483115673,
0.03587418049573898,
-0.07394858449697495,
-0.030295830219984055,
0.003976027946919203,
0.0827692523598671,
0.05058300122618675,
0.020081916823983192,
0.0880284383893013,
-0.018771175295114517,
0.01103074662387371,
-0.08201219886541367,
-0.00423299940302968,
-0.037595484405756,
0.04845783859491348,
-0.023111065849661827,
-0.06021325662732124,
5.130323871308945e-33,
0.045460332185029984,
0.05962881073355675,
0.09064219146966934,
-0.045942433178424835,
0.02183987945318222,
-0.07557673007249832,
-0.0026600826531648636,
-0.022249523550271988,
-0.05672762170433998,
-0.06708809733390808,
-0.03316943347454071,
0.05345120280981064,
0.02759736403822899,
-0.0674031600356102,
0.057210177183151245,
-0.059144049882888794,
-0.08629266917705536,
-0.02275269292294979,
0.12114669382572174,
-0.023037364706397057,
0.07593391835689545,
-0.021528223529458046,
0.0015264074318110943,
0.02223057672381401,
-0.02503962256014347,
-0.0657263770699501,
0.042770132422447205,
0.012659027241170406,
-0.012081917375326157,
-0.011273137293756008,
0.049520984292030334,
0.012097835540771484,
0.012099070474505424,
0.01717034913599491,
-0.004651456605643034,
0.056860439479351044,
-0.00663832388818264,
0.00840291939675808,
-0.05922989547252655,
0.01279786042869091,
0.020247800275683403,
-0.04634523391723633,
-0.016719825565814972,
0.020888200029730797,
0.04169125482439995,
0.011817197315394878,
0.03498249873518944,
-0.0322139710187912,
0.1161104142665863,
0.05021297186613083,
-0.05815534293651581,
0.003656239015981555,
0.01647811010479927,
-0.040888067334890366,
0.06052546948194504,
0.0389321967959404,
0.031908631324768066,
-0.032884128391742706,
-0.0855325385928154,
-0.04348433017730713,
-0.02717343531548977,
-0.07528971880674362,
-0.053952548652887344,
-0.006558615248650312,
-0.031869061291217804,
-0.043115049600601196,
-0.0027150230016559362,
0.02128044329583645,
-0.053973354399204254,
-0.06772051006555557,
-0.07120632380247116,
0.05675339698791504,
0.012109246104955673,
-0.0115180853754282,
-0.002574038924649358,
-0.046943292021751404,
-0.044915974140167236,
0.09908239543437958,
-0.04976266622543335,
-0.02208212949335575,
0.010640178807079792,
-0.005911444313824177,
0.012936592102050781,
0.10078464448451996,
-0.03851412981748581,
0.016586555168032646,
0.07859508693218231,
0.0650172084569931,
-0.07716889679431915,
0.02019677124917507,
0.04214293137192726,
0.006987014785408974,
0.05863409489393234,
0.11116041988134384,
-0.0761934220790863,
-5.457913208389993e-33,
0.012022044509649277,
-0.09025824815034866,
0.07031252980232239,
0.09533444792032242,
0.0861998125910759,
-0.016970084980130196,
0.0036604097113013268,
0.10773540288209915,
-0.01432514376938343,
-0.05939733609557152,
0.022467397153377533,
-0.02861948497593403,
0.05542278289794922,
0.020464032888412476,
0.011150653474032879,
-0.025194857269525528,
-0.08643133193254471,
0.11812087148427963,
-0.05043948441743851,
-0.013346557505428791,
0.047715552151203156,
-0.01779334247112274,
0.007816915400326252,
0.05725572258234024,
-0.01383797638118267,
0.03441200777888298,
-0.029065018519759178,
0.04274332523345947,
-0.036111846566200256,
0.08401037007570267,
-0.019337395206093788,
-0.03533734381198883,
0.03672710061073303,
0.018643291667103767,
-0.04177388921380043,
-0.11604669690132141,
-0.08199632167816162,
0.08375561982393265,
-0.004391685128211975,
-0.0065706102177500725,
-0.016243431717157364,
0.023933468386530876,
-0.028412144631147385,
0.018413156270980835,
0.02247237227857113,
-0.0060808840207755566,
0.08517203480005264,
0.03480604290962219,
-0.027487272396683693,
0.03211432695388794,
-0.06861501932144165,
0.02112644352018833,
0.008718368597328663,
0.05277084931731224,
0.015161736868321896,
0.02813688851892948,
0.03588322550058365,
0.09241028875112534,
0.026591453701257706,
0.010440116748213768,
0.015091890469193459,
-0.03475206345319748,
0.08311484009027481,
0.04441250115633011,
0.03354959934949875,
-0.021309956908226013,
0.009720755741000175,
0.04272804036736488,
0.0773215964436531,
0.05438939109444618,
-0.02600492537021637,
-0.023522308096289635,
-0.023236986249685287,
-0.0258766021579504,
0.05224449187517166,
-0.05946434661746025,
0.057142190635204315,
-0.060929104685783386,
-0.011552084237337112,
-0.0050700269639492035,
-0.05823734775185585,
0.026867404580116272,
-0.01766876131296158,
-0.03713512420654297,
0.052807558327913284,
-0.006043246015906334,
0.06253984570503235,
-0.016543302685022354,
0.0533532090485096,
0.06905698776245117,
-0.028136348351836205,
0.039952706545591354,
0.04990565404295921,
0.035714052617549896,
0.016346260905265808,
-5.174551986897313e-8,
0.044818367809057236,
0.015070146881043911,
-0.08691110461950302,
-0.001307124737650156,
-0.010797979310154915,
-0.009001481346786022,
0.016709016636013985,
-0.1003677174448967,
-0.09083499759435654,
-0.008429247885942459,
-0.011883607134222984,
-0.02528679370880127,
-0.04962718114256859,
-0.07054133713245392,
-0.016706114634871483,
-0.043332528322935104,
0.01846626214683056,
0.02268834039568901,
-0.01562521606683731,
-0.04740779101848602,
-0.07411019504070282,
-0.013061492703855038,
0.02477440796792507,
0.00037593391607515514,
-0.02762519381940365,
0.1489347517490387,
-0.009077551774680614,
0.010632066987454891,
0.020360320806503296,
0.05362826958298683,
-0.07965230196714401,
-0.04219764098525047,
-0.042400751262903214,
0.057229992002248764,
-0.007951333187520504,
0.07395096868276596,
-0.16298530995845795,
-0.03177903592586517,
0.06303062289953232,
0.0685790553689003,
-0.042438674718141556,
0.05745727941393852,
-0.06135111302137375,
0.02243569679558277,
-0.029908502474427223,
0.07597058266401291,
0.008910619653761387,
-0.014112742617726326,
0.026767542585730553,
0.0342845693230629,
-0.02108987793326378,
-0.10231545567512512,
-0.021324269473552704,
0.07346909493207932,
-0.05405654013156891,
0.05331190302968025,
-0.04557855799794197,
-0.019598864018917084,
0.06384184956550598,
0.008788115344941616,
-0.02986137941479683,
-0.06581445038318634,
0.031616345047950745,
-0.012303782626986504
] | 0.023286
|
be overridden with the flags `--cert-dir` and `--kubeconfig-dir`, respectively. To pass custom options to `kubeadm certs generate-csr` use the `--config` flag, which accepts a [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta4/) file, similarly to commands such as `kubeadm init`. Any specification such as extra SANs and custom IP addresses must be stored in the same configuration file and used for all relevant kubeadm commands by passing it as `--config`. {{< note >}} This guide uses the default Kubernetes directory `/etc/kubernetes`, which requires a super user. If you are following this guide and are using directories that you can write to (typically, this means running `kubeadm` with `--cert-dir` and `--kubeconfig-dir`) then you can omit the `sudo` command. You must then copy the files that you produced over to within the `/etc/kubernetes` directory so that `kubeadm init` or `kubeadm join` will find them. {{< /note >}} ### Preparing CA and service account files On the primary control plane node, where `kubeadm init` will be executed, call the following commands: ```shell sudo kubeadm init phase certs ca sudo kubeadm init phase certs etcd-ca sudo kubeadm init phase certs front-proxy-ca sudo kubeadm init phase certs sa ``` This will populate the folders `/etc/kubernetes/pki` and `/etc/kubernetes/pki/etcd` with all self-signed CA files (certificates and keys) and service account (public and private keys) that kubeadm needs for a control plane node. {{< note >}} If you are using an external CA, you must generate the same files out of band and manually copy them to the primary control plane node in `/etc/kubernetes`. Once all CSRs are signed, you can delete the root CA key (`ca.key`) as noted in the [External CA mode](#external-ca-mode) section. {{< /note >}} For secondary control plane nodes (`kubeadm join --control-plane`) there is no need to call the above commands. Depending on how you setup the [High Availability](/docs/setup/production-environment/tools/kubeadm/high-availability) cluster, you either have to manually copy the same files from the primary control plane node, or use the automated `--upload-certs` functionality of `kubeadm init`. ### Generate CSRs The `kubeadm certs generate-csr` command generates CSRs for all known certificates managed by kubeadm. Once the command is done you must manually delete `.csr`, `.conf` or `.key` files that you don't need. #### Considerations for kubelet.conf {#considerations-kubelet-conf} This section applies to both control plane and worker nodes. If you have deleted the `ca.key` file from control plane nodes ([External CA mode](#external-ca-mode)), the active kube-controller-manager in this cluster will not be able to sign kubelet client certificates. If no external method for signing these certificates exists in your setup (such as an [external signer](#set-up-a-signer)), you could manually sign the `kubelet.conf.csr` as explained in this guide. Note that this also means that the automatic [kubelet client certificate rotation](/docs/tasks/tls/certificate-rotation/#enabling-client-certificate-rotation) will be disabled. If so, close to certificate expiration, you must generate a new `kubelet.conf.csr`, sign the certificate, embed it in `kubelet.conf` and restart the kubelet. If this does not apply to your setup, you can skip processing the `kubelet.conf.csr` on secondary control plane and on workers nodes (all nodes that call `kubeadm join ...`). That is because the active kube-controller-manager will be responsible for signing new kubelet client certificates. {{< note >}} You must process the `kubelet.conf.csr` file on the primary control plane node (the host where you originally ran `kubeadm init`). This is because `kubeadm` considers that as the node that bootstraps the cluster, and a pre-populated `kubelet.conf` is needed. {{< /note >}} #### Control plane nodes Execute the following command on primary (`kubeadm init`) and secondary (`kubeadm join --control-plane`) control plane nodes to generate all CSR files: ```shell sudo kubeadm certs generate-csr ``` If external etcd is to be used, follow the [External etcd
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
0.010497817769646645,
0.04034264385700226,
-0.05125594884157181,
-0.004733989480882883,
-0.03889016434550285,
0.004899572115391493,
-0.03411144018173218,
0.033470675349235535,
0.0357322171330452,
-0.027193836867809296,
0.01819082349538803,
-0.13182097673416138,
0.04739750921726227,
-0.03143225237727165,
0.034995876252651215,
-0.01692243479192257,
-0.008421443402767181,
0.00008211427484638989,
0.05400019884109497,
-0.07766566425561905,
-0.03192557767033577,
0.013806017115712166,
-0.009536919184029102,
-0.044088441878557205,
-0.11967038363218307,
-0.09850005805492401,
-0.005668212193995714,
0.029366597533226013,
-0.013486964628100395,
-0.0293247252702713,
0.06980003416538239,
0.0704798698425293,
-0.007560179568827152,
0.02934103086590767,
-0.05078166723251343,
0.10654374212026596,
0.03699205070734024,
0.0006094078999012709,
-0.03315456956624985,
0.014933479018509388,
0.12768064439296722,
0.0020907369907945395,
-0.04537968337535858,
-0.02867928333580494,
-0.03878413140773773,
-0.0072187576442956924,
-0.04342545196413994,
-0.08083335310220718,
-0.002965007908642292,
0.03087454102933407,
0.02779516763985157,
-0.04331353306770325,
0.007806950714439154,
-0.04242585971951485,
0.05359426513314247,
0.03818797692656517,
-0.04214966297149658,
0.04971244931221008,
0.11506090313196182,
-0.003605453297495842,
0.07744181156158447,
0.0290219746530056,
0.0026345469523221254,
-0.033938247710466385,
-0.05651578679680824,
0.015479161404073238,
0.06960523128509521,
0.06616039574146271,
-0.043511807918548584,
0.09057523310184479,
0.004135997965931892,
0.03470125421881676,
-0.04716583713889122,
0.00023162855359259993,
-0.021161070093512535,
0.029825059697031975,
-0.12407499551773071,
0.056340523064136505,
-0.057318709790706635,
-0.07962417602539062,
-0.005218908656388521,
0.03683677315711975,
0.04775184392929077,
-0.006718029268085957,
-0.07249296456575394,
0.02952820621430874,
0.03611346334218979,
-0.062413908541202545,
0.07350779324769974,
0.05121610686182976,
0.09718732535839081,
-0.08883701264858246,
-0.05807757377624512,
-0.10191113501787186,
0.01999863050878048,
0.052926432341337204,
-0.019375180825591087,
-0.00025083619402721524,
0.047660790383815765,
-0.07289807498455048,
0.0020289733074605465,
0.012102847918868065,
-0.05436701327562332,
-0.009852798655629158,
0.03304891288280487,
0.02885488048195839,
-0.05289216339588165,
0.017062142491340637,
0.013039246201515198,
0.09100285172462463,
0.026564307510852814,
0.015538464300334454,
-0.00035153923090547323,
-0.061294615268707275,
0.012413796037435532,
0.09734462946653366,
0.005156632512807846,
0.019838865846395493,
0.046882033348083496,
0.026454560458660126,
-0.061997924000024796,
-0.08585105091333389,
-0.010224240832030773,
0.0030402003321796656,
-0.07499492168426514,
0.014524523168802261,
0.016177695244550705,
2.8122851946728806e-33,
0.09164171665906906,
-0.00688274297863245,
0.044313833117485046,
-0.013180483132600784,
0.04565269127488136,
-0.07363417744636536,
0.03618324548006058,
0.04697084054350853,
-0.035497382283210754,
-0.021357867866754532,
0.03896798938512802,
0.01984044723212719,
-0.029794679954648018,
-0.027526482939720154,
0.0006290536839514971,
0.02970569021999836,
-0.05056743696331978,
-0.052684009075164795,
0.08275127410888672,
-0.0437164232134819,
0.002123278798535466,
0.004289318807423115,
-0.005286230240017176,
0.016159726306796074,
0.054752666503190994,
0.005901271011680365,
0.07200635969638824,
-0.014935024082660675,
-0.04091965779662132,
-0.028235234320163727,
0.03457246720790863,
0.0034473726991564035,
0.05100143328309059,
0.05218750610947609,
-0.043517906218767166,
0.001557382638566196,
0.0221165269613266,
0.07023634761571884,
-0.12407217174768448,
0.03375983238220215,
0.04857344925403595,
-0.01589089073240757,
0.008962365798652172,
-0.002695221221074462,
0.023205948993563652,
0.013985452242195606,
0.023454168811440468,
-0.05803418532013893,
0.15586665272712708,
-0.00299163069576025,
-0.10038996487855911,
-0.011507946997880936,
-0.0086575448513031,
-0.09404081851243973,
0.12003921717405319,
0.006475681904703379,
0.003977635875344276,
-0.040953606367111206,
-0.12007321417331696,
-0.10739008337259293,
-0.0862492173910141,
0.007908368483185768,
-0.01703423447906971,
0.038464609533548355,
0.030625009909272194,
-0.022365471348166466,
-0.08000817149877548,
0.0019944424275308847,
-0.03196762874722481,
-0.07401546090841293,
-0.0650525838136673,
0.020643159747123718,
-0.03089342638850212,
0.018851768225431442,
-0.007593477610498667,
0.034699320793151855,
-0.0056593408808112144,
0.06666170805692673,
-0.061074886471033096,
-0.022659461945295334,
0.023212464526295662,
0.04882601648569107,
-0.034816429018974304,
0.07512333244085312,
0.031146429479122162,
0.025768429040908813,
0.04452093318104744,
0.03216668963432312,
0.028801769018173218,
-0.0023192414082586765,
0.01354568637907505,
0.05271254479885101,
-0.02299598418176174,
0.024123473092913628,
-0.13318851590156555,
-4.9919376968324376e-33,
0.07061354070901871,
0.014632638543844223,
0.05113358423113823,
0.04077807813882828,
0.03555474057793617,
0.046760011464357376,
0.04667859151959419,
0.049808815121650696,
-0.015370593406260014,
-0.06249555945396423,
-0.04891965538263321,
-0.01164152380079031,
0.09120678901672363,
-0.030496161431074142,
-0.0806502029299736,
-0.009033005684614182,
-0.11988338083028793,
0.09023737162351608,
-0.0987485721707344,
-0.04004344344139099,
-0.009575092233717442,
0.04228081926703453,
0.094489187002182,
0.027933167293667793,
-0.020954402163624763,
0.013275926932692528,
-0.04059596359729767,
0.06273358315229416,
-0.10562988370656967,
0.016467565670609474,
0.025604644790291786,
-0.018424546346068382,
-0.031771235167980194,
0.03062369115650654,
-0.09251704066991806,
-0.1028275191783905,
-0.03169916197657585,
0.09742597490549088,
0.05798458307981491,
0.10539816319942474,
-0.021225325763225555,
0.015551470220088959,
-0.05554283410310745,
-0.02605062536895275,
-0.005155538208782673,
0.01237059198319912,
0.09561025351285934,
-0.09963216632604599,
-0.016552098095417023,
-0.022800011560320854,
-0.05667584016919136,
0.0014277437003329396,
-0.06841447949409485,
0.0610608346760273,
0.008679552003741264,
0.04826555773615837,
0.008862578310072422,
0.07677484303712845,
0.029184581711888313,
0.010066479444503784,
0.050524841994047165,
-0.07667149603366852,
0.09744291752576828,
0.022809717804193497,
-0.036944471299648285,
-0.018598126247525215,
-0.03504100441932678,
0.026020599529147148,
0.01740552857518196,
0.017883768305182457,
-0.06209563836455345,
-0.0673307254910469,
-0.003475976176559925,
-0.009749433025717735,
0.03692687675356865,
-0.0499446876347065,
0.030237510800361633,
-0.026517704129219055,
-0.024893920868635178,
0.051619190722703934,
-0.004719426389783621,
0.02879521995782852,
-0.08224756270647049,
-0.029516467824578285,
0.029529733583331108,
0.030877292156219482,
0.04121764749288559,
0.003117411630228162,
0.07422999292612076,
0.06923594325780869,
-0.047516364604234695,
0.06460829824209213,
0.05284639075398445,
0.023300882428884506,
-0.0019257488893344998,
-5.337291497653496e-8,
0.029822181910276413,
-0.02355598472058773,
-0.1162853091955185,
0.02055095136165619,
0.02754632569849491,
0.0014415651094168425,
-0.046051084995269775,
-0.04344996437430382,
-0.024953123182058334,
-0.015583455562591553,
-0.06961171329021454,
0.021772276610136032,
-0.10039481520652771,
0.02520572394132614,
-0.0459635965526104,
-0.07162948697805405,
-0.003923570271581411,
0.030612172558903694,
0.024059129878878593,
-0.03788965195417404,
-0.028918752446770668,
-0.05559232085943222,
0.01708696223795414,
0.048538852483034134,
0.06652339547872543,
0.07668941468000412,
0.04778537154197693,
-0.035284411162137985,
0.0305329617112875,
0.09500735253095627,
-0.03967127203941345,
-0.015214180573821068,
-0.05459387227892876,
0.017272071912884712,
0.007366345264017582,
0.018845215439796448,
-0.11303242295980453,
0.015616260468959808,
0.08639295399188995,
0.07409978657960892,
-0.019087040796875954,
0.00952161755412817,
-0.09886730462312698,
0.03738953173160553,
-0.022062689065933228,
0.010865600779652596,
-0.015682775527238846,
0.022406624630093575,
-0.02168441191315651,
-0.0204131118953228,
-0.02682887203991413,
-0.04979418218135834,
0.03814736008644104,
0.028641490265727043,
-0.004466606304049492,
0.05534251034259796,
-0.04864371567964554,
0.032037265598773956,
0.013190199621021748,
-0.02394500933587551,
-0.03152059391140938,
-0.06693937629461288,
0.002464375225827098,
-0.05115395411849022
] | 0.003359
|
a pre-populated `kubelet.conf` is needed. {{< /note >}} #### Control plane nodes Execute the following command on primary (`kubeadm init`) and secondary (`kubeadm join --control-plane`) control plane nodes to generate all CSR files: ```shell sudo kubeadm certs generate-csr ``` If external etcd is to be used, follow the [External etcd with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/#external-etcd-nodes) guide to understand what CSR files are needed on the kubeadm and etcd nodes. Other `.csr` and `.key` files under `/etc/kubernetes/pki/etcd` can be removed. Based on the explanation in [Considerations for kubelet.conf](#considerations-kubelet-conf) keep or delete the `kubelet.conf` and `kubelet.conf.csr` files. #### Worker nodes Based on the explanation in [Considerations for kubelet.conf](#considerations-kubelet-conf), optionally call: ```shell sudo kubeadm certs generate-csr ``` and keep only the `kubelet.conf` and `kubelet.conf.csr` files. Alternatively skip the steps for worker nodes entirely. ### Signing CSRs for all certificates {{< note >}} If you are using external CA and already have CA serial number files (`.srl`) for `openssl`, you can copy such files to a kubeadm node where CSRs will be processed. The `.srl` files to copy are `/etc/kubernetes/pki/ca.srl`, `/etc/kubernetes/pki/front-proxy-ca.srl` and `/etc/kubernetes/pki/etcd/ca.srl`. The files can be then moved to a new node where CSR files will be processed. If a `.srl` file is missing for a CA on a node, the script below will generate a new SRL file with a random starting serial number. To read more about `.srl` files see the [`openssl`](https://www.openssl.org/docs/man3.0/man1/openssl-x509.html) documentation for the `--CAserial` flag. {{< /note >}} Repeat this step for all nodes that have CSR files. Write the following script in the `/etc/kubernetes` directory, navigate to the directory and execute the script. The script will generate certificates for all CSR files that are present in the `/etc/kubernetes` tree. ```bash #!/bin/bash # Set certificate expiration time in days DAYS=365 # Process all CSR files except those for front-proxy and etcd find ./ -name "\*.csr" | grep -v "pki/etcd" | grep -v "front-proxy" | while read -r FILE; do echo "\* Processing ${FILE} ..." FILE=${FILE%.\*} # Trim the extension if [ -f "./pki/ca.srl" ]; then SERIAL\_FLAG="-CAserial ./pki/ca.srl" else SERIAL\_FLAG="-CAcreateserial" fi openssl x509 -req -days "${DAYS}" -CA ./pki/ca.crt -CAkey ./pki/ca.key ${SERIAL\_FLAG} \ -in "${FILE}.csr" -out "${FILE}.crt" sleep 2 done # Process all etcd CSRs find ./pki/etcd -name "\*.csr" | while read -r FILE; do echo "\* Processing ${FILE} ..." FILE=${FILE%.\*} # Trim the extension if [ -f "./pki/etcd/ca.srl" ]; then SERIAL\_FLAG=-CAserial ./pki/etcd/ca.srl else SERIAL\_FLAG=-CAcreateserial fi openssl x509 -req -days "${DAYS}" -CA ./pki/etcd/ca.crt -CAkey ./pki/etcd/ca.key ${SERIAL\_FLAG} \ -in "${FILE}.csr" -out "${FILE}.crt" done # Process front-proxy CSRs echo "\* Processing ./pki/front-proxy-client.csr ..." openssl x509 -req -days "${DAYS}" -CA ./pki/front-proxy-ca.crt -CAkey ./pki/front-proxy-ca.key -CAcreateserial \ -in ./pki/front-proxy-client.csr -out ./pki/front-proxy-client.crt ``` ### Embedding certificates in kubeconfig files Repeat this step for all nodes that have CSR files. Write the following script in the `/etc/kubernetes` directory, navigate to the directory and execute the script. The script will take the `.crt` files that were signed for kubeconfig files from CSRs in the previous step and will embed them in the kubeconfig files. ```bash #!/bin/bash CLUSTER=kubernetes find ./ -name "\*.conf" | while read -r FILE; do echo "\* Processing ${FILE} ..." KUBECONFIG="${FILE}" kubectl config set-cluster "${CLUSTER}" --certificate-authority ./pki/ca.crt --embed-certs USER=$(KUBECONFIG="${FILE}" kubectl config view -o jsonpath='{.users[0].name}') KUBECONFIG="${FILE}" kubectl config set-credentials "${USER}" --client-certificate "${FILE}.crt" --embed-certs done ``` ### Performing cleanup {#post-csr-cleanup} Perform this step on all nodes that have CSR files. Write the following script in the `/etc/kubernetes` directory, navigate to the directory and execute the script. ```bash #!/bin/bash # Cleanup CSR files rm -f ./\*.csr ./pki/\*.csr ./pki/etcd/\*.csr # Clean all CSR files # Cleanup CRT files that were already embedded in kubeconfig files rm -f ./\*.crt ``` Optionally, move `.srl` files to
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
-0.04575666785240173,
0.028988415375351906,
0.000016046318705775775,
-0.0205337256193161,
0.0011282414197921753,
-0.014756663702428341,
-0.10238634049892426,
-0.04104888439178467,
0.02680046111345291,
-0.03205224871635437,
0.026209719479084015,
-0.10150035470724106,
0.04024377092719078,
-0.11369648575782776,
0.030577348545193672,
0.05749165639281273,
-0.0247795507311821,
-0.015984036028385162,
-0.00769002316519618,
-0.03918199613690376,
-0.04762044548988342,
0.020261745899915695,
-0.009786414913833141,
0.008724216371774673,
-0.05823453515768051,
-0.1024123802781105,
0.04711328446865082,
0.05654601380228996,
0.017723605036735535,
-0.06392228603363037,
0.05102663114666939,
0.04177480563521385,
-0.054439056664705276,
0.031051194295287132,
0.003933793865144253,
0.10217712074518204,
0.08599882572889328,
-0.024998540058732033,
-0.07531808316707611,
0.012426849454641342,
0.09118581563234329,
0.02073732204735279,
-0.08364424109458923,
-0.04289476200938225,
-0.0020038250368088484,
0.02777048759162426,
-0.08463044464588165,
-0.07644052803516388,
-0.0003467419883236289,
-0.05865491181612015,
0.0392681322991848,
-0.02971360832452774,
0.06685485690832138,
-0.021945610642433167,
0.06461913138628006,
0.01799469254910946,
0.025565151125192642,
-0.008708234876394272,
0.07455956935882568,
-0.0019442762713879347,
0.04709503799676895,
-0.00702343974262476,
0.01681927964091301,
-0.006606658920645714,
-0.04679252207279205,
0.0237191803753376,
0.06311891227960587,
0.07204795628786087,
-0.00808701105415821,
0.016657806932926178,
0.01777672953903675,
-0.023865889757871628,
-0.06621339917182922,
0.011072557419538498,
0.03686219081282616,
-0.018137728795409203,
-0.06297054141759872,
0.008927442133426666,
-0.032583292573690414,
-0.11167384684085846,
-0.020036859437823296,
0.044085998088121414,
0.03248968347907066,
-0.030802369117736816,
-0.12058430165052414,
0.007215084508061409,
0.00436381995677948,
0.011271909810602665,
0.019664691761136055,
0.03875201195478439,
0.021006479859352112,
-0.04789545759558678,
-0.011293811723589897,
-0.05185871943831444,
0.027097294107079506,
0.056673623621463776,
0.043102771043777466,
0.041557688266038895,
0.0887397900223732,
-0.07584752142429352,
0.017183054238557816,
-0.007301891688257456,
-0.0003400314599275589,
0.026792896911501884,
-0.0487506166100502,
-0.03788361698389053,
0.012855689972639084,
0.031137622892856598,
0.026921536773443222,
0.015158758498728275,
0.020835312083363533,
0.02015499770641327,
-0.039063647389411926,
0.009703143499791622,
0.01113119162619114,
0.02259884402155876,
0.028095506131649017,
-0.036583270877599716,
0.02684650383889675,
-0.009841843508183956,
-0.008280539885163307,
-0.07697247713804245,
-0.012764981016516685,
0.06320565193891525,
-0.04980294778943062,
-0.035959165543317795,
-0.0048279971815645695,
4.3090033969955206e-33,
0.10097967833280563,
-0.06441911309957504,
-0.0010332460515201092,
-0.002858505817130208,
0.04040387645363808,
-0.015207727439701557,
-0.0068444455973804,
-0.006821718532592058,
-0.04532751441001892,
-0.07288998365402222,
-0.010337354615330696,
-0.01923997700214386,
-0.06912197172641754,
-0.01984042301774025,
0.07203847169876099,
-0.09902896732091904,
-0.0014366346877068281,
-0.06010650843381882,
0.07063464820384979,
-0.034137073904275894,
0.054384082555770874,
-0.021374467760324478,
-0.08729157596826553,
0.06354662775993347,
0.0796588659286499,
0.07567932456731796,
0.06604141741991043,
-0.00174309394787997,
-0.06705319136381149,
-0.0408901683986187,
0.07593288272619247,
0.016159631311893463,
0.020998366177082062,
0.050876036286354065,
-0.09656938165426254,
0.05753263458609581,
-0.00591011019423604,
0.07334812730550766,
-0.10339642316102982,
-0.013958858326077461,
0.013185713440179825,
0.017204996198415756,
-0.0029002148658037186,
-0.020811274647712708,
0.0669793039560318,
-0.046958111226558685,
0.03379647061228752,
0.01766796037554741,
0.07541599124670029,
0.05357205867767334,
-0.06485496461391449,
0.06550029665231705,
0.0668034628033638,
-0.04379076510667801,
0.050803977996110916,
0.04761464521288872,
0.03113260306417942,
-0.11174173653125763,
-0.0703771710395813,
-0.02446708083152771,
0.007870465517044067,
0.045594435185194016,
-0.004519961308687925,
0.09839441627264023,
0.06955330818891525,
-0.02624133974313736,
0.02125627174973488,
-0.010107605718076229,
-0.017742270603775978,
-0.043912287801504135,
-0.0823429524898529,
0.012493257410824299,
0.02078413777053356,
0.0037850348744541407,
-0.019647996872663498,
-0.040197934955358505,
-0.0835568979382515,
0.004834888502955437,
-0.08212774991989136,
0.01031729020178318,
0.054057370871305466,
0.005057689733803272,
-0.05140601471066475,
0.006488220766186714,
0.051153164356946945,
-0.002606666414067149,
0.02126973867416382,
0.024645967409014702,
-0.00691043259575963,
0.03609837219119072,
0.07142432034015656,
0.007224301807582378,
0.026226123794913292,
0.0363340899348259,
-0.11940228939056396,
-5.281351385502593e-33,
0.0668361634016037,
-0.004937394987791777,
0.09465952962636948,
0.039456069469451904,
0.040828805416822433,
0.06489567458629608,
-0.021736448630690575,
0.07148728519678116,
0.0008116448298096657,
-0.06675341725349426,
-0.03375576436519623,
-0.04102163016796112,
0.10081490874290466,
-0.08201318979263306,
-0.06750945746898651,
0.05567328631877899,
-0.10294954478740692,
0.05860191211104393,
-0.058050282299518585,
-0.010727224871516228,
0.021677279844880104,
0.03645864501595497,
0.03662993013858795,
0.01824229583144188,
-0.01197296753525734,
0.04511614516377449,
-0.02280578576028347,
0.042900584638118744,
-0.09690223634243011,
0.01872992143034935,
0.05265721306204796,
-0.002511103404685855,
-0.015206042677164078,
0.01636914722621441,
-0.05216072127223015,
-0.12489492446184158,
-0.0010336034465581179,
0.06547872722148895,
-0.02313593588769436,
0.0054190317168831825,
-0.01602073386311531,
0.07606889307498932,
-0.11329197883605957,
-0.03205518051981926,
-0.036513060331344604,
0.06858382374048233,
0.044356703758239746,
-0.014597686007618904,
0.0003686574927996844,
-0.06666310876607895,
-0.06523410975933075,
-0.04665783792734146,
0.017315508797764778,
0.04114241898059845,
0.01844054087996483,
0.0471024364233017,
0.037972766906023026,
0.10245175659656525,
0.006263141054660082,
-0.07767079025506973,
0.06820525228977203,
-0.0869654044508934,
0.056034866720438004,
0.03706707805395126,
-0.05283229053020477,
-0.07593310624361038,
-0.002533925697207451,
0.050293222069740295,
0.014919372275471687,
0.020253673195838928,
-0.08503715693950653,
-0.0014523734571412206,
0.0009335235226899385,
-0.018453093245625496,
-0.009971470572054386,
0.007719303481280804,
-0.011601514182984829,
-0.05624990537762642,
-0.0021635645534843206,
0.08060971647500992,
-0.05748951435089111,
0.029071925207972527,
-0.07417967915534973,
0.016266081482172012,
0.04201600328087807,
0.027644162997603416,
0.06048628315329552,
-0.007753157522529364,
0.035864513367414474,
0.019994346424937248,
-0.040951576083898544,
0.005537909455597401,
0.05125386640429497,
0.11966238915920258,
-0.0006472993409261107,
-5.0824031205820575e-8,
0.03854852542281151,
-0.030668824911117554,
-0.11533265560865402,
-0.031072799116373062,
0.047870319336652756,
-0.08037535846233368,
0.07342991977930069,
0.018526500090956688,
-0.04650755971670151,
-0.010547716170549393,
0.0060508232563734055,
0.03326120600104332,
-0.07921663671731949,
0.024761591106653214,
0.04646538570523262,
-0.07180986553430557,
0.07109427452087402,
0.05874015763401985,
0.015087954699993134,
-0.052044324576854706,
-0.03782472759485245,
-0.05405869334936142,
-0.000304029876133427,
0.04699769988656044,
0.08555871993303299,
0.08454364538192749,
0.10326265543699265,
-0.0018706334521993995,
0.036404941231012344,
0.08639270812273026,
-0.07433085143566132,
-0.043807756155729294,
-0.07413595169782639,
-0.01453778613358736,
0.025243587791919708,
0.06933416426181793,
-0.10847724229097366,
0.04957349970936775,
0.09193923324346542,
0.08932898938655853,
-0.010502073913812637,
-0.011995252221822739,
-0.07203356176614761,
0.042910002171993256,
0.02175614982843399,
-0.05845584347844124,
-0.07240181416273117,
0.021178551018238068,
-0.026299530640244484,
-0.05685429647564888,
-0.013720211572945118,
-0.06790035963058472,
0.03553442284464836,
-0.0019532316364347935,
-0.00934632308781147,
0.11844716966152191,
-0.04883643239736557,
0.0253586508333683,
0.003645512508228421,
0.005599966738373041,
-0.009337247349321842,
-0.02324695512652397,
-0.04065532982349396,
-0.04498127102851868
] | 0.04737
|
following script in the `/etc/kubernetes` directory, navigate to the directory and execute the script. ```bash #!/bin/bash # Cleanup CSR files rm -f ./\*.csr ./pki/\*.csr ./pki/etcd/\*.csr # Clean all CSR files # Cleanup CRT files that were already embedded in kubeconfig files rm -f ./\*.crt ``` Optionally, move `.srl` files to the next node to be processed. Optionally, if using external CA remove the `/etc/kubernetes/pki/ca.key` file, as explained in the [External CA node](#external-ca-mode) section. ### kubeadm node initialization Once CSR files have been signed and required certificates are in place on the hosts you want to use as nodes, you can use the commands `kubeadm init` and `kubeadm join` to create a Kubernetes cluster from these nodes. During `init` and `join`, kubeadm uses existing certificates, encryption keys and kubeconfig files that it finds in the `/etc/kubernetes` tree on the host's local filesystem.
| null |
./vendor/kubernetes/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
|
[
-0.012107017450034618,
0.03568530082702637,
0.017166564241051674,
0.013709512539207935,
0.026610272005200386,
-0.036831822246313095,
-0.031058572232723236,
-0.04256962612271309,
0.08770085126161575,
0.0143421096727252,
0.023794611915946007,
-0.08977795392274857,
0.0788947269320488,
0.005062233190983534,
0.01348021999001503,
0.0027016436215490103,
-0.07464510947465897,
0.06555367261171341,
0.022067762911319733,
-0.06280773133039474,
-0.041221559047698975,
0.006914343684911728,
-0.007037712261080742,
0.0022901082411408424,
-0.07019887864589691,
-0.07864630222320557,
0.007981660775840282,
0.028332781046628952,
-0.008195540867745876,
-0.030902042984962463,
0.027487799525260925,
0.041146453469991684,
0.03097238764166832,
-0.01142536848783493,
-0.002259280066937208,
0.17680002748966217,
0.05706453695893288,
0.049585212022066116,
-0.0586443655192852,
-0.013062710873782635,
0.12687954306602478,
0.0017361586214974523,
-0.051499225199222565,
-0.05770760402083397,
0.0005631617386825383,
0.026032092049717903,
-0.06769151240587234,
-0.09444576501846313,
-0.024362575262784958,
-0.025555768981575966,
0.04227884113788605,
-0.02771328203380108,
-0.015009219758212566,
0.007509912364184856,
0.03281310200691223,
0.03250398114323616,
-0.026326069608330727,
0.05502713844180107,
0.10278645902872086,
-0.015378668904304504,
0.07661173492670059,
0.010579069145023823,
0.03720385208725929,
-0.03520972281694412,
-0.05533311888575554,
0.05097023397684097,
0.06611934304237366,
0.02918754518032074,
0.0131134744733572,
0.045666858553886414,
0.0911153107881546,
0.029841385781764984,
-0.04437267407774925,
-0.028687207028269768,
-0.014358817599713802,
0.010373095981776714,
-0.0954560860991478,
0.009837234392762184,
-0.06266855448484421,
-0.04625841602683067,
0.009880349040031433,
-0.006117328070104122,
0.015872009098529816,
-0.049894146621227264,
-0.1170845553278923,
0.04211292415857315,
0.010126124136149883,
-0.08073750883340836,
0.03928017243742943,
0.02865475043654442,
0.016006825491786003,
-0.03795751929283142,
-0.022006092593073845,
-0.13150404393672943,
0.05967568978667259,
0.010665339417755604,
0.020751316100358963,
-0.014169109053909779,
0.10830909013748169,
-0.026345403864979744,
0.02961868606507778,
0.03365156799554825,
-0.03279295563697815,
-0.055331967771053314,
-0.03926027938723564,
0.045069895684719086,
-0.04944093897938728,
0.007767221424728632,
0.023583516478538513,
0.043914444744586945,
0.001888951170258224,
0.042235590517520905,
-0.0474356934428215,
-0.022138863801956177,
-0.011319534853100777,
0.10628800839185715,
0.05426255986094475,
0.009664777666330338,
0.07190746068954468,
0.06023117154836655,
-0.046715475618839264,
-0.08319783955812454,
-0.03960888832807541,
0.02541440725326538,
-0.05604514852166176,
-0.005187453702092171,
-0.03329507261514664,
3.5705350706059124e-33,
0.021106133237481117,
-0.008029760792851448,
0.009603284299373627,
-0.02345980890095234,
0.0677313357591629,
-0.04818082973361015,
0.050941385328769684,
0.008501535281538963,
-0.056235767900943756,
-0.06360979378223419,
-0.01198926754295826,
0.04921881482005119,
-0.045017194002866745,
-0.08257246017456055,
0.020737139508128166,
-0.045238569378852844,
-0.04107601195573807,
-0.05856159329414368,
0.061569105833768845,
-0.03880574181675911,
0.058792103081941605,
-0.016478756442666054,
-0.028302950784564018,
0.03146766126155853,
0.03975939378142357,
-0.0191040076315403,
0.06696980446577072,
0.00829596258699894,
-0.022754475474357605,
-0.05926129221916199,
0.04998457059264183,
0.019692784175276756,
0.030535772442817688,
0.05081610754132271,
-0.05963095650076866,
0.01246078871190548,
0.050584036856889725,
0.06536854803562164,
-0.07497336715459824,
-0.019270509481430054,
0.05874084308743477,
-0.0007347831851802766,
-0.018281208351254463,
0.00949095655232668,
0.07697147130966187,
-0.015017622150480747,
0.026114681735634804,
-0.02672751620411873,
0.12146422266960144,
0.042861003428697586,
-0.00755280489102006,
-0.0009743470000103116,
0.02771162800490856,
-0.12116363644599915,
0.010564960539340973,
0.010271819308400154,
0.02701173536479473,
-0.090496726334095,
-0.09615017473697662,
-0.0442935973405838,
-0.030461059883236885,
-0.04003240540623665,
-0.04002201929688454,
0.03741277754306793,
0.04176868125796318,
-0.009191516786813736,
0.01189391128718853,
0.05340438336133957,
-0.059888213872909546,
-0.0717887133359909,
-0.05782303214073181,
0.06411375105381012,
-0.026493756100535393,
-0.028666142374277115,
-0.027499008923768997,
-0.029596375301480293,
-0.02980487048625946,
0.030033467337489128,
-0.0700824111700058,
0.043938979506492615,
0.04605317488312721,
0.01833672821521759,
-0.05545751377940178,
0.05104298144578934,
0.0614139623939991,
0.012150833383202553,
0.023642653599381447,
0.00002782532465062104,
0.03495650365948677,
0.02915354259312153,
0.0702625960111618,
0.003921020310372114,
0.051371630281209946,
0.04375700280070305,
-0.1083856150507927,
-4.352824357026237e-33,
0.09046148508787155,
0.01268150843679905,
0.07378768920898438,
0.04210589826107025,
0.04231889545917511,
0.0037871997337788343,
-0.043147504329681396,
0.08540093153715134,
-0.01639510504901409,
-0.06279917806386948,
-0.03181835636496544,
-0.08756477385759354,
0.11081524193286896,
-0.03648537024855614,
-0.05375664308667183,
0.03593951091170311,
-0.035890258848667145,
0.07724164426326752,
-0.07360982149839401,
0.02510015480220318,
0.034637268632650375,
0.046049922704696655,
0.059484709054231644,
0.05987732112407684,
0.00642307149246335,
0.02860107831656933,
-0.015103338286280632,
0.07248834520578384,
-0.08990314602851868,
0.03483709320425987,
-0.01587793044745922,
-0.04707808047533035,
0.006969334091991186,
0.03893231973052025,
-0.058707114309072495,
-0.09364751726388931,
-0.013901549391448498,
0.04629424959421158,
0.01442189421504736,
0.0009229481220245361,
0.009346081875264645,
-0.01979139819741249,
-0.1502358615398407,
-0.014965537004172802,
-0.016816798597574234,
0.005967209581285715,
0.06692305207252502,
-0.012894063256680965,
-0.037292178720235825,
-0.056677959859371185,
-0.05208779498934746,
-0.009114617481827736,
-0.09279632568359375,
-0.005110805854201317,
-0.0014324584044516087,
0.0743250921368599,
-0.004748690873384476,
0.15653467178344727,
-0.020058155059814453,
-0.030544808134436607,
0.044854629784822464,
-0.09883196651935577,
0.019077423959970474,
0.06823007017374039,
0.012224983423948288,
-0.013376038521528244,
-0.01095658540725708,
0.02510141022503376,
-0.035027552396059036,
0.011702589690685272,
-0.06280364096164703,
0.0016818520380184054,
-0.03545500710606575,
0.0033905510790646076,
0.015433797612786293,
-0.05964828282594681,
0.02920922450721264,
-0.02424544468522072,
0.004586327355355024,
0.03902225196361542,
0.008001012727618217,
0.0545785054564476,
-0.054901767522096634,
-0.03386456519365311,
0.03144010156393051,
0.024350378662347794,
0.047440581023693085,
0.015315811149775982,
0.010395938530564308,
0.07155360281467438,
-0.024615155532956123,
0.028724471107125282,
0.10414332151412964,
0.08379510790109634,
0.018628299236297607,
-4.875094816725323e-8,
0.060071911662817,
-0.001836592797189951,
-0.1340741664171219,
0.02575724385678768,
0.029164336621761322,
-0.03846738114953041,
0.03217149153351784,
0.03962940722703934,
-0.06550704687833786,
-0.033374518156051636,
-0.06478434801101685,
0.013894667848944664,
-0.07038979232311249,
0.005347448401153088,
-0.0019741258583962917,
-0.04756266623735428,
-0.005468497984111309,
0.025088367983698845,
0.026353713124990463,
-0.07744843512773514,
-0.04426571726799011,
-0.07087859511375427,
-0.003066878765821457,
0.10477747023105621,
0.019703546538949013,
0.051150184124708176,
0.10840117931365967,
-0.01045210100710392,
0.05521753802895546,
0.02342468686401844,
-0.12678223848342896,
-0.08823704719543457,
-0.05739959329366684,
0.010093828663229942,
0.02470390684902668,
0.05190766602754593,
-0.08090882003307343,
0.040193699300289154,
-0.0010936976177617908,
0.07332886010408401,
-0.02816607616841793,
0.032766569405794144,
-0.09403181821107864,
0.02235376089811325,
-0.04291216656565666,
0.0005046405713073909,
-0.04918583855032921,
0.05287317931652069,
0.006919785402715206,
-0.0014435938792303205,
0.04854269698262215,
-0.05944344401359558,
-0.01555674523115158,
-0.027423754334449768,
-0.13025256991386414,
0.06746097654104233,
-0.024319889023900032,
0.025633452460169792,
-0.031457170844078064,
-0.027332330122590065,
-0.0032950632739812136,
-0.029856426641345024,
0.04902216047048569,
-0.07859934866428375
] | 0.035402
|
This page shows how to create an external load balancer. When creating a {{< glossary\_tooltip text="Service" term\_id="service" >}}, you have the option of automatically creating a cloud load balancer. This provides an externally-accessible IP address that sends traffic to the correct port on your cluster nodes, \_provided your cluster runs in a supported environment and is configured with the correct cloud load balancer provider package\_. You can also use an {{< glossary\_tooltip term\_id="ingress" >}} in place of Service. For more information, check the [Ingress](/docs/concepts/services-networking/ingress/) documentation. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} Your cluster must be running in a cloud or other environment that already has support for configuring external load balancers. ## Create a Service ### Create a Service from a manifest To create an external load balancer, add the following line to your Service manifest: ```yaml type: LoadBalancer ``` Your manifest might then look like: ```yaml apiVersion: v1 kind: Service metadata: name: example-service spec: selector: app: example ports: - port: 8765 targetPort: 9376 type: LoadBalancer ``` ### Create a Service using kubectl You can alternatively create the service with the `kubectl expose` command and its `--type=LoadBalancer` flag: ```bash kubectl expose deployment example --port=8765 --target-port=9376 \ --name=example-service --type=LoadBalancer ``` This command creates a new Service using the same selectors as the referenced resource (in the case of the example above, a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} named `example`). For more information, including optional flags, refer to the [`kubectl expose` reference](/docs/reference/generated/kubectl/kubectl-commands/#expose). ## Finding your IP address You can find the IP address created for your service by getting the service information through `kubectl`: ```bash kubectl describe services example-service ``` which should produce output similar to: ``` Name: example-service Namespace: default Labels: app=example Annotations: Selector: app=example Type: LoadBalancer IP Families: IP: 10.3.22.96 IPs: 10.3.22.96 LoadBalancer Ingress: 192.0.2.89 Port: 8765/TCP TargetPort: 9376/TCP NodePort: 30593/TCP Endpoints: 172.17.0.3:9376 Session Affinity: None External Traffic Policy: Cluster Events: ``` The load balancer's IP address is listed next to `LoadBalancer Ingress`. {{< note >}} If you are running your service on Minikube, you can find the assigned IP address and port with: ```bash minikube service example-service --url ``` {{< /note >}} ## Preserving the client source IP By default, the source IP seen in the target container is \*not the original source IP\* of the client. To enable preservation of the client IP, the following fields can be configured in the `.spec` of the Service: \* `.spec.externalTrafficPolicy` - denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. There are two available options: `Cluster` (default) and `Local`. `Cluster` obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. `Local` preserves the client source IP and avoids a second hop for LoadBalancer and NodePort type Services, but risks potentially imbalanced traffic spreading. \* `.spec.healthCheckNodePort` - specifies the health check node port (numeric port number) for the service. If you don't specify `healthCheckNodePort`, the service controller allocates a port from your cluster's NodePort range. You can configure that range by setting an API server command line option, `--service-node-port-range`. The Service will use the user-specified `healthCheckNodePort` value if you specify it, provided that the Service `type` is set to LoadBalancer and `externalTrafficPolicy` is set to `Local`. Setting `externalTrafficPolicy` to Local in the Service manifest activates this feature. For example: ```yaml apiVersion: v1 kind: Service metadata: name: example-service spec: selector: app: example ports: - port: 8765 targetPort: 9376 externalTrafficPolicy: Local type: LoadBalancer ``` ### Caveats and limitations when preserving source IPs Load balancing services from some cloud providers do not let you configure different weights
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md
|
[
-0.0852314904332161,
-0.06042586266994476,
-0.0021438212133944035,
-0.012045674957334995,
-0.06957646459341049,
-0.017205961048603058,
0.05727032572031021,
-0.017024071887135506,
0.03645166754722595,
0.08608537912368774,
-0.034666240215301514,
-0.061603762209415436,
0.03103782795369625,
-0.02680290676653385,
0.05306590348482132,
0.02986745908856392,
0.046715568751096725,
-0.09539628773927689,
-0.004691398702561855,
-0.053725555539131165,
-0.018979137763381004,
0.029207490384578705,
-0.037377793341875076,
0.038330718874931335,
-0.04079856351017952,
-0.044614143669605255,
-0.02924526110291481,
0.020075146108865738,
0.044113341718912125,
0.007701580412685871,
-0.02427535690367222,
0.003183358581736684,
-0.03572710603475571,
0.023653818294405937,
0.021475166082382202,
0.07145470380783081,
-0.003177730366587639,
0.015711484476923943,
-0.08440667390823364,
-0.03588730841875076,
0.07403801381587982,
-0.005401382222771645,
-0.044181518256664276,
-0.0360022597014904,
-0.01120742131024599,
0.03466126695275307,
-0.06823448091745377,
0.05348614230751991,
-0.003773725824430585,
0.010508229956030846,
0.024116162210702896,
-0.07604733109474182,
0.013196404092013836,
0.06979798525571823,
-0.04970800504088402,
0.030300896614789963,
0.05555452033877373,
-0.015797998756170273,
-0.01570711098611355,
0.008176775649189949,
0.0234830304980278,
-0.038565367460250854,
0.04115315154194832,
-0.047438234090805054,
-0.03492814674973488,
0.013741817325353622,
0.05736290663480759,
0.08912194520235062,
-0.07019804418087006,
-0.02034534513950348,
0.046985186636447906,
-0.023112453520298004,
-0.055140990763902664,
-0.023916881531476974,
0.01980460248887539,
0.07002272456884384,
-0.026444654911756516,
0.012076354585587978,
0.022288773208856583,
-0.04219602793455124,
0.023183852434158325,
0.09558552503585815,
0.08489437401294708,
0.08386729657649994,
-0.056885864585638046,
-0.06750140339136124,
0.006495888344943523,
-0.06399360299110413,
0.06302206963300705,
-0.035634852945804596,
-0.03281872346997261,
-0.024949027225375175,
-0.03335743397474289,
-0.08035017549991608,
0.0634993463754654,
0.04902161285281181,
-0.06362446397542953,
-0.04602477699518204,
0.009095318615436554,
-0.03269881755113602,
0.0703440010547638,
-0.00237319921143353,
0.01333449874073267,
0.05112435668706894,
-0.06064320728182793,
-0.021631956100463867,
-0.030724577605724335,
0.021973371505737305,
0.08777570724487305,
0.04962256923317909,
0.0035996113438159227,
0.04222416132688522,
0.0499563105404377,
-0.012245606631040573,
-0.056331146508455276,
-0.02017280086874962,
0.0699254646897316,
-0.03888921067118645,
0.004404429811984301,
0.027663612738251686,
-0.008577545173466206,
-0.031658463180065155,
-0.06445885449647903,
-0.02011791057884693,
0.01924440637230873,
0.030046790838241577,
-0.0219779834151268,
3.71270890828596e-33,
-0.0010067300172522664,
-0.07813810557126999,
0.051653727889060974,
-0.025999195873737335,
-0.009652962908148766,
-0.01087065041065216,
-0.07160721719264984,
0.0029661369044333696,
-0.056967224925756454,
-0.020072123035788536,
-0.02928861789405346,
0.1048075333237648,
0.05704408511519432,
-0.008404492400586605,
0.00025678062229417264,
-0.03363770619034767,
0.00039006388396956027,
0.08892113715410233,
0.1560325026512146,
-0.02127736806869507,
0.006845808122307062,
-0.12132109701633453,
-0.06236962229013443,
-0.09177416563034058,
0.023155733942985535,
0.059616733342409134,
0.03356224671006203,
-0.04039447009563446,
0.050301507115364075,
-0.013142304494976997,
0.08547654747962952,
-0.018950991332530975,
0.0018744757398962975,
-0.0078931525349617,
-0.10772602260112762,
-0.039512764662504196,
-0.015320582315325737,
0.03323565423488617,
-0.044338591396808624,
-0.0027629807591438293,
0.07629800587892532,
0.0392841175198555,
-0.00016757955017965287,
-0.03723180294036865,
-0.00003889956497005187,
0.023139726370573044,
0.05530053377151489,
-0.07544971257448196,
0.10931860655546188,
-0.00041872027213685215,
0.017299586907029152,
-0.08687977492809296,
-0.04507977142930031,
0.015112076885998249,
0.057515889406204224,
0.09889686852693558,
-0.028141522780060768,
-0.029165389016270638,
-0.0196099691092968,
-0.036757808178663254,
-0.05784391984343529,
-0.04421987012028694,
-0.05997692793607712,
0.02768035978078842,
0.05136079713702202,
-0.04081656038761139,
0.013715196400880814,
0.07012829929590225,
-0.003838014556095004,
0.023950841277837753,
-0.0478704534471035,
-0.02129768207669258,
0.03659171611070633,
0.09225764870643616,
-0.012768369168043137,
-0.030467743054032326,
-0.04720674082636833,
-0.0077051520347595215,
-0.12503401935100555,
0.02513214945793152,
-0.03927886113524437,
-0.061842989176511765,
-0.03306543081998825,
0.09450825303792953,
0.034647099673748016,
-0.06236047297716141,
0.030571285635232925,
-0.04833294451236725,
-0.0025681285187602043,
0.028297752141952515,
-0.019554531201720238,
-0.04980812966823578,
-0.06108119711279869,
0.05553625151515007,
-0.1204742044210434,
-5.544161065619747e-33,
0.03912530466914177,
-0.024869559332728386,
-0.05926772207021713,
0.001054252963513136,
0.044750574976205826,
0.026168910786509514,
0.10602748394012451,
0.07005277276039124,
0.023137666285037994,
0.04188365116715431,
-0.0252746120095253,
0.047641571611166,
0.021214965730905533,
0.08424614369869232,
-0.047298990190029144,
-0.03441622108221054,
-0.04828229546546936,
0.039965782314538956,
-0.03766999393701553,
0.05835570767521858,
-0.035108234733343124,
-0.077702097594738,
0.05872723087668419,
-0.03000834584236145,
-0.0011791886063292623,
0.010379081591963768,
0.03951340168714523,
-0.025479622185230255,
-0.07412021607160568,
-0.0005218376754783094,
-0.04144833981990814,
-0.0017871134914457798,
-0.0008809979190118611,
-0.023875292390584946,
-0.009332683868706226,
-0.037811510264873505,
0.02655995823442936,
-0.03092566691339016,
-0.03061646968126297,
0.019759654998779297,
0.0526525117456913,
0.018294846639037132,
-0.0830640122294426,
-0.07277848571538925,
-0.024367179721593857,
-0.012488411739468575,
0.003722319845110178,
-0.03523247316479683,
-0.10030624270439148,
0.007147223688662052,
-0.030500439926981926,
-0.04238292947411537,
-0.060715172439813614,
0.10591365396976471,
-0.04625348746776581,
0.02236562967300415,
0.06370677798986435,
0.026827244088053703,
-0.09209328889846802,
0.021924708038568497,
0.08335167169570923,
-0.07276181876659393,
-0.015610488131642342,
-0.030009876936674118,
0.04138785973191261,
-0.03368754684925079,
-0.005914737470448017,
-0.0067518590949475765,
0.016220370307564735,
-0.028149379417300224,
-0.12948819994926453,
0.030855298042297363,
0.09577755630016327,
0.05625677481293678,
0.05955144390463829,
0.01794339157640934,
0.07327894121408463,
-0.12341117858886719,
0.020449796691536903,
-0.0952877402305603,
-0.0328998789191246,
0.034301597625017166,
-0.05773766338825226,
-0.022659335285425186,
0.02387317456305027,
0.002547657350078225,
0.044659972190856934,
0.12349593639373779,
0.03229215741157532,
0.07641655206680298,
-0.07317256927490234,
-0.04189332574605942,
0.0005967539618723094,
0.10830771178007126,
-0.05474850535392761,
-5.3285013734694076e-8,
-0.01683301106095314,
0.12174702435731888,
0.006312946788966656,
0.06252839416265488,
-0.11182607710361481,
-0.0016745751490816474,
0.031191227957606316,
-0.0033171451650559902,
0.015738943591713905,
0.04280759394168854,
-0.011144517920911312,
0.048470206558704376,
-0.031385187059640884,
0.040258072316646576,
0.014894460327923298,
0.02551393210887909,
0.0016583275282755494,
-0.06098512187600136,
-0.014682356268167496,
-0.1160866916179657,
-0.046919580549001694,
0.021643606945872307,
-0.0020764495711773634,
0.04720168560743332,
-0.02481699176132679,
-0.0005592287052422762,
-0.002725319704040885,
-0.04524843022227287,
-0.010168807581067085,
-0.013544376008212566,
-0.04217899218201637,
0.015414750203490257,
-0.058703966438770294,
0.012995989061892033,
-0.036870863288640976,
0.0429181344807148,
-0.10070402920246124,
0.03548210486769676,
0.08070368319749832,
0.08779513835906982,
0.03028515726327896,
0.07138767838478088,
-0.08032863587141037,
-0.057753000408411026,
0.10876122117042542,
0.06081881746649742,
-0.09244466572999954,
0.06962896883487701,
0.036292605102062225,
0.06128730997443199,
-0.05207236483693123,
-0.03885117545723915,
0.05079331994056702,
0.06624495983123779,
0.06163956597447395,
-0.02587125636637211,
-0.05175302177667618,
-0.04486673325300217,
0.0318186916410923,
0.06438203901052475,
0.027530822902917862,
0.030578594654798508,
0.009664714336395264,
-0.010074570775032043
] | 0.170655
|
activates this feature. For example: ```yaml apiVersion: v1 kind: Service metadata: name: example-service spec: selector: app: example ports: - port: 8765 targetPort: 9376 externalTrafficPolicy: Local type: LoadBalancer ``` ### Caveats and limitations when preserving source IPs Load balancing services from some cloud providers do not let you configure different weights for each target. With each target weighted equally in terms of sending traffic to Nodes, external traffic is not equally load balanced across different Pods. The external load balancer is unaware of the number of Pods on each node that are used as a target. Where `NumServicePods << NumNodes` or `NumServicePods >> NumNodes`, a fairly close-to-equal distribution will be seen, even without weights. Internal pod to pod traffic should behave similar to ClusterIP services, with equal probability across all pods. ## Garbage collecting load balancers {{< feature-state for\_k8s\_version="v1.17" state="stable" >}} In usual case, the correlating load balancer resources in cloud provider should be cleaned up soon after a LoadBalancer type Service is deleted. But it is known that there are various corner cases where cloud resources are orphaned after the associated Service is deleted. Finalizer Protection for Service LoadBalancers was introduced to prevent this from happening. By using finalizers, a Service resource will never be deleted until the correlating load balancer resources are also deleted. Specifically, if a Service has `type` LoadBalancer, the service controller will attach a finalizer named `service.kubernetes.io/load-balancer-cleanup`. The finalizer will only be removed after the load balancer resource is cleaned up. This prevents dangling load balancer resources even in corner cases such as the service controller crashing. ## External load balancer providers It is important to note that the datapath for this functionality is provided by a load balancer external to the Kubernetes cluster. When the Service `type` is set to LoadBalancer, Kubernetes provides functionality equivalent to `type` equals ClusterIP to pods within the cluster and extends it by programming the (external to Kubernetes) load balancer with entries for the nodes hosting the relevant Kubernetes pods. The Kubernetes control plane automates the creation of the external load balancer, health checks (if needed), and packet filtering rules (if needed). Once the cloud provider allocates an IP address for the load balancer, the control plane looks up that external IP address and populates it into the Service object. ## {{% heading "whatsnext" %}} \* Follow the [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/) tutorial \* Read about [Service](/docs/concepts/services-networking/service/) \* Read about [Ingress](/docs/concepts/services-networking/ingress/)
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md
|
[
-0.020428035408258438,
-0.029899239540100098,
0.023836607113480568,
0.009307853877544403,
0.01257465872913599,
-0.08100450038909912,
0.015321719460189342,
-0.00710378447547555,
0.0702524483203888,
0.043036144226789474,
-0.03984316438436508,
-0.0532214492559433,
0.014224505051970482,
-0.028294673189520836,
0.07832534611225128,
0.028503557667136192,
0.1077873632311821,
-0.006433760281652212,
-0.01425595860928297,
0.01386498473584652,
0.011162851005792618,
0.004421333782374859,
-0.03409158065915108,
0.032411813735961914,
-0.05211709067225456,
-0.01680275797843933,
-0.06297427415847778,
-0.02608484961092472,
0.05644090473651886,
-0.07894814014434814,
-0.04237766191363335,
0.04487641155719757,
0.003416704712435603,
0.03254549205303192,
-0.0075731538236141205,
0.027343040332198143,
-0.01996077224612236,
-0.08384501188993454,
-0.06295060366392136,
0.020190991461277008,
0.021822014823555946,
-0.03976426273584366,
-0.04458783194422722,
-0.008606106042861938,
-0.05410723388195038,
0.020197253674268723,
-0.08331795036792755,
0.03148483857512474,
-0.013371115550398827,
-0.01115276850759983,
0.07713726907968521,
-0.09501425921916962,
0.03160005062818527,
0.116799496114254,
0.03467468172311783,
-0.04650532081723213,
0.050320159643888474,
-0.003198102815076709,
0.04243507981300354,
0.04118994623422623,
0.031063778325915337,
-0.04905484989285469,
0.056192316114902496,
-0.01575300842523575,
0.06227622181177139,
-0.025090500712394714,
0.05043819174170494,
0.04060125723481178,
-0.008708000183105469,
-0.019923392683267593,
0.11968480795621872,
-0.02331957034766674,
-0.03151495382189751,
-0.008453989401459694,
0.015506020747125149,
0.09072282910346985,
0.010973695665597916,
-0.009018146432936192,
-0.003611239604651928,
-0.021375752985477448,
-0.028483295813202858,
0.04437926411628723,
0.03913888707756996,
-0.008683053776621819,
-0.004367407411336899,
-0.05525944381952286,
-0.05175609886646271,
-0.09133348613977432,
0.01850125752389431,
0.07377613335847855,
-0.022850576788187027,
0.06724296510219574,
0.002864875365048647,
-0.06416253000497818,
0.023449501022696495,
0.029107535257935524,
-0.05413418635725975,
-0.022890329360961914,
-0.023028874769806862,
0.012525694444775581,
0.04128485545516014,
0.03589161857962608,
0.06029732897877693,
0.03782154619693756,
0.034307338297367096,
-0.043414074927568436,
-0.016893252730369568,
-0.029476670548319817,
0.031341567635536194,
0.07271287590265274,
0.02770981565117836,
-0.010553350672125816,
0.0318702757358551,
0.016580140218138695,
-0.0542631670832634,
0.05015666410326958,
0.06381969153881073,
-0.008910772390663624,
-0.04182438924908638,
0.02628980576992035,
-0.04595030099153519,
-0.060122109949588776,
-0.03876287490129471,
0.010535057634115219,
0.02576027810573578,
0.07099559158086777,
-0.03369903564453125,
7.828784294952773e-33,
-0.013104400597512722,
-0.12623076140880585,
-0.014203702099621296,
-0.08659740537405014,
0.011833696626126766,
-0.05896695703268051,
-0.03385636582970619,
0.04867840185761452,
-0.027668260037899017,
-0.032678838819265366,
-0.06499621272087097,
0.11116041988134384,
0.02943277359008789,
-0.009476721286773682,
0.030353259295225143,
-0.06355699896812439,
-0.06701507419347763,
0.06327681988477707,
0.12438084185123444,
-0.014853057451546192,
0.014774723909795284,
-0.1013469323515892,
-0.0730431079864502,
-0.02694869041442871,
0.009122866205871105,
0.016597364097833633,
-0.009399631060659885,
-0.09898469597101212,
-0.005931233987212181,
0.024081038311123848,
0.026080824434757233,
0.015537523664534092,
0.01167916040867567,
-0.005175757687538862,
-0.09561362862586975,
-0.06728378683328629,
-0.03529338166117668,
0.034750889986753464,
-0.07959046959877014,
-0.015686117112636566,
0.02618364617228508,
0.03236972913146019,
-0.024627162143588066,
-0.05029360577464104,
0.00412816321477294,
-0.03849519044160843,
0.00880835484713316,
-0.050081767141819,
0.015551264397799969,
0.03376885876059532,
0.014891671016812325,
-0.03735225647687912,
-0.01573736034333706,
-0.02466203272342682,
0.0774436965584755,
0.0003070379898417741,
0.01712607592344284,
0.03536137565970421,
-0.033175550401210785,
0.03249914571642876,
-0.01931726559996605,
-0.04060957953333855,
-0.008441921323537827,
-0.00779701629653573,
0.1063019260764122,
0.08491072803735733,
-0.014246108941733837,
0.02604285255074501,
-0.006052984390407801,
0.08146751672029495,
-0.012629800476133823,
0.07604323327541351,
-0.006790237035602331,
0.05757014453411102,
-0.02065313793718815,
-0.09166479110717773,
0.027664994820952415,
0.023974474519491196,
-0.07756225019693375,
0.06063089892268181,
-0.027602482587099075,
0.08873819559812546,
-0.003312313463538885,
0.047561414539813995,
-0.0521232932806015,
-0.03294611722230911,
0.053156767040491104,
-0.07587725669145584,
-0.05920045077800751,
0.06436724960803986,
0.041505247354507446,
-0.030933070927858353,
-0.07216247171163559,
-0.012988496571779251,
-0.1351025551557541,
-7.403363338498587e-33,
-0.02920137345790863,
0.05136484280228615,
-0.05467235669493675,
0.04229104891419411,
0.01150172483175993,
-0.015609774738550186,
-0.009796634316444397,
0.0674377977848053,
0.012005213648080826,
0.025466714054346085,
-0.029026223346590996,
-0.016127176582813263,
-0.01974392868578434,
0.06657297909259796,
-0.028154002502560616,
-0.0162481889128685,
-0.10730612277984619,
-0.007082383148372173,
-0.045575257390737534,
0.011130541563034058,
-0.01878214441239834,
-0.01380881667137146,
0.07429198920726776,
0.0750434473156929,
0.0053037903271615505,
-0.05306794494390488,
-0.0381721593439579,
-0.020354337990283966,
-0.018787967041134834,
-0.04057835415005684,
0.0011245154310017824,
-0.05625029280781746,
-0.0119552006945014,
-0.013687328435480595,
-0.010086694732308388,
-0.03087444417178631,
-0.04748716950416565,
0.12942451238632202,
0.0516248419880867,
0.02200753055512905,
-0.006456975359469652,
-0.004127998370677233,
-0.0968702957034111,
-0.04350574314594269,
-0.10105212032794952,
-0.047171030193567276,
0.0032620576675981283,
-0.008303364738821983,
-0.03934144228696823,
-0.08846306055784225,
0.009255875833332539,
0.007553872652351856,
-0.12071841210126877,
0.19166065752506256,
-0.03216917812824249,
0.037351448088884354,
0.04280148446559906,
0.1077854335308075,
-0.03576943278312683,
0.011080781929194927,
0.061464279890060425,
-0.05828648805618286,
-0.0330219604074955,
-0.0594845712184906,
0.034326035529375076,
-0.026371126994490623,
0.04312881454825401,
-0.010334894992411137,
-0.008090488612651825,
0.06230229139328003,
-0.02782142348587513,
0.011830942705273628,
0.07265456765890121,
0.021628141403198242,
-0.007530799601227045,
-0.049685243517160416,
0.061094529926776886,
-0.10800988972187042,
0.0319773405790329,
-0.0444258414208889,
-0.10897509753704071,
0.06813620775938034,
-0.0020141780842095613,
0.014382007531821728,
0.020047781988978386,
0.06852834671735764,
0.07165024429559708,
0.07759774476289749,
0.028664205223321915,
0.11510738730430603,
0.0031652420293539762,
-0.006025318987667561,
-0.05802837759256363,
0.07819529622793198,
-0.03477713465690613,
-4.988405066796986e-8,
0.04979660362005234,
-0.005166084971278906,
-0.014303323812782764,
0.10929451882839203,
-0.004223821684718132,
-0.006128614768385887,
0.03649437427520752,
0.03194252774119377,
-0.06563819199800491,
0.07547600567340851,
0.017743021249771118,
0.064877450466156,
-0.06247783824801445,
0.014658840373158455,
0.10769718140363693,
-0.009914032183587551,
0.013759062625467777,
0.020182467997074127,
-0.05098927021026611,
-0.11286122351884842,
-0.09523004293441772,
-0.0288036298006773,
-0.033202044665813446,
0.004966536536812782,
-0.014501138590276241,
0.045348502695560455,
0.013980697840452194,
-0.029935572296380997,
0.0630977526307106,
-0.04978758841753006,
-0.04647726193070412,
0.018388399854302406,
-0.08964371681213379,
-0.06408598273992538,
-0.007481027860194445,
0.08065179735422134,
-0.11994609236717224,
0.024384092539548874,
0.017130214720964432,
0.1108369454741478,
-0.018774116411805153,
-0.013027575798332691,
-0.034592125564813614,
0.0031777562107890844,
0.06243124231696129,
0.06252171844244003,
-0.07939387857913971,
0.08242212980985641,
0.006553604267537594,
0.026693392544984818,
0.00039300613570958376,
-0.07020764797925949,
0.027219420298933983,
0.06800110638141632,
0.018299080431461334,
-0.05794930458068848,
-0.04292423278093338,
-0.05335506424307823,
0.01054332498461008,
0.05158821865916252,
0.08296015113592148,
0.009611188434064388,
0.027236493304371834,
-0.03299444913864136
] | 0.1953
|
This page shows how to use `kubectl port-forward` to connect to a MongoDB server running in a Kubernetes cluster. This type of connection can be useful for database debugging. ## {{% heading "prerequisites" %}} \* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* Install [MongoDB Shell](https://www.mongodb.com/try/download/shell). ## Creating MongoDB deployment and service 1. Create a Deployment that runs MongoDB: ```shell kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-deployment.yaml ``` The output of a successful command verifies that the deployment was created: ``` deployment.apps/mongo created ``` View the pod status to check that it is ready: ```shell kubectl get pods ``` The output displays the pod created: ``` NAME READY STATUS RESTARTS AGE mongo-75f59d57f4-4nd6q 1/1 Running 0 2m4s ``` View the Deployment's status: ```shell kubectl get deployment ``` The output displays that the Deployment was created: ``` NAME READY UP-TO-DATE AVAILABLE AGE mongo 1/1 1 1 2m21s ``` The Deployment automatically manages a ReplicaSet. View the ReplicaSet status using: ```shell kubectl get replicaset ``` The output displays that the ReplicaSet was created: ``` NAME DESIRED CURRENT READY AGE mongo-75f59d57f4 1 1 1 3m12s ``` 2. Create a Service to expose MongoDB on the network: ```shell kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-service.yaml ``` The output of a successful command verifies that the Service was created: ``` service/mongo created ``` Check the Service created: ```shell kubectl get service mongo ``` The output displays the service created: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE mongo ClusterIP 10.96.41.183 27017/TCP 11s ``` 3. Verify that the MongoDB server is running in the Pod, and listening on port 27017: ```shell # Change mongo-75f59d57f4-4nd6q to the name of the Pod kubectl get pod mongo-75f59d57f4-4nd6q --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}' ``` The output displays the port for MongoDB in that Pod: ``` 27017 ``` 27017 is the official TCP port for MongoDB. ## Forward a local port to a port on the Pod 1. `kubectl port-forward` allows using resource name, such as a pod name, to select a matching pod to port forward to. ```shell # Change mongo-75f59d57f4-4nd6q to the name of the Pod kubectl port-forward mongo-75f59d57f4-4nd6q 28015:27017 ``` which is the same as ```shell kubectl port-forward pods/mongo-75f59d57f4-4nd6q 28015:27017 ``` or ```shell kubectl port-forward deployment/mongo 28015:27017 ``` or ```shell kubectl port-forward replicaset/mongo-75f59d57f4 28015:27017 ``` or ```shell kubectl port-forward service/mongo 28015:27017 ``` Any of the above commands works. The output is similar to this: ``` Forwarding from 127.0.0.1:28015 -> 27017 Forwarding from [::1]:28015 -> 27017 ``` {{< note >}} `kubectl port-forward` does not return. To continue with the exercises, you will need to open another terminal. {{< /note >}} 2. Start the MongoDB command line interface: ```shell mongosh --port 28015 ``` 3. At the MongoDB command line prompt, enter the `ping` command: ``` db.runCommand( { ping: 1 } ) ``` A successful ping request returns: ``` { ok: 1 } ``` ### Optionally let \_kubectl\_ choose the local port {#let-kubectl-choose-local-port} If you don't need a specific local port, you can let `kubectl` choose and allocate the local port and thus relieve you from having to manage local port conflicts, with the slightly simpler syntax: ```shell kubectl port-forward deployment/mongo :27017 ``` The `kubectl` tool finds a local port number that is not in use (avoiding low ports numbers, because these might be used by other applications). The output is similar to: ``` Forwarding from 127.0.0.1:63753 -> 27017 Forwarding from [::1]:63753 -> 27017 ``` ## Discussion Connections made to local port 28015 are forwarded to port 27017 of the Pod that is running the MongoDB server. With this connection in place, you can use your local workstation to debug the database that is running in the Pod. {{<
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
|
[
0.04589568078517914,
0.00047185277799144387,
-0.012243821285665035,
0.021003976464271545,
-0.06726910173892975,
0.007699998095631599,
-0.06790293008089066,
-0.019276440143585205,
0.03594040870666504,
0.12071114033460617,
-0.032240379601716995,
-0.05895664170384407,
-0.029577476903796196,
-0.013908506371080875,
0.016476603224873543,
0.029872069135308266,
0.08969943970441818,
-0.0659554973244667,
0.044690538197755814,
-0.01792716048657894,
-0.07148755341768265,
-0.01684662327170372,
0.04624786227941513,
0.029875144362449646,
-0.06920675933361053,
-0.029957283288240433,
-0.013714869506657124,
-0.01418289914727211,
-0.03194977715611458,
0.01202059630304575,
-0.08805221319198608,
0.01205479260534048,
0.005588890984654427,
0.01470128446817398,
-0.0034515736624598503,
0.15909641981124878,
0.11630197614431381,
0.00883514154702425,
-0.09672410041093826,
-0.005789610091596842,
0.042275942862033844,
-0.06883960962295532,
-0.05037210136651993,
-0.07192111760377884,
0.05687559023499489,
-0.04786030948162079,
-0.1179935559630394,
0.03718603402376175,
0.0405534952878952,
-0.07915720343589783,
-0.0007285095052793622,
-0.11465927213430405,
0.05686371028423309,
0.025231745094060898,
0.06778327375650406,
0.0984015092253685,
-0.0362643264234066,
0.027112212032079697,
0.05759372562170029,
0.03524332493543625,
0.050185639411211014,
-0.03320929408073425,
-0.015637706965208054,
-0.013482252135872841,
-0.064681276679039,
-0.007251117844134569,
0.04411114379763603,
0.0012904555769637227,
0.0350101999938488,
-0.0032531730830669403,
0.018706487491726875,
0.04530378431081772,
-0.0715242475271225,
-0.08387286961078644,
-0.06710093468427658,
0.052540238946676254,
0.06813110411167145,
0.016868872568011284,
-0.033780042082071304,
-0.012489830143749714,
-0.05038074776530266,
0.02025105431675911,
0.009167495183646679,
-0.01900939643383026,
-0.07081469148397446,
-0.022226225584745407,
-0.030155079439282417,
-0.0771569088101387,
0.006114589981734753,
-0.0021099233999848366,
-0.03125055134296417,
-0.014998078346252441,
-0.09614995121955872,
-0.0928322821855545,
0.04648621752858162,
0.035901375114917755,
-0.03222362697124481,
0.06197453290224075,
0.045296527445316315,
-0.05186624452471733,
0.06747481971979141,
-0.013937892392277718,
-0.004340869374573231,
-0.008391309529542923,
0.04360784962773323,
0.010215596295893192,
-0.03884897381067276,
-0.020542403683066368,
0.03441840782761574,
0.05378444492816925,
0.00798710435628891,
0.03816426172852516,
-0.014150447212159634,
0.04205026477575302,
-0.062149807810783386,
0.0482972078025341,
0.01759038306772709,
-0.04416818544268608,
0.021550161764025688,
0.05179884284734726,
0.03883621096611023,
-0.017092661932110786,
0.018962735310196877,
0.012473035603761673,
-0.006528868805617094,
-0.0003290608583483845,
0.027534889057278633,
3.130107826737526e-33,
0.12869396805763245,
-0.0958690345287323,
0.042027682065963745,
0.006449694745242596,
0.06050904840230942,
-0.02154935896396637,
-0.0512898713350296,
-0.013871624134480953,
0.0029935140628367662,
0.0020046222489327192,
-0.11838814616203308,
0.08295228332281113,
0.024610094726085663,
-0.05115009844303131,
-0.000853750214446336,
0.01631031557917595,
-0.029074031859636307,
0.024080835282802582,
0.08561646193265915,
-0.019226375967264175,
0.012672212906181812,
-0.10070671886205673,
-0.04464014619588852,
-0.022620202973484993,
0.025814536958932877,
0.005233284551650286,
0.02467549778521061,
-0.0936059057712555,
-0.014054177328944206,
0.030506184324622154,
-0.038975659757852554,
-0.03940071538090706,
0.008647597394883633,
-0.019767627120018005,
-0.12804467976093292,
-0.06262978911399841,
-0.051933545619249344,
0.015677984803915024,
-0.06528108566999435,
0.008880098350346088,
0.0506453663110733,
-0.026176705956459045,
-0.035224005579948425,
-0.04330288991332054,
0.03634217008948326,
0.02312612533569336,
0.03003627248108387,
-0.09088556468486786,
0.11031182110309601,
0.03490130230784416,
-0.04578760638833046,
-0.10596713423728943,
0.009279781952500343,
-0.036654047667980194,
0.05148039013147354,
0.05199814215302467,
0.08801194280385971,
-0.034960322082042694,
-0.08247043192386627,
-0.019953759387135506,
-0.06817696988582611,
0.050449829548597336,
-0.04757129028439522,
0.04929205775260925,
0.0787782073020935,
-0.0013941139914095402,
-0.048060834407806396,
0.09956090897321701,
-0.01920631341636181,
0.04067188501358032,
-0.054857175797224045,
0.020816897973418236,
-0.05622817203402519,
0.02288057655096054,
0.03180651739239693,
-0.018990015611052513,
-0.0016786966007202864,
0.0011716458247974515,
-0.07661129534244537,
0.05508642643690109,
0.042934004217386246,
-0.05544126778841019,
-0.139239102602005,
0.0553264319896698,
0.054553549736738205,
0.05751750245690346,
0.020922314375638962,
-0.01709294505417347,
0.021969744935631752,
-0.0004948017885908484,
-0.01111665740609169,
0.03197198361158371,
0.0018363625276833773,
-0.0009893982205539942,
-0.09165385365486145,
-6.217085296375443e-33,
0.08034201711416245,
-0.036130744963884354,
0.000968919659499079,
-0.011301668360829353,
0.06990297138690948,
-0.00042120838770642877,
-0.006892303936183453,
0.03342277929186821,
-0.01537089142948389,
-0.08387162536382675,
-0.024337969720363617,
-0.03516196087002754,
0.029460784047842026,
-0.008330871351063251,
-0.1533418893814087,
-0.04088957607746124,
-0.05114608630537987,
-0.02642936073243618,
-0.009302227757871151,
0.029239680618047714,
-0.06923215091228485,
0.004245687276124954,
0.09544305503368378,
-0.0023068462032824755,
-0.043030865490436554,
-0.0767899751663208,
0.05799995735287666,
-0.04900684207677841,
-0.09048689156770706,
0.009356379508972168,
0.029006823897361755,
-0.007731553167104721,
0.024914132431149483,
0.08373482525348663,
-0.047088418155908585,
-0.003850716631859541,
-0.02323984168469906,
-0.006458583287894726,
0.1169959232211113,
-0.056599996984004974,
0.04517058655619621,
0.03409990668296814,
-0.09176689386367798,
-0.07618525624275208,
-0.06117666885256767,
0.028971021994948387,
0.007755599915981293,
-0.01984771154820919,
-0.03943410515785217,
-0.04654976353049278,
-0.02578239142894745,
0.007504507899284363,
-0.016886219382286072,
0.08700188994407654,
-0.05381084978580475,
0.04227009415626526,
-0.0051101213321089745,
0.04339797794818878,
-0.005245644133538008,
0.09273115545511246,
0.0673077180981636,
-0.10169146209955215,
0.05759955942630768,
-0.02235555462539196,
-0.006493110675364733,
0.0037495007272809744,
-0.042971689254045486,
0.07487542927265167,
-0.013371098786592484,
0.022825060412287712,
-0.021302547305822372,
0.03814265504479408,
-0.0036566671915352345,
0.12958411872386932,
-0.00528360903263092,
-0.031131776049733162,
-0.04007343202829361,
-0.03364820405840874,
0.03072037175297737,
0.07492704689502716,
0.025769727304577827,
0.07821688055992126,
-0.06849189102649689,
-0.03065134398639202,
0.02915838733315468,
-0.024337347596883774,
0.05863756313920021,
0.05988109111785889,
0.014224208891391754,
0.039200980216264725,
0.006112348288297653,
0.01628970354795456,
-0.06212853640317917,
0.07431434839963913,
-0.03145633637905121,
-5.459335383761754e-8,
0.038823146373033524,
0.028019053861498833,
-0.04517931863665581,
0.0027321374509483576,
0.025574540719389915,
0.07654201239347458,
0.013240874744951725,
-0.034656792879104614,
-0.029728475958108902,
-0.0002742089855019003,
-0.05845525115728378,
0.11628564447164536,
-0.05453157052397728,
0.05995195731520653,
0.011717023327946663,
-0.02019643969833851,
0.017115263268351555,
-0.027629604563117027,
0.06638126075267792,
-0.06120273098349571,
-0.0004831200640182942,
-0.06791030615568161,
-0.009231602773070335,
0.015711862593889236,
-0.004454869776964188,
0.05384467914700508,
0.015491899102926254,
-0.012313312850892544,
0.0025450652465224266,
-0.06814169138669968,
-0.031435348093509674,
0.02947070449590683,
-0.00831447634845972,
0.06935066729784012,
0.008053514175117016,
0.05961432680487633,
-0.12036005407571793,
0.06183696165680885,
0.010855774395167828,
0.05937634035944939,
-0.017643475905060768,
0.0426921620965004,
-0.038524139672517776,
-0.031926482915878296,
-0.03199847787618637,
0.0105393435806036,
0.05854473263025284,
0.07896445691585541,
-0.037001434713602066,
0.005408192984759808,
0.04050728306174278,
-0.08200671523809433,
0.06282293051481247,
0.006655223201960325,
0.01693909615278244,
0.0476238988339901,
-0.05125776305794716,
-0.06976454704999924,
-0.024710096418857574,
0.03790442645549774,
0.025080112740397453,
0.04515126720070839,
0.04827306419610977,
-0.009338678792119026
] | 0.117189
|
Forwarding from [::1]:63753 -> 27017 ``` ## Discussion Connections made to local port 28015 are forwarded to port 27017 of the Pod that is running the MongoDB server. With this connection in place, you can use your local workstation to debug the database that is running in the Pod. {{< note >}} `kubectl port-forward` is implemented for TCP ports only. The support for UDP protocol is tracked in [issue 47862](https://github.com/kubernetes/kubernetes/issues/47862). {{< /note >}} ## {{% heading "whatsnext" %}} Learn more about [kubectl port-forward](/docs/reference/generated/kubectl/kubectl-commands/#port-forward).
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
|
[
0.05673130974173546,
0.04236554726958275,
0.028677191585302353,
-0.02846885286271572,
-0.0066584572196006775,
-0.006720598321408033,
-0.05581345781683922,
-0.03706131875514984,
0.019658328965306282,
0.08663211017847061,
-0.0695873349905014,
-0.03376343473792076,
-0.04148377478122711,
-0.02395700477063656,
-0.0355834998190403,
0.009003039449453354,
0.0701383426785469,
-0.021716196089982986,
0.07831498235464096,
-0.004708791617304087,
-0.06702739745378494,
0.03358572721481323,
0.024464130401611328,
0.04390191286802292,
-0.051053646951913834,
0.014925235882401466,
0.03552344813942909,
-0.014219656586647034,
-0.029756179079413414,
-0.026317065581679344,
-0.05413335561752319,
-0.004201396368443966,
-0.0205858051776886,
0.014528569765388966,
-0.025365665555000305,
0.09980073571205139,
0.08797603100538254,
-0.05149214714765549,
-0.08598272502422333,
-0.009290547110140324,
0.09780614823102951,
-0.07165990769863129,
-0.05999220907688141,
0.013673792593181133,
0.0586959533393383,
-0.03732936084270477,
-0.1095598116517067,
0.047719646245241165,
0.04421361908316612,
-0.07112210243940353,
0.01038055494427681,
-0.10682696849107742,
0.07435629516839981,
0.0761689841747284,
0.0815265104174614,
0.05663968250155449,
-0.013291968032717705,
0.036856986582279205,
0.08710703998804092,
0.08163530379533768,
0.08787211775779724,
-0.03009260632097721,
0.011859927326440811,
-0.016023721545934677,
-0.04327407106757164,
-0.031101208180189133,
0.02088286727666855,
0.07696352154016495,
-0.008839369751513004,
0.0375685878098011,
0.05801049619913101,
0.03803522139787674,
-0.050177861005067825,
-0.06543713063001633,
-0.0072742425836622715,
0.0711570754647255,
0.004880100954324007,
-0.012556553818285465,
-0.00534578924998641,
-0.013844051398336887,
-0.019169950857758522,
-0.006559594999998808,
0.04030466824769974,
-0.03379640728235245,
-0.04886128380894661,
-0.02718791365623474,
-0.005183165892958641,
-0.07902500033378601,
-0.015129189938306808,
0.03173283860087395,
-0.03174309805035591,
-0.05303759127855301,
-0.05714147165417671,
-0.06454778462648392,
0.036306530237197876,
0.031203031539916992,
-0.007892798632383347,
0.027064645662903786,
0.07824857532978058,
-0.05397449806332588,
0.04204573109745979,
0.05433870479464531,
-0.018915044143795967,
-0.01872498169541359,
0.043307848274707794,
-0.03352782502770424,
-0.026429977267980576,
-0.051146119832992554,
-0.006277610547840595,
0.07155665010213852,
-0.014600148424506187,
0.019178902730345726,
0.0016231025801971555,
0.02944757789373398,
-0.004669363144785166,
0.012717596255242825,
-0.020595921203494072,
-0.0329522080719471,
0.00662483973428607,
0.014468273147940636,
0.04014069214463234,
-0.04305975139141083,
-0.005766741000115871,
0.06390154361724854,
-0.031105322763323784,
0.02088971994817257,
0.015504014678299427,
3.195520781282924e-33,
0.13219891488552094,
-0.06656678020954132,
0.018649708479642868,
-0.025099972262978554,
0.029404284432530403,
-0.022800639271736145,
-0.0032645785249769688,
0.006424803286790848,
-0.017199328169226646,
0.031118933111429214,
-0.09215528517961502,
0.07367828488349915,
0.06525915116071701,
-0.055368147790431976,
-0.04415031895041466,
0.032506391406059265,
-0.018571915104985237,
0.012714648619294167,
0.04150659590959549,
0.03645787015557289,
0.009493831545114517,
-0.04507991299033165,
-0.04099922999739647,
-0.01645536720752716,
0.02447422780096531,
0.032012928277254105,
-0.04320090264081955,
-0.07772054523229599,
0.01836642250418663,
0.02996995486319065,
-0.03696655482053757,
-0.042121320962905884,
-0.0253456998616457,
0.048926349729299545,
-0.10871856659650803,
-0.06716401875019073,
-0.025073811411857605,
-0.01669088751077652,
-0.11193770915269852,
-0.006559822708368301,
0.04253191500902176,
-0.05229736119508743,
-0.08189916610717773,
-0.022136308252811432,
0.003489658236503601,
0.07489980012178421,
0.04897237941622734,
-0.11129170656204224,
0.0459783673286438,
0.022883828729391098,
-0.07138562947511673,
-0.060706183314323425,
-0.017189713194966316,
-0.0344637967646122,
0.09348288923501968,
-0.01546971034258604,
0.08756051957607269,
-0.043137870728969574,
-0.08629535883665085,
0.0250601377338171,
-0.05718031898140907,
0.08207473158836365,
-0.005667909514158964,
-0.004128899425268173,
0.03461785987019539,
0.010519410483539104,
-0.06005266308784485,
0.06469143182039261,
0.016742631793022156,
-0.020560655742883682,
-0.037166863679885864,
0.10992706567049026,
-0.03108658455312252,
0.05556182563304901,
-0.014990745112299919,
0.0045763785019516945,
-0.026788055896759033,
0.003952204715460539,
-0.045616429299116135,
-0.0031860200688242912,
0.010942477732896805,
-0.041095539927482605,
-0.1013554036617279,
0.07634932547807693,
-0.01128975860774517,
0.07822961360216141,
-0.03531994670629501,
0.00007987026037881151,
0.01806083507835865,
0.06449541449546814,
-0.010725309140980244,
0.04609670490026474,
-0.019019266590476036,
-0.004452317953109741,
-0.10184768587350845,
-5.2223878541813776e-33,
0.09030300378799438,
-0.015508442185819149,
-0.024771198630332947,
0.0036550455261021852,
-0.009626554325222969,
-0.046108126640319824,
0.025147942826151848,
0.08514446765184402,
0.03915666788816452,
-0.08924511075019836,
-0.005698471330106258,
-0.08319798111915588,
0.067093126475811,
0.02666649781167507,
-0.07884246855974197,
-0.015553208999335766,
-0.07082642614841461,
-0.03747517243027687,
-0.07060283422470093,
0.0084164934232831,
-0.07823910564184189,
0.010354042053222656,
0.0731184259057045,
-0.005019495729357004,
-0.043228890746831894,
-0.014355072751641273,
0.07727861404418945,
-0.0652870312333107,
-0.07434193044900894,
-0.03440496698021889,
0.06389547884464264,
-0.04658975452184677,
0.042509909719228745,
0.054247867316007614,
-0.031204774975776672,
0.008554616943001747,
-0.012290951795876026,
0.027278579771518707,
0.11984840780496597,
-0.0652204379439354,
0.059786781668663025,
0.09659992158412933,
-0.08879909664392471,
-0.04847721382975578,
-0.05834807828068733,
0.0022055506706237793,
-0.02612197771668434,
-0.006612050347030163,
0.004662293940782547,
-0.09069792181253433,
0.02113707922399044,
-0.01563405431807041,
0.008248799480497837,
0.09048949182033539,
-0.08078633248806,
0.05399525165557861,
0.04181433096528053,
0.04838968813419342,
0.03741350769996643,
0.07590316236019135,
0.04056086018681526,
-0.124925896525383,
0.01768256351351738,
0.010812057182192802,
0.05208323895931244,
-0.0012125575449317694,
0.005086014978587627,
0.010650060139596462,
0.031601835042238235,
-0.01253586821258068,
0.01663944683969021,
0.000889075337909162,
-0.031150825321674347,
0.14785900712013245,
0.04582543671131134,
-0.0001243665610672906,
-0.04242045804858208,
-0.02231263741850853,
0.02311703935265541,
0.06317940354347229,
0.037110403180122375,
0.06088002771139145,
-0.050282929092645645,
-0.06323378533124924,
0.059266213327646255,
0.01502121053636074,
0.053835492581129074,
0.046693380922079086,
-0.02723734639585018,
-0.0041892570443451405,
0.009348813444375992,
0.04083788022398949,
-0.08879093080759048,
0.058312103152275085,
0.018111545592546463,
-4.755336036055269e-8,
0.026141857728362083,
0.01504430640488863,
-0.04486523196101189,
0.007577062584459782,
0.019646942615509033,
0.08858980238437653,
0.02277042716741562,
-0.045242391526699066,
-0.011152422986924648,
-0.011844716966152191,
-0.10463350266218185,
0.11068722605705261,
-0.033570077270269394,
0.014633183367550373,
0.04938218742609024,
-0.06240813806653023,
0.036658741533756256,
-0.03595089912414551,
0.031230119988322258,
-0.0828823521733284,
-0.007885927334427834,
-0.038167744874954224,
-0.05972742661833763,
-0.013497223146259785,
-0.06352259963750839,
0.058366481214761734,
0.03999709337949753,
0.028920624405145645,
0.04558391124010086,
-0.10955287516117096,
-0.028813669458031654,
0.015766536816954613,
-0.039884619414806366,
0.04430978000164032,
0.014470722526311874,
0.09319881349802017,
-0.11129774153232574,
0.03907197341322899,
0.0037280323449522257,
0.10640031099319458,
-0.060899801552295685,
-0.03822651505470276,
-0.09386460483074188,
-0.020386695861816406,
-0.05865204334259033,
-0.016574488952755928,
0.04259548336267471,
0.0817921981215477,
-0.03432261571288109,
0.012643628753721714,
0.03493187949061394,
-0.08913702517747879,
0.05338205397129059,
0.007432711776345968,
0.010448849759995937,
0.031120264902710915,
-0.06777136027812958,
-0.07159470021724701,
-0.07300837337970734,
0.02968488074839115,
-0.018850354477763176,
0.01977895013988018,
0.016504595056176186,
0.044511135667562485
] | 0.138974
|
This page shows how to create a Kubernetes Service object that external clients can use to access an application running in a cluster. The Service provides load balancing for an application that has two running instances. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} ## {{% heading "objectives" %}} - Run two instances of a Hello World application. - Create a Service object that exposes a node port. - Use the Service object to access the running application. ## Creating a service for an application running in two pods Here is the configuration file for the application Deployment: {{% code\_sample file="service/access/hello-application.yaml" %}} 1. Run a Hello World application in your cluster: Create the application Deployment using the file above: ```shell kubectl apply -f https://k8s.io/examples/service/access/hello-application.yaml ``` The preceding command creates a {{< glossary\_tooltip text="Deployment" term\_id="deployment" >}} and an associated {{< glossary\_tooltip term\_id="replica-set" text="ReplicaSet" >}}. The ReplicaSet has two {{< glossary\_tooltip text="Pods" term\_id="pod" >}} each of which runs the Hello World application. 1. Display information about the Deployment: ```shell kubectl get deployments hello-world kubectl describe deployments hello-world ``` 1. Display information about your ReplicaSet objects: ```shell kubectl get replicasets kubectl describe replicasets ``` 1. Create a Service object that exposes the deployment: ```shell kubectl expose deployment hello-world --type=NodePort --name=example-service ``` 1. Display information about the Service: ```shell kubectl describe services example-service ``` The output is similar to this: ```none Name: example-service Namespace: default Labels: run=load-balancer-example Annotations: Selector: run=load-balancer-example Type: NodePort IP: 10.32.0.16 Port: 8080/TCP TargetPort: 8080/TCP NodePort: 31496/TCP Endpoints: 10.200.1.4:8080,10.200.2.5:8080 Session Affinity: None Events: ``` Make a note of the NodePort value for the Service. For example, in the preceding output, the NodePort value is 31496. 1. List the pods that are running the Hello World application: ```shell kubectl get pods --selector="run=load-balancer-example" --output=wide ``` The output is similar to this: ```none NAME READY STATUS ... IP NODE hello-world-2895499144-bsbk5 1/1 Running ... 10.200.1.4 worker1 hello-world-2895499144-m1pwt 1/1 Running ... 10.200.2.5 worker2 ``` 1. Get the public IP address of one of your nodes that is running a Hello World pod. How you get this address depends on how you set up your cluster. For example, if you are using Minikube, you can see the node address by running `kubectl cluster-info`. If you are using Google Compute Engine instances, you can use the `gcloud compute instances list` command to see the public addresses of your nodes. 1. On your chosen node, create a firewall rule that allows TCP traffic on your node port. For example, if your Service has a NodePort value of 31568, create a firewall rule that allows TCP traffic on port 31568. Different cloud providers offer different ways of configuring firewall rules. 1. Use the node address and node port to access the Hello World application: ```shell curl http://: ``` where `` is the public IP address of your node, and `` is the NodePort value for your service. The response to a successful request is a hello message: ```none Hello, world! Version: 2.0.0 Hostname: hello-world-cdd4458f4-m47c8 ``` ## Using a service configuration file As an alternative to using `kubectl expose`, you can use a [service configuration file](/docs/concepts/services-networking/service/) to create a Service. ## {{% heading "cleanup" %}} To delete the Service, enter this command: kubectl delete services example-service To delete the Deployment, the ReplicaSet, and the Pods that are running the Hello World application, enter this command: kubectl delete deployment hello-world ## {{% heading "whatsnext" %}} Follow the [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/) tutorial.
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/service-access-application-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/service-access-application-cluster.md
|
[
-0.019735239446163177,
-0.030292421579360962,
0.01929713599383831,
-0.027023298665881157,
-0.09484335035085678,
-0.036488402634859085,
-0.013884957879781723,
0.03529426082968712,
0.032934773713350296,
0.05576366186141968,
-0.06951726227998734,
-0.07013815641403198,
0.02761467918753624,
-0.04864775761961937,
0.11095486581325531,
0.010983318090438843,
0.10537422448396683,
-0.047664329409599304,
0.014593464322388172,
-0.0175820030272007,
-0.013205517083406448,
0.03267898038029671,
0.007216601632535458,
0.026187073439359665,
-0.10268156230449677,
-0.008129200898110867,
-0.020371807739138603,
0.021621761843562126,
0.017631804570555687,
0.023482156917452812,
-0.02081632986664772,
-0.0019908887334167957,
-0.0203342754393816,
0.03141917660832405,
0.06447968631982803,
0.11130183190107346,
0.05228337645530701,
-0.011466563679277897,
-0.10189483314752579,
0.0012434105155989528,
0.06291969865560532,
-0.010108141228556633,
-0.11099861562252045,
-0.03882822021842003,
0.02197805978357792,
-0.04963299259543419,
-0.08478567004203796,
0.002676210133358836,
0.02748086303472519,
-0.03402763605117798,
-0.014056379906833172,
-0.12849052250385284,
0.024096660315990448,
0.06655493378639221,
-0.0005381508963182569,
0.034816183149814606,
0.0008277532178908587,
0.04171724617481232,
0.07030735909938812,
0.015724169090390205,
-0.002368306741118431,
-0.019446833059191704,
0.06653830409049988,
-0.03384171798825264,
-0.0110634071752429,
-0.008047881536185741,
0.001902896910905838,
0.020865563303232193,
-0.016585366800427437,
-0.055623188614845276,
0.05768604204058647,
0.017472043633461,
-0.014126493595540524,
-0.06340499967336655,
-0.05921762436628342,
0.021315790712833405,
-0.01570466347038746,
0.056028470396995544,
-0.010002877563238144,
-0.04896096885204315,
0.025694554671645164,
0.041198521852493286,
0.022026201710104942,
0.030157333239912987,
-0.11671266704797745,
-0.035852182656526566,
-0.0071214898489415646,
-0.11331444978713989,
0.050311438739299774,
0.010452858172357082,
-0.006371410097926855,
-0.024175995960831642,
-0.022838184610009193,
-0.1090901717543602,
0.06372187286615372,
-0.01583174243569374,
-0.021029813215136528,
0.03340718150138855,
0.030878989025950432,
-0.011128940619528294,
0.053457215428352356,
-0.030863860622048378,
-0.0031212009489536285,
0.021042510867118835,
0.04988986998796463,
-0.01715657114982605,
-0.06454936414957047,
-0.040793340653181076,
0.06490805000066757,
0.04870016500353813,
-0.013877751305699348,
0.05880235880613327,
-0.0037257024087011814,
0.04148303344845772,
-0.016664128750562668,
0.005655860994011164,
0.08367805182933807,
-0.025580400601029396,
0.023194387555122375,
0.1023436039686203,
0.017882172018289566,
-0.09109748899936676,
0.014322339557111263,
0.01765093021094799,
-0.011003960855305195,
0.011404954828321934,
-0.012900959700345993,
2.2775338963716134e-33,
0.023652561008930206,
-0.12772154808044434,
0.051624596118927,
-0.021420562639832497,
0.032643817365169525,
-0.0737888365983963,
-0.0637577697634697,
-0.012375982478260994,
-0.05485618859529495,
-0.040339063853025436,
-0.07123861461877823,
0.11687959730625153,
0.04248232766985893,
-0.05551118403673172,
0.0053517199121415615,
0.02177853137254715,
-0.07366429269313812,
0.056964680552482605,
0.123917356133461,
-0.017760809510946274,
0.025588665157556534,
-0.09703689813613892,
-0.04994140565395355,
0.0020962278358638287,
-0.018921297043561935,
-0.0004421744670253247,
0.03853347897529602,
-0.12505711615085602,
0.035494253039360046,
0.025377683341503143,
0.024319952353835106,
-0.02814486064016819,
-0.004598498344421387,
0.03369143605232239,
-0.17907634377479553,
-0.04335538670420647,
0.007472673896700144,
0.027393026277422905,
-0.07426861673593521,
-0.003313337918370962,
0.013529759831726551,
-0.011151622049510479,
0.028456857427954674,
-0.08622533082962036,
0.05074891820549965,
-0.03865690156817436,
0.03264204040169716,
-0.05768809840083122,
0.08829698711633682,
0.01520464662462473,
-0.013499691151082516,
-0.09680413454771042,
0.016847575083374977,
0.025082813575863838,
0.05394420400261879,
0.07339604943990707,
0.08238062262535095,
-0.031839147210121155,
-0.051102414727211,
-0.026585029438138008,
-0.07013260573148727,
-0.013151932507753372,
-0.04284804314374924,
0.03832055628299713,
0.024348724633455276,
-0.005472593009471893,
0.0013512363657355309,
0.05533873662352562,
-0.038526296615600586,
0.0405736118555069,
-0.0641980767250061,
0.027833450585603714,
0.006986103951931,
0.018882350996136665,
0.0077507877722382545,
-0.0421396903693676,
0.052744120359420776,
0.041437748819589615,
-0.09233193844556808,
0.05243102088570595,
0.004780643619596958,
-0.038703884929418564,
-0.06497300416231155,
0.08649493008852005,
0.006214155349880457,
-0.017671013250947,
0.004001979250460863,
-0.02714354544878006,
-0.08059842139482498,
0.05588514730334282,
0.0034076878800988197,
-0.027031205594539642,
-0.05759663134813309,
0.01753918081521988,
-0.0919710248708725,
-4.3759720448458356e-33,
0.08991893380880356,
0.009899798780679703,
-0.012896519154310226,
-0.006434459239244461,
0.07472526282072067,
0.025435931980609894,
-0.004713389556854963,
0.059791598469018936,
-0.050375696271657944,
0.0073212869465351105,
-0.06670690327882767,
-0.03793129324913025,
0.06712519377470016,
0.05809934064745903,
-0.12200728058815002,
-0.0018789218738675117,
-0.035408612340688705,
0.03663954511284828,
0.010798392817378044,
0.02189319021999836,
-0.04597751796245575,
-0.0077332016080617905,
0.08899900317192078,
-0.007986791431903839,
-0.017707783728837967,
-0.03204475715756416,
0.029684998095035553,
-0.004987148568034172,
-0.0688280537724495,
-0.024298517033457756,
-0.024559158831834793,
-0.04344947636127472,
0.02606979012489319,
0.0009322966798208654,
0.01556352712213993,
-0.0382324755191803,
-0.02239416539669037,
-0.026236139237880707,
0.031124884262681007,
-0.06106290966272354,
0.017633873969316483,
0.00664363382384181,
-0.07385875284671783,
-0.07968441396951675,
-0.059098981320858,
0.03385773301124573,
0.005801192484796047,
-0.01410756353288889,
-0.04568254202604294,
-0.0625273808836937,
-0.02197517268359661,
0.014264514669775963,
-0.08041052520275116,
0.10885725170373917,
-0.07031868398189545,
0.041845694184303284,
0.06320123374462128,
0.08036842942237854,
-0.07296096533536911,
0.05551726743578911,
0.10974208265542984,
-0.12245255708694458,
0.044298406690359116,
-0.008670815266668797,
0.0157761313021183,
-0.058274369686841965,
0.002324892207980156,
0.05736216902732849,
-0.012288379482924938,
0.03341488540172577,
-0.060071613639593124,
0.029200078919529915,
0.04520002007484436,
0.08367063850164413,
-0.016209570690989494,
0.022884247824549675,
0.029050329700112343,
-0.06701646745204926,
0.042579285800457,
0.0019953232258558273,
-0.031731702387332916,
0.07418462634086609,
-0.06650719046592712,
-0.010235194116830826,
0.0013895590091124177,
-0.004214691463857889,
0.10790259391069412,
0.10423427075147629,
0.04157044738531113,
0.059056855738162994,
-0.019901933148503304,
0.01775938645005226,
-0.010074274614453316,
0.07328620553016663,
-0.06714332103729248,
-5.475978070990095e-8,
0.06245410442352295,
0.026096101850271225,
-0.02164064534008503,
0.0840136781334877,
-0.07037543505430222,
-0.0027090488001704216,
-0.007383879739791155,
0.0042423224076628685,
-0.036144811660051346,
0.029391136020421982,
-0.04969725012779236,
0.07997289299964905,
-0.07704801857471466,
0.044073786586523056,
0.0016004737699404359,
-0.006300277076661587,
0.007253672927618027,
-0.014874367043375969,
0.026842139661312103,
-0.06794750690460205,
-0.018619397655129433,
-0.02698846347630024,
0.04183483496308327,
0.031495917588472366,
-0.01044880785048008,
0.09774339944124222,
0.008307929150760174,
-0.05209340155124664,
0.0052921767346560955,
-0.05052289366722107,
-0.070439912378788,
-0.0034623665269464254,
-0.07146172970533371,
0.0845562219619751,
-0.061276521533727646,
0.0015533245168626308,
-0.14256832003593445,
0.08283763378858566,
0.042700137943029404,
0.05891302227973938,
0.0028393035754561424,
0.022280164062976837,
-0.06508336961269379,
-0.0319354347884655,
0.07098998874425888,
0.10355697572231293,
-0.005432839039713144,
0.05159326270222664,
-0.0018903313903138041,
0.05319984629750252,
-0.009459460154175758,
-0.047300178557634354,
0.02855883166193962,
0.029664842411875725,
0.0019557157065719366,
0.0519578754901886,
-0.02968668006360531,
-0.06282365322113037,
0.023235268890857697,
0.02502342127263546,
0.004266443196684122,
0.04190384969115257,
0.00794170517474413,
0.02094634249806404
] | 0.154624
|
World application, enter this command: kubectl delete deployment hello-world ## {{% heading "whatsnext" %}} Follow the [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/) tutorial.
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/service-access-application-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/service-access-application-cluster.md
|
[
0.056713808327913284,
0.03549071401357651,
0.035125844180583954,
-0.0850253775715828,
-0.05167779326438904,
-0.03986255079507828,
-0.014122544787824154,
-0.06238406151533127,
0.08885268121957779,
0.04891887307167053,
-0.031373098492622375,
-0.06943920254707336,
0.011135412380099297,
0.017392247915267944,
0.043067965656518936,
0.009763804264366627,
-0.002459093229845166,
-0.027998415753245354,
0.007516018580645323,
-0.031479302793741226,
-0.01824929378926754,
0.0339181087911129,
0.018710535019636154,
0.042973849922418594,
-0.04820441082119942,
-0.04897676035761833,
-0.015256978571414948,
0.013775262981653214,
-0.008495837450027466,
-0.0659492239356041,
-0.027449723333120346,
0.08082404732704163,
0.004503075964748859,
-0.02648245543241501,
0.08173845708370209,
0.08945915102958679,
0.012845191173255444,
-0.01569252647459507,
-0.04458250105381012,
-0.008349599316716194,
0.06913302838802338,
-0.0525406189262867,
-0.09203413128852844,
-0.016828525811433792,
0.01853954792022705,
-0.007756305392831564,
-0.08885204046964645,
-0.07904604077339172,
0.058716192841529846,
-0.030452292412519455,
0.02840936742722988,
-0.07266509532928467,
0.0019427017541602254,
0.005407275166362524,
0.06881444901227951,
-0.009865349158644676,
-0.011643646284937859,
0.09139586985111237,
0.08534713089466095,
0.04111973196268082,
0.02156476117670536,
0.030370155349373817,
0.049731142818927765,
0.015432394109666348,
-0.020728910341858864,
0.031247176229953766,
-0.0065598683431744576,
0.017914211377501488,
-0.005214854143559933,
-0.031803980469703674,
0.020351868122816086,
0.05210961028933525,
-0.05114191398024559,
-0.07449798285961151,
-0.033648695796728134,
0.03600253164768219,
-0.015132598578929901,
0.03492940962314606,
0.0015017179539427161,
-0.025066489353775978,
0.043942708522081375,
0.03724166005849838,
-0.008383256383240223,
0.031804464757442474,
-0.06036660075187683,
-0.00718923844397068,
-0.024775849655270576,
-0.11926290392875671,
0.06508810073137283,
0.03539923205971718,
-0.04685254767537117,
-0.10717584192752838,
0.04438596963882446,
-0.07903794944286346,
-0.01644314080476761,
0.010879782028496265,
-0.006300048436969519,
0.042774222791194916,
-0.027242811396718025,
-0.008414490148425102,
0.07321334630250931,
-0.05731653794646263,
0.05274690315127373,
0.05075683444738388,
0.014833824709057808,
-0.02931874990463257,
-0.035910896956920624,
0.029283124953508377,
0.015962745994329453,
0.018812991678714752,
-0.07386256009340286,
0.002848944393917918,
-0.0388408787548542,
0.006662457250058651,
-0.048616454005241394,
0.003682985669001937,
0.02765355072915554,
0.030439095571637154,
0.003986717201769352,
0.06831467896699905,
0.04409091919660568,
-0.10500726848840714,
-0.04478798806667328,
0.01353305671364069,
-0.07141862064599991,
0.05203251168131828,
0.05980638787150383,
-1.0486837651300061e-33,
0.05186733603477478,
-0.07118028402328491,
0.04845714196562767,
0.03379316255450249,
0.03445787355303764,
-0.10468406975269318,
-0.04602084681391716,
-0.026636505499482155,
-0.008686723187565804,
-0.010301259346306324,
-0.042606670409440994,
0.0629478469491005,
0.0377437099814415,
-0.014829597435891628,
-0.004603867419064045,
-0.008855057880282402,
-0.038834936916828156,
0.05549262464046478,
0.04556034132838249,
-0.033073414117097855,
0.061268821358680725,
-0.03052941896021366,
-0.06589644402265549,
0.028331588953733444,
0.06238262727856636,
0.01844191364943981,
0.05074165016412735,
-0.06114857271313667,
-0.0125889852643013,
0.018376190215349197,
0.03710940480232239,
-0.014786981977522373,
-0.011343886144459248,
0.0259384922683239,
-0.14256015419960022,
-0.03364690765738487,
0.027902046218514442,
0.01679200679063797,
-0.10656311362981796,
0.024878142401576042,
0.04525596648454666,
-0.02704363688826561,
-0.07700731605291367,
-0.007140819448977709,
0.08918481320142746,
-0.019327335059642792,
0.10202113538980484,
-0.0558280423283577,
0.06951022148132324,
0.023536594584584236,
-0.0663069486618042,
-0.05677632614970207,
0.016004322096705437,
-0.013837624341249466,
0.07269494235515594,
0.05227627977728844,
0.1267300844192505,
-0.04054148867726326,
-0.10326388478279114,
-0.09516075253486633,
-0.06011120229959488,
0.020274406298995018,
-0.023907409980893135,
0.057287950068712234,
0.03670278936624527,
-0.0390189029276371,
-0.007423438597470522,
0.027247164398431778,
-0.08988796919584274,
-0.047672733664512634,
-0.10482284426689148,
0.030593961477279663,
0.0090554878115654,
0.002331964671611786,
-0.04323941096663475,
-0.0561244860291481,
0.02791471965610981,
0.02650640718638897,
-0.06627301871776581,
0.07076936960220337,
0.051915574818849564,
-0.05568772181868553,
-0.03485103324055672,
0.07079582661390305,
0.06501037627458572,
-0.03415761515498161,
-0.004093174356967211,
-0.027522865682840347,
-0.0233113132417202,
0.07532408088445663,
-0.030185217037796974,
0.029224781319499016,
-0.0592496432363987,
0.05501358211040497,
-0.08276905119419098,
-1.4664176313782878e-33,
0.1054590493440628,
0.025869539007544518,
0.027831291779875755,
-0.024573568254709244,
0.01566036231815815,
0.019530799239873886,
0.028039760887622833,
0.15443550050258636,
-0.058657173067331314,
-0.0308860931545496,
0.07306668907403946,
0.01842210255563259,
0.0631183460354805,
0.005513432901352644,
-0.09878046065568924,
0.055055197328329086,
-0.003594262758269906,
0.05342891439795494,
-0.07137506455183029,
0.0442688949406147,
-0.06743394583463669,
0.0020636864937841892,
0.07160136848688126,
-0.013553067110478878,
-0.03361164405941963,
-0.03992031514644623,
0.045889247208833694,
0.025654422119259834,
-0.06492280215024948,
-0.0058806403540074825,
0.04076738283038139,
-0.05418792739510536,
-0.001694236882030964,
-0.004062130581587553,
-0.013365289196372032,
-0.013403295539319515,
-0.019239842891693115,
-0.006798332557082176,
0.009186732582747936,
-0.07294360548257828,
-0.01841188594698906,
-0.012710102833807468,
-0.03779638931155205,
-0.023160219192504883,
-0.06517978012561798,
0.017916377633810043,
0.01827639900147915,
-0.10075646638870239,
0.028975963592529297,
-0.06861093640327454,
-0.0221756212413311,
0.01796504110097885,
-0.02382517233490944,
0.014155241660773754,
-0.03644905611872673,
0.08058591932058334,
0.02342858351767063,
0.08465328812599182,
-0.07230432331562042,
-0.00045949083869345486,
0.09880336374044418,
-0.05600518733263016,
0.07811200618743896,
0.024330761283636093,
0.02592017874121666,
-0.029791736975312233,
-0.0008181214798241854,
0.13531799614429474,
-0.025766363367438316,
0.0031837886199355125,
-0.028222933411598206,
0.05016931891441345,
-0.031116198748350143,
0.04431531950831413,
0.006999933626502752,
-0.007243996951729059,
0.007113346830010414,
-0.04521432891488075,
0.012388883158564568,
-0.0017444280674681067,
0.06770818680524826,
0.03473200276494026,
-0.09475110471248627,
-0.08908092230558395,
-0.016304580494761467,
-0.01602841727435589,
0.029937883839011192,
0.0734730213880539,
0.021346667781472206,
0.06960176676511765,
-0.04483741149306297,
-0.002628699643537402,
-0.0012148527894169092,
0.07052541524171829,
-0.08782566338777542,
-3.1917451792651264e-8,
0.020355520769953728,
-0.0034159179776906967,
-0.023182446137070656,
0.02558143623173237,
0.039743419736623764,
-0.0035389296244829893,
-0.005404920782893896,
0.07655064016580582,
-0.018122941255569458,
-0.022163981571793556,
-0.11163384467363358,
0.11477922648191452,
-0.15673613548278809,
0.08677049726247787,
0.03682361915707588,
-0.10393450409173965,
-0.04960004985332489,
0.0623868927359581,
0.06196511164307594,
-0.05022714287042618,
-0.029140740633010864,
-0.04778903350234032,
0.01770116202533245,
-0.01763084903359413,
0.08121652156114578,
0.06301365047693253,
0.0321289524435997,
-0.05018818378448486,
0.09007394313812256,
-0.010399158112704754,
-0.036989159882068634,
-0.03041848912835121,
-0.07734934985637665,
0.04967110604047775,
-0.03367066755890846,
0.048525020480155945,
-0.08036261051893234,
0.07852926105260849,
0.00838204100728035,
0.04446720331907272,
-0.0023779107723385096,
0.08860543370246887,
-0.05895033851265907,
-0.026270819827914238,
-0.01659238524734974,
0.07238621264696121,
-0.004346048459410667,
0.06349284946918488,
-0.028585225343704224,
-0.0262483861297369,
-0.020141370594501495,
-0.035064179450273514,
-0.053352151066064835,
-0.0020520328544080257,
-0.045902069658041,
0.06839094310998917,
0.07097149640321732,
-0.06703892350196838,
-0.012288765050470829,
0.009565886110067368,
-0.025455346331000328,
-0.0009288946748711169,
0.013001272454857826,
0.0017582232831045985
] | 0.123236
|
Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application, and manage the cluster resources. You can use Dashboard to get an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc). For example, you can scale a Deployment, initiate a rolling update, restart a pod or deploy new applications using a deploy wizard. Dashboard also provides information on the state of Kubernetes resources in your cluster and on any errors that may have occurred.  ## Deploying the Dashboard UI {{< note >}} Kubernetes Dashboard supports only Helm-based installation currently as it is faster and gives us better control over all dependencies required by Dashboard to run. {{< /note >}} The Dashboard UI is not deployed by default. To deploy it, run the following command: ```shell # Add kubernetes-dashboard repository helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/ # Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard ``` ## Accessing the Dashboard UI To protect your cluster data, Dashboard deploys with a minimal RBAC configuration by default. Currently, Dashboard only supports logging in with a Bearer Token. To create a token for this demo, you can follow our guide on [creating a sample user](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md). {{< warning >}} The sample user created in the tutorial will have administrative privileges and is for educational purposes only. {{< /warning >}} ### Command line proxy You can enable access to the Dashboard using the `kubectl` command-line tool, by running the following command: ``` kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 ``` Kubectl will make Dashboard available at [https://localhost:8443](https://localhost:8443). The UI can \_only\_ be accessed from the machine where the command is executed. See `kubectl port-forward --help` for more options. {{< note >}} The kubeconfig authentication method does \*\*not\*\* support external identity providers or X.509 certificate-based authentication. {{< /note >}} ## Welcome view When you access Dashboard on an empty cluster, you'll see the welcome page. This page contains a link to this document as well as a button to deploy your first application. In addition, you can view which system applications are running by default in the `kube-system` [namespace](/docs/tasks/administer-cluster/namespaces/) of your cluster, for example the Dashboard itself.  ## Deploying containerized applications Dashboard lets you create and deploy a containerized application as a Deployment and optional Service with a simple wizard. You can either manually specify application details, or upload a YAML or JSON \_manifest\_ file containing application configuration. Click the \*\*CREATE\*\* button in the upper right corner of any page to begin. ### Specifying application details The deploy wizard expects that you provide the following information: - \*\*App name\*\* (mandatory): Name for your application. A [label](/docs/concepts/overview/working-with-objects/labels/) with the name will be added to the Deployment and Service, if any, that will be deployed. The application name must be unique within the selected Kubernetes [namespace](/docs/tasks/administer-cluster/namespaces/). It must start with a lowercase character, and end with a lowercase character or a number, and contain only lowercase letters, numbers and dashes (-). It is limited to 24 characters. Leading and trailing spaces are ignored. - \*\*Container image\*\* (mandatory): The URL of a public Docker [container image](/docs/concepts/containers/images/) on any registry, or a private image (commonly hosted on the Google Container Registry or Docker Hub). The container image specification must end with a colon. - \*\*Number of pods\*\* (mandatory): The target number of Pods you want your application to be deployed in. The value must be a positive integer. A
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
[
0.05264211446046829,
-0.0037333557847887278,
0.00729250255972147,
-0.02465123124420643,
0.0445278026163578,
-0.016155000776052475,
-0.023983296006917953,
0.02834390103816986,
0.0453646257519722,
0.07255307585000992,
-0.03650391474366188,
-0.06506664305925369,
0.022963017225265503,
0.0152904586866498,
0.01630810648202896,
-0.07294003665447235,
0.06986086070537567,
-0.028844688087701797,
-0.03817746788263321,
-0.03972256928682327,
-0.03323763608932495,
0.004983673803508282,
-0.03868182376027107,
0.009102791547775269,
-0.05760759487748146,
0.08097582310438156,
-0.09200575947761536,
-0.04060651734471321,
0.008616362698376179,
0.005679943133145571,
-0.08030256628990173,
-0.0036244585644453764,
-0.02905561774969101,
0.02365788444876671,
-0.0012544479686766863,
0.08581805974245071,
0.055111780762672424,
-0.006090944167226553,
-0.07572149485349655,
-0.01783154159784317,
-0.019225191324949265,
-0.04354694113135338,
-0.0942368134856224,
-0.060708604753017426,
0.03141389787197113,
-0.08728525042533875,
-0.10707803070545197,
-0.09385578334331512,
0.005957143381237984,
-0.01334879919886589,
-0.011332078836858273,
-0.04331589117646217,
0.05848023667931557,
-0.007701767608523369,
0.015439636074006557,
0.06989557296037674,
-0.009941996075212955,
0.031730931252241135,
0.08926428109407425,
-0.00564227718859911,
0.05571744218468666,
-0.01880740001797676,
0.05481233820319176,
0.01247198972851038,
0.011843682266771793,
-0.01232537254691124,
-0.009767942130565643,
-0.028454342857003212,
0.03179074823856354,
-0.013022780418395996,
0.0826263502240181,
-0.026131151244044304,
-0.02799035981297493,
-0.03761779144406319,
-0.030466115102171898,
0.015619684010744095,
-0.004356736317276955,
0.015297668054699898,
-0.03188599646091461,
-0.01115970965474844,
0.029399432241916656,
0.08656749874353409,
0.009976953268051147,
0.04067342355847359,
-0.04897012934088707,
0.011962257325649261,
0.006486950907856226,
-0.07050382345914841,
0.0018235448515042663,
-0.04029347747564316,
0.021044036373496056,
-0.03634198382496834,
-0.000536167761310935,
-0.10622216761112213,
0.04164467006921768,
-0.0258820578455925,
-0.02138885296881199,
0.021783478558063507,
0.04616871476173401,
0.04021839052438736,
0.03652893006801605,
-0.06097406893968582,
0.02343766763806343,
-0.01760614849627018,
-0.008184979669749737,
-0.04050079733133316,
-0.05497027561068535,
0.02720572240650654,
-0.006822218652814627,
0.05444902554154396,
0.004411978647112846,
0.038626860827207565,
-0.06851823627948761,
0.0392410047352314,
0.029127078130841255,
-0.01254513394087553,
-0.03514100983738899,
-0.06451364606618881,
-0.03905877843499184,
0.16552886366844177,
0.09087719768285751,
-0.03421950340270996,
0.031181305646896362,
0.03253573551774025,
0.028229888528585434,
0.08754581212997437,
-0.053084518760442734,
3.98727610330523e-33,
0.006698490586131811,
-0.05220397934317589,
0.04235687479376793,
0.01737949438393116,
0.04947599396109581,
-0.03996707499027252,
-0.056318387389183044,
0.0017390360590070486,
0.011343962512910366,
-0.025816602632403374,
0.0046286312863230705,
0.17419344186782837,
0.01974947564303875,
-0.027338478714227676,
0.022334929555654526,
-0.0020251732785254717,
-0.013005133718252182,
0.028874952346086502,
0.06470002233982086,
-0.09216903895139694,
0.041845157742500305,
-0.10195343941450119,
-0.06736096739768982,
0.04231565445661545,
0.0412616990506649,
0.026324562728405,
0.05254343897104263,
-0.03137675300240517,
-0.010541794821619987,
0.037912461906671524,
-0.008780182339251041,
0.0000781715425546281,
0.03727329894900322,
-0.037562351673841476,
-0.07677360624074936,
-0.04446210712194443,
-0.051382601261138916,
-0.007647209335118532,
-0.07611659169197083,
-0.005323208402842283,
-0.048262760043144226,
-0.0229079257696867,
-0.03471023589372635,
-0.007599739357829094,
0.045545052736997604,
-0.0016058164183050394,
0.05803161859512329,
-0.0393967479467392,
0.05138993635773659,
-0.040189195424318314,
-0.052789025008678436,
-0.07110327482223511,
0.0683889165520668,
0.0393243245780468,
0.03411179780960083,
0.051329076290130615,
0.1444292962551117,
-0.08089233189821243,
-0.04263107478618622,
-0.011104791425168514,
-0.04414718598127365,
-0.06816553324460983,
-0.10718443244695663,
-0.044452983886003494,
0.00215007527731359,
0.002533098915591836,
-0.007465885952115059,
0.14200720191001892,
-0.04445432126522064,
0.013229072093963623,
-0.07335066795349121,
-0.00943965744227171,
0.02814599871635437,
0.06400792300701141,
0.05914869159460068,
-0.06445132941007614,
0.023163970559835434,
0.019741272553801537,
-0.1519717574119568,
0.016651621088385582,
-0.026036353781819344,
-0.04665381833910942,
-0.04255612939596176,
0.08073113858699799,
0.048596423119306564,
-0.08011431992053986,
0.031565770506858826,
0.05486097186803818,
-0.041053656488657,
0.047922056168317795,
0.02239602617919445,
0.004541669972240925,
-0.05267704278230667,
0.045987535268068314,
-0.12481653690338135,
-5.929891455318419e-33,
0.01771811582148075,
0.05285055562853813,
-0.022537028416991234,
-0.02323240041732788,
0.07393886893987656,
0.03163382411003113,
0.0065277148969471455,
0.0839507132768631,
-0.0512743815779686,
-0.10790315270423889,
-0.06362750381231308,
-0.03609587997198105,
-0.0005577572155743837,
0.0411846861243248,
-0.15679144859313965,
0.0698690339922905,
-0.03608887270092964,
-0.055558960884809494,
-0.016186056658625603,
0.0401543453335762,
-0.06491538137197495,
-0.07867763191461563,
0.08798515051603317,
-0.01782306283712387,
-0.048632510006427765,
0.02198946848511696,
0.026584597304463387,
-0.023874079808592796,
-0.03480906784534454,
0.04456770792603493,
0.01130812056362629,
-0.0984569787979126,
-0.017851509153842926,
0.046463485807180405,
0.08375009149312973,
-0.004139926750212908,
0.030190911144018173,
-0.02955194190144539,
-0.05225776508450508,
-0.05420149862766266,
-0.007533367723226547,
0.010759539902210236,
0.02230261079967022,
0.008719016797840595,
-0.020946230739355087,
0.025870641693472862,
0.036735065281391144,
0.00843888334929943,
-0.08772099018096924,
-0.09612953662872314,
-0.01769692450761795,
-0.016958048567175865,
-0.009107580408453941,
0.06503946334123611,
-0.05697173252701759,
0.035175420343875885,
0.03969314321875572,
0.07400348037481308,
-0.030801922082901,
0.04850645363330841,
0.04267727583646774,
-0.05129730701446533,
-0.010913904756307602,
0.030504541471600533,
-0.03147902339696884,
-0.05826125666499138,
0.003035524860024452,
0.04171910881996155,
-0.0658382847905159,
0.08801239728927612,
-0.014740737155079842,
-0.010802499018609524,
0.0007954195025376976,
0.00008729761611903086,
-0.033209383487701416,
-0.01471706572920084,
0.04597404971718788,
-0.07583164423704147,
0.04188007116317749,
-0.040868472307920456,
0.034717269241809845,
0.02591882087290287,
-0.05557145178318024,
-0.06207824870944023,
0.024930274114012718,
0.06589912623167038,
0.0448685958981514,
0.060408856719732285,
0.05604216828942299,
0.09761088341474533,
-0.05162722244858742,
0.04837554320693016,
-0.06108018010854721,
0.11147341877222061,
-0.0005200323648750782,
-5.075878917182308e-8,
0.04429420456290245,
0.019556080922484398,
0.016449004411697388,
0.020648783072829247,
0.03994806855916977,
-0.01989786885678768,
0.07303567975759506,
0.028944337740540504,
-0.04713178053498268,
0.01082820538431406,
-0.05511633679270744,
0.023324953392148018,
-0.1134958267211914,
0.008396519348025322,
0.01725284941494465,
-0.00434022257104516,
-0.00871336366981268,
0.07509002834558487,
0.04922761768102646,
-0.08972068130970001,
-0.04433225467801094,
-0.015266922302544117,
0.05126965045928955,
-0.012967430986464024,
0.04877858981490135,
-0.009874390438199043,
0.005596213974058628,
-0.0042642042972147465,
-0.04251899570226669,
-0.06195550784468651,
-0.05676912143826485,
0.0014549741754308343,
-0.048044297844171524,
0.07929988950490952,
0.008236875757575035,
0.009434129111468792,
-0.15702924132347107,
0.04907384514808655,
0.020169464871287346,
-0.019572589546442032,
0.03305594623088837,
0.06066140532493591,
-0.05121438205242157,
-0.004879812244325876,
0.03479298576712608,
0.10018904507160187,
-0.031701408326625824,
0.03300164267420769,
0.03959397226572037,
-0.04075673967599869,
0.000900826882570982,
-0.0947892814874649,
0.0029344239737838507,
0.06809692829847336,
-0.05041450262069702,
0.05292551964521408,
0.011898105032742023,
-0.05990701541304588,
0.07997484505176544,
-0.006933667231351137,
-0.027814846485853195,
0.045291975140571594,
0.00298480037599802,
-0.013399012386798859
] | 0.186722
|
registry, or a private image (commonly hosted on the Google Container Registry or Docker Hub). The container image specification must end with a colon. - \*\*Number of pods\*\* (mandatory): The target number of Pods you want your application to be deployed in. The value must be a positive integer. A [Deployment](/docs/concepts/workloads/controllers/deployment/) will be created to maintain the desired number of Pods across your cluster. - \*\*Service\*\* (optional): For some parts of your application (e.g. frontends) you may want to expose a [Service](/docs/concepts/services-networking/service/) onto an external, maybe public IP address outside of your cluster (external Service). {{< note >}} For external Services, you may need to open up one or more ports to do so. {{< /note >}} Other Services that are only visible from inside the cluster are called internal Services. Irrespective of the Service type, if you choose to create a Service and your container listens on a port (incoming), you need to specify two ports. The Service will be created mapping the port (incoming) to the target port seen by the container. This Service will route to your deployed Pods. Supported protocols are TCP and UDP. The internal DNS name for this Service will be the value you specified as application name above. If needed, you can expand the \*\*Advanced options\*\* section where you can specify more settings: - \*\*Description\*\*: The text you enter here will be added as an [annotation](/docs/concepts/overview/working-with-objects/annotations/) to the Deployment and displayed in the application's details. - \*\*Labels\*\*: Default [labels](/docs/concepts/overview/working-with-objects/labels/) to be used for your application are application name and version. You can specify additional labels to be applied to the Deployment, Service (if any), and Pods, such as release, environment, tier, partition, and release track. Example: ```conf release=1.0 tier=frontend environment=pod track=stable ``` - \*\*Namespace\*\*: Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called [namespaces](/docs/tasks/administer-cluster/namespaces/). They let you partition resources into logically named groups. Dashboard offers all available namespaces in a dropdown list, and allows you to create a new namespace. The namespace name may contain a maximum of 63 alphanumeric characters and dashes (-) but can not contain capital letters. Namespace names should not consist of only numbers. If the name is set as a number, such as 10, the pod will be put in the default namespace. In case the creation of the namespace is successful, it is selected by default. If the creation fails, the first namespace is selected. - \*\*Image Pull Secret\*\*: In case the specified Docker container image is private, it may require [pull secret](/docs/concepts/configuration/secret/) credentials. Dashboard offers all available secrets in a dropdown list, and allows you to create a new secret. The secret name must follow the DNS domain name syntax, for example `new.image-pull.secret`. The content of a secret must be base64-encoded and specified in a [`.dockercfg`](/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) file. The secret name may consist of a maximum of 253 characters. In case the creation of the image pull secret is successful, it is selected by default. If the creation fails, no secret is applied. - \*\*CPU requirement (cores)\*\* and \*\*Memory requirement (MiB)\*\*: You can specify the minimum [resource limits](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) for the container. By default, Pods run with unbounded CPU and memory limits. - \*\*Run command\*\* and \*\*Run command arguments\*\*: By default, your containers run the specified Docker image's default [entrypoint command](/docs/tasks/inject-data-application/define-command-argument-container/). You can use the command options and arguments to override the default. - \*\*Run as privileged\*\*: This setting determines whether processes in [privileged containers](/docs/concepts/workloads/pods/#privileged-mode-for-containers) are equivalent to processes running as root on the host. Privileged containers can make use of capabilities like manipulating the network stack and accessing devices. -
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
[
0.017195940017700195,
-0.05955560505390167,
0.02726096287369728,
-0.04812394082546234,
0.0010096397018060088,
-0.012180496007204056,
-0.014353416860103607,
0.014118922874331474,
-0.004780132789164782,
0.045121002942323685,
-0.016244467347860336,
-0.060574039816856384,
0.042441483587026596,
-0.026684900745749474,
0.10651553422212601,
-0.021139904856681824,
0.09783698618412018,
-0.04228490963578224,
-0.010115114971995354,
0.008673377335071564,
-0.030292067676782608,
0.06201019883155823,
-0.016220318153500557,
0.04189906641840935,
-0.09465205669403076,
0.003421757835894823,
-0.031059615314006805,
-0.07367470860481262,
0.02994975820183754,
0.011608541011810303,
-0.014296827837824821,
0.014072691090404987,
0.04983063042163849,
0.04057038947939873,
0.09091334789991379,
0.10481393337249756,
0.026192937046289444,
-0.023098818957805634,
-0.07203085720539093,
-0.016953622922301292,
0.07329165935516357,
-0.07879331707954407,
-0.06391317397356033,
-0.06053345650434494,
0.0019485316006466746,
-0.06296034902334213,
-0.04476596415042877,
-0.08027996867895126,
0.03492072969675064,
0.007742424961179495,
-0.019691962748765945,
-0.06314723193645477,
-0.030165182426571846,
0.06368228793144226,
-0.0340016707777977,
-0.02558678761124611,
-0.034076232463121414,
0.050117336213588715,
0.06530801206827164,
0.04272012040019035,
0.07865819334983826,
-0.047291871160268784,
0.028479907661676407,
-0.0513392798602581,
0.005293584894388914,
-0.029563480988144875,
0.015050415880978107,
0.023503558710217476,
0.0581592358648777,
-0.05477888509631157,
0.04945925995707512,
0.0887121707201004,
-0.009755766950547695,
-0.05710457265377045,
-0.07968594878911972,
0.008141664788126945,
0.005911379586905241,
0.02028641849756241,
-0.004426533821970224,
-0.009254402481019497,
0.04029647260904312,
0.049560219049453735,
0.06798192858695984,
0.0652729943394661,
-0.10990429669618607,
-0.010654274374246597,
-0.0009930847445502877,
-0.07436186075210571,
0.05319199711084366,
-0.008224698714911938,
-0.003032727399840951,
-0.04670589044690132,
-0.004466230049729347,
-0.09390775859355927,
0.039978887885808945,
-0.017141440883278847,
-0.052530687302351,
-0.03528739884495735,
0.03286193311214447,
0.03022066317498684,
0.05080058425664902,
-0.06578467041254044,
0.003410247154533863,
0.019546976312994957,
0.029250171035528183,
-0.002463485347107053,
-0.08012345433235168,
-0.03527121618390083,
0.05129898712038994,
0.053765326738357544,
0.024761559441685677,
0.04195687919855118,
-0.06427735835313797,
0.02353120781481266,
-0.10001618415117264,
-0.014456203207373619,
0.025498876348137856,
-0.06790892779827118,
0.041530266404151917,
0.07817541807889938,
0.035061225295066833,
-0.07696913182735443,
0.06971023976802826,
-0.0407521054148674,
-0.01857166364789009,
0.03548397868871689,
-0.05540934205055237,
2.1234719537139136e-33,
0.0076713552698493,
-0.1143968477845192,
0.04843299090862274,
0.01928120106458664,
0.07763617485761642,
-0.03843380883336067,
-0.039681900292634964,
-0.013682167045772076,
-0.011538015678524971,
-0.021595647558569908,
-0.041382305324077606,
0.10844477266073227,
0.032840996980667114,
0.018967030569911003,
-0.004479641560465097,
-0.02780134417116642,
-0.031915634870529175,
0.047857314348220825,
0.1252289116382599,
-0.06842107325792313,
-0.040756579488515854,
-0.048499032855033875,
-0.10096710920333862,
-0.008734441362321377,
0.014280545525252819,
0.00016081391368061304,
0.03251093998551369,
-0.12322276830673218,
-0.0015342505648732185,
0.023458972573280334,
0.07270005345344543,
-0.020593246445059776,
0.06916029751300812,
0.06688182801008224,
-0.030813204124569893,
-0.003693176666274667,
-0.05795492231845856,
-0.004834399092942476,
-0.043564051389694214,
-0.010058783926069736,
-0.007548867724835873,
-0.012348328717052937,
-0.041496023535728455,
-0.049190033227205276,
0.06272248923778534,
0.004512143321335316,
0.08539130538702011,
-0.10172943025827408,
0.0692947581410408,
-0.007030536886304617,
0.04490375146269798,
-0.07504083961248398,
-0.04884402081370354,
0.0031646541319787502,
0.00027005700394511223,
-0.015346424654126167,
0.0054663363844156265,
-0.006530300714075565,
-0.036877162754535675,
-0.026834240183234215,
-0.10637424141168594,
-0.01570136658847332,
0.02900654450058937,
0.030964229255914688,
0.021918809041380882,
0.031185757368803024,
-0.04180687665939331,
0.07750211656093597,
0.032898738980293274,
0.03946058452129364,
-0.0391116663813591,
0.02137531340122223,
0.03587904945015907,
0.04276908189058304,
-0.04465881362557411,
-0.060156580060720444,
0.05585740879178047,
0.046819183975458145,
-0.1353672593832016,
0.05478407070040703,
-0.036628711968660355,
0.008022552356123924,
-0.08817116171121597,
0.11511123925447464,
0.010701801627874374,
-0.020529642701148987,
0.05104239284992218,
0.013653978705406189,
-0.04053124412894249,
0.0029223812744021416,
0.009653699584305286,
0.0070130485109984875,
-0.05639627203345299,
-0.014557207003235817,
-0.12246812134981155,
-5.23231159789621e-33,
0.06114907190203667,
0.01614367589354515,
-0.02174672670662403,
-0.03971872851252556,
0.005197976715862751,
0.006125269923359156,
0.07172436267137527,
0.060985635966062546,
-0.033227499574422836,
0.0009138636523857713,
-0.027895508334040642,
0.0659349337220192,
0.05852741375565529,
0.03714553639292717,
-0.1775050163269043,
0.015205035917460918,
-0.07491413503885269,
-0.04785700887441635,
0.00910109467804432,
0.022292036563158035,
-0.07348619401454926,
-0.035755448043346405,
0.1095920130610466,
0.0723387598991394,
-0.0170893594622612,
-0.014304705895483494,
-0.011675689369440079,
-0.030788574367761612,
-0.049137745052576065,
-0.02819020487368107,
0.0047129495069384575,
-0.022643771022558212,
0.017393413931131363,
0.01862991787493229,
0.0466955192387104,
-0.02745901606976986,
-0.03164323419332504,
0.038809243589639664,
0.003337883623316884,
-0.0392930768430233,
-0.019120465964078903,
-0.08305186778306961,
-0.012897980399429798,
-0.027684837579727173,
-0.0565045140683651,
-0.03989405930042267,
0.004926726687699556,
-0.022932305932044983,
-0.06780347228050232,
-0.042058996856212616,
-0.034288618713617325,
-0.05974418297410011,
-0.08027961105108261,
0.084208644926548,
-0.014190592803061008,
0.0619979202747345,
-0.011461809277534485,
0.061890844255685806,
-0.05482710897922516,
0.07143016159534454,
0.147793248295784,
-0.1304023414850235,
-0.022506164386868477,
0.06213643029332161,
-0.021319221705198288,
-0.05759011581540108,
-0.030911967158317566,
0.033649615943431854,
-0.10346938669681549,
0.052108243107795715,
-0.028164373710751534,
0.011251527816057205,
0.029653780162334442,
0.0762956440448761,
-0.05683988705277443,
-0.047255098819732666,
0.026264436542987823,
-0.08458375930786133,
0.07060618698596954,
0.01610766537487507,
-0.04262252897024155,
0.0867701917886734,
-0.04814493656158447,
-0.04573265090584755,
0.019438764080405235,
-0.0071422504261136055,
0.12662038207054138,
0.063107930123806,
0.07516463845968246,
0.03739885240793228,
-0.037900228053331375,
0.01723913662135601,
-0.04809168726205826,
0.05539220944046974,
-0.03370608761906624,
-5.5518054153935736e-8,
0.0632818266749382,
0.027793429791927338,
0.005654164124280214,
0.023957770317792892,
-0.057458605617284775,
-0.02906782552599907,
0.014146615751087666,
0.005261490121483803,
-0.01857840083539486,
0.02192266657948494,
-0.030502593144774437,
0.01367208082228899,
-0.11665279418230057,
0.04902520030736923,
0.02540699578821659,
-0.007016547489911318,
0.0002348108246224001,
0.015003311447799206,
-0.008669224567711353,
-0.07023748755455017,
-0.09912212938070297,
-0.043456271290779114,
0.03768026456236839,
0.018207542598247528,
-0.002602809341624379,
0.0647132396697998,
0.0492178276181221,
-0.021259231492877007,
0.026095693930983543,
0.0021351329050958157,
-0.0019814500119537115,
-0.02779570035636425,
-0.059518273919820786,
0.014425688423216343,
-0.05639588460326195,
0.03845958411693573,
-0.11263920366764069,
0.025254331529140472,
0.036290209740400314,
0.040083035826683044,
-0.017369195818901062,
-0.02339138649404049,
-0.01382178720086813,
-0.037992846220731735,
0.0224850345402956,
0.08153818547725677,
-0.013109593652188778,
0.0551581010222435,
-0.026921331882476807,
0.06657517701387405,
0.03671259060502052,
-0.029165981337428093,
0.03136446699500084,
0.08339148759841919,
0.04303457587957382,
0.01905525103211403,
-0.030030639842152596,
-0.01897021383047104,
0.0353325754404068,
0.0237461868673563,
-0.01998765952885151,
0.10216481983661652,
0.012094040401279926,
-0.015400838106870651
] | 0.143982
|
You can use the command options and arguments to override the default. - \*\*Run as privileged\*\*: This setting determines whether processes in [privileged containers](/docs/concepts/workloads/pods/#privileged-mode-for-containers) are equivalent to processes running as root on the host. Privileged containers can make use of capabilities like manipulating the network stack and accessing devices. - \*\*Environment variables\*\*: Kubernetes exposes Services through [environment variables](/docs/tasks/inject-data-application/environment-variable-expose-pod-information/). You can compose environment variable or pass arguments to your commands using the values of environment variables. They can be used in applications to find a Service. Values can reference other variables using the `$(VAR\_NAME)` syntax. ### Uploading a YAML or JSON file Kubernetes supports declarative configuration. In this style, all configuration is stored in manifests (YAML or JSON configuration files). The manifests use Kubernetes [API](/docs/concepts/overview/kubernetes-api/) resource schemas. As an alternative to specifying application details in the deploy wizard, you can define your application in one or more manifests, and upload the files using Dashboard. ## Using Dashboard Following sections describe views of the Kubernetes Dashboard UI; what they provide and how can they be used. ### Navigation When there are Kubernetes objects defined in the cluster, Dashboard shows them in the initial view. By default only objects from the \_default\_ namespace are shown and this can be changed using the namespace selector located in the navigation menu. Dashboard shows most Kubernetes object kinds and groups them in a few menu categories. #### Admin overview For cluster and namespace administrators, Dashboard lists Nodes, Namespaces and PersistentVolumes and has detail views for them. Node list view contains CPU and memory usage metrics aggregated across all Nodes. The details view shows the metrics for a Node, its specification, status, allocated resources, events and pods running on the node. #### Workloads Shows all applications running in the selected namespace. The view lists applications by workload kind (for example: Deployments, ReplicaSets, StatefulSets). Each workload kind can be viewed separately. The lists summarize actionable information about the workloads, such as the number of ready pods for a ReplicaSet or current memory usage for a Pod. Detail views for workloads show status and specification information and surface relationships between objects. For example, Pods that ReplicaSet is controlling or new ReplicaSets and HorizontalPodAutoscalers for Deployments. #### Services Shows Kubernetes resources that allow for exposing services to external world and discovering them within a cluster. For that reason, Service and Ingress views show Pods targeted by them, internal endpoints for cluster connections and external endpoints for external users. #### Storage Storage view shows PersistentVolumeClaim resources which are used by applications for storing data. #### ConfigMaps and Secrets {#config-maps-and-secrets} Shows all Kubernetes resources that are used for live configuration of applications running in clusters. The view allows for editing and managing config objects and displays secrets hidden by default. #### Logs viewer Pod lists and detail pages link to a logs viewer that is built into Dashboard. The viewer allows for drilling down logs from containers belonging to a single Pod.  ## {{% heading "whatsnext" %}} For more information, see the [Kubernetes Dashboard project page](https://github.com/kubernetes/dashboard).
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/web-ui-dashboard.md
|
[
0.03597135469317436,
0.005024080164730549,
0.031792934983968735,
-0.02132726088166237,
-0.0697554424405098,
-0.04077007994055748,
0.0038224791642278433,
0.0344930998980999,
0.02780606411397457,
0.04970484972000122,
-0.052682872861623764,
-0.029625145718455315,
-0.01821274869143963,
0.027621671557426453,
0.1057310625910759,
-0.0007320935255847871,
0.11220765113830566,
0.015633447095751762,
-0.023973869159817696,
-0.016955450177192688,
0.02552083507180214,
0.027931179851293564,
-0.008023250848054886,
0.005685974843800068,
-0.12051340937614441,
-0.029226429760456085,
-0.03817562758922577,
-0.04463832825422287,
0.031166911125183105,
0.0050825029611587524,
-0.028109775856137276,
0.019855840131640434,
0.0463147833943367,
0.038281094282865524,
0.05453215911984444,
0.13485819101333618,
0.041413936764001846,
-0.071981281042099,
-0.05567361041903496,
0.03526934236288071,
0.05366235598921776,
-0.06892456114292145,
-0.1271674484014511,
-0.04163237661123276,
-0.033887315541505814,
-0.01603420451283455,
-0.014921695925295353,
-0.0914669930934906,
-0.02293083816766739,
0.00981137901544571,
0.04916330799460411,
-0.0638468936085701,
0.06208027899265289,
0.012269282713532448,
0.08365646749734879,
-0.015114793553948402,
-0.027804594486951828,
0.061569709330797195,
0.1083376407623291,
0.01130734384059906,
0.0037681497633457184,
-0.028017550706863403,
0.013749096542596817,
-0.0005676719010807574,
-0.00048423814587295055,
-0.020927106961607933,
-0.009949317201972008,
0.012661215849220753,
0.006776124704629183,
-0.023667436093091965,
0.03609815984964371,
0.01738365925848484,
-0.0065858019515872,
-0.07827946543693542,
-0.016421739012002945,
0.0069255889393389225,
-0.02633810229599476,
0.030387911945581436,
-0.05366105958819389,
-0.08357755094766617,
0.07141271978616714,
0.04091569408774376,
0.0042777215130627155,
0.023578086867928505,
-0.09900858253240585,
0.013189773075282574,
-0.04274028539657593,
-0.0582529716193676,
0.1427888721227646,
0.036617644131183624,
-0.017472021281719208,
-0.1139974296092987,
-0.0014109924668446183,
-0.12691070139408112,
0.03962499275803566,
0.026538191363215446,
-0.062418024986982346,
-0.044906437397003174,
0.02822907641530037,
-0.003210613736882806,
0.009678097441792488,
-0.019010119140148163,
-0.013842579908668995,
0.003220802638679743,
0.11598456650972366,
-0.029170408844947815,
-0.07403481751680374,
-0.05041112005710602,
0.007917573675513268,
0.06880836188793182,
0.0006487601203843951,
0.029905401170253754,
-0.012249104678630829,
0.014767593704164028,
0.02663053199648857,
-0.01236038189381361,
0.07063373178243637,
0.012895828112959862,
-0.004727128427475691,
0.0597430020570755,
0.013604034669697285,
-0.0844157338142395,
0.0085829459130764,
0.044576581567525864,
-0.03617379814386368,
0.04752567037940025,
-0.03708646446466446,
2.694314969347256e-33,
0.04057047888636589,
-0.10551915317773819,
0.09915350377559662,
-0.0035353652201592922,
0.030072739347815514,
-0.0874936580657959,
0.029892703518271446,
-0.007089537102729082,
0.002887457376345992,
0.0058191558346152306,
-0.037522271275520325,
0.10797201097011566,
0.008079971186816692,
-0.008325289003551006,
0.011462005786597729,
0.06896655261516571,
-0.07741227000951767,
0.010671352036297321,
0.1345823109149933,
-0.03057769313454628,
0.02591252326965332,
-0.0038993051275610924,
-0.08979061245918274,
0.04790571704506874,
0.047710273414850235,
-0.10800046473741531,
-0.008690422400832176,
-0.13265429437160492,
0.004755501169711351,
0.0006344945868477225,
0.005438061431050301,
-0.049163494259119034,
0.04829341173171997,
0.10417000949382782,
-0.1343952864408493,
0.012921253219246864,
-0.03772636875510216,
0.07614766061306,
-0.08881860226392746,
-0.015947025269269943,
0.034540269523859024,
-0.00980265811085701,
-0.012281087227165699,
-0.02224610187113285,
0.02871839702129364,
-0.043348126113414764,
0.014543469995260239,
-0.09770166128873825,
0.045371998101472855,
-0.009145062416791916,
-0.023078912869095802,
-0.020639559254050255,
0.05771225318312645,
-0.09980050474405289,
0.10108339041471481,
-0.020945526659488678,
0.057442598044872284,
-0.04546477273106575,
-0.054844990372657776,
-0.05977523699402809,
-0.08249618858098984,
-0.03150292858481407,
-0.006534448359161615,
0.03712514787912369,
0.027185145765542984,
-0.014520908705890179,
-0.002771713538095355,
0.01871679536998272,
-0.016478832811117172,
0.03584984317421913,
-0.10604225099086761,
0.020195217803120613,
-0.08539672195911407,
0.04057426378130913,
-0.041398294270038605,
-0.03590552136301994,
0.046936482191085815,
0.025734201073646545,
-0.07152876257896423,
0.01993480883538723,
0.002837809966877103,
-0.007281287107616663,
-0.045804817229509354,
0.11354853957891464,
0.017101464793086052,
-0.036838728934526443,
-0.011228207498788834,
-0.04537789896130562,
0.01995972730219364,
-0.011395902372896671,
0.004381266422569752,
-0.010445275343954563,
-0.06121372431516647,
0.005538530647754669,
-0.1422339826822281,
-5.439693413294232e-33,
0.112642802298069,
-0.012527630664408207,
-0.04492783918976784,
0.037325311452150345,
-0.052370358258485794,
0.03139929845929146,
0.058392152190208435,
-0.0009114426793530583,
-0.036931589245796204,
-0.053158752620220184,
-0.0531340055167675,
0.009115546941757202,
0.013356867246329784,
0.03616991639137268,
-0.07183753699064255,
0.027103787288069725,
-0.12613201141357422,
0.007004788611084223,
-0.019427550956606865,
0.005556522868573666,
-0.09574469178915024,
0.020168107002973557,
0.12284097820520401,
0.06532208621501923,
0.004351248499006033,
-0.03603202849626541,
0.024639654904603958,
0.014716978184878826,
-0.0389457643032074,
-0.037923894822597504,
-0.01820242404937744,
-0.06875596195459366,
0.00328049436211586,
0.03977854177355766,
-0.015406402759253979,
-0.023362325504422188,
-0.02898356132209301,
0.08531168848276138,
0.025389092043042183,
0.009838812984526157,
0.02107056975364685,
-0.010830778628587723,
-0.03477383777499199,
0.010111536830663681,
-0.07321430742740631,
0.018109265714883804,
0.00459509389474988,
-0.055146437138319016,
-0.016657428815960884,
-0.09377633035182953,
-0.017016073688864708,
0.013953646644949913,
-0.045476846396923065,
0.12981027364730835,
-0.011010663583874702,
0.011729366146028042,
0.049967315047979355,
-0.014856639318168163,
-0.03906325250864029,
0.03530372306704521,
0.11701128631830215,
-0.0909762904047966,
0.04113438352942467,
0.024769049137830734,
-0.08877669274806976,
-0.04735575616359711,
-0.018957938998937607,
0.05018535256385803,
-0.06475182622671127,
0.0069372160360217094,
0.012827547267079353,
-0.07382530719041824,
-0.011603370308876038,
0.03713570535182953,
-0.025469180196523666,
-0.05034790560603142,
0.04181133583188057,
-0.05971870198845863,
0.03634592145681381,
0.0466071180999279,
-0.03197032958269119,
0.06262621283531189,
-0.05371563509106636,
0.010865297168493271,
-0.004561243578791618,
0.04408571869134903,
0.0725383386015892,
0.09973292052745819,
0.05568227916955948,
0.07686511427164078,
-0.0012182140490040183,
0.052348800003528595,
-0.04975220561027527,
0.04691946506500244,
-0.045905377715826035,
-4.8985739908857795e-8,
0.019844405353069305,
-0.015283879823982716,
0.005566260311752558,
0.06387051939964294,
-0.0262571070343256,
-0.010368126444518566,
0.014351648278534412,
0.01885399967432022,
-0.020499378442764282,
-0.0045020077377557755,
-0.02863854542374611,
0.055954623967409134,
-0.022869421169161797,
-0.017076633870601654,
0.028572358191013336,
0.01778225414454937,
0.04091019183397293,
0.06282339990139008,
0.014639822766184807,
-0.010393609292805195,
-0.06163087859749794,
-0.01789090596139431,
-0.02109101042151451,
-0.028516164049506187,
0.04629693552851677,
0.10753100365400314,
-0.009178479202091694,
-0.024732032790780067,
0.03831349313259125,
0.02688184753060341,
0.020099246874451637,
-0.021394211798906326,
-0.06633732467889786,
0.059154074639081955,
-0.044381264597177505,
-0.01953398995101452,
-0.11417648196220398,
-0.012007948942482471,
-0.007270383182913065,
0.0624774806201458,
-0.05192016065120697,
0.014867116697132587,
-0.07152702659368515,
-0.028700660914182663,
-0.045406315475702286,
0.06922557950019836,
0.041860517114400864,
0.09131395816802979,
-0.0008545701275579631,
0.02804434858262539,
-0.012365818955004215,
0.01027667336165905,
0.024557188153266907,
0.08357042074203491,
0.02270328626036644,
0.03554249554872513,
-0.007505412213504314,
-0.021589305251836777,
-0.02021949179470539,
0.0374787263572216,
-0.027949169278144836,
0.01481564063578844,
0.0064001539722085,
0.006746335420757532
] | 0.129428
|
This page shows how to use kubectl to list all of the Container images for Pods running in a cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} In this exercise you will use kubectl to fetch all of the Pods running in a cluster, and format the output to pull out the list of Containers for each. ## List all Container images in all namespaces - Fetch all Pods in all namespaces using `kubectl get pods --all-namespaces` - Format the output to include only the list of Container image names using `-o jsonpath={.items[\*].spec['initContainers', 'containers'][\*].image}`. This will recursively parse out the `image` field from the returned json. - See the [jsonpath reference](/docs/reference/kubectl/jsonpath/) for further information on how to use jsonpath. - Format the output using standard tools: `tr`, `sort`, `uniq` - Use `tr` to replace spaces with newlines - Use `sort` to sort the results - Use `uniq` to aggregate image counts ```shell kubectl get pods --all-namespaces -o jsonpath="{.items[\*].spec['initContainers', 'containers'][\*].image}" |\ tr -s '[[:space:]]' '\n' |\ sort |\ uniq -c ``` The jsonpath is interpreted as follows: - `.items[\*]`: for each returned value - `.spec`: get the spec - `['initContainers', 'containers'][\*]`: for each container - `.image`: get the image {{< note >}} When fetching a single Pod by name, for example `kubectl get pod nginx`, the `.items[\*]` portion of the path should be omitted because a single Pod is returned instead of a list of items. {{< /note >}} ## List Container images by Pod The formatting can be controlled further by using the `range` operation to iterate over elements individually. ```shell kubectl get pods --all-namespaces -o jsonpath='{range .items[\*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[\*]}{.image}{", "}{end}{end}' |\ sort ``` ## List Container images filtering by Pod label To target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching `app=nginx`. ```shell kubectl get pods --all-namespaces -o jsonpath="{.items[\*].spec.containers[\*].image}" -l app=nginx ``` ## List Container images filtering by Pod namespace To target only pods in a specific namespace, use the namespace flag. The following matches only Pods in the `kube-system` namespace. ```shell kubectl get pods --namespace kube-system -o jsonpath="{.items[\*].spec.containers[\*].image}" ``` ## List Container images using a go-template instead of jsonpath As an alternative to jsonpath, Kubectl supports using [go-templates](https://pkg.go.dev/text/template) for formatting the output: ```shell kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}" ``` ## {{% heading "whatsnext" %}} ### Reference \* [Jsonpath](/docs/reference/kubectl/jsonpath/) reference guide \* [Go template](https://pkg.go.dev/text/template) reference guide
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md
|
[
0.0721665620803833,
0.05248848348855972,
0.04806385561823845,
0.029785871505737305,
0.048204608261585236,
-0.010580992326140404,
0.0015779644018039107,
0.011350600980222225,
-0.027262883260846138,
0.011286734603345394,
-0.0010211964836344123,
-0.08380141854286194,
0.03338054567575455,
-0.0024270163848996162,
0.027805257588624954,
-0.04136645421385765,
-0.001234202878549695,
0.008623999543488026,
0.021488646045327187,
-0.12100119888782501,
0.003900326555594802,
0.013436407782137394,
0.06295693665742874,
-0.049317616969347,
-0.06544611603021622,
0.0920695811510086,
-0.012952878139913082,
-0.07140574604272842,
-0.02242356166243553,
-0.028417741879820824,
-0.032537441700696945,
-0.02035718411207199,
0.052706506103277206,
0.059966251254081726,
0.1521940678358078,
0.0962691679596901,
0.011061661876738071,
-0.027226192876696587,
-0.002392352558672428,
-0.050997987389564514,
0.022225383669137955,
0.0025523025542497635,
-0.04647510498762131,
-0.046998608857393265,
0.04052530229091644,
-0.026465995237231255,
-0.0784912258386612,
-0.13171568512916565,
0.025783363729715347,
-0.022108376026153564,
-0.05244675278663635,
-0.06262344121932983,
0.014040201902389526,
0.017631730064749718,
0.07958970963954926,
0.07083085179328918,
-0.008136173710227013,
0.024417687207460403,
0.03668278455734253,
0.04249706119298935,
0.01569027453660965,
-0.08040914684534073,
-0.014776816591620445,
-0.04729347676038742,
-0.01964452676475048,
-0.014738934114575386,
0.010869004763662815,
0.05414217710494995,
0.09046928584575653,
-0.0944627895951271,
0.022396953776478767,
0.02164626680314541,
0.07321739196777344,
-0.049658890813589096,
-0.047477394342422485,
0.016868533566594124,
0.010629226453602314,
0.05781043320894241,
-0.04241892695426941,
-0.05064132809638977,
-0.012425312772393227,
0.02825506217777729,
0.019597167149186134,
-0.043421193957328796,
-0.03308719024062157,
0.01576996222138405,
-0.043065108358860016,
-0.05530280992388725,
0.033428993076086044,
-0.06720620393753052,
-0.07853378355503082,
-0.14029696583747864,
-0.023962493985891342,
-0.0484357513487339,
0.10350446403026581,
0.02957216463983059,
-0.0049293930642306805,
-0.0418926477432251,
0.06550300866365433,
0.013593967072665691,
0.003257264383137226,
-0.014622577466070652,
0.04139332473278046,
-0.029186399653553963,
0.02754506841301918,
0.000507648685015738,
-0.048741523176431656,
-0.021515123546123505,
0.039694782346487045,
0.050087615847587585,
-0.0334695428609848,
0.04208824411034584,
-0.07012860476970673,
0.04761599749326706,
-0.00911079440265894,
-0.0951007604598999,
0.04478343576192856,
-0.04835786297917366,
0.01582637056708336,
0.04042607918381691,
0.10034782439470291,
-0.0754580870270729,
0.06691554188728333,
0.006680944934487343,
-0.011711396276950836,
-0.049719735980033875,
-0.08413336426019669,
4.573902885663246e-33,
0.05181065946817398,
-0.080309197306633,
0.15504926443099976,
-0.0374707356095314,
0.008696549572050571,
-0.09983430057764053,
0.0012727695284411311,
0.035404134541749954,
0.004435135517269373,
0.006271687336266041,
-0.05164731666445732,
0.09992314875125885,
-0.04275020211935043,
0.040065426379442215,
-0.04952836036682129,
-0.024127522483468056,
-0.07702890038490295,
0.05365027114748955,
0.07803545892238617,
0.004212961997836828,
-0.03419125825166702,
-0.04681261256337166,
-0.08188698440790176,
0.025145862251520157,
-0.017696712166070938,
-0.051770396530628204,
0.06452415138483047,
-0.10806916654109955,
-0.014060461893677711,
0.01645166054368019,
-0.02038498781621456,
-0.05754895880818367,
-0.005282495636492968,
0.03418412432074547,
-0.09723877161741257,
0.03281840309500694,
0.02330881915986538,
0.056552495807409286,
-0.09262026101350784,
-0.0033071348443627357,
0.046906258910894394,
-0.004478581249713898,
0.04495341703295708,
-0.026463039219379425,
0.022884974256157875,
0.004823264200240374,
-0.01503276452422142,
-0.10007694363594055,
0.06493773311376572,
0.0071956398896873,
-0.0030857406090945005,
-0.0749090239405632,
-0.03313376381993294,
-0.03350028395652771,
0.036522891372442245,
0.004420950543135405,
0.061928506940603256,
0.019819919019937515,
0.025318345054984093,
-0.034838758409023285,
-0.043306559324264526,
0.008907543495297432,
-0.060205843299627304,
0.03811675310134888,
0.005987444892525673,
0.02475152350962162,
0.0021541272290050983,
0.042658399790525436,
-0.018452636897563934,
0.0817251205444336,
-0.055379074066877365,
0.07619037479162216,
-0.0357154943048954,
-0.05364401265978813,
0.05369681864976883,
-0.01020137034356594,
0.005289724096655846,
0.007829166017472744,
-0.14430208504199982,
0.054064422845840454,
0.028225047513842583,
0.016797054558992386,
-0.059153784066438675,
0.031212609261274338,
-0.004139663185924292,
0.047535572201013565,
0.03653789684176445,
-0.01749090850353241,
-0.01403022836893797,
-0.010131089948117733,
0.008652840740978718,
0.029139388352632523,
-0.10893144458532333,
0.00871491339057684,
-0.10785160958766937,
-4.5955587976832544e-33,
0.16767290234565735,
0.05500458553433418,
0.05397540703415871,
-0.06761327385902405,
0.061261989176273346,
-0.0035394749138504267,
0.01642283797264099,
0.05074133723974228,
0.001650518737733364,
-0.04955322667956352,
-0.0402187779545784,
-0.06541101634502411,
-0.019213251769542694,
-0.0005931107443757355,
-0.12590022385120392,
0.027644846588373184,
-0.028240099549293518,
-0.03870871663093567,
0.0069705103524029255,
0.03819476068019867,
-0.059937357902526855,
0.021500352770090103,
0.0753757581114769,
0.004816875793039799,
-0.03506077080965042,
0.0315704382956028,
0.06515688449144363,
-0.013510072603821754,
-0.05927710607647896,
0.04693826660513878,
0.011926938779652119,
-0.06987256556749344,
0.030122676864266396,
0.0768846869468689,
0.04515625163912773,
-0.04886487126350403,
-0.046600453555583954,
0.07804112881422043,
-0.018247069790959358,
0.004532953724265099,
0.029766201972961426,
-0.01191569771617651,
-0.09652189165353775,
-0.02192584052681923,
-0.0679599866271019,
-0.07836893200874329,
0.035718318074941635,
0.016300015151500702,
0.015361117199063301,
0.013634144328534603,
0.0005478232633322477,
-0.0621630921959877,
-0.14702951908111572,
0.020763443782925606,
-0.007397790439426899,
0.01334480568766594,
0.02356482297182083,
0.038652755320072174,
-0.023231519386172295,
-0.01781216450035572,
0.03406134247779846,
-0.09354738146066666,
0.05089868605136871,
0.0006878417916595936,
0.02113409899175167,
-0.0697510838508606,
-0.0716596320271492,
0.0012109380913898349,
-0.11030847579240799,
0.04927847906947136,
-0.04704362154006958,
0.008220917545258999,
0.021856289356946945,
0.07313711196184158,
0.014443638734519482,
-0.0027561860624700785,
-0.019811971113085747,
0.015691516920924187,
0.1099727526307106,
0.0024297754280269146,
-0.006731314584612846,
0.01447907742112875,
-0.04306739196181297,
0.017671236768364906,
0.04909755289554596,
0.060834478586912155,
0.08910337090492249,
0.06379956752061844,
0.057734403759241104,
0.0146145885810256,
0.05298655852675438,
0.010472466237843037,
0.08837354183197021,
0.0772031769156456,
0.012014993466436863,
-4.912504536491724e-8,
0.03964086249470711,
-0.05899892747402191,
-0.023664088919758797,
0.03944646194577217,
0.04131430387496948,
0.05415894836187363,
0.002766574267297983,
0.08653056621551514,
-0.012126251123845577,
-0.0064467317424714565,
0.01752806268632412,
0.017393792048096657,
-0.05442271754145622,
-0.002988117979839444,
0.010879386216402054,
0.043348465114831924,
0.02060098387300968,
0.10101526230573654,
0.023315634578466415,
-0.004774696659296751,
-0.04485103860497475,
-0.055769097059965134,
0.023719586431980133,
-0.0533163882791996,
-0.006691799033433199,
0.05920155718922615,
0.008230305276811123,
-0.013959373347461224,
0.04469496011734009,
-0.029530495405197144,
-0.02277718111872673,
-0.04305826127529144,
-0.06018252298235893,
0.02780159004032612,
0.04112975299358368,
-0.027188893407583237,
-0.057834409177303314,
0.021864350885152817,
0.0010912871221080422,
0.10009869188070297,
-0.05605020746588707,
-0.03522670269012451,
-0.05971662700176239,
-0.009775702841579914,
0.014736892655491829,
0.02205854468047619,
-0.033662065863609314,
0.07660821825265884,
-0.0145478630438447,
0.03713969513773918,
-0.07876851409673691,
-0.05746451020240784,
0.009057248942553997,
0.056659962981939316,
-0.06180817633867264,
0.034348104149103165,
0.03424876183271408,
-0.03485871106386185,
0.030791012570261955,
0.037294406443834305,
0.041971080005168915,
0.022478433325886726,
0.027233805507421494,
0.06643928587436676
] | 0.09176
|
This task shows how to create a \_frontend\_ and a \_backend\_ microservice. The backend microservice is a hello greeter. The frontend exposes the backend using nginx and a Kubernetes {{< glossary\_tooltip term\_id="service" >}} object. ## {{% heading "objectives" %}} \* Create and run a sample `hello` backend microservice using a {{< glossary\_tooltip term\_id="deployment" >}} object. \* Use a Service object to send traffic to the backend microservice's multiple replicas. \* Create and run a `nginx` frontend microservice, also using a Deployment object. \* Configure the frontend microservice to send traffic to the backend microservice. \* Use a Service object of `type=LoadBalancer` to expose the frontend microservice outside the cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} This task uses [Services with external load balancers](/docs/tasks/access-application-cluster/create-external-load-balancer/), which require a supported environment. If your environment does not support this, you can use a Service of type [NodePort](/docs/concepts/services-networking/service/#type-nodeport) instead. ## Creating the backend using a Deployment The backend is a simple hello greeter microservice. Here is the configuration file for the backend Deployment: {{% code\_sample file="service/access/backend-deployment.yaml" %}} Create the backend Deployment: ```shell kubectl apply -f https://k8s.io/examples/service/access/backend-deployment.yaml ``` View information about the backend Deployment: ```shell kubectl describe deployment backend ``` The output is similar to this: ``` Name: backend Namespace: default CreationTimestamp: Mon, 24 Oct 2016 14:21:02 -0700 Labels: app=hello tier=backend track=stable Annotations: deployment.kubernetes.io/revision=1 Selector: app=hello,tier=backend,track=stable Replicas: 3 desired | 3 updated | 3 total | 3 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 1 max unavailable, 1 max surge Pod Template: Labels: app=hello tier=backend track=stable Containers: hello: Image: "gcr.io/google-samples/hello-go-gke:1.0" Port: 80/TCP Environment: Mounts: Volumes: Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable OldReplicaSets: NewReplicaSet: hello-3621623197 (3/3 replicas created) Events: ... ``` ## Creating the `hello` Service object The key to sending requests from a frontend to a backend is the backend Service. A Service creates a persistent IP address and DNS name entry so that the backend microservice can always be reached. A Service uses {{< glossary\_tooltip text="selectors" term\_id="selector" >}} to find the Pods that it routes traffic to. First, explore the Service configuration file: {{% code\_sample file="service/access/backend-service.yaml" %}} In the configuration file, you can see that the Service, named `hello` routes traffic to Pods that have the labels `app: hello` and `tier: backend`. Create the backend Service: ```shell kubectl apply -f https://k8s.io/examples/service/access/backend-service.yaml ``` At this point, you have a `backend` Deployment running three replicas of your `hello` application, and you have a Service that can route traffic to them. However, this service is neither available nor resolvable outside the cluster. ## Creating the frontend Now that you have your backend running, you can create a frontend that is accessible outside the cluster, and connects to the backend by proxying requests to it. The frontend sends requests to the backend worker Pods by using the DNS name given to the backend Service. The DNS name is `hello`, which is the value of the `name` field in the `examples/service/access/backend-service.yaml` configuration file. The Pods in the frontend Deployment run a nginx image that is configured to proxy requests to the `hello` backend Service. Here is the nginx configuration file: {{% code\_sample file="service/access/frontend-nginx.conf" %}} Similar to the backend, the frontend has a Deployment and a Service. An important difference to notice between the backend and frontend services, is that the configuration for the frontend Service has `type: LoadBalancer`, which means that the Service uses a load balancer provisioned by your cloud provider and will be accessible from outside the cluster. {{% code\_sample file="service/access/frontend-service.yaml" %}} {{% code\_sample file="service/access/frontend-deployment.yaml" %}} Create the frontend Deployment and Service: ```shell
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md
|
[
-0.09898264706134796,
-0.031365953385829926,
0.017072435468435287,
-0.02581537701189518,
-0.08268455415964127,
-0.03611182048916817,
0.03833948075771332,
-0.0405791774392128,
0.034547969698905945,
0.06337469816207886,
-0.04952728748321533,
-0.10332263261079788,
0.02303318865597248,
-0.006448569241911173,
0.057195909321308136,
-0.007376314140856266,
0.05939358472824097,
-0.03750579059123993,
-0.03892016038298607,
-0.03385761380195618,
0.029607294127345085,
0.02853730134665966,
-0.00008946967136580497,
0.02998766489326954,
-0.03078477643430233,
-0.012537967413663864,
-0.02607385441660881,
-0.0004883427754975855,
0.031641196459531784,
0.021381299942731857,
0.03484531491994858,
0.045163217931985855,
-0.03034679777920246,
-0.002983364975079894,
0.033012088388204575,
0.15074971318244934,
0.01771637424826622,
-0.008426173590123653,
-0.0571211613714695,
0.021958250552415848,
0.09239822626113892,
-0.027397604659199715,
-0.05956554412841797,
-0.060706209391355515,
0.009334811009466648,
-0.041671521961688995,
-0.04085651785135269,
0.02703608013689518,
0.04260772839188576,
-0.02424599975347519,
-0.03823162987828255,
-0.18561317026615143,
0.0038688755594193935,
0.07368351519107819,
-0.03735250234603882,
-0.020953290164470673,
-0.022615719586610794,
-0.01614709384739399,
0.037026990205049515,
-0.030935579910874367,
0.014966029673814774,
-0.054321859031915665,
0.047083623707294464,
-0.020328888669610023,
0.029519161209464073,
-0.027082886546850204,
-0.05631360784173012,
-0.019332202151417732,
-0.024841422215104103,
-0.03230936825275421,
0.055599093437194824,
-0.017794575542211533,
-0.07445304840803146,
-0.021442970260977745,
-0.007587502710521221,
0.03270948678255081,
-0.06770522892475128,
0.056866712868213654,
0.01361960731446743,
-0.07960028201341629,
0.06308992952108383,
0.04117289185523987,
0.06764622777700424,
0.07567906379699707,
-0.07564472407102585,
-0.09122566878795624,
0.06531485915184021,
-0.03546292707324028,
0.017359759658575058,
-0.059415459632873535,
-0.047191519290208817,
0.026470119133591652,
0.025329995900392532,
-0.09337873011827469,
0.04290536791086197,
0.03764118626713753,
-0.07374682277441025,
-0.03561760112643242,
0.045193471014499664,
0.006667785812169313,
0.0033168327063322067,
-0.04829689860343933,
0.06221826374530792,
0.025697926059365273,
-0.007827243767678738,
-0.051355134695768356,
-0.067537821829319,
0.0014479306992143393,
0.04855162277817726,
0.03232811763882637,
0.004487793892621994,
0.1108270213007927,
-0.007215169724076986,
0.03154601901769638,
-0.0017690378008410335,
-0.06288120150566101,
0.04103970527648926,
-0.04142472892999649,
0.04130321368575096,
0.06481745094060898,
0.006954440847039223,
-0.07621892541646957,
-0.03230733051896095,
0.0012343907728791237,
0.08264224231243134,
0.04266181215643883,
0.00247432803735137,
4.2931265090777424e-33,
0.04026271030306816,
-0.02976684458553791,
0.01591343991458416,
0.020534653216600418,
0.033798638731241226,
-0.03033856675028801,
-0.05758727341890335,
-0.06166943907737732,
-0.021043341606855392,
-0.024725744500756264,
-0.02152116969227791,
0.09353480488061905,
0.023112067952752113,
0.004176814574748278,
0.02238396368920803,
-0.055798038840293884,
0.01636509783565998,
0.044014908373355865,
0.1291332244873047,
-0.002579279011115432,
0.036043569445610046,
-0.0488777831196785,
-0.042995572090148926,
0.021180564537644386,
0.08570825308561325,
0.006408213172107935,
0.05548080429434776,
-0.05488157272338867,
-0.003917978145182133,
-0.006988984066992998,
0.07529397308826447,
-0.027025384828448296,
0.020757388323545456,
0.00014285740326158702,
-0.15358012914657593,
-0.02896793931722641,
-0.07725202292203903,
-0.0200594961643219,
-0.05697786062955856,
-0.025075752288103104,
0.004349264316260815,
-0.030562639236450195,
-0.06277956068515778,
-0.047814566642045975,
-0.013256317004561424,
0.005228013265877962,
-0.04796629771590233,
-0.09472974389791489,
0.14380072057247162,
0.014900945127010345,
0.00834241695702076,
-0.08298607170581818,
0.016124596819281578,
-0.007266149390488863,
0.04612872004508972,
0.07235508412122726,
0.030752066522836685,
-0.016109293326735497,
-0.054729998111724854,
-0.021278131753206253,
-0.06660175323486328,
-0.052874624729156494,
-0.04334824159741402,
0.05164020508527756,
0.07580141723155975,
-0.0388951301574707,
-0.007923658937215805,
0.08137986063957214,
0.009101740084588528,
0.016396479681134224,
-0.02677970752120018,
0.030839208513498306,
0.03745216131210327,
0.06647182255983353,
0.002250663237646222,
-0.02511805109679699,
0.0023139372933655977,
0.044813964515924454,
-0.01782270520925522,
0.030128682032227516,
-0.02322014980018139,
-0.06773015856742859,
-0.08891080319881439,
0.09202400594949722,
0.017626876011490822,
-0.007620039861649275,
0.015677273273468018,
-0.05365905538201332,
-0.06176748499274254,
0.037746086716651917,
-0.06064191460609436,
-0.039061035960912704,
-0.0855332463979721,
0.015585513785481453,
-0.1206357330083847,
-5.9161047432931967e-33,
0.06402816623449326,
0.0224562119692564,
-0.01995677314698696,
0.039199694991111755,
0.06569501757621765,
0.05743249133229256,
0.05533339083194733,
0.09872009605169296,
-0.09048408269882202,
0.06378459930419922,
-0.032771699130535126,
0.006780195515602827,
-0.0026866658590734005,
0.07579247653484344,
-0.08669119328260422,
0.021717367693781853,
-0.003382055088877678,
0.0004797461733687669,
-0.014866393990814686,
0.04882548004388809,
-0.008988588117063046,
0.024791503325104713,
0.032905928790569305,
0.02128186821937561,
-0.038891009986400604,
-0.011714521795511246,
0.03803262114524841,
0.038972415030002594,
-0.07415357232093811,
-0.04724414274096489,
-0.03753424808382988,
-0.028089459985494614,
0.04347815364599228,
-0.02253083325922489,
0.0034477871377021074,
-0.04100370779633522,
0.0597141869366169,
0.015200217254459858,
0.0074480753391981125,
-0.04476073756814003,
0.0637398213148117,
-0.0711095780134201,
-0.0548703558743,
-0.08565840870141983,
-0.03992605581879616,
-0.04276764392852783,
-0.038931723684072495,
-0.02222011797130108,
-0.04475143551826477,
-0.03725622966885567,
-0.050700657069683075,
-0.03089899756014347,
-0.058638911694288254,
0.04827670007944107,
-0.08522501587867737,
-0.0034651358146220446,
0.09353118389844894,
0.00037787877954542637,
-0.035379018634557724,
0.04900258779525757,
0.04212876781821251,
-0.0824722945690155,
0.08810337632894516,
0.0193228330463171,
0.03602660447359085,
-0.01670212484896183,
-0.029963413253426552,
-0.005477607250213623,
-0.019325660541653633,
0.026522325351834297,
-0.036773622035980225,
0.01473196130245924,
0.07815573364496231,
0.03324763849377632,
0.052007488906383514,
0.02790875919163227,
0.05287006497383118,
-0.08426094800233841,
0.07248435914516449,
-0.06498308479785919,
-0.01642525941133499,
0.03503522276878357,
-0.06992471218109131,
0.020359095185995102,
0.026939256116747856,
0.025460461154580116,
0.07552971690893173,
0.10483997315168381,
0.07368627935647964,
0.07339458167552948,
-0.08313267678022385,
0.0060152760706841946,
0.04881814867258072,
0.051630858331918716,
-0.02955451048910618,
-5.2790088744814057e-8,
-0.011335556395351887,
0.096460722386837,
-0.01111536379903555,
0.06709803640842438,
-0.06823886930942535,
-0.009063435718417168,
0.004471831489354372,
-0.055873263627290726,
0.012893278151750565,
-0.04137210547924042,
-0.04239705950021744,
0.04038861766457558,
-0.04461189731955528,
0.07883834093809128,
0.0025450203102082014,
0.016049819067120552,
-0.028944194316864014,
-0.06319522112607956,
0.017312683165073395,
-0.0913337916135788,
-0.030708113685250282,
0.02571374736726284,
0.03326820954680443,
0.041469451040029526,
0.027631204575300217,
0.07706814259290695,
-0.021640663966536522,
0.0204754825681448,
-0.005673800595104694,
-0.013069016858935356,
-0.0034501561895012856,
0.0014125359011813998,
-0.0775294303894043,
0.0899280533194542,
-0.0681953877210617,
-0.023107627406716347,
-0.1365567147731781,
0.018153123557567596,
0.08406329900026321,
0.020912345498800278,
0.010147073306143284,
0.06653065234422684,
-0.05955803394317627,
-0.03346385806798935,
0.09311449527740479,
0.10929900407791138,
-0.0606948621571064,
0.03501036390662193,
-0.01327664777636528,
0.029969627037644386,
-0.05806971713900566,
-0.06952118873596191,
0.010854250751435757,
0.07999081164598465,
-0.03805246949195862,
-0.03333352506160736,
0.054793018847703934,
-0.03103688918054104,
0.0985422134399414,
0.046848148107528687,
0.020409397780895233,
-0.0009844031883403659,
-0.02351982146501541,
-0.004942948464304209
] | 0.131311
|
frontend services, is that the configuration for the frontend Service has `type: LoadBalancer`, which means that the Service uses a load balancer provisioned by your cloud provider and will be accessible from outside the cluster. {{% code\_sample file="service/access/frontend-service.yaml" %}} {{% code\_sample file="service/access/frontend-deployment.yaml" %}} Create the frontend Deployment and Service: ```shell kubectl apply -f https://k8s.io/examples/service/access/frontend-deployment.yaml kubectl apply -f https://k8s.io/examples/service/access/frontend-service.yaml ``` The output verifies that both resources were created: ``` deployment.apps/frontend created service/frontend created ``` {{< note >}} The nginx configuration is baked into the [container image](/examples/service/access/Dockerfile). A better way to do this would be to use a [ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/), so that you can change the configuration more easily. {{< /note >}} ## Interact with the frontend Service Once you've created a Service of type LoadBalancer, you can use this command to find the external IP: ```shell kubectl get service frontend --watch ``` This displays the configuration for the `frontend` Service and watches for changes. Initially, the external IP is listed as ``: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE frontend LoadBalancer 10.51.252.116 80/TCP 10s ``` As soon as an external IP is provisioned, however, the configuration updates to include the new IP under the `EXTERNAL-IP` heading: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE frontend LoadBalancer 10.51.252.116 XXX.XXX.XXX.XXX 80/TCP 1m ``` That IP can now be used to interact with the `frontend` service from outside the cluster. ## Send traffic through the frontend The frontend and backend are now connected. You can hit the endpoint by using the curl command on the external IP of your frontend Service. ```shell curl http://${EXTERNAL\_IP} # replace this with the EXTERNAL-IP you saw earlier ``` The output shows the message generated by the backend: ```json {"message":"Hello"} ``` ## {{% heading "cleanup" %}} To delete the Services, enter this command: ```shell kubectl delete services frontend backend ``` To delete the Deployments, the ReplicaSets and the Pods that are running the backend and frontend applications, enter this command: ```shell kubectl delete deployment frontend backend ``` ## {{% heading "whatsnext" %}} \* Learn more about [Services](/docs/concepts/services-networking/service/) \* Learn more about [ConfigMaps](/docs/tasks/configure-pod-container/configure-pod-configmap/) \* Learn more about [DNS for Service and Pods](/docs/concepts/services-networking/dns-pod-service/)
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md
|
[
-0.04378124698996544,
0.03635937348008156,
0.0006854239036329091,
-0.025999095290899277,
-0.028315825387835503,
-0.030333638191223145,
-0.008700333535671234,
-0.015988973900675774,
0.059211600571870804,
0.023218005895614624,
-0.0742916464805603,
-0.027717377990484238,
0.02781887724995613,
-0.057437870651483536,
0.09513450413942337,
-0.018058693036437035,
0.062110014259815216,
-0.002984335646033287,
-0.039650239050388336,
-0.005197617691010237,
-0.014451244845986366,
0.05381898581981659,
-0.00942195113748312,
0.033912111073732376,
-0.01655888371169567,
-0.0019609699957072735,
-0.053152330219745636,
-0.016585063189268112,
0.06840787827968597,
-0.012335655279457569,
0.005608178209513426,
0.03877953067421913,
-0.026405001059174538,
-0.007524253334850073,
0.004621341824531555,
0.15533773601055145,
0.04264958202838898,
-0.06432841718196869,
-0.051619358360767365,
0.041229814291000366,
0.09459269046783447,
0.01610787957906723,
-0.0360804945230484,
-0.0616832934319973,
0.01646709255874157,
-0.04217434674501419,
-0.03727458789944649,
0.002620265120640397,
0.0029675632249563932,
-0.028158174827694893,
-0.004094595555216074,
-0.11690940707921982,
-0.005166089162230492,
0.0525936521589756,
-0.07452606409788132,
-0.007783747743815184,
-0.0043350509367883205,
0.014776239171624184,
0.07398343831300735,
-0.0026666035410016775,
0.004879004321992397,
-0.02731923945248127,
0.10684827715158463,
-0.02456137165427208,
0.022620277479290962,
-0.04216625541448593,
-0.03326017037034035,
-0.03893952816724777,
-0.02144719287753105,
-0.06279244273900986,
0.07691929489374161,
0.05257721617817879,
-0.03330877050757408,
-0.05564379319548607,
0.002481575822457671,
0.025254415348172188,
-0.010706637054681778,
0.04816906154155731,
0.030199790373444557,
-0.031062763184309006,
0.06335843354463577,
0.008833471685647964,
0.09784402698278427,
0.07348105311393738,
-0.10983182489871979,
-0.07415491342544556,
-0.0037291429471224546,
-0.08400780707597733,
0.043203964829444885,
-0.03410227596759796,
0.006614821031689644,
0.011380809359252453,
-0.03358520567417145,
-0.09755460172891617,
0.07698175311088562,
0.008410117588937283,
-0.07328709959983826,
0.033939626067876816,
-0.002354341559112072,
-0.019680984318256378,
0.05881080403923988,
-0.06805787980556488,
0.0826626718044281,
0.07718531042337418,
0.010383766144514084,
-0.022594520822167397,
-0.03959902748465538,
-0.00593263516202569,
0.005491577088832855,
0.022831223905086517,
0.020664149895310402,
0.06365863978862762,
0.014214466325938702,
-0.009096047841012478,
-0.03731510788202286,
-0.005103384144604206,
0.0216419268399477,
-0.08291328698396683,
0.0016922431532293558,
0.0772421583533287,
0.021139012649655342,
-0.041935473680496216,
-0.011198203079402447,
0.008851730264723301,
0.04897516593337059,
0.008156762458384037,
-0.028875865042209625,
2.3417322346448264e-33,
0.011748873628675938,
-0.09605436027050018,
0.07072554528713226,
-0.010598481632769108,
0.05019327625632286,
-0.09868479520082474,
-0.08457726985216141,
-0.07148841768503189,
-0.019307298585772514,
-0.00968645978718996,
-0.0595150887966156,
0.12617254257202148,
-0.007747892290353775,
-0.013846670277416706,
0.03533771634101868,
0.010758740827441216,
-0.014012372121214867,
0.01300114020705223,
0.12241967767477036,
-0.02570662647485733,
0.05880426615476608,
-0.04807615280151367,
-0.06106286868453026,
0.07816145569086075,
0.027418510988354683,
-0.02646462433040142,
0.02827170118689537,
-0.09327320754528046,
-0.04181670770049095,
-0.013221471570432186,
0.06669855117797852,
-0.0009920964948832989,
0.05609527602791786,
-0.029355360195040703,
-0.1297881007194519,
-0.048056457191705704,
0.006932469084858894,
0.04913150146603584,
-0.10504893213510513,
0.03129604458808899,
0.053279343992471695,
0.011368400417268276,
-0.01328698918223381,
-0.02965029887855053,
-0.003992586396634579,
-0.07369101792573929,
-0.012864554300904274,
-0.08023256063461304,
0.1313929408788681,
0.040712013840675354,
-0.026150749996304512,
-0.08801394701004028,
0.015781553462147713,
0.008472083136439323,
0.08618036657571793,
0.07921512424945831,
0.045387331396341324,
-0.022971363738179207,
-0.0644829124212265,
-0.01841459609568119,
-0.04494445025920868,
-0.05271964892745018,
0.025930600240826607,
0.05404717102646828,
0.021858537569642067,
-0.018029509112238884,
0.03511406108736992,
0.05261923000216484,
-0.03422322869300842,
0.034373749047517776,
-0.0742403119802475,
0.045881956815719604,
-0.011416109278798103,
0.07761543989181519,
0.012922815978527069,
-0.08356290310621262,
0.03894606977701187,
0.06501495093107224,
-0.054230839014053345,
0.05351324379444122,
0.027139710262417793,
-0.01794290728867054,
-0.06881297379732132,
0.12352148443460464,
-0.018746929243206978,
-0.03509464114904404,
0.030693555250763893,
-0.03042859584093094,
-0.017920898273587227,
0.025902466848492622,
-0.02293376438319683,
-0.04979841038584709,
-0.06311756372451782,
-0.03649077191948891,
-0.10260959714651108,
-4.425716394378742e-33,
0.06931313872337341,
0.008384710177779198,
-0.02034727670252323,
-0.019254770129919052,
0.038943104445934296,
0.036237239837646484,
0.059523727744817734,
0.08391010016202927,
-0.014666683040559292,
0.03935311734676361,
-0.025073422119021416,
0.041765306144952774,
0.003705158131197095,
0.08826268464326859,
-0.11211899667978287,
-0.0163350161164999,
-0.062343522906303406,
0.014462028630077839,
-0.0300721637904644,
0.024673474952578545,
-0.050578486174345016,
-0.016255443915724754,
0.1538616418838501,
0.04290066659450531,
-0.009793460369110107,
-0.008836302906274796,
-0.0029773565474897623,
-0.00020984894945286214,
-0.07085741311311722,
-0.030401719734072685,
-0.0507936105132103,
-0.053927112370729446,
0.006745629478245974,
0.02980867773294449,
-0.056803394109010696,
-0.05489947274327278,
-0.06330107152462006,
0.034088749438524246,
0.014470107853412628,
-0.10636768490076065,
0.009744587354362011,
-0.021033983677625656,
-0.021203840151429176,
-0.03744199126958847,
-0.09537394344806671,
-0.03827821463346481,
0.038947317749261856,
-0.07394390553236008,
-0.026795873418450356,
-0.08294714987277985,
-0.020992347970604897,
0.03681463375687599,
-0.06356517225503922,
0.13682010769844055,
-0.04635843634605408,
0.028168516233563423,
0.04688606783747673,
0.08364538103342056,
-0.047576066106557846,
0.048630110919475555,
0.06948841363191605,
-0.032382454723119736,
0.027283886447548866,
-0.04224523529410362,
-0.018358998000621796,
-0.002273136517032981,
-0.055362485349178314,
0.02622697316110134,
0.025073466822504997,
0.035545747727155685,
-0.06205352395772934,
0.009148246608674526,
0.04449201002717018,
0.1063234955072403,
0.02347988821566105,
0.051640916615724564,
0.009973684325814247,
-0.06973300874233246,
0.05361107364296913,
-0.030790597200393677,
-0.05029856786131859,
0.0008552261278964579,
-0.12452492117881775,
-0.020317716524004936,
-0.0005813401658087969,
0.02944955602288246,
0.07846920192241669,
0.01255855243653059,
0.07615762948989868,
0.06289384514093399,
-0.03417876735329628,
-0.06740526854991913,
-0.061404790729284286,
0.04288513585925102,
-0.056432709097862244,
-5.361456700825329e-8,
0.002641013590618968,
0.07028508186340332,
-0.019580036401748657,
0.021159403026103973,
-0.04418368265032768,
-0.04002445191144943,
0.08452773094177246,
-0.014725352637469769,
-0.02253386192023754,
0.02967541106045246,
-0.04273124039173126,
0.05643780156970024,
-0.030753731727600098,
0.00651487847790122,
-0.008145402185618877,
0.029549729079008102,
-0.00003797442332142964,
0.0061014979146420956,
0.021890362724661827,
-0.1019497811794281,
-0.07930279523134232,
0.0010454633738845587,
0.029944583773612976,
0.02916739322245121,
0.06564316153526306,
0.1040874794125557,
-0.020715022459626198,
-0.028531458228826523,
0.024633759632706642,
-0.005745321977883577,
0.025848397985100746,
-0.00358511577360332,
-0.058826085180044174,
0.022557392716407776,
-0.06544750183820724,
-0.03391072899103165,
-0.15212605893611908,
0.026319673284888268,
0.05399593338370323,
0.016521140933036804,
-0.015288119204342365,
0.01962887868285179,
-0.00892079807817936,
-0.036332957446575165,
-0.007241401355713606,
0.08037488907575607,
0.003623317228630185,
0.0859387144446373,
-0.0074211061000823975,
-0.014859972521662712,
-0.013427652418613434,
-0.07081563025712967,
-0.025892673060297966,
0.05217151343822479,
0.012442629784345627,
0.006193308159708977,
0.052380312234163284,
-0.029056789353489876,
0.03498814254999161,
0.003781251609325409,
0.004813223611563444,
0.0040613627061247826,
0.02863900549709797,
-0.03724990785121918
] | 0.07645
|
This page shows how to connect to services running on the Kubernetes cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Accessing services running on the cluster In Kubernetes, [nodes](/docs/concepts/architecture/nodes/), [pods](/docs/concepts/workloads/pods/) and [services](/docs/concepts/services-networking/service/) all have their own IPs. In many cases, the node IPs, pod IPs, and some service IPs on a cluster will not be routable, so they will not be reachable from a machine outside the cluster, such as your desktop machine. ### Ways to connect You have several options for connecting to nodes, pods and services from outside the cluster: - Access services through public IPs. - Use a service with type `NodePort` or `LoadBalancer` to make the service reachable outside the cluster. See the [services](/docs/concepts/services-networking/service/) and [kubectl expose](/docs/reference/generated/kubectl/kubectl-commands/#expose) documentation. - Depending on your cluster environment, this may only expose the service to your corporate network, or it may expose it to the internet. Think about whether the service being exposed is secure. Does it do its own authentication? - Place pods behind services. To access one specific pod from a set of replicas, such as for debugging, place a unique label on the pod and create a new service which selects this label. - In most cases, it should not be necessary for application developer to directly access nodes via their nodeIPs. - Access services, nodes, or pods using the Proxy Verb. - Does apiserver authentication and authorization prior to accessing the remote service. Use this if the services are not secure enough to expose to the internet, or to gain access to ports on the node IP, or for debugging. - Proxies may cause problems for some web applications. - Only works for HTTP/HTTPS. - Described [here](#manually-constructing-apiserver-proxy-urls). - Access from a node or pod in the cluster. - Run a pod, and then connect to a shell in it using [kubectl exec](/docs/reference/generated/kubectl/kubectl-commands/#exec). Connect to other nodes, pods, and services from that shell. - Some clusters may allow you to ssh to a node in the cluster. From there you may be able to access cluster services. This is a non-standard method, and will work on some clusters but not others. Browsers and other tools may or may not be installed. Cluster DNS may not work. ### Discovering builtin services Typically, there are several services which are started on a cluster by kube-system. Get a list of these with the `kubectl cluster-info` command: ```shell kubectl cluster-info ``` The output is similar to this: ``` Kubernetes master is running at https://192.0.2.1 elasticsearch-logging is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy kibana-logging is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/kibana-logging/proxy kube-dns is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/kube-dns/proxy grafana is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy heapster is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy ``` This shows the proxy-verb URL for accessing each service. For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached at `https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/` if suitable credentials are passed, or through a kubectl proxy at, for example: `http://localhost:8080/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`. {{< note >}} See [Access Clusters Using the Kubernetes API](/docs/tasks/administer-cluster/access-cluster-api/#accessing-the-kubernetes-api) for how to pass credentials or use kubectl proxy. {{< /note >}} #### Manually constructing apiserver proxy URLs As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create proxy URLs that include service endpoints, suffixes, and parameters, you append to the service's proxy URL: `http://`\*`kubernetes\_master\_address`\*`/api/v1/namespaces/`\*`namespace\_name`\*`/services/`\*`[https:]service\_name[:port\_name]`\*`/proxy` If you haven't specified a name for your port, you don't have to specify \*port\_name\* in the URL. You can also use the port number in place of the \*port\_name\* for both named and unnamed ports. By default, the API server proxies to your service using HTTP. To use HTTPS, prefix the service name
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/access-cluster-services.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/access-cluster-services.md
|
[
0.022474851459264755,
-0.01035782415419817,
0.019862636923789978,
-0.023784715682268143,
-0.021664507687091827,
0.0399867407977581,
-0.05602843314409256,
-0.0053468672558665276,
0.05263948068022728,
0.07312678545713425,
-0.05010495334863663,
0.00975237600505352,
0.002745402744039893,
-0.04137624800205231,
0.06876460462808609,
-0.023029794916510582,
0.12601706385612488,
-0.07525046914815903,
0.030145222321152687,
-0.04219379648566246,
-0.019924962893128395,
0.006014226470142603,
-0.04580922797322273,
0.027253668755292892,
-0.05938895046710968,
0.007505092769861221,
-0.017321303486824036,
-0.03162280470132828,
0.0037112331483513117,
0.04565184563398361,
-0.07194750756025314,
-0.03584887832403183,
0.017826592549681664,
0.029349980875849724,
-0.01340328436344862,
0.08399709314107895,
0.09517866373062134,
-0.01000155694782734,
-0.08726103603839874,
0.05750841647386551,
0.0390981063246727,
-0.02712654322385788,
-0.09175612777471542,
-0.04029052332043648,
0.029193075373768806,
0.005623584613204002,
-0.06541213393211365,
-0.07041452825069427,
0.015211336314678192,
-0.02970436029136181,
-0.057691317051649094,
-0.08852176368236542,
0.0900341272354126,
0.07843407988548279,
0.011009128764271736,
0.03455473110079765,
0.0184102151542902,
0.04831311106681824,
0.08372245728969574,
-0.008405890315771103,
0.038458261638879776,
-0.07390839606523514,
0.014868432655930519,
-0.03737923502922058,
-0.00008375809557037428,
-0.0440635159611702,
0.0039290874265134335,
0.06267683207988739,
0.04832988232374191,
-0.06389553844928741,
0.08145111054182053,
0.053546514362096786,
-0.016624031588435173,
-0.008151378482580185,
-0.03254645690321922,
0.08467493206262589,
0.02929254248738289,
0.01693546585738659,
-0.004672459792345762,
-0.027916034683585167,
0.004115424584597349,
0.07874786108732224,
0.06311354041099548,
0.04228026792407036,
-0.09943405538797379,
-0.0010740880388766527,
-0.0655365139245987,
-0.086753711104393,
0.08250141143798828,
-0.015325924381613731,
-0.03863413631916046,
-0.04609266668558121,
-0.04686906933784485,
-0.10724407434463501,
0.06867381185293198,
-0.0032098309602588415,
-0.018728291615843773,
-0.05205398425459862,
0.021157585084438324,
-0.002661370672285557,
0.03902476653456688,
-0.011234807781875134,
-0.020436570048332214,
0.004481172654777765,
0.046173274517059326,
0.010078189894557,
-0.09294068813323975,
-0.015010455623269081,
0.07435599714517593,
0.09303036332130432,
0.014029324986040592,
-0.003922971431165934,
0.003968310542404652,
0.042436450719833374,
-0.017160780727863312,
-0.006910171825438738,
0.07832567393779755,
-0.047590386122465134,
0.015966100618243217,
0.045707400888204575,
-0.007206303998827934,
-0.052238889038562775,
0.0052901338785886765,
-0.003221109276637435,
0.0024281772784888744,
-0.002423305995762348,
-0.015545678324997425,
2.747916777060783e-33,
0.030565787106752396,
-0.08835037052631378,
0.10737980902194977,
-0.010236927308142185,
0.05157284066081047,
-0.10208535939455032,
-0.0485965870320797,
-0.030699722468852997,
-0.006883974187076092,
0.007180015556514263,
-0.0757547989487648,
0.08225974440574646,
0.09614376723766327,
-0.05628025531768799,
-0.01045752689242363,
0.011146237142384052,
0.008962607942521572,
-0.03965730965137482,
0.12128246575593948,
0.0025880197063088417,
-0.03944834694266319,
-0.11688277870416641,
0.00422012759372592,
0.01816611737012863,
0.016108211129903793,
-0.005215100944042206,
0.009067421779036522,
-0.13193580508232117,
0.039278607815504074,
0.015933874994516373,
-0.021795468404889107,
-0.011472507379949093,
0.009936714544892311,
0.028521103784441948,
-0.17597737908363342,
0.024881519377231598,
-0.03087569586932659,
-0.009190337732434273,
-0.05824723467230797,
-0.016893427819013596,
0.019087696447968483,
-0.004175783134996891,
0.027790119871497154,
-0.07028920203447342,
0.06962650269269943,
-0.009367375634610653,
0.04351060837507248,
-0.07018838822841644,
0.08641774207353592,
0.04560958966612816,
-0.06297247111797333,
-0.0915677547454834,
0.011713016778230667,
-0.0023697742726653814,
0.05686034634709358,
0.07153479754924774,
0.08262830227613449,
-0.0033779533114284277,
-0.05277905985713005,
0.010231117717921734,
-0.02089846506714821,
-0.05530354380607605,
-0.02141299471259117,
0.027819957584142685,
0.02292718179523945,
0.010849177837371826,
-0.043706972151994705,
0.07415077090263367,
0.022799694910645485,
0.021683743223547935,
-0.0494508370757103,
0.007554178591817617,
-0.009863044135272503,
0.08279445022344589,
-0.030457541346549988,
-0.03310008347034454,
-0.036189012229442596,
-0.01607418991625309,
-0.08561258763074875,
0.06227770075201988,
-0.007837499491870403,
-0.029465297237038612,
-0.09095455706119537,
0.10283366590738297,
-0.011319694109261036,
-0.02102411538362503,
0.025226768106222153,
0.016772475093603134,
0.0044062756933271885,
0.03547682985663414,
0.049370624125003815,
-0.00895773060619831,
-0.03608142212033272,
0.05576540157198906,
-0.1217556968331337,
-4.738346096477638e-33,
0.051686860620975494,
0.01053543295711279,
-0.03895959258079529,
-0.039592280983924866,
0.03639250621199608,
0.05931596830487251,
0.00280182296410203,
0.04080438241362572,
-0.05759768187999725,
-0.025224260985851288,
-0.04247525706887245,
-0.04788287356495857,
0.011651990935206413,
0.016437334939837456,
-0.09831804037094116,
0.024907352402806282,
-0.06787540763616562,
0.025123797357082367,
-0.03462614491581917,
0.023108623921871185,
-0.06724391132593155,
0.0015995628200471401,
0.07451394945383072,
-0.01467148307710886,
-0.02265523560345173,
0.01051265187561512,
0.04834830388426781,
-0.015984252095222473,
-0.10498397052288055,
0.016113396733999252,
-0.012057911604642868,
-0.07848043739795685,
0.00443353783339262,
0.018457405269145966,
0.03212428838014603,
0.006120307836681604,
-0.05125955119729042,
0.004765341058373451,
0.021911554038524628,
-0.08658748120069504,
0.021535739302635193,
-0.019181225448846817,
-0.07900052517652512,
-0.06264429539442062,
-0.058439649641513824,
0.002473076106980443,
-0.013281949795782566,
0.015934262424707413,
-0.07680657505989075,
-0.07133166491985321,
-0.02479265257716179,
-0.010703282430768013,
-0.04875680059194565,
0.11281601339578629,
-0.06269601732492447,
0.045808326452970505,
-0.008334384299814701,
0.08947808295488358,
-0.01749092899262905,
0.04857052490115166,
0.11660128831863403,
-0.1347520500421524,
-0.015564155764877796,
0.054149188101291656,
-0.011602962389588356,
-0.06134176254272461,
-0.01992824673652649,
0.08474995940923691,
0.001284724217839539,
0.01183883287012577,
-0.08532016724348068,
0.052433937788009644,
0.10346975922584534,
0.10651484876871109,
-0.02794683165848255,
-0.01629960723221302,
0.007510435301810503,
-0.01430417038500309,
0.02004350535571575,
-0.0358269065618515,
-0.031155100092291832,
0.05143358185887337,
-0.08469150215387344,
-0.009067842736840248,
0.07751072198152542,
0.05869818851351738,
0.11451657116413116,
0.05425763502717018,
0.035152874886989594,
0.011539573781192303,
-0.015549818985164165,
0.011900537647306919,
0.00044115117634646595,
0.09047495573759079,
-0.020956924185156822,
-5.5645354990474516e-8,
0.06376040726900101,
0.024665875360369682,
-0.021701104938983917,
0.013728760182857513,
-0.03428815305233002,
0.0699024423956871,
0.010139720514416695,
-0.021061435341835022,
-0.05451829731464386,
0.09478452801704407,
-0.03656299039721489,
0.05600491166114807,
-0.0729953870177269,
-0.008473468944430351,
0.025558995082974434,
-0.005850255023688078,
0.03180448338389397,
-0.016776662319898605,
0.025346580892801285,
-0.053633950650691986,
-0.06894271820783615,
-0.06934790313243866,
-0.020569726824760437,
0.014506072737276554,
0.0015386402374133468,
0.0783311277627945,
0.00854553747922182,
-0.03466806933283806,
-0.013680609874427319,
0.03311978653073311,
-0.07158942520618439,
-0.005709544289857149,
-0.06909928470849991,
0.07129285484552383,
-0.03976605832576752,
0.05718741938471794,
-0.09937634319067001,
0.03715867921710014,
-0.00538389477878809,
0.04229847341775894,
-0.03499162569642067,
-0.00196422403678298,
-0.06041201576590538,
-0.024351945146918297,
0.012427923269569874,
0.10219856351613998,
-0.011925940401852131,
0.09173788875341415,
-0.01601903699338436,
-0.007565625943243504,
-0.007666728924959898,
-0.02956216037273407,
0.027407778427004814,
0.02060103975236416,
-0.0017740270122885704,
0.010767408646643162,
-0.05053674057126045,
-0.06220618262887001,
-0.020737038925290108,
0.03471933677792549,
0.01849736087024212,
0.08579444885253906,
0.02629508450627327,
-0.02914327010512352
] | 0.162259
|
a name for your port, you don't have to specify \*port\_name\* in the URL. You can also use the port number in place of the \*port\_name\* for both named and unnamed ports. By default, the API server proxies to your service using HTTP. To use HTTPS, prefix the service name with `https:`: `http:///api/v1/namespaces//services//proxy` The supported formats for the `` segment of the URL are: \* `` - proxies to the default or unnamed port using http \* `:` - proxies to the specified port name or port number using http \* `https::` - proxies to the default or unnamed port using https (note the trailing colon) \* `https::` - proxies to the specified port name or port number using https ##### Examples \* To access the Elasticsearch service endpoint `\_search?q=user:kimchy`, you would use: ``` http://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/\_search?q=user:kimchy ``` \* To access the Elasticsearch cluster health information `\_cluster/health?pretty=true`, you would use: ``` https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/\_cluster/health?pretty=true ``` The health information is similar to this: ```json { "cluster\_name" : "kubernetes\_logging", "status" : "yellow", "timed\_out" : false, "number\_of\_nodes" : 1, "number\_of\_data\_nodes" : 1, "active\_primary\_shards" : 5, "active\_shards" : 5, "relocating\_shards" : 0, "initializing\_shards" : 0, "unassigned\_shards" : 5 } ``` \* To access the \*https\* Elasticsearch service health information `\_cluster/health?pretty=true`, you would use: ``` https://192.0.2.1/api/v1/namespaces/kube-system/services/https:elasticsearch-logging:/proxy/\_cluster/health?pretty=true ``` #### Using web browsers to access services running on the cluster You may be able to put an apiserver proxy URL into the address bar of a browser. However: - Web browsers cannot usually pass tokens, so you may need to use basic (password) auth. Apiserver can be configured to accept basic auth, but your cluster may not be configured to accept basic auth. - Some web apps may not work, particularly those with client side javascript that construct URLs in a way that is unaware of the proxy path prefix.
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/access-cluster-services.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/access-cluster-services.md
|
[
-0.041942745447158813,
0.05675996094942093,
-0.006883196532726288,
-0.03883058950304985,
-0.06978639215230942,
-0.03425212576985359,
-0.0559895783662796,
0.006013060454279184,
0.049993883818387985,
0.04320194572210312,
-0.06997759640216827,
-0.03997260704636574,
0.012390468269586563,
0.07270817458629608,
0.10643312335014343,
-0.01738508604466915,
0.03210049122571945,
-0.028632519766688347,
0.007768060080707073,
0.0043375929817557335,
0.08195289224386215,
0.07685014605522156,
-0.05546145513653755,
-0.06702625751495361,
-0.10387911647558212,
-0.05199895799160004,
-0.10418794304132462,
0.00043971044942736626,
0.029489539563655853,
0.047730203717947006,
0.006493854336440563,
-0.06557384133338928,
-0.034399110823869705,
0.06426003575325012,
-0.05191611871123314,
-0.005763904191553593,
0.029950670897960663,
-0.035202544182538986,
-0.07329018414020538,
0.07855263352394104,
0.07736517488956451,
-0.016318045556545258,
-0.042648110538721085,
-0.07241661846637726,
-0.041203442960977554,
-0.06135253235697746,
0.050709985196590424,
-0.043634239584207535,
-0.032588064670562744,
0.020024260506033897,
-0.09078482538461685,
-0.09449787437915802,
-0.03240661323070526,
0.03561114892363548,
-0.037254802882671356,
-0.059089064598083496,
-0.060846250504255295,
0.019170623272657394,
-0.03865057975053787,
-0.04283294826745987,
0.10469458997249603,
-0.09815981239080429,
0.005924389231950045,
-0.06393688917160034,
-0.05277508869767189,
-0.05619760602712631,
-0.017105896025896072,
-0.02113998867571354,
0.060742758214473724,
-0.002714067930355668,
-0.0036307009868323803,
-0.024966895580291748,
-0.033997226506471634,
-0.020017577335238457,
0.10150574147701263,
0.014008897356688976,
0.06225115433335304,
-0.00004747787170344964,
0.03160592168569565,
-0.05641169100999832,
0.027157118543982506,
-0.0996951013803482,
-0.08011049777269363,
0.0664568841457367,
-0.060522355139255524,
0.01936952956020832,
-0.024232417345046997,
-0.12511883676052094,
0.07088997960090637,
-0.04913413152098656,
-0.0004725566250272095,
-0.10298560559749603,
-0.04048694670200348,
-0.07728742063045502,
0.0789758488535881,
0.003153553931042552,
-0.06463166326284409,
0.020536577329039574,
-0.0453091561794281,
-0.06497146189212799,
0.021475274115800858,
-0.04042566940188408,
-0.0306736808270216,
-0.026161301881074905,
0.006072517018765211,
-0.011947819031774998,
-0.04632624238729477,
0.08455969393253326,
0.023553723469376564,
0.02677571028470993,
-0.006609178148210049,
0.020040854811668396,
0.0022611706517636776,
0.03708624467253685,
-0.054968297481536865,
0.0714118480682373,
-0.02759777382016182,
-0.09226038306951523,
0.03238017112016678,
0.06101665645837784,
0.03196912631392479,
-0.014159862883388996,
0.006652231328189373,
0.046450238674879074,
-0.02685752883553505,
0.05376657098531723,
0.10493186116218567,
2.684553774460623e-33,
0.08798008412122726,
0.034445393830537796,
0.027370113879442215,
0.017563072964549065,
0.018981032073497772,
0.04482458531856537,
0.0468599833548069,
0.06752751022577286,
0.014318210072815418,
-0.00048669567331671715,
-0.05862891674041748,
0.052231308072805405,
-0.025197068229317665,
-0.010723483748733997,
-0.04033279791474342,
0.07134661078453064,
-0.0065165054984390736,
-0.019519245252013206,
0.03682646155357361,
0.05149436369538307,
0.015011449344456196,
0.02305588312447071,
-0.024916836991906166,
-0.03360211104154587,
-0.03141724690794945,
-0.03509688749909401,
0.021561231464147568,
-0.09038791060447693,
-0.03086201660335064,
0.023082992061972618,
0.00959668681025505,
0.0038353055715560913,
0.015177534893155098,
0.0015737449284642935,
0.06285087019205093,
0.01056472584605217,
0.05358695611357689,
0.09817692637443542,
-0.08813335746526718,
0.02520381473004818,
0.00927150808274746,
0.0046644010581076145,
-0.03493604436516762,
0.017267465591430664,
-0.022671356797218323,
-0.031531743705272675,
-0.058867380023002625,
-0.038881219923496246,
0.10559038072824478,
-0.0002984963357448578,
-0.0465085543692112,
-0.004804371390491724,
0.0504068098962307,
-0.028959905728697777,
0.061622802168130875,
0.05667012557387352,
-0.01936992071568966,
0.070529043674469,
-0.15509693324565887,
-0.11439567804336548,
-0.054218340665102005,
-0.044310688972473145,
0.09646935015916824,
0.036044638603925705,
0.05761493369936943,
0.016953028738498688,
0.037525396794080734,
0.08766339719295502,
-0.0024191683623939753,
0.06989603489637375,
-0.009997151792049408,
0.06271906942129135,
0.060585714876651764,
0.06284002214670181,
0.007121733855456114,
-0.03780272603034973,
0.06360624730587006,
0.037819478660821915,
0.030022095888853073,
0.03186965733766556,
0.018397103995084763,
-0.0025357366539537907,
-0.034370582550764084,
0.05016485974192619,
-0.10708288103342056,
0.015392938628792763,
0.02940339967608452,
-0.006011041812598705,
0.04510960355401039,
-0.07741356641054153,
-0.027733005583286285,
0.03879835456609726,
0.02535669505596161,
0.0003117925953119993,
-0.07537733018398285,
-5.803775605154573e-33,
-0.002857802901417017,
-0.044475942850112915,
-0.0027130967937409878,
-0.019200371578335762,
-0.03673549368977547,
-0.016323911026120186,
0.12381695210933685,
0.007354565430432558,
-0.025307264178991318,
0.09187313914299011,
0.03892229497432709,
-0.003875686787068844,
0.051809847354888916,
-0.056207142770290375,
-0.07303918153047562,
0.039945147931575775,
-0.05203358083963394,
-0.01885789819061756,
-0.016000382602214813,
-0.006313381250947714,
-0.0877407118678093,
-0.015218320302665234,
-0.020581386983394623,
0.020741146057844162,
-0.07011911273002625,
-0.0390978679060936,
0.025181801989674568,
-0.04470623657107353,
-0.10184023529291153,
-0.05849875137209892,
0.027346041053533554,
0.03910709172487259,
0.047899723052978516,
0.0352277010679245,
-0.11540848016738892,
0.05781614035367966,
0.05004061385989189,
0.0465056374669075,
0.09172582626342773,
-0.12452542781829834,
0.028807584196329117,
-0.029752999544143677,
-0.06852041184902191,
0.00025021989131346345,
0.02888796292245388,
-0.02556622214615345,
-0.04708056151866913,
0.0387958399951458,
-0.041133470833301544,
0.013677707873284817,
-0.000011764645023504272,
-0.015907153487205505,
-0.06032756343483925,
0.058995816856622696,
-0.00010682675201678649,
0.019835660234093666,
-0.03316088020801544,
0.06662750989198685,
-0.070575051009655,
0.09526044130325317,
0.004638113547116518,
-0.01157404575496912,
-0.050121501088142395,
0.023016618564724922,
0.010899494402110577,
-0.029470529407262802,
-0.11082039028406143,
-0.03477788716554642,
-0.018413158133625984,
-0.0282284002751112,
-0.04723719134926796,
-0.023991484194993973,
0.03988301753997803,
0.046903133392333984,
0.05923211947083473,
0.02713586948812008,
0.036748457700014114,
-0.007459299638867378,
0.0029953541234135628,
0.09269484877586365,
-0.036595411598682404,
0.03225921466946602,
-0.042481981217861176,
0.04756263643503189,
-0.014864549972116947,
0.06196797639131546,
0.044955771416425705,
0.10954249650239944,
-0.06613239645957947,
-0.019634637981653214,
0.016804810613393784,
-0.05040331929922104,
-0.10079386830329895,
-0.010996685363352299,
0.08001457899808884,
-5.082883447471431e-8,
0.08224115520715714,
0.0294981487095356,
-0.000908793939743191,
0.07832854986190796,
-0.08619366586208344,
0.0420394204556942,
-0.01857479102909565,
-0.00814756378531456,
-0.03998958319425583,
0.043105076998472214,
-0.042524490505456924,
0.01643621176481247,
-0.05514715984463692,
0.01497697550803423,
-0.012012136168777943,
-0.029598591849207878,
0.002415754832327366,
0.0007233613287098706,
0.00986996479332447,
-0.02419132925570011,
-0.03887443244457245,
-0.05853524059057236,
0.03450813889503479,
-0.02602272480726242,
0.017893992364406586,
0.008427666500210762,
-0.05375177785754204,
-0.0009968746453523636,
-0.016093581914901733,
-0.008840224705636501,
-0.02926875837147236,
-0.03332100063562393,
0.018997935578227043,
0.020245127379894257,
-0.08702316135168076,
-0.0022120841313153505,
-0.04011521115899086,
0.0009818387916311622,
-0.02462182193994522,
0.11781135201454163,
0.09260820597410202,
0.007914413698017597,
-0.02685941569507122,
0.003974630031734705,
0.0038346138317137957,
0.07245949655771255,
0.053067177534103394,
0.0504579097032547,
0.015390414744615555,
0.06126192957162857,
-0.025321371853351593,
-0.05624239146709442,
0.09254349768161774,
-0.019667599350214005,
-0.0014244013000279665,
0.011305395513772964,
-0.1024799644947052,
-0.05777804180979729,
-0.04230864346027374,
0.02004885859787464,
0.06255385279655457,
0.05148632079362869,
0.005547935608774424,
-0.009872443042695522
] | 0.036747
|
This topic discusses multiple ways to interact with clusters. ## Accessing for the first time with kubectl When accessing the Kubernetes API for the first time, we suggest using the Kubernetes CLI, `kubectl`. To access a cluster, you need to know the location of the cluster and have credentials to access it. Typically, this is automatically set-up when you work through a [Getting started guide](/docs/setup/), or someone else set up the cluster and provided you with credentials and a location. Check the location and credentials that kubectl knows about with this command: ```shell kubectl config view ``` Many of the [examples](/docs/reference/kubectl/quick-reference/) provide an introduction to using `kubectl`, and complete documentation is found in the [kubectl reference](/docs/reference/kubectl/). ## Directly accessing the REST API Kubectl handles locating and authenticating to the apiserver. If you want to directly access the REST API with an http client like curl or wget, or a browser, there are several ways to locate and authenticate: - Run kubectl in proxy mode. - Recommended approach. - Uses stored apiserver location. - Verifies identity of apiserver using self-signed cert. No MITM possible. - Authenticates to apiserver. - In future, may do intelligent client-side load-balancing and failover. - Provide the location and credentials directly to the http client. - Alternate approach. - Works with some types of client code that are confused by using a proxy. - Need to import a root cert into your browser to protect against MITM. ### Using kubectl proxy The following command runs kubectl in a mode where it acts as a reverse proxy. It handles locating the apiserver and authenticating. Run it like this: ```shell kubectl proxy --port=8080 ``` See [kubectl proxy](/docs/reference/generated/kubectl/kubectl-commands/#proxy) for more details. Then you can explore the API with curl, wget, or a browser, replacing localhost with [::1] for IPv6, like so: ```shell curl http://localhost:8080/api/ ``` The output is similar to this: ```json { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "10.0.1.149:443" } ] } ``` ### Without kubectl proxy Use `kubectl apply` and `kubectl describe secret...` to create a token for the default service account with grep/cut: First, create the Secret, requesting a token for the default ServiceAccount: ```shell kubectl apply -f - </dev/null; do echo "waiting for token..." >&2 sleep 1 done ``` Capture and use the generated token: ```shell APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ") TOKEN=$(kubectl describe secret default-token | grep -E '^token' | cut -f2 -d':' | tr -d " ") curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure ``` The output is similar to this: ```json { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "10.0.1.149:443" } ] } ``` Using `jsonpath`: ```shell APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}') TOKEN=$(kubectl get secret default-token -o jsonpath='{.data.token}' | base64 --decode) curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure ``` The output is similar to this: ```json { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "10.0.1.149:443" } ] } ``` The above examples use the `--insecure` flag. This leaves it subject to MITM attacks. When kubectl accesses the cluster it uses a stored root certificate and client certificates to access the server. (These are installed in the `~/.kube` directory). Since cluster certificates are typically self-signed, it may take special configuration to get your http client to use root certificate. On some clusters, the apiserver does not require authentication; it may serve on localhost, or be protected by a firewall. There is not a standard for this. [Controlling Access to the API](/docs/concepts/security/controlling-access) describes how a cluster
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/access-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/access-cluster.md
|
[
0.030877860262989998,
-0.012461426667869091,
-0.03461473435163498,
-0.005586626939475536,
-0.055452752858400345,
0.05028141662478447,
-0.05559332296252251,
-0.00003231572190998122,
0.09144831448793411,
0.022732211276888847,
-0.05335414409637451,
-0.06477604061365128,
0.00386493350379169,
-0.06202010065317154,
0.04610689729452133,
-0.046561866998672485,
0.11311498284339905,
-0.013498586602509022,
0.008891432546079159,
-0.07300252467393875,
-0.024434387683868408,
-0.05506966635584831,
-0.04194789379835129,
-0.034221161156892776,
-0.12306785583496094,
0.0012605232186615467,
-0.011296015232801437,
-0.002351140370592475,
0.00922918040305376,
0.012302019633352757,
-0.07599274814128876,
0.0022354861721396446,
0.0271386057138443,
0.021622342988848686,
-0.03596467524766922,
0.07457428425550461,
0.1083262711763382,
-0.000448944338131696,
-0.08779680728912354,
0.016354311257600784,
0.004924957174807787,
-0.04631755128502846,
-0.11313392966985703,
-0.06125009059906006,
0.001939268666319549,
-0.057542819529771805,
-0.08515962213277817,
-0.013230527751147747,
-0.016867579892277718,
-0.056870266795158386,
-0.006008223630487919,
-0.07660304754972458,
0.038668740540742874,
0.010628030635416508,
-0.005110715050250292,
0.029470665380358696,
-0.03325815498828888,
0.06311802566051483,
0.10358630120754242,
-0.05961236357688904,
0.015659647062420845,
-0.021458910778164864,
0.09819971770048141,
0.006661505438387394,
-0.06436694413423538,
-0.020340172573924065,
0.022070392966270447,
0.0034882486797869205,
0.03882801905274391,
-0.09799141436815262,
0.03729574754834175,
-0.011366252787411213,
-0.04360107332468033,
-0.055265311151742935,
-0.015138080343604088,
0.015154320746660233,
-0.010598749853670597,
0.03221042454242706,
0.014794805087149143,
-0.007771748583763838,
0.002003110945224762,
0.09843906760215759,
0.05721285566687584,
0.024997876957058907,
-0.1265948861837387,
0.054794616997241974,
-0.025113137438893318,
0.011439567431807518,
0.04541727155447006,
-0.01169066596776247,
0.01542384922504425,
-0.056218598037958145,
-0.04485286399722099,
-0.11854680627584457,
0.11429008096456528,
-0.006804880686104298,
-0.053140245378017426,
-0.021071629598736763,
0.05404698848724365,
-0.027665182948112488,
0.05080028623342514,
-0.013174980878829956,
-0.03748473897576332,
-0.004601608030498028,
-0.003146022092550993,
-0.026314232498407364,
-0.04497320577502251,
-0.009253942407667637,
0.06244554743170738,
0.08432712405920029,
-0.03136499226093292,
0.07897718250751495,
-0.04695019870996475,
0.03448626399040222,
-0.019078059121966362,
0.02087457850575447,
0.06327700614929199,
-0.056879933923482895,
0.05947554484009743,
0.044159796088933945,
0.05158921331167221,
-0.07468993961811066,
0.009367825463414192,
0.02783731371164322,
0.026010775938630104,
0.026074998080730438,
-0.05064361169934273,
2.0742714539892544e-33,
0.055783700197935104,
-0.061895113438367844,
0.07206318527460098,
-0.012401712127029896,
-0.021494217216968536,
-0.10741151124238968,
-0.00383485178463161,
-0.024993395432829857,
-0.03516390919685364,
-0.08025633543729782,
-0.048427287489175797,
0.11865518242120743,
0.07474478334188461,
-0.054184991866350174,
-0.021838676184415817,
0.04995351284742355,
-0.07320571690797806,
0.01413149293512106,
0.034275177866220474,
-0.019323157146573067,
-0.024359311908483505,
-0.06010191887617111,
0.049707215279340744,
0.0970081016421318,
-0.012721369974315166,
0.012124416418373585,
0.02187010645866394,
-0.0719819888472557,
-0.0033815118949860334,
0.02301178313791752,
-0.0020750039257109165,
-0.05596867948770523,
0.008563564158976078,
-0.018483847379684448,
-0.1136462613940239,
0.022447185590863228,
0.007689539343118668,
0.030770443379878998,
-0.07460396736860275,
-0.026022082194685936,
-0.04740681126713753,
-0.04316681623458862,
0.006886653136461973,
-0.057831909507513046,
0.04729956015944481,
0.010725060477852821,
0.014149325899779797,
-0.017400776967406273,
0.0462777242064476,
0.008976117707788944,
-0.05321143940091133,
-0.06294496357440948,
0.05641946196556091,
-0.032086197286844254,
0.05111132562160492,
0.09553411602973938,
0.09399450570344925,
-0.10412934422492981,
-0.08502858877182007,
-0.00005930606494075619,
-0.033156707882881165,
-0.016426609829068184,
0.012543970718979836,
0.043708041310310364,
-0.012338334694504738,
0.02999994531273842,
-0.05963693931698799,
0.07947953045368195,
-0.002784379990771413,
0.013461264781653881,
-0.04409467428922653,
0.06464185565710068,
-0.03163811191916466,
0.03944949433207512,
0.015014996752142906,
-0.017497597262263298,
0.040327008813619614,
-0.0070626260712742805,
-0.05424301326274872,
0.08743907511234283,
0.08815021067857742,
-0.05486427620053291,
-0.040630072355270386,
0.08455651253461838,
-0.005303480662405491,
-0.017019828781485558,
-0.00369565119035542,
0.00129839894361794,
0.0150026585906744,
0.003517723176628351,
0.03273588418960571,
-0.038257893174886703,
0.006348718423396349,
0.03231160715222359,
-0.03725619614124298,
-5.333746107454619e-33,
0.1328461915254593,
-0.028296928852796555,
0.04181371629238129,
-0.019547931849956512,
0.019438834860920906,
0.06286045163869858,
-0.0443439856171608,
0.03469070792198181,
-0.023077428340911865,
-0.04268098995089531,
-0.07496056705713272,
-0.009089729748666286,
0.01896534487605095,
0.002030543517321348,
-0.0733981803059578,
0.025430874899029732,
-0.013057223521173,
-0.0225948728621006,
-0.028299976140260696,
0.03926490247249603,
-0.07953637838363647,
-0.12014111876487732,
0.08501476794481277,
-0.04083393141627312,
-0.05222511291503906,
0.01120988093316555,
0.01447242684662342,
-0.01027582585811615,
-0.12720227241516113,
-0.04396706819534302,
0.011393766850233078,
-0.09081252664327621,
0.017640462145209312,
0.0434444323182106,
0.02078196220099926,
-0.03345665708184242,
-0.001173812081106007,
-0.011185850016772747,
0.029449202120304108,
-0.11576536297798157,
-0.011158772744238377,
0.016328344121575356,
-0.05763394013047218,
-0.03948870673775673,
-0.03320181742310524,
0.025392666459083557,
0.00315544824115932,
-0.005856911186128855,
-0.07992149144411087,
-0.08180008083581924,
-0.03388189896941185,
-0.00048804841935634613,
-0.027066538110375404,
0.0603301003575325,
-0.07145386189222336,
0.1058799996972084,
0.0031781881116330624,
0.11337218433618546,
-0.037087585777044296,
0.03276004269719124,
0.0004069852293469012,
-0.10719852894544601,
-0.009773118421435356,
0.10391169041395187,
-0.055994365364313126,
-0.05266920104622841,
0.01239386759698391,
0.009457102976739407,
-0.054764486849308014,
0.04665137454867363,
-0.07624218612909317,
0.015731206163764,
0.049290839582681656,
0.0702584832906723,
0.052115730941295624,
-0.016805723309516907,
-0.0015426038298755884,
-0.02939230389893055,
-0.0014471181202679873,
0.040372028946876526,
0.02003445476293564,
0.008854254148900509,
-0.05956931412220001,
-0.02871398814022541,
0.07220740616321564,
0.07938846945762634,
0.06987428665161133,
0.027801459655165672,
0.06414134800434113,
-0.0016714840894564986,
-0.0492008775472641,
0.029293276369571686,
-0.02104557491838932,
0.09981325268745422,
-0.01855192333459854,
-5.344834974607693e-8,
0.04670819640159607,
0.015514948405325413,
-0.018251093104481697,
0.04564235359430313,
-0.011706098914146423,
0.05694937705993652,
-0.010178796015679836,
0.013315078802406788,
-0.06776843219995499,
0.04663051664829254,
-0.03156555816531181,
0.004243604838848114,
-0.049883097410202026,
0.0010262195719406009,
0.051015838980674744,
0.021423498168587685,
0.06177093833684921,
-0.02906823717057705,
0.07605017721652985,
-0.05230852961540222,
-0.027483373880386353,
-0.07301294803619385,
0.05129194259643555,
0.04143582656979561,
0.059431664645671844,
0.053925104439258575,
0.03317638114094734,
0.005918794311583042,
-0.012366042472422123,
-0.051488056778907776,
-0.07694367319345474,
0.03290586918592453,
-0.07857030630111694,
0.06106368452310562,
-0.030278529971837997,
0.013227810151875019,
-0.1091969907283783,
0.05740532651543617,
0.030028222128748894,
0.0573933869600296,
0.043738480657339096,
0.06309688836336136,
-0.054365124553442,
-0.02037002705037594,
0.00943108182400465,
0.08552862703800201,
0.04430912435054779,
0.05149593576788902,
-0.016499390825629234,
-0.015877172350883484,
-0.029260089620947838,
-0.06223739683628082,
-0.00603489251807332,
0.06853548437356949,
-0.04855277016758919,
0.07637552171945572,
-0.05625614896416664,
-0.08126664906740189,
0.04430723190307617,
0.01673579402267933,
-0.029075216501951218,
0.09064444899559021,
-0.011714158579707146,
-0.005155803170055151
] | 0.157077
|
it may take special configuration to get your http client to use root certificate. On some clusters, the apiserver does not require authentication; it may serve on localhost, or be protected by a firewall. There is not a standard for this. [Controlling Access to the API](/docs/concepts/security/controlling-access) describes how a cluster admin can configure this. ## Programmatic access to the API Kubernetes officially supports [Go](#go-client) and [Python](#python-client) client libraries. ### Go client \* To get the library, run the following command: `go get k8s.io/client-go@kubernetes-`, see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user) for detailed installation instructions. See [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix) to see which versions are supported. \* Write an application atop of the client-go clients. Note that client-go defines its own API objects, so if needed, please import API definitions from client-go rather than from the main repository, e.g., `import "k8s.io/client-go/kubernetes"` is correct. The Go client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://git.k8s.io/client-go/examples/out-of-cluster-client-configuration/main.go). If the application is deployed as a Pod in the cluster, please refer to the [next section](#accessing-the-api-from-a-pod). ### Python client To use [Python client](https://github.com/kubernetes-client/python), run the following command: `pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python) for more installation options. The Python client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://github.com/kubernetes-client/python/tree/master/examples). ### Other languages There are [client libraries](/docs/reference/using-api/client-libraries/) for accessing the API from other languages. See documentation for other libraries for how they authenticate. ## Accessing the API from a Pod When accessing the API from a pod, locating and authenticating to the API server are somewhat different. Please check [Accessing the API from within a Pod](/docs/tasks/run-application/access-api-from-pod/) for more details. ## Accessing services running on the cluster The previous section describes how to connect to the Kubernetes API server. For information about connecting to other services running on a Kubernetes cluster, see [Access Cluster Services](/docs/tasks/access-application-cluster/access-cluster-services/). ## Requesting redirects The redirect capabilities have been deprecated and removed. Please use a proxy (see below) instead. ## So many proxies There are several different proxies you may encounter when using Kubernetes: 1. The [kubectl proxy](#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 and TCP - 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` - use UDP/TCP only - implementation varies by cloud provider. Kubernetes users will typically not need to worry about anything other than the first
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/access-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/access-cluster.md
|
[
-0.006330898497253656,
0.02629707008600235,
-0.005821404978632927,
-0.054637882858514786,
-0.06613050401210785,
-0.021692801266908646,
-0.07538772374391556,
0.025228435173630714,
0.07128393650054932,
-0.0042145755141973495,
-0.01631215028464794,
-0.01507913414388895,
0.02223495952785015,
0.0692291185259819,
0.042009349912405014,
-0.04938177019357681,
-0.0006055532139725983,
-0.023578401654958725,
0.042803581804037094,
-0.10648778825998306,
-0.05542052909731865,
-0.003103997791185975,
-0.011741824448108673,
0.0019104063976556063,
-0.09916164726018906,
-0.015310917049646378,
0.010550860315561295,
0.011921976692974567,
0.010617060586810112,
0.09792589396238327,
-0.02851172722876072,
-0.05868581682443619,
-0.010392395779490471,
0.004088038578629494,
-0.030201133340597153,
0.08082204312086105,
0.0654112696647644,
0.013556493446230888,
-0.06056167185306549,
0.10302408039569855,
0.09188070893287659,
-0.03875984624028206,
-0.04958520084619522,
-0.017001261934638023,
0.002920802915468812,
0.012553379870951176,
-0.019316723570227623,
-0.08322790265083313,
-0.05746316537261009,
-0.027248064056038857,
0.013161994516849518,
-0.022046156227588654,
-0.0003077517030760646,
0.021488355472683907,
-0.03975064679980278,
0.01934870146214962,
-0.0021272720769047737,
0.08752211183309555,
0.0791221559047699,
0.028399493545293808,
0.06236177682876587,
-0.029197946190834045,
0.042238298803567886,
0.006800458300858736,
-0.07845697551965714,
0.03908958658576012,
0.01376355905085802,
-0.016472185030579567,
0.01408120896667242,
-0.05273846164345741,
0.07148954272270203,
-0.014406781643629074,
-0.006004296243190765,
-0.004253377206623554,
0.01294871885329485,
-0.05050953850150108,
-0.0844421312212944,
0.046813398599624634,
0.021032942458987236,
-0.01495395228266716,
0.034704387187957764,
0.006125892512500286,
0.015531868673861027,
0.07810084521770477,
-0.12821191549301147,
-0.0260515958070755,
-0.04531879350543022,
0.022898200899362564,
0.08847573399543762,
-0.008679878897964954,
0.0556686632335186,
-0.07049765437841415,
-0.04580525681376457,
-0.12952864170074463,
0.03978203982114792,
0.032476961612701416,
-0.0066309780813753605,
-0.029591264203190804,
0.005139914806932211,
-0.030502377077937126,
-0.02263152226805687,
-0.08277919143438339,
-0.04206201806664467,
-0.03325064480304718,
0.05200597271323204,
0.05425482988357544,
-0.04104458540678024,
-0.005346793681383133,
0.10976018011569977,
0.06730826944112778,
-0.03035080060362816,
0.020796820521354675,
-0.04058836027979851,
-0.012043697759509087,
-0.023615701124072075,
0.07845468819141388,
0.0032014907337725163,
-0.012377147562801838,
0.014522569254040718,
0.0384603813290596,
0.005194653291255236,
-0.08788327127695084,
0.019425738602876663,
0.09884680807590485,
-0.00276152859441936,
0.0014716647565364838,
0.009321846067905426,
1.6422928920964106e-33,
0.07583453506231308,
-0.006488210987299681,
0.0955844596028328,
-0.04306388646364212,
0.03639519587159157,
-0.07983066886663437,
0.03949456289410591,
-0.05651126056909561,
-0.06978192925453186,
-0.06862831115722656,
-0.03702252730727196,
0.07788733392953873,
0.02060084044933319,
-0.11393266171216965,
0.02654441073536873,
0.06100372225046158,
-0.08329978585243225,
-0.009331751614809036,
0.09423945099115372,
0.03032260201871395,
0.03863454982638359,
-0.08121968060731888,
0.08235624432563782,
0.0513959564268589,
0.014954046346247196,
-0.06650981307029724,
0.02249099873006344,
-0.06768390536308289,
0.017990974709391594,
-0.013801522552967072,
-0.046307291835546494,
-0.0748707726597786,
0.017182903364300728,
-0.032391585409641266,
-0.05283420905470848,
0.008568527176976204,
-0.0664045587182045,
-0.01447027176618576,
-0.03560187295079231,
-0.03988935425877571,
0.024008391425013542,
-0.028623457998037338,
0.02917194925248623,
0.01711583137512207,
0.02219129167497158,
-0.013947082683444023,
-0.02595902420580387,
-0.060967329889535904,
0.08621149510145187,
0.09617612510919571,
-0.08485986292362213,
-0.06814860552549362,
0.042183466255664825,
0.010078942403197289,
0.019771141931414604,
0.04888882860541344,
0.09435521066188812,
0.012567788362503052,
-0.0790674164891243,
-0.11189375817775726,
0.012906272895634174,
-0.05568210035562515,
-0.018593089655041695,
-0.014253263361752033,
-0.005286700092256069,
0.007281820755451918,
-0.03690570220351219,
0.09392978996038437,
-0.05651034414768219,
-0.005082770716398954,
-0.03983144089579582,
0.042725805193185806,
-0.05208961293101311,
0.014939486980438232,
-0.09056904166936874,
-0.00670922826975584,
0.008547293953597546,
0.07517820596694946,
-0.030639778822660446,
0.02222740650177002,
0.018910320475697517,
-0.04937665909528732,
-0.017998652532696724,
0.11720595508813858,
-0.007942871190607548,
0.010957326740026474,
0.06160560995340347,
0.04764168709516525,
-0.01148352399468422,
-0.01009602751582861,
0.026751935482025146,
0.0019033366115763783,
0.027118848636746407,
0.08498948067426682,
-0.05846434086561203,
-3.5263754212653654e-33,
0.05567753314971924,
-0.06616267561912537,
0.028329629451036453,
0.015597852878272533,
0.08918976783752441,
-0.041807983070611954,
-0.04136243835091591,
0.06603357940912247,
-0.01670192927122116,
0.013376209884881973,
0.013480419293045998,
-0.024540914222598076,
0.08663274347782135,
-0.000007818475751264486,
-0.015881817787885666,
0.013815658167004585,
-0.03229663521051407,
0.09978244453668594,
0.043163903057575226,
-0.05055047944188118,
-0.03625080734491348,
-0.04508916288614273,
0.007358739618211985,
-0.016237327829003334,
-0.03270677849650383,
0.027643993496894836,
-0.012204722501337528,
0.033206574618816376,
-0.10516643524169922,
-0.01589145138859749,
0.014109369367361069,
-0.05039849877357483,
-0.035879116505384445,
0.03810667619109154,
0.02079843543469906,
-0.028985921293497086,
-0.021438468247652054,
0.057887859642505646,
0.04221581667661667,
-0.08372712135314941,
0.0379805713891983,
-0.03220190107822418,
-0.008448011241853237,
0.05531022697687149,
-0.001067149918526411,
0.036090899258852005,
0.030861781910061836,
-0.0015446700854226947,
-0.062204886227846146,
-0.04501039534807205,
0.0037601287476718426,
0.04865144565701485,
-0.019179536029696465,
0.06685848534107208,
-0.04821712523698807,
0.07814574986696243,
0.057826727628707886,
0.1007620170712471,
-0.027649270370602608,
0.01157360803335905,
0.03969608619809151,
-0.14551661908626556,
0.00630086287856102,
0.04593083634972572,
-0.08903853595256805,
-0.008672472089529037,
-0.058862630277872086,
0.062046002596616745,
-0.032355938106775284,
0.06980596482753754,
-0.08877040445804596,
-0.08599764853715897,
0.007688076701015234,
0.03412369638681412,
0.01352127455174923,
-0.029832353815436363,
0.03424321487545967,
0.012826714664697647,
0.033392470329999924,
-0.005548395216464996,
-0.019515693187713623,
0.015287495218217373,
-0.04298168793320656,
0.009184837341308594,
0.09253180027008057,
-0.022706974297761917,
0.09078752994537354,
0.0070268926210701466,
0.05217871814966202,
0.05501585081219673,
-0.031235823407769203,
0.06925502419471741,
-0.007861772552132607,
0.049824535846710205,
0.07545112073421478,
-5.448392670359681e-8,
0.04086248204112053,
0.017421390861272812,
-0.06644009053707123,
0.037575434893369675,
0.05394696816802025,
0.043681852519512177,
0.012715657241642475,
-0.030435899272561073,
-0.051868122071027756,
0.020318593829870224,
-0.01025390625,
-0.07997842133045197,
-0.08983197808265686,
0.005530782975256443,
0.004860532935708761,
0.0315040722489357,
-0.06489395350217819,
0.010721536353230476,
0.0443345308303833,
-0.03299877792596817,
-0.05135650187730789,
-0.14798228442668915,
0.022359827533364296,
0.01763739250600338,
-0.025857726112008095,
0.0695393905043602,
0.03929733857512474,
0.020689357072114944,
-0.01654398813843727,
-0.05218293517827988,
-0.11992605030536652,
-0.02160230278968811,
-0.10146740078926086,
0.06789248436689377,
-0.002763406839221716,
0.07860428094863892,
-0.12114708125591278,
0.011318892240524292,
-0.015104244463145733,
0.06732691079378128,
-0.046558674424886703,
0.053657203912734985,
-0.05416479334235191,
0.006079594139009714,
0.018393488600850105,
0.08254081010818481,
0.03776402026414871,
0.07362881302833557,
0.04882475361227989,
0.04878247156739235,
0.015020783059298992,
-0.08214102685451508,
-0.03585327789187431,
-0.00495565589517355,
-0.08150795102119446,
0.016761936247348785,
-0.061257727444171906,
-0.06121920049190521,
0.026209166273474693,
-0.008302836678922176,
-0.010459637269377708,
0.015025604516267776,
0.06824230402708054,
-0.02325282245874405
] | 0.041408
|
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` - use UDP/TCP only - 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.
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/access-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/access-cluster.md
|
[
-0.019761832430958748,
-0.0715121254324913,
0.034681688994169235,
-0.031121984124183655,
-0.02519347332417965,
0.023925913497805595,
0.05384431779384613,
-0.04711209610104561,
0.11101280152797699,
0.01908155344426632,
-0.0091880327090621,
0.0010055971797555685,
-0.007094926666468382,
-0.025846008211374283,
0.014303483068943024,
-0.06757581233978271,
0.10643360763788223,
-0.14328016340732574,
-0.05096367374062538,
-0.05056474730372429,
-0.0346892885863781,
-0.0629366934299469,
-0.09194274991750717,
0.0207926407456398,
-0.07469290494918823,
0.018035251647233963,
-0.010534066706895828,
-0.013417039066553116,
0.06424421817064285,
0.012169442139565945,
-0.07493925839662552,
-0.030557919293642044,
0.05050386115908623,
0.03284921124577522,
-0.05656111612915993,
0.05549811199307442,
0.029058115556836128,
-0.011043539270758629,
-0.12443354725837708,
0.0551864355802536,
0.04106564819812775,
-0.14113183319568634,
-0.0818428248167038,
-0.025710172951221466,
0.0028782852459698915,
0.014599244110286236,
-0.04092232882976532,
-0.0248851478099823,
-0.05568300560116768,
-0.0304570272564888,
0.0650121420621872,
-0.04064635932445526,
0.033174484968185425,
0.138757586479187,
-0.03392321988940239,
0.018883397802710533,
-0.002100040204823017,
0.020037557929754257,
0.07130561769008636,
0.01441861316561699,
-0.003986204508692026,
-0.04760615900158882,
0.021272920072078705,
0.027912141755223274,
0.057846833020448685,
0.004627282731235027,
0.033166274428367615,
-0.006663058884441853,
0.04268048703670502,
-0.10875530540943146,
0.07779046148061752,
-0.020600028336048126,
-0.0341486781835556,
0.03255366533994675,
0.0013588202418759465,
-0.006300267763435841,
-0.012765814550220966,
0.026432424783706665,
0.02162553369998932,
-0.008059714920818806,
-0.0015473661478608847,
0.06618493795394897,
0.06335761398077011,
0.05639458820223808,
-0.1254734992980957,
0.007635460700839758,
-0.0729122906923294,
-0.07608256489038467,
0.017642254009842873,
0.008640757761895657,
-0.01382762473076582,
0.042114369571208954,
0.011111592873930931,
-0.07435087859630585,
-0.022968508303165436,
0.04734637588262558,
-0.022396381944417953,
-0.02674042247235775,
0.05092397332191467,
-0.046563759446144104,
0.03722011670470238,
0.0005029106396250427,
0.06741563230752945,
0.04023415967822075,
-0.007716959808021784,
-0.036038707941770554,
-0.09608481824398041,
-0.020480796694755554,
0.059471022337675095,
0.08382977545261383,
-0.016508951783180237,
0.04914966598153114,
0.01576297916471958,
-0.009718764573335648,
-0.017242083325982094,
0.018158216029405594,
-0.004341081716120243,
-0.048585742712020874,
0.01391565054655075,
0.06638246029615402,
0.0036927075125277042,
-0.07956261932849884,
0.023945825174450874,
-0.01599443517625332,
-0.0074543422088027,
0.07786477357149124,
-0.08765120059251785,
3.2162972765917236e-33,
-0.005331508815288544,
-0.06799689680337906,
0.0696038231253624,
-0.022913387045264244,
-0.029317328706383705,
-0.038493648171424866,
-0.0824052020907402,
-0.02155974693596363,
-0.024284739047288895,
-0.05903105437755585,
-0.05240924656391144,
0.12839648127555847,
0.05715449899435043,
0.030480805784463882,
0.05877628177404404,
0.025578618049621582,
-0.03451507166028023,
-0.0035266398917883635,
0.09482777118682861,
-0.009355543181300163,
0.02400992438197136,
-0.0270400270819664,
0.003525080159306526,
0.05673351511359215,
0.05592159181833267,
-0.04498517885804176,
0.04862184077501297,
-0.0340239554643631,
0.030214037746191025,
0.006292310077697039,
-0.014417157508432865,
-0.05945771932601929,
-0.012852074578404427,
-0.008745525032281876,
-0.08050227165222168,
0.06283824145793915,
-0.05725898966193199,
0.004883855581283569,
-0.06970617175102234,
-0.038362134248018265,
0.023107973858714104,
0.0035910995211452246,
-0.01457295287400484,
-0.04777626693248749,
0.04353252798318863,
0.012813082896173,
0.046566762030124664,
-0.03901762142777443,
0.0578513965010643,
0.03608633205294609,
-0.004697784315794706,
-0.06234943866729736,
0.05162803828716278,
0.02924404665827751,
0.08545943349599838,
0.09416805952787399,
0.11949686706066132,
-0.09292113780975342,
-0.06104227527976036,
0.02197197638452053,
-0.019537517800927162,
-0.08859816193580627,
-0.04523498937487602,
0.02923419512808323,
0.02203710936009884,
-0.020348811522126198,
0.046711310744285583,
0.01993759348988533,
-0.009003767743706703,
0.010232167318463326,
-0.051484521478414536,
0.04070942848920822,
-0.006931622978299856,
0.11743184179067612,
-0.02094053104519844,
-0.05572139844298363,
-0.07225918769836426,
0.013301699422299862,
-0.060561180114746094,
0.09123818576335907,
-0.053313449025154114,
-0.015580464154481888,
-0.008923822082579136,
0.13068342208862305,
-0.08028478920459747,
-0.041861578822135925,
0.011090977117419243,
0.009798620827496052,
-0.003919030074030161,
0.00744082173332572,
-0.02452811412513256,
-0.014388990588486195,
-0.020530762150883675,
0.10590220987796783,
-0.06910338252782822,
-5.750055880663979e-33,
-0.01669716089963913,
0.003719406435266137,
-0.09952760487794876,
0.03336810693144798,
0.036542970687150955,
0.06277898699045181,
0.0021897589322179556,
0.052017856389284134,
-0.007417294662445784,
-0.0019255795050412416,
-0.007708800490945578,
-0.017709262669086456,
-0.03908756747841835,
0.026630476117134094,
-0.050422925502061844,
-0.028450708836317062,
-0.05722576379776001,
-0.050344906747341156,
-0.023538414388895035,
0.013663885183632374,
-0.05186407268047333,
-0.06136198341846466,
0.09527681767940521,
-0.0019900063052773476,
-0.01040737982839346,
-0.010736226104199886,
-0.04803695157170296,
-0.016982605680823326,
-0.08985885977745056,
0.011221188120543957,
-0.006619475316256285,
-0.08014769852161407,
0.011615222319960594,
0.036077406257390976,
-0.029779070988297462,
-0.03514796122908592,
-0.00836932472884655,
0.04378405958414078,
0.04359462857246399,
-0.0679570734500885,
0.008385783061385155,
0.028213731944561005,
-0.004791222512722015,
0.004122747574001551,
-0.07130008190870285,
0.03840966895222664,
0.0018843729048967361,
-0.03935416787862778,
-0.08878166973590851,
-0.0845518708229065,
-0.05499710887670517,
-0.006594464648514986,
-0.02806166559457779,
0.09862850606441498,
-0.07037919759750366,
0.08518052101135254,
0.015123666264116764,
0.11479423195123672,
-0.016484295949339867,
0.04565669223666191,
0.07489296793937683,
-0.09736024588346481,
-0.004339886363595724,
0.014510948210954666,
-0.0687377080321312,
-0.01698879338800907,
0.07643338292837143,
-0.0006358104874379933,
-0.04405452683568001,
0.024042122066020966,
-0.05268729478120804,
-0.005710347089916468,
0.020827356725931168,
0.009388629347085953,
-0.05719926580786705,
-0.0653306245803833,
0.03637253865599632,
-0.05240637809038162,
0.006286684423685074,
-0.06421037018299103,
-0.03290816769003868,
0.014842535369098186,
-0.052882835268974304,
0.020759809762239456,
0.0026459088549017906,
-0.0019553902093321085,
0.09283267706632614,
-0.03226131200790405,
0.05387177690863609,
0.0601029172539711,
-0.043178312480449677,
0.0004284677852410823,
-0.1043592244386673,
0.12349073588848114,
-0.05316375941038132,
-4.334228265179263e-8,
0.039705146104097366,
0.02685641124844551,
0.000234678722335957,
0.002526841126382351,
-0.020813699811697006,
-0.006591462064534426,
0.01089777983725071,
0.029350733384490013,
-0.013340760953724384,
0.0430138036608696,
0.0031878941226750612,
0.026772979646921158,
-0.08672429621219635,
-0.03406451642513275,
0.12001480162143707,
0.042700476944446564,
0.023352349177002907,
0.03058648854494095,
-0.017853185534477234,
-0.07753641158342361,
-0.02490881271660328,
-0.012412700802087784,
-0.02201502025127411,
0.015437253750860691,
0.02593953162431717,
0.05709616467356682,
0.0705815851688385,
0.03243546187877655,
0.00255515705794096,
0.05236223340034485,
-0.051504649221897125,
0.04359148070216179,
-0.05270948261022568,
0.02225126512348652,
-0.004452800378203392,
0.06646697223186493,
-0.14428827166557312,
-0.023329144343733788,
0.03306113928556442,
0.05731485038995743,
-0.0038891700096428394,
0.038026679307222366,
-0.03164447471499443,
-0.0010595058556646109,
0.07142796367406845,
0.09075132012367249,
-0.03650646284222603,
0.07390628755092621,
0.013991338200867176,
-0.013796018436551094,
-0.021662646904587746,
-0.042494818568229675,
0.04246240854263306,
0.08442207425832748,
-0.0006817474495619535,
-0.017733780667185783,
0.021217310801148415,
-0.06905156373977661,
0.07977371662855148,
0.02825905941426754,
-0.02028595842421055,
0.06112246587872505,
0.06727249175310135,
-0.029830321669578552
] | 0.241297
|
This page shows how to configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the `kubectl config use-context` command. {{< note >}} A file that is used to configure access to a cluster is sometimes called a \*kubeconfig file\*. This is a generic way of referring to configuration files. It does not mean that there is a file named `kubeconfig`. {{< /note >}} {{< warning >}} Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure. If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script. {{< /warning>}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} To check that {{< glossary\_tooltip text="kubectl" term\_id="kubectl" >}} is installed, run `kubectl version --client`. The kubectl version should be [within one minor version](/releases/version-skew-policy/#kubectl) of your cluster's API server. ## Define clusters, users, and contexts Suppose you have two clusters, one for development work and one for test work. In the `development` cluster, your frontend developers work in a namespace called `frontend`, and your storage developers work in a namespace called `storage`. In your `test` cluster, developers work in the default namespace, or they create auxiliary namespaces as they see fit. Access to the development cluster requires authentication by certificate. Access to the test cluster requires authentication by username and password. Create a directory named `config-exercise`. In your `config-exercise` directory, create a file named `config-demo` with this content: ```yaml apiVersion: v1 kind: Config preferences: {} clusters: - cluster: name: development - cluster: name: test users: - name: developer - name: experimenter contexts: - context: name: dev-frontend - context: name: dev-storage - context: name: exp-test ``` A configuration file describes clusters, users, and contexts. Your `config-demo` file has the framework to describe two clusters, two users, and three contexts. Go to your `config-exercise` directory. Enter these commands to add cluster details to your configuration file: ```shell kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify ``` Add user details to your configuration file: {{< caution >}} Storing passwords in Kubernetes client config is risky. A better alternative would be to use a credential plugin and store them separately. See: [client-go credential plugins](/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins) {{< /caution >}} ```shell kubectl config --kubeconfig=config-demo set-credentials developer --client-certificate=fake-cert-file --client-key=fake-key-seefile kubectl config --kubeconfig=config-demo set-credentials experimenter --username=exp --password=some-password ``` {{< note >}} - To delete a user you can run `kubectl --kubeconfig=config-demo config unset users.` - To remove a cluster, you can run `kubectl --kubeconfig=config-demo config unset clusters.` - To remove a context, you can run `kubectl --kubeconfig=config-demo config unset contexts.` {{< /note >}} Add context details to your configuration file: ```shell kubectl config --kubeconfig=config-demo set-context dev-frontend --cluster=development --namespace=frontend --user=developer kubectl config --kubeconfig=config-demo set-context dev-storage --cluster=development --namespace=storage --user=developer kubectl config --kubeconfig=config-demo set-context exp-test --cluster=test --namespace=default --user=experimenter ``` Open your `config-demo` file to see the added details. As an alternative to opening the `config-demo` file, you can use the `config view` command. ```shell kubectl config --kubeconfig=config-demo view ``` The output shows the two clusters, two users, and three contexts: ```yaml apiVersion: v1 clusters: - cluster: certificate-authority: fake-ca-file server: https://1.2.3.4 name: development - cluster: insecure-skip-tls-verify: true server: https://5.6.7.8 name: test contexts: - context: cluster: development namespace: frontend user: developer name: dev-frontend - context: cluster: development namespace: storage user: developer name: dev-storage - context: cluster: test namespace: default user: experimenter name: exp-test current-context: "" kind: Config preferences: {} users: - name: developer user: client-certificate: fake-cert-file client-key: fake-key-file - name:
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
[
-0.004840725567191839,
-0.015147675760090351,
-0.03943011537194252,
-0.003737852443009615,
0.02181749790906906,
-0.009698127396404743,
0.07166025042533875,
-0.03862609341740608,
0.01607828587293625,
-0.012703685089945793,
0.02527112141251564,
-0.08606290072202682,
0.07895815372467041,
-0.06634736061096191,
0.0334356389939785,
-0.01891462318599224,
0.010961863212287426,
-0.04347018897533417,
-0.03301078453660011,
-0.017195038497447968,
-0.04192113131284714,
-0.036496032029390335,
-0.034593477845191956,
0.01896331086754799,
-0.10190334916114807,
0.007447455078363419,
-0.02859751507639885,
-0.0012944540940225124,
-0.035476598888635635,
0.01452968455851078,
0.002491434570401907,
0.09129734337329865,
-0.03071560338139534,
0.02630523219704628,
0.06453196704387665,
0.09255906194448471,
0.04810566455125809,
-0.01274937391281128,
-0.1060115396976471,
0.0016636225627735257,
0.04988820478320122,
0.01586543768644333,
-0.06954582035541534,
-0.01258967723697424,
-0.06952618062496185,
-0.018960416316986084,
-0.082614466547966,
-0.07212893664836884,
-0.02604817971587181,
-0.07672220468521118,
0.023568911477923393,
-0.06283726543188095,
0.02951367199420929,
-0.027421126142144203,
0.01848127879202366,
0.02939692698419094,
0.029659675434231758,
0.03768301382660866,
0.10354732722043991,
0.013340496458113194,
-0.001490516820922494,
0.03402334824204445,
-0.01089139748364687,
-0.021082492545247078,
0.007707236334681511,
0.06368640810251236,
-0.01243545487523079,
0.032580263912677765,
0.026838937774300575,
-0.020298214629292488,
0.0029274856206029654,
-0.015093562193214893,
0.03743555396795273,
0.013850674964487553,
0.015520117245614529,
0.053005073219537735,
-0.10143837332725525,
0.013345016166567802,
0.0339590460062027,
-0.15086086094379425,
0.049510449171066284,
0.08168213814496994,
0.07985710352659225,
-0.02583763748407364,
-0.07852616161108017,
0.0000794286752352491,
0.026095865294337273,
-0.1006929948925972,
0.10423517972230911,
0.04708515852689743,
0.019926073029637337,
-0.10567225515842438,
0.049716025590896606,
-0.06281375885009766,
0.07621802389621735,
0.021230166777968407,
-0.05019267648458481,
-0.009035705588757992,
0.0845467820763588,
-0.01862497441470623,
0.018502995371818542,
-0.06700952351093292,
0.035363420844078064,
0.015547780320048332,
0.022469544783234596,
-0.019141139462590218,
-0.07216957211494446,
-0.016408877447247505,
0.053262289613485336,
0.06463997811079025,
-0.03171832114458084,
0.1050717756152153,
-0.00028804450994357467,
-0.02559748850762844,
0.0019503526855260134,
-0.0017859574873000383,
0.12185453623533249,
-0.007789629977196455,
0.010369271039962769,
0.13580761849880219,
0.026129957288503647,
-0.10454745590686798,
0.04416647180914879,
-0.022121423855423927,
-0.029054567217826843,
-0.05864269286394119,
-0.0751592218875885,
6.453030522472493e-33,
0.057508327066898346,
-0.08540944755077362,
0.028882471844553947,
-0.01404998917132616,
0.007674769032746553,
-0.06218007206916809,
-0.04252415522933006,
-0.01535658910870552,
-0.06142400950193405,
-0.05341365560889244,
-0.0010786884231492877,
0.10114255547523499,
0.028826633468270302,
-0.036551542580127716,
0.02243010699748993,
0.025335872545838356,
-0.010405151173472404,
0.07661598920822144,
0.08424483984708786,
-0.03504245728254318,
-0.013181439600884914,
-0.022518616169691086,
-0.03335757926106453,
0.0010085853282362223,
-0.016472188755869865,
0.03746356815099716,
0.006624172441661358,
-0.04019350931048393,
0.04269805923104286,
0.023653090000152588,
-0.028691720217466354,
-0.032679639756679535,
-0.0028871167451143265,
0.09494663029909134,
-0.1198829784989357,
0.04664480313658714,
-0.006308584474027157,
-0.006353698670864105,
-0.07181475311517715,
-0.06345584243535995,
0.0721794068813324,
-0.06172483041882515,
0.0464494563639164,
-0.05020930618047714,
0.07746310532093048,
0.010691250674426556,
0.007988457567989826,
-0.057185232639312744,
0.05876442790031433,
-0.017058026045560837,
-0.04234408214688301,
-0.03069092333316803,
0.08013838529586792,
0.008528325706720352,
0.02760906331241131,
0.05291830748319626,
0.052959490567445755,
-0.07709307223558426,
0.016981111839413643,
-0.03151907026767731,
-0.06266956031322479,
0.0017204181058332324,
-0.09206788241863251,
0.041731495410203934,
0.003278212621808052,
-0.08010213822126389,
-0.0038568321615457535,
0.03748628869652748,
-0.016669591888785362,
-0.009472804144024849,
-0.13277225196361542,
-0.014070859178900719,
-0.038156598806381226,
0.04778308793902397,
-0.06467578560113907,
-0.057981282472610474,
-0.007588610984385014,
0.10009055584669113,
-0.10361003875732422,
0.0247842688113451,
0.008314630016684532,
-0.0381268747150898,
-0.03185497224330902,
0.08807788044214249,
-0.011140353046357632,
-0.03485356271266937,
-0.03777304291725159,
-0.026219822466373444,
-0.061256203800439835,
0.027573244646191597,
0.005904924590140581,
-0.032292310148477554,
-0.033526934683322906,
0.04266687110066414,
-0.11745060980319977,
-8.281614840932258e-33,
0.08916505426168442,
-0.0021379548124969006,
0.013618938624858856,
-0.0076199243776500225,
0.04015055671334267,
0.046584613621234894,
0.026773648336529732,
0.059501178562641144,
-0.017313862219452858,
-0.03416524454951286,
-0.05846897512674332,
-0.04596002772450447,
0.12208016216754913,
-0.05477845296263695,
-0.05107618868350983,
0.02859029360115528,
-0.0020963505376130342,
0.0382036492228508,
-0.020445866510272026,
0.01703242026269436,
-0.020972521975636482,
-0.0920707955956459,
0.06557083129882812,
0.0006209869752638042,
-0.02427627332508564,
-0.002694478025659919,
-0.04852931573987007,
-0.01592446304857731,
-0.09126272052526474,
0.0613848976790905,
0.03266044706106186,
0.011970503255724907,
-0.027407297864556313,
0.025386368855834007,
-0.028443777933716774,
-0.11513779312372208,
-0.011691015213727951,
-0.007680787704885006,
-0.027630964294075966,
-0.04815950617194176,
0.020931674167513847,
0.12448321282863617,
-0.0507865734398365,
-0.044287003576755524,
-0.023305611684918404,
0.07036217302083969,
0.08203265815973282,
-0.05308067798614502,
-0.07063227146863937,
-0.07304946333169937,
-0.03382183983922005,
-0.03592877835035324,
-0.00407510157674551,
0.01081115286797285,
-0.08168213814496994,
0.035082731395959854,
0.06677845865488052,
0.046890806406736374,
-0.010561227798461914,
0.032885584980249405,
0.07987788319587708,
-0.09255195409059525,
-0.007564684376120567,
0.03523850813508034,
0.017721207812428474,
-0.01346184778958559,
0.00700483238324523,
0.02930826134979725,
0.007175146136432886,
0.015544784255325794,
-0.03990694135427475,
-0.020754439756274223,
0.003648265264928341,
0.0006696534692309797,
-0.010562525130808353,
-0.03476695716381073,
0.02989748865365982,
-0.0759652853012085,
0.0030403807759284973,
0.04227583110332489,
0.0771399736404419,
-0.010081122629344463,
-0.052672378718853,
0.004269463941454887,
0.04531334713101387,
0.0365494042634964,
0.03354554995894432,
0.10213034600019455,
0.04810544103384018,
0.07546781003475189,
-0.05349372327327728,
-0.007129137869924307,
-0.004481066484004259,
0.10115012526512146,
-0.019351081922650337,
-6.034898802909083e-8,
0.04525581747293472,
0.036366093903779984,
-0.06147035211324692,
0.021251197904348373,
0.03980023041367531,
-0.0024846550077199936,
-0.0674561932682991,
0.02861451357603073,
-0.027127055451273918,
0.050138067454099655,
0.014081710018217564,
0.011372045613825321,
-0.08188014477491379,
-0.00004521819937508553,
-0.026119161397218704,
0.010744551196694374,
-0.02558297850191593,
0.02259168215095997,
-0.012170929461717606,
-0.009707140736281872,
0.012418651953339577,
0.02601603977382183,
-0.018188312649726868,
0.05869299918413162,
0.03900208696722984,
0.06252646446228027,
0.07968682050704956,
0.01957964152097702,
0.014403169974684715,
0.01764744520187378,
-0.08780565112829208,
-0.002771038329228759,
-0.10730712115764618,
0.0722251683473587,
-0.11246015131473541,
0.052685100585222244,
-0.1008353903889656,
0.039875127375125885,
0.06512419134378433,
0.045098740607500076,
0.011914601549506187,
0.03985736891627312,
-0.04994427412748337,
0.014243025332689285,
-0.023110952228307724,
0.07090135663747787,
0.024595269933342934,
0.059026189148426056,
0.01866498589515686,
-0.03982682153582573,
-0.05569303408265114,
0.006041335873305798,
-0.03645471855998039,
0.11549194902181625,
-0.04039878025650978,
-0.008914811536669731,
-0.04681498929858208,
-0.015245946124196053,
0.08121412247419357,
0.0004109081346541643,
-0.05785461142659187,
-0.03778780251741409,
0.04561379551887512,
-0.013145417906343937
] | 0.141155
|
name: test contexts: - context: cluster: development namespace: frontend user: developer name: dev-frontend - context: cluster: development namespace: storage user: developer name: dev-storage - context: cluster: test namespace: default user: experimenter name: exp-test current-context: "" kind: Config preferences: {} users: - name: developer user: client-certificate: fake-cert-file client-key: fake-key-file - name: experimenter user: # Documentation note (this comment is NOT part of the command output). # Storing passwords in Kubernetes client config is risky. # A better alternative would be to use a credential plugin # and store the credentials separately. # See https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins password: some-password username: exp ``` The `fake-ca-file`, `fake-cert-file` and `fake-key-file` above are the placeholders for the pathnames of the certificate files. You need to change these to the actual pathnames of certificate files in your environment. Sometimes you may want to use Base64-encoded data embedded here instead of separate certificate files; in that case you need to add the suffix `-data` to the keys, for example, `certificate-authority-data`, `client-certificate-data`, `client-key-data`. Each context is a triple (cluster, user, namespace). For example, the `dev-frontend` context says, "Use the credentials of the `developer` user to access the `frontend` namespace of the `development` cluster". Set the current context: ```shell kubectl config --kubeconfig=config-demo use-context dev-frontend ``` Now whenever you enter a `kubectl` command, the action will apply to the cluster, and namespace listed in the `dev-frontend` context. And the command will use the credentials of the user listed in the `dev-frontend` context. To see only the configuration information associated with the current context, use the `--minify` flag. ```shell kubectl config --kubeconfig=config-demo view --minify ``` The output shows configuration information associated with the `dev-frontend` context: ```yaml apiVersion: v1 clusters: - cluster: certificate-authority: fake-ca-file server: https://1.2.3.4 name: development contexts: - context: cluster: development namespace: frontend user: developer name: dev-frontend current-context: dev-frontend kind: Config preferences: {} users: - name: developer user: client-certificate: fake-cert-file client-key: fake-key-file ``` Now suppose you want to work for a while in the test cluster. Change the current context to `exp-test`: ```shell kubectl config --kubeconfig=config-demo use-context exp-test ``` Now any `kubectl` command you give will apply to the default namespace of the `test` cluster. And the command will use the credentials of the user listed in the `exp-test` context. View configuration associated with the new current context, `exp-test`. ```shell kubectl config --kubeconfig=config-demo view --minify ``` Finally, suppose you want to work for a while in the `storage` namespace of the `development` cluster. Change the current context to `dev-storage`: ```shell kubectl config --kubeconfig=config-demo use-context dev-storage ``` View configuration associated with the new current context, `dev-storage`. ```shell kubectl config --kubeconfig=config-demo view --minify ``` ## Create a second configuration file In your `config-exercise` directory, create a file named `config-demo-2` with this content: ```yaml apiVersion: v1 kind: Config preferences: {} contexts: - context: cluster: development namespace: ramp user: developer name: dev-ramp-up ``` The preceding configuration file defines a new context named `dev-ramp-up`. ## Set the KUBECONFIG environment variable See whether you have an environment variable named `KUBECONFIG`. If so, save the current value of your `KUBECONFIG` environment variable, so you can restore it later. For example: ### Linux ```shell export KUBECONFIG\_SAVED="$KUBECONFIG" ``` ### Windows PowerShell ```powershell $Env:KUBECONFIG\_SAVED=$ENV:KUBECONFIG ``` The `KUBECONFIG` environment variable is a list of paths to configuration files. The list is colon-delimited for Linux and Mac, and semicolon-delimited for Windows. If you have a `KUBECONFIG` environment variable, familiarize yourself with the configuration files in the list. Temporarily append two paths to your `KUBECONFIG` environment variable. For example: ### Linux ```shell export KUBECONFIG="${KUBECONFIG}:config-demo:config-demo-2" ``` ### Windows PowerShell ```powershell $Env:KUBECONFIG=("config-demo;config-demo-2") ``` In your `config-exercise` directory, enter this command: ```shell kubectl config view ``` The output shows
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
[
-0.016939135268330574,
0.031370703130960464,
-0.06871897727251053,
0.0062030889093875885,
-0.05735732987523079,
-0.006971574854105711,
0.043604061007499695,
0.025236720219254494,
0.07727479934692383,
0.03605729341506958,
-0.0023195152170956135,
-0.10381801426410675,
0.08935513347387314,
0.036372143775224686,
0.033754341304302216,
0.032639726996421814,
0.00911812111735344,
0.017816388979554176,
0.02418026328086853,
-0.040635451674461365,
-0.03067183680832386,
-0.04080282151699066,
0.04357128217816353,
-0.008646197617053986,
-0.05492876470088959,
-0.05393761768937111,
0.008201527409255505,
0.010508351027965546,
0.008212491869926453,
0.0426030270755291,
0.028425753116607666,
-0.00020346685778349638,
-0.017171112820506096,
-0.02506566420197487,
0.044928088784217834,
0.08704514801502228,
0.06797368824481964,
-0.015552056021988392,
-0.06141238659620285,
0.0003505928034428507,
0.057474229484796524,
0.025047730654478073,
-0.09243545681238174,
0.017011508345603943,
-0.02293274737894535,
0.021236540749669075,
-0.01766231842339039,
-0.04611022397875786,
-0.04705165699124336,
0.00826477911323309,
0.032401878386735916,
-0.048351939767599106,
0.04010144621133804,
-0.01245382521301508,
0.0037861629389226437,
0.056471578776836395,
-0.0008827634737826884,
0.09772156178951263,
0.13163988292217255,
-0.007609345950186253,
0.053726401180028915,
-0.024415969848632812,
0.0003878850257024169,
-0.019315345212817192,
-0.07327857613563538,
0.08645714819431305,
-0.0242124292999506,
0.008169436827301979,
-0.000005959082045592368,
0.019193418323993683,
0.025426749140024185,
0.025000393390655518,
-0.07294998317956924,
-0.09030161798000336,
0.024787461385130882,
0.06778930872678757,
-0.10002688318490982,
0.000030939161661081016,
0.015403565019369125,
-0.08341824263334274,
0.06489462405443192,
-0.0026934852357953787,
-0.015437019057571888,
0.008918478153645992,
-0.08393053710460663,
0.030156433582305908,
0.023748645558953285,
-0.0810086652636528,
0.005638108588755131,
0.01057613268494606,
0.02668730914592743,
-0.07457960397005081,
-0.04925861209630966,
-0.100674107670784,
0.07728483527898788,
0.03650642931461334,
-0.06255654990673065,
0.024752847850322723,
0.03808589652180672,
-0.03575946390628815,
-0.03740279749035835,
-0.013445037417113781,
0.03481811285018921,
0.031371939927339554,
0.06065105274319649,
0.020815923810005188,
-0.011799465864896774,
-0.0335921049118042,
0.023978589102625847,
0.08963984996080399,
0.0022660167887806892,
0.07989004254341125,
-0.039832912385463715,
0.008266271091997623,
0.06945929676294327,
0.05127289891242981,
-0.00866279099136591,
0.016553115099668503,
0.0195851419121027,
0.13652577996253967,
0.023594185709953308,
-0.0730961337685585,
-0.029763223603367805,
0.04212651029229164,
0.011078265495598316,
-0.01075225230306387,
-0.031869057565927505,
3.404796244611724e-33,
0.024796150624752045,
-0.06495070457458496,
0.029361797496676445,
0.0664602741599083,
0.06322402507066727,
-0.07360761612653732,
0.04699463024735451,
-0.032923080027103424,
-0.06862058490514755,
-0.04164911434054375,
-0.014505726285278797,
0.044665250927209854,
0.013462655246257782,
-0.07259346544742584,
0.0366426520049572,
0.08463633060455322,
-0.06869858503341675,
0.000510603014845401,
0.08600378036499023,
-0.011538888327777386,
0.008037368766963482,
-0.04046768695116043,
0.00036222380003891885,
-0.045302677899599075,
-0.03431624919176102,
-0.08347733318805695,
0.03684838116168976,
-0.052650030702352524,
-0.022585513070225716,
-0.015041986480355263,
-0.0416099950671196,
-0.005400418303906918,
0.06155921518802643,
0.06432551890611649,
-0.13323652744293213,
0.02090824395418167,
0.03436378762125969,
0.028778595849871635,
-0.141784206032753,
-0.016369367018342018,
0.014263876713812351,
-0.005253647454082966,
0.07108960300683975,
0.02000897377729416,
-0.008040047250688076,
-0.09333130717277527,
0.04045028239488602,
-0.021245313808321953,
0.1544191688299179,
0.031111638993024826,
-0.06572473794221878,
-0.02589857019484043,
0.021533595398068428,
-0.05522662773728371,
0.06184452772140503,
0.00893651507794857,
0.060551416128873825,
-0.06808116286993027,
-0.09913036972284317,
-0.059378642588853836,
-0.06587301194667816,
-0.0044922735542058945,
-0.0570923313498497,
0.07269610464572906,
-0.011895530857145786,
-0.05278150737285614,
-0.01419534906744957,
-0.036518607288599014,
-0.023266863077878952,
-0.028957972303032875,
-0.049754951149225235,
0.017572324723005295,
-0.08935863524675369,
-0.008088351227343082,
-0.047781094908714294,
-0.057663530111312866,
0.015313589945435524,
0.11098013073205948,
-0.05666017532348633,
0.05073709040880203,
0.07383901625871658,
-0.03767527639865875,
-0.09029153734445572,
0.14915207028388977,
-0.06716736406087875,
0.011571834795176983,
-0.03113388456404209,
-0.0017242665635421872,
0.011058058589696884,
-0.06839372962713242,
0.09444795548915863,
-0.03706846013665199,
0.03321041911840439,
-0.0014634192921221256,
-0.10260514914989471,
-4.831462881478025e-33,
0.05538572371006012,
-0.020970014855265617,
0.014299237169325352,
0.029386436566710472,
0.11737150698900223,
0.05204308405518532,
0.0440794974565506,
0.05255722627043724,
-0.04488478973507881,
-0.03275744244456291,
-0.02634907327592373,
-0.0234016552567482,
0.053036727011203766,
-0.0073218452744185925,
-0.017723819240927696,
-0.0011711094994097948,
-0.08692051470279694,
-0.007506340276449919,
0.017036467790603638,
-0.06354137510061264,
-0.0006482567405328155,
-0.041014183312654495,
0.014881551265716553,
0.03185398876667023,
0.020230833441019058,
-0.008523642085492611,
-0.030408263206481934,
0.016549214720726013,
-0.0581032820045948,
0.011554153636097908,
-0.039392177015542984,
0.014079482294619083,
-0.08476629853248596,
0.02302100695669651,
0.004645527806133032,
-0.13026025891304016,
0.001521363970823586,
0.0536273829638958,
-0.032219190150499344,
-0.010880629532039165,
-0.015968743711709976,
0.0875110924243927,
-0.019646964967250824,
-0.011913290247321129,
0.035499781370162964,
0.08432266861200333,
0.08259239047765732,
-0.10727502405643463,
-0.030094057321548462,
0.012048001401126385,
-0.022934792563319206,
0.042068224400281906,
-0.11029079556465149,
0.006444584112614393,
-0.05651475116610527,
0.019737066701054573,
0.004471235442906618,
0.07173813879489899,
-0.00905462447553873,
0.00804091151803732,
0.09763819724321365,
-0.0681452602148056,
0.05216139182448387,
0.11323793232440948,
-0.06823147088289261,
-0.040460098534822464,
-0.017399828881025314,
0.07623704522848129,
-0.0572531558573246,
0.038059160113334656,
-0.0599692240357399,
-0.06870345771312714,
0.005822924897074699,
0.0547172874212265,
0.0151663888245821,
-0.04262774437665939,
0.022183116525411606,
-0.057301316410303116,
0.08004481345415115,
0.04709062725305557,
0.008675548247992992,
0.018068503588438034,
-0.11287818849086761,
0.02197229489684105,
0.03891231492161751,
-0.004501138348132372,
0.021067462861537933,
0.10392624139785767,
0.027584008872509003,
0.08571500331163406,
-0.012716490775346756,
0.015173814259469509,
-0.035166554152965546,
0.02183137647807598,
0.010263210162520409,
-4.984755008763386e-8,
-0.005336707457900047,
0.0030068447813391685,
-0.07402582466602325,
0.02698100544512272,
-0.07555849105119705,
0.008811285719275475,
-0.0027592857368290424,
-0.01748822256922722,
-0.040537167340517044,
-0.009730539284646511,
-0.05684426426887512,
0.031556636095047,
-0.058271847665309906,
0.02900758385658264,
-0.07376572489738464,
0.01605730876326561,
0.003336581401526928,
-0.01078800018876791,
0.024565543979406357,
-0.0386650525033474,
-0.031904686242341995,
0.04380738362669945,
-0.006958685349673033,
-0.01206393726170063,
0.014332251623272896,
0.10042040050029755,
0.04625936225056648,
0.0593375526368618,
0.017589202150702477,
-0.024861415848135948,
-0.0024743685498833656,
-0.019996637478470802,
-0.08845874667167664,
0.0009274992044083774,
-0.12289129197597504,
0.04585934802889824,
-0.05293219909071922,
0.017400717362761497,
0.005608565639704466,
0.06493334472179413,
-0.0777212381362915,
-0.02057485096156597,
-0.01638009212911129,
0.003754017874598503,
-0.02763967029750347,
0.05204804614186287,
0.06852948665618896,
0.09688999503850937,
0.012585476040840149,
0.009711847640573978,
-0.031604815274477005,
-0.0628720298409462,
-0.037591177970170975,
0.04210825636982918,
-0.004610549658536911,
0.0006087326910346746,
-0.027011962607502937,
0.0039851972833275795,
0.05181306228041649,
-0.05352279543876648,
-0.025989053770899773,
-0.004431792534887791,
-0.00032756433938629925,
-0.01042959839105606
] | 0.036081
|
`KUBECONFIG` environment variable, familiarize yourself with the configuration files in the list. Temporarily append two paths to your `KUBECONFIG` environment variable. For example: ### Linux ```shell export KUBECONFIG="${KUBECONFIG}:config-demo:config-demo-2" ``` ### Windows PowerShell ```powershell $Env:KUBECONFIG=("config-demo;config-demo-2") ``` In your `config-exercise` directory, enter this command: ```shell kubectl config view ``` The output shows merged information from all the files listed in your `KUBECONFIG` environment variable. In particular, notice that the merged information has the `dev-ramp-up` context from the `config-demo-2` file and the three contexts from the `config-demo` file: ```yaml contexts: - context: cluster: development namespace: frontend user: developer name: dev-frontend - context: cluster: development namespace: ramp user: developer name: dev-ramp-up - context: cluster: development namespace: storage user: developer name: dev-storage - context: cluster: test namespace: default user: experimenter name: exp-test ``` For more information about how kubeconfig files are merged, see [Organizing Cluster Access Using kubeconfig Files](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) ## Explore the $HOME/.kube directory If you already have a cluster, and you can use `kubectl` to interact with the cluster, then you probably have a file named `config` in the `$HOME/.kube` directory. Go to `$HOME/.kube`, and see what files are there. Typically, there is a file named `config`. There might also be other configuration files in this directory. Briefly familiarize yourself with the contents of these files. ## Append $HOME/.kube/config to your KUBECONFIG environment variable If you have a `$HOME/.kube/config` file, and it's not already listed in your `KUBECONFIG` environment variable, append it to your `KUBECONFIG` environment variable now. For example: ### Linux ```shell export KUBECONFIG="${KUBECONFIG}:${HOME}/.kube/config" ``` ### Windows Powershell ```powershell $Env:KUBECONFIG="$Env:KUBECONFIG;$HOME\.kube\config" ``` View configuration information merged from all the files that are now listed in your `KUBECONFIG` environment variable. In your config-exercise directory, enter: ```shell kubectl config view ``` ## Clean up Return your `KUBECONFIG` environment variable to its original value. For example: ### Linux ```shell export KUBECONFIG="$KUBECONFIG\_SAVED" ``` ### Windows PowerShell ```powershell $Env:KUBECONFIG=$ENV:KUBECONFIG\_SAVED ``` ## Check the subject represented by the kubeconfig It is not always obvious what attributes (username, groups) you will get after authenticating to the cluster. It can be even more challenging if you are managing more than one cluster at the same time. There is a `kubectl` subcommand to check subject attributes, such as username, for your selected Kubernetes client context: `kubectl auth whoami`. Read [API access to authentication information for a client](/docs/reference/access-authn-authz/authentication/#self-subject-review) to learn about this in more detail. ## {{% heading "whatsnext" %}} \* [Organizing Cluster Access Using kubeconfig Files](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) \* [kubectl config](/docs/reference/generated/kubectl/kubectl-commands#config)
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
|
[
0.06835731118917465,
-0.019264740869402885,
-0.01598469913005829,
0.03902274742722511,
-0.00964584294706583,
-0.002058347687125206,
-0.011429042555391788,
-0.016445236280560493,
0.02650630474090576,
0.03875833749771118,
-0.0030116147827357054,
-0.10068061202764511,
-0.00598558597266674,
-0.0696142166852951,
0.06268372386693954,
0.03289983421564102,
-0.08942592889070511,
-0.036994531750679016,
-0.03234308958053589,
-0.044902995228767395,
-0.01445044856518507,
0.0067788539454340935,
0.03606381639838219,
-0.04848635569214821,
-0.008736781775951385,
-0.061610136181116104,
0.006284406874328852,
0.04452844709157944,
-0.025271093472838402,
-0.05672111362218857,
-0.042048126459121704,
0.07393518835306168,
-0.03264028951525688,
-0.013292260468006134,
0.1101662814617157,
0.14526453614234924,
0.0548490472137928,
-0.00010818750888574868,
-0.06354913860559464,
-0.07708807289600372,
0.0777689591050148,
-0.014742248691618443,
0.008313153870403767,
-0.048825085163116455,
-0.02696416899561882,
0.021361416205763817,
-0.04616808146238327,
-0.05698913708329201,
0.01322047971189022,
-0.043135251849889755,
0.04005507007241249,
-0.07772162556648254,
0.01962796412408352,
-0.009625313803553581,
0.07392563670873642,
0.03462125360965729,
0.010417642071843147,
0.07833296805620193,
0.11785811185836792,
-0.01055992767214775,
0.03628741577267647,
0.003472905606031418,
-0.035636551678180695,
-0.019941488280892372,
-0.0205464418977499,
-0.01868460327386856,
0.017745429649949074,
0.022998590022325516,
-0.004656958859413862,
-0.03352639451622963,
-0.07039511203765869,
-0.012650996446609497,
-0.062488265335559845,
-0.09796222299337387,
-0.02609246037900448,
0.06810251623392105,
-0.04855076223611832,
0.0965752974152565,
-0.024392802268266678,
-0.11646024137735367,
-0.012749727815389633,
0.051034290343523026,
-0.01959306187927723,
-0.025766447186470032,
-0.042628198862075806,
0.03867294266819954,
0.024004735052585602,
-0.03750896081328392,
0.051369380205869675,
0.01612059585750103,
-0.06991824507713318,
-0.11219975352287292,
-0.022455746307969093,
-0.05749712139368057,
0.002776391338557005,
0.016422517597675323,
-0.012055251747369766,
0.04357573762536049,
0.058867014944553375,
-0.01654973067343235,
-0.01586231030523777,
0.05848587304353714,
0.08009342849254608,
0.050021976232528687,
-0.015586658380925655,
-0.07212089002132416,
-0.10019007325172424,
0.026332437992095947,
0.049684882164001465,
0.019417081028223038,
-0.01791185513138771,
0.05853547900915146,
0.032434381544589996,
-0.004290626384317875,
0.06425245106220245,
0.014162137173116207,
0.029384372755885124,
0.061872467398643494,
-0.0036202301271259785,
0.08167846500873566,
0.04633482173085213,
-0.10819776356220245,
-0.030801570042967796,
0.008905807510018349,
-0.024032115936279297,
0.01933535933494568,
0.02402001991868019,
5.387905907642802e-33,
0.10552316159009933,
-0.1344476193189621,
0.07764669507741928,
0.03161144256591797,
0.09492676705121994,
-0.06739240139722824,
-0.015543335117399693,
-0.028329864144325256,
-0.030245570465922356,
0.013423927128314972,
-0.05551120266318321,
0.06096302717924118,
-0.0496768094599247,
0.01319681666791439,
-0.024920586496591568,
0.003462135326117277,
-0.0804990604519844,
0.04770929366350174,
0.05128174275159836,
0.010151654481887817,
0.04464243724942207,
-0.024739207699894905,
-0.07787111401557922,
-0.004169112537056208,
0.05997837334871292,
-0.00954730436205864,
0.062142811715602875,
-0.009771107695996761,
-0.10109789669513702,
-0.01637631468474865,
-0.013876155018806458,
-0.0009830190101638436,
0.012052036821842194,
0.0028315733652561903,
-0.1142096295952797,
-0.04262733459472656,
0.04899550974369049,
0.019207606092095375,
-0.09666674584150314,
0.05315158888697624,
0.031332019716501236,
-0.05212583765387535,
0.04048730432987213,
-0.05311540141701698,
0.0833560973405838,
-0.0580754280090332,
0.054485805332660675,
-0.067332923412323,
0.13326725363731384,
0.007169513963162899,
-0.043312057852745056,
0.0008690759423188865,
0.08879753947257996,
-0.056567899882793427,
0.05670982971787453,
0.004132050089538097,
0.017079345881938934,
-0.06329821050167084,
-0.058853812515735626,
0.024126457050442696,
-0.007379115093499422,
0.06118118762969971,
-0.0714322179555893,
0.03790814429521561,
0.008957761339843273,
-0.05077865719795227,
-0.05159647762775421,
-0.013211550191044807,
-0.0117987971752882,
0.0043824417516589165,
-0.055804990231990814,
-0.004385999403893948,
-0.05658324435353279,
-0.002860400592908263,
0.03127051144838333,
-0.08318346738815308,
-0.05435764417052269,
-0.0010528190759941936,
-0.09604646265506744,
0.057316526770591736,
0.025338025763630867,
0.045950569212436676,
-0.08619342744350433,
-0.005363435484468937,
0.06530306488275528,
0.0025019384920597076,
-0.03671034052968025,
-0.022707410156726837,
-0.05260757356882095,
-0.06444557756185532,
-0.07883939892053604,
0.01056515984237194,
-0.04072996601462364,
0.009528187103569508,
-0.05226850137114525,
-8.36751996809035e-33,
0.11918237060308456,
-0.01091341394931078,
0.027556098997592926,
-0.025792917236685753,
0.023747438564896584,
0.061706408858299255,
-0.0007085560937412083,
0.011973380111157894,
-0.0300899725407362,
-0.058067575097084045,
-0.043493520468473434,
0.0003640690993051976,
0.03669619932770729,
0.002225500298663974,
-0.07086315751075745,
0.04646212235093117,
-0.050377290695905685,
0.021406179293990135,
0.04915706813335419,
0.009400326758623123,
-0.01646924950182438,
0.030285147950053215,
0.09462539851665497,
0.0034524688962846994,
-0.001613968051970005,
-0.05400317162275314,
-0.005362570285797119,
0.06614281982183456,
-0.026900021359324455,
0.04180514067411423,
0.03449912741780281,
-0.011855567805469036,
-0.07790680229663849,
0.07612811028957367,
-0.05778034031391144,
-0.0867876410484314,
-0.01407309528440237,
-0.016970910131931305,
0.007150649558752775,
0.06921057403087616,
0.019069593399763107,
0.0722343698143959,
-0.06341749429702759,
-0.002701578428968787,
-0.023371195420622826,
0.04115457460284233,
0.07236138731241226,
-0.10195758938789368,
-0.03411060571670532,
-0.08353239297866821,
0.04125529155135155,
0.02393781952559948,
-0.08743337541818619,
0.036795273423194885,
-0.020579906180500984,
0.00959488283842802,
0.016327764838933945,
0.062179889529943466,
-0.10482759773731232,
-0.0734073594212532,
0.025593392550945282,
-0.026784060522913933,
0.06991750746965408,
0.021045107394456863,
-0.030493369325995445,
0.03460113704204559,
0.025098860263824463,
0.06841644644737244,
-0.04916682839393616,
-0.020866237580776215,
-0.10387596487998962,
-0.04499461501836777,
-0.019870078191161156,
0.027432844042778015,
0.01058637909591198,
-0.0019335094839334488,
0.01521934662014246,
-0.029187001287937164,
0.026057802140712738,
0.07059171050786972,
-0.01355160865932703,
-0.014344005845487118,
-0.0754593014717102,
-0.04427427798509598,
-0.038760099560022354,
0.05140228942036629,
-0.0323004387319088,
0.1039721742272377,
0.06138566508889198,
0.06969160586595535,
-0.05551184341311455,
0.005587354768067598,
0.014076514169573784,
0.10037746280431747,
-0.08519266545772552,
-5.637694755478151e-8,
0.028573887422680855,
0.008577777072787285,
-0.09192453324794769,
0.005213696043938398,
0.0030906687024980783,
-0.005876481998711824,
0.04100815951824188,
0.016122091561555862,
-0.04117624834179878,
-0.07846377044916153,
-0.030667589977383614,
0.050841961055994034,
-0.0025194084737449884,
0.09462873637676239,
-0.02796621434390545,
-0.046738334000110626,
0.02118014171719551,
0.09250430762767792,
0.013138516806066036,
-0.04299492388963699,
-0.012379617430269718,
-0.016276463866233826,
0.03920545428991318,
0.026085548102855682,
0.059206247329711914,
0.08079014718532562,
0.037401363253593445,
-0.008656121790409088,
0.006780628114938736,
0.07515782862901688,
0.018128948286175728,
-0.023519959300756454,
-0.08550666272640228,
0.07210762053728104,
-0.05613331124186516,
-0.0029817705508321524,
-0.023209968581795692,
0.08046901971101761,
0.05931785702705383,
0.061719708144664764,
-0.03302404657006264,
0.024175526574254036,
-0.05123543366789818,
0.02561880648136139,
-0.005615797359496355,
-0.017669670283794403,
-0.04664488881826401,
0.03440264239907265,
-0.02982693538069725,
-0.08534657955169678,
-0.07131333649158478,
0.004393070470541716,
0.0046455818228423595,
0.06871720403432846,
0.016549956053495407,
0.06224162131547928,
-0.05814080312848091,
0.007857409305870533,
0.025647001340985298,
0.054115548729896545,
-0.09632191807031631,
-0.02290784940123558,
-0.025003209710121155,
-0.04161784425377846
] | 0.076536
|
This page shows how to use a Volume to communicate between two Containers running in the same Pod. See also how to allow processes to communicate by [sharing process namespace](/docs/tasks/configure-pod-container/share-process-namespace/) between containers. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Creating a Pod that runs two Containers In this exercise, you create a Pod that runs two Containers. The two containers share a Volume that they can use to communicate. Here is the configuration file for the Pod: {{% code\_sample file="pods/two-container-pod.yaml" %}} In the configuration file, you can see that the Pod has a Volume named `shared-data`. The first container listed in the configuration file runs an nginx server. The mount path for the shared Volume is `/usr/share/nginx/html`. The second container is based on the debian image, and has a mount path of `/pod-data`. The second container runs the following command and then terminates. echo Hello from the debian container > /pod-data/index.html Notice that the second container writes the `index.html` file in the root directory of the nginx server. Create the Pod and the two Containers: kubectl apply -f https://k8s.io/examples/pods/two-container-pod.yaml View information about the Pod and the Containers: kubectl get pod two-containers --output=yaml Here is a portion of the output: apiVersion: v1 kind: Pod metadata: ... name: two-containers namespace: default ... spec: ... containerStatuses: - containerID: docker://c1d8abd1 ... image: debian ... lastState: terminated: ... name: debian-container ... - containerID: docker://96c1ff2c5bb ... image: nginx ... name: nginx-container ... state: running: ... You can see that the debian Container has terminated, and the nginx Container is still running. Get a shell to nginx Container: kubectl exec -it two-containers -c nginx-container -- /bin/bash In your shell, verify that nginx is running: root@two-containers:/# apt-get update root@two-containers:/# apt-get install curl procps root@two-containers:/# ps aux The output is similar to this: USER PID ... STAT START TIME COMMAND root 1 ... Ss 21:12 0:00 nginx: master process nginx -g daemon off; Recall that the debian Container created the `index.html` file in the nginx root directory. Use `curl` to send a GET request to the nginx server: ``` root@two-containers:/# curl localhost ``` The output shows that nginx serves a web page written by the debian container: ``` Hello from the debian container ``` ## Discussion The primary reason that Pods can have multiple containers is to support helper applications that assist a primary application. Typical examples of helper applications are data pullers, data pushers, and proxies. Helper and primary applications often need to communicate with each other. Typically this is done through a shared filesystem, as shown in this exercise, or through the loopback network interface, localhost. An example of this pattern is a web server along with a helper program that polls a Git repository for new updates. The Volume in this exercise provides a way for Containers to communicate during the life of the Pod. If the Pod is deleted and recreated, any data stored in the shared Volume is lost. ## {{% heading "whatsnext" %}} \* Learn more about [patterns for composite containers](/blog/2015/06/the-distributed-system-toolkit-patterns/). \* Learn about [composite containers for modular architecture](https://www.slideshare.net/Docker/slideshare-burns). \* See [Configuring a Pod to Use a Volume for Storage](/docs/tasks/configure-pod-container/configure-volume-storage/). \* See [Configure a Pod to share process namespace between containers in a Pod](/docs/tasks/configure-pod-container/share-process-namespace/) \* See [Volume](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core). \* See [Pod](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core).
| null |
./vendor/kubernetes/content/en/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume.md
|
[
-0.006951368413865566,
-0.023485226556658745,
0.001213554758578539,
-0.017181145027279854,
-0.04399312660098076,
-0.07805095613002777,
-0.0363740473985672,
0.003224477870389819,
-0.0009414332453161478,
0.01774260215461254,
-0.06764502823352814,
0.00026906642597168684,
0.0026960386894643307,
0.02380342036485672,
0.05404561385512352,
-0.054043497890233994,
0.06412411481142044,
0.007770342752337456,
-0.022227982059121132,
-0.02455545775592327,
0.04157186299562454,
0.08855605870485306,
0.03246074169874191,
0.029196953400969505,
0.0016138083301484585,
0.02794102393090725,
-0.0398937463760376,
-0.015356862917542458,
0.03599442541599274,
0.020361145958304405,
0.07704463601112366,
-0.03806551918387413,
-0.02853359840810299,
0.02236403338611126,
-0.014717942103743553,
0.12212339788675308,
0.01567901112139225,
-0.08368218690156937,
-0.026486078277230263,
-0.02960684709250927,
0.059657108038663864,
0.004439379088580608,
-0.11576059460639954,
-0.055831633508205414,
-0.08601238578557968,
-0.03702162206172943,
-0.06884389370679855,
-0.027263188734650612,
0.016294755041599274,
-0.002547700423747301,
-0.0720067098736763,
-0.148207426071167,
0.04095884785056114,
0.06479494273662567,
0.013432269915938377,
0.008735105395317078,
-0.0032792428974062204,
0.07532200962305069,
0.038852863013744354,
0.014822647906839848,
-0.022996945306658745,
-0.030352246016263962,
0.03426191955804825,
-0.03991793468594551,
0.05477140098810196,
-0.03273081034421921,
-0.04499330371618271,
0.05556613951921463,
-0.0391043946146965,
-0.06256409734487534,
0.05631311982870102,
0.05022674798965454,
0.015182886272668839,
-0.07188575714826584,
-0.027644893154501915,
-0.018033374100923538,
-0.053890444338321686,
0.021384606137871742,
-0.1016031876206398,
0.022797955200076103,
0.039839185774326324,
0.03645404800772667,
0.0278867706656456,
-0.010223619639873505,
-0.0657145231962204,
-0.030896980315446854,
0.059667401015758514,
-0.0025168107822537422,
-0.009563018567860126,
-0.11934305727481842,
0.01570376381278038,
-0.012006293050944805,
-0.008649303577840328,
-0.009264502674341202,
0.12616607546806335,
0.008709405548870564,
-0.07608778029680252,
0.06388309597969055,
0.013383886776864529,
0.03194604814052582,
0.005056518130004406,
-0.027206359431147575,
0.02384006977081299,
0.007673727814108133,
0.09990911185741425,
-0.047771040350198746,
-0.042854491621255875,
-0.005974388215690851,
0.04692227020859718,
0.04447677731513977,
0.00532953254878521,
-0.0011393183376640081,
-0.0011747876415029168,
0.10503077507019043,
-0.028705190867185593,
0.020596660673618317,
-0.00038320253952406347,
0.04908657819032669,
-0.0011536356760188937,
0.06379508227109909,
0.03581921383738518,
-0.09988190978765488,
0.02630138397216797,
0.019442733377218246,
0.050621744245290756,
-0.05560331046581268,
-0.003629587823525071,
1.2768941465631489e-33,
0.0004667167959269136,
-0.11155480146408081,
0.019045570865273476,
0.05389638990163803,
0.10361883044242859,
-0.04250118508934975,
-0.0404512956738472,
-0.002398027339950204,
-0.007977168075740337,
-0.017603153362870216,
-0.022086933255195618,
0.12194715440273285,
-0.02811145968735218,
0.0017486473079770803,
-0.03199249133467674,
-0.07349409908056259,
-0.053135015070438385,
0.038668159395456314,
0.13967368006706238,
0.023287827149033546,
0.06804421544075012,
-0.03384046629071236,
-0.08571076393127441,
0.046228788793087006,
0.06017610430717468,
-0.03409341350197792,
0.01611819490790367,
-0.12436190992593765,
0.002593076089397073,
-0.001483925967477262,
-0.009535984136164188,
0.021533071994781494,
0.018107835203409195,
-0.003516135038807988,
-0.08830084651708603,
-0.0386970154941082,
0.02924620732665062,
0.05132375285029411,
-0.10549613833427429,
-0.07722511887550354,
0.09242149442434311,
-0.0375542938709259,
-0.014562070369720459,
-0.03269103169441223,
-0.06690163165330887,
-0.0565134696662426,
-0.020293228328227997,
-0.08137286454439163,
0.09758802503347397,
-0.010654204525053501,
0.009974949061870575,
-0.06788375973701477,
-0.020533211529254913,
-0.02972620725631714,
0.05716386064887047,
-0.02435615472495556,
0.002612338401377201,
-0.0030606568325310946,
0.025522645562887192,
-0.031064694747328758,
-0.0607336051762104,
0.03983035311102867,
0.025188373401761055,
0.02589617669582367,
0.03817816823720932,
0.05327396094799042,
-0.041063420474529266,
-0.010155951604247093,
0.14222846925258636,
0.02580597624182701,
-0.09779694676399231,
0.024728329852223396,
-0.024276625365018845,
0.018323713913559914,
-0.005979490932077169,
-0.03668181970715523,
0.017031803727149963,
0.015933386981487274,
-0.00017554474470671266,
0.03098568506538868,
0.003123332979157567,
-0.018542850390076637,
-0.09191291034221649,
0.10798652470111847,
-0.07204938679933548,
-0.002579177962616086,
-0.05012953281402588,
0.043080586940050125,
-0.08582078665494919,
0.03712717071175575,
-0.017889391630887985,
0.06680718064308167,
-0.09329889714717865,
-0.030812706798315048,
-0.017414432018995285,
-3.156262943385306e-33,
0.06052601337432861,
0.005553632974624634,
-0.034195512533187866,
0.0668463408946991,
0.042458731681108475,
0.026646973565220833,
0.060089219361543655,
-0.01649537682533264,
-0.01673194207251072,
0.02256236970424652,
-0.09067375957965851,
-0.03175172582268715,
0.027120912447571754,
0.08910471200942993,
-0.1184406653046608,
0.004533328115940094,
-0.010938342660665512,
-0.06284909695386887,
0.05902963504195213,
0.0038844081573188305,
-0.07716835290193558,
0.054563701152801514,
0.07070883363485336,
0.015981029719114304,
-0.013721326366066933,
0.03609754517674446,
0.08062992990016937,
-0.036417823284864426,
-0.024508653208613396,
-0.04747983068227768,
-0.023435106500983238,
-0.04337868466973305,
0.028684042394161224,
-0.04985196888446808,
-0.03968339413404465,
-0.029097914695739746,
-0.06183764711022377,
0.03501048684120178,
-0.0011747675016522408,
-0.09049749374389648,
0.10531924664974213,
-0.015494754537940025,
-0.045796047896146774,
-0.02831558883190155,
-0.08172466605901718,
-0.035726502537727356,
0.04917695000767708,
-0.02295856364071369,
-0.047528449445962906,
-0.09096992015838623,
0.025150513276457787,
0.024529097601771355,
-0.10358545184135437,
0.02234688214957714,
0.014833865687251091,
-0.005810791160911322,
0.02977394498884678,
0.019129037857055664,
-0.03522671014070511,
0.006865833420306444,
0.12043928354978561,
-0.014689001254737377,
0.042277079075574875,
-0.013919718563556671,
-0.03482692316174507,
-0.013038752600550652,
-0.08438906818628311,
0.015216708183288574,
0.06443958729505539,
0.10513445734977722,
0.009098048321902752,
0.05463017523288727,
0.11429297178983688,
0.05342232435941696,
0.052276723086833954,
0.04716438427567482,
-0.01623760722577572,
-0.06918227672576904,
0.05014702305197716,
-0.01952136866748333,
-0.0720236524939537,
0.08871086686849594,
-0.07811535894870758,
0.014928890392184258,
0.01967454142868519,
0.09616150707006454,
0.08591791987419128,
0.0729907974600792,
-0.009152437560260296,
0.009241628460586071,
0.03547420725226402,
0.008297337219119072,
-0.034120410680770874,
-0.011882278136909008,
-0.004760839510709047,
-5.364944755115175e-8,
0.040697693824768066,
0.043039049953222275,
0.010650556534528732,
0.0700727179646492,
-0.0760401263833046,
-0.054453182965517044,
0.053141795098781586,
-0.011182809248566628,
0.015140825882554054,
0.06078139692544937,
-0.06572357565164566,
-0.011452410370111465,
-0.06327196955680847,
0.03990485146641731,
-0.00613365089520812,
0.023180542513728142,
0.02266768366098404,
0.04750707000494003,
-0.002647791290655732,
-0.07302743941545486,
-0.018542209640145302,
-0.017878180369734764,
0.013146824203431606,
0.009322624653577805,
-0.013347430154681206,
0.07220454514026642,
0.052771519869565964,
-0.0057108402252197266,
-0.0179317444562912,
-0.05126259848475456,
0.02073073945939541,
-0.01991887018084526,
-0.07034312933683395,
0.06489645689725876,
-0.03238778933882713,
-0.065775565803051,
-0.14852812886238098,
0.025337064638733864,
0.02311837114393711,
-0.021371228620409966,
-0.05398625135421753,
-0.031632836908102036,
-0.016304101794958115,
-0.031216580420732498,
-0.0023334722500294447,
0.0498291440308094,
0.004401680547744036,
0.03107641078531742,
-0.026343364268541336,
0.08181316405534744,
0.03419041261076927,
-0.023624956607818604,
0.017953423783183098,
0.06513719260692596,
0.07905317842960358,
0.03501599282026291,
-0.018679345026612282,
-0.032035812735557556,
-0.008516507223248482,
-0.011547079309821129,
0.0275662150233984,
0.05453327298164368,
-0.015704194083809853,
0.0010786871425807476
] | 0.121125
|
This page shows how to enable and configure certificate rotation for the kubelet. {{< feature-state for\_k8s\_version="v1.19" state="stable" >}} ## {{% heading "prerequisites" %}} \* Kubernetes version 1.8.0 or later is required ## Overview The kubelet uses certificates for authenticating to the Kubernetes API. By default, these certificates are issued with one year expiration so that they do not need to be renewed too frequently. Kubernetes contains [kubelet certificate rotation](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/), that will automatically generate a new key and request a new certificate from the Kubernetes API as the current certificate approaches expiration. Once the new certificate is available, it will be used for authenticating connections to the Kubernetes API. ## Enabling client certificate rotation The `kubelet` process accepts an argument `--rotate-certificates` that controls if the kubelet will automatically request a new certificate as the expiration of the certificate currently in use approaches. The `kube-controller-manager` process accepts an argument `--cluster-signing-duration` (`--experimental-cluster-signing-duration` prior to 1.19) that controls how long certificates will be issued for. ## Understanding the certificate rotation configuration When a kubelet starts up, if it is configured to bootstrap (using the `--bootstrap-kubeconfig` flag), it will use its initial certificate to connect to the Kubernetes API and issue a certificate signing request. You can view the status of certificate signing requests using: ```sh kubectl get csr ``` Initially a certificate signing request from the kubelet on a node will have a status of `Pending`. If the certificate signing requests meets specific criteria, it will be auto approved by the controller manager, then it will have a status of `Approved`. Next, the controller manager will sign a certificate, issued for the duration specified by the `--cluster-signing-duration` parameter, and the signed certificate will be attached to the certificate signing request. The kubelet will retrieve the signed certificate from the Kubernetes API and write that to disk, in the location specified by `--cert-dir`. Then the kubelet will use the new certificate to connect to the Kubernetes API. As the expiration of the signed certificate approaches, the kubelet will automatically issue a new certificate signing request, using the Kubernetes API. This can happen at any point between 30% and 10% of the time remaining on the certificate. Again, the controller manager will automatically approve the certificate request and attach a signed certificate to the certificate signing request. The kubelet will retrieve the new signed certificate from the Kubernetes API and write that to disk. Then it will update the connections it has to the Kubernetes API to reconnect using the new certificate.
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/certificate-rotation.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/certificate-rotation.md
|
[
-0.03992094472050667,
0.05004007741808891,
0.04808301851153374,
-0.012843839824199677,
-0.09228848665952682,
0.015895215794444084,
-0.04312209039926529,
-0.020730359479784966,
0.09586154669523239,
-0.03170035406947136,
-0.007126000244170427,
-0.004570217337459326,
0.07106059044599533,
0.008713232353329659,
0.005755181889981031,
0.009402462281286716,
-0.0813339501619339,
0.061122503131628036,
-0.017092131078243256,
-0.06995967775583267,
0.009267165325582027,
-0.010528079234063625,
-0.021789032965898514,
0.03948935866355896,
-0.04184870421886444,
-0.11272028833627701,
0.032438818365335464,
0.009244930930435658,
0.02650502510368824,
-0.031561411917209625,
0.04059847071766853,
0.035094812512397766,
-0.03299989178776741,
0.008218749426305294,
-0.01886085979640484,
0.019693482667207718,
0.08678904920816422,
0.07279951125383377,
-0.06342654675245285,
0.014673370867967606,
0.08735901117324829,
-0.048418812453746796,
-0.08774767071008682,
-0.005923328455537558,
-0.016156233847141266,
0.03782610595226288,
-0.041030433028936386,
-0.05990787595510483,
0.008210397325456142,
0.051734428852796555,
0.01124302577227354,
-0.10890566557645798,
0.03451325371861458,
0.029598819091916084,
-0.030409280210733414,
0.05991413816809654,
0.014166017062962055,
0.0655381977558136,
0.06329984962940216,
0.0025924122892320156,
0.09730913490056992,
-0.001040359027683735,
-0.014022047631442547,
0.019473914057016373,
-0.09683229774236679,
-0.00010886577365454286,
0.012815267778933048,
-0.025545215234160423,
-0.003387740347534418,
0.07527636736631393,
0.05916303023695946,
-0.0015398511895909905,
-0.06754887104034424,
-0.0132328812032938,
0.03167063742876053,
-0.03086191974580288,
-0.07278542220592499,
-0.04651539400219917,
0.001529298722743988,
-0.10634057223796844,
0.03851974755525589,
0.056199993938207626,
0.08611294627189636,
-0.002738555194810033,
-0.01513152290135622,
-0.0584104061126709,
-0.058079201728105545,
0.028375519439578056,
0.014662248082458973,
0.034024305641651154,
0.048660602420568466,
-0.03136107325553894,
-0.0368230938911438,
-0.1215846836566925,
0.08264528214931488,
0.03888849914073944,
0.01631089486181736,
-0.012757176533341408,
0.0348597876727581,
-0.057040102779865265,
-0.0344829261302948,
-0.043834488838911057,
-0.0863984078168869,
-0.00572136789560318,
0.06701833009719849,
-0.017056779935956,
-0.020852036774158478,
-0.06828264892101288,
0.037385664880275726,
0.02402355521917343,
0.007815887220203876,
0.03079337812960148,
-0.030432306230068207,
-0.04393342137336731,
-0.043612316250801086,
0.1405724138021469,
-0.03459411859512329,
0.02891095168888569,
0.07800019532442093,
0.039399102330207825,
0.02067659981548786,
-0.014870685525238514,
-0.011170396581292152,
0.013972921296954155,
-0.03773118183016777,
0.0238955020904541,
0.026952343061566353,
6.57117064346601e-33,
0.03939396142959595,
0.004406637977808714,
0.053258731961250305,
-0.010058023035526276,
-0.023000402376055717,
-0.12383672595024109,
0.02577839605510235,
-0.023808447644114494,
-0.0739486962556839,
-0.07088594883680344,
-0.06066025793552399,
0.11132542043924332,
-0.05115272477269173,
-0.089805006980896,
0.001346362172625959,
-0.02525606006383896,
-0.0871305763721466,
0.023292124271392822,
0.10081606358289719,
-0.00621790299192071,
0.04616367444396019,
-0.09508069604635239,
0.019378164783120155,
0.03872935473918915,
-0.004167939070612192,
-0.05213892459869385,
0.08830323070287704,
0.060532763600349426,
-0.09624773263931274,
-0.0032541370019316673,
0.019135933369398117,
-0.0021719783544540405,
-0.025765636935830116,
-0.027951756492257118,
-0.09673506021499634,
0.031475525349378586,
0.024660421535372734,
0.018439488485455513,
-0.02871730923652649,
-0.025778446346521378,
0.02441362664103508,
-0.02177010290324688,
-0.01576458290219307,
-0.022422105073928833,
0.0671384260058403,
-0.039658769965171814,
0.035670991986989975,
-0.02351353131234646,
0.1574515551328659,
0.08660127967596054,
-0.0010034280130639672,
0.02460412308573723,
-0.032082416117191315,
-0.05930008739233017,
0.02890942618250847,
0.010975892655551434,
0.06561430543661118,
-0.022166725248098373,
-0.11029023677110672,
-0.05443381145596504,
-0.018096117302775383,
-0.050017133355140686,
0.0030778234358876944,
-0.021571656689047813,
0.04195015877485275,
0.04449819400906563,
-0.0029773900751024485,
0.04026626795530319,
-0.10477887094020844,
-0.038572121411561966,
-0.05660225823521614,
0.01203598640859127,
-0.07106383889913559,
-0.04792678728699684,
-0.04299250617623329,
-0.025920048356056213,
-0.01091642864048481,
0.060452673584222794,
-0.03366376832127571,
0.03117426671087742,
0.06943364441394806,
0.025578878819942474,
-0.012963912449777126,
0.0657142922282219,
0.03285440802574158,
0.0035326811484992504,
0.07988684624433517,
0.06431856006383896,
-0.05784464627504349,
0.02763425186276436,
0.01366429403424263,
0.009383667260408401,
0.04003443941473961,
0.12161023914813995,
-0.05530957132577896,
-6.172254145886989e-33,
0.05902029201388359,
-0.02724357880651951,
0.0701182633638382,
0.07917939871549606,
0.05306049436330795,
0.007354654837399721,
-0.01740444079041481,
0.10869544744491577,
-0.03941330686211586,
-0.0484904907643795,
0.039132051169872284,
-0.07502447068691254,
0.03552648797631264,
0.03818933293223381,
-0.005208078771829605,
-0.027919713407754898,
-0.12206883728504181,
0.12446974217891693,
-0.014854680746793747,
0.026264335960149765,
0.00825769454240799,
-0.005097636952996254,
-0.05365364998579025,
0.012762009166181087,
0.0002987601619679481,
-0.0005751251592300832,
0.023951862007379532,
0.07391797006130219,
-0.004623096901923418,
0.001303651137277484,
0.011912495829164982,
-0.08364969491958618,
0.007619839161634445,
0.05048823729157448,
-0.024531841278076172,
-0.05256454646587372,
-0.03176281973719597,
0.011223855428397655,
0.0005196678102947772,
0.0548270046710968,
0.04057971388101578,
-0.005885158199816942,
-0.033905886113643646,
-0.015418807044625282,
0.0077973040752112865,
0.03914088383316994,
0.0832873284816742,
-0.0223931185901165,
-0.017028488218784332,
-0.05916226655244827,
0.007953472435474396,
0.010635007172822952,
-0.02431493066251278,
0.05584247410297394,
-0.028338555246591568,
0.08203970640897751,
0.0004987854626961052,
0.13924147188663483,
0.021053284406661987,
-0.01256582885980606,
0.015958458185195923,
-0.0673440471291542,
0.09563057124614716,
0.02268211357295513,
-0.02850005030632019,
-0.0036445041187107563,
0.0058710575103759766,
0.04603683575987816,
-0.028309587389230728,
0.05643213912844658,
-0.03908194229006767,
-0.024393584579229355,
-0.005096688400954008,
-0.04018155112862587,
0.026869194582104683,
-0.018308082595467567,
0.061101414263248444,
-0.028524430468678474,
0.01741548627614975,
-0.04065491259098053,
-0.04355799779295921,
-0.0019365439657121897,
-0.05476689711213112,
0.014723523519933224,
0.03670056164264679,
0.03315361961722374,
0.04288650304079056,
0.0073921335861086845,
0.06728123873472214,
0.08885913342237473,
0.0009836371755227447,
0.04151752218604088,
-0.00689487112686038,
0.04708367958664894,
0.061236072331666946,
-4.888848792461431e-8,
0.04587067291140556,
0.002981465309858322,
-0.06105624511837959,
0.01876971311867237,
0.039387237280607224,
-0.0007798662409186363,
0.04820520058274269,
-0.07457775622606277,
-0.07614265382289886,
-0.06087937206029892,
-0.05865972489118576,
0.02542322315275669,
-0.025493256747722626,
-0.059392236173152924,
-0.014665878377854824,
-0.0028722863644361496,
-0.06471572816371918,
-0.04820562154054642,
0.04800419509410858,
-0.04759210720658302,
-0.029563486576080322,
-0.06378290057182312,
0.08163206279277802,
0.048221684992313385,
-0.02487277425825596,
0.09875666350126266,
0.018003251403570175,
0.03560749813914299,
0.06207342445850372,
-0.01534885074943304,
-0.07341627776622772,
-0.01810222677886486,
-0.03138068690896034,
-0.012531071901321411,
-0.00414285296574235,
0.051447544246912,
-0.1832011342048645,
-0.00853125099092722,
0.03641436621546745,
0.056009408086538315,
-0.013259896077215672,
0.01619160920381546,
-0.09383638203144073,
0.006397470831871033,
-0.07035452127456665,
0.037265900522470474,
-0.0028261945117264986,
0.037269119173288345,
-0.020686930045485497,
0.021060017868876457,
-0.02284908853471279,
-0.1138802170753479,
-0.028502726927399635,
0.00939851999282837,
-0.11846446990966797,
0.09490156173706055,
0.0019734767265617847,
-0.04809882119297981,
0.042553119361400604,
-0.06643206626176834,
0.0021939508151263,
-0.029151590541005135,
0.039769887924194336,
-0.03962058573961258
] | -0.002872
|
This page shows how to manually rotate the certificate authority (CA) certificates. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} - For more information about authentication in Kubernetes, see [Authenticating](/docs/reference/access-authn-authz/authentication). - For more information about best practices for CA certificates, see [Single root CA](/docs/setup/best-practices/certificates/#single-root-ca). ## Rotate the CA certificates manually {{< caution >}} Make sure to back up your certificate directory along with configuration files and any other necessary files. This approach assumes operation of the Kubernetes control plane in a HA configuration with multiple API servers. Graceful termination of the API server is also assumed so clients can cleanly disconnect from one API server and reconnect to another. Configurations with a single API server will experience unavailability while the API server is being restarted. {{< /caution >}} 1. Distribute the new CA certificates and private keys (for example: `ca.crt`, `ca.key`, `front-proxy-ca.crt`, and `front-proxy-ca.key`) to all your control plane nodes in the Kubernetes certificates directory. 1. Update the `--root-ca-file` flag for the {{< glossary\_tooltip term\_id="kube-controller-manager" >}} to include both old and new CA, then restart the kube-controller-manager. Any {{< glossary\_tooltip text="ServiceAccount" term\_id="service-account" >}} created after this point will get Secrets that include both old and new CAs. {{< note >}} The files specified by the kube-controller-manager flags `--client-ca-file` and `--cluster-signing-cert-file` cannot be CA bundles. If these flags and `--root-ca-file` point to the same `ca.crt` file which is now a bundle (includes both old and new CA) you will face an error. To workaround this problem you can copy the new CA to a separate file and make the flags `--client-ca-file` and `--cluster-signing-cert-file` point to the copy. Once `ca.crt` is no longer a bundle you can restore the problem flags to point to `ca.crt` and delete the copy. [Issue 1350](https://github.com/kubernetes/kubeadm/issues/1350) for kubeadm tracks an bug with the kube-controller-manager being unable to accept a CA bundle. {{< /note >}} 1. Wait for the controller manager to update `ca.crt` in the service account Secrets to include both old and new CA certificates. If any Pods are started before new CA is used by API servers, the new Pods get this update and will trust both old and new CAs. 1. Restart all pods using in-cluster configurations (for example: kube-proxy, CoreDNS, etc) so they can use the updated certificate authority data from Secrets that link to ServiceAccounts. \* Make sure CoreDNS, kube-proxy and other Pods using in-cluster configurations are working as expected. 1. Append the both old and new CA to the file against `--client-ca-file` and `--kubelet-certificate-authority` flag in the `kube-apiserver` configuration. 1. Append the both old and new CA to the file against `--client-ca-file` flag in the `kube-scheduler` configuration. 1. Update certificates for user accounts by replacing the content of `client-certificate-data` and `client-key-data` respectively. For information about creating certificates for individual user accounts, see [Configure certificates for user accounts](/docs/setup/best-practices/certificates/#configure-certificates-for-user-accounts). Additionally, update the `certificate-authority-data` section in the kubeconfig files, respectively with Base64-encoded old and new certificate authority data 1. Update the `--root-ca-file` flag for the {{< glossary\_tooltip term\_id="cloud-controller-manager" >}} to include both old and new CA, then restart the cloud-controller-manager. {{< note >}} If your cluster does not have a cloud-controller-manager, you can skip this step. {{< /note >}} 1. Follow the steps below in a rolling fashion. 1. Restart any other [aggregated API servers](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) or webhook handlers to trust the new CA certificates. 1. Restart the kubelet by update the file against `clientCAFile` in kubelet configuration and `certificate-authority-data` in `kubelet.conf` to use both the old and new CA on all nodes. If your kubelet is not using client certificate rotation, update `client-certificate-data` and `client-key-data` in `kubelet.conf` on all nodes along with the
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
|
[
-0.006804516073316336,
0.06153571233153343,
0.02174476534128189,
-0.011586378328502178,
-0.06431720405817032,
-0.0018849148182198405,
-0.03668886050581932,
-0.00722297839820385,
0.0810282900929451,
0.034132882952690125,
-0.006842662114650011,
-0.01985711045563221,
0.10002202540636063,
0.027272995561361313,
0.02737695910036564,
0.017110461369156837,
-0.08412806689739227,
0.07127704471349716,
-0.001128423260524869,
-0.08315932750701904,
-0.00919592846184969,
0.0021973412949591875,
-0.05907276272773743,
0.05738231912255287,
-0.048880934715270996,
-0.02504263073205948,
0.010271002538502216,
-0.002338623395189643,
-0.024817252531647682,
-0.0263401810079813,
-0.014872195199131966,
-0.041811224073171616,
-0.024635951966047287,
-0.02475784346461296,
-0.0416836217045784,
0.06509669125080109,
0.0551716610789299,
-0.0016691540367901325,
-0.01642400398850441,
0.017808077856898308,
0.09959812462329865,
-0.00881130900233984,
-0.07346095889806747,
-0.025332806631922722,
-0.025562182068824768,
0.01736084371805191,
-0.019164927303791046,
-0.09103287011384964,
0.012262297794222832,
0.0632319226861,
0.031342435628175735,
-0.09267084300518036,
0.02054893597960472,
0.029945747926831245,
-0.04284751042723656,
0.026646919548511505,
0.02171504683792591,
0.06300926953554153,
0.09822680801153183,
-0.019800879061222076,
0.09466492384672165,
0.019397374242544174,
0.0009665753459557891,
-0.02324187569320202,
-0.009693223051726818,
0.027526598423719406,
0.04821467027068138,
-0.05942719802260399,
0.023289427161216736,
0.051939915865659714,
0.06337269395589828,
-0.008560854941606522,
-0.04462381824851036,
-0.04726685583591461,
0.06038312613964081,
-0.06905139237642288,
-0.08999288082122803,
-0.005347797647118568,
0.007659588009119034,
-0.07182358205318451,
0.08402365446090698,
0.07266006618738174,
0.053420595824718475,
0.05008896440267563,
-0.042300913482904434,
-0.013896827585995197,
-0.011201050132513046,
-0.01942463591694832,
0.06569954752922058,
0.002698685508221388,
0.06648973375558853,
-0.07020212709903717,
0.03761379048228264,
-0.12792523205280304,
0.08615858852863312,
0.03753912076354027,
-0.04032339155673981,
-0.023110825568437576,
0.04968220740556717,
-0.022372625768184662,
0.02572009339928627,
-0.05991285294294357,
-0.04356466233730316,
-0.03206942230463028,
0.06017172336578369,
0.023445723578333855,
-0.04180404171347618,
-0.08661282807588577,
0.0032708768267184496,
0.045289892703294754,
-0.013204180635511875,
0.07441753894090652,
-0.019722754135727882,
0.014713780023157597,
-0.012528074905276299,
0.15969952940940857,
-0.040636200457811356,
-0.0009627678664401174,
0.03843351826071739,
-0.003417802043259144,
-0.007416809443384409,
-0.07468725740909576,
0.052368514239788055,
0.000981258461251855,
0.019919641315937042,
0.04410060495138168,
-0.006104785483330488,
5.5794872422558493e-33,
0.01375639159232378,
0.013865886256098747,
0.07923753559589386,
0.01073246356099844,
0.04198693111538887,
-0.1083168014883995,
0.06755957007408142,
-0.0022086540702730417,
-0.045142799615859985,
-0.05199391394853592,
0.018167005851864815,
0.0995555967092514,
-0.02152135781943798,
-0.141375333070755,
-0.018945099785923958,
-0.04188696667551994,
-0.020566564053297043,
-0.01273221056908369,
0.09533967822790146,
0.004012877121567726,
0.025791997089982033,
-0.06485811620950699,
0.003595307469367981,
0.042687032371759415,
0.01215304248034954,
-0.033076412975788116,
0.033448316156864166,
0.02663433365523815,
-0.09159238636493683,
-0.003140536369755864,
-0.04495884105563164,
-0.06781483441591263,
0.017310352995991707,
0.009054319001734257,
-0.12373464554548264,
0.00894315168261528,
0.011866974644362926,
0.03552655875682831,
-0.027344830334186554,
-0.034695763140916824,
0.002324938541278243,
0.0006628798437304795,
-0.006260541267693043,
-0.006514470558613539,
0.06255725771188736,
-0.004502205643802881,
0.009466865099966526,
-0.04600401595234871,
0.12995083630084991,
0.08150235563516617,
-0.04997110739350319,
-0.0313078835606575,
0.01556351874023676,
-0.0669594332575798,
0.03627803921699524,
-0.022056542336940765,
0.049919407814741135,
-0.045346859842538834,
-0.13043171167373657,
-0.07976876199245453,
-0.045447926968336105,
-0.10721088945865631,
-0.06722929328680038,
0.022855471819639206,
0.0370318777859211,
-0.0579012967646122,
-0.026764335110783577,
0.0462476946413517,
-0.057565003633499146,
-0.04883936792612076,
-0.05657387524843216,
0.003509524744004011,
-0.04915252700448036,
-0.06889987736940384,
-0.06566528230905533,
-0.024092702195048332,
0.012125564739108086,
0.12040430307388306,
-0.016706904396414757,
0.009679369628429413,
0.0658927634358406,
0.043435074388980865,
-0.016452983021736145,
0.07644443958997726,
0.01732046902179718,
0.0034760090056806803,
0.0725979208946228,
0.0009135500295087695,
-0.07202812284231186,
0.0526750274002552,
-0.008687345311045647,
0.003628774778917432,
0.06824114918708801,
0.08645828068256378,
-0.04608127474784851,
-5.074924659264614e-33,
0.07160011678934097,
-0.06394416838884354,
0.056210294365882874,
0.04854165017604828,
0.07387233525514603,
0.030454054474830627,
0.0146641805768013,
0.08140914142131805,
-0.06394969671964645,
-0.04728430137038231,
0.002190571278333664,
-0.08368192613124847,
0.0057166568003594875,
0.03617113456130028,
-0.00037733622593805194,
-0.020573321729898453,
-0.06357655674219131,
0.13214673101902008,
-0.015406756661832333,
0.04276061803102493,
0.02581043355166912,
-0.00637960946187377,
-0.0004935219185426831,
0.01671278476715088,
-0.006416389252990484,
0.01859104633331299,
-0.015550537966191769,
0.0796779915690422,
-0.023702282458543777,
0.04593471810221672,
-0.021975724026560783,
-0.14186108112335205,
0.06426192075014114,
0.0433652438223362,
-0.05198672413825989,
-0.06915216147899628,
-0.035304177552461624,
0.075149305164814,
-0.03990471735596657,
0.06929203867912292,
0.008530618622899055,
-0.04210895672440529,
-0.05863064527511597,
-0.037074487656354904,
0.0034219285007566214,
0.05404435470700264,
0.05629176273941994,
-0.030491037294268608,
-0.10947419703006744,
-0.030315905809402466,
-0.02603267878293991,
0.023585258051753044,
-0.058456335216760635,
0.004457438364624977,
-0.043785274028778076,
0.05123450979590416,
0.065950907766819,
0.14495614171028137,
-0.0024706944823265076,
0.024940768256783485,
0.02822064235806465,
-0.05476288124918938,
0.07336721569299698,
0.057302165776491165,
-0.03162206709384918,
-0.0124305235221982,
-0.0339738205075264,
0.03838738054037094,
-0.02322809025645256,
0.06044330075383186,
-0.06768783181905746,
-0.00790930911898613,
-0.024557819589972496,
-0.03796129673719406,
0.05037637799978256,
-0.0708310529589653,
0.049439407885074615,
-0.04731660708785057,
0.04649798199534416,
-0.03948727250099182,
-0.025618812069296837,
-0.01258911844342947,
-0.08136353641748428,
0.042788777500391006,
0.013333226554095745,
0.03850141540169716,
0.08399584144353867,
0.017860349267721176,
0.07824186980724335,
0.09582871943712234,
-0.02878355048596859,
0.06611376255750656,
0.030692102387547493,
0.03380497172474861,
0.05720943957567215,
-4.9913861488448674e-8,
0.015633201226592064,
0.048973966389894485,
-0.01654731296002865,
0.047110479325056076,
0.010300593450665474,
0.006964679807424545,
0.011034372262656689,
-0.04088415578007698,
-0.06040097773075104,
-0.004713376984000206,
-0.07996324449777603,
0.005574953742325306,
-0.019312892109155655,
-0.07041001319885254,
-0.06162668392062187,
-0.00991140864789486,
-0.048455387353897095,
0.004053630866110325,
-0.00035935716005042195,
-0.034252990037202835,
-0.04897995665669441,
-0.02376948855817318,
0.036575887352228165,
0.024974655359983444,
-0.019455930218100548,
0.0947362408041954,
0.07268217206001282,
0.012312568724155426,
0.07249696552753448,
0.03155835345387459,
-0.10156574845314026,
-0.07421387732028961,
-0.03883055970072746,
0.020554780960083008,
-0.006885388866066933,
0.018174191936850548,
-0.07620888203382492,
-0.027993926778435707,
0.02710087224841118,
0.040719758719205856,
-0.04552178457379341,
0.05295673757791519,
-0.08151503652334213,
0.01075681671500206,
-0.019842788577079773,
0.04807884246110916,
-0.016872979700565338,
0.02837948314845562,
0.032883718609809875,
0.010151993483304977,
-0.038982801139354706,
-0.08120431751012802,
-0.016095636412501335,
0.05984978377819061,
-0.0854264348745346,
0.04513267055153847,
0.004158553667366505,
-0.021471945568919182,
0.02006259374320507,
-0.026179326698184013,
0.03614554926753044,
0.0030853005591779947,
0.01135433092713356,
-0.037558265030384064
] | -0.014663
|
certificates. 1. Restart the kubelet by update the file against `clientCAFile` in kubelet configuration and `certificate-authority-data` in `kubelet.conf` to use both the old and new CA on all nodes. If your kubelet is not using client certificate rotation, update `client-certificate-data` and `client-key-data` in `kubelet.conf` on all nodes along with the kubelet client certificate file usually found in `/var/lib/kubelet/pki`. 1. Restart API servers with the certificates (`apiserver.crt`, `apiserver-kubelet-client.crt` and `front-proxy-client.crt`) signed by new CA. You can use the existing private keys or new private keys. If you changed the private keys then update these in the Kubernetes certificates directory as well. Since the Pods in your cluster trust both old and new CAs, there will be a momentarily disconnection after which pods' Kubernetes clients reconnect to the new API server. The new API server uses a certificate signed by the new CA. \* Restart the {{< glossary\_tooltip term\_id="kube-scheduler" text="kube-scheduler" >}} to use and trust the new CAs. \* Make sure control plane components logs no TLS errors. {{< note >}} To generate certificates and private keys for your cluster using the `openssl` command line tool, see [Certificates (`openssl`)](/docs/tasks/administer-cluster/certificates/#openssl). You can also use [`cfssl`](/docs/tasks/administer-cluster/certificates/#cfssl). {{< /note >}} 1. Annotate any DaemonSets and Deployments to trigger pod replacement in a safer rolling fashion. ```shell for namespace in $(kubectl get namespace -o jsonpath='{.items[\*].metadata.name}'); do for name in $(kubectl get deployments -n $namespace -o jsonpath='{.items[\*].metadata.name}'); do kubectl patch deployment -n ${namespace} ${name} -p '{"spec":{"template":{"metadata":{"annotations":{"ca-rotation": "1"}}}}}'; done for name in $(kubectl get daemonset -n $namespace -o jsonpath='{.items[\*].metadata.name}'); do kubectl patch daemonset -n ${namespace} ${name} -p '{"spec":{"template":{"metadata":{"annotations":{"ca-rotation": "1"}}}}}'; done done ``` {{< note >}} To limit the number of concurrent disruptions that your application experiences, see [configure pod disruption budget](/docs/tasks/run-application/configure-pdb/). {{< /note >}} Depending on how you use StatefulSets you may also need to perform similar rolling replacement. 1. If your cluster is using bootstrap tokens to join nodes, update the ConfigMap `cluster-info` in the `kube-public` namespace with new CA. ```shell base64\_encoded\_ca="$(base64 -w0 /etc/kubernetes/pki/ca.crt)" kubectl get cm/cluster-info --namespace kube-public -o yaml | \ /bin/sed "s/\(certificate-authority-data:\).\*/\1 ${base64\_encoded\_ca}/" | \ kubectl apply -f - ``` 1. Verify the cluster functionality. 1. Check the logs from control plane components, along with the kubelet and the kube-proxy. Ensure those components are not reporting any TLS errors; see [looking at the logs](/docs/tasks/debug/debug-cluster/#looking-at-logs) for more details. 1. Validate logs from any aggregated api servers and pods using in-cluster config. 1. Once the cluster functionality is successfully verified: 1. Update all service account tokens to include new CA certificate only. \* All pods using an in-cluster kubeconfig will eventually need to be restarted to pick up the new Secret, so that no Pods are relying on the old cluster CA. 1. Restart the control plane components by removing the old CA from the kubeconfig files and the files against `--client-ca-file`, `--root-ca-file` flags resp. 1. On each node, restart the kubelet by removing the old CA from file against the `clientCAFile` flag and from the kubelet kubeconfig file. You should carry this out as a rolling update. If your cluster lets you make this change, you can also roll it out by replacing nodes rather than reconfiguring them.
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/manual-rotation-of-ca-certificates.md
|
[
0.0415106900036335,
0.02042011171579361,
0.06834983080625534,
-0.012161063961684704,
-0.06399083882570267,
-0.0114459078758955,
-0.05949917435646057,
-0.01709253527224064,
0.11006198823451996,
-0.00643558893352747,
0.004435637500137091,
-0.08036080747842789,
0.049990493804216385,
0.013539771549403667,
0.04516778141260147,
-0.007464665919542313,
-0.05484890192747116,
0.0696062445640564,
-0.013238712213933468,
-0.03280961513519287,
-0.08199051022529602,
-0.051563579589128494,
-0.03755896911025047,
0.03352618217468262,
-0.009750056080520153,
-0.0956692323088646,
-0.006154278293251991,
0.010629028081893921,
-0.002164325211197138,
-0.04069650173187256,
-0.04128311574459076,
0.014045096933841705,
-0.042532987892627716,
-0.01937694102525711,
0.023094549775123596,
0.09800244122743607,
0.07512642443180084,
0.06098869442939758,
-0.02215980552136898,
0.016305796802043915,
0.1014590784907341,
-0.029507363215088844,
-0.08771692216396332,
0.005433682352304459,
0.009566384367644787,
0.0637383833527565,
-0.008695879951119423,
-0.041353072971105576,
0.006653699092566967,
0.0030289648566395044,
0.004303149413317442,
-0.10284659266471863,
0.0037233647890388966,
0.058433376252651215,
-0.005873335059732199,
0.02630886435508728,
0.0005374840693548322,
0.1167244091629982,
0.12628169357776642,
-0.010383482091128826,
0.05149966850876808,
0.025228064507246017,
0.008118605241179466,
0.005139573942869902,
-0.09636090695858002,
0.019450368359684944,
-0.020502936094999313,
-0.016699468716979027,
0.006533097010105848,
0.008203518576920033,
0.08741569519042969,
0.01743929274380207,
-0.026822946965694427,
-0.08150404691696167,
0.02742365188896656,
-0.0481128953397274,
-0.07415739446878433,
-0.0028963556978851557,
0.0060275704599916935,
-0.07877178490161896,
0.06398540735244751,
0.03370174765586853,
0.038218747824430466,
-0.03774617612361908,
-0.07098757475614548,
-0.013641340658068657,
-0.004499324131757021,
-0.040952254086732864,
-0.004647186491638422,
0.0027306254487484694,
0.08485148102045059,
-0.044886793941259384,
-0.00559083791449666,
-0.08117548376321793,
0.05077879875898361,
0.021664630621671677,
0.03380696848034859,
0.060641925781965256,
0.10184092074632645,
-0.007818726822733879,
0.04433165118098259,
0.015176542103290558,
-0.07702277600765228,
0.03162188082933426,
0.045297034084796906,
0.024111133068799973,
-0.028632238507270813,
-0.02110985666513443,
0.025954613462090492,
0.017983168363571167,
0.008974659256637096,
0.014319080859422684,
-0.05089602246880531,
-0.009810770861804485,
-0.04385969787836075,
0.15363267064094543,
-0.017288848757743835,
0.03472960367798805,
-0.004913676530122757,
0.007075705099850893,
-0.010791868902742863,
-0.07940296083688736,
0.01630331017076969,
0.019408414140343666,
-0.0702674612402916,
0.03783125802874565,
0.012969707138836384,
2.9858406907580526e-33,
0.04823119565844536,
-0.040659572929143906,
0.04425622522830963,
-0.0006571821286343038,
0.011478714644908905,
-0.10313449800014496,
-0.007848907262086868,
-0.0264856219291687,
-0.06907510757446289,
-0.11978515982627869,
-0.02715703845024109,
0.041038841009140015,
-0.06249198317527771,
-0.0938689112663269,
0.037015609443187714,
-0.014750164933502674,
-0.11245203018188477,
-0.018310019746422768,
0.0862710177898407,
0.01045310590416193,
0.04580473154783249,
-0.0417206846177578,
-0.0025494073051959276,
0.0679808184504509,
-0.002170064253732562,
0.02836005575954914,
0.07216206192970276,
0.005719038192182779,
-0.07192555069923401,
-0.0075971814803779125,
0.0036065613385289907,
0.02639145962893963,
0.05037198215723038,
0.04620051756501198,
-0.15969990193843842,
0.03749388828873634,
0.04282190650701523,
-0.005876936484128237,
-0.05493609234690666,
-0.06260380893945694,
0.019447920843958855,
0.01597621478140354,
0.005701118148863316,
-0.0646207183599472,
0.05420607700943947,
-0.06761552393436432,
-0.006647228728979826,
-0.0412604883313179,
0.11066868156194687,
0.056874003261327744,
-0.04919898137450218,
0.008264089934527874,
-0.008091660216450691,
-0.01872655376791954,
-0.009191760793328285,
0.02478754334151745,
0.06866387277841568,
-0.025895515456795692,
-0.11205574125051498,
-0.028377069160342216,
0.03146307170391083,
-0.04527324065566063,
0.014036010950803757,
0.051302459090948105,
0.060123246163129807,
0.10764754563570023,
-0.020721249282360077,
0.05138345807790756,
-0.06604012846946716,
-0.016114892438054085,
-0.0859064981341362,
0.037507761269807816,
-0.044470082968473434,
-0.05556168034672737,
-0.028846632689237595,
-0.07575006037950516,
-0.036341868340969086,
0.024793513119220734,
-0.0960536003112793,
0.01977262832224369,
0.05852643400430679,
-0.024430418387055397,
-0.05783112347126007,
0.07779671996831894,
-0.011485307477414608,
0.005551997572183609,
0.054818056523799896,
0.058748845010995865,
-0.03290775045752525,
0.044919706881046295,
0.015730513259768486,
0.05547134205698967,
0.04905441775918007,
0.08551868051290512,
-0.06510688364505768,
-3.260136971063656e-33,
0.05871089547872543,
-0.022825825959444046,
0.0854441300034523,
0.03863709792494774,
0.006839320994913578,
-0.005109183955937624,
-0.040108855813741684,
0.09510133415460587,
-0.011557341553270817,
0.017424359917640686,
-0.03221910446882248,
-0.0875440314412117,
0.03515899181365967,
-0.0018840617267414927,
-0.07875650376081467,
0.014762625098228455,
-0.06154501065611839,
0.07860377430915833,
-0.026801109313964844,
-0.0011191889643669128,
0.016375599429011345,
0.005385742522776127,
-0.013170563615858555,
0.039256371557712555,
0.036194201558828354,
0.02435247041285038,
-0.007296942640095949,
0.06087858974933624,
-0.036025773733854294,
-0.05608178675174713,
0.043161094188690186,
-0.07257896661758423,
0.016879435628652573,
0.0740070641040802,
-0.027182715013623238,
-0.0490536130964756,
-0.016994928941130638,
0.02258804626762867,
-0.01601213961839676,
0.014474081806838512,
0.04706216976046562,
-0.015099584124982357,
-0.07404199242591858,
-0.017632247880101204,
0.028522105887532234,
0.028650065883994102,
0.02275726944208145,
-0.0022304533049464226,
-0.023005085065960884,
-0.08804582804441452,
0.018601516261696815,
-0.005195452831685543,
-0.027914296835660934,
0.03807054087519646,
-0.031095467507839203,
0.08079322427511215,
0.01336546428501606,
0.15603722631931305,
-0.02787123993039131,
-0.06082678213715553,
0.032688967883586884,
-0.07963424175977707,
0.023758595809340477,
0.0639256164431572,
-0.010329300537705421,
0.0030065944883972406,
-0.014428136870265007,
0.03828456997871399,
0.0122907729819417,
0.05009732022881508,
-0.053017809987068176,
0.012288102880120277,
-0.05023523420095444,
-0.03407697752118111,
0.014119595289230347,
-0.030870983377099037,
-0.03620365262031555,
-0.03711773827672005,
0.04504835605621338,
0.03440634533762932,
-0.022370491176843643,
0.01013325434178114,
-0.022463735193014145,
0.02702430449426174,
0.06393519788980484,
0.0573517270386219,
0.07496068626642227,
0.05210917815566063,
0.048973046243190765,
0.05714071914553642,
-0.047848571091890335,
0.048500657081604004,
0.019122522324323654,
0.027637533843517303,
0.010112849995493889,
-4.134766484753527e-8,
0.08013015985488892,
-0.006268635857850313,
-0.13102252781391144,
0.048834748566150665,
0.029790105298161507,
-0.028331872075796127,
-0.011781556531786919,
-0.01568707823753357,
-0.11064566671848297,
-0.033839236944913864,
-0.08100782334804535,
0.0353185310959816,
-0.030942276120185852,
-0.004529412370175123,
0.003249051282182336,
-0.03382495418190956,
-0.020058834925293922,
-0.02502848207950592,
0.043387241661548615,
-0.03816012293100357,
-0.07251967489719391,
-0.045289307832717896,
0.0320756696164608,
0.07935355603694916,
-0.01002557948231697,
0.05998875945806503,
0.07719461619853973,
0.018959295004606247,
0.0358034111559391,
-0.0058509595692157745,
-0.11238674074411392,
-0.06565720587968826,
-0.038220640271902084,
0.015230718068778515,
-0.0037885138299316168,
0.061491139233112335,
-0.156818225979805,
0.028255492448806763,
0.012352959252893925,
0.11008483916521072,
0.022100821137428284,
-0.02731258049607277,
-0.088391974568367,
0.02071964554488659,
-0.060300637036561966,
0.030139269307255745,
-0.00030425513978116214,
0.04764983430504799,
0.02778524160385132,
0.0279918871819973,
-0.008810596540570259,
-0.07879883050918579,
-0.014525740407407284,
-0.052947111427783966,
-0.11157526820898056,
0.06441886723041534,
-0.04587111622095108,
0.014998837374150753,
0.044423945248126984,
-0.06491302698850632,
0.022733492776751518,
-0.02780917100608349,
0.0271050576120615,
-0.059742238372564316
] | 0.034111
|
Kubernetes provides a `certificates.k8s.io` API, which lets you provision TLS certificates signed by a Certificate Authority (CA) that you control. These CA and certificates can be used by your workloads to establish trust. `certificates.k8s.io` API uses a protocol that is similar to the [ACME draft](https://github.com/ietf-wg-acme/acme/). {{< note >}} Certificates created using the `certificates.k8s.io` API are signed by a [dedicated CA](#configuring-your-cluster-to-provide-signing). It is possible to configure your cluster to use the cluster root CA for this purpose, but you should never rely on this. Do not assume that these certificates will validate against the cluster root CA. {{< /note >}} ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You need the `cfssl` tool. You can download `cfssl` from [https://github.com/cloudflare/cfssl/releases](https://github.com/cloudflare/cfssl/releases). Some steps in this page use the `jq` tool. If you don't have `jq`, you can install it via your operating system's software sources, or fetch it from [https://jqlang.github.io/jq/](https://jqlang.github.io/jq/). ## Trusting TLS in a cluster Trusting the [custom CA](#configuring-your-cluster-to-provide-signing) from an application running as a pod usually requires some extra application configuration. You will need to add the CA certificate bundle to the list of CA certificates that the TLS client or server trusts. For example, you would do this with a golang TLS config by parsing the certificate chain and adding the parsed certificates to the `RootCAs` field in the [`tls.Config`](https://pkg.go.dev/crypto/tls#Config) struct. {{< note >}} Even though the custom CA certificate may be included in the filesystem (in the ConfigMap `kube-root-ca.crt`), you should not use that certificate authority for any purpose other than to verify internal Kubernetes endpoints. An example of an internal Kubernetes endpoint is the Service named `kubernetes` in the default namespace. If you want to use a custom certificate authority for your workloads, you should generate that CA separately, and distribute its CA certificate using a [ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap) that your pods have access to read. {{< /note >}} ## Requesting a certificate The following section demonstrates how to create a TLS certificate for a Kubernetes service accessed through DNS. {{< note >}} This tutorial uses CFSSL: Cloudflare's PKI and TLS toolkit [click here](https://blog.cloudflare.com/introducing-cfssl/) to know more. {{< /note >}} ## Create a certificate signing request Generate a private key and certificate signing request (or CSR) by running the following command: ```shell cat < Annotations: CreationTimestamp: Tue, 01 Feb 2022 11:49:15 -0500 Requesting User: yourname@example.com Signer: example.com/serving Status: Pending Subject: Common Name: my-pod.my-namespace.pod.cluster.local Serial Number: Subject Alternative Names: DNS Names: my-pod.my-namespace.pod.cluster.local my-svc.my-namespace.svc.cluster.local IP Addresses: 192.0.2.24 10.0.34.2 Events: ``` ## Get the CertificateSigningRequest approved {#get-the-certificate-signing-request-approved} Approving the [certificate signing request](/docs/reference/access-authn-authz/certificate-signing-requests/) is either done by an automated approval process or on a one off basis by a cluster administrator. If you're authorized to approve a certificate request, you can do that manually using `kubectl`; for example: ```shell kubectl certificate approve my-svc.my-namespace ``` ```none certificatesigningrequest.certificates.k8s.io/my-svc.my-namespace approved ``` You should now see the following: ```shell kubectl get csr ``` ```none NAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION my-svc.my-namespace 10m example.com/serving yourname@example.com Approved ``` This means the certificate request has been approved and is waiting for the requested signer to sign it. ## Sign the CertificateSigningRequest {#sign-the-certificate-signing-request} Next, you'll play the part of a certificate signer, issue the certificate, and upload it to the API. A signer would typically watch the CertificateSigningRequest API for objects with its `signerName`, check that they have been approved, sign certificates for those requests, and update the API object status with the issued certificate. ### Create a Certificate Authority You need an authority to provide the digital signature on the new certificate. First, create a signing certificate by running the following: ```shell cat <}} This uses the command line tool
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
[
-0.02058214321732521,
0.04402178153395653,
0.039012059569358826,
0.032731931656599045,
-0.02332935854792595,
0.001049509970471263,
-0.023282868787646294,
-0.002798008732497692,
0.07415638118982315,
0.03215991333127022,
-0.06826779991388321,
-0.08735550194978714,
0.0823109820485115,
0.08576007187366486,
0.010883171111345291,
-0.03931961581110954,
-0.013672319240868092,
0.0021489441860467196,
0.015904119238257408,
-0.10999281704425812,
-0.016779066994786263,
-0.008019673638045788,
-0.004717632196843624,
0.040659233927726746,
-0.07920318096876144,
-0.0512404702603817,
-0.0028096619062125683,
0.03667247295379639,
0.005404567811638117,
0.02989252284169197,
-0.003137486521154642,
-0.03746185824275017,
0.02023756131529808,
-0.014819786883890629,
0.03714631125330925,
0.07847021520137787,
0.08296088129281998,
0.024834316223859787,
-0.06953559815883636,
0.009010864421725273,
0.08289298415184021,
-0.05662018060684204,
-0.08243899047374725,
-0.011976630426943302,
0.009048371575772762,
0.012603490613400936,
-0.009013159200549126,
-0.07609550654888153,
-0.0726562961935997,
0.010451598092913628,
0.0167870931327343,
-0.09727118909358978,
0.039669737219810486,
0.008237018249928951,
-0.06331875175237656,
0.03566436097025871,
-0.010932528413832188,
0.044785916805267334,
0.08095910400152206,
-0.04053421691060066,
0.060401465743780136,
-0.08302703499794006,
0.026364756748080254,
-0.016503095626831055,
-0.04909861832857132,
0.09100762009620667,
0.02164658159017563,
0.04530547559261322,
0.008054048754274845,
0.020549654960632324,
0.07742206752300262,
-0.006201691925525665,
0.03519636020064354,
-0.03400097414851189,
-0.0011530147166922688,
-0.015762001276016235,
-0.0549156591296196,
-0.017180193215608597,
0.018982041627168655,
-0.06151583045721054,
-0.0011734826257452369,
0.02101503312587738,
0.018329903483390808,
-0.03187861293554306,
-0.08933083713054657,
-0.014708636328577995,
0.027446409687399864,
-0.047913700342178345,
0.07947482168674469,
-0.020173311233520508,
0.028920145705342293,
-0.07034257054328918,
-0.013071241788566113,
-0.11388494819402695,
0.0772925317287445,
0.026374399662017822,
0.004951451439410448,
-0.02758091315627098,
0.03833417221903801,
-0.05789423733949661,
-0.00022013536363374442,
-0.05732588842511177,
-0.041965119540691376,
-0.022739173844456673,
0.04193213954567909,
0.06962458789348602,
-0.05303998664021492,
-0.045391835272312164,
0.05869569629430771,
0.08003810793161392,
-0.020290475338697433,
0.08715789765119553,
-0.03040356934070587,
-0.004508696496486664,
0.01847347617149353,
0.08019698411226273,
0.029950568452477455,
0.005783525761216879,
0.08761079609394073,
0.022972773760557175,
0.0014617752749472857,
-0.09269944578409195,
-0.01824536919593811,
0.017610624432563782,
0.025659870356321335,
-0.005365626886487007,
-0.019115030765533447,
2.159735770765789e-33,
0.08356532454490662,
0.03501606360077858,
0.06131277605891228,
-0.033586982637643814,
0.03940561041235924,
-0.10949386656284332,
0.058167971670627594,
-0.03650061786174774,
-0.07482479512691498,
-0.03595149889588356,
-0.056235071271657944,
0.12814019620418549,
-0.0032265225891023874,
-0.08065472543239594,
0.003550277790054679,
0.025224095210433006,
-0.08253884315490723,
-0.006471221335232258,
0.10801877081394196,
0.055409323424100876,
0.012711596675217152,
-0.07510003447532654,
0.01311974786221981,
0.018976707011461258,
0.00926945824176073,
-0.036977145820856094,
0.06841251254081726,
-0.017367782071232796,
0.009813465178012848,
-0.006432465277612209,
-0.022594012320041656,
-0.057824838906526566,
0.027080457657575607,
-0.015918336808681488,
-0.09364078938961029,
0.04132054001092911,
0.011617553420364857,
0.0411628820002079,
-0.013721679337322712,
-0.059924304485321045,
0.09436915069818497,
-0.04270930215716362,
0.0517268180847168,
0.007650961633771658,
0.016903582960367203,
0.011089193634688854,
0.0019832774996757507,
-0.07762158662080765,
0.13862264156341553,
0.03951338678598404,
-0.024210866540670395,
-0.09051493555307388,
-0.012431430630385876,
-0.10710504651069641,
0.05784505605697632,
0.002957375720143318,
0.0597229041159153,
-0.018006596714258194,
-0.08446252346038818,
-0.06315041333436966,
-0.0571814589202404,
-0.10746950656175613,
-0.06097225099802017,
-0.003865357954055071,
-0.014725341461598873,
0.0016358413267880678,
0.010293303988873959,
0.057945411652326584,
-0.0629505142569542,
-0.06818728148937225,
-0.10097428411245346,
0.05064525455236435,
-0.03850366920232773,
0.010523686185479164,
-0.024058476090431213,
-0.027173638343811035,
0.005729443393647671,
0.09647335857152939,
-0.0310183335095644,
0.05365881696343422,
0.008817982859909534,
-0.038562145084142685,
-0.038916513323783875,
0.10836774855852127,
0.041587330400943756,
-0.014144374057650566,
0.011404280550777912,
0.0714183822274208,
-0.02312314324080944,
-0.018236394971609116,
-0.012666778638958931,
0.02664279006421566,
0.06807562708854675,
0.09995067864656448,
-0.087119460105896,
-2.2164208634273243e-33,
0.09142738580703735,
-0.030875571072101593,
0.06464288383722305,
0.058152828365564346,
0.05213644355535507,
0.02292701229453087,
-0.017756620422005653,
0.05317605659365654,
-0.007857316173613071,
-0.02561183273792267,
-0.007868731394410133,
-0.08692403137683868,
0.052425410598516464,
-0.04234803467988968,
-0.06957709044218063,
-0.06990546733140945,
-0.054796215146780014,
0.10807249695062637,
0.013834851793944836,
-0.057315293699502945,
-0.020707443356513977,
-0.06453803181648254,
0.03151334822177887,
0.04133470356464386,
0.03923777863383293,
0.033517226576805115,
-0.04837929457426071,
0.02683478407561779,
-0.05836605280637741,
0.04014747589826584,
0.009975423105061054,
-0.05270844325423241,
0.018589094281196594,
0.034423790872097015,
-0.01135332603007555,
-0.10008472949266434,
-0.047306761145591736,
0.015830527991056442,
0.02520706132054329,
0.006926445290446281,
0.04332858324050903,
0.007874132134020329,
-0.019856685772538185,
0.00590595044195652,
-0.03785260394215584,
0.022679805755615234,
0.10463101416826248,
-0.035963594913482666,
-0.05462342128157616,
-0.0433715395629406,
0.011233235709369183,
0.008592301048338413,
-0.07694610953330994,
0.002104945946484804,
-0.013736951164901257,
0.06663302332162857,
-0.0017802222864702344,
0.1233314648270607,
-0.020888952538371086,
0.03497999534010887,
0.05080019682645798,
-0.09330537170171738,
0.05062760040163994,
0.011606276035308838,
0.011662011034786701,
0.0021558802109211683,
-0.03520496189594269,
0.05082317814230919,
-0.03164194896817207,
0.09138749539852142,
-0.04588526859879494,
-0.05513884127140045,
-0.000030830211471766233,
-0.012859934009611607,
0.037783652544021606,
-0.07846156507730484,
0.0027368247974663973,
0.0010325177572667599,
0.04181651398539543,
-0.031385213136672974,
0.003979925997555256,
0.03447355329990387,
-0.06986522674560547,
0.01721056178212166,
0.10793007910251617,
0.04008132591843605,
0.0810658410191536,
0.0032311207614839077,
0.0548575334250927,
0.07655499130487442,
-0.020914915949106216,
0.051838479936122894,
0.02403848245739937,
0.06574003398418427,
0.0018241655780002475,
-5.0589068933959425e-8,
0.044026535004377365,
0.01959368959069252,
-0.11005977541208267,
-0.007252880372107029,
-0.0035145168658345938,
0.04577009379863739,
-0.0003944726486224681,
-0.056511178612709045,
-0.03095240890979767,
-0.0185494776815176,
-0.021718090400099754,
-0.05316799879074097,
-0.05809246003627777,
0.0007425720104947686,
-0.045852575451135635,
-0.01026349887251854,
-0.014776797965168953,
0.04559439793229103,
0.02061835117638111,
-0.0340968556702137,
0.007308228872716427,
-0.04319988936185837,
0.005185157526284456,
0.0430925190448761,
0.004581864457577467,
0.07595443725585938,
0.039599426090717316,
0.02619166113436222,
0.07018865644931793,
0.010530994273722172,
-0.08579196035861969,
-0.07095848023891449,
-0.0546305812895298,
0.055904898792505264,
0.012790989130735397,
0.037483394145965576,
-0.10582172870635986,
0.007122725713998079,
0.026116251945495605,
0.12258850783109665,
-0.02191886492073536,
0.06907684355974197,
-0.07347553968429565,
0.007321108598262072,
-0.053689971566200256,
0.07020028680562973,
-0.04356234893202782,
0.032491523772478104,
-0.001153220422565937,
0.012123963795602322,
0.006391057278960943,
-0.08524532616138458,
-0.0005581118748523295,
0.03688310459256172,
-0.1255524903535843,
0.017697779461741447,
-0.0061549716629087925,
-0.024236494675278664,
0.04819760471582413,
-0.0522870309650898,
0.0485619455575943,
-0.04045644402503967,
0.08457626402378082,
-0.019350040704011917
] | 0.064442
|
certificates for those requests, and update the API object status with the issued certificate. ### Create a Certificate Authority You need an authority to provide the digital signature on the new certificate. First, create a signing certificate by running the following: ```shell cat <}} This uses the command line tool [`jq`](https://jqlang.github.io/jq/) to populate the base64-encoded content in the `.status.certificate` field. If you do not have `jq`, you can also save the JSON output to a file, populate this field manually, and upload the resulting file. {{< /note >}} Once the CSR is approved and the signed certificate is uploaded, run: ```shell kubectl get csr ``` The output is similar to: ```none NAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION my-svc.my-namespace 20m example.com/serving yourname@example.com Approved,Issued ``` ## Download the certificate and use it Now, as the requesting user, you can download the issued certificate and save it to a `server.crt` file by running the following: ```shell kubectl get csr my-svc.my-namespace -o jsonpath='{.status.certificate}' \ | base64 --decode > server.crt ``` Now you can populate `server.crt` and `server-key.pem` in a {{< glossary\_tooltip text="Secret" term\_id="secret" >}} that you could later mount into a Pod (for example, to use with a webserver that serves HTTPS). ```shell kubectl create secret tls server --cert server.crt --key server-key.pem ``` ```none secret/server created ``` Finally, you can populate `ca.pem` into a {{< glossary\_tooltip text="ConfigMap" term\_id="configmap" >}} and use it as the trust root to verify the serving certificate: ```shell kubectl create configmap example-serving-ca --from-file ca.crt=ca.pem ``` ```none configmap/example-serving-ca created ``` ## Approving CertificateSigningRequests {#approving-certificate-signing-requests} A Kubernetes administrator (with appropriate permissions) can manually approve (or deny) CertificateSigningRequests by using the `kubectl certificate approve` and `kubectl certificate deny` commands. However if you intend to make heavy usage of this API, you might consider writing an automated certificates controller. {{< caution >}} The ability to approve CSRs decides who trusts whom within your environment. The ability to approve CSRs should not be granted broadly or lightly. You should make sure that you confidently understand both the verification requirements that fall on the approver \*\*and\*\* the repercussions of issuing a specific certificate before you grant the `approve` permission. {{< /caution >}} Whether a machine or a human using kubectl as above, the role of the \_approver\_ is to verify that the CSR satisfies two requirements: 1. The subject of the CSR controls the private key used to sign the CSR. This addresses the threat of a third party masquerading as an authorized subject. In the above example, this step would be to verify that the pod controls the private key used to generate the CSR. 2. The subject of the CSR is authorized to act in the requested context. This addresses the threat of an undesired subject joining the cluster. In the above example, this step would be to verify that the pod is allowed to participate in the requested service. If and only if these two requirements are met, the approver should approve the CSR and otherwise should deny the CSR. For more information on certificate approval and access control, read the [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/) reference page. ## Configuring your cluster to provide signing This page assumes that a signer is set up to serve the certificates API. The Kubernetes controller manager provides a default implementation of a signer. To enable it, pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` parameters to the controller manager with paths to your Certificate Authority's keypair.
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
[
-0.037477172911167145,
0.10053286701440811,
-0.07394610345363617,
-0.021868497133255005,
-0.08924610167741776,
-0.05046940594911575,
-0.03938773274421692,
0.03821349889039993,
0.03387901559472084,
-0.016267890110611916,
-0.023656992241740227,
-0.09103327989578247,
0.0976649820804596,
0.007580978330224752,
0.06801795959472656,
-0.04752643033862114,
-0.008860823698341846,
0.07020805776119232,
-0.024152986705303192,
-0.13149237632751465,
0.006735786329954863,
0.015240623615682125,
0.03925231844186783,
-0.05215144157409668,
-0.025935916230082512,
-0.06947346776723862,
0.031158238649368286,
0.009525788016617298,
0.019703151658177376,
-0.011170136742293835,
0.04728575423359871,
-0.0012934673577547073,
0.005270062945783138,
-0.020340224727988243,
0.02329188585281372,
0.08117008209228516,
0.033651236444711685,
-0.029417717829346657,
0.013552947901189327,
-0.024156732484698296,
0.012282795272767544,
-0.0232995692640543,
-0.12321536242961884,
-0.05969017744064331,
0.007893521338701248,
-0.023492129519581795,
-0.03234133496880531,
-0.01777583174407482,
-0.02782449498772621,
0.029121115803718567,
-0.029902072623372078,
-0.1330064982175827,
0.0035751417744904757,
-0.02756054326891899,
-0.05147000402212143,
-0.056712664663791656,
-0.041243720799684525,
0.06430826336145401,
0.014883914031088352,
-0.025253361091017723,
-0.02271069958806038,
-0.020486216992139816,
0.05962900072336197,
-0.010364330373704433,
-0.09396858513355255,
-0.00597736518830061,
0.0015338518423959613,
0.050731196999549866,
0.051976677030324936,
-0.04169783368706703,
0.029776260256767273,
-0.034576643258333206,
-0.10708726942539215,
-0.08146791160106659,
-0.0542258583009243,
-0.06064550578594208,
-0.08034607768058777,
0.05296412482857704,
0.010112087242305279,
-0.03510547801852226,
0.015554752200841904,
-0.022195640951395035,
0.028627559542655945,
0.028817307204008102,
-0.05070454999804497,
0.056435395032167435,
0.05085347220301628,
0.037998296320438385,
-0.005089920479804277,
0.04388654977083206,
0.048135023564100266,
-0.0218970887362957,
-0.0032817404717206955,
-0.08396618813276291,
0.03309781849384308,
0.04419497400522232,
0.034164849668741226,
0.03486558794975281,
0.057753052562475204,
0.028486231341958046,
0.06923305243253708,
-0.052785180509090424,
0.008228685706853867,
0.0003573812427930534,
0.06128103286027908,
-0.0010977680794894695,
-0.015378037467598915,
0.03954557329416275,
0.07108931243419647,
0.04378600791096687,
-0.023015420883893967,
0.03058445081114769,
-0.08974983543157578,
-0.07218577712774277,
-0.0004080283106304705,
0.08997126668691635,
0.03767548128962517,
0.03901558369398117,
0.022994425147771835,
-0.04841412976384163,
0.0741938129067421,
-0.09173594415187836,
-0.07034607976675034,
-0.006270611193031073,
0.035322386771440506,
-0.002256153617054224,
0.06172683462500572,
8.938883323644924e-34,
0.08202248811721802,
0.026274941861629486,
0.05072364583611488,
0.024079976603388786,
-0.029132673516869545,
-0.06795170903205872,
0.0497182235121727,
0.0012756515061482787,
-0.08804149925708771,
-0.033302705734968185,
-0.02284647896885872,
0.10284297913312912,
-0.0076253777369856834,
-0.02648424729704857,
-0.03034997545182705,
-0.03011326491832733,
-0.09235499799251556,
-0.05124693736433983,
0.053771115839481354,
0.0893513485789299,
0.06658440083265305,
-0.09014082700014114,
-0.008639364503324032,
0.10797543823719025,
0.044592272490262985,
-0.02265513874590397,
0.02171105518937111,
-0.008602453395724297,
-0.07016418874263763,
-0.028831256553530693,
0.06283722817897797,
-0.03780171647667885,
0.003323438111692667,
-0.014181277714669704,
-0.00819312408566475,
-0.036632686853408813,
0.07320180535316467,
0.05102139338850975,
-0.07953376322984695,
-0.0614808164536953,
0.11690342426300049,
-0.03992915898561478,
-0.014059101231396198,
0.08621594309806824,
0.021741770207881927,
-0.03274832293391228,
-0.03783588111400604,
-0.09421461820602417,
0.10978969186544418,
0.0356035977602005,
-0.009130059741437435,
0.01011920627206564,
-0.02419421076774597,
-0.04185592383146286,
0.04162036255002022,
0.031586382538080215,
0.02703486941754818,
-0.02898067608475685,
-0.1355641782283783,
-0.049567513167858124,
-0.032535139471292496,
-0.019980980083346367,
-0.0019132542656734586,
0.0630578100681305,
0.06689416617155075,
-0.019307609647512436,
0.005143012385815382,
0.010507051832973957,
-0.04894490912556648,
-0.0360541045665741,
-0.05045014247298241,
0.04682829976081848,
0.02602408453822136,
-0.034674134105443954,
-0.01753159612417221,
-0.0630166232585907,
-0.03435424342751503,
0.0940629169344902,
-0.03893323987722397,
-0.02917962707579136,
0.09546101838350296,
-0.0552687793970108,
-0.08039727061986923,
0.066754549741745,
0.08348681032657623,
0.09662491828203201,
0.046652816236019135,
0.000462398020317778,
-0.017370153218507767,
0.009771933779120445,
-0.01023966632783413,
0.0043664718978106976,
-0.028645219281315804,
0.023645278066396713,
-0.052243705838918686,
-2.8562725606226352e-33,
0.11732669919729233,
-0.0673396959900856,
0.022729190066456795,
0.09963878244161606,
0.010988197289407253,
-0.01702660694718361,
0.006278750486671925,
0.0773504450917244,
-0.009626071900129318,
-0.024951938539743423,
-0.061973463743925095,
0.002367431530728936,
0.03236693888902664,
0.03886232525110245,
-0.03653640300035477,
-0.0153148602694273,
-0.10135671496391296,
0.11104972660541534,
-0.04746856167912483,
0.02247965708374977,
-0.053431667387485504,
-0.0008686896762810647,
0.0698641762137413,
0.049019087105989456,
0.01605917327105999,
0.016745833680033684,
-0.0008114336524158716,
0.014413985423743725,
-0.05634555593132973,
0.00676544988527894,
-0.008931692689657211,
-0.034073539078235626,
-0.03358649089932442,
-0.012736881151795387,
-0.011440514586865902,
-0.1603495180606842,
0.05720611661672592,
0.1028287336230278,
0.024828476831316948,
0.06766723841428757,
-0.011412348598241806,
0.0204471405595541,
-0.07584588974714279,
0.06276792287826538,
0.013173211365938187,
-0.02165333181619644,
0.026827175170183182,
0.02653760462999344,
-0.037299565970897675,
-0.026845073327422142,
0.02926352433860302,
0.006730552297085524,
-0.029087655246257782,
0.07486245036125183,
0.010153137147426605,
0.0049128723330795765,
-0.02512846328318119,
0.03904290124773979,
-0.017810847610235214,
0.04695306345820427,
-0.03936907276511192,
-0.06783739477396011,
0.06107187271118164,
0.009539313614368439,
0.04201274737715721,
-0.06054750829935074,
0.004656394477933645,
-0.02785314805805683,
-0.013418982736766338,
-0.010268628597259521,
0.011754701845347881,
-0.05614037066698074,
-0.027822433039546013,
-0.0012260808143764734,
0.1323772668838501,
-0.0924067497253418,
-0.03383268788456917,
-0.0007239629048854113,
0.05004195496439934,
0.048195451498031616,
0.03437164053320885,
0.06396127492189407,
-0.03900813311338425,
0.007416700944304466,
0.09869919717311859,
-0.03537142276763916,
-0.014257031492888927,
0.00912200566381216,
0.029113151133060455,
0.008531457744538784,
0.01373051293194294,
0.09249915182590485,
0.032475244253873825,
-0.015390649437904358,
-0.0004448617692105472,
-4.9806846647015846e-8,
0.024520009756088257,
-0.011364285834133625,
-0.1436353325843811,
0.02488737367093563,
0.03507762774825096,
0.0366479717195034,
-0.05021217092871666,
-0.10022121667861938,
-0.009002778679132462,
-0.07879482954740524,
-0.0009642447112128139,
0.011626817286014557,
-0.049450915306806564,
-0.018321210518479347,
-0.019243933260440826,
-0.0010253173531964421,
0.022532165050506592,
0.025443047285079956,
0.007791152223944664,
-0.021998103708028793,
0.006252927705645561,
-0.041120678186416626,
0.05520728975534439,
0.013517881743609905,
0.022580189630389214,
0.05177835747599602,
0.11929953843355179,
0.039376888424158096,
0.0024339896626770496,
-0.03308803215622902,
-0.10067134350538254,
-0.045870061963796616,
0.008806876838207245,
0.012206178158521652,
0.03473123162984848,
-0.07325374335050583,
-0.057982079684734344,
-0.023902466520667076,
0.07052522152662277,
0.06590399891138077,
0.0001319280272582546,
0.029422806575894356,
-0.10777775198221207,
0.0027789005544036627,
-0.0063530453480780125,
0.030599983409047127,
-0.043747663497924805,
-0.031484685838222504,
-0.005972983315587044,
0.00722312880679965,
0.005876141134649515,
-0.07667068392038345,
0.04538721963763237,
0.05973329767584801,
-0.11810266971588135,
0.03470518812537193,
0.02489602379500866,
0.0035098488442599773,
0.054934922605752945,
0.008586912415921688,
0.049129586666822433,
0.008502038195729256,
0.03502387925982475,
-0.011654765345156193
] | 0.072119
|
`--cluster-signing-cert-file` and `--cluster-signing-key-file` parameters to the controller manager with paths to your Certificate Authority's keypair.
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/managing-tls-in-a-cluster.md
|
[
0.06581466645002365,
-0.015609425492584705,
-0.10748676210641861,
0.018254758790135384,
0.03749356418848038,
0.04010063409805298,
-0.019455021247267723,
0.02528727799654007,
-0.010226372629404068,
0.03706015646457672,
0.08265373110771179,
-0.07115091383457184,
0.0777280256152153,
0.014026140794157982,
0.019548378884792328,
-0.022043224424123764,
-0.06862793862819672,
0.039406292140483856,
0.055246610194444656,
-0.05064791068434715,
0.002225707285106182,
-0.07490972429513931,
-0.026363346725702286,
0.00011535724479472265,
-0.08184473216533661,
-0.05061032995581627,
-0.014567169360816479,
0.06367458403110504,
-0.01741984859108925,
-0.022199252620339394,
0.01603984273970127,
0.002262026071548462,
0.08216388523578644,
-0.018447445705533028,
0.04907948896288872,
0.08781896531581879,
0.13437414169311523,
0.01434850599616766,
-0.05045067518949509,
-0.08151617646217346,
0.17866292595863342,
0.008352418430149555,
-0.01921723410487175,
-0.05180226266384125,
0.003772628726437688,
-0.006546413991600275,
-0.05133736878633499,
-0.028357822448015213,
-0.060375019907951355,
-0.009432964026927948,
0.008000973612070084,
-0.0202987939119339,
-0.04198893904685974,
0.0037574865855276585,
-0.09558086097240448,
0.033640556037425995,
-0.006868663243949413,
0.06919318437576294,
0.13954730331897736,
-0.040896471589803696,
0.07164307683706284,
0.0020710949320346117,
-0.04091953486204147,
-0.02366807870566845,
-0.070902980864048,
0.048757463693618774,
0.011240141466259956,
-0.032226309180259705,
0.012486076913774014,
0.012705803848803043,
0.034206878393888474,
-0.0397564172744751,
0.014138293452560902,
-0.10739395767450333,
-0.016193995252251625,
0.008825727738440037,
-0.07729212939739227,
-0.011474791914224625,
0.023032041266560555,
-0.046496305614709854,
-0.027210896834731102,
-0.019416168332099915,
0.03426012769341469,
0.0060538602992892265,
-0.03361573815345764,
0.10477688163518906,
0.0025778061244636774,
-0.09302376955747604,
0.0515272319316864,
-0.019797028973698616,
-0.0004494240856729448,
-0.03703271225094795,
-0.04739750921726227,
-0.04533592611551285,
-0.016637109220027924,
0.015832271426916122,
-0.011622126214206219,
-0.028891518712043762,
0.08354607224464417,
-0.029201410710811615,
-0.047119759023189545,
-0.03133727237582207,
-0.040950238704681396,
-0.028254777193069458,
-0.010034598410129547,
0.08496009558439255,
-0.03804785758256912,
-0.018069416284561157,
0.03160618990659714,
0.05670424923300743,
0.011058548465371132,
0.06077669560909271,
-0.022986184805631638,
-0.026768019422888756,
-0.030045274645090103,
0.13569366931915283,
0.021032433956861496,
0.03267557546496391,
-0.03125879913568497,
0.025965766981244087,
-0.01272264402359724,
-0.11996454000473022,
-0.04501109570264816,
-0.0037136604078114033,
-0.05110330134630203,
-0.006642369087785482,
-0.04516814276576042,
-2.2893981241202643e-33,
0.010430455207824707,
0.013826127164065838,
0.037743180990219116,
-0.0012710191076621413,
0.05419820547103882,
-0.026017166674137115,
0.06491752713918686,
-0.05727970600128174,
-0.04323313757777214,
-0.018327947705984116,
0.009163281880319118,
0.0192867498844862,
-0.011431092396378517,
-0.04191001132130623,
-0.033495791256427765,
-0.017333300784230232,
-0.03135009482502937,
0.006280095316469669,
0.03067612834274769,
-0.02315869927406311,
0.0011196302948519588,
0.022917084395885468,
0.001224843435920775,
-0.02734663337469101,
-0.01791730709373951,
0.05888549983501434,
0.07860461622476578,
-0.025602662935853004,
0.06244863569736481,
-0.003901963122189045,
0.04731142520904541,
-0.01820858009159565,
0.025741280987858772,
-0.009462740272283554,
0.011422814801335335,
0.07663723081350327,
0.07629392296075821,
-0.003345424309372902,
-0.08239685744047165,
-0.039758745580911636,
0.010591239668428898,
-0.055087611079216,
0.05798059701919556,
-0.03273579478263855,
0.0024573765695095062,
0.003594774752855301,
0.031184300780296326,
-0.043505579233169556,
0.18280935287475586,
0.020830437541007996,
-0.08496753871440887,
-0.0624123252928257,
0.00253967079333961,
-0.05282926931977272,
0.007286166772246361,
-0.05098320543766022,
-0.03599781170487404,
-0.01005058828741312,
-0.0710742324590683,
-0.05193141847848892,
-0.03726797178387642,
-0.09521917998790741,
-0.04523777216672897,
-0.0028041210025548935,
0.03193145617842674,
0.029651006683707237,
0.0022604218684136868,
-0.004975061863660812,
0.016506927087903023,
-0.047201983630657196,
-0.05874442309141159,
0.019146569073200226,
0.02686208114027977,
0.050332557410001755,
-0.003431003075093031,
-0.018622901290655136,
-0.006850516889244318,
0.1249273493885994,
-0.02271714061498642,
0.0009240756626240909,
-0.07701300084590912,
0.021621381863951683,
-0.07233048230409622,
0.08827508240938187,
0.03893807530403137,
0.013855497352778912,
-0.006020497530698776,
0.06297511607408524,
0.0385669581592083,
-0.054795894771814346,
0.02177787944674492,
0.060897767543792725,
0.09608180820941925,
0.09149592369794846,
-0.09440689533948898,
1.432981980266094e-33,
0.01462050061672926,
-0.0629054382443428,
0.0299980528652668,
0.06981565058231354,
0.040919847786426544,
0.013979315757751465,
-0.05410052463412285,
0.060756366699934006,
-0.024273283779621124,
0.0009266624692827463,
0.036051519215106964,
-0.0557725690305233,
0.09799285233020782,
-0.048099860548973083,
-0.03936268761754036,
-0.04733771085739136,
0.02592928148806095,
0.07232452183961868,
0.021883917972445488,
-0.03542742878198624,
-0.038656726479530334,
-0.06465571373701096,
0.048890598118305206,
0.06661409139633179,
0.04278859496116638,
0.03216319903731346,
-0.004423415753990412,
0.01569143310189247,
-0.05873173847794533,
0.002431288128718734,
0.023187724873423576,
0.016929496079683304,
-0.039273951202631,
0.025365570560097694,
-0.048482656478881836,
-0.08991114050149918,
-0.031766362488269806,
0.003431557212024927,
-0.011076267808675766,
0.03268234059214592,
-0.024185124784708023,
-0.06317014992237091,
-0.026612885296344757,
0.017443183809518814,
0.06625550240278244,
-0.004927400499582291,
0.16843020915985107,
-0.005217487923800945,
-0.05950620025396347,
0.08784759789705276,
0.01086378749459982,
-0.04400845989584923,
-0.05263889208436012,
0.003521943697705865,
-0.01465552393347025,
0.11323847621679306,
0.04644186794757843,
0.14331606030464172,
-0.03858480602502823,
0.02475595660507679,
0.06842183321714401,
-0.06536845117807388,
-0.01918853633105755,
0.0660824254155159,
-0.011248611845076084,
0.03073333203792572,
0.05404360219836235,
0.027956867590546608,
-0.0036077024415135384,
0.036811329424381256,
-0.0687662661075592,
-0.0008445919374935329,
0.03490732982754707,
0.03579632565379143,
0.038181282579898834,
-0.09375360608100891,
-0.01490845624357462,
-0.03814737871289253,
0.02526138909161091,
-0.07417139410972595,
0.005376134533435106,
-0.011617944575846195,
-0.0755097046494484,
0.014216269366443157,
0.0985860750079155,
0.05724306032061577,
0.07653658837080002,
-0.007866949774324894,
0.013296295888721943,
0.039899036288261414,
-0.07354103028774261,
0.04977326840162277,
0.06618295609951019,
-0.006402367725968361,
0.01630820333957672,
-2.4626654493431488e-8,
0.040723808109760284,
0.025497479364275932,
-0.09376093000173569,
-0.07253628969192505,
0.014408598653972149,
0.07178010791540146,
-0.012302359566092491,
-0.03380949795246124,
-0.08747800439596176,
-0.00743204215541482,
0.0244651660323143,
-0.05023150518536568,
-0.06810202449560165,
-0.05395876616239548,
-0.042959101498126984,
-0.006832224782556295,
-0.00940475333482027,
0.04394112899899483,
0.004116804338991642,
-0.052748266607522964,
-0.003491326468065381,
-0.046581730246543884,
-0.01046590507030487,
0.05896143987774849,
-0.014328300952911377,
0.05322222411632538,
0.05234343186020851,
0.11912517994642258,
-0.005749031901359558,
-0.005869772285223007,
-0.06325090676546097,
-0.04546130821108818,
0.0018210491398349404,
0.010060030035674572,
-0.05347038432955742,
0.06968029588460922,
-0.002433045534417033,
0.01688511110842228,
0.06825882196426392,
0.06075657531619072,
-0.014138245955109596,
0.08594260364770889,
-0.035442665219306946,
0.005072409752756357,
-0.06590431928634644,
0.11370663344860077,
0.007980716414749622,
0.04049721732735634,
-0.006890134420245886,
0.0641360729932785,
-0.017652859911322594,
-0.09524733573198318,
0.013613970018923283,
-0.01634841039776802,
-0.10234492272138596,
0.018020473420619965,
-0.030188078060746193,
-0.02375311776995659,
0.08093782514333725,
-0.03964020684361458,
0.040885645896196365,
-0.036990612745285034,
-0.0035423163790255785,
-0.0201185904443264
] | 0.014689
|
Kubernetes lets you use a public key infrastructure (PKI) to authenticate to your cluster as a client. A few steps are required in order to get a normal user to be able to authenticate and invoke an API. First, this user must have an [X.509](https://www.itu.int/rec/T-REC-X.509) certificate issued by an authority that your Kubernetes cluster trusts. The client must then present that certificate to the Kubernetes API. You use a [CertificateSigningRequest](/docs/reference/access-authn-authz/certificate-signing-requests/) as part of this process, and either you or some other principal must approve the request. You will create a private key, and then get a certificate issued, and finally configure that private key for a client. ## {{% heading "prerequisites" %}} \* {{< include "task-tutorial-prereqs.md" >}} \* You need the `kubectl`, `openssl` and `base64` utilities. This page assumes you are using Kubernetes {{< glossary\_tooltip term\_id="rbac" text="role based access control" >}} (RBAC). If you have alternative or additional security mechanisms around authorization, you need to account for those as well. ## Create private key In this step, you create a private key. You need to keep this document secret; anyone who has it can impersonate the user. ```shell # Create a private key openssl genrsa -out myuser.key 3072 ``` ## Create an X.509 certificate signing request {#create-x.509-certificatessigningrequest} {{< note >}} This is not the same as the similarly-named CertificateSigningRequest API; the file you generate here goes into the CertificateSigningRequest. {{< /note >}} It is important to set CN and O attribute of the CSR. CN is the name of the user and O is the group that this user will belong to. You can refer to [RBAC](/docs/reference/access-authn-authz/rbac/) for standard groups. ```shell # Change the common name "myuser" to the actual username that you want to use openssl req -new -key myuser.key -out myuser.csr -subj "/CN=myuser" ``` ## Create a Kubernetes CertificateSigningRequest {#create-k8s-certificatessigningrequest} Encode the CSR document using this command: ```shell cat myuser.csr | base64 | tr -d "\n" ``` Create a [CertificateSigningRequest](/docs/reference/kubernetes-api/authentication-resources/certificate-signing-request-v1/) and submit it to a Kubernetes Cluster via kubectl. Below is a snippet of shell that you can use to generate the CertificateSigningRequest. ```shell cat < myuser.crt ``` ## Configure the certificate into kubeconfig The next step is to add this user into the kubeconfig file. First, you need to add new credentials: ```shell kubectl config set-credentials myuser --client-key=myuser.key --client-certificate=myuser.crt --embed-certs=true ``` Then, you need to add the context: ```shell kubectl config set-context myuser --cluster=kubernetes --user=myuser ``` To test it: ```shell kubectl --context myuser auth whoami ``` You should see output confirming that you are “myuser“. ## Create Role and RoleBinding {{< note >}} If you don't use Kubernetes RBAC, skip this step and make the appropriate changes for the authorization mechanism your cluster actually uses. {{< /note >}} With the certificate created it is time to define the Role and RoleBinding for this user to access Kubernetes cluster resources. This is a sample command to create a Role for this new user: ```shell kubectl create role developer --verb=create --verb=get --verb=list --verb=update --verb=delete --resource=pods ``` This is a sample command to create a RoleBinding for this new user: ```shell kubectl create rolebinding developer-binding-myuser --role=developer --user=myuser ``` ## {{% heading "whatsnext" %}} \* Read [Manage TLS Certificates in a Cluster](/docs/tasks/tls/managing-tls-in-a-cluster/) \* For details of X.509 itself, refer to [RFC 5280](https://tools.ietf.org/html/rfc5280#section-3.1) section 3.1 \* For information on the syntax of PKCS#10 certificate signing requests, refer to [RFC 2986](https://tools.ietf.org/html/rfc2986) \* Read about [ClusterTrustBundles](/docs/reference/access-authn-authz/certificate-signing-requests/#cluster-trust-bundles)
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/certificate-issue-client-csr.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/certificate-issue-client-csr.md
|
[
-0.015588817186653614,
0.04709979519248009,
-0.007603684905916452,
-0.023401349782943726,
-0.07195458561182022,
0.007757565006613731,
0.010864165611565113,
0.03502248600125313,
0.03984297066926956,
0.04630081728100777,
-0.03839323669672012,
-0.07299405336380005,
0.0635237768292427,
0.04415513575077057,
0.048910900950431824,
0.00013810470409225672,
0.016892729327082634,
-0.0010420839535072446,
0.034513235092163086,
-0.12914517521858215,
-0.038385242223739624,
-0.019901419058442116,
-0.01328408345580101,
0.03532751649618149,
-0.06364468485116959,
-0.07277541607618332,
0.015841666609048843,
0.011536623351275921,
-0.0003934643464162946,
0.059139929711818695,
0.02864324301481247,
-0.07365377247333527,
0.02575114741921425,
0.022781506180763245,
-0.018006982281804085,
0.09096615016460419,
0.10969924181699753,
-0.00010429749090690166,
-0.09007251262664795,
0.009926950559020042,
0.03368905186653137,
-0.036674682050943375,
-0.13027147948741913,
-0.015981333330273628,
0.007684434298425913,
-0.0007044177618809044,
-0.0478762648999691,
-0.065121591091156,
-0.014300043694674969,
0.045454058796167374,
0.006273012608289719,
-0.0915813073515892,
0.056004848331213,
-0.01948174647986889,
-0.07790128886699677,
-0.012441919185221195,
-0.013504033908247948,
0.039421264082193375,
0.08183566480875015,
-0.08597123622894287,
0.042307283729314804,
-0.06226692348718643,
-0.009628256782889366,
-0.0025741304270923138,
-0.038733091205358505,
0.05496763810515404,
-0.015166250057518482,
-0.02240249514579773,
0.0317344069480896,
-0.038229312747716904,
0.09372300654649734,
-0.005594093352556229,
-0.03516770899295807,
-0.048179470002651215,
-0.010089514777064323,
-0.04805804416537285,
-0.08899076282978058,
0.025193514302372932,
0.008250794373452663,
-0.039126936346292496,
0.017540343105793,
0.04962725192308426,
0.028193563222885132,
-0.014976347796618938,
-0.08236076682806015,
0.03552193567156792,
0.03167712315917015,
-0.02360631339251995,
0.017153780907392502,
0.011359336785972118,
0.04937710240483284,
-0.04362976551055908,
-0.05214507505297661,
-0.12511390447616577,
0.10369735956192017,
0.06370284408330917,
0.01155728381127119,
-0.03267538174986839,
0.04544839262962341,
-0.010653351433575153,
-0.00289585767313838,
-0.05911511555314064,
-0.0387575738132,
-0.06428807228803635,
0.07508488744497299,
0.08302035927772522,
-0.0533771812915802,
-0.04889710620045662,
0.05516047403216362,
0.0905880481004715,
-0.050287410616874695,
0.023009590804576874,
-0.045135073363780975,
0.04577610641717911,
0.020620757713913918,
0.08435119688510895,
0.045756250619888306,
0.0012455253163352609,
0.04783438518643379,
0.014462398365139961,
0.005840999539941549,
-0.08262272924184799,
0.019136082381010056,
0.036726366728544235,
0.005139598157256842,
-0.003994239028543234,
-0.020302940160036087,
8.563029106874075e-34,
0.05930253118276596,
0.05564304441213608,
0.07254481315612793,
-0.024313149973750114,
0.0027529937215149403,
-0.09228447079658508,
0.05602823197841644,
-0.024167904630303383,
-0.07348732650279999,
-0.05607466399669647,
-0.043129127472639084,
0.1334216147661209,
0.05165235698223114,
-0.038556259125471115,
-0.009139333851635456,
-0.017206750810146332,
-0.08670739829540253,
-0.008872654289007187,
0.10605469346046448,
0.04173176363110542,
0.00012485042680054903,
-0.07301613688468933,
0.007211353164166212,
0.07288103550672531,
-0.016485754400491714,
-0.04944547265768051,
0.041503459215164185,
0.019307831302285194,
0.0023779808543622494,
-0.005935237742960453,
-0.009300734847784042,
-0.053168389946222305,
0.013627382926642895,
-0.028808822855353355,
-0.1100265383720398,
0.0011616548290476203,
0.024064017459750175,
0.03092225268483162,
-0.006834470201283693,
-0.09312346577644348,
0.041403692215681076,
-0.06832337379455566,
0.018821628764271736,
0.008210734464228153,
0.008126133121550083,
0.002738931216299534,
0.03181823715567589,
-0.02054694853723049,
0.10949631035327911,
0.038028325885534286,
-0.05951111018657684,
-0.06207330524921417,
-0.018390130251646042,
-0.07777506113052368,
0.028155824169516563,
-0.011810339987277985,
0.1124645248055458,
-0.031111085787415504,
-0.0762273520231247,
-0.1012442484498024,
-0.015174622647464275,
-0.057817719876766205,
-0.030901920050382614,
0.025930063799023628,
-0.006688886322081089,
-0.087396539747715,
0.0014467077562585473,
0.06569794565439224,
-0.008791572414338589,
-0.06541471183300018,
-0.07367929816246033,
0.03837478905916214,
-0.03533957153558731,
-0.020730338990688324,
-0.05485066398978233,
-0.028721630573272705,
0.014100568369030952,
0.07767506688833237,
-0.014067665673792362,
0.06519795954227448,
0.024766648188233376,
-0.031663376837968826,
-0.047705672681331635,
0.12503297626972198,
-0.00532861053943634,
0.030487770214676857,
-0.005278132390230894,
0.0573030561208725,
-0.040339987725019455,
-0.012225241400301456,
0.04845358803868294,
-0.0037679090164601803,
0.022233115509152412,
0.100764699280262,
-0.03296145051717758,
-2.576492231828461e-33,
0.10890627652406693,
-0.042408451437950134,
0.0436379574239254,
0.043501969426870346,
0.12373597919940948,
0.026225322857499123,
-0.004419827833771706,
0.05387287959456444,
-0.016895178705453873,
-0.05120321735739708,
-0.026133455336093903,
-0.08030930161476135,
0.048075560480356216,
-0.011531257070600986,
-0.05464470386505127,
-0.04035377502441406,
-0.043027132749557495,
0.1308537721633911,
0.008317781612277031,
-0.018709532916545868,
-0.02648598700761795,
-0.023509101942181587,
0.02778558060526848,
0.013975866138935089,
0.011487246491014957,
0.03795208781957626,
-0.030348122119903564,
0.014257805421948433,
-0.08716939389705658,
0.040894024074077606,
-0.014941302128136158,
-0.080841563642025,
0.014079459942877293,
-0.0013664462603628635,
-0.01132113765925169,
-0.09004607796669006,
-0.0273640938103199,
0.08772047609090805,
-0.0051344954408705235,
-0.010778541676700115,
0.07057720422744751,
-0.0005567898624576628,
-0.013569395057857037,
-0.022734394297003746,
0.0007024704827927053,
0.035097889602184296,
0.06843297183513641,
-0.027020175009965897,
-0.09125566482543945,
-0.03517613187432289,
-0.022939668968319893,
0.013083677738904953,
-0.030343366786837578,
0.02778055891394615,
-0.028295068070292473,
0.0757235735654831,
0.013524354435503483,
0.09654369205236435,
0.024362271651625633,
0.029552070423960686,
0.011291058734059334,
-0.12043485790491104,
0.11378548294305801,
0.08656727522611618,
-0.012137426063418388,
-0.05272282660007477,
-0.011594502255320549,
0.05504734814167023,
-0.05338162183761597,
0.08902574330568314,
-0.07569897919893265,
-0.03378431871533394,
0.043768804520368576,
0.022440405562520027,
0.049551937729120255,
-0.06692324578762054,
-0.002497696550562978,
-0.002372653456404805,
0.05104153975844383,
-0.008505620062351227,
-0.0036177588626742363,
0.03521087393164635,
-0.05711919069290161,
0.006799523252993822,
0.08697067946195602,
-0.021157557144761086,
0.08672481030225754,
0.02155172824859619,
0.023328369483351707,
0.0770740881562233,
0.017743205651640892,
0.0626065731048584,
0.051731422543525696,
0.05071038007736206,
0.035409167408943176,
-5.210397091559571e-8,
0.04744519665837288,
0.004490094259381294,
-0.07553896307945251,
0.0196144487708807,
-0.029218072071671486,
0.04295559227466583,
-0.03317161276936531,
-0.07348115742206573,
-0.058096934109926224,
-0.043455272912979126,
-0.03637654706835747,
-0.022193098440766335,
-0.07006936520338058,
-0.013582825660705566,
-0.03380095586180687,
0.003533283481374383,
-0.022394824773073196,
0.029528837651014328,
0.034675635397434235,
-0.07162253558635712,
-0.03580635040998459,
-0.08603839576244354,
0.027228303253650665,
0.00744929164648056,
0.009741723537445068,
0.12530681490898132,
-0.00600467761978507,
0.059979431331157684,
0.04158008471131325,
-0.009204763919115067,
-0.08009810000658035,
-0.04630924016237259,
-0.07640598714351654,
0.02630499377846718,
-0.02029287815093994,
0.027727698907256126,
-0.09707783907651901,
0.0007462644716724753,
0.017325202003121376,
0.004365758970379829,
-0.013455241918563843,
0.06377123296260834,
-0.07701348513364792,
-0.019183747470378876,
-0.02020304650068283,
0.09572798758745193,
-0.0002785272663459182,
0.03217862918972969,
0.004660732112824917,
0.02745247073471546,
0.0049466779455542564,
-0.07776514440774918,
0.016990575939416885,
0.054462071508169174,
-0.0807228535413742,
0.031667184084653854,
-0.036140501499176025,
-0.01442941464483738,
0.061636846512556076,
-0.05855458229780197,
0.03402246907353401,
0.0386640839278698,
0.03381228446960449,
-0.004744951147586107
] | 0.081374
|
PKCS#10 certificate signing requests, refer to [RFC 2986](https://tools.ietf.org/html/rfc2986) \* Read about [ClusterTrustBundles](/docs/reference/access-authn-authz/certificate-signing-requests/#cluster-trust-bundles)
| null |
./vendor/kubernetes/content/en/docs/tasks/tls/certificate-issue-client-csr.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/tls/certificate-issue-client-csr.md
|
[
-0.04305151849985123,
0.03049793653190136,
-0.059000708162784576,
0.0027722592931240797,
0.03641504421830177,
-0.004055995959788561,
0.027892066165804863,
0.02811851166188717,
-0.014201365411281586,
-0.020163023844361305,
-0.0012886965414509177,
-0.022119922563433647,
0.04664295166730881,
0.04875616356730461,
0.014388971962034702,
-0.04417724534869194,
-0.043537769466638565,
0.05451846122741699,
0.05162520334124565,
-0.012226298451423645,
-0.05206965655088425,
-0.07191072404384613,
0.021462390199303627,
0.05215925723314285,
-0.06345684081315994,
-0.07785149663686752,
0.03407631069421768,
0.06438267976045609,
-0.0006510100793093443,
0.006479177623987198,
0.029048632830381393,
-0.014349985867738724,
0.03389816731214523,
0.032665736973285675,
0.06428837031126022,
0.1096191480755806,
0.07365182042121887,
0.005675032269209623,
-0.08795008063316345,
-0.028035081923007965,
0.11198946088552475,
-0.06687619537115097,
-0.03687422350049019,
0.007498666178435087,
-0.03346721827983856,
0.04202403873205185,
-0.0690598115324974,
-0.016212694346904755,
-0.09768684208393097,
0.018143007531762123,
0.0664423406124115,
-0.018933268263936043,
-0.04212934523820877,
0.02100093849003315,
-0.09605944901704788,
0.0235699824988842,
-0.05728556588292122,
0.08872167766094208,
0.08138467371463776,
-0.001929581630975008,
0.07825189083814621,
-0.0001747859932947904,
-0.04791750758886337,
0.012203219346702099,
-0.03193594887852669,
0.09032284468412399,
0.00850294716656208,
0.006542782299220562,
0.0028932332061231136,
-0.0209861658513546,
0.04650118574500084,
-0.0030289797578006983,
-0.002057295758277178,
-0.067866750061512,
0.011210719123482704,
0.04585142061114311,
-0.09544513374567032,
-0.04696125537157059,
-0.012207605876028538,
-0.08459263294935226,
-0.0504162535071373,
-0.024802841246128082,
-0.04996592178940773,
-0.022288186475634575,
-0.05858667567372322,
0.01856873743236065,
0.013600976206362247,
-0.024280760437250137,
-0.0064322161488235,
0.022977955639362335,
0.06424002349376678,
0.02158726565539837,
-0.019379032775759697,
-0.0019937437027692795,
0.038751356303691864,
0.013414232060313225,
0.028849253430962563,
0.007470175623893738,
0.08863471448421478,
-0.02498619072139263,
-0.02876928634941578,
-0.0019398345611989498,
-0.044661037623882294,
-0.03967247158288956,
0.01704375632107258,
0.06497016549110413,
-0.037421081215143204,
-0.07983216643333435,
0.07592007517814636,
0.04531247168779373,
-0.06105509400367737,
0.05080246925354004,
-0.11312229931354523,
-0.10091184079647064,
-0.029291167855262756,
0.09047725051641464,
0.03100069984793663,
-0.024882644414901733,
0.033597640693187714,
-0.04757373034954071,
-0.008139838464558125,
-0.08960417658090591,
-0.007550236769020557,
0.0004592899640556425,
-0.023848028853535652,
-0.056915633380413055,
-0.01793777570128441,
6.132384850036795e-36,
-0.012530168518424034,
0.037976644933223724,
0.05462007224559784,
-0.042054228484630585,
0.0061994437128305435,
-0.05797998979687691,
0.06870900094509125,
-0.0366605781018734,
-0.10830719023942947,
-0.0848163440823555,
-0.03535079583525658,
0.09016156941652298,
0.01821771450340748,
-0.04442596808075905,
0.01619453728199005,
0.008950961753726006,
-0.061112262308597565,
0.0036317824851721525,
0.015044912695884705,
0.07890204340219498,
0.013282974250614643,
-0.05514939874410629,
0.015520031563937664,
0.028861524537205696,
-0.07858943939208984,
0.0141852255910635,
0.019066553562879562,
0.0487578846514225,
0.07095466554164886,
-0.0014973718207329512,
0.02419445477426052,
-0.012005920521914959,
0.035100970417261124,
-0.006468926090747118,
-0.000270246178843081,
0.09369885921478271,
0.05487508326768875,
-0.007568074855953455,
-0.014890824444591999,
-0.1172097697854042,
0.02301310934126377,
-0.09783237427473068,
0.012850229628384113,
0.03246282786130905,
0.04288492724299431,
0.007121413480490446,
-0.017496785148978233,
0.011284916661679745,
0.1157277449965477,
-0.006012749392539263,
-0.007512581534683704,
-0.016596708446741104,
-0.05943063646554947,
-0.015097017399966717,
-0.0033576469868421555,
-0.05557471141219139,
-0.011057239025831223,
0.016583025455474854,
-0.11823702603578568,
-0.01945834793150425,
0.08897148817777634,
-0.10677134990692139,
-0.024623263627290726,
-0.03653377667069435,
-0.03000134415924549,
0.05261533707380295,
0.07209686189889908,
0.032321102917194366,
-0.029433071613311768,
-0.03536013886332512,
-0.05214138701558113,
0.06102536991238594,
-0.015113968402147293,
0.02379857935011387,
-0.04633692279458046,
0.0236505214124918,
0.01779365912079811,
0.14035943150520325,
0.008674299344420433,
0.03335903212428093,
-0.036088719964027405,
-0.019240327179431915,
-0.036457665264606476,
0.08747453987598419,
0.02380863018333912,
0.0032149634789675474,
-0.010721677914261818,
-0.010234049521386623,
-0.031270600855350494,
-0.02425277791917324,
0.010763290338218212,
0.010473894886672497,
0.0972052812576294,
0.11609507352113724,
-0.06010811775922775,
-1.5077975120856285e-33,
0.07560770958662033,
-0.07182148844003677,
0.023124251514673233,
0.08680961281061172,
0.003463956294581294,
0.009056604467332363,
0.003362607676535845,
0.08629918843507767,
-0.006854590028524399,
0.07803704589605331,
0.06537708640098572,
-0.07303298264741898,
0.09839875251054764,
-0.055309098213911057,
-0.06649080663919449,
-0.05279289931058884,
0.010138805955648422,
0.11468927562236786,
0.059043701738119125,
-0.03208072856068611,
0.002393375150859356,
-0.02783336490392685,
0.03894247114658356,
0.020187119022011757,
0.030604688450694084,
0.044396571815013885,
-0.024511754512786865,
-0.022770360112190247,
-0.09119579941034317,
0.009997814893722534,
0.030811412259936333,
0.0067617399618029594,
-0.052211884409189224,
0.02632216177880764,
-0.0161104965955019,
-0.09937795251607895,
-0.0431332029402256,
0.01615452766418457,
0.006705902982503176,
-0.06037816405296326,
-0.010491938330233097,
-0.03104235790669918,
-0.03511350601911545,
0.008496294729411602,
0.0672789141535759,
0.0006557531305588782,
0.08971405029296875,
0.031032390892505646,
-0.05615130439400673,
0.03966328129172325,
0.06551412492990494,
0.04879177734255791,
0.019668947905302048,
0.030689770355820656,
-0.018032200634479523,
0.12805579602718353,
-0.042595747858285904,
0.13174907863140106,
0.0725289061665535,
-0.007337108254432678,
0.01877487450838089,
-0.05740468204021454,
-0.029596474021673203,
0.05683821812272072,
-0.009281659498810768,
-0.008184881880879402,
0.042739979922771454,
0.004506669007241726,
-0.013747869990766048,
0.043928422033786774,
-0.004352059215307236,
-0.04639606550335884,
-0.027417903766036034,
0.0408245325088501,
-0.018690643832087517,
-0.04040969908237457,
0.012707618996500969,
-0.010359714739024639,
0.005888915155082941,
0.00629048515111208,
0.009713121689856052,
0.020727718248963356,
-0.06800613552331924,
0.025139356032013893,
0.1160690113902092,
-0.038148924708366394,
0.06983616203069687,
-0.014762739650905132,
0.01108962669968605,
0.05492275208234787,
-0.019037211313843727,
0.05559586361050606,
0.04463592544198036,
0.004381798207759857,
-0.00021434876543935388,
-4.180795443176066e-8,
0.05186665430665016,
0.02433619275689125,
-0.11597666144371033,
-0.030202068388462067,
0.04128561168909073,
0.04637262970209122,
-0.05488602817058563,
-0.05652792379260063,
-0.07872618734836578,
0.01918892189860344,
0.029343698173761368,
-0.10109184682369232,
-0.05747704207897186,
-0.039471469819545746,
-0.07442695647478104,
-0.021852590143680573,
-0.0446726493537426,
-0.007127660792320967,
-0.012560301460325718,
-0.05184676870703697,
-0.07167238742113113,
-0.004017701838165522,
0.004654502496123314,
0.019855253398418427,
-0.043856583535671234,
0.07389108091592789,
0.08480063080787659,
0.09646215289831161,
0.014186800457537174,
-0.031709685921669006,
-0.05796247348189354,
-0.019136371091008186,
-0.06893667578697205,
-0.010237401351332664,
-0.02250620536506176,
0.15986792743206024,
-0.07146691530942917,
0.022824235260486603,
0.0300737451761961,
0.057245030999183655,
-0.03984212875366211,
0.02842818945646286,
0.01999719813466072,
0.03489580377936363,
-0.04688766226172447,
0.05703932046890259,
-0.04187371954321861,
0.018832063302397728,
0.018942883238196373,
0.05129120871424675,
0.00505326222628355,
-0.057781949639320374,
-0.06985391676425934,
-0.0408414751291275,
-0.12318657338619232,
0.027001557871699333,
-0.06454304605722427,
-0.010466709733009338,
0.06205624341964722,
-0.03813641145825386,
0.06137548387050629,
-0.05001511052250862,
0.05305387079715729,
0.03268792852759361
] | -0.021856
|
{{< feature-state state="stable" for\_k8s\_version="v1.26" >}} Kubernetes includes \*\*stable\*\* support for managing AMD and NVIDIA GPUs (graphical processing units) across different nodes in your cluster, using {{< glossary\_tooltip text="device plugins" term\_id="device-plugin" >}}. This page describes how users can consume GPUs, and outlines some of the limitations in the implementation. ## Using device plugins Kubernetes implements device plugins to let Pods access specialized hardware features such as GPUs. {{% thirdparty-content %}} As an administrator, you have to install GPU drivers from the corresponding hardware vendor on the nodes and run the corresponding device plugin from the GPU vendor. Here are some links to vendors' instructions: \* [AMD](https://github.com/ROCm/k8s-device-plugin#deployment) \* [Intel](https://intel.github.io/intel-device-plugins-for-kubernetes/cmd/gpu\_plugin/README.html) \* [NVIDIA](https://github.com/NVIDIA/k8s-device-plugin#quick-start) Once you have installed the plugin, your cluster exposes a custom schedulable resource such as `amd.com/gpu` or `nvidia.com/gpu`. You can consume these GPUs from your containers by requesting the custom GPU resource, the same way you request `cpu` or `memory`. However, there are some limitations in how you specify the resource requirements for custom devices. GPUs are only supposed to be specified in the `limits` section, which means: \* You can specify GPU `limits` without specifying `requests`, because Kubernetes will use the limit as the request value by default. \* You can specify GPU in both `limits` and `requests` but these two values must be equal. \* You cannot specify GPU `requests` without specifying `limits`. Here's an example manifest for a Pod that requests a GPU: ```yaml apiVersion: v1 kind: Pod metadata: name: example-vector-add spec: restartPolicy: OnFailure containers: - name: example-vector-add image: "registry.example/example-vector-add:v42" resources: limits: gpu-vendor.example/example-gpu: 1 # requesting 1 GPU ``` ## Manage clusters with different types of GPUs If different nodes in your cluster have different types of GPUs, then you can use [Node Labels and Node Selectors](/docs/tasks/configure-pod-container/assign-pods-nodes/) to schedule pods to appropriate nodes. For example: ```shell # Label your nodes with the accelerator type they have. kubectl label nodes node1 accelerator=example-gpu-x100 kubectl label nodes node2 accelerator=other-gpu-k915 ``` That label key `accelerator` is just an example; you can use a different label key if you prefer. ## Automatic node labelling {#node-labeller} As an administrator, you can automatically discover and label all your GPU enabled nodes by deploying Kubernetes [Node Feature Discovery](https://github.com/kubernetes-sigs/node-feature-discovery) (NFD). NFD detects the hardware features that are available on each node in a Kubernetes cluster. Typically, NFD is configured to advertise those features as node labels, but NFD can also add extended resources, annotations, and node taints. NFD is compatible with all [supported versions](/releases/version-skew-policy/#supported-versions) of Kubernetes. By default NFD create the [feature labels](https://kubernetes-sigs.github.io/node-feature-discovery/master/usage/features.html) for the detected features. Administrators can leverage NFD to also taint nodes with specific features, so that only pods that request those features can be scheduled on those nodes. You also need a plugin for NFD that adds appropriate labels to your nodes; these might be generic labels or they could be vendor specific. Your GPU vendor may provide a third party plugin for NFD; check their documentation for more details. {{< highlight yaml "linenos=false,hl\_lines=7-18" >}} apiVersion: v1 kind: Pod metadata: name: example-vector-add spec: restartPolicy: OnFailure # You can use Kubernetes node affinity to schedule this Pod onto a node # that provides the kind of GPU that its container needs in order to work affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: "gpu.gpu-vendor.example/installed-memory" operator: Gt # (greater than) values: ["40535"] - key: "feature.node.kubernetes.io/pci-10.present" # NFD Feature label values: ["true"] # (optional) only schedule on nodes with PCI device 10 containers: - name: example-vector-add image: "registry.example/example-vector-add:v42" resources: limits: gpu-vendor.example/example-gpu: 1 # requesting 1 GPU {{< /highlight >}} #### GPU vendor implementations - [Intel](https://intel.github.io/intel-device-plugins-for-kubernetes/cmd/gpu\_plugin/README.html) - [NVIDIA](https://github.com/NVIDIA/k8s-device-plugin)
| null |
./vendor/kubernetes/content/en/docs/tasks/manage-gpus/scheduling-gpus.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/manage-gpus/scheduling-gpus.md
|
[
0.02861415036022663,
-0.02763736993074417,
0.0419568195939064,
0.05279171094298363,
-0.0227936040610075,
-0.004683209583163261,
-0.04173728823661804,
-0.008170143701136112,
-0.004333644639700651,
0.017742417752742767,
-0.0532403327524662,
-0.05497008189558983,
-0.016322771087288857,
-0.02417774870991707,
0.003219421487301588,
0.02934589795768261,
0.07754512131214142,
-0.007805625908076763,
-0.03316875547170639,
-0.009275303222239017,
0.03257889673113823,
-0.048359230160713196,
0.030775971710681915,
0.013098187744617462,
-0.05449480190873146,
0.035676103085279465,
0.04835860803723335,
-0.04405510798096657,
0.058118876069784164,
0.05022887885570526,
-0.034679755568504333,
-0.03956965357065201,
0.04263593256473541,
0.011670045554637909,
0.032669417560100555,
0.034634727984666824,
0.019145218655467033,
-0.09032812714576721,
-0.11270732432603836,
-0.010604842565953732,
0.010508554987609386,
-0.08254329860210419,
-0.07705041021108627,
-0.020280424505472183,
0.052724551409482956,
0.00955122709274292,
-0.036303866654634476,
-0.03630571439862251,
0.028002990409731865,
-0.06884821504354477,
0.032632503658533096,
-0.11210562288761139,
0.011344182305037975,
0.04227852821350098,
0.00826405268162489,
0.03619828447699547,
-0.049956124275922775,
-0.010527021251618862,
0.12655538320541382,
0.007495863828808069,
0.11785570532083511,
-0.08458348363637924,
0.03685840964317322,
0.013252746313810349,
-0.019297020509839058,
-0.01928810589015484,
0.03326941654086113,
0.014605022966861725,
-0.017072875052690506,
-0.053612325340509415,
0.09948235750198364,
0.0028975880704820156,
-0.03727765008807182,
-0.04514053463935852,
0.0060732727870345116,
0.023744115605950356,
0.0034563785884529352,
0.018265487626194954,
0.052187249064445496,
-0.060089245438575745,
0.014144370332360268,
0.017354561015963554,
0.0861779972910881,
-0.04808179661631584,
-0.047802992165088654,
-0.038571227341890335,
-0.012963914312422276,
-0.031667858362197876,
0.020875489339232445,
-0.05292383208870888,
-0.016285458579659462,
0.012141586281359196,
0.06012197956442833,
-0.151118665933609,
0.03586685657501221,
-0.035137005150318146,
-0.04371669143438339,
-0.0339253805577755,
-0.026733722537755966,
0.01284489594399929,
-0.024652447551488876,
0.04150357097387314,
-0.004690422676503658,
0.07792161405086517,
-0.02312171459197998,
0.005476534366607666,
-0.07288902997970581,
0.027796410024166107,
-0.00387550238519907,
0.0758700743317604,
0.02505461499094963,
0.09724736958742142,
-0.037422358989715576,
0.036046404391527176,
0.03643900156021118,
-0.0003785582084674388,
-0.002858903259038925,
-0.008847041986882687,
0.0776703953742981,
0.10325793921947479,
-0.0555889718234539,
-0.1102776899933815,
-0.027864666655659676,
0.021136170253157616,
0.0038448276463896036,
0.10690636187791824,
-0.06142942234873772,
5.474150458794695e-33,
0.05867046117782593,
-0.08214086294174194,
-0.009300727397203445,
-0.038941700011491776,
0.013084804639220238,
-0.08687856793403625,
-0.04744919389486313,
-0.05443765968084335,
-0.024291884154081345,
-0.01589820720255375,
-0.055730804800987244,
0.06534155458211899,
0.019389597699046135,
0.02135714329779148,
0.0321938581764698,
-0.034385789185762405,
-0.05547446385025978,
0.03529947251081467,
0.12877072393894196,
0.03465995565056801,
0.06370871514081955,
-0.03450402617454529,
0.010932509787380695,
0.0053729224018752575,
-0.027981093153357506,
0.016821689903736115,
0.013280868530273438,
-0.034403420984745026,
0.027531104162335396,
0.012396460399031639,
-0.03995038941502571,
-0.059805840253829956,
0.0034690701868385077,
-0.0003171550342813134,
-0.15987533330917358,
-0.004859162960201502,
-0.0420704111456871,
-0.00035500602098181844,
-0.040569692850112915,
-0.007841777056455612,
-0.011985459364950657,
-0.021627897396683693,
0.01972583495080471,
-0.10433746129274368,
0.005261486861854792,
0.043479401618242264,
0.037301838397979736,
-0.08824668079614639,
0.0450964979827404,
0.01696334406733513,
-0.07651112973690033,
-0.02898954413831234,
-0.005937375593930483,
-0.007212611380964518,
0.09471382200717926,
-0.005637400783598423,
0.08777835220098495,
-0.019993534311652184,
0.0485120564699173,
-0.006229516584426165,
-0.0473436675965786,
0.00249957712367177,
-0.014011170715093613,
0.002210591221228242,
-0.05066285282373428,
0.03195583075284958,
-0.021174509078264236,
0.11154290288686752,
-0.08048612624406815,
0.007061713375151157,
-0.0934879332780838,
0.09617399424314499,
-0.022344928234815598,
-0.02052483521401882,
0.017225900664925575,
-0.04517345502972603,
-0.02213433012366295,
0.025913799181580544,
-0.13543586432933807,
0.04925078526139259,
-0.02465304359793663,
-0.027233056724071503,
-0.049969106912612915,
0.10145542770624161,
0.02837442420423031,
-0.04095042869448662,
0.016741475090384483,
0.02384587563574314,
-0.02916613779962063,
0.004824016708880663,
0.001073447405360639,
-0.030439073219895363,
0.00448743999004364,
0.04266619309782982,
-0.1064109206199646,
-5.914885535246203e-33,
0.08598016947507858,
-0.011208603158593178,
0.011972914449870586,
0.026454918086528778,
0.04647209867835045,
0.014640634879469872,
-0.010321374982595444,
0.00881905760616064,
-0.0014092250494286418,
-0.1356373131275177,
-0.010326217859983444,
0.00045084042358212173,
0.02521545998752117,
0.0266472976654768,
-0.04860268905758858,
0.015705768018960953,
-0.08610770106315613,
-0.003201138461008668,
-0.0313493050634861,
-0.029286812990903854,
-0.03263246268033981,
-0.0217094998806715,
0.002606187714263797,
0.03746837005019188,
-0.017242856323719025,
-0.019759107381105423,
0.044744446873664856,
-0.012761462479829788,
-0.019870275631546974,
-0.001550929737277329,
0.027306336909532547,
-0.05934514105319977,
-0.052440229803323746,
0.07083115726709366,
0.0651349127292633,
-0.018445763736963272,
0.0023701025638729334,
-0.02469494380056858,
-0.002383931539952755,
-0.015507715754210949,
0.07108324021100998,
0.04790676385164261,
-0.02388761192560196,
-0.007909612730145454,
-0.01979774795472622,
0.07402248680591583,
0.0010211162734776735,
-0.009181076660752296,
-0.03307141736149788,
-0.11625798046588898,
-0.02892255410552025,
-0.03055572882294655,
-0.10142534226179123,
0.07567577809095383,
-0.06451218575239182,
0.01782238855957985,
0.09231796115636826,
0.11246821284294128,
-0.029081832617521286,
0.015401828102767467,
0.04785424843430519,
-0.1477595865726471,
0.057260408997535706,
-0.03091195598244667,
-0.022912921383976936,
-0.055191412568092346,
0.0004660837003029883,
0.06666095554828644,
-0.0089642945677042,
0.06853026151657104,
-0.05299772694706917,
-0.04528551921248436,
0.04493929445743561,
0.03479328379034996,
-0.022118201479315758,
0.004747480619698763,
0.02230999618768692,
-0.031826119869947433,
0.10083477199077606,
-0.013434008695185184,
-0.029589202255010605,
0.014315473847091198,
-0.04152446985244751,
0.011956032365560532,
0.08903323113918304,
0.043261267244815826,
0.10276872664690018,
0.04693441465497017,
0.10728243738412857,
-0.0012346103321760893,
-0.028515351936221123,
0.028015082702040672,
-0.046831775456666946,
0.12133266776800156,
-0.061437156051397324,
-5.3095554619631e-8,
0.09822307527065277,
-0.01896706223487854,
0.0003835862735286355,
0.0641307532787323,
0.003354682121425867,
-0.02108869142830372,
0.018985509872436523,
-0.03182261064648628,
-0.058056119829416275,
-0.021353716030716896,
0.04564247280359268,
0.01414549071341753,
-0.04323495551943779,
0.0015084383776411414,
0.057401686906814575,
0.025193164125084877,
-0.05442805960774422,
0.11223486810922623,
0.0506700836122036,
-0.046375572681427,
-0.055509842932224274,
-0.047020234167575836,
0.048993345350027084,
-0.021401364356279373,
-0.002932466333732009,
0.038623105734586716,
0.040577929466962814,
0.0054028830491006374,
-0.016162725165486336,
-0.024446165189146996,
-0.014345664530992508,
0.027155175805091858,
-0.06850269436836243,
0.1132403314113617,
0.038345444947481155,
-0.010691527277231216,
-0.07434363663196564,
0.13187190890312195,
0.1061013713479042,
0.04988066852092743,
-0.006352498661726713,
-0.04684292897582054,
-0.10020500421524048,
-0.012574019841849804,
0.005433979909867048,
0.10269676893949509,
0.007375319488346577,
0.0299481563270092,
-0.0036127895582467318,
0.08337820321321487,
-0.0064706820994615555,
-0.025936739519238472,
0.005861443933099508,
0.09221933782100677,
-0.013268391601741314,
-0.05181508883833885,
-0.06460053473711014,
-0.05362683907151222,
0.027951594442129135,
-0.030185557901859283,
0.015932124108076096,
-0.01998508907854557,
0.02884659543633461,
-0.035006020218133926
] | 0.177752
|
# NFD Feature label values: ["true"] # (optional) only schedule on nodes with PCI device 10 containers: - name: example-vector-add image: "registry.example/example-vector-add:v42" resources: limits: gpu-vendor.example/example-gpu: 1 # requesting 1 GPU {{< /highlight >}} #### GPU vendor implementations - [Intel](https://intel.github.io/intel-device-plugins-for-kubernetes/cmd/gpu\_plugin/README.html) - [NVIDIA](https://github.com/NVIDIA/k8s-device-plugin)
| null |
./vendor/kubernetes/content/en/docs/tasks/manage-gpus/scheduling-gpus.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/manage-gpus/scheduling-gpus.md
|
[
-0.019593747332692146,
0.047051701694726944,
0.01083168014883995,
0.02632194198668003,
0.02883361279964447,
0.008386436849832535,
-0.033800460398197174,
-0.048425521701574326,
-0.005141280125826597,
-0.06007393077015877,
-0.013843557797372341,
-0.05333101376891136,
-0.05150088295340538,
0.0322473980486393,
0.0038776390720158815,
0.028519686311483383,
0.035019487142562866,
-0.015178213827311993,
-0.006363335065543652,
-0.026390377432107925,
0.042368099093437195,
-0.0038364785723388195,
0.037914127111434937,
-0.011781717650592327,
-0.06633304804563522,
0.02430008538067341,
0.0339118093252182,
-0.03195299208164215,
0.07774851471185684,
0.009729292243719101,
0.022563502192497253,
0.04076753929257393,
0.0010752057423815131,
0.032610103487968445,
0.058830685913562775,
0.028853772208094597,
-0.05074402317404747,
-0.09168176352977753,
-0.11478915065526962,
-0.0008813307504169643,
0.11162252724170685,
-0.09098151326179504,
-0.044050585478544235,
0.04039975255727768,
0.02706216648221016,
-0.013783937320113182,
-0.03917131572961807,
-0.09955647587776184,
0.04168032482266426,
-0.06826290488243103,
0.013623936101794243,
-0.0945049449801445,
0.011889785528182983,
-0.020752569660544395,
-0.0010296114487573504,
0.025118526071310043,
-0.047127749770879745,
-0.027103804051876068,
0.13810478150844574,
0.007633216679096222,
0.11354098469018936,
-0.09599774330854416,
0.05491466820240021,
0.0463106594979763,
-0.01443100068718195,
0.037909965962171555,
0.011331547982990742,
-0.014241908676922321,
-0.01929795928299427,
-0.02009197510778904,
0.07033905386924744,
0.029026497155427933,
-0.048436298966407776,
-0.048074882477521896,
-0.018270811066031456,
0.03718562051653862,
-0.013517341576516628,
-0.0005003020050935447,
0.01727679930627346,
-0.12068986147642136,
-0.026030609384179115,
-0.0017162322765216231,
0.0647057518362999,
-0.03338739648461342,
-0.0015053276438266039,
0.014373584650456905,
-0.007348832208663225,
-0.005038800183683634,
0.03764749690890312,
-0.030638255178928375,
-0.0158869456499815,
0.031514983624219894,
-0.011681126430630684,
-0.09335022419691086,
0.043578751385211945,
-0.0015929942019283772,
-0.04190067946910858,
-0.05786760523915291,
-0.046567171812057495,
0.008754762820899487,
-0.05699017271399498,
-0.006069083698093891,
-0.007601515855640173,
0.14238479733467102,
-0.008623060770332813,
0.0018814635695889592,
-0.07354605197906494,
0.02761903777718544,
-0.10103164613246918,
0.03767154738306999,
0.012550722807645798,
0.11463413387537003,
0.009184535592794418,
-0.009557276032865047,
0.01239459216594696,
0.034341223537921906,
0.00039086680044420063,
0.0105617456138134,
0.0719265416264534,
0.042953405529260635,
-0.037730488926172256,
-0.08463703840970993,
-0.05241017788648605,
-0.010958938859403133,
-0.06488156318664551,
0.0901435911655426,
-0.05751170217990875,
3.621195938390476e-33,
0.08656797558069229,
-0.08200477808713913,
0.026357576251029968,
-0.06396173685789108,
0.06953605264425278,
-0.11786647886037827,
-0.06081843748688698,
-0.04300970956683159,
0.009049496613442898,
-0.009512582793831825,
-0.07187268137931824,
0.029976893216371536,
-0.026204397901892662,
0.09115388244390488,
-0.006838956382125616,
-0.08429034799337387,
-0.01225010771304369,
0.08091661334037781,
0.1072768121957779,
0.019276589155197144,
0.061716627329587936,
-0.030471229925751686,
-0.01056783925741911,
-0.06911952048540115,
-0.009989659301936626,
0.020448289811611176,
0.006594086065888405,
-0.03493596240878105,
0.08942617475986481,
-0.005847792141139507,
0.02250491827726364,
-0.04296865314245224,
0.022840755060315132,
0.06259768456220627,
-0.09989143162965775,
0.007583558559417725,
0.016730906441807747,
0.03680824488401413,
-0.06389764696359634,
0.02771567739546299,
0.019477389752864838,
0.0031669391319155693,
-0.013557038269937038,
-0.0989115759730339,
-0.003203707979992032,
-0.012198043055832386,
0.0003568382526282221,
-0.09384965151548386,
0.028935560956597328,
0.022921351715922356,
-0.05140071362257004,
0.02558203972876072,
-0.03998950496315956,
-0.08697939664125443,
0.05319572612643242,
-0.06572873890399933,
0.05067554488778114,
-0.007591527886688709,
0.012652757577598095,
0.005253194365650415,
-0.04238993301987648,
0.03127000853419304,
-0.013797490857541561,
-0.01230516005307436,
-0.041550472378730774,
0.03256308659911156,
0.004243430681526661,
0.0582219697535038,
-0.05565797537565231,
0.004080003593116999,
-0.04624207317829132,
0.09059219807386398,
-0.03062548115849495,
-0.07729007303714752,
0.07400141656398773,
-0.028352070599794388,
-0.04562409222126007,
-0.060752201825380325,
-0.12102893739938736,
0.06255260854959488,
-0.017441492527723312,
-0.018970491364598274,
-0.018991809338331223,
0.04325147718191147,
0.05262923613190651,
-0.06746099144220352,
-0.0311766155064106,
0.014085160568356514,
0.02201737090945244,
-0.037874411791563034,
-0.021231476217508316,
-0.03250016272068024,
0.0023011022713035345,
0.007364208344370127,
-0.054550979286432266,
-4.3193330536033714e-33,
0.034016456454992294,
-0.03358464688062668,
0.04709570109844208,
0.08259119838476181,
0.06337981671094894,
-0.008941703476011753,
-0.010469316504895687,
0.02266836166381836,
0.0229564867913723,
-0.043462201952934265,
0.029386702924966812,
0.04413805902004242,
0.0009044688777066767,
-0.009214770048856735,
-0.0767887607216835,
0.0018966335337609053,
-0.09062492847442627,
-0.05541572347283363,
-0.039531271904706955,
-0.0033354538027197123,
0.0033579221926629543,
0.04850417375564575,
0.006625953130424023,
0.034205112606287,
0.046581532806158066,
0.021519167348742485,
0.09370531886816025,
0.011534828692674637,
-0.026940807700157166,
-0.0398721843957901,
-0.005617398303002119,
-0.06451396644115448,
-0.08280713856220245,
0.08404093235731125,
0.10328496992588043,
0.0333205945789814,
-0.015687204897403717,
0.05699754133820534,
-0.05456095561385155,
0.03980632498860359,
0.08157765120267868,
-0.018841873854398727,
-0.04043302685022354,
0.06679023802280426,
-0.06156700477004051,
0.03821707144379616,
0.0317181758582592,
-0.023839695379137993,
0.020629720762372017,
-0.06682944297790527,
-0.0284284595400095,
0.006403870414942503,
-0.04259886592626572,
0.08418221026659012,
0.015076194889843464,
-0.0027708811685442924,
0.10550638288259506,
0.07594510912895203,
0.008905950002372265,
0.018008369952440262,
0.06811679899692535,
-0.10468955338001251,
-0.022628335282206535,
-0.05004880204796791,
-0.017038369551301003,
-0.04845806583762169,
-0.02406475506722927,
0.044788457453250885,
-0.017259083688259125,
0.021271103993058205,
-0.006699482444673777,
-0.04044858738780022,
0.01547637302428484,
0.04035184159874916,
-0.09520688652992249,
-0.03200509399175644,
0.055607713758945465,
-0.013048700988292694,
0.0794084370136261,
0.013616103678941727,
-0.03793172910809517,
-0.04307696595788002,
-0.026118796318769455,
0.029886696487665176,
0.06830717623233795,
0.026376765221357346,
0.06183208152651787,
0.034859322011470795,
0.11088662594556808,
0.044704779982566833,
-0.032180055975914,
0.007978488691151142,
-0.06756732612848282,
0.16090120375156403,
-0.043861325830221176,
-4.821337640237289e-8,
0.06945677846670151,
-0.03721505403518677,
-0.026022184640169144,
0.006392120383679867,
0.031201282516121864,
-0.1120673194527626,
0.06148303300142288,
-0.0541553720831871,
-0.029653064906597137,
-0.019276708364486694,
0.06769336760044098,
0.01861601509153843,
-0.015103829093277454,
-0.00003744311834452674,
0.0743345320224762,
0.014746434055268764,
-0.010759592056274414,
0.10816525667905807,
0.06212088093161583,
-0.042372655123472214,
-0.07359054684638977,
-0.014590371400117874,
-0.008669831790030003,
-0.060303039848804474,
-0.04477086290717125,
0.014049098826944828,
0.0828431025147438,
0.028778161853551865,
0.06831371784210205,
0.015499291941523552,
-0.009389136917889118,
0.04285580664873123,
-0.058295298367738724,
0.06912863999605179,
-0.0016925851814448833,
0.01906590722501278,
-0.06936665624380112,
0.07350050657987595,
0.12601260840892792,
-0.00020628781931009144,
-0.0364723727107048,
-0.08136682212352753,
-0.06382148712873459,
-0.04136738181114197,
0.014518906362354755,
0.11518677324056625,
-0.04819535091519356,
0.018138598650693893,
-0.02630082704126835,
0.04043804109096527,
-0.047314200550317764,
-0.017531946301460266,
0.005145421717315912,
0.11209210008382797,
-0.023525208234786987,
0.01997016742825508,
0.007077756337821484,
-0.062458645552396774,
0.019908076152205467,
-0.03311733156442642,
-0.0032861242070794106,
-0.015680836513638496,
0.02117658220231533,
-0.020281093195080757
] | 0.126681
|
Setting up an extension API server to work with the aggregation layer allows the Kubernetes apiserver to be extended with additional APIs, which are not part of the core Kubernetes APIs. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} \* You must [configure the aggregation layer](/docs/tasks/extend-kubernetes/configure-aggregation-layer/) and enable the apiserver flags. ## Set up an extension api-server to work with the aggregation layer The following steps describe how to set up an extension-apiserver \*at a high level\*. These steps apply regardless if you're using YAML configs or using APIs. An attempt is made to specifically identify any differences between the two. For a concrete example of how they can be implemented using YAML configs, you can look at the [sample-apiserver](https://github.com/kubernetes/sample-apiserver/blob/master/README.md) in the Kubernetes repo. Alternatively, you can use an existing 3rd party solution, such as [apiserver-builder](https://github.com/kubernetes-sigs/apiserver-builder-alpha/blob/master/README.md), which should generate a skeleton and automate all of the following steps for you. 1. Make sure the APIService API is enabled (check `--runtime-config`). It should be on by default, unless it's been deliberately turned off in your cluster. 1. You may need to make an RBAC rule allowing you to add APIService objects, or get your cluster administrator to make one. (Since API extensions affect the entire cluster, it is not recommended to do testing/development/debug of an API extension in a live cluster.) 1. Create the Kubernetes namespace you want to run your extension api-service in. 1. Create/get a CA cert to be used to sign the server cert the extension api-server uses for HTTPS. 1. Create a server cert/key for the api-server to use for HTTPS. This cert should be signed by the above CA. It should also have a CN of the Kube DNS name. This is derived from the Kubernetes service and be of the form `..svc` 1. Create a Kubernetes secret with the server cert/key in your namespace. 1. Create a Kubernetes deployment for the extension api-server and make sure you are loading the secret as a volume. It should contain a reference to a working image of your extension api-server. The deployment should also be in your namespace. 1. Make sure that your extension-apiserver loads those certs from that volume and that they are used in the HTTPS handshake. 1. Create a Kubernetes service account in your namespace. 1. Create a Kubernetes cluster role for the operations you want to allow on your resources. 1. Create a Kubernetes cluster role binding from the service account in your namespace to the cluster role you created. 1. Create a Kubernetes cluster role binding from the service account in your namespace to the `system:auth-delegator` cluster role to delegate auth decisions to the Kubernetes core API server. 1. Create a Kubernetes role binding from the service account in your namespace to the `extension-apiserver-authentication-reader` role. This allows your extension api-server to access the `extension-apiserver-authentication` configmap. 1. Create a Kubernetes apiservice. The CA cert above should be base64 encoded, stripped of new lines and used as the spec.caBundle in the apiservice. This should not be namespaced. If using the [kube-aggregator API](https://github.com/kubernetes/kube-aggregator/), only pass in the PEM encoded CA bundle because the base 64 encoding is done for you. 1. Use kubectl to get your resource. When run, kubectl should return "No resources found.". This message indicates that everything worked but you currently have no objects of that resource type created. ## {{% heading "whatsnext" %}} \* Walk through the steps to [configure the API aggregation layer](/docs/tasks/extend-kubernetes/configure-aggregation-layer/) and enable the apiserver flags. \* For a high level overview, see [Extending the Kubernetes API with the aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/). \* Learn how to
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/setup-extension-api-server.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/setup-extension-api-server.md
|
[
-0.06457424908876419,
-0.007740730885416269,
0.09586014598608017,
0.002900786465033889,
-0.055886417627334595,
0.012008239515125751,
-0.06132499873638153,
-0.0028154419269412756,
0.07728370279073715,
0.019711270928382874,
-0.03426731377840042,
-0.044182270765304565,
0.017765924334526062,
0.01628483086824417,
0.05513792857527733,
0.04340307042002678,
0.09610852599143982,
-0.02416025660932064,
-0.05401301383972168,
-0.11212697625160217,
0.006660575978457928,
-0.03388701006770134,
-0.004721310455352068,
-0.055398132652044296,
-0.007833211682736874,
-0.007563933730125427,
-0.058414313942193985,
-0.008628631010651588,
0.029017623513936996,
0.05025231093168259,
-0.049668870866298676,
-0.025657933205366135,
-0.03095327690243721,
0.07542036473751068,
0.027992716059088707,
0.07454755902290344,
0.04125465825200081,
-0.07130532711744308,
-0.06367113441228867,
0.021306786686182022,
0.02461506426334381,
-0.004498051013797522,
-0.07616730034351349,
-0.038066089153289795,
-0.00983639806509018,
-0.03333837538957596,
-0.0654764249920845,
-0.06513696163892746,
-0.056606974452733994,
-0.00796302780508995,
0.04655160754919052,
-0.1074695885181427,
0.03391013666987419,
0.006602733861654997,
0.07122461497783661,
0.04017690569162369,
-0.12448722124099731,
0.018148163333535194,
0.014479807578027248,
-0.006134921684861183,
-0.03479240834712982,
-0.05833156779408455,
-0.014878903515636921,
-0.037521302700042725,
-0.04808775335550308,
0.02554127760231495,
0.027327995747327805,
0.04688926786184311,
0.025845956057310104,
-0.02604597620666027,
0.03989117220044136,
0.004825110547244549,
-0.007239397615194321,
-0.027566494420170784,
0.012814216315746307,
0.054810330271720886,
-0.013087493367493153,
0.041591230779886246,
0.005153506062924862,
-0.08241357654333115,
-0.04189255088567734,
0.04413701221346855,
0.029587117955088615,
0.05759212374687195,
-0.05063119903206825,
-0.011966263875365257,
-0.042332377284765244,
-0.06928998976945877,
-0.026644911617040634,
-0.028361480683088303,
0.023815935477614403,
-0.0987606793642044,
-0.018870629370212555,
-0.1083974838256836,
0.1267293095588684,
0.045922961086034775,
-0.10169494152069092,
-0.0486520379781723,
0.03912445530295372,
-0.00020449010480660945,
-0.026331162080168724,
0.011353499256074429,
0.028332488611340523,
-0.0227909367531538,
0.04166216775774956,
-0.02222404256463051,
-0.0674688071012497,
0.03154885768890381,
0.002219209913164377,
0.0586097277700901,
0.013260923326015472,
0.0025500135961920023,
0.061487067490816116,
0.02067697048187256,
0.0035104574635624886,
0.00496303616091609,
0.09340974688529968,
-0.00586107699200511,
0.04862556979060173,
-0.01092339213937521,
0.03032253310084343,
-0.0250383410602808,
0.008552021346986294,
0.019297612830996513,
0.053343139588832855,
0.06835117936134338,
-0.04299392178654671,
4.169638256129969e-33,
0.05931602045893669,
-0.04785272106528282,
0.06050937622785568,
-0.0013331103837117553,
-0.009594536386430264,
-0.057286642491817474,
0.030186906456947327,
0.015585929155349731,
-0.05773627758026123,
-0.00013075280003249645,
-0.030921712517738342,
0.12905265390872955,
-0.0390162467956543,
-0.042844247072935104,
0.04725940153002739,
-0.010867021046578884,
-0.03296997770667076,
0.03855075687170029,
0.09029125422239304,
-0.010465492494404316,
-0.01607443206012249,
-0.03891420736908913,
0.016492903232574463,
0.05444743111729622,
-0.009400465525686741,
-0.025290165096521378,
0.04838643968105316,
-0.06200616806745529,
-0.03317197039723396,
0.017072346061468124,
-0.055050432682037354,
-0.04221845045685768,
-0.004011210054159164,
-0.01010651420801878,
-0.14883571863174438,
0.0005084802978672087,
-0.008377634920179844,
0.012441448867321014,
-0.1106419488787651,
-0.038798585534095764,
0.021030787378549576,
0.022184021770954132,
-0.013198932632803917,
-0.0987212285399437,
0.00211727200075984,
-0.0006208975100889802,
0.014384151436388493,
-0.06920327246189117,
0.13073524832725525,
-0.020342376083135605,
-0.002871185075491667,
-0.04451831057667732,
0.05721200257539749,
-0.02734087035059929,
0.11447406560182571,
0.011804644018411636,
0.12150057405233383,
-0.016236325725913048,
-0.058560121804475784,
-0.028719749301671982,
-0.0683821439743042,
-0.08941065520048141,
-0.059968721121549606,
0.031491510570049286,
0.06718147546052933,
0.012453119270503521,
-0.02768171951174736,
0.11869495362043381,
0.012688166461884975,
0.018406827002763748,
-0.003730505472049117,
0.05568864569067955,
-0.04831068217754364,
0.06859368830919266,
0.017097769305109978,
-0.09921180456876755,
0.0725705698132515,
0.027947410941123962,
-0.03315918892621994,
0.029915085062384605,
0.04312112554907799,
-0.009415874257683754,
0.01134386844933033,
0.06848215311765671,
-0.008080127649009228,
0.04479195922613144,
0.0146639384329319,
0.030588213354349136,
0.009693040512502193,
0.0057838354259729385,
-0.024533377960324287,
-0.03776896744966507,
-0.07527723163366318,
0.060579244047403336,
-0.072687529027462,
-4.71170425170022e-33,
0.0825953409075737,
0.03476305678486824,
-0.03419460356235504,
-0.007070689927786589,
0.07817190885543823,
0.02267395332455635,
0.0749138593673706,
0.02073306404054165,
0.019115924835205078,
-0.07341183722019196,
-0.07567542791366577,
-0.038744620978832245,
0.029252352192997932,
0.016734663397073746,
-0.04625404626131058,
-0.026464201509952545,
-0.14390580356121063,
-0.07582136988639832,
0.01799175702035427,
0.04765776917338371,
-0.07631053775548935,
0.009079620242118835,
0.07337068766355515,
0.024445150047540665,
0.07338215410709381,
-0.0007012973073869944,
-0.04100704938173294,
0.09535800665616989,
-0.03166767954826355,
0.014408661983907223,
0.07331996411085129,
-0.11997406929731369,
0.015056673437356949,
-0.04947427660226822,
0.015148548409342766,
-0.04656150937080383,
0.022857708856463432,
0.052481140941381454,
-0.03795211762189865,
-0.05127333477139473,
0.00619724253192544,
-0.055216655135154724,
-0.013493619859218597,
-0.023856718093156815,
-0.009124196134507656,
0.021800139918923378,
0.0653371512889862,
-0.02197408676147461,
-0.10289040952920914,
-0.10884468257427216,
-0.06932789087295532,
0.02589240111410618,
-0.07398785650730133,
0.11704324930906296,
-0.0674712061882019,
0.02789423242211342,
0.08594723790884018,
0.006258977111428976,
-0.03225681558251381,
-0.02745695784687996,
0.028881127014756203,
-0.0656963661313057,
0.058300603181123734,
0.011360947042703629,
0.021282775327563286,
-0.04298626258969307,
-0.020449578762054443,
-0.00991679448634386,
-0.056284185498952866,
0.020067356526851654,
-0.061528030782938004,
-0.05331392213702202,
0.024037620052695274,
0.044331587851047516,
0.012098660692572594,
-0.0127402413636446,
0.02990216203033924,
-0.0046105883084237576,
0.06180413067340851,
0.01566341705620289,
-0.13674607872962952,
0.023982662707567215,
-0.048591479659080505,
0.061092913150787354,
0.0648156926035881,
0.03261576592922211,
0.11101986467838287,
0.12465788424015045,
0.029586730524897575,
0.07939765602350235,
0.0064572240225970745,
0.02722046710550785,
-0.008088829927146435,
0.09667643904685974,
-0.017049584537744522,
-5.586939622048703e-8,
-0.011698665097355843,
0.06384165585041046,
-0.06927984207868576,
0.031073415651917458,
0.005301308818161488,
-0.008083363063633442,
-0.012346824631094933,
0.0599699392914772,
-0.02806265838444233,
0.030250459909439087,
-0.04864855110645294,
0.05839741602540016,
-0.06894200295209885,
-0.004303199239075184,
-0.014990340918302536,
-0.04129636287689209,
0.015560701489448547,
0.058029383420944214,
0.013225513510406017,
-0.08859014511108398,
-0.08386515080928802,
0.013340194709599018,
-0.0038717715069651604,
-0.08791086822748184,
-0.0038951104506850243,
0.09335095435380936,
0.015245296992361546,
0.03915146738290787,
0.007241361774504185,
0.011855650693178177,
-0.04923089221119881,
0.024587923660874367,
-0.03374479338526726,
0.011269645765423775,
0.020923389121890068,
0.007981614209711552,
-0.04451049864292145,
0.03735651820898056,
0.01469653844833374,
0.011674156412482262,
0.057341910898685455,
0.024386391043663025,
-0.09834737330675125,
0.019905010238289833,
0.033052925020456314,
0.06658211350440979,
-0.03105475753545761,
0.027212439104914665,
0.03404811769723892,
0.05232251435518265,
0.0045927222818136215,
-0.06501266360282898,
0.004344542045146227,
0.07782667875289917,
-0.011677677743136883,
-0.0013109698193147779,
0.008819258771836758,
-0.07808039337396622,
0.042117755860090256,
0.017361504957079887,
0.0721043273806572,
-0.007796403020620346,
0.031476639211177826,
0.02119443006813526
] | 0.110447
|
you currently have no objects of that resource type created. ## {{% heading "whatsnext" %}} \* Walk through the steps to [configure the API aggregation layer](/docs/tasks/extend-kubernetes/configure-aggregation-layer/) and enable the apiserver flags. \* For a high level overview, see [Extending the Kubernetes API with the aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/). \* Learn how to [Extend the Kubernetes API using Custom Resource Definitions](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/setup-extension-api-server.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/setup-extension-api-server.md
|
[
-0.012175990268588066,
0.03641596809029579,
0.06428087502717972,
0.042707476764917374,
-0.06707200407981873,
0.06891246140003204,
0.02164277993142605,
-0.00883119460195303,
0.07167542725801468,
0.026151159778237343,
-0.05337274447083473,
-0.06546346098184586,
0.004396094009280205,
0.031120656058192253,
-0.007898988202214241,
0.005096563138067722,
0.06091401353478432,
-0.0495510958135128,
-0.037292465567588806,
-0.04036254435777664,
0.03688404709100723,
0.007901579141616821,
0.03525051847100258,
-0.05093524232506752,
-0.0050369007512927055,
-0.02172452211380005,
-0.07926223427057266,
-0.04539041966199875,
0.0335523821413517,
0.005259332712739706,
-0.03518598526716232,
0.027857894077897072,
-0.018763823434710503,
0.04823779687285423,
0.04870465397834778,
0.06336811184883118,
0.02677353471517563,
-0.0699218139052391,
-0.016843099147081375,
0.0466102734208107,
0.0625554621219635,
-0.02248774841427803,
-0.06575096398591995,
-0.02913786843419075,
-0.026325421407818794,
0.01772112026810646,
-0.03477270528674126,
-0.06745462864637375,
-0.024557560682296753,
-0.021672768518328667,
0.06716973334550858,
-0.07391084730625153,
0.037684082984924316,
-0.018807116895914078,
0.07868681848049164,
0.03138430789113045,
-0.10502821952104568,
0.05434193089604378,
0.05139464884996414,
-0.018414828926324844,
0.05504529923200607,
-0.027047380805015564,
0.043066296726465225,
-0.029079340398311615,
-0.030655117705464363,
0.005750855430960655,
-0.04096561297774315,
0.10954580456018448,
-0.043778374791145325,
-0.04578971490263939,
0.043276023119688034,
0.024310341104865074,
-0.00041401313501410186,
0.027951136231422424,
0.07229466736316681,
0.04705730080604553,
-0.02096165157854557,
0.047005705535411835,
0.042005956172943115,
-0.08723368495702744,
-0.03364033252000809,
-0.0009613026631996036,
0.030460424721240997,
0.051714714616537094,
-0.010979111306369305,
0.029152054339647293,
-0.047011520713567734,
-0.06122588366270065,
0.017395157366991043,
-0.017911681905388832,
-0.0063825855031609535,
-0.05859340354800224,
-0.008065314032137394,
-0.10274408012628555,
0.09747195988893509,
0.03707441687583923,
-0.1313803344964981,
-0.02761811390519142,
0.02241261675953865,
-0.009262725710868835,
-0.010673119686543941,
-0.013313470408320427,
0.03489922732114792,
0.012360221706330776,
0.033579856157302856,
-0.016311265528202057,
-0.06446149945259094,
0.06915979087352753,
-0.029023345559835434,
0.05605082958936691,
0.014948857948184013,
0.015925690531730652,
-0.025872088968753815,
-0.03102967143058777,
-0.015428323298692703,
0.016821328550577164,
0.018162986263632774,
-0.05293259024620056,
0.015898600220680237,
-0.008136962540447712,
0.10069447755813599,
-0.08827850222587585,
-0.053010959178209305,
0.042100075632333755,
-0.031682055443525314,
0.03796691447496414,
-0.023584164679050446,
1.5712304014983647e-33,
0.023127445951104164,
-0.06149126961827278,
0.06132080405950546,
0.018013766035437584,
-0.004408517852425575,
-0.0863795205950737,
-0.012117455713450909,
-0.007221898064017296,
-0.0761866569519043,
-0.022158049046993256,
-0.06373732537031174,
0.1299334019422531,
-0.036817025393247604,
-0.013012023642659187,
-0.044890329241752625,
-0.017376987263560295,
-0.007172137964516878,
0.04357920587062836,
0.10623201727867126,
-0.03732126206159592,
0.017297251150012016,
0.028369354084134102,
-0.0017167433397844434,
0.04000159353017807,
0.0023337879683822393,
0.019117413088679314,
0.024526437744498253,
-0.08413247764110565,
-0.0177638940513134,
0.0070587447844445705,
-0.008209469728171825,
-0.041092876344919205,
0.02645513415336609,
-0.024960502982139587,
-0.13098223507404327,
-0.01826152577996254,
0.026200400665402412,
0.05963842570781708,
-0.12877090275287628,
-0.009734862484037876,
0.052228398621082306,
-0.0009120355825871229,
-0.04059787839651108,
-0.09884706884622574,
-0.0018980316817760468,
0.027085956186056137,
0.08351032435894012,
-0.0673581138253212,
0.05759303644299507,
0.019377054646611214,
-0.05453905090689659,
-0.02474128268659115,
0.06245340034365654,
-0.002233062405139208,
0.09852376580238342,
0.010979271493852139,
0.07810420542955399,
0.03534012287855148,
-0.05501308664679527,
-0.035872362554073334,
-0.03846682608127594,
0.019488828256726265,
0.0029565568547695875,
-0.006200788542628288,
0.045804210007190704,
0.0142069011926651,
-0.021307840943336487,
0.08174347132444382,
-0.009890276938676834,
-0.020693397149443626,
0.022802166640758514,
0.0582311674952507,
0.009446796961128712,
0.10699290782213211,
0.025126617401838303,
-0.09303757548332214,
0.05640624836087227,
0.005604792386293411,
-0.11121992766857147,
0.04554413631558418,
0.05031062290072441,
-0.059931330382823944,
0.03724076226353645,
0.03477559983730316,
-0.03055049106478691,
0.0202987939119339,
0.03281248360872269,
-0.001144058769568801,
0.06259968876838684,
0.038877587765455246,
-0.00611308915540576,
-0.044333335012197495,
-0.0849202498793602,
0.019680893048644066,
-0.10350894927978516,
-3.3161599297978925e-33,
0.08469437062740326,
0.0735318660736084,
-0.03021872602403164,
-0.05133703351020813,
0.02508118748664856,
0.03058755025267601,
0.04196305572986603,
0.06550589203834534,
-0.012978577986359596,
-0.01431692112237215,
-0.014811537228524685,
-0.04092974215745926,
0.040768496692180634,
0.01136756967753172,
-0.0446586050093174,
0.005618695635348558,
-0.08135262876749039,
-0.0617256760597229,
-0.029007604345679283,
0.02533503621816635,
-0.10399230569601059,
0.05885952338576317,
0.07549989223480225,
0.04825981706380844,
0.012460365891456604,
0.03194105997681618,
0.0173355583101511,
0.04079674184322357,
-0.03836282715201378,
0.004889469128102064,
-0.013200751505792141,
-0.12136486172676086,
-0.005600619595497847,
0.022832991555333138,
0.024812569841742516,
-0.0726764053106308,
0.02030349150300026,
-0.011209532618522644,
-0.03478211537003517,
-0.10758882761001587,
0.008443204686045647,
-0.058164332062006,
-0.004160966258496046,
-0.00403681630268693,
0.004759676288813353,
-0.024506613612174988,
0.06568650156259537,
-0.07274989783763885,
-0.028054095804691315,
-0.13767968118190765,
0.023401081562042236,
-0.02654380165040493,
-0.044782888144254684,
0.07234174758195877,
-0.04846419021487236,
0.0765293538570404,
0.1418861448764801,
0.03542766720056534,
-0.004125229548662901,
-0.04026009887456894,
0.04787914827466011,
-0.08910520374774933,
-0.03677688539028168,
0.014675146900117397,
0.04517846927046776,
-0.08743062615394592,
-0.01671682298183441,
-0.02912675216794014,
-0.06053811311721802,
-0.033584434539079666,
-0.08775699138641357,
-0.007240192033350468,
0.0018659067573025823,
0.03350535407662392,
0.005652816966176033,
0.0393843911588192,
0.04327210783958435,
0.000054389489378081635,
0.06356847286224365,
0.05553540587425232,
-0.09333888441324234,
0.016162121668457985,
-0.011854130774736404,
0.022180648520588875,
0.09234249591827393,
0.048738688230514526,
0.0661846399307251,
0.11803359538316727,
-0.010909372009336948,
0.07656215131282806,
-0.053997237235307693,
-0.0062896478921175,
-0.040470052510499954,
0.13857075572013855,
-0.015485471114516258,
-5.169518502157189e-8,
-0.015468901954591274,
0.0272598285228014,
-0.07143478840589523,
0.043482258915901184,
0.01634206250309944,
-0.03701396286487579,
0.032585322856903076,
0.03237089514732361,
-0.03584309667348862,
0.014329995959997177,
-0.09339818358421326,
0.05177823454141617,
-0.04541176185011864,
0.04262901097536087,
0.0486026331782341,
-0.11742376536130905,
-0.03870036453008652,
0.061714038252830505,
0.027194473892450333,
-0.10118190944194794,
-0.04321686178445816,
-0.024917492642998695,
-0.0035343077033758163,
-0.10777851939201355,
0.03305446729063988,
0.07189072668552399,
0.026764776557683945,
0.03570927679538727,
-0.00816324632614851,
-0.014061846770346165,
-0.028872201219201088,
0.007171292789280415,
-0.10071127861738205,
0.03698597475886345,
-0.0037001546006649733,
0.044543735682964325,
-0.07974880188703537,
0.10170336067676544,
0.022924847900867462,
0.019772589206695557,
0.010938791558146477,
0.04122726991772652,
-0.09289726614952087,
0.05406399071216583,
0.026576992124319077,
0.10338687151670456,
-0.057764023542404175,
0.07199316471815109,
0.008658050559461117,
-0.027170520275831223,
-0.009445274248719215,
-0.04607146978378296,
-0.03152397647500038,
0.03212329000234604,
-0.06118039786815643,
0.014515507966279984,
0.012958338484168053,
-0.03915940970182419,
-0.01190983410924673,
-0.032444726675748825,
0.035455118864774704,
-0.0164155513048172,
-0.03703721612691879,
-0.0051463572308421135
] | 0.115674
|
Kubernetes ships with a default scheduler that is described [here](/docs/reference/command-line-tools-reference/kube-scheduler/). If the default scheduler does not suit your needs you can implement your own scheduler. Moreover, you can even run multiple schedulers simultaneously alongside the default scheduler and instruct Kubernetes what scheduler to use for each of your pods. Let's learn how to run multiple schedulers in Kubernetes with an example. A detailed description of how to implement a scheduler is outside the scope of this document. Please refer to the kube-scheduler implementation in [pkg/scheduler](https://github.com/kubernetes/kubernetes/tree/master/pkg/scheduler) in the Kubernetes source directory for a canonical example. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Package the scheduler Package your scheduler binary into a container image. For the purposes of this example, you can use the default scheduler (kube-scheduler) as your second scheduler. Clone the [Kubernetes source code from GitHub](https://github.com/kubernetes/kubernetes) and build the source. ```shell git clone https://github.com/kubernetes/kubernetes.git cd kubernetes make ``` Create a container image containing the kube-scheduler binary. Here is the `Dockerfile` to build the image: ```docker FROM busybox ADD ./\_output/local/bin/linux/amd64/kube-scheduler /usr/local/bin/kube-scheduler ``` Save the file as `Dockerfile`, build the image and push it to a registry. This example pushes the image to [Google Container Registry (GCR)](https://cloud.google.com/container-registry/). For more details, please read the GCR [documentation](https://cloud.google.com/container-registry/docs/). Alternatively you can also use the [docker hub](https://hub.docker.com/search?q=). For more details refer to the docker hub [documentation](https://docs.docker.com/docker-hub/repos/create/#create-a-repository). ```shell docker build -t gcr.io/my-gcp-project/my-kube-scheduler:1.0 . # The image name and the repository gcloud docker -- push gcr.io/my-gcp-project/my-kube-scheduler:1.0 # used in here is just an example ``` ## Define a Kubernetes Deployment for the scheduler Now that you have your scheduler in a container image, create a pod configuration for it and run it in your Kubernetes cluster. But instead of creating a pod directly in the cluster, you can use a [Deployment](/docs/concepts/workloads/controllers/deployment/) for this example. A [Deployment](/docs/concepts/workloads/controllers/deployment/) manages a [Replica Set](/docs/concepts/workloads/controllers/replicaset/) which in turn manages the pods, thereby making the scheduler resilient to failures. Here is the deployment config. Save it as `my-scheduler.yaml`: {{% code\_sample file="admin/sched/my-scheduler.yaml" %}} In the above manifest, you use a [KubeSchedulerConfiguration](/docs/reference/scheduling/config/) to customize the behavior of your scheduler implementation. This configuration has been passed to the `kube-scheduler` during initialization with the `--config` option. The `my-scheduler-config` ConfigMap stores the configuration file. The Pod of the`my-scheduler` Deployment mounts the `my-scheduler-config` ConfigMap as a volume. In the aforementioned Scheduler Configuration, your scheduler implementation is represented via a [KubeSchedulerProfile](/docs/reference/config-api/kube-scheduler-config.v1/#kubescheduler-config-k8s-io-v1-KubeSchedulerProfile). {{< note >}} To determine if a scheduler is responsible for scheduling a specific Pod, the `spec.schedulerName` field in a PodTemplate or Pod manifest must match the `schedulerName` field of the `KubeSchedulerProfile`. All schedulers running in the cluster must have unique names. {{< /note >}} Also, note that you create a dedicated service account `my-scheduler` and bind the ClusterRole `system:kube-scheduler` to it so that it can acquire the same privileges as `kube-scheduler`. Please see the [kube-scheduler documentation](/docs/reference/command-line-tools-reference/kube-scheduler/) for detailed description of other command line arguments and [Scheduler Configuration reference](/docs/reference/config-api/kube-scheduler-config.v1/) for detailed description of other customizable `kube-scheduler` configurations. ## Run the second scheduler in the cluster In order to run your scheduler in a Kubernetes cluster, create the deployment specified in the config above in a Kubernetes cluster: ```shell kubectl create -f my-scheduler.yaml ``` Verify that the scheduler pod is running: ```shell kubectl get pods --namespace=kube-system ``` ``` NAME READY STATUS RESTARTS AGE .... my-scheduler-lnf4s-4744f 1/1 Running 0 2m ... ``` You should see a "Running" my-scheduler pod, in addition to the default kube-scheduler pod in this list. ### Enable leader election To run multiple-scheduler with leader election enabled, you must do the following: Update the following fields for the KubeSchedulerConfiguration in the `my-scheduler-config` ConfigMap
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-multiple-schedulers.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-multiple-schedulers.md
|
[
-0.010609555058181286,
-0.03917234018445015,
0.04099111258983612,
0.016190189868211746,
-0.06539727747440338,
0.02142544649541378,
-0.06559185683727264,
-0.03260192647576332,
0.03751550614833832,
0.047156963497400284,
-0.09764397144317627,
-0.04454445838928223,
-0.009516915306448936,
0.03812328353524208,
0.04506108909845352,
-0.03958433121442795,
-0.012584786862134933,
-0.00042690240661613643,
-0.0011900770477950573,
-0.03478642925620079,
0.033516913652420044,
0.013329843059182167,
0.0397505909204483,
0.018981939181685448,
-0.07495862990617752,
-0.04006912559270859,
0.00942010898143053,
-0.05126320570707321,
-0.024869780987501144,
0.03017028607428074,
-0.014949928969144821,
-0.07318661361932755,
0.047207728028297424,
0.05490797385573387,
0.0335078127682209,
0.08906401693820953,
-0.028313320130109787,
-0.008999318815767765,
-0.03553617000579834,
0.042252395302057266,
0.03674547001719475,
-0.02124002017080784,
-0.08838970959186554,
-0.0819116160273552,
-0.04844161123037338,
-0.030089596286416054,
-0.08416704833507538,
-0.06406290829181671,
0.02497340738773346,
-0.0017482605762779713,
0.06318574398756027,
-0.1293015480041504,
0.0606386624276638,
0.007720463443547487,
0.07150343805551529,
0.10810501128435135,
0.008005918934941292,
0.0024908760096877813,
0.10334144532680511,
-0.006492391228675842,
-0.01591135561466217,
-0.025606395676732063,
-0.006244598887860775,
-0.03777237981557846,
0.0035339912865310907,
0.038482751697301865,
0.018142377957701683,
0.0368356928229332,
0.030970804393291473,
-0.030729666352272034,
0.027740618214011192,
0.002280305838212371,
0.04290900379419327,
-0.005977711174637079,
-0.07058960199356079,
0.025071825832128525,
-0.0003762977721635252,
0.09187804907560349,
-0.07753254473209381,
-0.057300616055727005,
-0.031178129836916924,
0.020861046388745308,
0.036400724202394485,
-0.05558620020747185,
-0.033608876168727875,
-0.04673941060900688,
-0.011580664664506912,
0.002493140520527959,
0.08510094881057739,
0.027661429718136787,
0.049895357340574265,
0.003747394075617194,
-0.006517824251204729,
-0.089449442923069,
0.061251215636730194,
0.0159333273768425,
-0.021146370097994804,
0.028058283030986786,
0.11285609751939774,
-0.04462823271751404,
0.050572920590639114,
-0.0766185000538826,
0.003117430256679654,
0.03432530537247658,
0.09369456768035889,
-0.05480143427848816,
-0.05272137373685837,
-0.06526191532611847,
-0.009429500438272953,
0.001006073784083128,
0.03130786865949631,
0.07396039366722107,
0.04993487894535065,
-0.0021451334469020367,
0.0029422263614833355,
0.07014643400907516,
0.032696470618247986,
0.010885465890169144,
0.07228248566389084,
0.06403695046901703,
0.0006353694479912519,
-0.09412167966365814,
0.05951188504695892,
-0.024925198405981064,
0.039740175008773804,
-0.05321351811289787,
0.018974829465150833,
4.0662065082011156e-33,
-0.008477583527565002,
-0.04708041623234749,
0.05160456523299217,
-0.09406892210245132,
0.060243286192417145,
-0.07518545538187027,
-0.035059042274951935,
0.014837252907454967,
0.008239801973104477,
-0.08837537467479706,
-0.02272896282374859,
0.04165060818195343,
-0.006865232717245817,
0.017623187974095345,
-0.05863624066114426,
-0.008520795963704586,
-0.01760808192193508,
0.024717550724744797,
0.16633661091327667,
-0.03993282467126846,
-0.01136406883597374,
-0.07574524730443954,
-0.09594070911407471,
0.006688565015792847,
-0.009086289443075657,
-0.04211882874369621,
0.08462399244308472,
-0.08748383074998856,
-0.009896340779960155,
0.006755413021892309,
0.016212724149227142,
-0.011094048619270325,
-0.007213223725557327,
0.07843132317066193,
-0.1339295357465744,
-0.015942467376589775,
-0.0441080741584301,
0.1301518827676773,
-0.04925450682640076,
0.033026307821273804,
0.03477451205253601,
-0.03184734657406807,
0.022427218034863472,
-0.03173874691128731,
0.07384210079908371,
0.004908389411866665,
0.022390145808458328,
-0.06629312038421631,
0.0467350147664547,
0.0008406481356360018,
0.05847858637571335,
-0.054872822016477585,
0.03072311170399189,
-0.08882567286491394,
0.02092331275343895,
0.0009271180024370551,
0.07923241704702377,
-0.10044055432081223,
-0.01268516294658184,
-0.0224691741168499,
-0.03750044107437134,
-0.004970039241015911,
-0.048717744648456573,
0.011971571482717991,
0.022598031908273697,
-0.012147126719355583,
0.0006118813762441278,
0.051554348319768906,
0.004424251150339842,
0.009602991864085197,
-0.04907519742846489,
-0.007260036654770374,
-0.01626681722700596,
-0.03159843757748604,
0.010298117063939571,
0.01134753879159689,
0.09306090325117111,
-0.005159602966159582,
-0.12975718080997467,
0.08660473674535751,
0.011349506676197052,
0.026233669370412827,
-0.0067989458329975605,
0.030581273138523102,
-0.0053132083266973495,
-0.0032824366353452206,
-0.013539072126150131,
0.037231892347335815,
0.00641228212043643,
0.04034934937953949,
0.044605355709791183,
-0.06561336666345596,
-0.07145492732524872,
0.08375757187604904,
-0.02850545011460781,
-3.819170492904058e-33,
0.12403688579797745,
0.011826331727206707,
0.02321542054414749,
0.029542505741119385,
0.08412275463342667,
0.04587797075510025,
0.0030007644090801477,
-0.027649441733956337,
-0.017138460651040077,
-0.06526903063058853,
-0.07604408264160156,
-0.06537340581417084,
0.02751925028860569,
0.03013608232140541,
-0.09227637946605682,
-0.002159649971872568,
-0.014885032549500465,
0.031935080885887146,
-0.027047308161854744,
0.030866902321577072,
0.00288207083940506,
-0.019859492778778076,
-0.0006248531863093376,
-0.04239178076386452,
0.03055628389120102,
0.031072944402694702,
0.039305560290813446,
0.04965616390109062,
-0.027422044426202774,
0.07160917669534683,
-0.049020152539014816,
-0.1524374783039093,
0.1038968488574028,
0.001145483460277319,
0.051215991377830505,
-0.013393612578511238,
-0.05662349611520767,
0.0674196407198906,
-0.009515897370874882,
0.06453320384025574,
0.0684935674071312,
-0.050981663167476654,
-0.04461710527539253,
-0.03268016502261162,
-0.06092175096273422,
0.034915897995233536,
0.008909453637897968,
-0.006640475243330002,
-0.07107934355735779,
-0.033220455050468445,
-0.10600457340478897,
-0.0016111418372020125,
-0.08461703360080719,
0.0629081055521965,
0.01938570663332939,
-0.02121659182012081,
0.021402737125754356,
0.027947276830673218,
0.004362873733043671,
0.04486371949315071,
0.030878469347953796,
-0.08082982897758484,
0.11233934760093689,
0.039492759853601456,
-0.011074469424784184,
-0.058114781975746155,
-0.02724662981927395,
-0.02234799601137638,
-0.09029870480298996,
0.03931315615773201,
-0.024304382503032684,
-0.021396810188889503,
0.018193146213889122,
0.08262155950069427,
-0.030901728197932243,
-0.04004044830799103,
0.005478834267705679,
0.013537966646254063,
-0.007360026706010103,
0.06780070066452026,
0.000980072538368404,
0.018933814018964767,
-0.03259241580963135,
-0.008913928642868996,
-0.04522722586989403,
0.08225096762180328,
0.10338200628757477,
0.06267374008893967,
0.08660751581192017,
0.02092926949262619,
0.0847940444946289,
-0.007379191927611828,
0.03003602661192417,
0.10750024765729904,
0.02158532664179802,
-5.182523921121174e-8,
0.08267645537853241,
-0.016498250886797905,
0.019293755292892456,
-0.0002902499109040946,
0.03686225786805153,
-0.0975838303565979,
0.025849170982837677,
-0.04011426866054535,
-0.03327921777963638,
0.03811167553067207,
0.011520450934767723,
0.04084618389606476,
0.01967761479318142,
-0.04014192894101143,
0.043968334794044495,
-0.003446341725066304,
0.04656171426177025,
-0.00816366821527481,
0.04462004080414772,
-0.08786480128765106,
-0.008238304406404495,
-0.04785221442580223,
0.044281501322984695,
-0.034208957105875015,
-0.0007443046779371798,
0.09206026792526245,
0.018770262598991394,
0.009572160430252552,
0.053798776119947433,
0.01643587276339531,
-0.048318468034267426,
-0.017677372321486473,
-0.07994049042463303,
0.01901351474225521,
-0.011495952494442463,
-0.03316282108426094,
-0.18116432428359985,
-0.012672588229179382,
0.05591075122356415,
0.04232154041528702,
0.03127482533454895,
-0.06945227086544037,
-0.06869401782751083,
-0.017262056469917297,
0.039265308529138565,
0.06035149097442627,
-0.0687161460518837,
0.020276255905628204,
-0.009164394810795784,
-0.00374193605966866,
-0.04884442687034607,
-0.022115256637334824,
0.04859347268939018,
0.05609850957989693,
-0.007222167681902647,
0.023250406607985497,
0.031690098345279694,
-0.0888541117310524,
0.016859546303749084,
-0.028116799890995026,
-0.04267510026693344,
0.032101504504680634,
-0.042447589337825775,
-0.027448531240224838
] | 0.065495
|
1/1 Running 0 2m ... ``` You should see a "Running" my-scheduler pod, in addition to the default kube-scheduler pod in this list. ### Enable leader election To run multiple-scheduler with leader election enabled, you must do the following: Update the following fields for the KubeSchedulerConfiguration in the `my-scheduler-config` ConfigMap in your YAML file: \* `leaderElection.leaderElect` to `true` \* `leaderElection.resourceNamespace` to `` \* `leaderElection.resourceName` to `` {{< note >}} The control plane creates the lock objects for you, but the namespace must already exist. You can use the `kube-system` namespace. {{< /note >}} If RBAC is enabled on your cluster, you must update the `system:kube-scheduler` cluster role. Add your scheduler name to the resourceNames of the rule applied for `endpoints` and `leases` resources, as in the following example: ```shell kubectl edit clusterrole system:kube-scheduler ``` {{% code\_sample file="admin/sched/clusterrole.yaml" %}} ## Specify schedulers for pods Now that your second scheduler is running, create some pods, and direct them to be scheduled by either the default scheduler or the one you deployed. In order to schedule a given pod using a specific scheduler, specify the name of the scheduler in that pod spec. Let's look at three examples. - Pod spec without any scheduler name {{% code\_sample file="admin/sched/pod1.yaml" %}} When no scheduler name is supplied, the pod is automatically scheduled using the default-scheduler. Save this file as `pod1.yaml` and submit it to the Kubernetes cluster. ```shell kubectl create -f pod1.yaml ``` - Pod spec with `default-scheduler` {{% code\_sample file="admin/sched/pod2.yaml" %}} A scheduler is specified by supplying the scheduler name as a value to `spec.schedulerName`. In this case, we supply the name of the default scheduler which is `default-scheduler`. Save this file as `pod2.yaml` and submit it to the Kubernetes cluster. ```shell kubectl create -f pod2.yaml ``` - Pod spec with `my-scheduler` {{% code\_sample file="admin/sched/pod3.yaml" %}} In this case, we specify that this pod should be scheduled using the scheduler that we deployed - `my-scheduler`. Note that the value of `spec.schedulerName` should match the name supplied for the scheduler in the `schedulerName` field of the mapping `KubeSchedulerProfile`. Save this file as `pod3.yaml` and submit it to the Kubernetes cluster. ```shell kubectl create -f pod3.yaml ``` Verify that all three pods are running. ```shell kubectl get pods ``` ### Verifying that the pods were scheduled using the desired schedulers In order to make it easier to work through these examples, we did not verify that the pods were actually scheduled using the desired schedulers. We can verify that by changing the order of pod and deployment config submissions above. If we submit all the pod configs to a Kubernetes cluster before submitting the scheduler deployment config, we see that the pod `annotation-second-scheduler` remains in "Pending" state forever while the other two pods get scheduled. Once we submit the scheduler deployment config and our new scheduler starts running, the `annotation-second-scheduler` pod gets scheduled as well. Alternatively, you can look at the "Scheduled" entries in the event logs to verify that the pods were scheduled by the desired schedulers. ```shell kubectl get events ``` You can also use a [custom scheduler configuration](/docs/reference/scheduling/config/#multiple-profiles) or a custom container image for the cluster's main scheduler by modifying its static pod manifest on the relevant control plane nodes.
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-multiple-schedulers.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-multiple-schedulers.md
|
[
-0.0017537424573674798,
-0.06016223505139351,
-0.0028700465336441994,
0.031371451914310455,
-0.06537489593029022,
0.04172699153423309,
-0.03325830027461052,
-0.03687027469277382,
0.0591772198677063,
0.07303408533334732,
-0.0171327106654644,
-0.07181362062692642,
-0.002180642681196332,
-0.03263188526034355,
0.07556504011154175,
0.03166879713535309,
-0.02372036874294281,
-0.023436740040779114,
-0.013037366792559624,
-0.04935368150472641,
0.011812749318778515,
0.010085495188832283,
0.0606655515730381,
0.03210287541151047,
-0.08442658931016922,
-0.05592747777700424,
-0.009952567517757416,
0.040218230336904526,
-0.0002325168316019699,
-0.06756432354450226,
-0.0460173636674881,
-0.0658225566148758,
0.06989049166440964,
0.02912391535937786,
0.06497075408697128,
0.08849451690912247,
-0.0044660926796495914,
-0.08643034845590591,
-0.1105332002043724,
-0.008564192801713943,
0.08501841127872467,
-0.011598031967878342,
-0.08027932792901993,
-0.07411597669124603,
-0.06273749470710754,
-0.0010926158865913749,
-0.06619352102279663,
0.010416965931653976,
0.00955943949520588,
-0.05454473942518234,
0.04334375262260437,
-0.038206715136766434,
0.010158365592360497,
0.004987411201000214,
0.07807198166847229,
0.0706489235162735,
0.03850916773080826,
0.02061432972550392,
0.12877057492733002,
-0.06546288728713989,
0.028824489563703537,
0.023210180923342705,
0.01734303869307041,
-0.045094288885593414,
-0.058854684233665466,
-0.0034404080361127853,
-0.03129449859261513,
0.0017749645048752427,
-0.02433759532868862,
0.021098021417856216,
0.02287852205336094,
-0.07756064832210541,
0.011156548745930195,
0.003004432888701558,
-0.01336584147065878,
0.02036137878894806,
-0.048129864037036896,
0.06797128915786743,
-0.005722609348595142,
-0.06720202416181564,
-0.056606587022542953,
-0.057567350566387177,
-0.005945143289864063,
0.014275772497057915,
-0.05400538444519043,
-0.0172597523778677,
0.004462330602109432,
-0.060030676424503326,
0.07089294493198395,
0.005562022794038057,
0.05512349307537079,
0.03637444227933884,
0.023039599880576134,
-0.0940309539437294,
0.042350608855485916,
0.016481656581163406,
0.0014128800248727202,
0.06680147349834442,
0.012403148226439953,
-0.005326887127012014,
0.038492362946271896,
-0.024421975016593933,
-0.018099037930369377,
0.03520368039608002,
0.03415555879473686,
-0.009443022310733795,
-0.023184163495898247,
-0.05562558397650719,
-0.03867277503013611,
0.007162109017372131,
0.03651779890060425,
0.09398608654737473,
0.01629585586488247,
0.015642965212464333,
-0.023568985983729362,
0.06376442313194275,
-0.013831054791808128,
0.015883073210716248,
0.03850546479225159,
0.06930439919233322,
0.06808549165725708,
-0.10246732831001282,
-0.018206266686320305,
-0.024893637746572495,
-0.026483777910470963,
-0.0013020578771829605,
0.001612114836461842,
2.6859921020014495e-33,
0.005040411837399006,
-0.08701595664024353,
-0.02422400936484337,
-0.03787636011838913,
0.03756702318787575,
-0.0465887188911438,
-0.0612332858145237,
0.004242934752255678,
-0.08040262758731842,
-0.0042455908842384815,
-0.014834539033472538,
-0.017032094299793243,
0.0370752215385437,
-0.05179717764258385,
-0.02562563307583332,
-0.03334498777985573,
0.03000919334590435,
0.017279133200645447,
0.11568129807710648,
-0.028849422931671143,
0.06685951352119446,
-0.04883316904306412,
-0.011386631056666374,
-0.01545486506074667,
-0.01613735780119896,
-0.02003403753042221,
0.037126749753952026,
-0.1663949191570282,
0.017816854640841484,
0.031609829515218735,
-0.0013543872628360987,
0.009202918037772179,
0.005528495647013187,
0.08309688419103622,
-0.1452193260192871,
-0.02191874012351036,
-0.01140439324080944,
0.057290371507406235,
-0.13333068788051605,
-0.048047520220279694,
-0.03431027755141258,
-0.035898033529520035,
-0.02226656675338745,
-0.0860559418797493,
0.07242483645677567,
-0.009180417284369469,
0.10425598174333572,
0.017653604969382286,
0.06776438653469086,
0.08698327839374542,
-0.026985179632902145,
-0.0021559407468885183,
0.0055512054823338985,
-0.044934239238500595,
0.04220349341630936,
0.00001892501131806057,
0.10835810005664825,
-0.012222932651638985,
-0.03153759241104126,
-0.020151851698756218,
-0.043224528431892395,
0.05714036524295807,
-0.00881959404796362,
0.018918901681900024,
0.007677881978452206,
0.003945648670196533,
-0.0118857491761446,
-0.00680577103048563,
0.0062963273376226425,
0.015681272372603416,
-0.026593832299113274,
0.0014733440475538373,
-0.011301493272185326,
0.060457292944192886,
-0.020586438477039337,
-0.05920623615384102,
0.06367645412683487,
0.038859739899635315,
-0.1715712994337082,
0.042282745242118835,
0.0708325207233429,
-0.02413582243025303,
0.004393504001200199,
0.04208206385374069,
0.005402069538831711,
-0.048500094562768936,
0.042092595249414444,
0.10149296373128891,
-0.02424723096191883,
0.08982729911804199,
0.053879015147686005,
-0.07368453592061996,
0.004957304801791906,
0.037802454084157944,
-0.12612424790859222,
-3.637393515860838e-33,
0.09179464727640152,
-0.029730990529060364,
0.031887348741292953,
0.006368635687977076,
0.08342534303665161,
0.032647088170051575,
-0.031223373487591743,
0.001651455881074071,
-0.05330479145050049,
-0.045501988381147385,
-0.029733853414654732,
-0.017296360805630684,
0.04770918935537338,
0.026262009516358376,
0.004977934528142214,
0.0005792582524009049,
-0.012075253762304783,
0.02149398811161518,
-0.09836962819099426,
0.03516657277941704,
-0.03869826719164848,
0.04809350520372391,
0.00024941808078438044,
0.04306688904762268,
0.028889693319797516,
0.00832697656005621,
0.03798574209213257,
0.10003792494535446,
-0.034714117646217346,
0.043226148933172226,
-0.027210328727960587,
-0.11374787241220474,
-0.06451515853404999,
0.050406038761138916,
0.03213314339518547,
-0.05878102034330368,
-0.04144509136676788,
0.03809833899140358,
-0.043957702815532684,
0.05167260766029358,
0.06093570217490196,
0.0037159661296755075,
-0.0768352746963501,
-0.04611289128661156,
-0.04766278341412544,
0.014454632066190243,
0.027276434004306793,
-0.04005034267902374,
-0.09332016110420227,
-0.04327608272433281,
-0.05952532961964607,
-0.012674540281295776,
-0.05071784555912018,
0.04748622700572014,
0.014444909058511257,
0.045332171022892,
0.03335839509963989,
0.04614458605647087,
-0.055566608905792236,
0.04529223591089249,
0.020624307915568352,
-0.07680575549602509,
0.11996708065271378,
0.02426711656153202,
0.04738231748342514,
-0.08120658993721008,
0.014331074431538582,
-0.02507025934755802,
-0.006367427296936512,
0.050785213708877563,
-0.03248230367898941,
0.03370527923107147,
0.0351155586540699,
0.09090985357761383,
-0.03730209544301033,
-0.009996090084314346,
-0.03503686934709549,
-0.02977731265127659,
0.00017129385378211737,
0.036874920129776,
-0.04071871563792229,
0.01664693094789982,
-0.025933166965842247,
-0.0048135253600776196,
0.014049547724425793,
0.07433635741472244,
0.07759848237037659,
0.11505693197250366,
0.047680605202913284,
0.013019434176385403,
0.01564188301563263,
-0.03466630354523659,
-0.01903955638408661,
0.11208374798297882,
-0.008046283386647701,
-4.7687862547718396e-8,
0.04238085821270943,
-0.012621946632862091,
-0.029300112277269363,
0.06256801635026932,
0.06310238689184189,
-0.039510831236839294,
0.009761430323123932,
-0.06125703081488609,
-0.04220292344689369,
0.06520343571901321,
0.047091808170080185,
0.03961388021707535,
-0.03620842099189758,
0.015730397775769234,
-0.005550272297114134,
-0.03125862032175064,
0.009911973960697651,
0.05376622453331947,
0.02626304142177105,
-0.14326880872249603,
-0.035659682005643845,
-0.03507867082953453,
0.009070220403373241,
-0.04101452976465225,
0.034609105437994,
0.047647807747125626,
0.011880933307111263,
0.04205731675028801,
0.06822986155748367,
0.02780466340482235,
-0.0386216975748539,
-0.0452839732170105,
-0.04261133447289467,
0.037373028695583344,
-0.03964122384786606,
-0.012571608647704124,
-0.12707999348640442,
0.06798937916755676,
0.06734579056501389,
0.06310693174600601,
0.03652772679924965,
0.01717480644583702,
-0.10121908038854599,
-0.004305082838982344,
-0.02891826070845127,
0.10180731117725372,
-0.07103340327739716,
0.0657835379242897,
-0.01849396340548992,
0.019063090905547142,
-0.03378800302743912,
-0.03719594329595566,
0.02597140148282051,
0.08237821608781815,
0.04063129797577858,
0.02579588256776333,
0.02607637643814087,
-0.08394430577754974,
0.0355372354388237,
0.0051002237014472485,
-0.07872316241264343,
-0.011742501519620419,
-0.09114822000265121,
-0.04558321088552475
] | 0.094538
|
This page shows how to use an HTTP proxy to access the Kubernetes API. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} If you do not already have an application running in your cluster, start a Hello world application by entering this command: ```shell kubectl create deployment hello-app --image=gcr.io/google-samples/hello-app:2.0 --port=8080 ``` ## Using kubectl to start a proxy server This command starts a proxy to the Kubernetes API server: kubectl proxy --port=8080 ## Exploring the Kubernetes API When the proxy server is running, you can explore the API using `curl`, `wget`, or a browser. Get the API versions: curl http://localhost:8080/api/ The output should look similar to this: { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "10.0.2.15:8443" } ] } Get a list of pods: curl http://localhost:8080/api/v1/namespaces/default/pods The output should look similar to this: { "kind": "PodList", "apiVersion": "v1", "metadata": { "resourceVersion": "33074" }, "items": [ { "metadata": { "name": "kubernetes-bootcamp-2321272333-ix8pt", "generateName": "kubernetes-bootcamp-2321272333-", "namespace": "default", "uid": "ba21457c-6b1d-11e6-85f7-1ef9f1dab92b", "resourceVersion": "33003", "creationTimestamp": "2016-08-25T23:43:30Z", "labels": { "pod-template-hash": "2321272333", "run": "kubernetes-bootcamp" }, ... } ## {{% heading "whatsnext" %}} Learn more about [kubectl proxy](/docs/reference/generated/kubectl/kubectl-commands#proxy).
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/http-proxy-access-api.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/http-proxy-access-api.md
|
[
-0.022723505273461342,
-0.0016149694565683603,
0.046909186989068985,
-0.048492398113012314,
-0.08423078805208206,
-0.014244472607970238,
-0.04559095948934555,
-0.031361810863018036,
0.026809092611074448,
0.0944778323173523,
-0.061873339116573334,
-0.03985930234193802,
-0.0028120579663664103,
-0.041342709213495255,
0.0719231516122818,
0.0060952031053602695,
0.1244773268699646,
-0.03759606182575226,
0.0041579087264835835,
-0.07487558573484421,
-0.004559683613479137,
-0.0062339347787201405,
-0.012676876969635487,
-0.007173907943069935,
-0.07978956401348114,
-0.037957701832056046,
-0.03703862801194191,
-0.029444793239235878,
0.04703821241855621,
0.03876279667019844,
-0.05337460711598396,
-0.06915847957134247,
-0.03127489611506462,
0.033628229051828384,
0.0036641666665673256,
0.06676117330789566,
0.028841424733400345,
0.008136856369674206,
-0.06787984818220139,
0.027193857356905937,
0.07160080224275589,
-0.022806081920862198,
-0.073813796043396,
-0.07334453612565994,
0.03900662064552307,
-0.005549891851842403,
-0.032082393765449524,
-0.035803887993097305,
0.012835651636123657,
-0.051061369478702545,
-0.02111254818737507,
-0.12179074436426163,
0.025171633809804916,
0.02218829281628132,
-0.010697177611291409,
-0.03354574739933014,
-0.06858953088521957,
0.072340227663517,
0.090091772377491,
0.02582385390996933,
-0.019757894799113274,
-0.03677575662732124,
0.03456355631351471,
-0.038668256253004074,
-0.10912559926509857,
0.007201986853033304,
-0.006171028595417738,
0.008996881544589996,
0.06275666505098343,
-0.0793636366724968,
-0.008491616696119308,
0.05001635104417801,
-0.07945078611373901,
-0.07394415140151978,
-0.04660515487194061,
0.01887790486216545,
0.002240977715700865,
0.06531917303800583,
0.04023975878953934,
-0.029986068606376648,
0.03858461230993271,
-0.001741926884278655,
0.024972790852189064,
0.11025459319353104,
-0.11372548341751099,
-0.008648538962006569,
-0.011143360286951065,
-0.04920472949743271,
0.11285808682441711,
-0.0488971546292305,
-0.010507820174098015,
-0.053392037749290466,
-0.04365919902920723,
-0.07895556092262268,
0.047014325857162476,
0.014063973911106586,
-0.02783663384616375,
0.03436432033777237,
-0.004871023818850517,
0.01456150971353054,
0.02993394434452057,
-0.0032099676318466663,
0.02528531476855278,
-0.004751017317175865,
0.003986119758337736,
-0.030906694009900093,
-0.03240559995174408,
0.03526002913713455,
0.06992407888174057,
0.0675121545791626,
-0.05196113511919975,
0.058347512036561966,
0.0015186684904620051,
0.012379752472043037,
-0.031203972175717354,
-0.0028946194797754288,
0.06786399334669113,
-0.0604403018951416,
0.05396557226777077,
0.037328723818063736,
0.06492939591407776,
-0.106781005859375,
0.005266600754112005,
0.04651011526584625,
-0.013755722902715206,
0.030141061171889305,
0.001406738068908453,
3.602371498388011e-33,
0.1337033361196518,
-0.04933767020702362,
0.10936875641345978,
0.00015036472177598625,
0.003987494856119156,
-0.09881485998630524,
0.0042973533272743225,
-0.025678854435682297,
0.003456393489614129,
-0.05226404219865799,
-0.03849467262625694,
0.030482064932584763,
0.006351655349135399,
0.003435112303122878,
-0.036457594484090805,
0.06676651537418365,
-0.08393976837396622,
0.00882713496685028,
0.12330808490514755,
0.029306946322321892,
-0.04518825560808182,
-0.09287718683481216,
0.015567634254693985,
-0.015637457370758057,
-0.035305313766002655,
-0.01957177370786667,
0.008113420568406582,
-0.1026400774717331,
-0.026004744693636894,
0.01859128661453724,
0.05278875306248665,
-0.06694235652685165,
-0.004713848698884249,
-0.016911162063479424,
-0.126230388879776,
-0.03303444758057594,
0.008296223357319832,
0.00888807512819767,
-0.06953472644090652,
0.02792927995324135,
-0.009144785813987255,
-0.019720695912837982,
0.045316316187381744,
-0.09753736108541489,
0.060574837028980255,
-0.04616560786962509,
0.0309972632676363,
-0.10990885645151138,
0.15665510296821594,
0.04604218900203705,
-0.014498883858323097,
-0.05462971329689026,
0.03565775975584984,
-0.049885038286447525,
0.04737802594900131,
0.09000343829393387,
0.10380691289901733,
-0.04898644611239433,
-0.05940849334001541,
-0.030291259288787842,
-0.025235947221517563,
0.001314923050813377,
-0.013850071467459202,
0.030357126146554947,
0.013777000829577446,
-0.0027300717774778605,
-0.05186590552330017,
0.10149461776018143,
-0.03606375306844711,
0.0652136355638504,
-0.033980414271354675,
-0.03255262225866318,
-0.005077688954770565,
0.04262690246105194,
-0.02288927137851715,
0.022152068093419075,
0.04887688159942627,
0.015051830559968948,
-0.039813652634620667,
0.04475338011980057,
0.05977225676178932,
-0.10455120354890823,
-0.0543445348739624,
0.06291520595550537,
-0.037171851843595505,
-0.027844050899147987,
0.03607943654060364,
-0.027850845828652382,
0.033438898622989655,
0.0010803703917190433,
-0.03887287154793739,
-0.01619720086455345,
-0.017167042940855026,
0.04913484305143356,
-0.07903950661420822,
-5.726518075656701e-33,
0.09653076529502869,
0.018047645688056946,
0.01466019544750452,
-0.025056876242160797,
0.05800605192780495,
0.009055586531758308,
0.04439797252416611,
0.07115919888019562,
-0.022658681496977806,
0.02320435456931591,
-0.03930051624774933,
-0.0052799200639128685,
0.06409823149442673,
0.03599114343523979,
-0.08337429910898209,
0.006678787991404533,
-0.010583926923573017,
-0.005704916547983885,
-0.01719243824481964,
0.022789660841226578,
-0.08820589631795883,
-0.03502373769879341,
0.06927116215229034,
-0.02194480039179325,
-0.030305294319987297,
-0.002131607150658965,
0.06349744647741318,
0.025778040289878845,
-0.10156778246164322,
-0.0020932976622134447,
-0.02326398715376854,
-0.0469047911465168,
0.03368690609931946,
0.059382133185863495,
0.008549450896680355,
-0.04217667505145073,
0.008582791313529015,
0.00810074619948864,
0.05102260410785675,
-0.17422543466091156,
-0.0018943343311548233,
-0.06880630552768707,
0.001156704849563539,
-0.05380332097411156,
-0.0007155171479098499,
0.014949805103242397,
0.00039952248334884644,
0.0028017761651426554,
-0.06767425686120987,
-0.04536603018641472,
0.0005152091034688056,
0.05748358368873596,
-0.05044029280543327,
0.07680466026067734,
-0.039323411881923676,
0.06908807158470154,
0.013672168366611004,
0.08865029364824295,
-0.03220115602016449,
0.03884698450565338,
0.023367803543806076,
-0.1441439688205719,
0.022917838767170906,
0.027439415454864502,
-0.014629142358899117,
-0.011054644361138344,
-0.04455000162124634,
0.04409096762537956,
-0.0560845248401165,
0.052533362060785294,
-0.11418942362070084,
0.0016547355335205793,
0.04202669858932495,
0.03019067272543907,
-0.00678062392398715,
0.00019472565327305347,
0.036771152168512344,
-0.013802027329802513,
0.04059422388672829,
0.029001789167523384,
0.034365419298410416,
0.029435977339744568,
-0.06616699695587158,
-0.04848399758338928,
0.06792900711297989,
0.018330750986933708,
0.03849337249994278,
0.07813258469104767,
0.061978403478860855,
-0.004105408675968647,
-0.06724375486373901,
0.05259285122156143,
-0.012492649257183075,
0.046377167105674744,
-0.021730195730924606,
-5.613923548253297e-8,
0.0822693407535553,
0.02552678994834423,
-0.028558554127812386,
0.05923851579427719,
-0.04996904358267784,
0.04452797770500183,
-0.022812720388174057,
-0.05198381096124649,
-0.0770801529288292,
0.027677826583385468,
-0.02715064026415348,
0.05320996046066284,
-0.07659213244915009,
0.05927219241857529,
0.005234885029494762,
-0.03034619241952896,
-0.026366710662841797,
0.026188189163804054,
0.05956438556313515,
-0.013688656501471996,
-0.054867036640644073,
-0.042441826313734055,
0.026022082194685936,
-0.025752898305654526,
0.038889896124601364,
0.044796038419008255,
0.028851620852947235,
-0.036779578775167465,
0.013008346781134605,
-0.0433892160654068,
-0.05470835417509079,
0.013351798988878727,
-0.059147242456674576,
0.02523454651236534,
-0.010497938841581345,
0.03003539703786373,
-0.13656280934810638,
0.057356517761945724,
0.024121325463056564,
0.02266593463718891,
0.042795222252607346,
0.08203835040330887,
-0.026461293920874596,
-0.04055698215961456,
0.04516357555985451,
0.08296442031860352,
0.024152474477887154,
0.04300877824425697,
-0.023059383034706116,
0.06607302278280258,
0.05527711659669876,
-0.07541707903146744,
0.013755840249359608,
0.00791389774531126,
-0.025019660592079163,
0.01616145856678486,
-0.05094773694872856,
-0.07279402017593384,
-0.028032727539539337,
0.008516336791217327,
0.07442905753850937,
0.07784243673086166,
0.009987905621528625,
0.013213547877967358
] | 0.07739
|
The Konnectivity service provides a TCP level proxy for the control plane to cluster communication. ## {{% heading "prerequisites" %}} You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using [minikube](https://minikube.sigs.k8s.io/docs/tutorials/multi\_node/). ## Configure the Konnectivity service The following steps require an egress configuration, for example: {{% code\_sample file="admin/konnectivity/egress-selector-configuration.yaml" %}} You need to configure the API Server to use the Konnectivity service and direct the network traffic to the cluster nodes: 1. Make sure that [Service Account Token Volume Projection](/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection) feature enabled in your cluster. It is enabled by default since Kubernetes v1.20. 1. Create an egress configuration file such as `admin/konnectivity/egress-selector-configuration.yaml`. 1. Set the `--egress-selector-config-file` flag of the API Server to the path of your API Server egress configuration file. 1. If you use UDS connection, add volumes config to the kube-apiserver: ```yaml spec: containers: volumeMounts: - name: konnectivity-uds mountPath: /etc/kubernetes/konnectivity-server readOnly: false volumes: - name: konnectivity-uds hostPath: path: /etc/kubernetes/konnectivity-server type: DirectoryOrCreate ``` Generate or obtain a certificate and kubeconfig for konnectivity-server. For example, you can use the OpenSSL command line tool to issue a X.509 certificate, using the cluster CA certificate `/etc/kubernetes/pki/ca.crt` from a control-plane host. ```bash openssl req -subj "/CN=system:konnectivity-server" -new -newkey rsa:2048 -nodes -out konnectivity.csr -keyout konnectivity.key openssl x509 -req -in konnectivity.csr -CA /etc/kubernetes/pki/ca.crt -CAkey /etc/kubernetes/pki/ca.key -CAcreateserial -out konnectivity.crt -days 375 -sha256 SERVER=$(kubectl config view -o jsonpath='{.clusters..server}') kubectl --kubeconfig /etc/kubernetes/konnectivity-server.conf config set-credentials system:konnectivity-server --client-certificate konnectivity.crt --client-key konnectivity.key --embed-certs=true kubectl --kubeconfig /etc/kubernetes/konnectivity-server.conf config set-cluster kubernetes --server "$SERVER" --certificate-authority /etc/kubernetes/pki/ca.crt --embed-certs=true kubectl --kubeconfig /etc/kubernetes/konnectivity-server.conf config set-context system:konnectivity-server@kubernetes --cluster kubernetes --user system:konnectivity-server kubectl --kubeconfig /etc/kubernetes/konnectivity-server.conf config use-context system:konnectivity-server@kubernetes rm -f konnectivity.crt konnectivity.key konnectivity.csr ``` Next, you need to deploy the Konnectivity server and agents. [kubernetes-sigs/apiserver-network-proxy](https://github.com/kubernetes-sigs/apiserver-network-proxy) is a reference implementation. Deploy the Konnectivity server on your control plane node. The provided `konnectivity-server.yaml` manifest assumes that the Kubernetes components are deployed as a {{< glossary\_tooltip text="static Pod" term\_id="static-pod" >}} in your cluster. If not, you can deploy the Konnectivity server as a DaemonSet. {{% code\_sample file="admin/konnectivity/konnectivity-server.yaml" %}} Then deploy the Konnectivity agents in your cluster: {{% code\_sample file="admin/konnectivity/konnectivity-agent.yaml" %}} Last, if RBAC is enabled in your cluster, create the relevant RBAC rules: {{% code\_sample file="admin/konnectivity/konnectivity-rbac.yaml" %}}
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/setup-konnectivity.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/setup-konnectivity.md
|
[
0.0324779748916626,
-0.012093192897737026,
-0.003805199172347784,
0.0437447614967823,
-0.042106952518224716,
0.04443979635834694,
-0.003339329967275262,
-0.005324022378772497,
0.04151129722595215,
0.09737648069858551,
-0.08765118569135666,
-0.07324931770563126,
-0.013090839609503746,
-0.03247372806072235,
0.07086582481861115,
-0.00358507945202291,
0.08467064797878265,
-0.048697587102651596,
0.02029978297650814,
-0.05975828692317009,
-0.004789629951119423,
-0.03162456303834915,
0.05418575927615166,
-0.00242691021412611,
-0.07376648485660553,
-0.04685891792178154,
0.010517940856516361,
-0.04224127531051636,
-0.008757385425269604,
0.029354874044656754,
-0.021992551162838936,
0.0018450664356350899,
-0.020891331136226654,
-0.0019431774271652102,
-0.021056750789284706,
0.06857747584581375,
0.05623285099864006,
-0.0337303951382637,
-0.051407188177108765,
0.04779380187392235,
0.051811788231134415,
-0.006491546053439379,
-0.10564029961824417,
-0.0502319373190403,
-0.020499955862760544,
-0.02330562099814415,
-0.1323959082365036,
-0.0040634917095303535,
0.012517500668764114,
-0.043220650404691696,
0.013092267327010632,
-0.1207582876086235,
0.08925110846757889,
0.03582815080881119,
0.02157653123140335,
0.01221721712499857,
-0.035681311041116714,
0.07343106716871262,
0.11693993210792542,
-0.022593121975660324,
0.04006761685013771,
-0.028810827061533928,
0.06367344409227371,
-0.020499320700764656,
-0.03144211322069168,
0.005251601804047823,
0.02294028364121914,
0.06797364354133606,
0.027815885841846466,
-0.055439628660678864,
0.02288278192281723,
0.023521505296230316,
-0.021908840164542198,
0.020399631932377815,
0.033212095499038696,
-0.011380358599126339,
0.03715593367815018,
0.06796743720769882,
-0.05593796819448471,
-0.006510025355964899,
0.011348042637109756,
0.06788957864046097,
-0.042052216827869415,
0.009263197891414165,
-0.09640412032604218,
-0.04935525357723236,
-0.04179130494594574,
-0.10421579331159592,
0.026397475972771645,
-0.0014987150207161903,
-0.029525011777877808,
0.03265880420804024,
-0.0255552027374506,
-0.14178909361362457,
0.04386235401034355,
-0.005752994678914547,
-0.06814111024141312,
-0.033653777092695236,
0.015517088584601879,
-0.010069051757454872,
0.07654201984405518,
0.011128379963338375,
-0.036934271454811096,
0.023559657856822014,
0.03613150864839554,
-0.04446082189679146,
-0.01503576897084713,
-0.01690136268734932,
0.0349232517182827,
0.0908590704202652,
-0.023127583786845207,
0.017294028773903847,
0.009006751701235771,
-0.006846909411251545,
-0.004831576254218817,
0.031171735376119614,
0.04300233721733093,
-0.034270573407411575,
0.09018515050411224,
0.050496991723775864,
0.03015471063554287,
-0.1317153126001358,
-0.0027126253116875887,
0.034306108951568604,
0.014095932245254517,
0.01577986218035221,
0.007086652796715498,
3.546083686082855e-33,
0.05924370139837265,
-0.039395544677972794,
0.03753982484340668,
-0.018992366269230843,
0.031092314049601555,
-0.0549091137945652,
-0.012839936651289463,
-0.026955366134643555,
-0.04152008146047592,
-0.09614010900259018,
-0.13001087307929993,
0.005021526012569666,
0.02816624380648136,
-0.08345736563205719,
0.0022790860384702682,
-0.008163951337337494,
-0.07692576199769974,
-0.025970151647925377,
0.10977603495121002,
0.0444699265062809,
-0.022611122578382492,
-0.09439551085233688,
0.002041273983195424,
0.008822227828204632,
0.0009689657599665225,
-0.02258685976266861,
0.02369745634496212,
-0.1167125552892685,
-0.0037282889243215322,
0.02626614086329937,
0.04650862142443657,
-0.014266764745116234,
0.00781596451997757,
0.026494134217500687,
-0.14954900741577148,
-0.06102467328310013,
-0.023542042821645737,
0.022112054750323296,
-0.06025341898202896,
-0.009679787792265415,
-0.014162016101181507,
-0.041121695190668106,
-0.009116055443882942,
-0.03930044174194336,
0.027491869404911995,
0.03699425607919693,
0.045357998460531235,
-0.025531405583024025,
0.10444753617048264,
0.012386278249323368,
-0.03705022856593132,
-0.06849837303161621,
-0.0042522866278886795,
-0.016329487785696983,
0.0610373355448246,
0.026166429743170738,
0.0608125738799572,
-0.046412400901317596,
-0.017668653279542923,
0.0034309402108192444,
-0.06376048177480698,
-0.028611090034246445,
0.011518113315105438,
0.03205207735300064,
0.08187796175479889,
0.04165688157081604,
-0.04353288188576698,
0.05071548372507095,
-0.01713085174560547,
-0.03582863509654999,
-0.0845411866903305,
0.08685708045959473,
-0.02232137694954872,
0.05124271288514137,
-0.02093285135924816,
-0.06496171653270721,
-0.013025440275669098,
-0.035346802324056625,
-0.05074654519557953,
0.09706495702266693,
0.04416292905807495,
-0.021199408918619156,
-0.009732253849506378,
0.06657201051712036,
0.04447066783905029,
-0.09152983129024506,
0.024343719705939293,
0.04978848621249199,
-0.05016930028796196,
0.03278873860836029,
0.005230284295976162,
-0.019192956387996674,
0.015628941357135773,
0.049700379371643066,
-0.05984168127179146,
-4.2798206477104034e-33,
0.07161902636289597,
0.0023402716033160686,
0.0006457213312387466,
0.009921081364154816,
0.044919926673173904,
0.05786266177892685,
0.011740755289793015,
0.03655475750565529,
-0.030282843858003616,
0.03799924999475479,
-0.01823566108942032,
-0.041749052703380585,
0.02413558028638363,
-0.0163912121206522,
-0.056080665439367294,
-0.007429191842675209,
-0.014747961424291134,
-0.015331911854445934,
0.021559754386544228,
0.020634854212403297,
-0.018440959975123405,
-0.07297749072313309,
0.04574839770793915,
-0.030296964570879936,
-0.001470449729822576,
0.004214628599584103,
0.0443812720477581,
0.022534366697072983,
-0.11716995388269424,
0.02425180934369564,
0.011706436984241009,
-0.05355288088321686,
0.003055450739338994,
0.07287590950727463,
-0.0004193182976450771,
-0.029059214517474174,
0.03125174343585968,
0.017283311113715172,
-0.025772472843527794,
-0.10270403325557709,
0.014436701312661171,
-0.010154795832931995,
-0.09463188797235489,
-0.026083702221512794,
0.021357998251914978,
-0.008969826623797417,
-0.02969900704920292,
0.02567104622721672,
-0.10601911693811417,
-0.04182848706841469,
-0.04763554036617279,
0.025903698056936264,
-0.08941542357206345,
0.12718833982944489,
-0.017497781664133072,
0.11217433959245682,
0.050144799053668976,
0.09532908350229263,
-0.00980596523731947,
0.006808329839259386,
0.053464118391275406,
-0.14904330670833588,
0.0643150806427002,
0.05924166366457939,
0.03324684128165245,
-0.03838152438402176,
0.09964268654584885,
0.09580419212579727,
-0.0013902900973334908,
0.03596464917063713,
-0.07449090480804443,
0.015908537432551384,
0.08625829219818115,
0.061902258545160294,
0.026571325957775116,
-0.013741664588451385,
-0.0016103929374366999,
-0.0006229396676644683,
0.021124474704265594,
0.06472951173782349,
-0.012407930567860603,
0.039480242878198624,
-0.02281131222844124,
-0.011627919040620327,
0.11230047792196274,
0.0820390060544014,
0.07347656786441803,
0.09731733053922653,
0.064436174929142,
0.045502081513404846,
-0.028797434642910957,
-0.0030678058974444866,
0.005567846354097128,
0.029096292331814766,
-0.01576078124344349,
-5.293402338679698e-8,
0.05724967643618584,
-0.003322276985272765,
-0.025051841512322426,
0.003959163092076778,
-0.03447214141488075,
0.010330943390727043,
-0.005890733562409878,
-0.07540528476238251,
-0.07547415792942047,
0.001462190062738955,
-0.04051589593291283,
0.08051393181085587,
-0.060334473848342896,
0.04803942143917084,
0.06591739505529404,
-0.06992903351783752,
-0.01111765205860138,
-0.010551469400525093,
0.03518320247530937,
-0.04212368279695511,
-0.01673165149986744,
-0.07751524448394775,
-0.01938241720199585,
0.03446067124605179,
0.035082798451185226,
0.09593084454536438,
0.012230897322297096,
0.018528852611780167,
-0.01879378966987133,
-0.06173036992549896,
-0.07473215460777283,
-0.03596971184015274,
-0.08970151841640472,
0.09454596787691116,
-0.0658058151602745,
0.03892458602786064,
-0.08584950119256973,
0.056346118450164795,
-0.005636001005768776,
0.075818732380867,
-0.006101643200963736,
0.012865379452705383,
-0.05937105417251587,
-0.019786907359957695,
0.05799470096826553,
0.13350588083267212,
-0.012766060419380665,
0.06049465015530586,
0.018230946734547615,
0.006696208380162716,
-0.02860497124493122,
-0.046809930354356766,
-0.008215627633035183,
0.0325276255607605,
-0.022775014862418175,
-0.015330363996326923,
-0.0441589429974556,
-0.07965788245201111,
-0.016880355775356293,
0.008341105654835701,
-0.016699975356459618,
0.10899550467729568,
-0.03514617308974266,
-0.02405964396893978
] | 0.087748
|
{{< feature-state for\_k8s\_version="v1.24" state="stable" >}} This page shows how to use a SOCKS5 proxy to access the API of a remote Kubernetes cluster. This is useful when the cluster you want to access does not expose its API directly on the public internet. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} You need SSH client software (the `ssh` tool), and an SSH service running on the remote server. You must be able to log in to the SSH service on the remote server. ## Task context {{< note >}} This example tunnels traffic using SSH, with the SSH client and server acting as a SOCKS proxy. You can instead use any other kind of [SOCKS5](https://en.wikipedia.org/wiki/SOCKS#SOCKS5) proxies. {{}} Figure 1 represents what you're going to achieve in this task. \* You have a client computer, referred to as local in the steps ahead, from where you're going to create requests to talk to the Kubernetes API. \* The Kubernetes server/API is hosted on a remote server. \* You will use SSH client and server software to create a secure SOCKS5 tunnel between the local and the remote server. The HTTPS traffic between the client and the Kubernetes API will flow over the SOCKS5 tunnel, which is itself tunnelled over SSH. {{< mermaid >}} graph LR; subgraph local[Local client machine] client([client])-. local traffic .-> local\_ssh[Local SSH SOCKS5 proxy]; end local\_ssh[SSH SOCKS5 proxy]-- SSH Tunnel -->sshd subgraph remote[Remote server] sshd[SSH server]-- local traffic -->service1; end client([client])-. proxied HTTPs traffic going through the proxy .->service1[Kubernetes API]; classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000; classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5; class ingress,service1,service2,pod1,pod2,pod3,pod4 k8s; class client plain; class cluster cluster; {{}} Figure 1. SOCKS5 tutorial components ## Using ssh to create a SOCKS5 proxy The following command starts a SOCKS5 proxy between your client machine and the remote SOCKS server: ```shell # The SSH tunnel continues running in the foreground after you run this ssh -D 1080 -q -N username@kubernetes-remote-server.example ``` The SOCKS5 proxy lets you connect to your cluster's API server based on the following configuration: \* `-D 1080`: opens a SOCKS proxy on local port :1080. \* `-q`: quiet mode. Causes most warning and diagnostic messages to be suppressed. \* `-N`: Do not execute a remote command. Useful for just forwarding ports. \* `username@kubernetes-remote-server.example`: the remote SSH server behind which the Kubernetes cluster is running (eg: a bastion host). ## Client configuration To access the Kubernetes API server through the proxy you must instruct `kubectl` to send queries through the `SOCKS` proxy we created earlier. Do this by either setting the appropriate environment variable, or via the `proxy-url` attribute in the kubeconfig file. Using an environment variable: ```shell export HTTPS\_PROXY=socks5://localhost:1080 ``` To always use this setting on a specific `kubectl` context, specify the `proxy-url` attribute in the relevant `cluster` entry within the `~/.kube/config` file. For example: ```yaml apiVersion: v1 clusters: - cluster: certificate-authority-data: LRMEMMW2 # shortened for readability server: https://:6443 # the "Kubernetes API" server, in other words the IP address of kubernetes-remote-server.example proxy-url: socks5://localhost:1080 # the "SSH SOCKS5 proxy" in the diagram above name: default contexts: - context: cluster: default user: default name: default current-context: default kind: Config preferences: {} users: - name: default user: client-certificate-data: LS0tLS1CR== # shortened for readability client-key-data: LS0tLS1CRUdJT= # shortened for readability ``` Once you have created the tunnel via the ssh command mentioned earlier, and defined either the environment variable or the `proxy-url` attribute, you can interact with your cluster through that proxy. For example: ```shell kubectl get pods ``` ```console NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-85cb69466-klwq8 1/1 Running 0 5m46s ``` {{< note >}}
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/socks5-proxy-access-api.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/socks5-proxy-access-api.md
|
[
-0.04995312914252281,
0.01175367459654808,
0.046525318175554276,
0.003158366773277521,
-0.06095302477478981,
0.04338812083005905,
-0.03205401822924614,
-0.02089867927134037,
-0.02991527132689953,
0.08553697913885117,
-0.07668177038431168,
-0.002926850924268365,
0.005978238768875599,
0.026185723021626472,
0.0743548646569252,
0.038841355592012405,
0.07232988625764847,
-0.056002844125032425,
0.010930090211331844,
-0.10361094027757645,
-0.01669207215309143,
-0.06603478640317917,
-0.008883403614163399,
0.03577273711562157,
-0.044556498527526855,
-0.03056865558028221,
0.0014496472431346774,
-0.03699379786849022,
0.012284462340176105,
0.0694008320569992,
-0.07858403772115707,
-0.007197956088930368,
-0.1265346109867096,
0.03442844748497009,
-0.003314570290967822,
0.09605816751718521,
0.03230169415473938,
-0.008245797827839851,
-0.07903933525085449,
0.054059769958257675,
0.08528819680213928,
-0.04746577888727188,
-0.06848673522472382,
-0.060284461826086044,
0.013439737260341644,
-0.001714462647214532,
-0.030157264322042465,
-0.016575872898101807,
0.026059819385409355,
-0.04188745468854904,
-0.07549480348825455,
-0.0677625983953476,
0.08226315677165985,
0.06612646579742432,
0.017270108684897423,
-0.06279357522726059,
-0.024297142401337624,
0.005399850197136402,
0.053708214312791824,
0.002639387035742402,
0.04889864847064018,
-0.05178520828485489,
0.03269419074058533,
-0.03304516151547432,
-0.07449184358119965,
-0.0005340580828487873,
-0.025871993973851204,
0.0593147836625576,
0.028434734791517258,
-0.007155143190175295,
-0.023508453741669655,
-0.010630091652274132,
-0.0024053649976849556,
-0.0034764164593070745,
-0.013942724093794823,
-0.03646138310432434,
0.006691071204841137,
0.014277518726885319,
0.023924658074975014,
-0.04836412891745567,
-0.035848475992679596,
-0.013927005231380463,
-0.032975662499666214,
0.055819012224674225,
-0.07071568816900253,
-0.010598490945994854,
-0.009065325371921062,
-0.08001329749822617,
0.11950979381799698,
-0.026416175067424774,
-0.009082174859941006,
-0.07704182714223862,
-0.015795305371284485,
-0.11470597237348557,
0.0742407962679863,
0.026430193334817886,
-0.02694328874349594,
0.023383544757962227,
-0.011720557697117329,
0.02014649286866188,
-0.007164910435676575,
-0.013309926725924015,
0.025535212829709053,
-0.0008550013299100101,
0.031188899651169777,
-0.007260223384946585,
-0.007195884827524424,
0.03334079682826996,
0.04409078136086464,
0.07937812060117722,
-0.05125859007239342,
0.04550210013985634,
-0.007702522445470095,
0.030034728348255157,
-0.007268001791089773,
-0.002151793334633112,
0.07218506932258606,
0.004121346399188042,
0.06427017599344254,
0.10325417667627335,
0.0813477486371994,
-0.049546364694833755,
0.0007924140081740916,
0.07550614327192307,
0.005737506318837404,
-0.018270175904035568,
-0.02310166135430336,
2.309972581337516e-33,
0.10814709216356277,
-0.023972421884536743,
0.05380875617265701,
-0.0063866074196994305,
0.04914577677845955,
-0.06308101117610931,
0.02714545652270317,
-0.04880392923951149,
-0.05956801399588585,
0.02829267829656601,
-0.08530312031507492,
0.08184061199426651,
0.07331862300634384,
-0.046765174716711044,
-0.01909475028514862,
0.007444087415933609,
-0.04005645588040352,
0.0319804772734642,
0.15991096198558807,
0.010720081627368927,
-0.0137829864397645,
-0.09085783362388611,
0.017876403406262398,
-0.041600894182920456,
-0.011863814666867256,
-0.031063782051205635,
0.03940248116850853,
-0.057286202907562256,
-0.007381771225482225,
0.014503039419651031,
0.021727602928876877,
-0.03154183179140091,
0.0041127800941467285,
-0.00564340315759182,
-0.15171164274215698,
-0.05614462122321129,
0.0023501834366470575,
-0.02685249224305153,
-0.025398310273885727,
-0.018082529306411743,
0.10105445235967636,
-0.03458842262625694,
0.05140383914113045,
-0.05228490009903908,
-0.03193574398756027,
-0.024103272706270218,
0.028743132948875427,
-0.04022485762834549,
0.14005544781684875,
0.01695047877728939,
-0.006201086565852165,
-0.02316446043550968,
0.024758202955126762,
-0.060269683599472046,
0.08331222087144852,
0.018151823431253433,
0.08283049613237381,
0.022853916510939598,
-0.01927482895553112,
-0.02845935896039009,
-0.04016639664769173,
-0.033321090042591095,
-0.011257180944085121,
-0.024458732455968857,
0.06618360430002213,
-0.039327651262283325,
-0.0238779466599226,
0.11974810063838959,
-0.016529912129044533,
-0.04276617243885994,
-0.0557527020573616,
0.0002788372221402824,
-0.01092101912945509,
0.047911133617162704,
0.0026220318395644426,
-0.035628221929073334,
0.019244421273469925,
0.03794906288385391,
-0.016902871429920197,
0.021837705746293068,
-0.006915160920470953,
-0.088133305311203,
-0.091121144592762,
0.07666493952274323,
-0.049772802740335464,
0.04866938292980194,
0.024198267608880997,
-0.016542116180062294,
-0.02009171061217785,
-0.030293095856904984,
-0.03436591103672981,
-0.05660581216216087,
0.00392092065885663,
0.03248851001262665,
-0.09467999637126923,
-3.998391871760193e-33,
0.05819074437022209,
0.0014030670281499624,
0.003442819230258465,
-0.042120739817619324,
0.08583198487758636,
-0.004206751938909292,
0.07446584850549698,
0.006222227588295937,
-0.06218135729432106,
0.0077374777756631374,
-0.028003230690956116,
-0.038541194051504135,
0.03285151720046997,
0.023343099281191826,
-0.05245445296168327,
0.06186476722359657,
-0.02807745337486267,
0.0452147014439106,
0.02009248547255993,
-0.007873022928833961,
-0.06576643884181976,
-0.01765144057571888,
-0.005133586470037699,
0.03492261469364166,
0.03111864998936653,
0.02987988479435444,
0.07351068407297134,
0.05211267247796059,
-0.09575776010751724,
0.009933027438819408,
0.018987171351909637,
-0.09287361055612564,
-0.05925282463431358,
0.020507635548710823,
0.008364998735487461,
-0.015609368681907654,
-0.028723357245326042,
0.008150833658874035,
0.014854912646114826,
-0.10726916044950485,
0.09212192893028259,
-0.04648587852716446,
-0.03918568044900894,
0.009112268686294556,
-0.03928648680448532,
0.03307320550084114,
-0.014832334592938423,
0.04857167601585388,
-0.06694329530000687,
-0.057940345257520676,
-0.0008367049158550799,
0.012887424789369106,
-0.07535445690155029,
0.02167530357837677,
-0.10266704857349396,
0.06781452149152756,
-0.03688138723373413,
0.07500174641609192,
0.009208885952830315,
0.020941147580742836,
0.05395704507827759,
-0.16101424396038055,
0.08274427056312561,
0.026718903332948685,
-0.013357236981391907,
-0.07570189982652664,
-0.07644429057836533,
0.02277279458940029,
-0.005040190648287535,
0.034294456243515015,
-0.125311017036438,
0.02189270406961441,
0.06357497721910477,
0.02128446102142334,
0.008612616918981075,
-0.008933685719966888,
0.05206849053502083,
0.050303779542446136,
0.06286095082759857,
0.027286304160952568,
-0.006382010877132416,
0.008990488015115261,
-0.11332967877388,
-0.034077730029821396,
0.09764336049556732,
0.05091514810919762,
0.08292283117771149,
0.15230205655097961,
0.09519539773464203,
-0.009678914211690426,
-0.025330347940325737,
0.02161281555891037,
-0.03655363991856575,
0.0839402824640274,
0.03150707855820656,
-5.425345506182566e-8,
0.10740924626588821,
-0.0031324224546551704,
-0.0007042806246317923,
0.03690504655241966,
-0.047971490770578384,
0.07227763533592224,
-0.07059825211763382,
-0.05223953723907471,
-0.05842919647693634,
0.0033034449443221092,
-0.032374244183301926,
0.0327480174601078,
0.003063806565478444,
0.05609139800071716,
-0.01519868616014719,
-0.027436237782239914,
0.005470979958772659,
0.08957251906394958,
0.026977108791470528,
0.007006919011473656,
-0.004704824648797512,
-0.07662838697433472,
0.021045267581939697,
0.03141168877482414,
0.014585152268409729,
0.07296164333820343,
-0.002669242676347494,
-0.02739744819700718,
-0.023597700521349907,
-0.0238146111369133,
-0.020336385816335678,
0.011876988224685192,
-0.0663604810833931,
0.07471160590648651,
0.00018239393830299377,
0.044802676886320114,
-0.11639712750911713,
0.03382512181997299,
-0.0037965658120810986,
0.0848250687122345,
-0.00822625495493412,
0.027690403163433075,
-0.1016615629196167,
-0.009883541613817215,
-0.007200783118605614,
0.033404577523469925,
-0.040002256631851196,
0.03631630167365074,
-0.022877946496009827,
0.02070537954568863,
-0.012703671120107174,
-0.04521893709897995,
-0.018619777634739876,
0.06454549729824066,
0.02997162938117981,
-0.04275387525558472,
-0.04477768391370773,
-0.08356616646051407,
-0.0023491177707910538,
0.023903140798211098,
0.04723884537816048,
0.05478820577263832,
-0.03539510443806648,
-0.03162124380469322
] | 0.120915
|
tunnel via the ssh command mentioned earlier, and defined either the environment variable or the `proxy-url` attribute, you can interact with your cluster through that proxy. For example: ```shell kubectl get pods ``` ```console NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-85cb69466-klwq8 1/1 Running 0 5m46s ``` {{< note >}} - Before `kubectl` 1.24, most `kubectl` commands worked when using a socks proxy, except `kubectl exec`. - `kubectl` supports both `HTTPS\_PROXY` and `https\_proxy` environment variables. These are used by other programs that support SOCKS, such as `curl`. Therefore in some cases it will be better to define the environment variable on the command line: ```shell HTTPS\_PROXY=socks5://localhost:1080 kubectl get pods ``` - When using `proxy-url`, the proxy is used only for the relevant `kubectl` context, whereas the environment variable will affect all contexts. - The k8s API server hostname can be further protected from DNS leakage by using the `socks5h` protocol name instead of the more commonly known `socks5` protocol shown above. In this case, `kubectl` will ask the proxy server (such as an ssh bastion) to resolve the k8s API server domain name, instead of resolving it on the system running `kubectl`. Note also that with `socks5h`, a k8s API server URL like `https://localhost:6443/api` does not refer to your local client computer. Instead, it refers to `localhost` as known on the proxy server (eg the ssh bastion). {{}} ## Clean up Stop the ssh port-forwarding process by pressing `CTRL+C` on the terminal where it is running. Type `unset https\_proxy` in a terminal to stop forwarding http traffic through the proxy. ## Further reading \* [OpenSSH remote login client](https://man.openbsd.org/ssh)
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/socks5-proxy-access-api.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/socks5-proxy-access-api.md
|
[
0.010596898384392262,
-0.029867591336369514,
0.01809130609035492,
0.003942126873880625,
-0.08287917822599411,
0.034996602684259415,
-0.07270929217338562,
-0.02419082447886467,
0.04053895175457001,
0.05333545804023743,
-0.058720313012599945,
-0.06350681185722351,
-0.014386328868567944,
-0.01847083680331707,
0.07673126459121704,
0.006911430507898331,
0.06941025704145432,
0.027675895020365715,
0.0036648642271757126,
-0.07169631868600845,
-0.03337088227272034,
-0.04703596606850624,
0.018730763345956802,
-0.0159318707883358,
-0.1127876564860344,
-0.030823541805148125,
-0.03886779770255089,
-0.017414748668670654,
0.014538856223225594,
0.004388562403619289,
-0.07860412448644638,
0.027579916641116142,
-0.050144802778959274,
0.036661457270383835,
-0.023971758782863617,
0.0959499254822731,
0.04695909470319748,
0.02558916062116623,
-0.0942954495549202,
0.03645401820540428,
0.08941543847322464,
-0.07207677513360977,
-0.05820995941758156,
-0.05150973051786423,
-0.008360489271581173,
0.010713382624089718,
-0.011542249470949173,
-0.011574042029678822,
0.008650255389511585,
-0.0694960281252861,
-0.01932753063738346,
0.0023051672615110874,
0.06550516188144684,
0.08054499328136444,
0.025442976504564285,
-0.006537170149385929,
-0.018297802656888962,
0.0657818466424942,
0.14298270642757416,
0.05872945114970207,
0.004968125838786364,
0.026251520961523056,
0.018325112760066986,
0.006997110787779093,
-0.0585537813603878,
-0.07476922869682312,
-0.011514099314808846,
0.04384646937251091,
0.013714363798499107,
-0.00777378911152482,
0.031365301460027695,
-0.015787726268172264,
0.010517566464841366,
-0.055204521864652634,
-0.037458837032318115,
-0.0016847748775035143,
-0.008334491401910782,
0.0016853994457051158,
-0.017522437497973442,
-0.020398305729031563,
-0.012329366989433765,
0.009005265310406685,
-0.025499729439616203,
0.013647492974996567,
-0.08358857035636902,
0.014633996412158012,
0.026178639382123947,
-0.10380123555660248,
0.08851931989192963,
0.030808011069893837,
-0.005091154482215643,
-0.027667511254549026,
-0.02649327553808689,
-0.08310160040855408,
0.10214117169380188,
-0.014501054771244526,
0.009051285684108734,
0.01582047902047634,
0.005564908497035503,
-0.04910444840788841,
0.04196058213710785,
0.011426939629018307,
-0.010620815679430962,
0.011878437362611294,
-0.007442757952958345,
-0.023389898240566254,
-0.03932345658540726,
0.017705455422401428,
0.0517035573720932,
0.10850702971220016,
-0.010749648325145245,
-0.006250395905226469,
-0.012833795510232449,
0.007690125145018101,
-0.04706738889217377,
0.006245345342904329,
0.07089672982692719,
-0.040257252752780914,
0.032210610806941986,
0.06564392149448395,
0.04405463859438896,
-0.07683864235877991,
0.03304927423596382,
0.07974984496831894,
-0.04671889916062355,
0.020687993615865707,
0.027954095974564552,
3.2924406578502066e-33,
0.11277833580970764,
-0.11347481608390808,
0.029835615307092667,
-0.014857630245387554,
0.029658038169145584,
-0.004044887609779835,
-0.008084176108241081,
-0.010268114507198334,
-0.013252222910523415,
-0.004427922423928976,
-0.07841694355010986,
0.0401359461247921,
-0.030352655798196793,
-0.0128847137093544,
-0.001327902777120471,
0.08171405643224716,
-0.07934959977865219,
0.009388754144310951,
0.0979563295841217,
0.011320976540446281,
0.026628250256180763,
-0.08618219941854477,
-0.007327541708946228,
0.01359889842569828,
-0.05171256884932518,
-0.05581488087773323,
0.06031521409749985,
-0.10971233993768692,
-0.03353540226817131,
0.015490780584514141,
0.021581968292593956,
-0.06323962658643723,
0.028049228712916374,
-0.015568362548947334,
-0.10212672501802444,
-0.005740208085626364,
0.035206377506256104,
0.025476418435573578,
-0.10604241490364075,
-0.02343570627272129,
0.04706385359168053,
-0.01466248370707035,
0.08071428537368774,
-0.08317311108112335,
0.04604189842939377,
-0.035510290414094925,
0.046352509409189224,
-0.0800669863820076,
0.08062069863080978,
0.02229033038020134,
-0.024301933124661446,
-0.03368062898516655,
0.06773913651704788,
-0.09536922723054886,
0.10253879427909851,
0.06584613025188446,
0.045418716967105865,
-0.011331390589475632,
-0.08853839337825775,
-0.008328556083142757,
-0.08555688709020615,
0.027194106951355934,
-0.013376195915043354,
0.004449968226253986,
0.07735040783882141,
0.05369007959961891,
0.02265985682606697,
0.09547052532434464,
-0.019488388672471046,
0.04680227115750313,
-0.05786365270614624,
0.009912841022014618,
0.0088434349745512,
0.06918761134147644,
0.018514879047870636,
-0.01772129163146019,
0.006518184207379818,
0.031909435987472534,
-0.019102146849036217,
0.005582152400165796,
0.04768349602818489,
-0.047957371920347214,
-0.071767657995224,
0.084676593542099,
-0.010055886581540108,
0.06812048703432083,
0.004499573726207018,
0.010399355553090572,
-0.02789749763906002,
-0.004070062655955553,
0.01043935026973486,
-0.003018787130713463,
0.015975186601281166,
0.03739025443792343,
-0.16064351797103882,
-5.9825965812474593e-33,
0.046237293630838394,
-0.014797625131905079,
0.028194736689329147,
-0.0030024393927305937,
0.01781139150261879,
0.0003217777702957392,
0.04913792759180069,
0.0409780889749527,
-0.020904889330267906,
0.010590717196464539,
-0.04621444270014763,
-0.01298754382878542,
0.06999732553958893,
-0.0037169859278947115,
-0.10720133036375046,
0.04307873547077179,
-0.03556901961565018,
-0.02629178762435913,
-0.018693121150135994,
0.003043637378141284,
-0.09837593138217926,
-0.03362959250807762,
0.03867558017373085,
0.0437825471162796,
-0.03969830274581909,
0.004725789185613394,
0.06201110780239105,
0.011273464187979698,
-0.10943449288606644,
-0.01333542913198471,
0.047006648033857346,
-0.054159242659807205,
-0.0782885029911995,
0.09680026024580002,
-0.04183254763484001,
-0.057819757610559464,
-0.04999731108546257,
0.004144258331507444,
0.03194885328412056,
-0.12210601568222046,
0.010828119702637196,
0.006563766393810511,
-0.06039503216743469,
-0.0007973626488819718,
-0.00032346739317290485,
0.0009136968874372542,
-0.04717236012220383,
-0.012067184783518314,
-0.02618463896214962,
-0.03550363704562187,
0.0009117277804762125,
0.050602443516254425,
-0.060412149876356125,
0.08296961337327957,
-0.04736723378300667,
0.043307770043611526,
-0.10121456533670425,
0.10514026135206223,
-0.07821260392665863,
0.028305405750870705,
0.04686228185892105,
-0.11058573424816132,
0.015665439888834953,
0.04959515854716301,
-0.03502139821648598,
-0.04331795498728752,
-0.0605708546936512,
0.017227299511432648,
-0.024634795263409615,
0.012076804414391518,
-0.009746442548930645,
0.0006327252485789359,
0.027154723182320595,
0.02284708246588707,
0.004997616168111563,
-0.030713936313986778,
0.07915862649679184,
0.002354024676606059,
0.049209751188755035,
0.09496147930622101,
0.00664076954126358,
0.06169513612985611,
-0.11737177520990372,
-0.05424566566944122,
0.07248692214488983,
0.0747150406241417,
0.02697679027915001,
0.10981520265340805,
0.11268134415149689,
0.012392383068799973,
-0.01745268702507019,
0.009783928282558918,
-0.0978994369506836,
0.023140013217926025,
0.011721433140337467,
-5.052343965417094e-8,
0.14573349058628082,
-0.003737982362508774,
-0.0008350047864951193,
0.022381030023097992,
-0.026846423745155334,
0.04465779289603233,
-0.04752456396818161,
-0.04775775596499443,
-0.07732874900102615,
0.03612585365772247,
-0.02395152486860752,
0.06539692729711533,
-0.05206913873553276,
0.08152173459529877,
0.02878532186150551,
-0.017292503267526627,
0.029355056583881378,
0.03116513602435589,
0.038693975657224655,
-0.0491509847342968,
-0.04436289891600609,
-0.08083556592464447,
-0.02929016947746277,
0.08382818847894669,
-0.004344673827290535,
0.03310057148337364,
0.03739657998085022,
-0.05027398094534874,
-0.03954380005598068,
-0.00875310692936182,
-0.04157029837369919,
-0.020150043070316315,
-0.07246602326631546,
0.04694444686174393,
-0.027519743889570236,
0.032009001821279526,
-0.1374576836824417,
0.04097628965973854,
-0.011521969921886921,
0.09704113006591797,
0.00011082788842031732,
0.03432408347725868,
-0.014158425852656364,
-0.017216231673955917,
-0.047644052654504776,
0.03847869113087654,
-0.0027123382315039635,
0.07931116223335266,
-0.0389438197016716,
0.019319411367177963,
0.00398179329931736,
-0.08336805552244186,
-0.008503883145749569,
0.0028119452763348818,
0.014050710946321487,
-0.00833223294466734,
-0.06930325925350189,
-0.07199889421463013,
-0.022341938689351082,
0.021992288529872894,
-0.0037102538626641035,
0.005753183737397194,
-0.04969856142997742,
-0.016442613676190376
] | 0.090652
|
Configuring the [aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) allows the Kubernetes apiserver to be extended with additional APIs, which are not part of the core Kubernetes APIs. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} {{< note >}} There are a few setup requirements for getting the aggregation layer working in your environment to support mutual TLS auth between the proxy and extension apiservers. Kubernetes and the kube-apiserver have multiple CAs, so make sure that the proxy is signed by the aggregation layer CA and not by something else, like the Kubernetes general CA. {{< /note >}} {{< caution >}} Reusing the same CA for different client types can negatively impact the cluster's ability to function. For more information, see [CA Reusage and Conflicts](#ca-reusage-and-conflicts). {{< /caution >}} ## Authentication Flow Unlike Custom Resource Definitions (CRDs), the Aggregation API involves another server - your Extension apiserver - in addition to the standard Kubernetes apiserver. The Kubernetes apiserver will need to communicate with your extension apiserver, and your extension apiserver will need to communicate with the Kubernetes apiserver. In order for this communication to be secured, the Kubernetes apiserver uses x509 certificates to authenticate itself to the extension apiserver. This section describes how the authentication and authorization flows work, and how to configure them. The high-level flow is as follows: 1. Kubernetes apiserver: authenticate the requesting user and authorize their rights to the requested API path. 2. Kubernetes apiserver: proxy the request to the extension apiserver 3. Extension apiserver: authenticate the request from the Kubernetes apiserver 4. Extension apiserver: authorize the request from the original user 5. Extension apiserver: execute The rest of this section describes these steps in detail. The flow can be seen in the following diagram.  The source for the above swimlanes can be found in the source of this document. ### Kubernetes Apiserver Authentication and Authorization A request to an API path that is served by an extension apiserver begins the same way as all API requests: communication to the Kubernetes apiserver. This path already has been registered with the Kubernetes apiserver by the extension apiserver. The user communicates with the Kubernetes apiserver, requesting access to the path. The Kubernetes apiserver uses standard authentication and authorization configured with the Kubernetes apiserver to authenticate the user and authorize access to the specific path. For an overview of authenticating to a Kubernetes cluster, see ["Authenticating to a Cluster"](/docs/reference/access-authn-authz/authentication/). For an overview of authorization of access to Kubernetes cluster resources, see ["Authorization Overview"](/docs/reference/access-authn-authz/authorization/). Everything to this point has been standard Kubernetes API requests, authentication and authorization. The Kubernetes apiserver now is prepared to send the request to the extension apiserver. ### Kubernetes Apiserver Proxies the Request The Kubernetes apiserver now will send, or proxy, the request to the extension apiserver that registered to handle the request. In order to do so, it needs to know several things: 1. How should the Kubernetes apiserver authenticate to the extension apiserver, informing the extension apiserver that the request, which comes over the network, is coming from a valid Kubernetes apiserver? 2. How should the Kubernetes apiserver inform the extension apiserver of the username and group for which the original request was authenticated? In order to provide for these two, you must configure the Kubernetes apiserver using several flags. #### Kubernetes Apiserver Client Authentication The Kubernetes apiserver connects to the extension apiserver over TLS, authenticating itself using a client certificate. You must provide the following to the Kubernetes apiserver upon startup, using the provided flags: \* private key file via `--proxy-client-key-file` \* signed client certificate file via `--proxy-client-cert-file` \* certificate of the
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
[
-0.047146838158369064,
0.02346218004822731,
0.09877224266529083,
-0.012505983002483845,
-0.08141003549098969,
-0.0015927717322483659,
-0.017650945112109184,
-0.027665408328175545,
0.10056431591510773,
0.016029851511120796,
-0.07889030128717422,
-0.05391860753297806,
0.06526175886392593,
0.05166833475232124,
0.03628077358007431,
0.015448667109012604,
0.06081421673297882,
0.004923543892800808,
-0.018459860235452652,
-0.11769343912601471,
-0.032582033425569534,
-0.09168227761983871,
-0.03284594044089317,
0.020373689010739326,
-0.0383940152823925,
-0.0757724866271019,
-0.09151743352413177,
-0.021737288683652878,
0.01010835450142622,
0.04682869836688042,
-0.049129828810691833,
-0.00885988399386406,
-0.054971493780612946,
0.03187773749232292,
-0.02037237212061882,
0.046904053539037704,
0.0026271813549101353,
0.024656224995851517,
-0.0652085393667221,
-0.000594734272453934,
0.059650544077157974,
-0.027421291917562485,
-0.06810485571622849,
-0.03234636038541794,
-0.021251926198601723,
-0.026082675904035568,
0.012288602069020271,
-0.08073108643293381,
-0.040968310087919235,
0.0037921867333352566,
0.06517387181520462,
-0.043574653565883636,
0.002332088304683566,
0.03495685011148453,
-0.009054765105247498,
0.026968827471137047,
-0.07901398092508316,
0.06442748010158539,
0.06279964745044708,
0.006267178803682327,
-0.034130603075027466,
-0.06599833816289902,
0.004689401481300592,
-0.009951094165444374,
-0.06159365549683571,
0.03543175384402275,
-0.00007053502486087382,
0.07376830279827118,
-0.01760210283100605,
0.02773880586028099,
0.0519988052546978,
0.008455055765807629,
-0.01434276532381773,
-0.04109693318605423,
0.04298790916800499,
0.08159628510475159,
-0.06596828997135162,
0.013792221434414387,
0.042556919157505035,
-0.08459105342626572,
-0.008578619919717312,
0.026447955518960953,
-0.011125373654067516,
0.022815490141510963,
-0.029114272445440292,
-0.01460170280188322,
-0.021491698920726776,
-0.11972122639417648,
0.017512192949652672,
-0.016541024670004845,
0.06056877598166466,
-0.049347780644893646,
-0.005602166056632996,
-0.079193115234375,
0.12310365587472916,
0.004144561477005482,
-0.05812494456768036,
-0.06315979361534119,
0.034851402044296265,
-0.005129075609147549,
-0.011577781289815903,
-0.020786449313163757,
0.02652878500521183,
-0.011593992821872234,
0.002565863775089383,
0.018003441393375397,
-0.03377316892147064,
0.0030905550811439753,
0.035010721534490585,
0.10102025419473648,
0.005179836414754391,
0.043263573199510574,
0.037700384855270386,
0.004620262887328863,
-0.010181923396885395,
0.07538682222366333,
0.09364312887191772,
-0.03331312909722328,
0.07711514085531235,
-0.03316750004887581,
-0.02191837504506111,
-0.08258362114429474,
0.00591622618958354,
0.02095942199230194,
0.09971964359283447,
0.051146090030670166,
0.004804224241524935,
4.810004599445749e-33,
0.05609545856714249,
-0.030705653131008148,
0.07136699557304382,
0.007620603311806917,
0.007510131690651178,
-0.030236346647143364,
0.07456093281507492,
-0.04559582099318504,
-0.08697043359279633,
-0.03772580996155739,
-0.063188336789608,
0.11095858365297318,
-0.02323407307267189,
-0.06463976204395294,
0.014657039195299149,
0.043692976236343384,
-0.039110779762268066,
0.0029567840974777937,
0.11099547147750854,
0.019169317558407784,
0.018490973860025406,
-0.039905354380607605,
0.008024284616112709,
0.04950800910592079,
-0.043913111090660095,
-0.015412452630698681,
0.0199404526501894,
-0.03570730984210968,
-0.02357199788093567,
0.034727100282907486,
-0.03147192299365997,
-0.022647619247436523,
0.04551682248711586,
0.009435651823878288,
-0.13084186613559723,
0.036346741020679474,
0.055808983743190765,
0.05644107237458229,
-0.05882205814123154,
-0.08213452249765396,
0.03610692918300629,
0.011308643966913223,
0.07498008012771606,
-0.09206969290971756,
0.014978892169892788,
-0.005853419657796621,
0.05097053572535515,
-0.029518792405724525,
0.09691644459962845,
0.019459903240203857,
-0.021944276988506317,
-0.06855868548154831,
0.040639884769916534,
-0.07305685430765152,
0.10110937803983688,
0.010319286026060581,
0.08291555941104889,
0.029838459566235542,
-0.07983548939228058,
-0.016445046290755272,
-0.0672328993678093,
-0.0732501819729805,
-0.06834618747234344,
0.003100360743701458,
0.08093266189098358,
0.04952660948038101,
-0.003580995136871934,
0.1275215446949005,
-0.016796285286545753,
-0.05392979830503464,
-0.012829644605517387,
0.060497451573610306,
-0.030264675617218018,
0.0376068577170372,
0.0029338516760617495,
-0.07824856042861938,
0.04833002761006355,
0.04935067147016525,
0.010707514360547066,
0.03688153252005577,
0.038561347872018814,
-0.054765406996011734,
0.028868993744254112,
0.09108468890190125,
-0.051579076796770096,
0.03145771846175194,
0.029083076864480972,
0.03279692679643631,
-0.015593517571687698,
0.016802947968244553,
0.02120143547654152,
-0.007360539399087429,
0.05116594582796097,
0.1093725711107254,
-0.09562475979328156,
-4.9531269141301166e-33,
0.04640933871269226,
0.0006401680875569582,
0.038196489214897156,
-0.02946879155933857,
0.09478022158145905,
0.033120978623628616,
0.005065457429736853,
0.03579601272940636,
0.019172364845871925,
-0.06009504944086075,
-0.05059429258108139,
-0.0737362951040268,
0.036901235580444336,
-0.015860028564929962,
-0.06676216423511505,
-0.04891424998641014,
-0.07927019149065018,
0.0020946164149791002,
0.022534089162945747,
-0.001646313932724297,
-0.04663604125380516,
-0.01097275223582983,
0.05834592878818512,
0.060270484536886215,
0.08564569801092148,
0.03746149688959122,
-0.047128088772296906,
0.06316092610359192,
0.013011780567467213,
0.039364174008369446,
0.02275083027780056,
-0.1058705598115921,
0.03591860085725784,
-0.021924827247858047,
0.01994779147207737,
-0.10147131979465485,
-0.025794414803385735,
0.043863695114851,
-0.010615852661430836,
-0.07418672740459442,
0.011548832058906555,
-0.08018645644187927,
-0.010737530887126923,
-0.039457645267248154,
0.040008895099163055,
0.025810332968831062,
0.049414973706007004,
-0.02866313047707081,
-0.06696552038192749,
-0.07290585339069366,
-0.021814793348312378,
0.010105140507221222,
-0.04144355654716492,
0.07915080338716507,
-0.06704746186733246,
0.0537547767162323,
0.08731269836425781,
0.08854357153177261,
-0.031178638339042664,
-0.029908232390880585,
0.055489275604486465,
-0.08272143453359604,
0.010470668785274029,
0.02533825673162937,
0.011933804489672184,
-0.015561829321086407,
-0.035310227423906326,
0.007008081302046776,
-0.042764127254486084,
0.05414407327771187,
-0.061232320964336395,
-0.05250796675682068,
-0.0027630715630948544,
-0.029926683753728867,
0.049225110560655594,
-0.05680709704756737,
0.042387887835502625,
-0.004372444469481707,
0.03996812552213669,
0.04440624639391899,
-0.06703360378742218,
-0.001037059468217194,
-0.04498094692826271,
0.025715358555316925,
0.07012246549129486,
0.03488459810614586,
0.09386873990297318,
0.08991174399852753,
0.055982474237680435,
0.09563466161489487,
-0.06347687542438507,
0.03899979963898659,
-0.04221305251121521,
0.06579024344682693,
0.02005944214761257,
-5.851742201912202e-8,
0.041141949594020844,
0.06105677783489227,
-0.12414292991161346,
0.02023296430706978,
-0.032367754727602005,
0.021120183169841766,
-0.043438199907541275,
0.0060292999260127544,
-0.056319888681173325,
0.04148217290639877,
-0.0200587697327137,
0.027614785358309746,
-0.060637589544057846,
0.026813775300979614,
-0.0098777050152421,
-0.04616691917181015,
-0.021162111312150955,
-0.010119213722646236,
-0.007238340098410845,
-0.09901681542396545,
-0.0849137008190155,
-0.046597424894571304,
-0.015721295028924942,
-0.06186680495738983,
-0.05965666472911835,
0.0766846090555191,
0.015646185725927353,
-0.014603975228965282,
0.03397839516401291,
0.02942141331732273,
-0.11589830368757248,
-0.030358748510479927,
-0.05856326222419739,
0.029264118522405624,
-0.02866031415760517,
0.0625971332192421,
-0.09451647847890854,
0.02544889971613884,
-0.00031389817013405263,
0.07933904230594635,
0.04513619840145111,
0.055495984852313995,
-0.06364466995000839,
0.017229825258255005,
0.021115276962518692,
0.07856836915016174,
-0.018296262249350548,
0.05987561121582985,
0.030970288440585136,
0.053368475288152695,
0.008022138848900795,
-0.05155598372220993,
-0.05622048303484917,
0.002593178767710924,
-0.06581892818212509,
-0.027210967615246773,
-0.014134014956653118,
-0.04426360875368118,
0.05045219510793686,
-0.033924270421266556,
0.04952061548829079,
-0.03503578156232834,
-0.011590574868023396,
0.008256384171545506
] | 0.018402
|
Client Authentication The Kubernetes apiserver connects to the extension apiserver over TLS, authenticating itself using a client certificate. You must provide the following to the Kubernetes apiserver upon startup, using the provided flags: \* private key file via `--proxy-client-key-file` \* signed client certificate file via `--proxy-client-cert-file` \* certificate of the CA that signed the client certificate file via `--requestheader-client-ca-file` \* valid Common Name values (CNs) in the signed client certificate via `--requestheader-allowed-names` The Kubernetes apiserver will use the files indicated by `--proxy-client-\*-file` to authenticate to the extension apiserver. In order for the request to be considered valid by a compliant extension apiserver, the following conditions must be met: 1. The connection must be made using a client certificate that is signed by the CA whose certificate is in `--requestheader-client-ca-file`. 2. The connection must be made using a client certificate whose CN is one of those listed in `--requestheader-allowed-names`. {{< note >}} You can set this option to blank as `--requestheader-allowed-names=""`. This will indicate to an extension apiserver that \_any\_ CN is acceptable. {{< /note >}} When started with these options, the Kubernetes apiserver will: 1. Use them to authenticate to the extension apiserver. 2. Create a configmap in the `kube-system` namespace called `extension-apiserver-authentication`, in which it will place the CA certificate and the allowed CNs. These in turn can be retrieved by extension apiservers to validate requests. Note that the same client certificate is used by the Kubernetes apiserver to authenticate against \_all\_ extension apiservers. It does not create a client certificate per extension apiserver, but rather a single one to authenticate as the Kubernetes apiserver. This same one is reused for all extension apiserver requests. #### Original Request Username and Group When the Kubernetes apiserver proxies the request to the extension apiserver, it informs the extension apiserver of the username and group with which the original request successfully authenticated. It provides these in http headers of its proxied request. You must inform the Kubernetes apiserver of the names of the headers to be used. \* the header in which to store the username via `--requestheader-username-headers` \* the header in which to store the group via `--requestheader-group-headers` \* the prefix to append to all extra headers via `--requestheader-extra-headers-prefix` These header names are also placed in the `extension-apiserver-authentication` configmap, so they can be retrieved and used by extension apiservers. ### Extension Apiserver Authenticates the Request The extension apiserver, upon receiving a proxied request from the Kubernetes apiserver, must validate that the request actually did come from a valid authenticating proxy, which role the Kubernetes apiserver is fulfilling. The extension apiserver validates it via: 1. Retrieve the following from the configmap in `kube-system`, as described above: \* Client CA certificate \* List of allowed names (CNs) \* Header names for username, group and extra info 2. Check that the TLS connection was authenticated using a client certificate which: \* Was signed by the CA whose certificate matches the retrieved CA certificate. \* Has a CN in the list of allowed CNs, unless the list is blank, in which case all CNs are allowed. \* Extract the username and group from the appropriate headers If the above passes, then the request is a valid proxied request from a legitimate authenticating proxy, in this case the Kubernetes apiserver. Note that it is the responsibility of the extension apiserver implementation to provide the above. Many do it by default, leveraging the `k8s.io/apiserver/` package. Others may provide options to override it using command-line options. In order to have permission to retrieve the configmap, an extension apiserver requires the appropriate role. There is a default role named
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
[
-0.04561522975564003,
0.02732718549668789,
0.0311459731310606,
-0.07879159599542618,
-0.08353515714406967,
-0.019507724791765213,
0.0015082336030900478,
0.03213735297322273,
0.12690216302871704,
0.03535992652177811,
-0.04901112988591194,
-0.06440301239490509,
0.048111442476511,
0.0845656469464302,
0.06813956797122955,
0.013143463991582394,
-0.001089086290448904,
0.03063182532787323,
0.03157861903309822,
-0.061781782656908035,
-0.049484819173812866,
-0.05823800340294838,
-0.05090636387467384,
0.011854401789605618,
-0.04582245275378227,
-0.0581059567630291,
-0.03387037664651871,
0.012727123685181141,
0.022543497383594513,
0.062212854623794556,
0.006904593203216791,
-0.03959149494767189,
-0.05286898836493492,
-0.006552651058882475,
-0.006290149874985218,
0.042186204344034195,
0.07736801356077194,
0.031862907111644745,
-0.08973371982574463,
0.0841934010386467,
0.06541525572538376,
-0.056251492351293564,
-0.08291255682706833,
-0.0056297266855835915,
0.024462256580591202,
0.02271142043173313,
0.00437192153185606,
-0.0785297155380249,
-0.041852548718452454,
0.02126665972173214,
-0.00662972079589963,
-0.045737236738204956,
-0.01673550345003605,
0.03432571515440941,
-0.04706183448433876,
-0.03186962753534317,
-0.08302949368953705,
0.12159768491983414,
0.10374397039413452,
0.03603539243340492,
0.018490111455321312,
-0.05092351511120796,
-0.009787212125957012,
0.015658555552363396,
-0.11173275858163834,
0.045354388654232025,
-0.04143586382269859,
-0.002785192569717765,
-0.007895052433013916,
-0.036385707557201385,
0.06541145592927933,
0.013868938200175762,
-0.06397128850221634,
-0.053329601883888245,
-0.03557611629366875,
-0.014287829399108887,
-0.05525853857398033,
0.022922618314623833,
0.017355460673570633,
-0.0877051055431366,
0.04237138107419014,
0.00032864412060007453,
0.001895626774057746,
0.03483659029006958,
-0.09583711624145508,
0.026935871690511703,
-0.030354291200637817,
-0.052251458168029785,
-0.016215264797210693,
0.037070587277412415,
0.047650355845689774,
-0.07635531574487686,
-0.07893358916044235,
-0.07672938704490662,
0.09818941354751587,
0.04909900575876236,
-0.005871541798114777,
0.01592801697552204,
0.01445796713232994,
-0.038274217396974564,
-0.02801632322371006,
0.001679383683949709,
-0.03700149804353714,
0.006595275364816189,
0.08362098038196564,
0.005532298237085342,
-0.048037219792604446,
-0.05431047081947327,
0.06269174814224243,
0.06392359733581543,
-0.029413670301437378,
-0.003974149003624916,
-0.004974184557795525,
-0.022695770487189293,
0.0142852533608675,
0.1028621643781662,
-0.01184800174087286,
-0.015662478283047676,
0.08531257510185242,
-0.01834811456501484,
-0.029564525932073593,
-0.10476264357566833,
0.011395325884222984,
0.04926375672221184,
-0.009767396375536919,
0.035946812480688095,
0.059978608042001724,
4.939533423988811e-33,
0.02886657603085041,
-0.01851818338036537,
0.08458913862705231,
0.07026135921478271,
0.0136754484847188,
-0.10449466854333878,
0.0623452290892601,
-0.06547051668167114,
-0.08005555719137192,
-0.023862775415182114,
-0.041997235268354416,
0.042339809238910675,
-0.014999098144471645,
-0.06428544223308563,
0.015517291612923145,
0.08097265660762787,
-0.08191809058189392,
-0.05089038982987404,
0.07297227531671524,
0.02339038997888565,
-0.0045024920254945755,
-0.08394128084182739,
0.03410162776708603,
0.06788556277751923,
-0.036353789269924164,
-0.060077279806137085,
0.029769117012619972,
-0.0816531851887703,
-0.022059651091694832,
0.014447343535721302,
0.02001751959323883,
-0.04242388904094696,
0.03447778522968292,
-0.02135949395596981,
-0.055643852800130844,
-0.000029418790290947072,
0.07613567262887955,
0.0611213855445385,
-0.07895279675722122,
-0.025869155302643776,
0.04866680130362511,
-0.03495228663086891,
0.015268092043697834,
0.0077298046089708805,
-0.006616671569645405,
-0.04316264018416405,
0.005394740030169487,
-0.0611308217048645,
0.11120446026325226,
0.05516255646944046,
-0.06155369430780411,
-0.03181327506899834,
0.032391585409641266,
-0.053980935364961624,
0.08791378885507584,
0.01601666398346424,
0.043619345873594284,
-0.011578192934393883,
-0.1519082933664322,
-0.0470602922141552,
-0.05606142804026604,
-0.05471884831786156,
-0.0714978501200676,
0.0007017058087512851,
0.072302907705307,
0.02709042653441429,
-0.020257113501429558,
0.0959574356675148,
-0.06677905470132828,
-0.06702417880296707,
-0.034947995096445084,
0.03444371372461319,
-0.007008336018770933,
-0.03580586239695549,
-0.012010243721306324,
-0.029068199917674065,
0.03728374093770981,
0.08018948137760162,
0.015618317760527134,
0.011495879851281643,
0.026978597044944763,
-0.04630838707089424,
0.04441216588020325,
0.11519183963537216,
-0.03129519522190094,
0.03243935853242874,
0.02111099474132061,
0.029602093622088432,
0.010947832837700844,
0.003247975604608655,
0.010338564403355122,
0.03699329122900963,
0.03193633258342743,
0.0837634727358818,
-0.08027040213346481,
-5.2878114616443305e-33,
0.06407653540372849,
-0.024928977712988853,
0.008820646442472935,
-0.01097146701067686,
0.06594716757535934,
0.040606167167425156,
-0.018007516860961914,
0.058792658150196075,
0.007802661042660475,
-0.005065493285655975,
0.02686692215502262,
-0.039657678455114365,
0.03681059926748276,
-0.017953287810087204,
-0.06324435770511627,
-0.04941374063491821,
-0.11037323623895645,
0.04609081521630287,
-0.043368130922317505,
-0.0401846319437027,
-0.006357141770422459,
-0.027716029435396194,
0.024417616426944733,
0.020523592829704285,
0.04003177583217621,
0.0443861149251461,
-0.04897574335336685,
0.06154267489910126,
-0.01876867562532425,
0.012079313397407532,
0.05780327320098877,
-0.06351529061794281,
0.02350682206451893,
0.026941074058413506,
0.0025057552848011255,
-0.06993075460195541,
0.018723711371421814,
0.07408683747053146,
0.048949845135211945,
-0.07065119594335556,
0.019282978028059006,
-0.03482235223054886,
-0.0015283029060810804,
-0.012947886250913143,
0.045663755387067795,
-0.0026689243968576193,
0.03933943435549736,
-0.035380758345127106,
-0.07620701938867569,
-0.05874737724661827,
-0.01740201562643051,
0.03886433690786362,
-0.03549078106880188,
0.07904908061027527,
-0.017846310511231422,
0.08758655935525894,
0.028337696567177773,
0.11584964394569397,
-0.018168065696954727,
-0.019586466252803802,
0.08931424468755722,
-0.11795102804899216,
0.040235646069049835,
0.04110667482018471,
-0.02158968523144722,
0.0013810693053528666,
-0.039138734340667725,
0.04426060616970062,
-0.01312887854874134,
0.020778760313987732,
-0.08125563710927963,
-0.07910441607236862,
-0.01996111311018467,
0.0012734782649204135,
0.042180582880973816,
-0.07088969647884369,
0.036501072347164154,
-0.019703002646565437,
0.07503674179315567,
0.016982438042759895,
-0.030429350212216377,
0.023540932685136795,
-0.0602889321744442,
-0.013335972093045712,
0.09592626988887787,
0.009725254029035568,
0.053633205592632294,
0.03368183225393295,
0.04220550134778023,
0.038905415683984756,
-0.0009113690466620028,
0.08560769259929657,
-0.018238818272948265,
0.06180795282125473,
0.05245467275381088,
-5.071416353530367e-8,
0.01978898234665394,
0.015334468334913254,
-0.10737006366252899,
0.00892504584044218,
0.009050795808434486,
0.0892360582947731,
-0.011400755494832993,
-0.0722857415676117,
-0.06835886836051941,
-0.03410002216696739,
-0.026062902063131332,
-0.023404430598020554,
-0.09091902524232864,
0.03107522428035736,
-0.019346486777067184,
-0.03764290362596512,
-0.016317402943968773,
-0.004477676469832659,
0.048581648617982864,
-0.0441146045923233,
-0.04058045521378517,
-0.06173953041434288,
0.016544528305530548,
-0.016548048704862595,
-0.044289588928222656,
0.09594176709651947,
0.02744418755173683,
0.026768743991851807,
0.048413392156362534,
0.05481620877981186,
-0.10042790323495865,
-0.010913296602666378,
-0.049472223967313766,
-0.010721738450229168,
-0.033745307475328445,
0.08719967305660248,
-0.07818678766489029,
-0.014742067083716393,
-0.03520017862319946,
0.04921523481607437,
0.03174924850463867,
0.0360480360686779,
-0.047187525779008865,
0.012484864331781864,
0.026481283828616142,
0.10794366151094437,
0.0370660163462162,
0.07566764205694199,
0.01225496269762516,
0.06781770288944244,
0.023290282115340233,
-0.04252002015709877,
0.0003650813887361437,
-0.007137329317629337,
-0.1436004489660263,
0.020253757014870644,
-0.05055912584066391,
0.015285429544746876,
0.013528179377317429,
-0.07544321566820145,
0.00006264603871386498,
0.01940009370446205,
0.04177864268422127,
0.023174159228801727
] | 0.026196
|
of the extension apiserver implementation to provide the above. Many do it by default, leveraging the `k8s.io/apiserver/` package. Others may provide options to override it using command-line options. In order to have permission to retrieve the configmap, an extension apiserver requires the appropriate role. There is a default role named `extension-apiserver-authentication-reader` in the `kube-system` namespace which can be assigned. ### Extension Apiserver Authorizes the Request The extension apiserver now can validate that the user/group retrieved from the headers are authorized to execute the given request. It does so by sending a standard [SubjectAccessReview](/docs/reference/access-authn-authz/authorization/) request to the Kubernetes apiserver. In order for the extension apiserver to be authorized itself to submit the `SubjectAccessReview` request to the Kubernetes apiserver, it needs the correct permissions. Kubernetes includes a default `ClusterRole` named `system:auth-delegator` that has the appropriate permissions. It can be granted to the extension apiserver's service account. ### Extension Apiserver Executes If the `SubjectAccessReview` passes, the extension apiserver executes the request. ## Enable Kubernetes Apiserver flags Enable the aggregation layer via the following `kube-apiserver` flags. They may have already been taken care of by your provider. --requestheader-client-ca-file= --requestheader-allowed-names=front-proxy-client --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --proxy-client-cert-file= --proxy-client-key-file= ### CA Reusage and Conflicts The Kubernetes apiserver has two client CA options: \* `--client-ca-file` \* `--requestheader-client-ca-file` Each of these functions independently and can conflict with each other, if not used correctly. \* `--client-ca-file`: When a request arrives to the Kubernetes apiserver, if this option is enabled, the Kubernetes apiserver checks the certificate of the request. If it is signed by one of the CA certificates in the file referenced by `--client-ca-file`, then the request is treated as a legitimate request, and the user is the value of the common name `CN=`, while the group is the organization `O=`. See the [documentation on TLS authentication](/docs/reference/access-authn-authz/authentication/#x509-client-certificates). \* `--requestheader-client-ca-file`: When a request arrives to the Kubernetes apiserver, if this option is enabled, the Kubernetes apiserver checks the certificate of the request. If it is signed by one of the CA certificates in the file reference by `--requestheader-client-ca-file`, then the request is treated as a potentially legitimate request. The Kubernetes apiserver then checks if the common name `CN=` is one of the names in the list provided by `--requestheader-allowed-names`. If the name is allowed, the request is approved; if it is not, the request is not. If \_both\_ `--client-ca-file` and `--requestheader-client-ca-file` are provided, then the request first checks the `--requestheader-client-ca-file` CA and then the `--client-ca-file`. Normally, different CAs, either root CAs or intermediate CAs, are used for each of these options; regular client requests match against `--client-ca-file`, while aggregation requests match against `--requestheader-client-ca-file`. However, if both use the \_same\_ CA, then client requests that normally would pass via `--client-ca-file` will fail, because the CA will match the CA in `--requestheader-client-ca-file`, but the common name `CN=` will \*\*not\*\* match one of the acceptable common names in `--requestheader-allowed-names`. This can cause your kubelets and other control plane components, as well as end-users, to be unable to authenticate to the Kubernetes apiserver. For this reason, use different CA certs for the `--client-ca-file` option - to authorize control plane components and end-users - and the `--requestheader-client-ca-file` option - to authorize aggregation apiserver requests. {{< warning >}} Do \*\*not\*\* reuse a CA that is used in a different context unless you understand the risks and the mechanisms to protect the CA's usage. {{< /warning >}} If you are not running kube-proxy on a host running the API server, then you must make sure that the system is enabled with the following `kube-apiserver` flag: --enable-aggregator-routing=true ### Register APIService objects You can dynamically configure what client requests are proxied to
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
[
-0.027787454426288605,
0.05736706778407097,
-0.006869826465845108,
-0.027649560943245888,
-0.01003575511276722,
-0.04166583716869354,
0.012562085874378681,
0.027002863585948944,
0.020446816459298134,
0.049533408135175705,
-0.049540404230356216,
-0.08150187879800797,
0.0373770110309124,
0.05068636313080788,
0.07503128051757812,
0.001067609991878271,
0.07753679901361465,
0.019394194707274437,
-0.03833276033401489,
-0.09068644046783447,
-0.018106816336512566,
0.006716073025017977,
-0.03377112001180649,
0.01081983745098114,
-0.05756692215800285,
-0.05645852908492088,
-0.044198449701070786,
-0.02227979525923729,
0.044638581573963165,
0.04903865233063698,
-0.01571843773126602,
-0.05757564678788185,
-0.015595112927258015,
0.07818832248449326,
-0.015431182458996773,
0.07608511298894882,
0.018064478412270546,
-0.045461077243089676,
-0.04147273302078247,
0.05968621373176575,
-0.031017975881695747,
0.03303130716085434,
-0.1291280835866928,
0.014399983920156956,
-0.026159705594182014,
0.032320864498615265,
-0.0017673041438683867,
-0.040415532886981964,
-0.06418971717357635,
0.062234003096818924,
0.06769730150699615,
-0.03516096994280815,
0.05723659694194794,
0.02628912217915058,
-0.015072076581418514,
-0.01074746623635292,
-0.1314677596092224,
0.046505726873874664,
0.08833276480436325,
0.006296158768236637,
-0.06012570485472679,
-0.10860636830329895,
-0.004959449637681246,
-0.004703737795352936,
-0.08841340243816376,
0.02928868681192398,
0.0036029459442943335,
0.009460213594138622,
0.01940751262009144,
-0.055660828948020935,
0.09351005405187607,
-0.00521224457770586,
-0.05825424939393997,
-0.03371305391192436,
0.06442642956972122,
0.02680363692343235,
-0.06379345059394836,
0.06673368066549301,
-0.0033354507759213448,
-0.11632681638002396,
0.036201201379299164,
0.044724781066179276,
0.010343474335968494,
0.05879111960530281,
-0.04835956171154976,
0.005600492469966412,
-0.06971907615661621,
0.012940125539898872,
0.02015281841158867,
0.0515129528939724,
0.03730018064379692,
-0.04645395651459694,
-0.052601464092731476,
-0.13875307142734528,
0.09436476230621338,
0.019755620509386063,
-0.08429469913244247,
-0.014083008281886578,
-0.011955139227211475,
0.025061022490262985,
-0.027369080111384392,
-0.009701278991997242,
-0.09019820392131805,
-0.022985277697443962,
0.07438769936561584,
-0.06748508661985397,
-0.006501039955765009,
-0.022554827854037285,
0.01544776652008295,
0.10231378674507141,
-0.0249179620295763,
0.022928372025489807,
0.011919891461730003,
-0.010517527349293232,
0.03865651786327362,
0.04196564853191376,
0.0668516755104065,
-0.01653655432164669,
0.07992113381624222,
-0.024219226092100143,
-0.004907259717583656,
-0.09265592694282532,
0.06045044958591461,
0.041727956384420395,
0.0175356175750494,
0.043027088046073914,
-0.022778233513236046,
2.979736385328431e-33,
0.004667211323976517,
-0.007665514945983887,
0.06065856292843819,
0.011498702690005302,
-0.016658423468470573,
-0.09688886255025864,
-0.008571784943342209,
-0.0502578467130661,
-0.05238378793001175,
-0.062428925186395645,
-0.07864103466272354,
0.1166842058300972,
0.04940745234489441,
-0.05164825916290283,
0.040170423686504364,
0.07439998537302017,
-0.040487270802259445,
0.020968765020370483,
0.038034986704587936,
0.03371889516711235,
-0.002651436487212777,
-0.016399046406149864,
-0.0005032378830946982,
0.07754409313201904,
-0.050751056522130966,
-0.0697983130812645,
-0.02021246775984764,
-0.040438614785671234,
-0.01679944433271885,
0.02360314130783081,
0.001246498548425734,
-0.020616283640265465,
-0.026552582159638405,
0.00870590377599001,
-0.13435298204421997,
-0.020243002101778984,
0.014303214848041534,
0.05645886808633804,
-0.06043531745672226,
-0.012964311055839062,
0.06061149388551712,
-0.005281262099742889,
-0.014334767125546932,
-0.03175897151231766,
-0.0357520692050457,
-0.063283771276474,
-0.004092733841389418,
-0.03022538311779499,
0.09649218618869781,
0.009845897555351257,
-0.018857194110751152,
-0.01941281370818615,
0.06383693963289261,
-0.09733472019433975,
0.10656459629535675,
-0.01650511473417282,
0.057301755994558334,
-0.020839165896177292,
-0.02938225120306015,
-0.06058032810688019,
0.003571990644559264,
-0.025595279410481453,
-0.00977459829300642,
0.045960016548633575,
0.027673006057739258,
-0.03733787313103676,
-0.04401550069451332,
0.05466907471418381,
-0.018424618989229202,
-0.027432464063167572,
-0.04574297368526459,
0.0328710712492466,
-0.07704853266477585,
0.025540148839354515,
-0.05732059106230736,
-0.044649071991443634,
0.049777500331401825,
0.06902243196964264,
-0.013712935149669647,
0.04787208512425423,
0.08484441787004471,
-0.0211716890335083,
0.04243719205260277,
0.0992264449596405,
0.011887065134942532,
-0.042110830545425415,
-0.026254504919052124,
-0.027855196967720985,
0.0048244730569422245,
-0.02948567643761635,
-0.006259845104068518,
-0.03684054687619209,
-0.038682300597429276,
0.08952249586582184,
-0.10279174894094467,
-4.5456021244832304e-33,
0.09180031716823578,
-0.026183079928159714,
-0.024874942377209663,
-0.043032027781009674,
0.030437583103775978,
0.08914613723754883,
-0.01418462023139,
0.008362515829503536,
-0.011410585604608059,
-0.03914780169725418,
-0.0034222069662064314,
-0.0221713874489069,
0.02905914932489395,
0.07107265293598175,
-0.021663352847099304,
-0.022907068952918053,
-0.11706162989139557,
0.05578804016113281,
-0.009641258977353573,
-0.027957871556282043,
-0.05853202939033508,
-0.014992499724030495,
0.09922979027032852,
-0.009591883979737759,
0.04455547779798508,
0.0050575025379657745,
-0.0710076093673706,
0.10684047639369965,
-0.05096147581934929,
-0.019381366670131683,
-0.025028787553310394,
-0.08990270644426346,
-0.04582365229725838,
0.013378122821450233,
0.00591503968462348,
-0.07659976184368134,
-0.01404664944857359,
0.16675902903079987,
-0.02984374575316906,
0.0470612533390522,
0.035719871520996094,
0.03589198365807533,
0.028615906834602356,
0.024188974872231483,
-0.018589964136481285,
0.03479950129985809,
0.04940946772694588,
-0.07185683399438858,
-0.08783739805221558,
-0.0480879470705986,
-0.013225477188825607,
0.0319756455719471,
0.03704138845205307,
0.08448150753974915,
-0.0406571701169014,
0.08180207759141922,
0.041217535734176636,
0.07201461493968964,
0.035133689641952515,
-0.032966744154691696,
0.06002248078584671,
-0.1182698905467987,
0.06590178608894348,
0.043094243854284286,
-0.010808253660798073,
0.006487044505774975,
0.023000307381153107,
-0.0007705661118961871,
-0.04935333505272865,
0.055116694420576096,
0.005722069647163153,
-0.14175787568092346,
-0.011335297487676144,
0.036231450736522675,
0.10319247096776962,
-0.011523391120135784,
0.02308323048055172,
-0.03198090195655823,
-0.011960671283304691,
0.011700795963406563,
-0.04958224669098854,
-0.02616238221526146,
-0.04237210378050804,
0.022249506786465645,
0.05930929630994797,
-0.003903081873431802,
0.015941651538014412,
0.04403824359178543,
0.05184423550963402,
0.07539988309144974,
0.035209812223911285,
0.01671280339360237,
-0.032032668590545654,
0.030688047409057617,
-0.01542752142995596,
-5.1018961499949e-8,
0.028743073344230652,
-0.0407773032784462,
-0.06169957295060158,
0.04773674160242081,
0.0206525307148695,
0.06805138289928436,
-0.06655476987361908,
-0.04962344840168953,
-0.053383734077215195,
-0.06405182927846909,
-0.0015895310789346695,
0.007605988532304764,
-0.04049992933869362,
-0.044764626771211624,
-0.014036457985639572,
-0.0008983933366835117,
0.008487795479595661,
-0.011625292710959911,
0.021270204335451126,
-0.052581239491701126,
-0.06579908728599548,
-0.01376459188759327,
0.03609616309404373,
-0.04593785107135773,
0.01892470382153988,
0.0929354727268219,
-0.021120989695191383,
0.004600513260811567,
0.013798239640891552,
0.010746710002422333,
-0.051829732954502106,
0.01589689776301384,
-0.06495790928602219,
-0.019352242350578308,
-0.06585223972797394,
0.023886507377028465,
-0.09734778106212616,
-0.02118196338415146,
-0.022847719490528107,
-0.011101306416094303,
0.034608256071805954,
0.0634104385972023,
-0.062311653047800064,
0.023868348449468613,
0.007613019552081823,
0.08186520636081696,
0.13412988185882568,
0.0430016927421093,
0.04238945245742798,
0.010253749787807465,
0.005944771226495504,
-0.041984859853982925,
0.014391662552952766,
0.11324088275432587,
-0.07951200753450394,
-0.03506355732679367,
-0.05409209057688713,
-0.053024373948574066,
0.04402554780244827,
-0.023631341755390167,
0.0061147031374275684,
0.06531143188476562,
0.025097128003835678,
0.014021037146449089
] | 0.131946
|
protect the CA's usage. {{< /warning >}} If you are not running kube-proxy on a host running the API server, then you must make sure that the system is enabled with the following `kube-apiserver` flag: --enable-aggregator-routing=true ### Register APIService objects You can dynamically configure what client requests are proxied to extension apiserver. The following is an example registration: ```yaml apiVersion: apiregistration.k8s.io/v1 kind: APIService metadata: name: spec: group: version: groupPriorityMinimum: versionPriority: service: namespace: name: caBundle: ``` The name of an APIService object must be a valid [path segment name](/docs/concepts/overview/working-with-objects/names#path-segment-names). #### Contacting the extension apiserver Once the Kubernetes apiserver has determined a request should be sent to an extension apiserver, it needs to know how to contact it. The `service` stanza is a reference to the service for an extension apiserver. The service namespace and name are required. The port is optional and defaults to 443. Here is an example of an extension apiserver that is configured to be called on port "1234", and to verify the TLS connection against the ServerName `my-service-name.my-service-namespace.svc` using a custom CA bundle. ```yaml apiVersion: apiregistration.k8s.io/v1 kind: APIService ... spec: ... service: namespace: my-service-namespace name: my-service-name port: 1234 caBundle: "Ci0tLS0tQk......tLS0K" ... ``` ## {{% heading "whatsnext" %}} \* [Set up an extension api-server](/docs/tasks/extend-kubernetes/setup-extension-api-server/) to work with the aggregation layer. \* For a high level overview, see [Extending the Kubernetes API with the aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/). \* Learn how to [Extend the Kubernetes API Using Custom Resource Definitions](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/configure-aggregation-layer.md
|
[
-0.04808446392416954,
0.026047583669424057,
0.046056609600782394,
-0.01925504207611084,
-0.06624308973550797,
-0.014680083841085434,
-0.01654118299484253,
0.012743566185235977,
0.08615409582853317,
0.04661957919597626,
-0.036955706775188446,
-0.07393806427717209,
0.011666782200336456,
0.03331829234957695,
0.10770521312952042,
0.019142011180520058,
0.05690910294651985,
-0.02216218039393425,
-0.05269225314259529,
-0.10112463682889938,
0.04838180914521217,
-0.01662973128259182,
-0.039820365607738495,
0.023169388994574547,
-0.051543887704610825,
-0.0597781166434288,
-0.041110921651124954,
0.0023853767197579145,
0.032349593937397,
0.029356857761740685,
-0.0021993997506797314,
-0.014227492734789848,
-0.06499433517456055,
0.0005427313735708594,
0.01784368045628071,
0.09239053726196289,
0.04356618598103523,
-0.02988569438457489,
-0.05072149634361267,
0.03456886112689972,
0.04181734099984169,
0.011258634738624096,
-0.07567209005355835,
-0.04667211323976517,
-0.029583962634205818,
-0.021609924733638763,
0.02265540510416031,
-0.05140300095081329,
-0.05249136686325073,
-0.014572753570973873,
0.03421652689576149,
-0.0962713211774826,
0.00858820416033268,
0.03737914562225342,
0.02438095025718212,
-0.054607052356004715,
-0.09286030381917953,
0.091416135430336,
0.07927421480417252,
0.03403852880001068,
-0.0066442228853702545,
-0.06413882970809937,
0.03802918642759323,
-0.01813686080276966,
-0.1108260303735733,
0.03281949833035469,
-0.02530871331691742,
0.02379109151661396,
-0.0077895596623420715,
-0.012330221012234688,
0.020258596166968346,
-0.0062208934687078,
-0.026629585772752762,
0.019166696816682816,
0.042338378727436066,
0.00582648953422904,
-0.03265972062945366,
0.0338960662484169,
0.054799359291791916,
-0.11916881799697876,
0.051945365965366364,
0.02247634530067444,
0.0012966138310730457,
0.0878547728061676,
-0.09092599153518677,
0.0029055133927613497,
-0.02427867241203785,
-0.08795561641454697,
0.05160565301775932,
-0.008985599502921104,
0.07618232071399689,
-0.04650382325053215,
0.009185324423015118,
-0.09992028027772903,
0.08389466255903244,
0.013419875875115395,
-0.04755489155650139,
-0.0462791733443737,
0.018402356654405594,
0.02405237779021263,
0.04111984744668007,
0.026336273178458214,
-0.039683371782302856,
0.05727038159966469,
0.0762702003121376,
-0.0346917025744915,
-0.07344233244657516,
0.03431949391961098,
0.0006982220220379531,
0.12101566046476364,
-0.013305313885211945,
0.04123198613524437,
0.0031932354904711246,
-0.018716055899858475,
-0.021567992866039276,
0.040544383227825165,
0.04332999885082245,
-0.02831791341304779,
0.03939652815461159,
-0.029131172224879265,
0.00198775134049356,
-0.0907028317451477,
0.0007492086733691394,
0.03887232393026352,
0.014629986137151718,
0.07167377322912216,
0.023723984137177467,
5.513993839815816e-33,
0.05092154070734978,
-0.02377774752676487,
0.04438053444027901,
0.004088577348738909,
0.01665707863867283,
-0.12072812020778656,
0.019723189994692802,
-0.009202100336551666,
-0.057391487061977386,
-0.05821259692311287,
-0.030059553682804108,
0.07882470637559891,
-0.016449714079499245,
-0.09029514342546463,
0.033026136457920074,
0.054088491946458817,
-0.04386520758271217,
-0.005169302690774202,
0.07234370708465576,
0.03252646327018738,
0.007731005549430847,
-0.08718141168355942,
0.015207982622087002,
0.05704552307724953,
-0.0014596730470657349,
-0.009468591772019863,
-0.0045408206060528755,
-0.10845080018043518,
-0.04915948584675789,
0.0010938412742689252,
0.01086822897195816,
-0.0284146536141634,
-0.013835988007485867,
0.009760210290551186,
-0.08616212010383606,
-0.03712344169616699,
0.021517116576433182,
0.027341490611433983,
-0.12446314096450806,
0.016233745962381363,
0.06972896307706833,
0.03476592153310776,
0.0038523380644619465,
-0.03596702963113785,
0.05753760039806366,
-0.04844963923096657,
-0.02593044936656952,
-0.0665600597858429,
0.14455236494541168,
0.04900488257408142,
-0.0073208739049732685,
-0.017493151128292084,
0.07888514548540115,
-0.04115208983421326,
0.09105479717254639,
0.030623817816376686,
0.06245846301317215,
-0.038520876318216324,
-0.0908060148358345,
-0.08543837815523148,
-0.02983904629945755,
-0.10094720870256424,
-0.014052686281502247,
0.032845061272382736,
0.0225666593760252,
-0.02864394150674343,
-0.04837269335985184,
0.09466646611690521,
-0.045878101140260696,
-0.020037664100527763,
-0.042155321687459946,
0.017803894355893135,
-0.02464882843196392,
0.04651588201522827,
-0.04835180938243866,
-0.08974719047546387,
0.014317918568849564,
0.050032954663038254,
-0.03524792939424515,
0.023949990049004555,
0.03930921107530594,
-0.055705297738313675,
0.05077223479747772,
0.059938009828329086,
0.008866007439792156,
-0.02550957165658474,
0.02289307862520218,
-0.010099546052515507,
-0.00857968907803297,
0.00042270758422091603,
-0.054879847913980484,
-0.0031407431233674288,
-0.0564567856490612,
0.06001809239387512,
-0.10749996453523636,
-6.650402636131278e-33,
0.06894008070230484,
0.003463997272774577,
0.0039047463797032833,
-0.029850896447896957,
0.02846268191933632,
0.022189853712916374,
-0.001421288587152958,
0.07702681422233582,
-0.0009455914259888232,
-0.024531172588467598,
-0.05237460508942604,
0.008130395784974098,
0.07985906302928925,
0.04090774804353714,
-0.050500739365816116,
0.015767769888043404,
-0.11069577932357788,
0.004523494280874729,
-0.04820036143064499,
-0.006422847509384155,
-0.07741991430521011,
-0.0017123583238571882,
0.08700612932443619,
-0.014959384687244892,
0.04051193222403526,
-0.002767015714198351,
-0.04693987965583801,
0.09342363476753235,
-0.029633237048983574,
-0.032935354858636856,
0.06572991609573364,
-0.0970635935664177,
-0.014034238643944263,
-0.007956832647323608,
-0.013369719497859478,
-0.06466780602931976,
0.015794524922966957,
0.07282618433237076,
0.009885712526738644,
-0.06093485280871391,
0.01449431199580431,
-0.048118237406015396,
-0.040993236005306244,
0.004256640560925007,
-0.03337160125374794,
-0.012660060077905655,
0.06419540196657181,
-0.005639967508614063,
-0.06874887645244598,
-0.0759720653295517,
0.0017659806180745363,
0.030462002381682396,
-0.05103253945708275,
0.12884290516376495,
-0.04944336414337158,
0.0739615336060524,
0.07251854240894318,
0.09405305236577988,
-0.057641979306936264,
0.005765304435044527,
0.06670837104320526,
-0.10086409747600555,
0.046458471566438675,
0.027697641402482986,
0.01779630221426487,
0.001024724217131734,
-0.0037715344224125147,
-0.0018540691817179322,
0.009077058173716068,
0.006766994018107653,
-0.022401921451091766,
-0.06395365297794342,
-0.04667622596025467,
0.007034487556666136,
0.05268189311027527,
-0.015219873748719692,
0.03472911939024925,
-0.019446978345513344,
0.039084941148757935,
0.03449085354804993,
-0.07055965065956116,
-0.01292463019490242,
-0.02478206157684326,
-0.0005151761579327285,
0.037163183093070984,
-0.006318040192127228,
0.09961157292127609,
0.06932505965232849,
0.04763348028063774,
0.05232908949255943,
-0.008175414986908436,
-0.018816465511918068,
-0.05500331521034241,
0.052668869495391846,
-0.005042799282819033,
-5.7445529222377445e-8,
0.011279493570327759,
0.029672201722860336,
-0.09396882355213165,
0.04590427130460739,
0.06601312756538391,
0.025742486119270325,
-0.012849299237132072,
-0.01984696090221405,
-0.07538104057312012,
-0.007121228147298098,
-0.007625538855791092,
0.01382372435182333,
-0.08473813533782959,
0.059546858072280884,
0.038958512246608734,
-0.06356436014175415,
0.000019264145521447062,
0.055019766092300415,
-0.015194232575595379,
-0.024974370375275612,
-0.1038791835308075,
-0.05540435016155243,
0.035239625722169876,
-0.08692243695259094,
0.01939103752374649,
0.08270692080259323,
0.00003322615157230757,
-0.014650418423116207,
0.08296024054288864,
0.028959564864635468,
-0.10668700933456421,
0.004061175510287285,
-0.06810776889324188,
-0.0023909714072942734,
-0.05382205545902252,
0.06982951611280441,
-0.10639861226081848,
0.0019552267622202635,
-0.055096372961997986,
0.06093293055891991,
0.08357419818639755,
0.022133003920316696,
-0.05254431441426277,
0.036820534616708755,
0.04555463418364525,
0.12607558071613312,
0.03824040666222572,
0.046233776956796646,
0.03289477527141571,
0.06866797059774399,
0.02003869228065014,
-0.0557030513882637,
0.005893855821341276,
0.032463666051626205,
-0.1298152655363083,
-0.028053956106305122,
-0.043389566242694855,
-0.018558965995907784,
0.019621560350060463,
-0.0013002200284972787,
0.011264954693615437,
-0.004756281152367592,
0.047487832605838776,
-0.009720425121486187
] | 0.123211
|
This page explains how to add versioning information to [CustomResourceDefinitions](/docs/reference/kubernetes-api/extend-resources/custom-resource-definition-v1/), to indicate the stability level of your CustomResourceDefinitions or advance your API to a new version with conversion between API representations. It also describes how to upgrade an object from one version to another. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You should have an initial understanding of [custom resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/). {{< version-check >}} ## Overview The CustomResourceDefinition API provides a workflow for introducing and upgrading to new versions of a CustomResourceDefinition. When a CustomResourceDefinition is created, the first version is set in the CustomResourceDefinition `spec.versions` list to an appropriate stability level and a version number. For example `v1beta1` would indicate that the first version is not yet stable. All custom resource objects will initially be stored at this version. Once the CustomResourceDefinition is created, clients may begin using the `v1beta1` API. Later it might be necessary to add new version such as `v1`. Adding a new version: 1. Pick a conversion strategy. Since custom resource objects need the ability to be served at both versions, that means they will sometimes be served in a different version than the one stored. To make this possible, the custom resource objects must sometimes be converted between the version they are stored at and the version they are served at. If the conversion involves schema changes and requires custom logic, a conversion webhook should be used. If there are no schema changes, the default `None` conversion strategy may be used and only the `apiVersion` field will be modified when serving different versions. 1. If using conversion webhooks, create and deploy the conversion webhook. See the [Webhook conversion](#webhook-conversion) for more details. 1. Update the CustomResourceDefinition to include the new version in the `spec.versions` list with `served:true`. Also, set `spec.conversion` field to the selected conversion strategy. If using a conversion webhook, configure `spec.conversion.webhookClientConfig` field to call the webhook. Once the new version is added, clients may incrementally migrate to the new version. It is perfectly safe for some clients to use the old version while others use the new version. Migrate stored objects to the new version: 1. See the [upgrade existing objects to a new stored version](#upgrade-existing-objects-to-a-new-stored-version) section. It is safe for clients to use both the old and new version before, during and after upgrading the objects to a new stored version. Removing an old version: 1. Ensure all clients are fully migrated to the new version. The kube-apiserver logs can be reviewed to help identify any clients that are still accessing via the old version. 1. Set `served` to `false` for the old version in the `spec.versions` list. If any clients are still unexpectedly using the old version they may begin reporting errors attempting to access the custom resource objects at the old version. If this occurs, switch back to using `served:true` on the old version, migrate the remaining clients to the new version and repeat this step. 1. Ensure the [upgrade of existing objects to the new stored version](#upgrade-existing-objects-to-a-new-stored-version) step has been completed. 1. Verify that the `storage` is set to `true` for the new version in the `spec.versions` list in the CustomResourceDefinition. 1. Verify that the old version is no longer listed in the CustomResourceDefinition `status.storedVersions`. 1. Remove the old version from the CustomResourceDefinition `spec.versions` list. 1. Drop conversion support for the old version in conversion webhooks. ## Specify multiple versions The CustomResourceDefinition API `versions` field can be used to support multiple versions of custom resources that you have developed. Versions can have different schemas, and conversion webhooks can convert custom resources between versions. Webhook conversions should follow the
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.026392510160803795,
0.0019363266183063388,
0.09101495146751404,
-0.012267122976481915,
0.0007994176703505218,
0.04358609393239021,
-0.026182029396295547,
-0.0064729019068181515,
0.040551912039518356,
0.004903940483927727,
-0.0336543545126915,
-0.021799655631184578,
-0.02480556070804596,
-0.03485318273305893,
0.015808189287781715,
-0.04956240952014923,
0.04496711120009422,
-0.039546169340610504,
-0.062398314476013184,
-0.0042418367229402065,
0.08756560832262039,
0.00915433093905449,
0.040830109268426895,
-0.016526924446225166,
-0.006771162152290344,
-0.02050316520035267,
-0.020452216267585754,
0.02006516233086586,
0.06516877561807632,
-0.003486122004687786,
-0.0422137975692749,
0.039578843861818314,
-0.02230748161673546,
-0.004989651497453451,
0.08530286699533463,
0.08492224663496017,
-0.013328568078577518,
-0.02486070990562439,
-0.02658771723508835,
0.08338364958763123,
0.008695458993315697,
0.019242724403738976,
-0.05743292346596718,
-0.008981801569461823,
-0.0011143290903419256,
-0.0001916023757075891,
-0.024604765698313713,
-0.07352777570486069,
-0.05307559296488762,
0.056768037378787994,
0.056713975965976715,
-0.11046703904867172,
-0.011354202404618263,
-0.013019278645515442,
0.0925946906208992,
0.03071993961930275,
-0.05012897402048111,
0.052526116371154785,
-0.0258365236222744,
-0.008734495379030704,
0.06349901854991913,
-0.04349646344780922,
0.01127091608941555,
-0.1137675940990448,
-0.029651204124093056,
-0.03462463617324829,
0.03712449595332146,
0.017840402200818062,
0.05935978889465332,
-0.04386582598090172,
-0.04874870553612709,
0.02916843071579933,
0.022839831188321114,
-0.03475192189216614,
0.0011759726330637932,
0.046901147812604904,
0.0028019568417221308,
0.10552655905485153,
0.0031315176747739315,
-0.1500537246465683,
-0.03317544609308243,
0.028055626899003983,
0.057247813791036606,
0.0028952399734407663,
-0.03154262900352478,
-0.003295293776318431,
0.03622227534651756,
-0.05124149098992348,
0.07519637048244476,
-0.00026056807837449014,
0.02698863111436367,
-0.11972042918205261,
0.014396892860531807,
-0.08156806230545044,
0.005546668078750372,
0.07589354366064072,
-0.08274446427822113,
0.007483864668756723,
0.06704703718423843,
0.018577175214886665,
0.00843441765755415,
-0.025052214041352272,
0.03839078173041344,
0.01535964384675026,
0.11097230762243271,
0.0010311143705621362,
-0.06809937953948975,
0.05115976929664612,
-0.043388064950704575,
0.023480892181396484,
0.03176058828830719,
0.01597503572702408,
-0.01813369430601597,
-0.03953460231423378,
0.051921114325523376,
0.007226607296615839,
-0.024817083030939102,
-0.005787473171949387,
0.012281588278710842,
0.013674910180270672,
0.12744297087192535,
-0.07516685873270035,
0.07591364532709122,
0.020264461636543274,
-0.09296684712171555,
-0.056000906974077225,
-0.08637993037700653,
2.676952550443626e-33,
0.05630594864487648,
-0.0042185913771390915,
0.039148833602666855,
0.011678931303322315,
0.000781733135227114,
-0.09305061399936676,
0.008477512747049332,
0.012461641803383827,
-0.07055595517158508,
-0.047963064163923264,
0.006828633602708578,
0.10968910157680511,
-0.10119274258613586,
-0.02375805750489235,
-0.03942167013883591,
-0.015176044777035713,
-0.1062857136130333,
0.046560078859329224,
0.12052327394485474,
-0.026672877371311188,
0.050164029002189636,
-0.05403778329491615,
-0.02243664488196373,
0.004549435339868069,
0.08417674154043198,
-0.07082093507051468,
0.024695931002497673,
-0.02706659398972988,
-0.07872862368822098,
-0.0268370620906353,
0.0015850606141611934,
-0.035071153193712234,
-0.003535911673679948,
-0.0356125570833683,
-0.13297276198863983,
-0.044370200484991074,
-0.0017005627742037177,
0.014779417775571346,
-0.05314058065414429,
0.0049958257004618645,
0.052009839564561844,
0.009444566443562508,
-0.005315063055604696,
-0.08078517019748688,
0.08789558708667755,
-0.05501209944486618,
0.03341292217373848,
-0.04883454740047455,
0.08169183880090714,
-0.05326979234814644,
-0.008950118906795979,
-0.02124607190489769,
0.04371106997132301,
-0.08704548329114914,
-0.009647071361541748,
-0.04959923028945923,
0.07533827424049377,
-0.03294597193598747,
-0.020237373188138008,
-0.05281338095664978,
0.009669709950685501,
-0.041157808154821396,
0.006424680817872286,
0.025075210258364677,
0.008716665208339691,
0.030235586687922478,
-0.009882606565952301,
0.01214966457337141,
0.011905871331691742,
-0.062421828508377075,
-0.09825379401445389,
-0.010343918576836586,
-0.018770437687635422,
0.016677215695381165,
0.03116311877965927,
-0.09256582707166672,
0.025855636224150658,
0.036667607724666595,
-0.06568066030740738,
-0.006066675763577223,
-0.008481978438794613,
0.012217557057738304,
-0.015936024487018585,
0.07977727800607681,
-0.05848916247487068,
-0.047124654054641724,
0.04760391637682915,
-0.06009018421173096,
0.013598978519439697,
-0.013909879140555859,
0.012787989340722561,
-0.03503996133804321,
-0.1301186978816986,
0.019728152081370354,
0.012545596808195114,
-3.6728489968755304e-33,
0.11104924231767654,
-0.0016967839328572154,
-0.008352985605597496,
-0.015294189564883709,
0.027289271354675293,
-0.01609320007264614,
-0.012882469221949577,
0.09713684022426605,
-0.05602327734231949,
-0.10400397330522537,
-0.03393581882119179,
-0.03819415718317032,
-0.008529052138328552,
0.04621439427137375,
-0.09993934631347656,
0.001445744070224464,
-0.07604106515645981,
-0.025684621185064316,
0.0042204284109175205,
0.038550376892089844,
-0.01472417451441288,
0.07100770622491837,
0.04428256303071976,
0.004808228462934494,
0.02287367917597294,
-0.0019291387870907784,
-0.020992344245314598,
0.023664548993110657,
-0.0014655997510999441,
-0.010974086821079254,
0.008241991512477398,
-0.13093580305576324,
-0.006981782615184784,
-0.03874102607369423,
0.006278030574321747,
-0.060378298163414,
-0.046172935515642166,
-0.04374613240361214,
-0.013601197861135006,
0.07414751499891281,
0.06142239645123482,
-0.03458569198846817,
0.048298779875040054,
-0.01780925691127777,
-0.03352009132504463,
-0.022870471701025963,
0.07507962733507156,
-0.06809337437152863,
-0.0020601702854037285,
-0.13920651376247406,
0.04567379876971245,
0.038310326635837555,
-0.05816580727696419,
0.057876311242580414,
0.006665774155408144,
0.02094804123044014,
0.075016088783741,
0.03687481954693794,
0.014417358674108982,
-0.002441874472424388,
0.021528109908103943,
-0.043112367391586304,
0.10414057224988937,
-0.048490505665540695,
0.011582355946302414,
-0.04051868990063667,
-0.04293350130319595,
-0.0028930576518177986,
0.008872573263943195,
0.06250984221696854,
-0.074077308177948,
-0.01992972567677498,
0.009828146547079086,
-0.015773285180330276,
0.049114201217889786,
-0.07006124407052994,
0.06497008353471756,
-0.004992339760065079,
0.06978701800107956,
-0.017751382663846016,
-0.13206271827220917,
0.015922129154205322,
-0.03389571234583855,
0.07085815817117691,
0.04908038303256035,
0.0352104976773262,
0.08668559044599533,
0.10238151997327805,
0.04893374443054199,
0.05112606659531593,
-0.015787523239850998,
0.03169969841837883,
-0.0652076005935669,
0.10576783865690231,
-0.08203384280204773,
-5.1200302664256014e-8,
-0.0064789061434566975,
0.05447930842638016,
-0.06653660535812378,
0.08233952522277832,
0.04986226186156273,
0.010580357164144516,
-0.0218663327395916,
0.03285311535000801,
-0.011589160189032555,
-0.006786655634641647,
-0.03693091496825218,
0.058238349854946136,
0.033782895654439926,
0.005599556025117636,
-0.013401544652879238,
-0.002929513808339834,
0.00011878740042448044,
0.06690839678049088,
-0.00004211906707496382,
-0.04577311873435974,
-0.08224936574697495,
0.042263682931661606,
0.029825327917933464,
-0.10147032886743546,
0.08105093240737915,
0.05415860563516617,
0.047700442373752594,
0.06764848530292511,
-0.007153280545026064,
0.028394075110554695,
0.05146503448486328,
-0.004619095008820295,
-0.016127537935972214,
0.077455073595047,
0.02911427803337574,
0.010617968626320362,
-0.07139670848846436,
0.09225954860448837,
0.08697843551635742,
0.064839668571949,
0.03650350123643875,
0.017778152599930763,
-0.08451947569847107,
0.10158655047416687,
0.06823388487100601,
-0.0038753380067646503,
-0.05064384639263153,
-0.005576875526458025,
-0.06949598342180252,
-0.03442922607064247,
-0.048654504120349884,
-0.019057048484683037,
0.0040074619464576244,
0.05695308744907379,
-0.030890444293618202,
0.04213850200176239,
0.014549666084349155,
0.017368482425808907,
0.012435649521648884,
0.01893131621181965,
0.04954308643937111,
0.02661917731165886,
-0.02192861959338188,
0.020700925961136818
] | 0.059301
|
support for the old version in conversion webhooks. ## Specify multiple versions The CustomResourceDefinition API `versions` field can be used to support multiple versions of custom resources that you have developed. Versions can have different schemas, and conversion webhooks can convert custom resources between versions. Webhook conversions should follow the [Kubernetes API conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md) wherever applicable. Specifically, See the [API change documentation](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api\_changes.md) for a set of useful gotchas and suggestions. {{< note >}} In `apiextensions.k8s.io/v1beta1`, there was a `version` field instead of `versions`. The `version` field is deprecated and optional, but if it is not empty, it must match the first item in the `versions` field. {{< /note >}} This example shows a CustomResourceDefinition with two versions. For the first example, the assumption is all versions share the same schema with no conversion between them. The comments in the YAML provide more context. {{< tabs name="CustomResourceDefinition\_versioning\_example\_1" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . name: crontabs.example.com spec: # group name to use for REST API: /apis// group: example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true # A schema is required schema: openAPIV3Schema: type: object properties: host: type: string port: type: string - name: v1 served: true storage: false schema: openAPIV3Schema: type: object properties: host: type: string port: type: string # The conversion section is introduced in Kubernetes 1.13+ with a default value of # None conversion (strategy sub-field set to None). conversion: # None conversion assumes the same schema for all versions and only sets the apiVersion # field of custom resources to the proper value strategy: None # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/// plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the CamelCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . name: crontabs.example.com spec: # group name to use for REST API: /apis// group: example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true - name: v1 served: true storage: false validation: openAPIV3Schema: type: object properties: host: type: string port: type: string # The conversion section is introduced in Kubernetes 1.13+ with a default value of # None conversion (strategy sub-field set to None). conversion: # None conversion assumes the same schema for all versions and only sets the apiVersion # field of custom resources to the proper value strategy: None # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/// plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the PascalCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` {{% /tab %}} {{< /tabs
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.04905594512820244,
0.06622117757797241,
0.0700240358710289,
-0.042149197310209274,
0.02570902369916439,
0.006303821224719286,
-0.06797690689563751,
-0.025089384987950325,
0.05272306129336357,
-0.0010842904448509216,
-0.03551851212978363,
-0.08041054010391235,
-0.016709113493561745,
-0.06301072984933853,
0.08939246088266373,
-0.027790863066911697,
0.008811406791210175,
0.005755707621574402,
-0.04167019575834274,
0.0011091739870607853,
0.04113423451781273,
0.0072372653521597385,
-0.006332548335194588,
-0.015881529077887535,
-0.0008717963937669992,
-0.06698176264762878,
-0.007141981273889542,
0.02569035068154335,
0.003984506241977215,
-0.017961814999580383,
-0.05634742230176926,
0.030738860368728638,
-0.08133599907159805,
0.019673658534884453,
0.07162594795227051,
0.07897104322910309,
-0.019054537639021873,
0.00014020214439369738,
-0.028422920033335686,
0.08826899528503418,
0.03808895871043205,
-0.032591916620731354,
-0.06528027355670929,
-0.02832699567079544,
-0.033480897545814514,
0.006580039858818054,
-0.06001540645956993,
-0.045181408524513245,
-0.08443677425384521,
0.05448954924941063,
0.028882812708616257,
-0.10207560658454895,
-0.017674610018730164,
0.0388377346098423,
0.10359786450862885,
-0.03102066181600094,
-0.06823375821113586,
0.1267760545015335,
-0.0029815759044140577,
0.03986535221338272,
0.053815945982933044,
-0.05072695389389992,
0.051889896392822266,
-0.07411416620016098,
-0.018864961341023445,
-0.017980538308620453,
0.05359556898474693,
-0.04471047595143318,
0.03192112222313881,
-0.07777651399374008,
-0.04348449036478996,
-0.026834288612008095,
-0.011422699317336082,
-0.007002869620919228,
-0.0003489675000309944,
0.0679875984787941,
0.005659117829054594,
0.10299380123615265,
0.05601901933550835,
-0.1484435796737671,
-0.018926119431853294,
0.029039589688181877,
0.03588269650936127,
0.005840454716235399,
-0.04235825315117836,
0.007084894459694624,
-0.0587015300989151,
-0.03023201785981655,
0.03546914830803871,
-0.012030593119561672,
0.01589253544807434,
-0.09737450629472733,
0.029397498816251755,
-0.09233730286359787,
0.01117449626326561,
0.02678454853594303,
-0.05938873440027237,
0.06596194207668304,
0.04592219740152359,
0.03124871291220188,
-0.006969009526073933,
0.0298368688672781,
0.02741154283285141,
-0.0206407830119133,
0.09994769096374512,
-0.05776291340589523,
-0.0018400723347440362,
0.03574567288160324,
-0.020777948200702667,
0.022913508117198944,
0.004768689163029194,
0.02241281233727932,
-0.012447258457541466,
-0.03306863084435463,
0.05589721351861954,
-0.009564731270074844,
-0.0012676847400143743,
-0.02789090946316719,
0.03288983181118965,
0.07680845260620117,
0.048721861094236374,
-0.06877602636814117,
0.029545418918132782,
0.03770590201020241,
-0.07332213968038559,
0.034984834492206573,
-0.03477105125784874,
1.672475546263696e-33,
0.05246258154511452,
0.01434680912643671,
0.03531349450349808,
-0.060148805379867554,
0.02065875008702278,
-0.1348467916250229,
0.008532998152077198,
-0.02908068150281906,
-0.08335507661104202,
-0.08535949885845184,
0.011789551936089993,
0.06687786430120468,
-0.06857836246490479,
-0.06714922189712524,
0.04237646982073784,
-0.016756296157836914,
-0.09595813602209091,
0.046844907104969025,
0.10827158391475677,
-0.0016797228017821908,
0.061636220663785934,
-0.019111866131424904,
-0.05271248146891594,
-0.0007635194924660027,
0.04263950139284134,
-0.04213259741663933,
0.006074299570173025,
-0.007517998572438955,
-0.06772254407405853,
-0.013751551508903503,
-0.015249996446073055,
-0.03939823433756828,
0.029198026284575462,
-0.011379549279808998,
-0.15569747984409332,
-0.07808934897184372,
-0.0680779293179512,
0.002252347767353058,
-0.057536013424396515,
-0.03597568720579147,
0.018407681956887245,
0.040917884558439255,
-0.021327191963791847,
-0.07230523228645325,
0.06143476441502571,
0.013244005851447582,
0.0186290480196476,
-0.05534299835562706,
0.07478012889623642,
-0.09140238165855408,
0.00045553920790553093,
0.014418233186006546,
0.03513198345899582,
-0.00957546941936016,
0.033495862036943436,
-0.0600685216486454,
0.11706355959177017,
-0.07329428195953369,
-0.002547189127653837,
-0.07672538608312607,
0.07470594346523285,
0.020653100684285164,
0.05663111433386803,
0.003426817711442709,
0.054676201194524765,
0.008986587636172771,
0.00885818526148796,
0.02723705768585205,
-0.07630187273025513,
-0.05052580684423447,
-0.028460830450057983,
0.011531010270118713,
-0.06241937354207039,
-0.018058020621538162,
-0.004907839000225067,
-0.12765410542488098,
0.03412265703082085,
0.035447172820568085,
-0.024399742484092712,
-0.001099926303140819,
0.029396869242191315,
0.011830353178083897,
-0.009725206531584263,
0.043455708771944046,
-0.025991076603531837,
-0.04002036526799202,
0.058193814009428024,
-0.0507841594517231,
0.0021326609421521425,
0.0051092589274048805,
0.03769320994615555,
-0.037662915885448456,
-0.11198277771472931,
0.00097530463244766,
-0.01995905674993992,
-1.7641036778713625e-33,
0.046252939850091934,
0.01278515625745058,
-0.008381827734410763,
0.021704379469156265,
0.011173960752785206,
0.019987132400274277,
0.051319390535354614,
0.05663588270545006,
-0.023234955966472626,
-0.06687614321708679,
0.051218874752521515,
-0.05808832123875618,
0.002300184452906251,
-0.005739465355873108,
-0.05671281740069389,
-0.006426848005503416,
-0.08246046304702759,
-0.06856171041727066,
0.04924490675330162,
0.0379992313683033,
0.04160236939787865,
0.04213821515440941,
0.030390797182917595,
0.03423755243420601,
0.04361123964190483,
-0.038982562720775604,
-0.013743008486926556,
0.08570288121700287,
-0.051455192267894745,
-0.07759696245193481,
0.02726580761373043,
-0.12863709032535553,
-0.0007865880033932626,
-0.00848187506198883,
-0.028833897784352303,
-0.0982847586274147,
-0.007762125227600336,
0.010449804365634918,
-0.005201369058340788,
0.012038723565638065,
0.033241286873817444,
-0.057887963950634,
0.05453227087855339,
0.051934003829956055,
-0.05184856057167053,
0.032566219568252563,
0.0456719771027565,
-0.02462799660861492,
0.01171853207051754,
-0.10915815085172653,
0.04896541312336922,
0.04949222877621651,
-0.07678501307964325,
0.040052082389593124,
-0.05828419700264931,
0.07121320813894272,
0.016362681984901428,
0.06732262670993805,
-0.0802328959107399,
-0.007016187999397516,
-0.014932551421225071,
-0.04054558277130127,
0.11160627007484436,
0.02429298870265484,
0.025243643671274185,
-0.003556826850399375,
-0.02782769314944744,
0.03587137535214424,
-0.0330561064183712,
0.04632283374667168,
0.0030746622942388058,
-0.043663352727890015,
-0.002488519996404648,
-0.009220302104949951,
0.0276725422590971,
-0.050311703234910965,
0.07793194055557251,
0.042428549379110336,
0.042239993810653687,
-0.03241162374615669,
-0.12430408596992493,
0.068474180996418,
0.036011628806591034,
0.09737831354141235,
0.04831073060631752,
0.042493682354688644,
0.06499142199754715,
0.09244454652070999,
0.026376662775874138,
0.03852420672774315,
-0.022446176037192345,
0.005944693461060524,
-0.07150668650865555,
0.07900991290807724,
-0.030659373849630356,
-4.5062318321242856e-8,
-0.003144129877910018,
0.0347345694899559,
-0.060056816786527634,
0.0588051863014698,
0.033311374485492706,
-0.03136599808931351,
-0.012948055751621723,
0.0211012102663517,
-0.010735081508755684,
0.045583296567201614,
-0.02801229991018772,
0.08267205953598022,
0.009451582096517086,
0.0005058494862169027,
0.010576165281236172,
-0.03910963237285614,
0.012073744088411331,
0.05767255648970604,
0.019135504961013794,
-0.011917294934391975,
-0.04306340962648392,
0.0012063190806657076,
0.06307906657457352,
-0.10292531549930573,
0.09509250521659851,
0.10771016031503677,
-0.020236432552337646,
0.025725461542606354,
0.011340946890413761,
-0.007302953861653805,
0.029654696583747864,
-0.009164867922663689,
-0.013075416907668114,
0.06937283277511597,
0.05751880630850792,
0.010967550799250603,
-0.13803879916667938,
0.10845529288053513,
0.028449716046452522,
0.0524178147315979,
0.034424301236867905,
-0.04509076103568077,
-0.08958414196968079,
0.06412835419178009,
0.04011834040284157,
0.03291844204068184,
-0.006831949111074209,
-0.017047440633177757,
-0.0069705951027572155,
0.01980818435549736,
-0.04297790676355362,
-0.02706071175634861,
0.03788406401872635,
0.031084347516298294,
0.013296317309141159,
-0.005475608166307211,
0.0014289647806435823,
-0.013133363798260689,
0.08265171945095062,
0.05306992679834366,
0.12021111696958542,
0.0013164168922230601,
0.021536454558372498,
0.06837672740221024
] | 0.103379
|
to be used as an alias on the CLI and for display singular: crontab # kind is normally the PascalCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` {{% /tab %}} {{< /tabs >}} You can save the CustomResourceDefinition in a YAML file, then use `kubectl apply` to create it. ```shell kubectl apply -f my-versioned-crontab.yaml ``` After creation, the API server starts to serve each enabled version at an HTTP REST endpoint. In the above example, the API versions are available at `/apis/example.com/v1beta1` and `/apis/example.com/v1`. ### Version priority Regardless of the order in which versions are defined in a CustomResourceDefinition, the version with the highest priority is used by kubectl as the default version to access objects. The priority is determined by parsing the \_name\_ field to determine the version number, the stability (GA, Beta, or Alpha), and the sequence within that stability level. The algorithm used for sorting the versions is designed to sort versions in the same way that the Kubernetes project sorts Kubernetes versions. Versions start with a `v` followed by a number, an optional `beta` or `alpha` designation, and optional additional numeric versioning information. Broadly, a version string might look like `v2` or `v2beta1`. Versions are sorted using the following algorithm: - Entries that follow Kubernetes version patterns are sorted before those that do not. - For entries that follow Kubernetes version patterns, the numeric portions of the version string is sorted largest to smallest. - If the strings `beta` or `alpha` follow the first numeric portion, they sorted in that order, after the equivalent string without the `beta` or `alpha` suffix (which is presumed to be the GA version). - If another number follows the `beta`, or `alpha`, those numbers are also sorted from largest to smallest. - Strings that don't fit the above format are sorted alphabetically and the numeric portions are not treated specially. Notice that in the example below, `foo1` is sorted above `foo10`. This is different from the sorting of the numeric portion of entries that do follow the Kubernetes version patterns. This might make sense if you look at the following sorted version list: ```none - v10 - v2 - v1 - v11beta2 - v10beta3 - v3beta1 - v12alpha1 - v11alpha2 - foo1 - foo10 ``` For the example in [Specify multiple versions](#specify-multiple-versions), the version sort order is `v1`, followed by `v1beta1`. This causes the kubectl command to use `v1` as the default version unless the provided object specifies the version. ### Version deprecation {{< feature-state state="stable" for\_k8s\_version="v1.19" >}} Starting in v1.19, a CustomResourceDefinition can indicate a particular version of the resource it defines is deprecated. When API requests to a deprecated version of that resource are made, a warning message is returned in the API response as a header. The warning message for each deprecated version of the resource can be customized if desired. A customized warning message should indicate the deprecated API group, version, and kind, and should indicate what API group, version, and kind should be used instead, if applicable. {{< tabs name="CustomResourceDefinition\_versioning\_deprecated" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: crontabs.example.com spec: group: example.com names: plural: crontabs singular: crontab kind: CronTab scope: Namespaced versions: - name: v1alpha1 served: true storage: false # This indicates the v1alpha1 version of the custom resource is deprecated. # API requests to this version receive a warning header in the server response. deprecated: true # This overrides the default warning returned to API clients making v1alpha1 API requests. deprecationWarning: "example.com/v1alpha1 CronTab
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.003104043658822775,
0.02791956253349781,
0.05159759148955345,
-0.10239234566688538,
-0.07093390822410583,
0.051110394299030304,
-0.013108017854392529,
0.02381734922528267,
0.06141195073723793,
-0.01605459861457348,
-0.047435957938432693,
-0.06928735226392746,
-0.03080739825963974,
0.003927691373974085,
0.024682417511940002,
-0.02563628926873207,
0.040581341832876205,
-0.04294759780168533,
0.009731299243867397,
0.015034567564725876,
0.05868930742144585,
0.019056759774684906,
-0.0015411886852234602,
0.003967679105699062,
-0.039197418838739395,
-0.04769955202937126,
0.0024872268550097942,
0.004062431398779154,
0.08840123564004898,
-0.004251126199960709,
-0.03210511431097984,
0.0685892105102539,
-0.024358967319130898,
0.026116089895367622,
0.07093729823827744,
0.10384530574083328,
-0.0020834743045270443,
-0.061562590301036835,
0.007021508179605007,
0.09347549825906754,
0.048787541687488556,
0.023321207612752914,
-0.08546238392591476,
-0.05933770537376404,
-0.0046730320900678635,
-0.0782136470079422,
0.0010985444532707334,
-0.029236016795039177,
-0.038311466574668884,
0.00988267082720995,
0.061872366815805435,
-0.07897298783063889,
-0.05482993647456169,
-0.0038601690903306007,
0.07263621687889099,
-0.03562622517347336,
-0.12189023941755295,
0.04841512441635132,
0.08997204154729843,
0.025637658312916756,
-0.040547654032707214,
-0.018602343276143074,
0.08040758967399597,
-0.047483015805482864,
-0.06502670794725418,
-0.03272382542490959,
-0.00017511550686322153,
-0.004145412240177393,
0.011313311755657196,
-0.025527071207761765,
-0.017564142122864723,
-0.007371188141405582,
-0.07610414922237396,
-0.08793637156486511,
0.013734016567468643,
0.003256472060456872,
-0.00422730203717947,
0.055588748306035995,
-0.07189337909221649,
-0.12772659957408905,
-0.07112070173025131,
0.0139153515920043,
0.0717945322394371,
0.041226524859666824,
-0.04318748414516449,
0.0039862580597400665,
0.02950180135667324,
-0.05587172508239746,
0.12885665893554688,
0.04089244082570076,
0.02412613108754158,
-0.05568038299679756,
0.019024712964892387,
-0.11564332246780396,
0.02513359673321247,
0.06163594126701355,
-0.028554767370224,
0.04529285430908203,
0.06607768684625626,
0.047219157218933105,
0.03725619614124298,
0.04409567639231682,
0.028918243944644928,
0.02878633886575699,
0.11724229902029037,
0.0322674922645092,
-0.01843990758061409,
0.039652418345212936,
-0.030994828790426254,
-0.009154824540019035,
0.013842709362506866,
0.05721127986907959,
-0.02111237868666649,
-0.054847296327352524,
0.02678297646343708,
-0.004782764241099358,
-0.03297756239771843,
-0.011269637383520603,
0.11107546836137772,
0.034214213490486145,
0.10903218388557434,
-0.10683415085077286,
-0.04979177936911583,
-0.005128281190991402,
-0.02191636711359024,
0.026941029354929924,
-0.05514111742377281,
2.5974617653501844e-33,
0.041687045246362686,
-0.0011200328590348363,
0.05679961293935776,
-0.057915929704904556,
0.006637743674218655,
-0.12475837022066116,
-0.06123579666018486,
0.03333207219839096,
-0.10955587774515152,
-0.08770348876714706,
-0.0234842412173748,
0.10281524062156677,
-0.03284060209989548,
-0.025547703728079796,
-0.030723899602890015,
0.01779293268918991,
-0.07074347883462906,
0.013710095547139645,
0.04375316947698593,
-0.004719767719507217,
0.009495877660810947,
-0.01856738142669201,
-0.0060943602584302425,
0.013054663315415382,
-0.00857981014996767,
-0.09649430960416794,
0.027357026934623718,
0.013224611058831215,
-0.04899512231349945,
-0.01072133332490921,
0.0567195750772953,
0.011907219886779785,
0.04636506736278534,
0.00515723368152976,
-0.13921958208084106,
-0.027218380942940712,
-0.03206338733434677,
0.05218832939863205,
-0.12280581891536713,
0.03967544808983803,
0.07466049492359161,
0.03546367958188057,
-0.04794752597808838,
-0.09061127156019211,
0.10190922021865845,
-0.06787542253732681,
0.048940401524305344,
-0.013847261667251587,
0.03474698215723038,
-0.03865952417254448,
-0.04873053729534149,
0.032583873718976974,
0.07917483150959015,
-0.049829527735710144,
0.022924920544028282,
-0.0430450476706028,
0.04388494789600372,
-0.07806257903575897,
-0.03248782083392143,
-0.005870183929800987,
-0.023837927728891373,
0.006599432788789272,
0.023678364232182503,
0.06269688159227371,
-0.012487533502280712,
-0.02351195365190506,
0.03396052122116089,
-0.02862222120165825,
0.006880239583551884,
-0.04921760410070419,
-0.008917497470974922,
0.06416284292936325,
-0.0711737722158432,
-0.007392664439976215,
0.09029900282621384,
-0.10720503330230713,
0.08329131454229355,
0.036676835268735886,
-0.05665774270892143,
0.07649970054626465,
0.06291253864765167,
-0.0027970129158347845,
-0.006254663225263357,
-0.004869724623858929,
-0.05000685527920723,
-0.06995970010757446,
0.033914513885974884,
-0.04291331395506859,
0.0623641274869442,
-0.03116465173661709,
0.017874162644147873,
-0.03746389225125313,
-0.058788400143384933,
-0.009189218282699585,
-0.0772528275847435,
-3.6304059366291685e-33,
0.09048095345497131,
-0.05275782197713852,
0.05056091770529747,
0.00989205576479435,
-0.065240778028965,
0.03998199477791786,
0.053610093891620636,
0.09672471880912781,
-0.037927430123090744,
-0.06225619837641716,
0.0006989485118538141,
-0.006823195610195398,
-0.018043283373117447,
0.035816486924886703,
-0.016480693593621254,
0.0561155304312706,
-0.07836592197418213,
-0.04537130892276764,
-0.06351184099912643,
0.05211925879120827,
-0.016646508127450943,
0.057301174849271774,
0.08039887994527817,
0.062423720955848694,
0.01940426230430603,
0.011944768019020557,
-0.022458471357822418,
0.04462460055947304,
-0.06588952243328094,
-0.0472903810441494,
-0.029230093583464622,
-0.14826545119285583,
-0.04128852114081383,
-0.006607378832995892,
-0.028361426666378975,
-0.06882286816835403,
-0.047035712748765945,
0.046898823231458664,
0.018052641302347183,
0.04191412404179573,
0.05195249244570732,
-0.00809880904853344,
0.004641241859644651,
0.044892556965351105,
-0.0521552748978138,
0.024365944787859917,
0.0675448402762413,
-0.005091752856969833,
-0.03992491960525513,
-0.10399134457111359,
-0.029276898130774498,
0.02317376434803009,
-0.061672668904066086,
0.011915955692529678,
0.01498093456029892,
0.008916957303881645,
-0.024547196924686432,
0.05154471844434738,
-0.12354261428117752,
0.027265289798378944,
0.02953874133527279,
-0.0939193069934845,
0.07085471600294113,
0.021407287567853928,
0.013673674315214157,
-0.06914962828159332,
-0.04388289526104927,
-0.00016895613225642592,
-0.018383130431175232,
0.009754616767168045,
-0.02771717682480812,
-0.0629006177186966,
-0.05157388001680374,
-0.06236125901341438,
0.04321221634745598,
-0.01229154784232378,
0.05542649328708649,
-0.02585095725953579,
0.002715680981054902,
0.07984314113855362,
-0.055238064378499985,
0.03396030142903328,
-0.04540340602397919,
0.031471576541662216,
-0.020728139206767082,
0.020678013563156128,
0.013557014986872673,
0.06846091896295547,
0.047210097312927246,
0.06456264108419418,
0.040275998413562775,
0.0061435033567249775,
-0.025806987658143044,
0.1348404884338379,
-0.009495338425040245,
-4.833462341480299e-8,
0.022269517183303833,
-0.01236520241945982,
-0.022631676867604256,
0.09264785051345825,
0.030015714466571808,
-0.036095935851335526,
-0.004332095384597778,
-0.024081533774733543,
-0.051569242030382156,
0.04028385505080223,
-0.09696051478385925,
0.03015897050499916,
-0.007907465100288391,
0.02659965120255947,
0.03537685051560402,
0.06764374673366547,
-0.020639317110180855,
0.03978267312049866,
0.011900610290467739,
-0.014905261807143688,
-0.07988197356462479,
0.0029093697667121887,
0.06453762948513031,
0.006692568305879831,
0.03719061613082886,
0.07269240915775299,
0.0133925536647439,
0.01889072172343731,
-0.03521642088890076,
0.021528538316488266,
0.036738596856594086,
-0.015151326544582844,
-0.05576923489570618,
0.02289547771215439,
-0.0055030290968716145,
-0.03267126530408859,
-0.050685565918684006,
0.05501518025994301,
0.010561919771134853,
0.05371381714940071,
0.07641858607530594,
-0.04327140003442764,
-0.05319872125983238,
0.001861106720753014,
-0.0031103433575481176,
0.04954991862177849,
-0.030897291377186775,
0.0777299627661705,
-0.03170083090662956,
-0.02289734221994877,
-0.00739730941131711,
-0.013977043330669403,
0.024073230102658272,
0.027235623449087143,
-0.022221144288778305,
0.02851746790111065,
0.05918673798441887,
-0.08027251064777374,
0.04940398409962654,
0.0338510125875473,
0.03826142102479935,
0.01856943406164646,
0.05025707557797432,
0.0026409956626594067
] | 0.067512
|
v1alpha1 served: true storage: false # This indicates the v1alpha1 version of the custom resource is deprecated. # API requests to this version receive a warning header in the server response. deprecated: true # This overrides the default warning returned to API clients making v1alpha1 API requests. deprecationWarning: "example.com/v1alpha1 CronTab is deprecated; see http://example.com/v1alpha1-v1 for instructions to migrate to example.com/v1 CronTab" schema: ... - name: v1beta1 served: true # This indicates the v1beta1 version of the custom resource is deprecated. # API requests to this version receive a warning header in the server response. # A default warning message is returned for this version. deprecated: true schema: ... - name: v1 served: true storage: true schema: ... ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: crontabs.example.com spec: group: example.com names: plural: crontabs singular: crontab kind: CronTab scope: Namespaced validation: ... versions: - name: v1alpha1 served: true storage: false # This indicates the v1alpha1 version of the custom resource is deprecated. # API requests to this version receive a warning header in the server response. deprecated: true # This overrides the default warning returned to API clients making v1alpha1 API requests. deprecationWarning: "example.com/v1alpha1 CronTab is deprecated; see http://example.com/v1alpha1-v1 for instructions to migrate to example.com/v1 CronTab" - name: v1beta1 served: true # This indicates the v1beta1 version of the custom resource is deprecated. # API requests to this version receive a warning header in the server response. # A default warning message is returned for this version. deprecated: true - name: v1 served: true storage: true ``` {{% /tab %}} {{< /tabs >}} ### Version removal An older API version cannot be dropped from a CustomResourceDefinition manifest until existing stored data has been migrated to the newer API version for all clusters that served the older version of the custom resource, and the old version is removed from the `status.storedVersions` of the CustomResourceDefinition. ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition name: crontabs.example.com spec: group: example.com names: plural: crontabs singular: crontab kind: CronTab scope: Namespaced versions: - name: v1beta1 # This indicates the v1beta1 version of the custom resource is no longer served. # API requests to this version receive a not found error in the server response. served: false schema: ... - name: v1 served: true # The new served version should be set as the storage version storage: true schema: ... ``` ## Webhook conversion {{< feature-state state="stable" for\_k8s\_version="v1.16" >}} {{< note >}} Webhook conversion is available as beta since 1.15, and as alpha since Kubernetes 1.13. The `CustomResourceWebhookConversion` feature must be enabled, which is the case automatically for many clusters for beta features. Please refer to the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) documentation for more information. {{< /note >}} The above example has a None conversion between versions which only sets the `apiVersion` field on conversion and does not change the rest of the object. The API server also supports webhook conversions that call an external service in case a conversion is required. For example when: \* custom resource is requested in a different version than stored version. \* Watch is created in one version but the changed object is stored in another version. \* custom resource PUT request is in a different version than storage version. To cover all of these cases and to optimize conversion by the API server, the conversion requests may contain multiple objects in order to minimize the external calls. The webhook should perform these conversions independently. ### Write a conversion webhook server Please refer to the implementation of the [custom resource conversion webhook server](https://github.com/kubernetes/kubernetes/tree/v1.25.3/test/images/agnhost/crd-conversion-webhook/main.go)
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.04914543777704239,
0.019439131021499634,
0.004503170493990183,
-0.02052517794072628,
0.051384419202804565,
0.00495010893791914,
-0.04186568036675453,
-0.004113898146897554,
-0.03798069804906845,
0.006481050048023462,
0.004370832350105047,
-0.03243163973093033,
-0.010965680703520775,
0.032908398658037186,
-0.010311789810657501,
-0.006408821791410446,
0.023799587041139603,
-0.1093626394867897,
0.0015646247193217278,
0.07121146470308304,
0.06293640285730362,
0.06853553652763367,
-0.046081673353910446,
0.03593875840306282,
0.040823452174663544,
-0.02914467640221119,
-0.1264263093471527,
0.052143361419439316,
-0.018104078248143196,
0.022514602169394493,
-0.0008114346419461071,
0.020969925448298454,
-0.0978894978761673,
0.048629287630319595,
0.08954328298568726,
0.1102028489112854,
0.0040479968301951885,
-0.05707106366753578,
0.005081220529973507,
0.019031157717108727,
0.03882941976189613,
0.04681578651070595,
-0.07645177841186523,
-0.0573665089905262,
-0.0731576681137085,
-0.022149186581373215,
-0.00009471509838476777,
-0.0619845911860466,
-0.10004634410142899,
0.06561849266290665,
0.004132975358515978,
-0.05676215514540672,
0.0009480278240516782,
0.019136948511004448,
0.044598598033189774,
0.042550764977931976,
-0.13298194110393524,
0.0853550061583519,
-0.03380221128463745,
0.04177674651145935,
0.025474930182099342,
-0.04707575961947441,
0.03499476984143257,
-0.027541058138012886,
-0.05397191643714905,
-0.02670595608651638,
-0.027369555085897446,
-0.04633462801575661,
-0.013908564113080502,
0.02263183519244194,
-0.11521042883396149,
0.026476215571165085,
-0.11071613430976868,
-0.049664534628391266,
0.040321238338947296,
0.054075609892606735,
0.029708851128816605,
-0.020109253004193306,
-0.03686593100428581,
-0.18465669453144073,
-0.08762210607528687,
-0.017105860635638237,
0.002181433606892824,
0.030934207141399384,
-0.02864738181233406,
0.09947864711284637,
0.023230064660310745,
-0.07500334829092026,
0.07918916642665863,
-0.02982124127447605,
0.09330203384160995,
-0.07827984541654587,
0.07670436799526215,
0.026548370718955994,
0.034643836319446564,
0.08090972900390625,
-0.06955618411302567,
0.02497837506234646,
0.0012145369546487927,
0.0337236225605011,
-0.006348870228976011,
0.050053007900714874,
0.0518002025783062,
-0.03862681984901428,
0.06919592618942261,
0.010566458106040955,
0.015192232094705105,
0.09610538184642792,
-0.07516900449991226,
0.0031694474164396524,
0.02425992116332054,
0.052547868341207504,
0.06432124227285385,
-0.0909447893500328,
0.02430248074233532,
0.08107759058475494,
-0.09696638584136963,
0.02383648231625557,
0.04384201392531395,
-0.009291330352425575,
0.08787225186824799,
-0.10033170133829117,
-0.004456424620002508,
-0.04847024753689766,
-0.044301193207502365,
-0.06596795469522476,
-0.006724965292960405,
8.853738227053035e-33,
0.002873835852369666,
-0.022246871143579483,
-0.01505377795547247,
0.010662293992936611,
0.02001876011490822,
-0.06314457952976227,
0.005779017694294453,
0.08126682043075562,
-0.09490905702114105,
-0.07710295915603638,
0.011999531649053097,
0.07384803146123886,
-0.0489327535033226,
-0.02589760720729828,
-0.034873463213443756,
-0.005067556165158749,
-0.028964033350348473,
0.039459824562072754,
0.13422925770282745,
-0.011024294421076775,
0.020887942984700203,
0.007955499924719334,
-0.0078761987388134,
-0.02743126079440117,
-0.007601296063512564,
-0.008124892599880695,
0.021637214347720146,
0.026833293959498405,
-0.06651262938976288,
-0.0044831265695393085,
0.015572674572467804,
0.0515427440404892,
0.004546289797872305,
0.020257897675037384,
-0.018365822732448578,
-0.030906617641448975,
-0.014684540219604969,
-0.002598431194201112,
-0.10359697788953781,
-0.0060077994130551815,
0.09612228721380234,
0.06510410457849503,
-0.1252007782459259,
-0.04510761424899101,
0.030047830194234848,
-0.08228251338005066,
0.014092773199081421,
-0.03221256285905838,
0.05332169681787491,
-0.01519684586673975,
-0.05216756835579872,
0.03359854966402054,
0.04996693506836891,
0.023136641830205917,
-0.006124754901975393,
-0.06959640979766846,
0.014573898166418076,
-0.009671260602772236,
0.008126763626933098,
-0.06237594410777092,
0.02105099707841873,
-0.01944047026336193,
0.016221769154071808,
0.010437682271003723,
0.036865897476673126,
-0.022551553323864937,
-0.000909040798433125,
-0.028268961235880852,
-0.013506756164133549,
-0.0486762709915638,
-0.028544923290610313,
-0.006606448907405138,
0.009378238581120968,
0.02741125412285328,
0.02598148211836815,
-0.15092454850673676,
0.07796112447977066,
0.0002340823702979833,
0.00541679747402668,
-0.00801887083798647,
0.014556363224983215,
-0.033595114946365356,
-0.04219290614128113,
-0.008941973559558392,
-0.0841887891292572,
-0.051705896854400635,
0.03661508113145828,
-0.06353965401649475,
0.07026882469654083,
0.04230133444070816,
0.04640485718846321,
-0.023372169584035873,
-0.05607365071773529,
-0.016631364822387695,
-0.05934342369437218,
-8.242513490720093e-33,
-0.021418524906039238,
-0.041678305715322495,
0.011321282014250755,
0.038523007184267044,
-0.07997655868530273,
0.03709741681814194,
0.07717312127351761,
0.06741158664226532,
-0.001319809234701097,
-0.0029723301995545626,
0.034461814910173416,
0.023576758801937103,
0.007262997794896364,
-0.009767143987119198,
-0.046954017132520676,
0.0414154939353466,
-0.0076596857979893684,
-0.11685050278902054,
0.011679800227284431,
0.005277388729155064,
0.0072616818360984325,
0.19778560101985931,
-0.03467980772256851,
0.12133397161960602,
0.0014059749664738774,
0.01769639179110527,
-0.0465221181511879,
0.06785639375448227,
-0.03719128668308258,
-0.051471542567014694,
0.03586673364043236,
-0.041826192289590836,
-0.0019555322360247374,
0.004289727192372084,
-0.018688607960939407,
-0.0563744455575943,
-0.004670572001487017,
0.03294244408607483,
-0.029960663989186287,
0.031117262318730354,
0.11119557172060013,
-0.02656838297843933,
-0.016474701464176178,
-0.0004929906572215259,
0.0034282223787158728,
0.018985390663146973,
0.02829132229089737,
0.027487963438034058,
-0.03020630031824112,
-0.047334250062704086,
0.029980283230543137,
-0.007834353484213352,
0.009654685854911804,
-0.011090809479355812,
0.07203277945518494,
0.004865705035626888,
0.0371469110250473,
0.013298318721354008,
-0.06343985348939896,
0.011759825982153416,
0.0957740992307663,
-0.047674667090177536,
0.0034734916407614946,
0.036372583359479904,
0.015057271346449852,
-0.03132457658648491,
-0.05676581710577011,
0.018773414194583893,
0.004164497833698988,
0.03227359801530838,
-0.004217448178678751,
-0.014139777049422264,
-0.030643528327345848,
-0.06501550227403641,
0.04848787188529968,
-0.04830305278301239,
-0.005013198126107454,
-0.05292817950248718,
-0.06516461819410324,
0.041697580367326736,
-0.06726670265197754,
0.018980419263243675,
0.052252497524023056,
0.04813021793961525,
0.031249526888132095,
-0.026566164568066597,
-0.029926536604762077,
0.07812822610139847,
-0.0634881779551506,
0.06764362752437592,
-0.02543017640709877,
-0.037425488233566284,
-0.10480652004480362,
0.09123952686786652,
0.02946494147181511,
-5.6290627270527693e-8,
-0.0045980000868439674,
0.01838625781238079,
0.053634706884622574,
0.03221679851412773,
0.06987597793340683,
-0.04048653319478035,
0.0774545967578888,
0.04215679690241814,
0.01723705232143402,
0.04541942477226257,
-0.0971800833940506,
0.02727343700826168,
-0.01756761409342289,
0.0004353006079327315,
-0.0126279192045331,
0.06961924582719803,
-0.06636206060647964,
0.03624439984560013,
-0.027885783463716507,
-0.0258297361433506,
-0.019129807129502296,
-0.018910938873887062,
0.05636630579829216,
-0.07164256274700165,
0.06072000041604042,
0.024404680356383324,
-0.012090200558304787,
0.07571421563625336,
-0.014798205345869064,
-0.05429452657699585,
-0.005528557114303112,
-0.001225693617016077,
0.13027483224868774,
-0.05495781451463699,
-0.047005463391542435,
0.08404282480478287,
-0.019647015258669853,
0.08537125587463379,
-0.035306256264448166,
-0.012228265404701233,
0.04350234940648079,
-0.003168171737343073,
-0.009907476603984833,
0.000935360265430063,
-0.019720936194062233,
0.03875208646059036,
-0.02945283055305481,
0.06024584174156189,
-0.01637301594018936,
-0.07519470900297165,
-0.03199942409992218,
0.014413882046937943,
-0.0015397206880152225,
0.058864884078502655,
-0.040087632834911346,
0.00401946110650897,
-0.012610978446900845,
0.0020410867873579264,
0.03402349725365639,
0.02479274943470955,
0.09887202084064484,
0.0669478178024292,
0.03779744729399681,
-0.014558126218616962
] | 0.098885
|
of these cases and to optimize conversion by the API server, the conversion requests may contain multiple objects in order to minimize the external calls. The webhook should perform these conversions independently. ### Write a conversion webhook server Please refer to the implementation of the [custom resource conversion webhook server](https://github.com/kubernetes/kubernetes/tree/v1.25.3/test/images/agnhost/crd-conversion-webhook/main.go) that is validated in a Kubernetes e2e test. The webhook handles the `ConversionReview` requests sent by the API servers, and sends back conversion results wrapped in `ConversionResponse`. Note that the request contains a list of custom resources that need to be converted independently without changing the order of objects. The example server is organized in a way to be reused for other conversions. Most of the common code are located in the [framework file](https://github.com/kubernetes/kubernetes/tree/v1.25.3/test/images/agnhost/crd-conversion-webhook/converter/framework.go) that leaves only [one function](https://github.com/kubernetes/kubernetes/tree/v1.25.3/test/images/agnhost/crd-conversion-webhook/converter/example\_converter.go#L29-L80) to be implemented for different conversions. {{< note >}} The example conversion webhook server leaves the `ClientAuth` field [empty](https://github.com/kubernetes/kubernetes/tree/v1.25.3/test/images/agnhost/crd-conversion-webhook/config.go#L47-L48), which defaults to `NoClientCert`. This means that the webhook server does not authenticate the identity of the clients, supposedly API servers. If you need mutual TLS or other ways to authenticate the clients, see how to [authenticate API servers](/docs/reference/access-authn-authz/extensible-admission-controllers/#authenticate-apiservers). {{< /note >}} #### Permissible mutations A conversion webhook must not mutate anything inside of `metadata` of the converted object other than `labels` and `annotations`. Attempted changes to `name`, `UID` and `namespace` are rejected and fail the request which caused the conversion. All other changes are ignored. ### Deploy the conversion webhook service Documentation for deploying the conversion webhook is the same as for the [admission webhook example service](/docs/reference/access-authn-authz/extensible-admission-controllers/#deploy-the-admission-webhook-service). The assumption for next sections is that the conversion webhook server is deployed to a service named `example-conversion-webhook-server` in `default` namespace and serving traffic on path `/crdconvert`. {{< note >}} When the webhook server is deployed into the Kubernetes cluster as a service, it has to be exposed via a service on port 443 (The server itself can have an arbitrary port but the service object should map it to port 443). The communication between the API server and the webhook service may fail if a different port is used for the service. {{< /note >}} ### Configure CustomResourceDefinition to use conversion webhooks The `None` conversion example can be extended to use the conversion webhook by modifying `conversion` section of the `spec`: {{< tabs name="CustomResourceDefinition\_versioning\_example\_2" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . name: crontabs.example.com spec: # group name to use for REST API: /apis// group: example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true # Each version can define its own schema when there is no top-level # schema is defined. schema: openAPIV3Schema: type: object properties: hostPort: type: string - name: v1 served: true storage: false schema: openAPIV3Schema: type: object properties: host: type: string port: type: string conversion: # the Webhook strategy instructs the API server to call an external webhook for any conversion between custom resources. strategy: Webhook # webhook is required when strategy is `Webhook` and it configures the webhook endpoint to be called by API server. webhook: # conversionReviewVersions indicates what ConversionReview versions are understood/preferred by the webhook. # The first version in the list understood by the API server is sent to the webhook. # The webhook must respond with a ConversionReview object in the same version it received. conversionReviewVersions: ["v1","v1beta1"] clientConfig: service: namespace: default name: example-conversion-webhook-server path: /crdconvert caBundle: "Ci0tLS0tQk......tLS0K" #
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.054725855588912964,
0.10219316929578781,
-0.022244349122047424,
-0.017032140865921974,
-0.023627277463674545,
-0.07883593440055847,
-0.05890023708343506,
-0.0009324880666099489,
0.09348801523447037,
0.041228242218494415,
-0.05480995029211044,
-0.10155678540468216,
0.016422422602772713,
-0.11108878254890442,
0.045136477798223495,
-0.06921311467885971,
0.055135153234004974,
0.0357280857861042,
-0.10049781948328018,
-0.060190699994564056,
0.037228066474199295,
-0.0008143738959915936,
-0.008715210482478142,
-0.03298145905137062,
-0.006378752179443836,
-0.06974656879901886,
-0.023246217519044876,
-0.018491415306925774,
0.025152049958705902,
-0.02717721462249756,
-0.01883845403790474,
-0.0821409672498703,
-0.09287631511688232,
0.053163401782512665,
0.01874602772295475,
0.08848432451486588,
0.04614017531275749,
-0.063661590218544,
-0.020448559895157814,
0.06657852232456207,
0.059775128960609436,
-0.010026299394667149,
-0.06461917608976364,
-0.05976217985153198,
-0.00358257326297462,
0.00042248290264979005,
-0.041025981307029724,
-0.04638892039656639,
-0.09846962988376617,
-0.0467512309551239,
0.007176131010055542,
-0.030217530205845833,
-0.1291368454694748,
0.11007881909608841,
0.027964934706687927,
0.0202750563621521,
-0.025182584300637245,
0.06927510350942612,
0.023075321689248085,
0.06469888985157013,
0.00047001021448522806,
-0.052723437547683716,
0.09942488372325897,
-0.013189331628382206,
-0.015737997367978096,
-0.05884280428290367,
0.048611439764499664,
-0.00494422996416688,
0.02946443483233452,
-0.08923765271902084,
-0.03418268263339996,
-0.012697415426373482,
-0.023183351382613182,
-0.013398253358900547,
0.06011928617954254,
0.005492664873600006,
-0.05851156264543533,
0.06450360268354416,
0.05409878119826317,
-0.07364401966333389,
0.03926093503832817,
0.04171708598732948,
0.016374630853533745,
0.007086846511811018,
-0.01342676393687725,
-0.002690713619813323,
-0.025397609919309616,
0.004216717556118965,
0.015962660312652588,
0.024552635848522186,
0.03236588090658188,
-0.06710802763700485,
-0.04914938658475876,
-0.03464556112885475,
0.027214907109737396,
0.010294261388480663,
-0.02344156801700592,
-0.014770271256566048,
0.054507117718458176,
0.006564942188560963,
-0.002182799857109785,
0.07612354308366776,
0.04825599491596222,
-0.04863026738166809,
0.027347223833203316,
-0.12751652300357819,
0.03076726756989956,
0.08304399251937866,
-0.0021962851751595736,
0.015903102234005928,
-0.014749321155250072,
0.07017473131418228,
0.007051562424749136,
0.011727928183972836,
0.02098085917532444,
0.07405393570661545,
-0.0006185409729368985,
-0.05958636477589607,
0.04782206192612648,
0.08584357798099518,
-0.024819660931825638,
-0.01674017682671547,
0.033120643347501755,
0.06133970618247986,
-0.010305817238986492,
0.0570707842707634,
-0.012179729528725147,
4.6700333443055544e-33,
-0.02104695327579975,
-0.0039060304407030344,
0.07833054661750793,
-0.13066443800926208,
-0.06517619639635086,
-0.051013603806495667,
-0.022340619936585426,
-0.03590848669409752,
0.0224788635969162,
-0.09255562722682953,
-0.024875720962882042,
0.03046024590730667,
0.021940751001238823,
-0.012219971977174282,
0.02104303427040577,
-0.030219661071896553,
-0.06297898292541504,
0.05823404714465141,
0.04345112666487694,
0.025611024349927902,
0.07809646427631378,
-0.022710124030709267,
-0.059945981949567795,
0.017223691567778587,
-0.008021586574614048,
-0.02905314788222313,
-0.03666255623102188,
0.010794292204082012,
-0.05536079779267311,
0.020240269601345062,
-0.05410471931099892,
-0.06451666355133057,
-0.00817196350544691,
0.05501428619027138,
-0.08554849773645401,
-0.015546252951025963,
-0.01640670746564865,
-0.006699411664158106,
-0.03798345476388931,
-0.03424278646707535,
-0.03505006432533264,
-0.003584420308470726,
-0.017118312418460846,
0.0033324877731502056,
-0.01753363199532032,
-0.020531030371785164,
-0.00845466647297144,
-0.0632202997803688,
0.051664941012859344,
-0.026454605162143707,
-0.04297878220677376,
0.024295294657349586,
0.0990966260433197,
0.021448655053973198,
0.006346683483570814,
-0.04690290614962578,
0.1483619064092636,
-0.11052320897579193,
-0.023066045716404915,
0.04154082015156746,
-0.004298477899283171,
-0.008067999966442585,
0.0013550414005294442,
0.004100644960999489,
0.06312811374664307,
-0.05814114212989807,
0.009814766235649586,
-0.027596106752753258,
-0.1000506803393364,
-0.0410376712679863,
0.03668193519115448,
0.010296608321368694,
0.012957395985722542,
-0.06711167097091675,
0.03824450448155403,
-0.08067405223846436,
0.05535868555307388,
0.04263769090175629,
-0.09266110509634018,
-0.05468738451600075,
0.05863127112388611,
0.06558018922805786,
-0.0005969839985482395,
-0.025716451928019524,
-0.006973486393690109,
-0.015420022420585155,
-0.006562752649188042,
-0.09775238484144211,
-0.019925417378544807,
0.0701320543885231,
0.043776772916316986,
0.00781423132866621,
-0.10288816690444946,
0.005359675735235214,
-0.014612805098295212,
-3.8443172558040236e-33,
0.0838230773806572,
0.04994992911815643,
-0.007430003024637699,
0.007369416765868664,
0.03529274836182594,
0.03256984055042267,
0.04281531646847725,
0.03444292023777962,
0.0264419037848711,
-0.032628610730171204,
0.013388424180448055,
-0.08430472761392593,
0.021834736689925194,
-0.0014038097579032183,
-0.018091551959514618,
-0.051770251244306564,
0.006741316989064217,
-0.039553143084049225,
0.12798620760440826,
-0.005873624235391617,
0.05157681927084923,
0.07708089053630829,
0.0712636411190033,
0.010401145555078983,
0.012221419252455235,
0.026600513607263565,
-0.015858689323067665,
0.1228673905134201,
-0.013810965232551098,
-0.03897669538855553,
0.0031161445658653975,
-0.11290573328733444,
-0.026438435539603233,
0.08162913471460342,
-0.07123462855815887,
-0.06526906043291092,
0.012582613155245781,
0.06821464747190475,
0.01865878701210022,
0.028029020875692368,
0.04426529258489609,
-0.029459195211529732,
-0.01947607658803463,
0.031794194132089615,
-0.05995697155594826,
0.046588677912950516,
-0.04256832227110863,
0.03464274853467941,
0.001363214454613626,
-0.07875975221395493,
-0.0020708793308585882,
0.1053287535905838,
-0.12057627737522125,
0.09101185202598572,
-0.07650021463632584,
0.08435094356536865,
0.026271959766745567,
0.025397848337888718,
-0.03099856898188591,
-0.004832427948713303,
-0.02161227911710739,
-0.05154813826084137,
0.048976294696331024,
0.04889744147658348,
0.025649257004261017,
-0.026568636298179626,
0.02777072787284851,
-0.01672058179974556,
0.03489013761281967,
0.07082360237836838,
0.03773987665772438,
-0.04355297610163689,
0.020444363355636597,
0.003303470555692911,
0.007654574699699879,
-0.028980601578950882,
0.04381681978702545,
-0.007195322774350643,
0.04302360489964485,
-0.038821570575237274,
-0.11752241104841232,
0.052973423153162,
0.030819881707429886,
0.08767693489789963,
-0.006690363399684429,
0.014347328804433346,
0.04685584828257561,
0.028055930510163307,
-0.014322171919047832,
0.04588393494486809,
-0.0012383840512484312,
0.03263459727168083,
-0.019084881991147995,
0.10227003693580627,
-0.00021063296298962086,
-4.9084068365345956e-8,
-0.04228327050805092,
-0.038761820644140244,
0.0041674538515508175,
0.1260444074869156,
-0.011791594326496124,
-0.03909299150109291,
0.02294633910059929,
0.01851460337638855,
-0.026892323046922684,
0.01625889725983143,
-0.05129167437553406,
0.02058246359229088,
0.023660631850361824,
-0.0009529506787657738,
0.005122693721204996,
0.0023727768566459417,
0.04447244107723236,
0.02136610634624958,
0.0016932169673964381,
-0.04601193591952324,
-0.0519634373486042,
-0.044183921068906784,
0.014896850101649761,
-0.05785812437534332,
0.05620137229561806,
0.13680094480514526,
0.08704162389039993,
0.07016109675168991,
0.006019175983965397,
-0.02957744523882866,
-0.07442783564329147,
0.017450254410505295,
-0.059216901659965515,
0.047497235238552094,
-0.022819994017481804,
0.029442356899380684,
-0.14475083351135254,
0.06209927797317505,
-0.04264800623059273,
0.038021381944417953,
-0.0014310996048152447,
-0.017947416752576828,
-0.05647987872362137,
0.0345911979675293,
0.07404722273349762,
0.03831714391708374,
0.007112501189112663,
0.03855282440781593,
0.055151309818029404,
-0.00667736679315567,
-0.004877184052020311,
-0.07686430215835571,
-0.0026276693679392338,
-0.010376596823334694,
-0.046075236052274704,
-0.04043315723538399,
0.0014709815150126815,
-0.06304700672626495,
0.08145139366388321,
0.08787437528371811,
0.07577041536569595,
0.05852514132857323,
-0.01043390017002821,
0.03640030324459076
] | 0.111524
|
are understood/preferred by the webhook. # The first version in the list understood by the API server is sent to the webhook. # The webhook must respond with a ConversionReview object in the same version it received. conversionReviewVersions: ["v1","v1beta1"] clientConfig: service: namespace: default name: example-conversion-webhook-server path: /crdconvert caBundle: "Ci0tLS0tQk......tLS0K" # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/// plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the CamelCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . name: crontabs.example.com spec: # group name to use for REST API: /apis// group: example.com # prunes object fields that are not specified in OpenAPI schemas below. preserveUnknownFields: false # list of versions supported by this CustomResourceDefinition versions: - name: v1beta1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true # Each version can define its own schema when there is no top-level # schema is defined. schema: openAPIV3Schema: type: object properties: hostPort: type: string - name: v1 served: true storage: false schema: openAPIV3Schema: type: object properties: host: type: string port: type: string conversion: # the Webhook strategy instructs the API server to call an external webhook for any conversion between custom resources. strategy: Webhook # webhookClientConfig is required when strategy is `Webhook` and it configures the webhook endpoint to be called by API server. webhookClientConfig: service: namespace: default name: example-conversion-webhook-server path: /crdconvert caBundle: "Ci0tLS0tQk......tLS0K" # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/// plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the CamelCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` {{% /tab %}} {{< /tabs >}} You can save the CustomResourceDefinition in a YAML file, then use `kubectl apply` to apply it. ```shell kubectl apply -f my-versioned-crontab-with-conversion.yaml ``` Make sure the conversion service is up and running before applying new changes. ### Contacting the webhook Once the API server has determined a request should be sent to a conversion webhook, it needs to know how to contact the webhook. This is specified in the `webhookClientConfig` stanza of the webhook configuration. Conversion webhooks can either be called via a URL or a service reference, and can optionally include a custom CA bundle to use to verify the TLS connection. ### URL `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). The `host` should not refer to a service running in the cluster; use a service reference by specifying the `service` field instead. The host might be resolved via external DNS in some apiservers (i.e., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installations are likely to be non-portable
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.09674537926912308,
0.12352987378835678,
-0.08219189941883087,
-0.050232093781232834,
0.004649185109883547,
-0.04343966022133827,
-0.01905156672000885,
-0.009054679423570633,
0.01806218922138214,
0.002095042495056987,
-0.02316104806959629,
-0.18495063483715057,
0.059666506946086884,
-0.027786297723650932,
0.04570254310965538,
-0.012107484973967075,
0.0002835801860783249,
-0.03392793610692024,
0.020824790000915527,
-0.029331907629966736,
0.051683176308870316,
0.047282349318265915,
-0.026918012648820877,
-0.01793495938181877,
0.010192601010203362,
-0.0760868489742279,
-0.008172021247446537,
0.006054664961993694,
-0.019195886328816414,
0.06438352167606354,
-0.014227447099983692,
-0.03262330964207649,
-0.07265368849039078,
0.06977953761816025,
0.039675336331129074,
0.15838710963726044,
0.07083212584257126,
-0.033741891384124756,
0.03279944881796837,
0.09218212217092514,
0.0768904760479927,
0.001531514571979642,
-0.04151203855872154,
-0.11457590013742447,
-0.05626152828335762,
-0.06857368350028992,
-0.027148494496941566,
-0.04544401541352272,
-0.11377809941768646,
0.042657651007175446,
-0.015584397129714489,
-0.03622015193104744,
-0.11811581254005432,
0.09139008820056915,
0.030079495161771774,
0.001679230248555541,
-0.1321527510881424,
0.13336975872516632,
0.04076076298952103,
-0.027914544567465782,
-0.0033023797441273928,
-0.06757396459579468,
0.06865699589252472,
-0.008426346816122532,
-0.05177995190024376,
-0.057332850992679596,
-0.031688202172517776,
-0.022576816380023956,
0.0438387505710125,
-0.09196382761001587,
-0.08881781995296478,
0.00456602405756712,
-0.051694050431251526,
-0.0595003180205822,
0.02375412918627262,
0.050267282873392105,
0.01983640529215336,
0.04068861901760101,
0.03157637268304825,
-0.13849206268787384,
-0.03153098002076149,
0.00919139850884676,
-0.0006676697521470487,
0.06874944269657135,
-0.008959167636930943,
0.057632554322481155,
-0.033930592238903046,
-0.047307807952165604,
0.012579563073813915,
0.020838603377342224,
0.08818354457616806,
-0.05798785760998726,
-0.04643716663122177,
-0.05845192074775696,
0.025855088606476784,
0.04169803485274315,
-0.058913763612508774,
0.03580443561077118,
-0.026694942265748978,
0.06883080303668976,
-0.05323222279548645,
0.049385905265808105,
0.056624796241521835,
-0.052901122719049454,
0.02338561601936817,
-0.06255584210157394,
0.011204894632101059,
0.07595714181661606,
-0.020915167406201363,
-0.009387442842125893,
-0.004714932292699814,
0.09091480076313019,
0.001705908332951367,
-0.03091200441122055,
0.049073975533246994,
0.08498191833496094,
-0.031949467957019806,
-0.03446990251541138,
0.0663023516535759,
0.10607165843248367,
0.023561831563711166,
-0.03472335264086723,
-0.058230895549058914,
0.016414370387792587,
0.03071827068924904,
0.03304341435432434,
0.04392561689019203,
8.899683893122863e-33,
0.010426007211208344,
0.049522362649440765,
0.046039409935474396,
-0.06205657124519348,
0.0041171167977154255,
-0.0723126158118248,
-0.036164652556180954,
-0.001232427079230547,
-0.04414786398410797,
-0.08973567932844162,
0.022671738639473915,
0.03929457068443298,
0.00795151200145483,
-0.04036778211593628,
-0.05958343297243118,
-0.004803838673979044,
-0.01967189460992813,
0.045790527015924454,
-0.003737284103408456,
0.007922031916677952,
0.00017310435941908509,
0.031699247658252716,
-0.03488689661026001,
0.006074807606637478,
-0.03796101734042168,
-0.03222912922501564,
-0.01939539797604084,
0.003361726412549615,
-0.03648144006729126,
0.020049164071679115,
0.022309090942144394,
0.008176119066774845,
0.04961087927222252,
-0.0024949396029114723,
-0.10713202506303787,
-0.010772795416414738,
-0.02329300343990326,
-0.01696876809000969,
-0.061339836567640305,
-0.0266981590539217,
0.012840691953897476,
0.01205768808722496,
-0.09742096066474915,
0.012865337543189526,
0.02557159960269928,
-0.02329377271234989,
0.03632962703704834,
-0.08802645653486252,
0.022945290431380272,
-0.03379730507731438,
-0.07482293993234634,
0.012604188174009323,
0.06965979933738708,
0.0014975849771872163,
-0.01719360239803791,
-0.07829710096120834,
0.04843390733003616,
-0.07117894291877747,
0.00867153238505125,
-0.0556955523788929,
0.03159734606742859,
0.02226490154862404,
0.039367422461509705,
0.015812836587429047,
0.07175508886575699,
-0.047491565346717834,
0.01042549591511488,
0.004078597761690617,
-0.05844072997570038,
-0.03970272094011307,
0.0331086590886116,
0.031195437535643578,
0.002224631840363145,
0.027640584856271744,
0.05467836558818817,
-0.09756773710250854,
0.07089202851057053,
-0.00028251452022232115,
-0.07087872177362442,
0.020746542140841484,
0.0653388723731041,
0.0046488442458212376,
0.025525594130158424,
-0.0377841591835022,
-0.04384457692503929,
-0.0453820526599884,
0.02462918683886528,
-0.06264572590589523,
0.039395760744810104,
-0.00655255327001214,
0.03645220026373863,
0.004752067383378744,
-0.08441267162561417,
-0.044283948838710785,
-0.05999062582850456,
-8.008207344558471e-33,
0.05693983659148216,
-0.027099890634417534,
-0.008375498466193676,
-0.02874116040766239,
-0.03894990310072899,
0.037828631699085236,
0.06247112527489662,
0.004438366275280714,
0.024071170017123222,
-0.03297785669565201,
0.07218655943870544,
-0.03173599764704704,
-0.04427933692932129,
-0.03156263753771782,
0.03800234943628311,
0.004745757207274437,
-0.04484892264008522,
-0.04875405505299568,
0.06411036849021912,
0.008499356918036938,
0.01222058292478323,
0.06111207976937294,
0.04145681485533714,
0.0688094049692154,
0.06596239656209946,
-0.0009416411048732698,
-0.04748699814081192,
0.08434250205755234,
-0.013444938696920872,
-0.031480830162763596,
0.03962911665439606,
-0.1178816482424736,
-0.013284485787153244,
0.10444514453411102,
-0.07609889656305313,
-0.07654007524251938,
-0.011419020593166351,
0.07454213500022888,
0.0397980660200119,
-0.009094283916056156,
0.1127452701330185,
-0.10941845178604126,
-0.04067861661314964,
0.02385011874139309,
-0.05298272520303726,
0.018132485449314117,
0.034960608929395676,
0.048663508147001266,
-0.046958182007074356,
-0.032863277941942215,
0.016661308705806732,
0.0691722109913826,
-0.08017144352197647,
0.013417227193713188,
-0.0025302122812718153,
0.11117072403430939,
-0.008731021545827389,
0.012122387997806072,
-0.08037281036376953,
-0.048881080001592636,
-0.03682195767760277,
-0.03598405793309212,
-0.0007976907072588801,
0.08472257852554321,
0.029797246679663658,
-0.03837829828262329,
-0.05419694632291794,
0.022034933790564537,
0.016745228320360184,
0.004800995346158743,
0.0020493464544415474,
-0.04344358295202255,
-0.024754518643021584,
-0.06468094885349274,
0.01563955657184124,
-0.01614736206829548,
0.03983953595161438,
-0.031072858721017838,
-0.029304025694727898,
0.012039938010275364,
-0.12882056832313538,
0.02939165197312832,
0.04444003477692604,
0.0681324154138565,
-0.005422652233392,
0.006526978686451912,
0.003893946995958686,
0.041743651032447815,
-0.021018382161855698,
0.035932742059230804,
0.003318059490993619,
-0.019191749393939972,
-0.035223059356212616,
0.08837547153234482,
0.041405774652957916,
-5.6306198814581876e-8,
-0.048666972666978836,
0.008241153322160244,
0.01427679043263197,
0.11610473692417145,
0.027551710605621338,
0.009966455399990082,
0.031726375222206116,
-0.027421338483691216,
-0.044018007814884186,
0.09903346002101898,
-0.05147206410765648,
-0.05283152684569359,
0.017933813855051994,
0.014236514456570148,
-0.00848405621945858,
0.025229061022400856,
0.03381980210542679,
0.05284135416150093,
0.024228869006037712,
0.022313080728054047,
-0.044191211462020874,
-0.07151924818754196,
0.041392285376787186,
-0.03370227292180061,
0.07240166515111923,
0.10025715082883835,
-0.024788375943899155,
0.06553856283426285,
-0.06594762206077576,
-0.012624216265976429,
-0.02506059594452381,
-0.010308164171874523,
-0.016379464417696,
0.03739430755376816,
-0.024739177897572517,
0.0317184217274189,
-0.12201506644487381,
0.05031745135784149,
-0.03722033277153969,
0.023215550929307938,
0.059322603046894073,
0.011037792079150677,
0.004918240942060947,
0.020994016900658607,
0.005090019665658474,
0.051462721079587936,
0.02353929728269577,
0.036879781633615494,
0.07341590523719788,
0.04064241796731949,
-0.012723078951239586,
-0.015920765697956085,
0.05041736364364624,
-0.017603818327188492,
0.012057497166097164,
0.009434846229851246,
0.009259343147277832,
-0.06555180251598358,
0.07668839395046234,
0.06522248685359955,
0.0695796087384224,
0.042224783450365067,
0.020091520622372627,
-0.001309378887526691
] | 0.071537
|
may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installations are likely to be non-portable or not readily run in a new cluster. The scheme must be "https"; the URL must begin with "https://". Attempting to use a user or basic auth (for example "user:password@") is not allowed. Fragments ("#...") and query parameters ("?...") are also not allowed. Here is an example of a conversion webhook configured to call a URL (and expects the TLS certificate to be verified using system trust roots, so does not specify a caBundle): {{< tabs name="CustomResourceDefinition\_versioning\_example\_3" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook webhook: clientConfig: url: "https://my-webhook.example.com:9443/my-webhook-path" ... ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook webhookClientConfig: url: "https://my-webhook.example.com:9443/my-webhook-path" ... ``` {{% /tab %}} {{< /tabs >}} ### Service Reference The `service` stanza inside `webhookClientConfig` is a reference to the service for a conversion webhook. If the webhook is running within the cluster, then you should use `service` instead of `url`. The service namespace and name are required. The port is optional and defaults to 443. The path is optional and defaults to "/". Here is an example of a webhook that is configured to call a service on port "1234" at the subpath "/my-path", and to verify the TLS connection against the ServerName `my-service-name.my-service-namespace.svc` using a custom CA bundle. {{< tabs name="CustomResourceDefinition\_versioning\_example\_4" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook webhook: clientConfig: service: namespace: my-service-namespace name: my-service-name path: /my-path port: 1234 caBundle: "Ci0tLS0tQk......tLS0K" ... ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook webhookClientConfig: service: namespace: my-service-namespace name: my-service-name path: /my-path port: 1234 caBundle: "Ci0tLS0tQk......tLS0K" ... ``` {{% /tab %}} {{< /tabs >}} ## Webhook request and response ### Request Webhooks are sent a POST request, with `Content-Type: application/json`, with a `ConversionReview` API object in the `apiextensions.k8s.io` API group serialized to JSON as the body. Webhooks can specify what versions of `ConversionReview` objects they accept with the `conversionReviewVersions` field in their CustomResourceDefinition: {{< tabs name="conversionReviewVersions" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook webhook: conversionReviewVersions: ["v1", "v1beta1"] ... ``` `conversionReviewVersions` is a required field when creating `apiextensions.k8s.io/v1` custom resource definitions. Webhooks are required to support at least one `ConversionReview` version understood by the current and previous API server. {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition ... spec: ... conversion: strategy: Webhook conversionReviewVersions: ["v1", "v1beta1"] ... ``` If no `conversionReviewVersions` are specified, the default when creating `apiextensions.k8s.io/v1beta1` custom resource definitions is `v1beta1`. {{% /tab %}} {{< /tabs >}} API servers send the first `ConversionReview` version in the `conversionReviewVersions` list they support. If none of the versions in the list are supported by the API server, the custom resource definition will not be allowed to be created. If an API server encounters a conversion webhook configuration that was previously created and does not support any of the `ConversionReview` versions the API server knows how to send, attempts to call to the webhook will fail. This example shows the data contained in an `ConversionReview` object for
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.04794711992144585,
0.08676038682460785,
-0.058083996176719666,
-0.06969791650772095,
-0.04390217736363411,
-0.09113242477178574,
-0.08580754697322845,
-0.04623860865831375,
0.03087802603840828,
-0.0035122381523251534,
-0.0021715809125453234,
-0.11237995326519012,
0.04391026496887207,
-0.007907647639513016,
0.11062479764223099,
0.021378934383392334,
0.011811847798526287,
-0.03345052897930145,
0.03560784459114075,
-0.027564477175474167,
0.02451949380338192,
0.006121959537267685,
-0.043150097131729126,
-0.0072900704108178616,
0.0011848467402160168,
-0.08509072661399841,
0.0008771725697442889,
0.0714285597205162,
-0.02132463827729225,
0.06879635155200958,
-0.009573688730597496,
-0.07286719232797623,
-0.04865655675530434,
0.06462613493204117,
-0.009954007342457771,
0.09342677146196365,
0.07561475783586502,
-0.010453006252646446,
-0.054686397314071655,
0.09088588505983353,
0.07406425476074219,
-0.06104563549160957,
-0.039706770330667496,
-0.09988324344158173,
-0.053416114300489426,
-0.010978606529533863,
-0.048312604427337646,
-0.03914712369441986,
-0.11711568385362625,
0.02100970223546028,
-0.07690448313951492,
-0.022745227441191673,
-0.021187368780374527,
0.018051786348223686,
-0.034789830446243286,
-0.02071957290172577,
-0.06216911971569061,
0.13685166835784912,
0.023349741473793983,
-0.04022304341197014,
0.0734579861164093,
-0.07442119717597961,
0.06979899108409882,
-0.014586937613785267,
-0.06727153807878494,
-0.04700016230344772,
-0.05431947484612465,
-0.009568670764565468,
0.05933847278356552,
-0.06995653361082077,
-0.05721479281783104,
-0.004134135786443949,
-0.037806186825037,
-0.0005906231235712767,
-0.031389087438583374,
0.029299257323145866,
0.009570278227329254,
-0.003622998483479023,
0.059586260467767715,
-0.036767225712537766,
-0.011575620621442795,
-0.04952794313430786,
0.034901347011327744,
0.09897121787071228,
-0.07632950693368912,
0.04727419838309288,
-0.06163879111409187,
-0.054186996072530746,
0.008325084112584591,
-0.012659489177167416,
0.08356636017560959,
-0.031670425087213516,
-0.08623737841844559,
-0.06054177135229111,
0.11739689111709595,
0.01556197740137577,
-0.015577519312500954,
0.021257121115922928,
-0.09412798285484314,
0.04783346503973007,
-0.04068771004676819,
-0.00205804081633687,
0.01444150134921074,
-0.03743044659495354,
0.0494360476732254,
-0.013599437661468983,
-0.0016507807886227965,
0.0024862352292984724,
0.0555257685482502,
0.03612612932920456,
-0.013547909446060658,
-0.014743016101419926,
-0.012592755258083344,
-0.009368732571601868,
0.011978864669799805,
0.09732106328010559,
0.01635853759944439,
-0.03563988581299782,
-0.02030724473297596,
0.06370612233877182,
-0.01923133060336113,
-0.005984766874462366,
-0.01444028690457344,
0.018165597692131996,
0.015705054625868797,
0.03132458031177521,
0.05406634882092476,
2.9666940918350653e-33,
0.1062055304646492,
0.08695726096630096,
0.04903770983219147,
-0.06595011055469513,
0.03177311271429062,
-0.05656956881284714,
0.05192538723349571,
-0.036657314747571945,
-0.006375913042575121,
-0.05946910008788109,
0.04642481729388237,
0.023923231288790703,
0.04122866317629814,
-0.07984665036201477,
0.006162405014038086,
0.07025957107543945,
-0.03628157079219818,
0.029355792328715324,
0.0359477661550045,
0.07137063145637512,
-0.005157191772013903,
-0.06805995106697083,
-0.0010528304846957326,
0.01652107760310173,
-0.09223111718893051,
-0.030429475009441376,
-0.028620880097150803,
-0.015407536178827286,
0.012301520444452763,
0.02992740273475647,
0.005189619958400726,
-0.013689989224076271,
-0.005143272690474987,
-0.02702559344470501,
-0.03651007264852524,
-0.009665373712778091,
-0.006417703349143267,
-0.007635602727532387,
-0.020528340712189674,
-0.06599292904138565,
-0.008275662548840046,
-0.03221913427114487,
-0.0003765953006222844,
0.007160721346735954,
-0.0318167582154274,
0.023427411913871765,
-0.023989718407392502,
-0.046779926866292953,
0.0618143193423748,
0.05880627781152725,
-0.12368645519018173,
-0.06581296771764755,
0.04932086169719696,
-0.004783203359693289,
0.06600714474916458,
-0.0016698107356205583,
0.022480325773358345,
-0.021839061751961708,
-0.06037959083914757,
-0.05786954611539841,
-0.013837993144989014,
0.011011277325451374,
0.003658807836472988,
-0.01631929725408554,
0.042184993624687195,
-0.010355142876505852,
0.02201675809919834,
0.11647193133831024,
-0.07494766265153885,
-0.012659182772040367,
0.042476095259189606,
0.015170211903750896,
0.015107880346477032,
0.07209991663694382,
-0.06996744871139526,
-0.03691090643405914,
0.08509333431720734,
0.0589461624622345,
-0.026660913601517677,
-0.00047154363710433245,
0.0777917131781578,
-0.01112938392907381,
-0.01693842001259327,
0.05507834628224373,
-0.023141365498304367,
0.02568097785115242,
0.05589865893125534,
0.004706263542175293,
-0.017276789993047714,
0.06284793466329575,
0.054499730467796326,
0.022104395553469658,
-0.0002734943409450352,
-0.034135572612285614,
-0.07770206779241562,
-3.933594215039053e-33,
0.04303313419222832,
-0.030484942719340324,
-0.08626402169466019,
-0.0002497296081855893,
0.043355777859687805,
0.03541326895356178,
0.07795599102973938,
-0.005399090703576803,
-0.019044820219278336,
-0.009744357317686081,
0.019240541383624077,
-0.006579345557838678,
0.055789925158023834,
-0.04572635889053345,
-0.021063296124339104,
0.012629599310457706,
-0.033825039863586426,
-0.006563232280313969,
0.06922901421785355,
-0.021237460896372795,
-0.01567157171666622,
0.04339390993118286,
-0.013764593750238419,
0.026188045740127563,
0.03288625553250313,
-0.017867259681224823,
-0.03757366165518761,
0.026270262897014618,
-0.10541015863418579,
-0.06033604219555855,
0.0920245423913002,
-0.0336671881377697,
0.014798025600612164,
0.05594976991415024,
-0.025701439008116722,
-0.08414816111326218,
-0.05517740547657013,
0.049560416489839554,
0.06228886917233467,
-0.11838976293802261,
0.0725453644990921,
-0.12316717207431793,
-0.020172666758298874,
0.018244974315166473,
-0.016978168860077858,
-0.0015401929849758744,
0.021180983632802963,
0.003171105869114399,
-0.09137722849845886,
-0.006844715215265751,
-0.0221096184104681,
0.030218549072742462,
0.020336318761110306,
0.04472753778100014,
-0.0763455256819725,
0.14565065503120422,
-0.038132064044475555,
0.07869002968072891,
-0.02670578844845295,
-0.009619266726076603,
-0.028818629682064056,
-0.040124502032995224,
-0.026419328525662422,
0.10193335264921188,
0.008115692995488644,
-0.006715310271829367,
-0.07796245813369751,
0.052010297775268555,
-0.012136461213231087,
0.0402609258890152,
-0.005456116516143084,
-0.018885990604758263,
0.04951908811926842,
-0.02728583849966526,
0.03255088999867439,
-0.015879010781645775,
0.026023410260677338,
0.019572706893086433,
-0.02081453800201416,
-0.04554073140025139,
-0.0854136198759079,
0.07396761327981949,
0.03822794929146767,
-0.0026571950875222683,
0.07988494634628296,
-0.0011954759247601032,
-0.008392579853534698,
0.09460373967885971,
-0.03810872882604599,
0.05674606189131737,
-0.005981619004160166,
0.039449844509363174,
-0.08523201942443848,
0.06655678898096085,
0.05391635000705719,
-6.132820118409654e-8,
0.03852444142103195,
0.034462470561265945,
-0.04550744220614433,
0.06304777413606644,
0.017144853249192238,
0.08059384673833847,
0.06281311064958572,
-0.0625537559390068,
-0.06224608048796654,
0.10764763504266739,
-0.028489671647548676,
0.018175076693296432,
-0.02873552031815052,
0.0045967078767716885,
-0.0636807456612587,
-0.06227390840649605,
0.010147379711270332,
0.018490705639123917,
0.012471681460738182,
-0.04638904705643654,
-0.015088917687535286,
-0.12104067206382751,
0.03377771005034447,
-0.04338567331433296,
0.04398910701274872,
0.11049958318471909,
-0.008773667737841606,
-0.004195594694465399,
-0.06329867243766785,
-0.023713350296020508,
-0.05925381928682327,
-0.0285007506608963,
-0.040436599403619766,
0.02436005137860775,
-0.04011578485369682,
0.04661355912685394,
-0.15018828213214874,
0.03210579976439476,
-0.03924588859081268,
-0.06633861362934113,
0.02097892388701439,
0.04586382955312729,
0.015124845318496227,
0.00001216670989379054,
0.03084772638976574,
0.040642980486154556,
0.05756841599941254,
0.01376941055059433,
0.09400308132171631,
0.08116770535707474,
-0.05022956430912018,
-0.026040486991405487,
0.0832393541932106,
0.03266863897442818,
0.0034830491058528423,
0.054543815553188324,
-0.07260571420192719,
-0.024447621777653694,
0.021398967131972313,
0.0648539587855339,
0.07983621954917908,
0.02220049314200878,
0.03974342718720436,
0.034188881516456604
] | 0.065359
|
be created. If an API server encounters a conversion webhook configuration that was previously created and does not support any of the `ConversionReview` versions the API server knows how to send, attempts to call to the webhook will fail. This example shows the data contained in an `ConversionReview` object for a request to convert `CronTab` objects to `example.com/v1`: {{< tabs name="ConversionReview\_request" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml { "apiVersion": "apiextensions.k8s.io/v1", "kind": "ConversionReview", "request": { # Random uid uniquely identifying this conversion call "uid": "705ab4f5-6393-11e8-b7cc-42010a800002", # The API group and version the objects should be converted to "desiredAPIVersion": "example.com/v1", # The list of objects to convert. # May contain one or more objects, in one or more versions. "objects": [ { "kind": "CronTab", "apiVersion": "example.com/v1beta1", "metadata": { "creationTimestamp": "2019-09-04T14:03:02Z", "name": "local-crontab", "namespace": "default", "resourceVersion": "143", "uid": "3415a7fc-162b-4300-b5da-fd6083580d66" }, "hostPort": "localhost:1234" }, { "kind": "CronTab", "apiVersion": "example.com/v1beta1", "metadata": { "creationTimestamp": "2019-09-03T13:02:01Z", "name": "remote-crontab", "resourceVersion": "12893", "uid": "359a83ec-b575-460d-b553-d859cedde8a0" }, "hostPort": "example.com:2345" } ] } } ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml { # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 "apiVersion": "apiextensions.k8s.io/v1beta1", "kind": "ConversionReview", "request": { # Random uid uniquely identifying this conversion call "uid": "705ab4f5-6393-11e8-b7cc-42010a800002", # The API group and version the objects should be converted to "desiredAPIVersion": "example.com/v1", # The list of objects to convert. # May contain one or more objects, in one or more versions. "objects": [ { "kind": "CronTab", "apiVersion": "example.com/v1beta1", "metadata": { "creationTimestamp": "2019-09-04T14:03:02Z", "name": "local-crontab", "namespace": "default", "resourceVersion": "143", "uid": "3415a7fc-162b-4300-b5da-fd6083580d66" }, "hostPort": "localhost:1234" }, { "kind": "CronTab", "apiVersion": "example.com/v1beta1", "metadata": { "creationTimestamp": "2019-09-03T13:02:01Z", "name": "remote-crontab", "resourceVersion": "12893", "uid": "359a83ec-b575-460d-b553-d859cedde8a0" }, "hostPort": "example.com:2345" } ] } } ``` {{% /tab %}} {{< /tabs >}} ### Response Webhooks respond with a 200 HTTP status code, `Content-Type: application/json`, and a body containing a `ConversionReview` object (in the same version they were sent), with the `response` stanza populated, serialized to JSON. If conversion succeeds, a webhook should return a `response` stanza containing the following fields: \* `uid`, copied from the `request.uid` sent to the webhook \* `result`, set to `{"status":"Success"}` \* `convertedObjects`, containing all of the objects from `request.objects`, converted to `request.desiredAPIVersion` Example of a minimal successful response from a webhook: {{< tabs name="ConversionReview\_response\_success" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml { "apiVersion": "apiextensions.k8s.io/v1", "kind": "ConversionReview", "response": { # must match "uid": "705ab4f5-6393-11e8-b7cc-42010a800002", "result": { "status": "Success" }, # Objects must match the order of request.objects, and have apiVersion set to . # kind, metadata.uid, metadata.name, and metadata.namespace fields must not be changed by the webhook. # metadata.labels and metadata.annotations fields may be changed by the webhook. # All other changes to metadata fields by the webhook are ignored. "convertedObjects": [ { "kind": "CronTab", "apiVersion": "example.com/v1", "metadata": { "creationTimestamp": "2019-09-04T14:03:02Z", "name": "local-crontab", "namespace": "default", "resourceVersion": "143", "uid": "3415a7fc-162b-4300-b5da-fd6083580d66" }, "host": "localhost", "port": "1234" }, { "kind": "CronTab", "apiVersion": "example.com/v1", "metadata": { "creationTimestamp": "2019-09-03T13:02:01Z", "name": "remote-crontab", "resourceVersion": "12893", "uid": "359a83ec-b575-460d-b553-d859cedde8a0" }, "host": "example.com", "port": "2345" } ] } } ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml { # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 "apiVersion": "apiextensions.k8s.io/v1beta1", "kind": "ConversionReview", "response": { # must match "uid": "705ab4f5-6393-11e8-b7cc-42010a800002", "result": { "status": "Failed" }, # Objects must match the order of request.objects, and have apiVersion set to . # kind, metadata.uid, metadata.name, and metadata.namespace fields must not be changed by the webhook. # metadata.labels and metadata.annotations fields may be changed by the webhook. # All other changes to metadata fields by the webhook are ignored. "convertedObjects": [ { "kind": "CronTab", "apiVersion": "example.com/v1", "metadata": { "creationTimestamp": "2019-09-04T14:03:02Z", "name": "local-crontab", "namespace": "default", "resourceVersion": "143", "uid": "3415a7fc-162b-4300-b5da-fd6083580d66" }, "host": "localhost", "port": "1234"
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.09228035062551498,
0.06901421397924423,
-0.04282693937420845,
-0.04341505095362663,
-0.029128987342119217,
-0.04752075672149658,
-0.01121711265295744,
-0.04280256852507591,
0.020971018821001053,
0.026890942826867104,
-0.016487693414092064,
-0.12284788489341736,
0.011335293762385845,
-0.030741030350327492,
0.03663528338074684,
0.0029415450990200043,
-0.02625880390405655,
-0.05456608906388283,
-0.0497252382338047,
-0.021944211795926094,
0.051176607608795166,
0.05723866447806358,
-0.033302418887615204,
0.009518598206341267,
0.003145628608763218,
-0.03548640012741089,
0.011566409841179848,
0.010506464168429375,
-0.013083727099001408,
0.029658328741788864,
-0.022328265011310577,
-0.03129926696419716,
-0.13760679960250854,
0.048680949956178665,
0.10987017303705215,
0.12053465098142624,
0.036959122866392136,
-0.06019173935055733,
0.03754449263215065,
0.06781615316867828,
0.039560217410326004,
0.039706502109766006,
-0.05962734669446945,
-0.07462681084871292,
-0.015482835471630096,
-0.04675142094492912,
-0.032901909202337265,
-0.06684315949678421,
-0.08645077049732208,
-0.007827402092516422,
-0.03396974876523018,
-0.02696332149207592,
-0.08010929077863693,
0.04620922729372978,
0.03863707184791565,
-0.0077741509303450584,
-0.10490449517965317,
0.11528538167476654,
0.013721217401325703,
-0.004577875602990389,
-0.013327568769454956,
-0.04735196754336357,
0.09276337921619415,
-0.027834802865982056,
-0.09445212036371231,
-0.010473795235157013,
-0.026882722973823547,
-0.010827933438122272,
0.04577697813510895,
-0.07054954022169113,
-0.0653107687830925,
-0.007916099391877651,
-0.08622349053621292,
-0.0355076864361763,
0.0620352178812027,
-0.011364779435098171,
-0.018283748999238014,
-0.001368799014016986,
-0.015281664207577705,
-0.11136619746685028,
-0.025003286078572273,
-0.00791504979133606,
-0.015604319982230663,
0.0874200388789177,
-0.0179046168923378,
0.035189807415008545,
-0.008126575499773026,
0.00008593006350565702,
0.02768070250749588,
0.004463906399905682,
-0.008531125262379646,
-0.056527115404605865,
0.008756962604820728,
-0.055218685418367386,
0.04570300132036209,
0.056875307112932205,
-0.0431099496781826,
0.03798576444387436,
0.012922593392431736,
0.0930500403046608,
-0.002700285753235221,
0.07198578119277954,
0.016081353649497032,
-0.0040251268073916435,
0.07202725112438202,
-0.05512264370918274,
0.008706585504114628,
0.03787072375416756,
-0.03414054214954376,
0.030574582517147064,
-0.007096773479133844,
0.09255246818065643,
0.0035780088510364294,
-0.014862933196127415,
0.058804649859666824,
0.025420837104320526,
-0.045279014855623245,
0.0006410274072550237,
-0.004034400451928377,
0.0921468660235405,
0.041233330965042114,
-0.01729167439043522,
-0.017933232709765434,
0.035611171275377274,
-0.00031609070720151067,
0.029799558222293854,
0.04057399928569794,
7.192743403506034e-33,
-0.0006281480891630054,
0.006241998169571161,
0.04143078252673149,
-0.06758947670459747,
0.014981412328779697,
-0.08193770051002502,
-0.03189462795853615,
0.04541218280792236,
0.017564598470926285,
-0.07369236648082733,
-0.02313586138188839,
0.010643786750733852,
0.008168602362275124,
-0.08280204236507416,
-0.00009323779522674158,
-0.015291448682546616,
-0.06838101893663406,
0.051222383975982666,
0.01182271633297205,
0.04362735524773598,
0.019757073372602463,
-0.030111348256468773,
-0.05902398005127907,
0.02018449828028679,
-0.05339199677109718,
0.024071991443634033,
-0.02755899168550968,
0.029924795031547546,
-0.03874833136796951,
0.0006217696936801076,
0.005545235704630613,
-0.007404995150864124,
0.00021904738969169557,
0.01259627379477024,
-0.11162254959344864,
-0.0458100326359272,
0.015185768716037273,
-0.017159326002001762,
-0.05370863899588585,
-0.06340862065553665,
0.021821318194270134,
0.02079506777226925,
-0.11233191937208176,
0.034738779067993164,
0.026587365195155144,
-0.0402647964656353,
-0.008614185266196728,
-0.060551486909389496,
0.07157598435878754,
-0.029221737757325172,
-0.07645699381828308,
0.013237107545137405,
0.08695736527442932,
-0.019037585705518723,
-0.026764219626784325,
-0.08936507999897003,
0.057172615081071854,
-0.07940780371427536,
0.016725951805710793,
-0.04039020463824272,
0.01641439087688923,
0.0028352392837405205,
0.02926584891974926,
0.042665231972932816,
0.04238925129175186,
-0.08164870738983154,
0.04814780130982399,
-0.025639118626713753,
-0.07689551264047623,
-0.03978930041193962,
-0.01773996837437153,
0.004028728697448969,
-0.04249849542975426,
-0.013331921771168709,
0.029982393607497215,
-0.14486494660377502,
0.07335557043552399,
0.05990514159202576,
-0.020443027839064598,
0.020673859864473343,
0.08796436339616776,
-0.020836116746068,
0.009530004113912582,
-0.05321526899933815,
0.009771148674190044,
-0.04405837878584862,
0.02278490737080574,
-0.09268182516098022,
0.012579419650137424,
0.05511379614472389,
0.0317944698035717,
-0.03444095700979233,
-0.13990065455436707,
-0.049841031432151794,
-0.029801592230796814,
-7.1890846773391e-33,
0.0531243197619915,
-0.010641981847584248,
-0.0238889679312706,
-0.02668130397796631,
-0.01564648747444153,
0.024897964671254158,
0.04061070829629898,
0.06102616339921951,
0.031007295474410057,
-0.0332464873790741,
0.04546602442860603,
-0.04805120453238487,
0.07874755561351776,
-0.012381913140416145,
0.01158941350877285,
-0.00015120899479370564,
-0.07783335447311401,
-0.022361930459737778,
0.05846165865659714,
0.014877651818096638,
0.03299636393785477,
0.12799181044101715,
0.03828718885779381,
0.04310275986790657,
0.024572016671299934,
-0.0034039842430502176,
-0.03513642027974129,
0.1300138384103775,
0.008970526978373528,
-0.05748726800084114,
0.069675013422966,
-0.1214369684457779,
-0.052380841225385666,
0.07144927978515625,
-0.07006490230560303,
-0.07206214219331741,
0.0385562926530838,
0.10095527768135071,
-0.028827087953686714,
0.02174842543900013,
0.09051591157913208,
-0.05057385191321373,
-0.04240725561976433,
0.06756146997213364,
-0.04080856218934059,
0.03563838452100754,
0.05798446759581566,
0.09842074662446976,
-0.03873428702354431,
-0.05004148930311203,
0.01874692738056183,
0.07171202450990677,
-0.05838626250624657,
0.027887461706995964,
-0.031758591532707214,
0.08546196669340134,
0.03988853469491005,
-0.02874748408794403,
-0.05740048363804817,
-0.010761277750134468,
-0.024031078442931175,
-0.10941371321678162,
0.061026208102703094,
0.04592503234744072,
0.03345545381307602,
-0.044288549572229385,
-0.013907267712056637,
0.020981840789318085,
0.060192227363586426,
0.042520858347415924,
0.054881006479263306,
-0.036413416266441345,
0.007392700295895338,
-0.05098768323659897,
0.07571840286254883,
-0.037081483751535416,
-0.04270089417695999,
-0.012705701403319836,
-0.004954185802489519,
-0.022282598540186882,
-0.08556079119443893,
0.025949720293283463,
0.079192154109478,
0.09635317325592041,
0.00946872215718031,
-0.013794636353850365,
0.03677062690258026,
0.0625130906701088,
-0.0076001728884875774,
0.014850609004497528,
-0.00039280441706068814,
-0.028644759207963943,
-0.058665934950113297,
0.09111152589321136,
0.00009843143925536424,
-6.014303721713077e-8,
-0.061313096433877945,
0.01244409941136837,
0.00827436987310648,
0.11943051218986511,
0.065288245677948,
0.006078954320400953,
-0.017998212948441505,
-0.030151227489113808,
-0.0194238293915987,
-0.010178484953939915,
-0.052950505167245865,
0.01436997577548027,
-0.02525753527879715,
0.02254629321396351,
-0.026508161798119545,
-0.01565217226743698,
-0.012305505573749542,
0.07659760862588882,
0.0036728389095515013,
0.011449185200035572,
-0.01965532824397087,
-0.058273255825042725,
0.07254991680383682,
-0.08662407100200653,
0.06536060571670532,
0.11868662387132645,
-0.015431557781994343,
0.05833383649587631,
-0.04172646999359131,
-0.03928414359688759,
-0.030355971306562424,
-0.009857594035565853,
-0.004231876693665981,
0.01513892225921154,
-0.056776776909828186,
0.019081074744462967,
-0.0431625135242939,
0.040231768041849136,
-0.060445837676525116,
-0.05301734805107117,
0.043709903955459595,
0.0027320710942149162,
-0.06343207508325577,
0.04798438027501106,
0.0118374889716506,
0.02982601709663868,
0.02415817230939865,
0.00697712879627943,
0.11406537145376205,
0.002296427497640252,
-0.0052407472394406796,
-0.04327990114688873,
0.05040157213807106,
0.013260206207633018,
-0.050486765801906586,
-0.012822587043046951,
0.02826966904103756,
-0.07491471618413925,
0.06021672859787941,
0.0934685543179512,
0.11307350546121597,
0.08062352985143661,
0.03282531350851059,
0.03677137941122055
] | 0.098422
|
by the webhook. # metadata.labels and metadata.annotations fields may be changed by the webhook. # All other changes to metadata fields by the webhook are ignored. "convertedObjects": [ { "kind": "CronTab", "apiVersion": "example.com/v1", "metadata": { "creationTimestamp": "2019-09-04T14:03:02Z", "name": "local-crontab", "namespace": "default", "resourceVersion": "143", "uid": "3415a7fc-162b-4300-b5da-fd6083580d66" }, "host": "localhost", "port": "1234" }, { "kind": "CronTab", "apiVersion": "example.com/v1", "metadata": { "creationTimestamp": "2019-09-03T13:02:01Z", "name": "remote-crontab", "resourceVersion": "12893", "uid": "359a83ec-b575-460d-b553-d859cedde8a0" }, "host": "example.com", "port": "2345" } ] } } ``` {{% /tab %}} {{< /tabs >}} If conversion fails, a webhook should return a `response` stanza containing the following fields: \* `uid`, copied from the `request.uid` sent to the webhook \* `result`, set to `{"status":"Failed"}` {{< warning >}} Failing conversion can disrupt read and write access to the custom resources, including the ability to update or delete the resources. Conversion failures should be avoided whenever possible, and should not be used to enforce validation constraints (use validation schemas or webhook admission instead). {{< /warning >}} Example of a response from a webhook indicating a conversion request failed, with an optional message: {{< tabs name="ConversionReview\_response\_failure" >}} {{% tab name="apiextensions.k8s.io/v1" %}} ```yaml { "apiVersion": "apiextensions.k8s.io/v1", "kind": "ConversionReview", "response": { "uid": "", "result": { "status": "Failed", "message": "hostPort could not be parsed into a separate host and port" } } } ``` {{% /tab %}} {{% tab name="apiextensions.k8s.io/v1beta1" %}} ```yaml { # Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 "apiVersion": "apiextensions.k8s.io/v1beta1", "kind": "ConversionReview", "response": { "uid": "", "result": { "status": "Failed", "message": "hostPort could not be parsed into a separate host and port" } } } ``` {{% /tab %}} {{< /tabs >}} ## Writing, reading, and updating versioned CustomResourceDefinition objects When an object is written, it is stored at the version designated as the storage version at the time of the write. If the storage version changes, existing objects are never converted automatically. However, newly-created or updated objects are written at the new storage version. It is possible for an object to have been written at a version that is no longer served. When you read an object, you specify the version as part of the path. You can request an object at any version that is currently served. If you specify a version that is different from the object's stored version, Kubernetes returns the object to you at the version you requested, but the stored object is not changed on disk. What happens to the object that is being returned while serving the read request depends on what is specified in the CRD's `spec.conversion`: - if the default `strategy` value `None` is specified, the only modifications to the object are changing the `apiVersion` string and perhaps [pruning unknown fields](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning) (depending on the configuration). Note that this is unlikely to lead to good results if the schemas differ between the storage and requested version. In particular, you should not use this strategy if the same data is represented in different fields between versions. - if [webhook conversion](#webhook-conversion) is specified, then this mechanism controls the conversion. If you update an existing object, it is rewritten at the version that is currently the storage version. This is the only way that objects can change from one version to another. To illustrate this, consider the following hypothetical series of events: 1. The storage version is `v1beta1`. You create an object. It is stored at version `v1beta1` 2. You add version `v1` to your CustomResourceDefinition and designate it as the storage version. Here the schemas for `v1` and `v1beta1` are identical, which is typically the case when promoting an API to stable in the Kubernetes ecosystem. 3. You read your
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.041760411113500595,
0.10431013256311417,
-0.07624776661396027,
-0.04545772448182106,
0.029580285772681236,
-0.05433743819594383,
-0.04063650593161583,
-0.013588703237473965,
0.017751963809132576,
0.03714943677186966,
-0.019404541701078415,
-0.1612856239080429,
-0.028395721688866615,
-0.04784737527370453,
0.048609644174575806,
0.012012828141450882,
-0.05912444368004799,
-0.07754074782133102,
-0.011273352429270744,
-0.021652139723300934,
0.008166283369064331,
0.04562476649880409,
0.01862405799329281,
-0.008430738933384418,
0.008709178306162357,
-0.03641019016504288,
-0.046750396490097046,
0.0572853684425354,
-0.01680862158536911,
0.04217362403869629,
-0.015688244253396988,
-0.017466334626078606,
-0.07613684237003326,
0.040992069989442825,
0.0902523323893547,
0.14566877484321594,
0.08744371682405472,
0.012924158945679665,
0.038766276091337204,
0.09735725820064545,
0.06783289462327957,
-0.01809047907590866,
0.013330770656466484,
-0.08246468007564545,
-0.05815443769097328,
-0.06042403355240822,
-0.03503664582967758,
-0.08821365237236023,
-0.07181619107723236,
0.05560693517327309,
-0.06963735818862915,
-0.0001614930370124057,
-0.08879876136779785,
0.07798074930906296,
0.04588158801198006,
0.030942320823669434,
-0.053963225334882736,
0.11133749783039093,
0.040888462215662,
-0.01076801959425211,
-0.008728614076972008,
-0.029464449733495712,
0.058618590235710144,
-0.012674864381551743,
-0.038387298583984375,
-0.05965916067361832,
-0.03378213569521904,
-0.06291492283344269,
0.024438591673970222,
-0.06378353387117386,
-0.04829772561788559,
0.0036262907087802887,
-0.07879117876291275,
-0.061071038246154785,
0.045012980699539185,
0.07315470278263092,
-0.023305470123887062,
0.05630175769329071,
0.06911544501781464,
-0.11460191756486893,
-0.023142125457525253,
-0.013293720781803131,
-0.027765508741140366,
0.056874535977840424,
-0.05424319952726364,
0.011441824957728386,
-0.020685257390141487,
-0.03506967052817345,
-0.03311123326420784,
0.04076492413878441,
0.05668703839182854,
-0.0758025273680687,
-0.05026976019144058,
-0.03278784081339836,
-0.03995761275291443,
0.031093642115592957,
-0.0726885125041008,
0.07043837755918503,
-0.0060719759203493595,
0.07187103480100632,
0.002282051369547844,
0.038534197956323624,
-0.000995946116745472,
-0.010618084110319614,
0.08070923388004303,
-0.05307576432824135,
0.006086025852710009,
0.050642307847738266,
-0.05262117460370064,
0.024800395593047142,
-0.0006665145047008991,
0.09206324070692062,
-0.01074503269046545,
0.012142972089350224,
0.07225481420755386,
0.10308434069156647,
-0.03939654678106308,
-0.041222188621759415,
-0.0076951757073402405,
0.08235099166631699,
0.008842908777296543,
-0.028554318472743034,
-0.043611079454422,
-0.020885642617940903,
-0.002632626099511981,
0.02174440026283264,
0.0655304491519928,
5.619967226936338e-33,
0.06091985106468201,
0.03167427331209183,
0.052559152245521545,
-0.087344691157341,
-0.0015452150255441666,
-0.038840342313051224,
-0.04375293478369713,
0.010064922273159027,
0.03043103776872158,
-0.0627644956111908,
0.024759411811828613,
0.012026587501168251,
-0.0202864371240139,
-0.10243820399045944,
-0.049837272614240646,
-0.04054049029946327,
-0.05480799823999405,
0.03545970842242241,
-0.022839408367872238,
0.03062717616558075,
0.03390563279390335,
-0.02036401815712452,
-0.04695906490087509,
-0.02831176295876503,
-0.03923073783516884,
0.005735377781093121,
-0.05267687141895294,
0.028657451272010803,
-0.05877884849905968,
0.019527878612279892,
0.018091151490807533,
0.033012937754392624,
0.09472626447677612,
0.05020119622349739,
-0.09434656798839569,
-0.061231501400470734,
-0.010231656953692436,
-0.030605193227529526,
-0.046682052314281464,
-0.046348270028829575,
0.020637713372707367,
0.005151109304279089,
-0.07389746606349945,
-0.03515033423900604,
-0.010168035514652729,
-0.018579311668872833,
0.022863874211907387,
-0.07946126163005829,
0.036213118582963943,
-0.003079945221543312,
-0.08799117803573608,
-0.004717233590781689,
0.05140744149684906,
-0.018303243443369865,
-0.010946713387966156,
-0.02665683627128601,
0.033325228840112686,
-0.04597047343850136,
-0.03235911577939987,
-0.05529846251010895,
0.021938655525445938,
0.06843797117471695,
0.035487525165081024,
-0.0028781387954950333,
0.09182216227054596,
-0.015005296096205711,
0.07944425940513611,
0.017826169729232788,
-0.025858042761683464,
-0.03247926011681557,
0.0595678873360157,
0.012405107729136944,
-0.02689659409224987,
0.017308415845036507,
0.037082891911268234,
-0.08159998804330826,
0.0945366844534874,
-0.006245759781450033,
-0.07882445305585861,
0.030101729556918144,
0.06088003143668175,
0.0005668238154612482,
-0.021085567772388458,
-0.03749586641788483,
-0.02252211980521679,
-0.01965802162885666,
0.013989130966365337,
-0.028697581961750984,
0.04849148541688919,
0.019095635041594505,
0.09177001565694809,
-0.0015441094292327762,
-0.08054816722869873,
-0.05945829302072525,
-0.09186472743749619,
-5.618418880471114e-33,
-0.006857837084680796,
-0.035120293498039246,
-0.05255109816789627,
0.003114172024652362,
-0.012230576016008854,
0.04870474711060524,
0.09979669004678726,
0.06686146557331085,
0.020035551860928535,
0.006361078005284071,
0.06866899877786636,
-0.05527196824550629,
-0.04732635244727135,
-0.05052987486124039,
0.028084058314561844,
-0.004155998583883047,
-0.029077308252453804,
-0.036534540355205536,
0.12047677487134933,
0.035642921924591064,
0.049763306975364685,
0.11711017787456512,
-0.007368975784629583,
0.09518973529338837,
0.05484287813305855,
-0.04272162914276123,
-0.012922548688948154,
0.08048973232507706,
-0.010035469196736813,
-0.07116588950157166,
0.08246494084596634,
-0.06309329718351364,
-0.03769366815686226,
0.10529936850070953,
-0.07337635010480881,
-0.11043344438076019,
0.00885650422424078,
0.08254727721214294,
-0.0011081087868660688,
0.011995207518339157,
0.10410251468420029,
-0.05671073868870735,
-0.10450150072574615,
0.0017890079179778695,
-0.04870528727769852,
0.03887606039643288,
-0.015788689255714417,
0.053747840225696564,
-0.04184016212821007,
-0.006007065996527672,
0.015617702156305313,
0.05434307083487511,
-0.017424240708351135,
0.014874113723635674,
-0.02900451235473156,
0.0895116776227951,
0.017824452370405197,
-0.050933998078107834,
-0.06613120436668396,
0.018123483285307884,
-0.023599034175276756,
-0.02677075006067753,
-0.02820565737783909,
0.054125573486089706,
0.07089398801326752,
-0.012347239069640636,
-0.06955147534608841,
0.017789596691727638,
-0.001309774350374937,
0.031629160046577454,
0.06946215778589249,
-0.018463032320141792,
-0.0008957600803114474,
-0.05079156905412674,
-0.006892610341310501,
0.02777041122317314,
-0.0002299920015502721,
-0.04231363907456398,
-0.041515763849020004,
-0.010969828814268112,
-0.08435925096273422,
0.09577348828315735,
0.050164058804512024,
0.06704693287611008,
-0.01870807819068432,
-0.0005089697078801692,
-0.028523309156298637,
0.06686905771493912,
-0.07098767161369324,
0.048867594450712204,
0.01706451177597046,
-0.00016934770974330604,
-0.06161433458328247,
0.056805383414030075,
-0.015103187412023544,
-4.9133443980053926e-8,
-0.038295455276966095,
0.0018053133971989155,
0.01836167462170124,
0.12777914106845856,
0.046416670083999634,
-0.02248154580593109,
0.025382719933986664,
-0.034059640020132065,
-0.02156655490398407,
0.039151743054389954,
-0.06051028147339821,
0.01380222849547863,
0.01977493055164814,
0.005322193261235952,
-0.04213888943195343,
-0.02488747239112854,
0.03423943370580673,
0.04300171881914139,
0.013207620941102505,
-0.0014605004107579589,
-0.04257367178797722,
-0.07780816406011581,
0.01530049741268158,
-0.06536716222763062,
0.08385464549064636,
0.09983242303133011,
-0.0010490744607523084,
0.05710624158382416,
-0.00710222078487277,
0.013518649153411388,
-0.005920893047004938,
-0.028466539457440376,
0.004985361360013485,
0.014709891751408577,
-0.06974418461322784,
0.02013702504336834,
-0.08390127867460251,
-0.023143170401453972,
-0.08738035708665848,
-0.046549808233976364,
0.04625002667307854,
0.011086426675319672,
-0.08295437693595886,
-0.008904664777219296,
0.01782490871846676,
0.04993786662817001,
-0.0040047746151685715,
0.04967515915632248,
0.07259397953748703,
0.0035272473469376564,
-0.027211515232920647,
-0.01535574346780777,
0.06419097632169724,
-0.051300305873155594,
0.05633927881717682,
0.019170306622982025,
0.04019051045179367,
-0.04554473236203194,
0.07557883858680725,
0.06672366708517075,
0.06410806626081467,
0.02324513904750347,
0.02574983611702919,
0.016872579231858253
] | 0.045798
|
object. It is stored at version `v1beta1` 2. You add version `v1` to your CustomResourceDefinition and designate it as the storage version. Here the schemas for `v1` and `v1beta1` are identical, which is typically the case when promoting an API to stable in the Kubernetes ecosystem. 3. You read your object at version `v1beta1`, then you read the object again at version `v1`. Both returned objects are identical except for the apiVersion field. 4. You create a new object. It is stored at version `v1`. You now have two objects, one of which is at `v1beta1`, and the other of which is at `v1`. 5. You update the first object. It is now stored at version `v1` since that is the current storage version. ### Previous storage versions The API server records each version which has ever been marked as the storage version in the status field `storedVersions`. Objects may have been stored at any version that has ever been designated as a storage version. No objects can exist in storage at a version that has never been a storage version. ## Upgrade existing objects to a new stored version When deprecating versions and dropping support, select a storage upgrade procedure. \*Option 1:\* Use the Storage Version Migrator 1. Run the [storage Version migrator](https://github.com/kubernetes-sigs/kube-storage-version-migrator) 2. Remove the old version from the CustomResourceDefinition `status.storedVersions` field. \*Option 2:\* Manually upgrade the existing objects to a new stored version The following is an example procedure to upgrade from `v1beta1` to `v1`. 1. Set `v1` as the storage in the CustomResourceDefinition file and apply it using kubectl. The `storedVersions` is now `v1beta1, v1`. 2. Write an upgrade procedure to list all existing objects and write them with the same content. This forces the backend to write objects in the current storage version, which is `v1`. 3. Remove `v1beta1` from the CustomResourceDefinition `status.storedVersions` field. {{< note >}} Here is an example of how to patch the `status` subresource for a CRD object using `kubectl`: ```bash kubectl patch customresourcedefinitions --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1"]}}' ``` {{< /note >}}
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
|
[
-0.00608641654253006,
-0.009351040236651897,
0.042822450399398804,
-0.0001491423900006339,
-0.009119740687310696,
-0.010450853034853935,
-0.044612180441617966,
-0.03892926499247551,
0.10677166283130646,
0.02611883170902729,
0.012902987189590931,
-0.02610294707119465,
-0.016808990389108658,
-0.05508619174361229,
0.022560980170965195,
-0.030346360057592392,
0.007802990730851889,
-0.05567857250571251,
-0.08804932981729507,
0.05719444900751114,
0.05279835686087608,
-0.006860385648906231,
-0.003265032544732094,
-0.00632439274340868,
0.02808154933154583,
0.017321506515145302,
-0.038060687482357025,
0.007627440616488457,
0.04662676155567169,
-0.05373372510075569,
-0.07243654876947403,
0.014833266846835613,
-0.0808217003941536,
0.03722832351922989,
0.08594201505184174,
0.06762076914310455,
-0.002047697314992547,
-0.05455830320715904,
-0.0011272886767983437,
0.055442702025175095,
0.012819967232644558,
0.022989103570580482,
-0.06954716145992279,
0.00010308546188753098,
-0.00942292995750904,
0.06516031920909882,
-0.037172626703977585,
0.0157643873244524,
-0.045522429049015045,
-0.014132368378341198,
0.029282107949256897,
-0.04682857170701027,
-0.029048006981611252,
0.07219619303941727,
0.07379744201898575,
0.043060302734375,
-0.0720570832490921,
0.10705553740262985,
-0.035738859325647354,
0.0155601492151618,
0.10470931977033615,
-0.0209438968449831,
0.0861358568072319,
-0.0790320411324501,
-0.05182775482535362,
-0.08595115691423416,
0.029087159782648087,
-0.07696130126714706,
0.04619229584932327,
-0.07321783155202866,
-0.027128875255584717,
0.05531713739037514,
-0.008659403771162033,
-0.014217367395758629,
0.008425220847129822,
0.017896872013807297,
0.036002710461616516,
0.11772893369197845,
0.07689008861780167,
-0.12232144922018051,
-0.013308873400092125,
-0.026016144081950188,
0.026774529367685318,
-0.004767106845974922,
-0.12234976887702942,
-0.05179442837834358,
0.02396398037672043,
-0.03466835245490074,
0.015908237546682358,
0.01267946232110262,
0.018439866602420807,
-0.06006203219294548,
0.07469594478607178,
-0.06704749166965485,
0.007402239833027124,
0.021069735288619995,
-0.020558837801218033,
0.08461535722017288,
0.07868289947509766,
0.027023296803236008,
0.010248515754938126,
0.02040506899356842,
0.03990665450692177,
0.035678062587976456,
0.07960455119609833,
-0.05071878060698509,
-0.055249959230422974,
0.01649201102554798,
-0.06583661586046219,
0.04560298100113869,
0.01919974759221077,
0.06989956647157669,
-0.04298124089837074,
-0.017398374155163765,
-0.0021985990460962057,
0.008670182898640633,
-0.12138544023036957,
0.006357254460453987,
-0.008848298341035843,
-0.001219124416820705,
0.09809066355228424,
-0.08499499410390854,
0.058755166828632355,
0.023736748844385147,
-0.13896231353282928,
0.003519283840432763,
-0.0000974718714132905,
2.9033869252165694e-33,
0.03741222620010376,
-0.08585194498300552,
0.044298119843006134,
0.004179313313215971,
0.01606355980038643,
-0.04820927977561951,
0.018799202516674995,
0.07851451635360718,
-0.07729531824588776,
-0.0562174990773201,
-0.06014703959226608,
0.04437566176056862,
-0.0760088711977005,
-0.03236580640077591,
0.028265677392482758,
0.02929471991956234,
-0.08642862737178802,
0.026286935433745384,
0.06911841034889221,
-0.017035165801644325,
0.06668613106012344,
-0.005733715370297432,
-0.005909336730837822,
-0.01394518930464983,
0.05969509854912758,
-0.015828747302293777,
-0.008346074260771275,
-0.02020787075161934,
-0.10358311980962753,
-0.011615674011409283,
-0.04824376851320267,
0.0005464990972541273,
0.008846595883369446,
-0.0164461899548769,
-0.05094417557120323,
-0.038928836584091187,
0.05670839920639992,
0.005082985386252403,
-0.10654880106449127,
-0.042556699365377426,
0.06530272960662842,
0.032897789031267166,
0.0025917377788573503,
-0.1270306557416916,
0.04564215615391731,
-0.0303993821144104,
-0.022453757002949715,
-0.021324746310710907,
0.016727514564990997,
0.010133801959455013,
-0.0383644700050354,
0.03468351811170578,
0.019154494628310204,
-0.020350735634565353,
-0.0021156773436814547,
-0.04190925136208534,
0.08549030870199203,
-0.08016380667686462,
-0.02912864461541176,
-0.03548191115260124,
0.04132712259888649,
0.009262269362807274,
0.03383012115955353,
0.020129725337028503,
0.016465144231915474,
0.041592370718717575,
-0.005935857072472572,
-0.03642432764172554,
0.015552482567727566,
-0.0159058328717947,
-0.011581565253436565,
0.05589338392019272,
-0.06422526389360428,
-0.006182023324072361,
-0.0061715589836239815,
-0.12435360997915268,
-0.005310072097927332,
0.015208021737635136,
-0.06535183638334274,
-0.016699064522981644,
-0.02018129639327526,
-0.012720751576125622,
-0.044916119426488876,
0.080730140209198,
-0.13831909000873566,
-0.01948850043118,
0.041640762239694595,
-0.04378408193588257,
0.0628262460231781,
0.0068350122310221195,
0.02758544310927391,
-0.044954564422369,
-0.08357749879360199,
-0.043002933263778687,
-0.004452886059880257,
-4.180601210319325e-33,
0.0482415147125721,
-0.02033693715929985,
-0.025863362476229668,
-0.02397097460925579,
-0.047203343361616135,
-0.014934555627405643,
-0.05148183926939964,
0.08821354061365128,
-0.10625242441892624,
-0.06112706661224365,
0.006467534229159355,
-0.006930952426046133,
-0.024089010432362556,
0.03219618648290634,
-0.046148281544446945,
-0.005448709707707167,
-0.03657827153801918,
-0.08438798040151596,
-0.005029570776969194,
0.03472603112459183,
0.03150093927979469,
0.04749346524477005,
0.05516648665070534,
0.04780926927924156,
-0.014682283625006676,
-0.014504236169159412,
-0.03539950028061867,
0.035518042743206024,
-0.037783827632665634,
-0.06456019729375839,
0.051697492599487305,
-0.11464012414216995,
-0.003761612344533205,
-0.01516516599804163,
-0.012289561331272125,
-0.11020191758871078,
-0.00612699706107378,
-0.05713389068841934,
-0.006258844397962093,
-0.005692115519195795,
-0.018116258084774017,
-0.01796361617743969,
0.006943732965737581,
0.03375250846147537,
0.02082170359790325,
-0.02828407473862171,
0.033863842487335205,
0.02009882777929306,
0.06919580698013306,
-0.13480627536773682,
0.06833438575267792,
-0.0013663682620972395,
-0.0496198870241642,
0.03289274498820305,
-0.005721561145037413,
0.06747931987047195,
0.005956857930868864,
0.041442953050136566,
-0.011226753704249859,
0.012117712758481503,
0.058182671666145325,
-0.053612496703863144,
0.08029819279909134,
0.023423289880156517,
-0.0260331928730011,
-0.03764164075255394,
-0.022200509905815125,
-0.013887124136090279,
-0.014038829132914543,
0.04309762269258499,
-0.058947816491127014,
-0.04060179740190506,
-0.016787253320217133,
0.0036719769705086946,
0.04793596640229225,
-0.05139904096722603,
0.008388418704271317,
0.024781174957752228,
0.09628159552812576,
0.0011048783781006932,
-0.09389965236186981,
0.023293329402804375,
0.008363327942788601,
0.09751616418361664,
0.027630174532532692,
-0.029091687873005867,
0.10974114388227463,
0.06003570929169655,
0.0018698780331760645,
0.059581659734249115,
-0.0476343035697937,
0.06883709877729416,
-0.1460690200328827,
0.09017728269100189,
-0.009649120271205902,
-4.9278547464837175e-8,
-0.0038968874141573906,
0.046933047473430634,
-0.09596292674541473,
0.1295205056667328,
0.002895131940022111,
-0.030320193618535995,
0.01693435199558735,
0.043248407542705536,
0.02813250571489334,
-0.011428866535425186,
-0.04471316933631897,
0.08371032774448395,
-0.01965455524623394,
-0.023778565227985382,
0.03637782111763954,
0.01459524780511856,
-0.0538652166724205,
0.0047544329427182674,
-0.0002576476545073092,
0.005253765732049942,
-0.04093167930841446,
-0.010204657912254333,
0.07811063528060913,
-0.09049798548221588,
0.08827722072601318,
0.03185860067605972,
0.04464557766914368,
0.09465676546096802,
0.025142282247543335,
0.024917151778936386,
0.05904092267155647,
0.039575859904289246,
0.019791271537542343,
0.07420366257429123,
0.034839704632759094,
0.00970369204878807,
-0.039265796542167664,
0.11368899047374725,
0.04679156094789505,
0.04109911993145943,
0.038493163883686066,
-0.059353504329919815,
-0.07436840981245041,
0.07038094848394394,
0.07388363778591156,
0.011643528938293457,
-0.019056305289268494,
0.034678488969802856,
-0.04200373962521553,
-0.022253496572375298,
-0.08359474688768387,
0.0276661217212677,
-0.021429311484098434,
0.06581232696771622,
-0.07247625291347504,
-0.012262280099093914,
-0.01117380615323782,
0.023509502410888672,
0.01800801046192646,
0.028964169323444366,
0.06146858632564545,
0.05575691908597946,
-0.020782265812158585,
0.020480869337916374
] | 0.053919
|
This page shows how to install a [custom resource](/docs/concepts/extend-kubernetes/api-extension/custom-resources/) into the Kubernetes API by creating a [CustomResourceDefinition](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#customresourcedefinition-v1-apiextensions-k8s-io). ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} If you are using an older version of Kubernetes that is still supported, switch to the documentation for that version to see advice that is relevant for your cluster. ## Create a CustomResourceDefinition When you create a new CustomResourceDefinition (CRD), the Kubernetes API Server creates a new RESTful resource path for each version you specify. The custom resource created from a CRD object can be either namespaced or cluster-scoped, as specified in the CRD's `spec.scope` field. As with existing built-in objects, deleting a namespace deletes all custom objects in that namespace. CustomResourceDefinitions themselves are non-namespaced and are available to all namespaces. For example, if you save the following CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . name: crontabs.stable.example.com spec: # group name to use for REST API: /apis// group: stable.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 # Each version can be enabled/disabled by Served flag. served: true # One and only one version must be marked as the storage version. storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string image: type: string replicas: type: integer # either Namespaced or Cluster scope: Namespaced names: # plural name to be used in the URL: /apis/// plural: crontabs # singular name to be used as an alias on the CLI and for display singular: crontab # kind is normally the CamelCased singular type. Your resource manifests use this. kind: CronTab # shortNames allow shorter string to match your resource on the CLI shortNames: - ct ``` and create it: ```shell kubectl apply -f resourcedefinition.yaml ``` Then a new namespaced RESTful API endpoint is created at: ``` /apis/stable.example.com/v1/namespaces/\*/crontabs/... ``` This endpoint URL can then be used to create and manage custom objects. The `kind` of these objects will be `CronTab` from the spec of the CustomResourceDefinition object you created above. It might take a few seconds for the endpoint to be created. You can watch the `Established` condition of your CustomResourceDefinition to be true or watch the discovery information of the API server for your resource to show up. ## Create custom objects After the CustomResourceDefinition object has been created, you can create custom objects. Custom objects can contain custom fields. These fields can contain arbitrary JSON. In the following example, the `cronSpec` and `image` custom fields are set in a custom object of kind `CronTab`. The kind `CronTab` comes from the spec of the CustomResourceDefinition object you created above. If you save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \* \*/5" image: my-awesome-cron-image ``` and create it: ```shell kubectl apply -f my-crontab.yaml ``` You can then manage your CronTab objects using kubectl. For example: ```shell kubectl get crontab ``` Should print a list like this: ```none NAME AGE my-new-cron-object 6s ``` Resource names are not case-sensitive when using kubectl, and you can use either the singular or plural forms defined in the CRD, as well as any short names. You can also view the raw YAML data: ```shell kubectl get ct -o yaml ``` You should see that it contains the custom `cronSpec` and `image` fields from the YAML you used to create it: ```yaml apiVersion: v1 items: - apiVersion: stable.example.com/v1 kind: CronTab metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"stable.example.com/v1","kind":"CronTab","metadata":{"annotations":{},"name":"my-new-cron-object","namespace":"default"},"spec":{"cronSpec":"\* \* \* \* \*/5","image":"my-awesome-cron-image"}} creationTimestamp: "2021-06-20T07:35:27Z"
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.02693169191479683,
-0.018264837563037872,
0.055912408977746964,
-0.012995753437280655,
-0.023807551711797714,
0.07703286409378052,
-0.050285324454307556,
-0.008377551101148129,
0.04651626944541931,
0.047743942588567734,
-0.04453856498003006,
-0.05966876074671745,
0.0034174202010035515,
0.04573091119527817,
0.023426905274391174,
-0.04980822652578354,
0.08409292995929718,
-0.04007804021239281,
-0.00890408456325531,
-0.04434759169816971,
0.054586805403232574,
0.002293457742780447,
0.040458619594573975,
-0.03666338324546814,
-0.04528737813234329,
-0.033594660460948944,
-0.02293083444237709,
0.012760291807353497,
0.038360126316547394,
0.03975658863782883,
-0.027425769716501236,
0.0009416699758730829,
-0.015195171348750591,
0.003493353258818388,
0.08854427188634872,
0.12186454236507416,
0.03778638690710068,
-0.037465255707502365,
-0.0578986294567585,
0.06373637914657593,
0.004465269856154919,
0.014106173068284988,
-0.08068444579839706,
-0.04675599932670593,
0.0014794275630265474,
-0.02053009904921055,
-0.026469271630048752,
-0.06968099623918533,
-0.027171405032277107,
0.029757952317595482,
0.04091485217213631,
-0.11785783618688583,
0.027449145913124084,
-0.011425670236349106,
0.08130675554275513,
0.04750756919384003,
-0.05064030736684799,
0.04197470098733902,
0.043387480080127716,
-0.009850745089352131,
0.07847875356674194,
-0.07888812571763992,
0.047806624323129654,
-0.08772237598896027,
-0.07076477259397507,
0.018473053351044655,
-0.007908966392278671,
0.02877804823219776,
0.06037217006087303,
-0.10202641785144806,
-0.00708373449742794,
0.003921832889318466,
-0.013136609457433224,
-0.0023299288004636765,
0.016696374863386154,
0.07002720236778259,
0.02007470093667507,
0.08100096136331558,
-0.029895460233092308,
-0.10379169136285782,
-0.031348876655101776,
0.05622880160808563,
0.08113568276166916,
0.033206239342689514,
-0.028769878670573235,
0.03517162427306175,
-0.01918068528175354,
-0.07706305384635925,
0.10625369101762772,
-0.04240718483924866,
0.03102358616888523,
-0.10765057057142258,
-0.04167982190847397,
-0.11425244063138962,
0.047866709530353546,
0.043731432408094406,
-0.10462002456188202,
-0.0038792891427874565,
0.05220627039670944,
-0.005141849629580975,
0.00031331265927292407,
-0.0256673451513052,
0.0005968189216218889,
0.007871751673519611,
0.04217491298913956,
0.03701028227806091,
-0.08814577758312225,
0.08851287513971329,
-0.02446313016116619,
0.03965779393911362,
0.009263789281249046,
0.052960656583309174,
-0.0002204347401857376,
-0.030953072011470795,
0.06551136821508408,
0.042628392577171326,
0.0032283749897032976,
-0.042270515114068985,
0.03209259733557701,
0.05812826752662659,
0.0736105665564537,
-0.09053738415241241,
0.024054916575551033,
0.029165567830204964,
-0.006949679926037788,
-0.030709581449627876,
-0.12958697974681854,
2.9580938812908617e-33,
0.041167255491018295,
0.02019662968814373,
0.0899415835738182,
-0.02943110279738903,
0.0010866018710657954,
-0.1262877732515335,
-0.021976973861455917,
0.04392055794596672,
-0.06026032567024231,
-0.1167251393198967,
-0.014414682053029537,
0.1106998547911644,
-0.014781652949750423,
-0.05118388682603836,
-0.03134949877858162,
-0.021514730527997017,
-0.07557650655508041,
0.014469386078417301,
0.11743853241205215,
-0.058118369430303574,
-0.013240066356956959,
-0.040331289172172546,
0.019809866324067116,
-0.01515696756541729,
0.0005689653917215765,
-0.035740405321121216,
0.056971482932567596,
-0.05210200697183609,
-0.012777857482433319,
-0.010347936302423477,
-0.05075298249721527,
-0.022433120757341385,
0.008057541213929653,
-0.007367575075477362,
-0.13895221054553986,
0.006214282941073179,
-0.035029903054237366,
0.048040494322776794,
-0.11327215284109116,
0.0348472073674202,
0.04451005160808563,
0.06172996014356613,
0.014751693233847618,
-0.0814848393201828,
0.10967595130205154,
-0.039884742349386215,
0.07490108907222748,
-0.09715732932090759,
0.09517340362071991,
-0.028154877945780754,
-0.030036533251404762,
-0.05850183591246605,
0.07948639988899231,
-0.06523390114307404,
0.008513428270816803,
0.00231787096709013,
0.09068555384874344,
-0.02503291331231594,
0.008229047060012817,
-0.04559081420302391,
0.006138279102742672,
-0.0651569738984108,
0.0019659074023365974,
0.03981868177652359,
0.042698390781879425,
-0.01826522871851921,
-0.017462920397520065,
0.05134567245841026,
0.013318510726094246,
-0.025214657187461853,
-0.04465418681502342,
-0.0008864749688655138,
0.005988471210002899,
0.030422959476709366,
0.04623347893357277,
-0.10683128237724304,
0.06030098348855972,
0.01830628141760826,
-0.09401216357946396,
0.011219710111618042,
0.01698053628206253,
-0.03644596040248871,
-0.008117802441120148,
0.04375815391540527,
-0.008154802024364471,
-0.09250959753990173,
0.02529936283826828,
-0.041001491248607635,
0.06144723296165466,
-0.015361711382865906,
0.02855166234076023,
-0.055501651018857956,
-0.08895013481378555,
0.07088300585746765,
-0.05096589773893356,
-3.629300604597411e-33,
0.09440834075212479,
0.001472310977987945,
-0.008760492317378521,
-0.039045821875333786,
0.04901228845119476,
0.04618522897362709,
0.007529687136411667,
0.07875443994998932,
-0.03874782472848892,
-0.07783515006303787,
-0.03471849486231804,
-0.050369683653116226,
0.03980519622564316,
0.062179628759622574,
-0.10078520327806473,
0.01682589016854763,
-0.029596345499157906,
-0.01273849606513977,
0.01208500750362873,
0.03302154690027237,
-0.036953285336494446,
0.03662824258208275,
0.04115215316414833,
-0.0072501651011407375,
0.033307407051324844,
0.026310238987207413,
-0.024994157254695892,
0.025067387148737907,
-0.024275699630379677,
0.031751736998558044,
-0.0220497939735651,
-0.11705123633146286,
-0.01814449019730091,
-0.021025437861680984,
0.006510155741125345,
-0.04539605230093002,
-0.05958367511630058,
-0.0066981324926018715,
-0.022274862974882126,
-0.012694204226136208,
0.05125920847058296,
-0.03421671688556671,
0.023034539073705673,
-0.03561839833855629,
-0.035990435630083084,
-0.00778537942096591,
0.056700605899095535,
-0.06172514706850052,
-0.05714359134435654,
-0.10227283835411072,
-0.016523001715540886,
-0.010765527375042439,
-0.06848040968179703,
0.03799212723970413,
-0.021670306101441383,
0.0594826377928257,
0.06690243631601334,
0.08697079122066498,
0.016091283410787582,
-0.0006678597419522703,
0.059969548135995865,
-0.06535360217094421,
0.04272565245628357,
-0.034463781863451004,
0.02306830696761608,
-0.06358937919139862,
-0.020246053114533424,
0.024000786244869232,
-0.07395584136247635,
0.03920309990644455,
-0.1560239940881729,
0.018756115809082985,
0.041007149964571,
0.02661353163421154,
0.01297927275300026,
-0.027078932151198387,
0.03654046729207039,
0.00025008313241414726,
0.02498910389840603,
0.02379823476076126,
-0.08905816823244095,
-0.002125451574102044,
-0.06060462072491646,
0.056009259074926376,
0.06571701169013977,
0.043849725276231766,
0.0827198177576065,
0.08151473104953766,
0.013057944364845753,
0.05696883052587509,
0.014991416595876217,
0.021399999037384987,
0.006970306392759085,
0.15641391277313232,
-0.018352864310145378,
-5.467059693842202e-8,
0.03292761370539665,
0.024016305804252625,
-0.057306353002786636,
0.050394318997859955,
0.06351535022258759,
-0.006552288308739662,
-0.008004040457308292,
0.04522865638136864,
-0.017232621088624,
0.0310808178037405,
-0.050316594541072845,
0.04838164523243904,
0.019326278939843178,
0.011759443208575249,
-0.019825521856546402,
-0.0029246152844280005,
-0.02171197347342968,
0.03773371875286102,
0.028633031994104385,
-0.04917231574654579,
-0.05227459967136383,
-0.008012632839381695,
0.01678944006562233,
-0.07302539795637131,
0.07106710225343704,
0.050665415823459625,
0.03363320603966713,
0.03872736543416977,
-0.039631444960832596,
-0.01951310783624649,
-0.0358007438480854,
-0.020012719556689262,
-0.035377442836761475,
0.0479486919939518,
-0.009234840050339699,
0.012746741995215416,
-0.10199250280857086,
0.09618990868330002,
0.02967206761240959,
0.028503745794296265,
0.04265274107456207,
0.039845988154411316,
-0.06316988170146942,
0.03272591158747673,
0.06428653001785278,
0.06164064258337021,
-0.04513465240597725,
0.03561174497008324,
-0.04637981951236725,
-0.008261451497673988,
-0.03959798812866211,
-0.03742485120892525,
0.015049856156110764,
0.018510274589061737,
0.012884525582194328,
0.046884454786777496,
-0.014538838528096676,
-0.03901952877640724,
0.011757638305425644,
-0.013556660152971745,
0.05273008346557617,
0.04280076548457146,
-0.0027845108415931463,
-0.002788475714623928
] | 0.099373
|
raw YAML data: ```shell kubectl get ct -o yaml ``` You should see that it contains the custom `cronSpec` and `image` fields from the YAML you used to create it: ```yaml apiVersion: v1 items: - apiVersion: stable.example.com/v1 kind: CronTab metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"stable.example.com/v1","kind":"CronTab","metadata":{"annotations":{},"name":"my-new-cron-object","namespace":"default"},"spec":{"cronSpec":"\* \* \* \* \*/5","image":"my-awesome-cron-image"}} creationTimestamp: "2021-06-20T07:35:27Z" generation: 1 name: my-new-cron-object namespace: default resourceVersion: "1326" uid: 9aab1d66-628e-41bb-a422-57b8b3b1f5a9 spec: cronSpec: '\* \* \* \* \*/5' image: my-awesome-cron-image kind: List metadata: resourceVersion: "" selfLink: "" ``` ## Delete a CustomResourceDefinition When you delete a CustomResourceDefinition, the server will uninstall the RESTful API endpoint and delete all custom objects stored in it. ```shell kubectl delete -f resourcedefinition.yaml kubectl get crontabs ``` ```none Error from server (NotFound): Unable to list {"stable.example.com" "v1" "crontabs"}: the server could not find the requested resource (get crontabs.stable.example.com) ``` If you later recreate the same CustomResourceDefinition, it will start out empty. ## Specifying a structural schema CustomResources store structured data in custom fields (alongside the built-in fields `apiVersion`, `kind` and `metadata`, which the API server validates implicitly). With [OpenAPI v3.0 validation](#validation) a schema can be specified, which is validated during creation and updates, compare below for details and limits of such a schema. With `apiextensions.k8s.io/v1` the definition of a structural schema is mandatory for CustomResourceDefinitions. In the beta version of CustomResourceDefinition, the structural schema was optional. A structural schema is an [OpenAPI v3.0 validation schema](#validation) which: 1. specifies a non-empty type (via `type` in OpenAPI) for the root, for each specified field of an object node (via `properties` or `additionalProperties` in OpenAPI) and for each item in an array node (via `items` in OpenAPI), with the exception of: \* a node with `x-kubernetes-int-or-string: true` \* a node with `x-kubernetes-preserve-unknown-fields: true` 2. for each field in an object and each item in an array which is specified within any of `allOf`, `anyOf`, `oneOf` or `not`, the schema also specifies the field/item outside of those logical junctors (compare example 1 and 2). 3. does not set `description`, `type`, `default`, `additionalProperties`, `nullable` within an `allOf`, `anyOf`, `oneOf` or `not`, with the exception of the two pattern for `x-kubernetes-int-or-string: true` (see below). 4. if `metadata` is specified, then only restrictions on `metadata.name` and `metadata.generateName` are allowed. Non-structural example 1: ```yaml allOf: - properties: foo: # ... ``` conflicts with rule 2. The following would be correct: ```yaml properties: foo: # ... allOf: - properties: foo: # ... ``` Non-structural example 2: ```yaml allOf: - items: properties: foo: # ... ``` conflicts with rule 2. The following would be correct: ```yaml items: properties: foo: # ... allOf: - items: properties: foo: # ... ``` Non-structural example 3: ```yaml properties: foo: pattern: "abc" metadata: type: object properties: name: type: string pattern: "^a" finalizers: type: array items: type: string pattern: "my-finalizer" anyOf: - properties: bar: type: integer minimum: 42 required: ["bar"] description: "foo bar object" ``` is not a structural schema because of the following violations: \* the type at the root is missing (rule 1). \* the type of `foo` is missing (rule 1). \* `bar` inside of `anyOf` is not specified outside (rule 2). \* `bar`'s `type` is within `anyOf` (rule 3). \* the description is set within `anyOf` (rule 3). \* `metadata.finalizers` might not be restricted (rule 4). In contrast, the following, corresponding schema is structural: ```yaml type: object description: "foo bar object" properties: foo: type: string pattern: "abc" bar: type: integer metadata: type: object properties: name: type: string pattern: "^a" anyOf: - properties: bar: minimum: 42 required: ["bar"] ``` Violations of the structural schema rules are reported in the `NonStructural` condition in the CustomResourceDefinition. ### Field pruning CustomResourceDefinitions store
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
0.001184918568469584,
0.027143601328134537,
0.008497790433466434,
-0.027016988024115562,
0.013136972673237324,
0.028782688081264496,
0.000506332260556519,
0.04058101400732994,
0.08353493362665176,
0.02342965640127659,
0.015574336051940918,
-0.11847458779811859,
-0.0214875265955925,
-0.015106337144970894,
0.03493262082338333,
0.03143377602100372,
-0.0521683506667614,
-0.07109384983778,
-0.02552260272204876,
-0.0751718059182167,
0.006996738724410534,
0.027653465047478676,
0.05315808579325676,
-0.0026815489400178194,
-0.031905051320791245,
-0.01720823161303997,
-0.011615638621151447,
0.06270075589418411,
0.04126949980854988,
0.012381338514387608,
0.006905839778482914,
-0.022379180416464806,
0.027882710099220276,
0.06878671795129776,
0.09315638989210129,
0.1621527373790741,
0.11264172941446304,
-0.07507406175136566,
0.010050938464701176,
0.04102058708667755,
0.03574136272072792,
0.027958763763308525,
-0.05498934164643288,
-0.09296675026416779,
0.024092525243759155,
-0.06028175354003906,
-0.021400704979896545,
-0.06231314316391945,
-0.010294615291059017,
0.027339309453964233,
-0.016244692727923393,
-0.11142135411500931,
-0.01856350339949131,
0.04303015023469925,
0.081596240401268,
0.102964386343956,
-0.06567220389842987,
0.04768704995512962,
0.08960893005132675,
-0.0009575103758834302,
0.005716411862522364,
0.0027662201318889856,
0.02766353078186512,
-0.05416854843497276,
-0.04713871330022812,
-0.04271836206316948,
-0.060773760080337524,
-0.008984982036054134,
0.02049960196018219,
-0.04030493274331093,
0.005940344650298357,
-0.02746337465941906,
-0.027705207467079163,
-0.07262994349002838,
-0.010190305300056934,
0.02246876433491707,
-0.02379792556166649,
0.009818561375141144,
-0.050468213856220245,
-0.08097270876169205,
-0.04793044924736023,
0.027323337271809578,
0.0466601587831974,
-0.0266415998339653,
-0.08417566120624542,
0.004889470525085926,
0.03320923075079918,
-0.027449628338217735,
0.020942285656929016,
0.016913292929530144,
0.02075956203043461,
-0.062490589916706085,
-0.03203507885336876,
-0.09953352063894272,
0.042782463133335114,
0.07877399027347565,
-0.05471748486161232,
0.0048669991083443165,
0.020339755341410637,
0.013588170520961285,
0.02519838884472847,
0.06682936102151871,
0.0032206960022449493,
0.0023459135554730892,
0.13344459235668182,
0.06614692509174347,
-0.07087837159633636,
0.0422116182744503,
-0.07658951729536057,
0.03727877140045166,
-0.013165506534278393,
0.11557409167289734,
-0.04643526300787926,
-0.027047257870435715,
0.03492247685790062,
0.027114083990454674,
-0.09849976003170013,
0.016534850001335144,
0.03198409080505371,
0.04577803239226341,
0.1220397874712944,
-0.0664348155260086,
-0.0659194141626358,
-0.00706858467310667,
-0.02724149450659752,
-0.006589404307305813,
-0.01767568103969097,
5.127116241099139e-33,
0.054965607821941376,
0.0021296192426234484,
0.05530427396297455,
-0.009628632105886936,
-0.032617487013339996,
-0.09550920873880386,
-0.0593314953148365,
0.015277311205863953,
-0.03186450153589249,
-0.09400069713592529,
-0.04797068610787392,
0.03178141266107559,
-0.04321441426873207,
-0.02424268238246441,
-0.04089167341589928,
-0.014025462791323662,
-0.11778946965932846,
-0.04925134778022766,
0.036368586122989655,
0.021495934575796127,
-0.01747325249016285,
-0.02912948466837406,
-0.02408202737569809,
0.004718732088804245,
-0.0612059086561203,
-0.07212873548269272,
0.08645372837781906,
-0.018483493477106094,
-0.058238618075847626,
-0.015711279585957527,
0.03066701628267765,
0.012260663323104382,
0.11111979186534882,
0.026011282578110695,
-0.0840783342719078,
-0.015693411231040955,
0.004309382755309343,
0.04318714514374733,
-0.14232347905635834,
0.04690161347389221,
0.10013343393802643,
-0.0001877295144367963,
-0.040615055710077286,
-0.07636406272649765,
0.055469200015068054,
-0.05301417037844658,
0.0392320342361927,
-0.04890015721321106,
0.03589744120836258,
-0.006514445412904024,
-0.032278306782245636,
0.03268874064087868,
0.04401007667183876,
-0.0629664808511734,
0.03556382283568382,
0.018987692892551422,
0.09207107871770859,
-0.06381159275770187,
-0.012006591074168682,
-0.06275594234466553,
-0.01887320913374424,
0.018008215352892876,
0.051281992346048355,
0.021383538842201233,
0.015445413999259472,
-0.01008320041000843,
0.02419005148112774,
-0.007142468821257353,
-0.02158205397427082,
0.04060705006122589,
0.002379455603659153,
0.08272658288478851,
-0.08615609258413315,
-0.03609028086066246,
0.08576194196939468,
-0.1257568597793579,
0.07657532393932343,
-0.0044251661747694016,
-0.12903839349746704,
0.07416311651468277,
0.03391362726688385,
0.002447874518111348,
-0.007955568842589855,
0.012854114174842834,
-0.025820523500442505,
-0.04495349898934364,
0.03225516155362129,
0.03787717968225479,
0.04369860142469406,
0.00553508847951889,
0.017304521054029465,
-0.033835846930742264,
-0.09008406102657318,
-0.02865811623632908,
-0.10445209592580795,
-4.532868214585963e-33,
0.07534937560558319,
-0.03587016835808754,
0.014996008947491646,
0.032081011682748795,
-0.007248593959957361,
0.012814195826649666,
0.06607489287853241,
0.10353627055883408,
0.0015417077811434865,
-0.026638023555278778,
0.0040170736610889435,
-0.012709612026810646,
-0.03959789499640465,
-0.01742032915353775,
0.013202736154198647,
0.015490764752030373,
-0.07845743745565414,
-0.05291316285729408,
-0.0032954837661236525,
0.036174383014440536,
-0.006254279520362616,
0.0901959240436554,
0.09051577001810074,
0.0836620032787323,
0.014348330907523632,
0.014621777459979057,
0.01957852765917778,
0.028748977929353714,
-0.058046381920576096,
-0.018258975818753242,
0.010064458474516869,
-0.1341845691204071,
-0.031968988478183746,
0.08489545434713364,
-0.021865803748369217,
-0.08375925570726395,
-0.010464688763022423,
0.016731252893805504,
-0.003361612558364868,
0.025122899562120438,
0.06252159923315048,
0.042347416281700134,
-0.1028514876961708,
-0.021709134802222252,
-0.10995016247034073,
0.004031551070511341,
0.043507106602191925,
0.035172685980796814,
-0.009903649799525738,
-0.0565672367811203,
-0.0020870864391326904,
0.009457009844481945,
-0.09434002637863159,
0.06503400206565857,
0.02712199091911316,
0.025597669184207916,
-0.005056013353168964,
0.02518921159207821,
-0.02581915259361267,
0.034039206802845,
-0.03710265830159187,
-0.06948285549879074,
0.014805527403950691,
0.015165961347520351,
0.0780775398015976,
-0.05274775251746178,
-0.033465128391981125,
-0.003708294127136469,
-0.04579555615782738,
0.016328442841768265,
-0.032830964773893356,
0.01819111965596676,
-0.010722246952354908,
-0.01600845716893673,
0.02465670369565487,
-0.001857490511611104,
-0.03244372084736824,
-0.003796905279159546,
0.021222922950983047,
0.05516715347766876,
-0.05010577291250229,
0.033656295388936996,
-0.037576474249362946,
0.06409890949726105,
0.01801924593746662,
0.0020438225474208593,
-0.02673390880227089,
0.05329597368836403,
0.010291853919625282,
0.034376490861177444,
0.06806869059801102,
0.022943314164876938,
0.012026616372168064,
0.10470755398273468,
0.06231788545846939,
-4.669816178193287e-8,
-0.019242417067289352,
-0.012427056208252907,
0.011628981679677963,
0.06318578124046326,
0.05153397470712662,
-0.050644952803850174,
0.05778981372714043,
0.004699795972555876,
-0.04921002686023712,
-0.008785711601376534,
-0.07342284917831421,
0.026392700150609016,
-0.05741950497031212,
0.02149217016994953,
-0.04415944218635559,
-0.003914581146091223,
-0.019550593569874763,
0.08391912281513214,
0.05297018960118294,
-0.0637272521853447,
-0.04411794990301132,
-0.03993546590209007,
0.03219263255596161,
-0.005910075269639492,
0.04444511979818344,
0.12290800362825394,
0.01967419497668743,
0.04589398205280304,
-0.00788180809468031,
0.017489850521087646,
0.06074409559369087,
-0.06359106302261353,
-0.017865408211946487,
-0.014702745713293552,
-0.04825317859649658,
-0.0009467768832109869,
-0.04501355439424515,
0.029830461367964745,
-0.03699371963739395,
-0.004284460563212633,
0.04529068246483803,
-0.012375576421618462,
-0.08360800892114639,
-0.04178490489721298,
-0.024337252601981163,
0.011265372857451439,
-0.01670832559466362,
0.08733031153678894,
-0.02874074876308441,
0.04146149381995201,
0.027456233277916908,
-0.11100471019744873,
0.06188363954424858,
0.014590856619179249,
-0.016628319397568703,
-0.025052456185221672,
0.12692537903785706,
-0.0710836872458458,
0.05450740456581116,
0.021340753883123398,
0.031039182096719742,
0.03332572430372238,
0.024775832891464233,
-0.00945347361266613
] | 0.043127
|
"foo bar object" properties: foo: type: string pattern: "abc" bar: type: integer metadata: type: object properties: name: type: string pattern: "^a" anyOf: - properties: bar: minimum: 42 required: ["bar"] ``` Violations of the structural schema rules are reported in the `NonStructural` condition in the CustomResourceDefinition. ### Field pruning CustomResourceDefinitions store validated resource data in the cluster's persistence store, {{< glossary\_tooltip term\_id="etcd" text="etcd">}}. As with native Kubernetes resources such as {{< glossary\_tooltip text="ConfigMap" term\_id="configmap" >}}, if you specify a field that the API server does not recognize, the unknown field is \_pruned\_ (removed) before being persisted. CRDs converted from `apiextensions.k8s.io/v1beta1` to `apiextensions.k8s.io/v1` might lack structural schemas, and `spec.preserveUnknownFields` might be `true`. For legacy CustomResourceDefinition objects created as `apiextensions.k8s.io/v1beta1` with `spec.preserveUnknownFields` set to `true`, the following is also true: \* Pruning is not enabled. \* You can store arbitrary data. For compatibility with `apiextensions.k8s.io/v1`, update your custom resource definitions to: 1. Use a structural OpenAPI schema. 2. Set `spec.preserveUnknownFields` to `false`. If you save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \* \*/5" image: my-awesome-cron-image someRandomField: 42 ``` and create it: ```shell kubectl create --validate=false -f my-crontab.yaml -o yaml ``` Your output is similar to: ```yaml apiVersion: stable.example.com/v1 kind: CronTab metadata: creationTimestamp: 2017-05-31T12:56:35Z generation: 1 name: my-new-cron-object namespace: default resourceVersion: "285" uid: 9423255b-4600-11e7-af6a-28d2447dc82b spec: cronSpec: '\* \* \* \* \*/5' image: my-awesome-cron-image ``` Notice that the field `someRandomField` was pruned. This example turned off client-side validation to demonstrate the API server's behavior, by adding the `--validate=false` command line option. Because the [OpenAPI validation schemas are also published](#publish-validation-schema-in-openapi) to clients, `kubectl` also checks for unknown fields and rejects those objects well before they would be sent to the API server. #### Controlling pruning By default, all unspecified fields for a custom resource, across all versions, are pruned. It is possible though to opt-out of that for specific sub-trees of fields by adding `x-kubernetes-preserve-unknown-fields: true` in the [structural OpenAPI v3 validation schema](#specifying-a-structural-schema). For example: ```yaml type: object properties: json: x-kubernetes-preserve-unknown-fields: true ``` The field `json` can store any JSON value, without anything being pruned. You can also partially specify the permitted JSON; for example: ```yaml type: object properties: json: x-kubernetes-preserve-unknown-fields: true type: object description: this is arbitrary JSON ``` With this, only `object` type values are allowed. Pruning is enabled again for each specified property (or `additionalProperties`): ```yaml type: object properties: json: x-kubernetes-preserve-unknown-fields: true type: object properties: spec: type: object properties: foo: type: string bar: type: string ``` With this, the value: ```yaml json: spec: foo: abc bar: def something: x status: something: x ``` is pruned to: ```yaml json: spec: foo: abc bar: def status: something: x ``` This means that the `something` field in the specified `spec` object is pruned, but everything outside is not. ### IntOrString Nodes in a schema with `x-kubernetes-int-or-string: true` are excluded from rule 1, such that the following is structural: ```yaml type: object properties: foo: x-kubernetes-int-or-string: true ``` Also those nodes are partially excluded from rule 3 in the sense that the following two patterns are allowed (exactly those, without variations in order to additional fields): ```yaml x-kubernetes-int-or-string: true anyOf: - type: integer - type: string ... ``` and ```yaml x-kubernetes-int-or-string: true allOf: - anyOf: - type: integer - type: string - # ... zero or more ... ``` With one of those specification, both an integer and a string validate. In [Validation Schema Publishing](#publish-validation-schema-in-openapi), `x-kubernetes-int-or-string: true` is unfolded to one of the two patterns shown above. ### RawExtension RawExtensions (as in [`runtime.RawExtension`](/docs/reference//kubernetes-api/workload-resources/controller-revision-v1#RawExtension)) holds complete Kubernetes objects, i.e. with `apiVersion` and `kind` fields. It is possible
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.028562873601913452,
0.02820972353219986,
0.07101988047361374,
-0.018549898639321327,
-0.04854719713330269,
0.015342725440859795,
0.00043613454909063876,
-0.08810663223266602,
0.08408383280038834,
0.023487752303481102,
-0.00959874503314495,
-0.11757046729326248,
0.030713649466633797,
0.0008969980990514159,
0.040560510009527206,
0.03419143706560135,
0.015888746827840805,
-0.05570928379893303,
-0.0748291164636612,
0.008124538697302341,
0.053483039140701294,
0.06621728837490082,
0.008138281293213367,
0.00900241918861866,
-0.036053843796253204,
0.008415721356868744,
-0.05626450851559639,
0.006811291910707951,
0.06581974774599075,
0.015273471362888813,
-0.04476497694849968,
0.05319944769144058,
-0.062314506620168686,
0.03813837468624115,
0.14512212574481964,
0.06120715290307999,
0.03841957822442055,
0.008593004196882248,
-0.056203700602054596,
0.08645481616258621,
0.013448575511574745,
-0.026171362027525902,
-0.07288137823343277,
0.016443267464637756,
-0.02133977599442005,
0.029789675027132034,
-0.017695290967822075,
-0.051388852298259735,
-0.06984300166368484,
-0.009471963159739971,
0.01265970803797245,
-0.034464966505765915,
0.021941430866718292,
0.041697923094034195,
0.09423846006393433,
0.05481375753879547,
-0.08133692294359207,
0.07177077978849411,
0.0498301163315773,
0.008608391508460045,
0.05376581847667694,
-0.0406825952231884,
0.02833235077559948,
-0.03399643674492836,
-0.010071887634694576,
0.033184684813022614,
0.0011796365724876523,
-0.024598436430096626,
0.007771030534058809,
-0.042636629194021225,
0.10211054980754852,
-0.034112680703401566,
-0.016838673502206802,
0.04779982939362526,
0.07496129721403122,
0.073275126516819,
-0.03757336735725403,
0.06192983314394951,
0.032111212611198425,
-0.13392217457294464,
-0.03867346793413162,
0.033696066588163376,
0.05173490196466446,
0.07470763474702835,
-0.01034701056778431,
-0.045827560126781464,
-0.020993433892726898,
-0.05451392009854317,
0.021143058314919472,
0.04143885523080826,
-0.0034641718957573175,
-0.09457709640264511,
0.001616875291801989,
-0.09263644367456436,
0.0651039257645607,
0.02966632880270481,
-0.041761189699172974,
-0.02934986539185047,
0.006469000596553087,
-0.006586939562112093,
0.0034286181908100843,
0.02381831780076027,
0.022909892722964287,
0.01028497889637947,
-0.0078111933544278145,
0.00227920594625175,
-0.07296852022409439,
0.04707528278231621,
-0.05323288217186928,
0.09087864309549332,
0.016789454966783524,
0.05467085540294647,
-0.030501164495944977,
-0.016619866713881493,
-0.00920186098664999,
-0.013463078998029232,
-0.02251385897397995,
-0.06761740893125534,
0.01224419753998518,
0.01836486905813217,
0.006775361951440573,
-0.05894387885928154,
0.020363451912999153,
0.06364698708057404,
-0.07196609675884247,
0.06073484569787979,
-0.04720235988497734,
4.766877181082018e-33,
0.05776543542742729,
-0.02958138845860958,
-0.013528821989893913,
-0.05633518472313881,
-0.06043405085802078,
-0.07843217998743057,
-0.05262887105345726,
0.021497251465916634,
-0.053353797644376755,
-0.045239292085170746,
-0.012671235017478466,
0.07761974632740021,
-0.04127805307507515,
-0.07963914424180984,
0.07631639391183853,
0.055219169706106186,
0.015606223605573177,
0.04746356979012489,
0.05363237485289574,
-0.046467747539281845,
0.05024970322847366,
0.02338104136288166,
-0.01029412355273962,
-0.036029741168022156,
-0.024562695994973183,
0.016449542716145515,
-0.011548148468136787,
-0.06456571072340012,
-0.024333948269486427,
0.016609136015176773,
-0.01560552604496479,
-0.049501582980155945,
0.1080838143825531,
-0.011880649253726006,
-0.11597040295600891,
0.018491892144083977,
-0.005537049379199743,
-0.006847362034022808,
-0.08308181166648865,
-0.04373631998896599,
0.03054114058613777,
0.030745770782232285,
-0.007633867207914591,
-0.07342731952667236,
0.04763523489236832,
-0.028204599395394325,
0.0783904567360878,
-0.057848282158374786,
0.007611958310008049,
-0.023774441331624985,
0.011290733702480793,
0.0412880964577198,
0.06809373944997787,
0.01705201342701912,
0.016724415123462677,
0.031134959310293198,
0.060638558119535446,
-0.06414813548326492,
-0.028443509712815285,
-0.02241949737071991,
-0.03037330135703087,
0.04225796088576317,
-0.007533327676355839,
0.028862591832876205,
0.027280542999505997,
-0.017365112900733948,
-0.016030479222536087,
0.03100273571908474,
-0.054591502994298935,
-0.04422495514154434,
-0.01662135124206543,
0.05688900500535965,
-0.07320617139339447,
0.04231667518615723,
0.01737399213016033,
-0.15419535338878632,
0.059949591755867004,
0.0021261139772832394,
-0.0861794576048851,
-0.018352072685956955,
0.019856931641697884,
-0.053222887217998505,
-0.027221590280532837,
0.10664238035678864,
-0.05345577746629715,
-0.061899151653051376,
0.07504124939441681,
-0.02637016586959362,
-0.06468036770820618,
-0.0286271870136261,
0.04386308044195175,
-0.07219555974006653,
-0.1467941701412201,
0.005718459375202656,
-0.05871368199586868,
-5.7548151634168706e-33,
0.06379653513431549,
-0.07927390933036804,
0.014173879288136959,
0.02148062363266945,
0.030895676463842392,
-0.012946082279086113,
0.0025749607011675835,
0.11922630667686462,
0.009204789064824581,
-0.07817130535840988,
0.014462280087172985,
-0.03251054510474205,
-0.0008371500880457461,
0.020518863573670387,
-0.04525921866297722,
0.03272213414311409,
-0.11084640026092529,
-0.05051514133810997,
0.02428882010281086,
0.035886723548173904,
0.06989157944917679,
-0.02147028222680092,
-0.026937633752822876,
0.07922542840242386,
-0.0030275320168584585,
0.010882679373025894,
-0.03180904686450958,
-0.005155020393431187,
-0.06256043165922165,
-0.00023707104264758527,
0.04240827634930611,
-0.01803039386868477,
-0.06987756490707397,
-0.05993122234940529,
-0.031775761395692825,
-0.10870404541492462,
-0.022334860637784004,
-0.011092156171798706,
-0.07408963143825531,
0.007440666668117046,
-0.006681951694190502,
0.08315964043140411,
-0.04523100703954697,
-0.037542518228292465,
0.008070973679423332,
0.012804277241230011,
0.04252883419394493,
-0.05333429202437401,
0.005919554736465216,
-0.11005671322345734,
0.09313996136188507,
-0.00808409322053194,
0.021637888625264168,
0.012757056392729282,
-0.03495493903756142,
0.04946919158101082,
0.00616825558245182,
0.05907229706645012,
-0.047774046659469604,
-0.02869323268532753,
0.05053995922207832,
-0.0671851634979248,
-0.03703565150499344,
0.035625703632831573,
0.06507006287574768,
-0.03356437385082245,
0.015189794823527336,
-0.006553391460329294,
-0.044111840426921844,
-0.07209811359643936,
-0.0942433625459671,
-0.039957210421562195,
-0.00716276653110981,
0.010588892735540867,
0.010670703835785389,
0.010938715189695358,
0.037445057183504105,
-0.0174183938652277,
0.08289264142513275,
0.029317598789930344,
-0.024404561147093773,
0.011432277038693428,
0.031697940081357956,
0.09644599258899689,
0.0865517109632492,
0.021215490996837616,
0.005142390262335539,
0.14905758202075958,
0.015506569296121597,
0.12309645861387253,
-0.013784070499241352,
0.009922516532242298,
-0.03599724546074867,
0.1296384334564209,
-0.03236912563443184,
-5.2224802260525394e-8,
-0.046499934047460556,
0.0662476196885109,
-0.0646999329328537,
0.02932630479335785,
0.038593489676713943,
-0.009379862807691097,
0.04405372217297554,
-0.009428005665540695,
0.007972905412316322,
-0.05904894694685936,
-0.01824791729450226,
0.09362771362066269,
-0.11683133244514465,
0.04037391021847725,
-0.007986251264810562,
-0.028731323778629303,
-0.01638971082866192,
-0.02496722713112831,
-0.01934746466577053,
-0.042570147663354874,
-0.05375126004219055,
-0.01275169663131237,
-0.030066465958952904,
-0.036855462938547134,
0.025980155915021896,
-0.00879509188234806,
0.07184690237045288,
0.052819374948740005,
0.011900316923856735,
0.023096969351172447,
-0.04845275357365608,
-0.028969375416636467,
0.011091513559222221,
0.04494836553931236,
-0.05569903180003166,
0.05634146183729172,
-0.024283388629555702,
0.0568927526473999,
-0.01804323121905327,
0.04791390150785446,
0.04092735797166824,
-0.005946476478129625,
-0.09741459041833878,
0.002493695355951786,
0.07181506603956223,
0.049856968224048615,
-0.004994461312890053,
0.13360460102558136,
-0.009359829127788544,
-0.013532663695514202,
-0.07369329780340195,
-0.012861901894211769,
-0.06160266697406769,
0.06730001419782639,
-0.06550125777721405,
-0.020795738324522972,
-0.028914308175444603,
0.047971032559871674,
0.03447187691926956,
-0.08197903633117676,
0.08951272070407867,
-0.00041803743806667626,
0.009520919062197208,
0.02564690075814724
] | 0.044846
|
more ... ``` With one of those specification, both an integer and a string validate. In [Validation Schema Publishing](#publish-validation-schema-in-openapi), `x-kubernetes-int-or-string: true` is unfolded to one of the two patterns shown above. ### RawExtension RawExtensions (as in [`runtime.RawExtension`](/docs/reference//kubernetes-api/workload-resources/controller-revision-v1#RawExtension)) holds complete Kubernetes objects, i.e. with `apiVersion` and `kind` fields. It is possible to specify those embedded objects (both completely without constraints or partially specified) by setting `x-kubernetes-embedded-resource: true`. For example: ```yaml type: object properties: foo: x-kubernetes-embedded-resource: true x-kubernetes-preserve-unknown-fields: true ``` Here, the field `foo` holds a complete object, e.g.: ```yaml foo: apiVersion: v1 kind: Pod spec: # ... ``` Because `x-kubernetes-preserve-unknown-fields: true` is specified alongside, nothing is pruned. The use of `x-kubernetes-preserve-unknown-fields: true` is optional though. With `x-kubernetes-embedded-resource: true`, the `apiVersion`, `kind` and `metadata` are implicitly specified and validated. ## Serving multiple versions of a CRD See [Custom resource definition versioning](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/) for more information about serving multiple versions of your CustomResourceDefinition and migrating your objects from one version to another. ## Advanced topics ### Finalizers \*Finalizers\* allow controllers to implement asynchronous pre-delete hooks. Custom objects support finalizers similar to built-in objects. You can add a finalizer to a custom object like this: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: finalizers: - stable.example.com/finalizer ``` Identifiers of custom finalizers consist of a domain name, a forward slash and the name of the finalizer. Any controller can add a finalizer to any object's list of finalizers. The first delete request on an object with finalizers sets a value for the `metadata.deletionTimestamp` field but does not delete it. Once this value is set, entries in the `finalizers` list can only be removed. While any finalizers remain it is also impossible to force the deletion of an object. When the `metadata.deletionTimestamp` field is set, controllers watching the object execute any finalizers they handle and remove the finalizer from the list after they are done. It is the responsibility of each controller to remove its finalizer from the list. The value of `metadata.deletionGracePeriodSeconds` controls the interval between polling updates. Once the list of finalizers is empty, meaning all finalizers have been executed, the resource is deleted by Kubernetes. ### Validation Custom resources are validated via [OpenAPI v3.0 schemas](https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schema-object), by x-kubernetes-validations when the [Validation Rules feature](#validation-rules) is enabled, and you can add additional validation using [admission webhooks](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook). Additionally, the following restrictions are applied to the schema: - These fields cannot be set: - `definitions`, - `dependencies`, - `deprecated`, - `discriminator`, - `id`, - `patternProperties`, - `readOnly`, - `writeOnly`, - `xml`, - `$ref`. - The field `uniqueItems` cannot be set to `true`. - The field `additionalProperties` cannot be set to `false`. - The field `additionalProperties` is mutually exclusive with `properties`. The `x-kubernetes-validations` extension can be used to validate custom resources using [Common Expression Language (CEL)](https://github.com/google/cel-spec) expressions when the [Validation rules](#validation-rules) feature is enabled and the CustomResourceDefinition schema is a [structural schema](#specifying-a-structural-schema). Refer to the [structural schemas](#specifying-a-structural-schema) section for other restrictions and CustomResourceDefinition features. The schema is defined in the CustomResourceDefinition. In the following example, the CustomResourceDefinition applies the following validations on the custom object: - `spec.cronSpec` must be a string and must be of the form described by the regular expression. - `spec.replicas` must be an integer and must have a minimum value of 1 and a maximum value of 10. Save the CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com versions: - name: v1 served: true storage: true schema: # openAPIV3Schema is the schema for validating custom objects. openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string pattern: '^(\d+|\\*)(/\d+)?(\s+(\d+|\\*)(/\d+)?){4}$' image: type: string replicas: type: integer minimum: 1 maximum: 10 scope: Namespaced names:
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.0014273443957790732,
0.05306338518857956,
0.04613708332180977,
0.01463919784873724,
0.037799008190631866,
-0.0003692095051519573,
-0.037043649703264236,
-0.02414538711309433,
0.057944297790527344,
0.013636461459100246,
-0.02970699779689312,
-0.09757068008184433,
0.01815095543861389,
0.028433730825781822,
0.07553945481777191,
0.02648995816707611,
0.0462404228746891,
0.02424466237425804,
-0.08426754176616669,
0.011444340460002422,
0.04211626201868057,
0.04430979862809181,
0.015452233143150806,
0.0118569852784276,
-0.03134629502892494,
-0.04711033031344414,
-0.07461860775947571,
0.02402811497449875,
0.08904562145471573,
-0.013335907831788063,
-0.026824135333299637,
0.004227265249937773,
-0.06429362297058105,
0.0390247143805027,
0.1289696991443634,
0.08728242665529251,
0.05266069248318672,
-0.03607282415032387,
-0.03965677693486214,
0.06305860728025436,
0.029457177966833115,
-0.053654614835977554,
-0.038611993193626404,
-0.010899247601628304,
-0.026267308741807938,
-0.016837168484926224,
-0.02323063462972641,
-0.07918474078178406,
-0.09230180829763412,
-0.0006807722966186702,
0.06425905972719193,
-0.07931963354349136,
0.002910829847678542,
0.0678335502743721,
0.09462818503379822,
0.03252102807164192,
-0.11825455725193024,
0.030376126989722252,
0.012996652163565159,
0.02241455763578415,
0.024483749642968178,
-0.012520712800323963,
0.03223806619644165,
-0.031120147556066513,
-0.04551549255847931,
0.04658755287528038,
-0.02116142399609089,
-0.05862125754356384,
0.023446109145879745,
-0.01883787102997303,
0.08319699019193649,
-0.034699030220508575,
-0.06566641479730606,
0.024984125047922134,
-0.05433385819196701,
0.09035483747720718,
0.032836515456438065,
0.051749736070632935,
0.01495925709605217,
-0.09416531771421432,
-0.014699931256473064,
0.0069366940297186375,
0.026163622736930847,
-0.038074154406785965,
-0.03979593142867088,
0.02358502522110939,
0.02011779695749283,
0.00037157931365072727,
0.02250276505947113,
0.09508641064167023,
0.030540706589818,
-0.0837610587477684,
0.061815693974494934,
-0.029436547309160233,
0.08177845925092697,
-0.03369079530239105,
-0.04126875102519989,
-0.009420863352715969,
0.022584503516554832,
0.021444573998451233,
-0.03652063012123108,
0.009686294943094254,
0.0420478954911232,
-0.002304643392562866,
0.060586489737033844,
-0.06279297173023224,
-0.03467995300889015,
-0.002174384891986847,
-0.08283216506242752,
0.06912155449390411,
0.03486636281013489,
0.008170672692358494,
-0.010226036421954632,
-0.06744497269392014,
-0.014262231066823006,
0.040251463651657104,
-0.023247571662068367,
-0.0005108536570332944,
0.011651246808469296,
-0.01670132204890251,
0.03494551405310631,
-0.05825642868876457,
0.06508863717317581,
0.05648863688111305,
-0.018210433423519135,
-0.026269370689988136,
-0.021730590611696243,
2.8849746429208615e-33,
0.026481296867132187,
-0.03292261064052582,
0.020245129242539406,
0.010257385671138763,
-0.03258857876062393,
-0.03809339553117752,
-0.006582225672900677,
0.025516480207443237,
-0.07713918387889862,
0.0027361437678337097,
-0.06821595132350922,
0.08699434995651245,
-0.048125237226486206,
-0.0504559725522995,
0.0636078268289566,
0.02792591042816639,
-0.0470673106610775,
0.04358154535293579,
0.027559420093894005,
0.008080460131168365,
0.05958603322505951,
-0.05736659839749336,
-0.0778745487332344,
0.01780899241566658,
-0.022608278319239616,
-0.04540280997753143,
0.016102923080325127,
-0.061910487711429596,
-0.03265199437737465,
0.017900973558425903,
-0.06282487511634827,
-0.10681729018688202,
0.09264911711215973,
0.008478989824652672,
-0.06569365411996841,
0.006442440208047628,
-0.020809253677725792,
0.022140229120850563,
-0.06813187897205353,
-0.0031699808314442635,
0.04019462689757347,
0.045367516577243805,
-0.015519236214458942,
-0.028422942385077477,
0.0659971535205841,
-0.06923442333936691,
0.007942663505673409,
-0.018552418798208237,
0.021031063050031662,
-0.06953597068786621,
0.02674880623817444,
0.03107420913875103,
0.0639505609869957,
-0.04252474755048752,
0.07732324302196503,
-0.030062703415751457,
0.10532177239656448,
0.007075810804963112,
-0.029268285259604454,
-0.015338526107370853,
-0.053389184176921844,
-0.001681637717410922,
-0.06263406574726105,
-0.005253488663583994,
0.007426785305142403,
0.06577584147453308,
-0.022463399916887283,
-0.012092418037354946,
-0.060353994369506836,
-0.030942402780056,
-0.06126580759882927,
0.03757955878973007,
-0.12384377419948578,
0.013025403954088688,
0.00009235878678737208,
-0.1611892133951187,
0.019054090604186058,
0.036747630685567856,
-0.06756474822759628,
0.05240844190120697,
-0.01622142270207405,
0.012519167736172676,
-0.035387344658374786,
0.16068246960639954,
-0.05597598850727081,
-0.03240203857421875,
-0.002601596061140299,
0.028087768703699112,
0.003709403332322836,
-0.07477574050426483,
0.027193617075681686,
-0.06695611774921417,
-0.08532331883907318,
-0.0339934304356575,
-0.018605371937155724,
-2.174693018025041e-33,
0.07182210683822632,
-0.027026476338505745,
-0.03556910902261734,
0.05411474406719208,
0.003136310027912259,
-0.0015904095489531755,
0.007409443613141775,
0.05986024811863899,
-0.026222027838230133,
-0.08186756819486618,
-0.0026507952716201544,
-0.03473704308271408,
-0.0178001020103693,
-0.025567110627889633,
-0.07402093708515167,
-0.05196044221520424,
-0.193516343832016,
-0.06612057238817215,
0.007996792905032635,
0.05286760628223419,
0.047752127051353455,
0.012605066411197186,
0.07535029202699661,
0.06200122460722923,
0.09269678592681885,
0.014033648185431957,
-0.0345662459731102,
0.08959841728210449,
-0.07333593815565109,
-0.0028401114977896214,
0.030036337673664093,
-0.0918281152844429,
-0.06789714097976685,
-0.01627376861870289,
-0.05710570141673088,
-0.10365357995033264,
0.006601477507501841,
0.06859486550092697,
0.02361312508583069,
0.03355211019515991,
-0.007592250593006611,
0.056442443281412125,
-0.04631100222468376,
0.04716652259230614,
-0.036427441984415054,
0.040229570120573044,
0.04464230686426163,
-0.05211293324828148,
0.011003220453858376,
-0.10831719636917114,
-0.013057729229331017,
0.00041892434819601476,
-0.05411640927195549,
0.07983831316232681,
-0.0018715247279033065,
0.01213979534804821,
-0.008903419598937035,
0.041172102093696594,
-0.0441858172416687,
0.04394815117120743,
0.04903823882341385,
-0.013883404433727264,
0.0678783506155014,
0.0557694137096405,
0.01251192856580019,
0.0016835504211485386,
0.010988679714500904,
-0.011330056935548782,
-0.05832294002175331,
-0.04499993473291397,
-0.0006931779789738357,
-0.08675947785377502,
-0.022640438750386238,
0.04881777614355087,
0.011337107047438622,
-0.05424719303846359,
0.06060877442359924,
0.03982021287083626,
0.14634771645069122,
-0.004341291729360819,
-0.0312039814889431,
0.020780254155397415,
0.04796215891838074,
0.06852865219116211,
0.07742032408714294,
0.030225113034248352,
0.03087715618312359,
0.0710010975599289,
-0.011492780409753323,
0.07205192744731903,
-0.015665646642446518,
0.0528913289308548,
-0.007509801536798477,
0.08410265296697617,
-0.05111325532197952,
-4.682329901584126e-8,
-0.02188352309167385,
0.014793661423027515,
-0.0906597450375557,
0.009803936816751957,
0.00735639501363039,
-0.007817333564162254,
0.00380282592959702,
-0.04818533733487129,
0.06890953332185745,
-0.012316109612584114,
-0.020992202684283257,
0.03207772970199585,
-0.09066276997327805,
-0.022005345672369003,
-0.015106255188584328,
-0.022943614050745964,
0.046792302280664444,
0.04567041993141174,
-0.02792069874703884,
0.00578484358265996,
0.021430153399705887,
0.004175891168415546,
0.014868314377963543,
-0.05772646144032478,
0.10647229850292206,
0.040297891944646835,
0.011961576528847218,
0.06822291761636734,
0.07713181525468826,
0.058919720351696014,
-0.0022954910527914762,
-0.02937311865389347,
0.0018830220215022564,
0.06141992658376694,
-0.02709980495274067,
0.0940086767077446,
-0.06117144227027893,
0.05596696212887764,
-0.014067755080759525,
0.05277964100241661,
0.05533559247851372,
-0.04965931922197342,
-0.10716946423053741,
-0.017572445794939995,
0.0391109474003315,
0.058463092893362045,
-0.013969379477202892,
0.017502397298812866,
-0.04939016327261925,
0.03887826204299927,
-0.04762503132224083,
-0.05619028955698013,
0.006620179861783981,
0.0671260803937912,
-0.11378014832735062,
0.005668592639267445,
0.005031564272940159,
0.01790103130042553,
0.03163681551814079,
-0.06915031373500824,
0.06281402707099915,
-0.018882885575294495,
0.07959552854299545,
0.03201870620250702
] | 0.096978
|
metadata: name: crontabs.stable.example.com spec: group: stable.example.com versions: - name: v1 served: true storage: true schema: # openAPIV3Schema is the schema for validating custom objects. openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string pattern: '^(\d+|\\*)(/\d+)?(\s+(\d+|\\*)(/\d+)?){4}$' image: type: string replicas: type: integer minimum: 1 maximum: 10 scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct ``` and create it: ```shell kubectl apply -f resourcedefinition.yaml ``` A request to create a custom object of kind CronTab is rejected if there are invalid values in its fields. In the following example, the custom object contains fields with invalid values: - `spec.cronSpec` does not match the regular expression. - `spec.replicas` is greater than 10. If you save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \*" image: my-awesome-cron-image replicas: 15 ``` and attempt to create it: ```shell kubectl apply -f my-crontab.yaml ``` then you get an error: ```console The CronTab "my-new-cron-object" is invalid: []: Invalid value: map[string]interface {}{"apiVersion":"stable.example.com/v1", "kind":"CronTab", "metadata":map[string]interface {}{"name":"my-new-cron-object", "namespace":"default", "deletionTimestamp":interface {}(nil), "deletionGracePeriodSeconds":(\*int64)(nil), "creationTimestamp":"2017-09-05T05:20:07Z", "uid":"e14d79e7-91f9-11e7-a598-f0761cb232d1", "clusterName":""}, "spec":map[string]interface {}{"cronSpec":"\* \* \* \*", "image":"my-awesome-cron-image", "replicas":15}}: validation failure list: spec.cronSpec in body should match '^(\d+|\\*)(/\d+)?(\s+(\d+|\\*)(/\d+)?){4}$' spec.replicas in body should be less than or equal to 10 ``` If the fields contain valid values, the object creation request is accepted. Save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \* \*/5" image: my-awesome-cron-image replicas: 5 ``` And create it: ```shell kubectl apply -f my-crontab.yaml crontab "my-new-cron-object" created ``` ### Validation ratcheting {{< feature-state feature\_gate\_name="CRDValidationRatcheting" >}} If you are using a version of Kubernetes older than v1.30, you need to explicitly enable the `CRDValidationRatcheting` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to use this behavior, which then applies to all CustomResourceDefinitions in your cluster. Provided you enabled the feature gate, Kubernetes implements \_validation ratcheting\_ for CustomResourceDefinitions. The API server is willing to accept updates to resources that are not valid after the update, provided that each part of the resource that failed to validate was not changed by the update operation. In other words, any invalid part of the resource that remains invalid must have already been wrong. You cannot use this mechanism to update a valid resource so that it becomes invalid. This feature allows authors of CRDs to confidently add new validations to the OpenAPIV3 schema under certain conditions. Users can update to the new schema safely without bumping the version of the object or breaking workflows. While most validations placed in the OpenAPIV3 schema of a CRD support ratcheting, there are a few exceptions. The following OpenAPIV3 schema validations are not supported by ratcheting under the implementation in Kubernetes {{< skew currentVersion >}} and if violated will continue to throw an error as normally: - Quantors - `allOf` - `oneOf` - `anyOf` - `not` - any validations in a descendent of one of these fields - `x-kubernetes-validations` For Kubernetes 1.28, CRD [validation rules](#validation-rules) are ignored by ratcheting. Starting with Alpha 2 in Kubernetes 1.29, `x-kubernetes-validations` are ratcheted only if they do not refer to `oldSelf`. Transition Rules are never ratcheted: only errors raised by rules that do not use `oldSelf` will be automatically ratcheted if their values are unchanged. To write custom ratcheting logic for CEL expressions, check out [optionalOldSelf](#field-optional-oldself). - `x-kubernetes-list-type` Errors arising from changing the list type of a subschema will not be ratcheted. For example adding `set` onto a list with duplicates will always result in an error. - `x-kubernetes-list-map-keys` Errors arising from changing the map keys of a list schema will not be ratcheted. - `required` Errors arising from changing
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.00846042949706316,
0.06310444325208664,
0.019531458616256714,
-0.050193484872579575,
-0.048033613711595535,
0.0044137355871498585,
0.05252186954021454,
0.005205222871154547,
0.06577970832586288,
0.014416356571018696,
-0.02336234599351883,
-0.15232212841510773,
-0.008774329908192158,
0.004003459587693214,
0.0506763681769371,
0.012298930436372757,
0.011732426472008228,
-0.04313107579946518,
-0.05224890261888504,
0.015010348521173,
0.03141580522060394,
0.0042382488027215,
-0.002898374805226922,
-0.009944748133420944,
-0.06598680466413498,
-0.012099629268050194,
-0.02142835035920143,
0.052618373185396194,
0.036183468997478485,
-0.011247992515563965,
-0.0035144914872944355,
0.04574734345078468,
-0.03396346792578697,
0.035012438893318176,
0.17941884696483612,
0.1488533914089203,
-0.00464970339089632,
-0.004162490367889404,
-0.012362477369606495,
0.06737477332353592,
0.011081979610025883,
-0.018703436478972435,
0.0014393882593140006,
-0.04670008271932602,
0.016086937859654427,
-0.049086373299360275,
-0.015532949939370155,
-0.08411690592765808,
-0.011098723858594894,
-0.04868433624505997,
-0.008493615314364433,
-0.04926244914531708,
-0.023476814851164818,
0.10401610285043716,
0.11461517959833145,
0.07112875580787659,
-0.07828427106142044,
0.04277947545051575,
0.0773850753903389,
-0.02598121389746666,
0.0491635724902153,
-0.034317899495363235,
0.03141755983233452,
-0.04674993082880974,
-0.03413746505975723,
-0.037169162184000015,
-0.08450490981340408,
-0.047583047300577164,
0.004649071954190731,
-0.0155923031270504,
0.003508995985612273,
0.004638090264052153,
-0.06760717928409576,
0.010251682251691818,
-0.016082553192973137,
0.09947405755519867,
-0.06388549506664276,
-0.018732376396656036,
-0.03298471122980118,
-0.12351502478122711,
-0.05977965146303177,
-0.01279997918754816,
0.011970830149948597,
-0.051976706832647324,
0.007190455682575703,
0.0396500788629055,
0.0067083509638905525,
-0.045756977051496506,
0.02450445108115673,
0.06787645816802979,
0.023419493809342384,
-0.03179606795310974,
0.0025181248784065247,
-0.058702290058135986,
0.05270414426922798,
0.02558160200715065,
-0.04152502864599228,
-0.008837909437716007,
0.04803759232163429,
0.02251897007226944,
0.043072301894426346,
0.04908985272049904,
-0.0005796076729893684,
-0.006487490609288216,
0.07269977778196335,
0.05974099785089493,
-0.06207336112856865,
0.02512243017554283,
-0.07679281383752823,
0.055888161063194275,
-0.049385081976652145,
0.05331040918827057,
-0.006539497524499893,
-0.07251844555139542,
0.032853204756975174,
0.031161973252892494,
-0.06031913310289383,
-0.01034660916775465,
-0.004138312768191099,
0.040116775780916214,
0.10431888699531555,
-0.07251669466495514,
-0.03097892366349697,
-0.028367286548018456,
-0.01679491624236107,
0.009447154588997364,
0.0031965819653123617,
6.909979706783671e-33,
0.03391830250620842,
-0.0027135054115206003,
0.0418696328997612,
-0.054654013365507126,
-0.050524983555078506,
-0.05639880895614624,
-0.09831377863883972,
0.07763916999101639,
-0.048209115862846375,
-0.05806730315089226,
-0.04038087651133537,
0.03910519927740097,
-0.05951133742928505,
-0.028841907158493996,
0.036850593984127045,
0.04726603999733925,
-0.061693303287029266,
-0.03965310752391815,
0.003281230805441737,
0.0025410999078303576,
0.051415834575891495,
-0.06402073055505753,
-0.04364587366580963,
0.01652519591152668,
-0.04588107392191887,
-0.04930954426527023,
0.0325135663151741,
-0.0189505685120821,
0.0005375125329010189,
0.01226763054728508,
0.029690813273191452,
-0.007115206681191921,
0.1030103862285614,
0.03575236722826958,
-0.03519026190042496,
0.008032193407416344,
0.020859427750110626,
0.012174120172858238,
-0.11585252732038498,
-0.03132302686572075,
0.042645085602998734,
0.002256985753774643,
-0.024424370378255844,
-0.024360667914152145,
0.12521356344223022,
-0.10230415314435959,
0.07669039815664291,
-0.05014906823635101,
-0.00522891478613019,
-0.01268793921917677,
-0.02494303323328495,
0.03634848818182945,
0.020826930180191994,
-0.031929705291986465,
0.009953678585588932,
0.008941035717725754,
0.059886667877435684,
-0.030847394838929176,
-0.02392532303929329,
-0.009163342416286469,
-0.03166106715798378,
0.05403807759284973,
-0.01873421110212803,
0.047637369483709335,
-0.012580664828419685,
0.00847058929502964,
0.0589621365070343,
-0.039104681462049484,
-0.066117063164711,
-0.024633221328258514,
0.028305934742093086,
0.05451405420899391,
-0.11634553968906403,
-0.011792615056037903,
0.022005300968885422,
-0.13854573667049408,
0.09988147020339966,
0.0012429185444489121,
-0.13102367520332336,
-0.0000837651823530905,
0.006435558199882507,
-0.021564548835158348,
-0.020594043657183647,
0.04891899600625038,
-0.11551085114479065,
-0.03252943605184555,
0.018999606370925903,
-0.0014374632155522704,
0.03459063917398453,
-0.029909085482358932,
0.01503255870193243,
-0.049232739955186844,
-0.1555415540933609,
0.015199122950434685,
-0.09449264407157898,
-7.174193367966089e-33,
0.06965702027082443,
-0.036569930613040924,
0.0017746954690665007,
0.06116844713687897,
0.02766258642077446,
0.015132921747863293,
0.043356701731681824,
0.04569944739341736,
0.0013795115519315004,
-0.06627481430768967,
-0.007814187556505203,
-0.05821776017546654,
-0.02831561118364334,
-0.009298605844378471,
0.009341142140328884,
-0.04128548130393028,
-0.13727688789367676,
-0.06405659765005112,
-0.025191301479935646,
0.06224364414811134,
0.04250644892454147,
0.1438968926668167,
0.003926506265997887,
0.11328472942113876,
0.02244969829916954,
0.0501127727329731,
-0.060810256749391556,
-0.007996479980647564,
-0.027421729639172554,
0.04241016507148743,
0.004419042728841305,
-0.06800132989883423,
-0.04917512834072113,
0.08137530088424683,
-0.01761573739349842,
-0.10479846596717834,
0.000574540114030242,
0.02070116065442562,
-0.011510043404996395,
0.026185104623436928,
0.05081379786133766,
0.08176767081022263,
-0.018057825043797493,
0.004737603943794966,
-0.06123388186097145,
-0.028755726292729378,
0.044241178780794144,
0.01281907968223095,
0.021300584077835083,
-0.11024361103773117,
-0.0069773243740201,
-0.04984879866242409,
-0.03927505388855934,
0.056439705193042755,
0.06401967257261276,
0.040679775178432465,
-0.029398009181022644,
-0.002630912698805332,
-0.03927130252122879,
0.035259757190942764,
0.00673043355345726,
-0.02674836851656437,
0.04916427284479141,
0.03314530849456787,
0.08763312548398972,
-0.010245712473988533,
-0.042607005685567856,
-0.030298003926873207,
-0.020688371732831,
-0.037270672619342804,
0.0048563978634774685,
-0.04617887735366821,
-0.0279828067868948,
0.018822239711880684,
0.004614075645804405,
-0.001095667714253068,
-0.02561272121965885,
0.015522916801273823,
0.03837502375245094,
0.12458697706460953,
-0.006284131668508053,
0.01991313509643078,
0.04782840982079506,
0.10715357959270477,
-0.03403538465499878,
-0.04165712371468544,
-0.0470622219145298,
0.09812072664499283,
-0.02598751150071621,
0.07643686234951019,
0.03426738083362579,
0.06236198544502258,
0.011369403451681137,
0.07697410881519318,
0.04802533984184265,
-5.1127415190421743e-8,
-0.047738440334796906,
-0.059122513979673386,
0.002597323153167963,
0.04344452917575836,
0.027196865528821945,
-0.09538686275482178,
0.025354349985718727,
-0.0875273197889328,
0.007996215485036373,
-0.027609562501311302,
-0.05846717208623886,
0.012055570259690285,
-0.07557263970375061,
-0.00466727651655674,
-0.03941163793206215,
0.012293864972889423,
-0.014818765223026276,
0.03210392966866493,
0.006792077794671059,
-0.0008654401754029095,
-0.045807115733623505,
-0.03997940570116043,
0.005560627672821283,
-0.025887269526720047,
0.034301478415727615,
0.10909759253263474,
0.025434860959649086,
0.04727547988295555,
0.0074303061701357365,
0.07110040634870529,
0.06973189860582352,
-0.0481359027326107,
0.05569935590028763,
0.0305351372808218,
-0.07698222249746323,
0.07110950350761414,
-0.030426448211073875,
0.03337813541293144,
-0.03542788326740265,
-0.0030723160598427057,
0.07386475056409836,
-0.0009478916181251407,
-0.08474847674369812,
-0.053290825337171555,
-0.014431585557758808,
0.02213921770453453,
-0.038170378655195236,
0.059269361197948456,
-0.04179028049111366,
0.00711451331153512,
-0.02046637050807476,
-0.051495857536792755,
-0.0029229195788502693,
0.05224692448973656,
-0.06723736971616745,
-0.002516329288482666,
0.0677446573972702,
-0.019920744001865387,
0.03184115141630173,
-0.036891765892505646,
0.07037532329559326,
0.014236745424568653,
0.02326759696006775,
0.017149245366454124
] | 0.109512
|
from changing the list type of a subschema will not be ratcheted. For example adding `set` onto a list with duplicates will always result in an error. - `x-kubernetes-list-map-keys` Errors arising from changing the map keys of a list schema will not be ratcheted. - `required` Errors arising from changing the list of required fields will not be ratcheted. - `properties` Adding/removing/modifying the names of properties is not ratcheted, but changes to validations in each properties' schemas and subschemas may be ratcheted if the name of the property stays the same. - `additionalProperties` To remove a previously specified `additionalProperties` validation will not be ratcheted. - `metadata` Errors that come from Kubernetes' built-in validation of an object's `metadata` are not ratcheted (such as object name, or characters in a label value). If you specify your own additional rules for the metadata of a custom resource, that additional validation will be ratcheted. ### Validation rules {{< feature-state state="stable" for\_k8s\_version="v1.29" >}} Validation rules use the [Common Expression Language (CEL)](https://github.com/google/cel-spec) to validate custom resource values. Validation rules are included in CustomResourceDefinition schemas using the `x-kubernetes-validations` extension. The Rule is scoped to the location of the `x-kubernetes-validations` extension in the schema. And `self` variable in the CEL expression is bound to the scoped value. All validation rules are scoped to the current object: no cross-object or stateful validation rules are supported. For example: ```yaml # ... openAPIV3Schema: type: object properties: spec: type: object x-kubernetes-validations: - rule: "self.minReplicas <= self.replicas" message: "replicas should be greater than or equal to minReplicas." - rule: "self.replicas <= self.maxReplicas" message: "replicas should be smaller than or equal to maxReplicas." properties: # ... minReplicas: type: integer replicas: type: integer maxReplicas: type: integer required: - minReplicas - replicas - maxReplicas ``` will reject a request to create this custom resource: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: minReplicas: 0 replicas: 20 maxReplicas: 10 ``` with the response: ``` The CronTab "my-new-cron-object" is invalid: \* spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: replicas should be smaller than or equal to maxReplicas. ``` `x-kubernetes-validations` could have multiple rules. The `rule` under `x-kubernetes-validations` represents the expression which will be evaluated by CEL. The `message` represents the message displayed when validation fails. If message is unset, the above response would be: ``` The CronTab "my-new-cron-object" is invalid: \* spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: failed rule: self.replicas <= self.maxReplicas ``` {{< note >}} You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). {{< /note >}} Validation rules are compiled when CRDs are created/updated. The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well. The compilation failure: - `no\_matching\_overload`: this function has no overload for the types of the arguments. For example, a rule like `self == true` against a field of integer type will get error: ```none Invalid value: apiextensions.ValidationRule{Rule:"self == true", Message:""}: compilation failed: ERROR: \:1:6: found no matching overload for '\_==\_' applied to '(int, bool)' ``` - `no\_such\_field`: does not contain the desired field. For example, a rule like `self.nonExistingField > 0` against a non-existing field will return the following error: ```none Invalid value: apiextensions.ValidationRule{Rule:"self.nonExistingField > 0", Message:""}: compilation failed: ERROR: \:1:5: undefined field 'nonExistingField' ``` - `invalid argument`: invalid argument to macros. For example, a rule like `has(self)` will return error: ```none Invalid value: apiextensions.ValidationRule{Rule:"has(self)", Message:""}: compilation failed: ERROR: :1:4: invalid argument to has() macro ``` Validation Rules Examples: | Rule | Purpose | | ---------------- | ------------ | | `self.minReplicas <= self.replicas && self.replicas <= self.maxReplicas` | Validate that the three fields defining replicas are ordered appropriately | |
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.030114004388451576,
0.02294136770069599,
0.0658814087510109,
-0.010846720077097416,
-0.031174631789326668,
-0.014632108621299267,
0.023809164762496948,
-0.03297656029462814,
0.01704990118741989,
0.04118115082383156,
-0.014063762500882149,
-0.019649563357234,
-0.025670332834124565,
-0.004733892623335123,
-0.006937321741133928,
0.02884664572775364,
0.013834428042173386,
0.016266146674752235,
-0.04827698692679405,
0.015032926574349403,
0.06138721853494644,
-0.050486888736486435,
0.0063363113440573215,
0.01978464052081108,
-0.062146224081516266,
-0.009754273109138012,
-0.04705003648996353,
0.05228252708911896,
-0.049351755529642105,
-0.0570952482521534,
-0.05963487923145294,
0.02869105525314808,
-0.09655856341123581,
-0.05269576981663704,
0.10698117315769196,
0.02957135997712612,
-0.04349910095334053,
0.027047373354434967,
-0.04560338333249092,
0.06682436168193817,
0.019063934683799744,
-0.05604751035571098,
-0.03461196646094322,
-0.01998860202729702,
-0.054282210767269135,
0.024927956983447075,
0.06142497435212135,
-0.10942396521568298,
-0.0899190679192543,
-0.000005703846454707673,
0.027094215154647827,
-0.011814647354185581,
-0.013396218419075012,
0.07278820127248764,
0.04864786937832832,
0.05245665833353996,
-0.003937155939638615,
0.06132381409406662,
0.010246952064335346,
-0.00784431304782629,
0.07178447395563126,
0.005708746612071991,
-0.026393016800284386,
-0.018610036000609398,
0.030213801190257072,
0.02903728559613228,
-0.0035117289517074823,
-0.01571286842226982,
0.03416316583752632,
0.07976686209440231,
0.09846523404121399,
-0.02156098373234272,
-0.019974971190094948,
-0.014825907535851002,
0.03335743024945259,
0.02868579886853695,
-0.09343750029802322,
0.05013890191912651,
0.0011335944291204214,
-0.16348744928836823,
-0.0521586574614048,
0.08135978877544403,
0.04558038339018822,
-0.08001730591058731,
-0.01504315435886383,
-0.004374452400952578,
-0.01080345455557108,
-0.05494464188814163,
0.05623200908303261,
0.04668818786740303,
0.025169257074594498,
-0.072646364569664,
0.03245895355939865,
-0.029660634696483612,
0.014943135902285576,
0.02817675471305847,
0.028125694021582603,
0.04097291827201843,
-0.009732742793858051,
0.01759955659508705,
-0.03034479171037674,
0.008677291683852673,
-0.0649813637137413,
0.0025097995530813932,
0.08103929460048676,
-0.009483917616307735,
-0.04732630029320717,
-0.04042181745171547,
-0.11239918321371078,
0.05037807673215866,
-0.012074023485183716,
0.09823080897331238,
-0.028431667014956474,
-0.06101201847195625,
0.03825175389647484,
0.09078007936477661,
-0.029942255467176437,
0.028252553194761276,
-0.0338004045188427,
0.028866084292531013,
0.054708272218704224,
-0.13345514237880707,
0.1303967982530594,
0.0229896679520607,
-0.05994616821408272,
0.008599546737968922,
-0.12560006976127625,
4.013240936804971e-33,
0.017741695046424866,
-0.036436162889003754,
0.007366054225713015,
-0.026009509339928627,
-0.0477757602930069,
-0.06945905834436417,
0.0028147262055426836,
-0.013800482265651226,
-0.06552616506814957,
0.008181462995707989,
0.04775743559002876,
0.048509933054447174,
-0.0797034502029419,
-0.039637673646211624,
0.05854075774550438,
0.02493416517972946,
0.0015796134248375893,
0.008185330778360367,
0.07293052971363068,
-0.05406993627548218,
0.09672851860523224,
-0.006308043375611305,
-0.052427273243665695,
0.03156944364309311,
-0.005798364523798227,
-0.016063524410128593,
-0.01223866268992424,
0.007831888273358345,
-0.06622789055109024,
0.025869257748126984,
0.03079175390303135,
0.020164459943771362,
0.027392884716391563,
0.018172645941376686,
-0.05775497481226921,
-0.007490644697099924,
-0.020382612943649292,
-0.04514764994382858,
-0.05302029103040695,
-0.003911104518920183,
0.07706151157617569,
-0.027035973966121674,
-0.06762266904115677,
-0.011518633924424648,
0.048902325332164764,
-0.041970089077949524,
0.030753495171666145,
-0.021458979696035385,
0.005378898698836565,
0.002446658443659544,
0.002228962257504463,
0.023364266380667686,
0.07814662158489227,
0.016052979975938797,
0.021921394392848015,
-0.03607046976685524,
0.0801696702837944,
-0.0551726408302784,
-0.016605975106358528,
0.0076742894016206264,
-0.03638438507914543,
-0.010463305748999119,
-0.027968445792794228,
-0.006255860440433025,
-0.040314655750989914,
0.08316204696893692,
0.03646465763449669,
0.03977610170841217,
-0.04091329127550125,
-0.11778389662504196,
-0.052071042358875275,
0.00910324789583683,
-0.08071019500494003,
0.05187169089913368,
0.0010418628808110952,
-0.08576928824186325,
0.04290974512696266,
-0.02843339927494526,
-0.09669529646635056,
0.004100529011338949,
0.007092616055160761,
0.042155250906944275,
-0.05220669507980347,
0.12442716956138611,
-0.058803923428058624,
-0.062314655631780624,
0.04861133173108101,
-0.016438927501440048,
0.012772228568792343,
0.042198486626148224,
0.013752887025475502,
0.03505515679717064,
-0.011891107074916363,
0.02797366864979267,
-0.08068705350160599,
-5.456489390857559e-33,
0.036791540682315826,
-0.030315903946757317,
-0.034095462411642075,
0.07692506164312363,
-0.04124266281723976,
-0.00978391245007515,
0.03282788023352623,
0.016627883538603783,
-0.007097315043210983,
-0.1303914487361908,
-0.0048503391444683075,
-0.11380968242883682,
-0.0619167760014534,
-0.0032232976518571377,
-0.046091873198747635,
-0.0674806609749794,
-0.1397237479686737,
-0.08758700639009476,
0.04585639759898186,
0.008289805613458157,
0.050250474363565445,
0.01834944821894169,
-0.024090636521577835,
0.08572424948215485,
0.005383569747209549,
-0.028720933943986893,
-0.08177211880683899,
0.009713365696370602,
-0.06133619323372841,
0.032268837094306946,
0.06576309353113174,
-0.018284883350133896,
0.0013526647817343473,
0.08310966193675995,
0.007020529359579086,
-0.032083917409181595,
0.02004058286547661,
0.01985151506960392,
-0.08270623534917831,
0.021990766748785973,
0.0024274345487356186,
0.0653136670589447,
0.0057562002912163734,
0.008167093619704247,
-0.02862747572362423,
-0.040575653314590454,
-0.01973845064640045,
-0.002780918963253498,
0.058947913348674774,
-0.06329136341810226,
0.06583370268344879,
-0.03292113170027733,
-0.05868498608469963,
-0.027814870700240135,
0.02734130248427391,
0.05794756859540939,
0.0142343295738101,
-0.017181379720568657,
0.036391131579875946,
0.019899649545550346,
0.017985928803682327,
-0.053773585706949234,
-0.005430109798908234,
0.04333007335662842,
0.06148223578929901,
-0.06973246484994888,
0.01944580487906933,
-0.10612110793590546,
0.022161927074193954,
-0.01892848126590252,
-0.008229397237300873,
-0.04323364049196243,
-0.009292359463870525,
0.0010169993620365858,
0.04924122244119644,
-0.0515412911772728,
0.0945049300789833,
-0.02330731600522995,
0.0685863271355629,
-0.025782132521271706,
-0.03863431140780449,
0.013242795132100582,
0.02909799851477146,
-0.045554980635643005,
-0.013679076917469501,
0.08525122702121735,
-0.02667374350130558,
0.0855652391910553,
0.02950962446630001,
0.07936763763427734,
0.040648460388183594,
0.003726623486727476,
0.0355338491499424,
0.07032539695501328,
-0.07956933230161667,
-5.287345672400079e-8,
0.015214653685688972,
-0.011336908675730228,
-0.04500311240553856,
0.016921373084187508,
0.01709721051156521,
-0.057667508721351624,
0.09897490590810776,
0.017298975959420204,
0.036774761974811554,
-0.05846778675913811,
0.02695866860449314,
0.11895757168531418,
-0.02000143751502037,
0.048099733889102936,
0.018429214134812355,
-0.06009659543633461,
0.05100494623184204,
0.08394943177700043,
-0.03970339149236679,
-0.0028214948251843452,
-0.04042605683207512,
0.0012505585327744484,
-0.040513020008802414,
-0.006873453035950661,
0.05114653334021568,
-0.011077572591602802,
0.0637492910027504,
0.08884242177009583,
0.024382522329688072,
0.06739792227745056,
0.01242841873317957,
-0.06759489327669144,
0.07159427553415298,
0.1524834930896759,
0.022717559710144997,
0.03939591720700264,
-0.11089461296796799,
0.10823655873537064,
0.01029982976615429,
0.09827934950590134,
-0.010475946590304375,
-0.009553985670208931,
-0.09510567039251328,
0.02134721353650093,
-0.005595138296484947,
0.028542151674628258,
-0.11513107270002365,
0.02755686454474926,
-0.01895885169506073,
-0.0005117763648740947,
-0.0445944145321846,
0.03524724394083023,
-0.03113301284611225,
0.021179810166358948,
-0.048891209065914154,
0.1026211678981781,
0.029189083725214005,
0.041838571429252625,
0.025550780817866325,
-0.07595890015363693,
0.00039213625132106245,
-0.04102370887994766,
0.034220367670059204,
-0.05406135693192482
] | 0.083468
|
error: ```none Invalid value: apiextensions.ValidationRule{Rule:"has(self)", Message:""}: compilation failed: ERROR: :1:4: invalid argument to has() macro ``` Validation Rules Examples: | Rule | Purpose | | ---------------- | ------------ | | `self.minReplicas <= self.replicas && self.replicas <= self.maxReplicas` | Validate that the three fields defining replicas are ordered appropriately | | `'Available' in self.stateCounts` | Validate that an entry with the 'Available' key exists in a map | | `(size(self.list1) == 0) != (size(self.list2) == 0)` | Validate that one of two lists is non-empty, but not both | | `!('MY_KEY' in self.map1) || self['MY_KEY'].matches('^[a-zA-Z]*$')` | Validate the value of a map for a specific key, if it is in the map | | `self.envars.filter(e, e.name == 'MY\_ENV').all(e, e.value.matches('^[a-zA-Z]\*$')` | Validate the 'value' field of a listMap entry where key field 'name' is 'MY\_ENV' | | `has(self.expired) && self.created + self.ttl < self.expired` | Validate that 'expired' date is after a 'create' date plus a 'ttl' duration | | `self.health.startsWith('ok')` | Validate a 'health' string field has the prefix 'ok' | | `self.widgets.exists(w, w.key == 'x' && w.foo < 10)` | Validate that the 'foo' property of a listMap item with a key 'x' is less than 10 | | `type(self) == string ? self == '100%' : self == 1000` | Validate an int-or-string field for both the int and string cases | | `self.metadata.name.startsWith(self.prefix)` | Validate that an object's name has the prefix of another field value | | `self.set1.all(e, !(e in self.set2))` | Validate that two listSets are disjoint | | `size(self.names) == size(self.details) && self.names.all(n, n in self.details)` | Validate the 'details' map is keyed by the items in the 'names' listSet | | `size(self.clusters.filter(c, c.name == self.primary)) == 1` | Validate that the 'primary' property has one and only one occurrence in the 'clusters' listMap | Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6.0/doc/langdef.md#evaluation) - If the Rule is scoped to the root of a resource, it may make field selection into any fields declared in the OpenAPIv3 schema of the CRD as well as `apiVersion`, `kind`, `metadata.name` and `metadata.generateName`. This includes selection of fields in both the `spec` and `status` in the same expression: ```yaml # ... openAPIV3Schema: type: object x-kubernetes-validations: - rule: "self.status.availableReplicas >= self.spec.minReplicas" properties: spec: type: object properties: minReplicas: type: integer # ... status: type: object properties: availableReplicas: type: integer ``` - If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. ```yaml # ... openAPIV3Schema: type: object properties: spec: type: object x-kubernetes-validations: - rule: "has(self.foo)" properties: # ... foo: type: integer ``` - If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. ```yaml # ... openAPIV3Schema: type: object properties: spec: type: object x-kubernetes-validations: - rule: "self['xyz'].foo > 0" additionalProperties: # ... type: object properties: foo: type: integer ``` - If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. ```yaml # ... openAPIV3Schema: type: object properties: # ... foo: type: array x-kubernetes-validations: - rule: "size(self) == 1" items: type: string ``` - If the Rule is scoped to a scalar, `self` is bound to the scalar value. ```yaml # ... openAPIV3Schema: type: object properties: spec: type: object properties: # ... foo: type: integer
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.04235612601041794,
0.023544378578662872,
0.03238464891910553,
-0.03841580078005791,
0.02817809022963047,
-0.045029133558273315,
0.010707782581448555,
-0.0027350913733243942,
-0.026438429951667786,
-0.018924279138445854,
-0.005483737215399742,
-0.06133092939853668,
0.0946483165025711,
0.026694729924201965,
0.06982924789190292,
0.04533032327890396,
-0.008640310727059841,
-0.05574344843626022,
-0.04926334321498871,
-0.03624138608574867,
0.08008132129907608,
-0.03940466418862343,
-0.02315874584019184,
0.025976713746786118,
-0.03127627819776535,
-0.021397046744823456,
-0.07752210646867752,
-0.018558025360107422,
0.0055394102819263935,
-0.06284304708242416,
-0.00666752178221941,
0.01971162110567093,
-0.07061562687158585,
0.06465016305446625,
0.16362543404102325,
0.026898076757788658,
0.0048301322385668755,
-0.05420761927962303,
-0.005559729877859354,
-0.03143148124217987,
0.01427791640162468,
-0.013541518710553646,
-0.0680503323674202,
-0.03703949600458145,
-0.03218873217701912,
0.08105058968067169,
-0.00043044291669502854,
0.026924563571810722,
-0.012913288548588753,
-0.024274220690131187,
-0.07791873812675476,
0.049245625734329224,
-0.049333542585372925,
0.031860265880823135,
0.05543642118573189,
0.040197860449552536,
-0.021650152280926704,
-0.013818498700857162,
-0.01675504632294178,
-0.0774155929684639,
0.09005215764045715,
-0.07600078731775284,
-0.0037171225994825363,
-0.01979312114417553,
-0.06255768239498138,
0.04555686563253403,
-0.04143306240439415,
0.005424548871815205,
-0.010297439992427826,
0.06800400465726852,
0.03761347755789757,
-0.018953071907162666,
-0.020019060000777245,
0.09212850779294968,
-0.029742201790213585,
0.021458955481648445,
-0.0003228029527235776,
-0.032692473381757736,
0.004449016880244017,
-0.03134280815720558,
-0.1768130362033844,
-0.11609666794538498,
-0.04522978141903877,
0.061787866055965424,
0.0026798441540449858,
-0.07729367166757584,
-0.03743880242109299,
-0.0705755278468132,
0.02052081748843193,
0.062114451080560684,
0.026626106351614,
0.006319019943475723,
0.07766931504011154,
0.04550134018063545,
0.1010819673538208,
0.011419499292969704,
0.009085394442081451,
0.023306842893362045,
-0.008726176805794239,
0.03659507632255554,
-0.02549944445490837,
-0.021117927506566048,
0.024397024884819984,
0.0005392214516177773,
0.0764116421341896,
0.02608681656420231,
-0.057275883853435516,
-0.08515265583992004,
0.015817364677786827,
0.054989710450172424,
0.020720040425658226,
-0.014741068705916405,
0.07622160762548447,
0.015404252335429192,
0.012096082791686058,
0.13035888969898224,
-0.008572342805564404,
0.05852990597486496,
-0.043128810822963715,
0.03383006155490875,
0.026628274470567703,
-0.018222426995635033,
0.08576880395412445,
-0.05514797940850258,
-0.009770885109901428,
-0.030182745307683945,
0.001766109373420477,
4.5144386672169777e-33,
0.0017865609843283892,
0.04042325168848038,
-0.027735717594623566,
-0.017480527982115746,
-0.005591281224042177,
0.05114595592021942,
-0.029278771951794624,
0.02011469006538391,
-0.14911551773548126,
-0.051660411059856415,
-0.025081880390644073,
0.0896613672375679,
-0.03139161318540573,
-0.04000488296151161,
0.0007842305931262672,
0.0020899679511785507,
0.046563636511564255,
0.006947290617972612,
-0.010772950015962124,
0.026279572397470474,
0.07017558068037033,
-0.07293641567230225,
-0.057180214673280716,
-0.0018752848263829947,
-0.060178242623806,
0.0005181482410989702,
-0.03966018930077553,
0.010294776409864426,
-0.008145156316459179,
0.016993803903460503,
-0.06759148836135864,
-0.037794407457113266,
0.07507357001304626,
0.015092172659933567,
0.05099741742014885,
0.007176067680120468,
0.032543446868658066,
-0.025933587923645973,
-0.08335399627685547,
-0.13094137609004974,
0.012395926751196384,
0.012931735254824162,
-0.003182823769748211,
-0.022141525521874428,
0.0076521215960383415,
-0.08812499791383743,
-0.03271184116601944,
0.08557501435279846,
0.04895113408565521,
-0.010599113069474697,
0.038398705422878265,
-0.01454139407724142,
-0.03707744926214218,
-0.04797060415148735,
-0.007541373837739229,
-0.034649912267923355,
-0.022330328822135925,
0.08740666508674622,
0.053011342883110046,
0.01232201885432005,
0.01850702613592148,
-0.015556778758764267,
-0.060312941670417786,
0.048736345022916794,
0.054068464785814285,
0.07216466963291168,
0.004871287848800421,
0.010449100285768509,
0.04008937627077103,
-0.019358469173312187,
0.013336357660591602,
0.04450025036931038,
-0.09884209930896759,
0.008542255498468876,
0.04647815227508545,
-0.14844705164432526,
0.08370864391326904,
-0.07071171700954437,
-0.08988995105028152,
-0.02389995940029621,
-0.027797343209385872,
0.0017225340707227588,
-0.08425512909889221,
0.10220672190189362,
-0.07985854148864746,
-0.004343961365520954,
0.012094697915017605,
0.02229059301316738,
-0.04632139205932617,
-0.04700831323862076,
0.0010075131431221962,
-0.03441214561462402,
-0.026684654876589775,
-0.051972899585962296,
-0.04383371025323868,
-5.257719908289234e-33,
0.04790230840444565,
-0.022417958825826645,
0.0831407904624939,
0.03168252855539322,
0.1000400185585022,
-0.0486307255923748,
0.07900442183017731,
0.0004936987534165382,
0.05792400240898132,
-0.0699043720960617,
-0.04744763672351837,
-0.06736161559820175,
0.10698109865188599,
-0.02594439499080181,
-0.02887321077287197,
-0.012063211761415005,
-0.0877343937754631,
-0.06985223293304443,
0.05076679587364197,
0.006242272909730673,
0.002162427408620715,
0.04344860464334488,
-0.03800966590642929,
0.10113946348428726,
-0.03591994196176529,
0.046052236109972,
-0.08497680723667145,
-0.026913991197943687,
0.016532648354768753,
-0.02726149931550026,
0.09694989770650864,
0.060300562530756,
-0.03318389505147934,
-0.006448289845138788,
0.0015565219800919294,
-0.05418207868933678,
-0.004376281052827835,
0.05033454671502113,
-0.00798982847481966,
0.0107431560754776,
0.01158736553043127,
0.03496663272380829,
-0.049798838794231415,
-0.06230775639414787,
-0.01514646876603365,
-0.01995580829679966,
0.09532391279935837,
0.06334375590085983,
-0.028394993394613266,
-0.06010473892092705,
0.0329483337700367,
-0.04874957725405693,
-0.06374756246805191,
0.05249674618244171,
0.0012833871878683567,
0.0042695775628089905,
-0.01665932685136795,
0.0802251547574997,
0.0018625559750944376,
-0.008302143774926662,
-0.0044068265706300735,
-0.021217375993728638,
0.022444328293204308,
0.09938380867242813,
0.05071347579360008,
0.010520370677113533,
-0.03933850675821304,
0.04281479865312576,
0.05667423829436302,
-0.07089737802743912,
-0.012802028097212315,
0.06475627422332764,
-0.020673884078860283,
-0.023810740560293198,
-0.01621951349079609,
0.04154078662395477,
-0.04305204749107361,
-0.0002666829386726022,
0.07292657345533371,
0.05137569457292557,
-0.13371296226978302,
0.05034560710191727,
0.04330570250749588,
0.07342684268951416,
-0.03011934645473957,
-0.020751364529132843,
0.0768744945526123,
0.12066217511892319,
-0.0395960696041584,
0.07332459837198257,
0.014872959814965725,
0.010630152188241482,
-0.018994024023413658,
0.04592541605234146,
-0.003971514292061329,
-5.551146031734788e-8,
-0.05952281877398491,
0.013307865709066391,
-0.0015344754792749882,
0.04551206901669502,
0.009188160300254822,
-0.00821680948138237,
0.09093166142702103,
-0.06601446121931076,
0.027308624237775803,
-0.02497626654803753,
-0.033590056002140045,
0.031686414033174515,
-0.11223846673965454,
-0.026534851640462875,
0.01725585013628006,
-0.02005544677376747,
-0.03705625236034393,
0.00864596851170063,
-0.04008425772190094,
0.034372467547655106,
-0.01717742532491684,
-0.08026877045631409,
0.0276265200227499,
-0.04924563318490982,
-0.03407745435833931,
0.013898458331823349,
0.030532129108905792,
-0.04995453357696533,
0.02696833200752735,
0.05375482887029648,
0.014566340483725071,
-0.04358804598450661,
0.0983697921037674,
-0.0748346745967865,
-0.034824419766664505,
0.006962276995182037,
-0.05210467427968979,
0.025639360770583153,
0.0031234435737133026,
0.017198489978909492,
0.04978681728243828,
0.049387961626052856,
-0.11445548385381699,
-0.006155671551823616,
0.03306880593299866,
-0.04715678095817566,
-0.030307555571198463,
-0.04384947568178177,
0.031220201402902603,
0.026920227333903313,
0.005307094659656286,
-0.04050378501415253,
0.027979115024209023,
-0.007266324944794178,
-0.08556461334228516,
0.029456734657287598,
-0.024259241297841072,
0.038224704563617706,
0.06251222640275955,
-0.0818617045879364,
0.13223527371883392,
0.02916010096669197,
0.06352416425943375,
0.02339322119951248
] | 0.039307
|
type: object properties: # ... foo: type: array x-kubernetes-validations: - rule: "size(self) == 1" items: type: string ``` - If the Rule is scoped to a scalar, `self` is bound to the scalar value. ```yaml # ... openAPIV3Schema: type: object properties: spec: type: object properties: # ... foo: type: integer x-kubernetes-validations: - rule: "self > 0" ``` Examples: |type of the field rule scoped to | Rule example | | -----------------------| -----------------------| | root object | `self.status.actual <= self.spec.maxDesired` | | map of objects | `self.components['Widget'].priority < 10` | | list of integers | `self.values.all(value, value >= 0 && value < 100)` | | string | `self.startsWith('kube')` | The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any `x-kubernetes-embedded-resource` annotated objects. No other metadata properties are accessible. Unknown data preserved in custom resources via `x-kubernetes-preserve-unknown-fields` is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with `x-kubernetes-preserve-unknown-fields`. - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - An array where the items schema is of an "unknown type" - An object where the additionalProperties schema is of an "unknown type" Only property names of the form `[a-zA-Z\_.-/][a-zA-Z0-9\_.-/]\*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: | escape sequence | property name equivalent | | ----------------------- | -----------------------| | `\_\_underscores\_\_` | `\_\_` | | `\_\_dot\_\_` | `.` | |`\_\_dash\_\_` | `-` | | `\_\_slash\_\_` | `/` | | `\_\_{keyword}\_\_` | [CEL RESERVED keyword](https://github.com/google/cel-spec/blob/v0.6.0/doc/langdef.md#syntax) | Note: CEL RESERVED keyword needs to match the exact property name to be escaped (e.g. int in the word sprint would not be escaped). Examples on escaping: |property name | rule with escaped property name | | ----------------| ----------------------- | | namespace | `self.\_\_namespace\_\_ > 0` | | x-prop | `self.x\_\_dash\_\_prop > 0` | | redact\_\_d | `self.redact\_\_underscores\_\_d > 0` | | string | `self.startsWith('kube')` | Equality on arrays with `x-kubernetes-list-type` of `set` or `map` ignores element order, i.e., `[1, 2] == [2, 1]`. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - `set`: `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - `map`: `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Here is the declarations type mapping between OpenAPIv3 and CEL type: | OpenAPIv3 type | CEL type | | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | 'object' with Properties | object / "message type" | | 'object' with AdditionalProperties | map | | 'object' with x-kubernetes-embedded-type | object / "message type", 'apiVersion', 'kind', 'metadata.name' and 'metadata.generateName' are implicitly included in schema | | 'object' with x-kubernetes-preserve-unknown-fields | object / "message type", unknown fields are NOT accessible in CEL expression | | x-kubernetes-int-or-string | dynamic object that is either an int or a string, `type(value)` can be used to check the type | | 'array | list | | 'array' with x-kubernetes-list-type=map | list with map based Equality & unique key guarantees | | 'array' with x-kubernetes-list-type=set | list with set based Equality & unique entry guarantees | | 'boolean' | boolean | | 'number' (all formats) | double
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
0.06226326525211334,
0.0906531810760498,
0.023868419229984283,
-0.031979236751794815,
-0.00024494374520145357,
-0.05197331681847572,
0.07782581448554993,
0.023059671744704247,
0.0017152767395600677,
0.023736774921417236,
-0.0194495040923357,
-0.056545957922935486,
-0.01777602732181549,
0.002698412397876382,
0.08418342471122742,
0.10531902313232422,
-0.006758548319339752,
-0.013429120182991028,
-0.13626781105995178,
-0.08412627875804901,
0.055134955793619156,
0.05433089658617973,
0.007796398364007473,
-0.029516788199543953,
-0.08161397278308868,
-0.002324566710740328,
-0.028445856645703316,
0.0013947004918009043,
0.06838482618331909,
-0.05202750861644745,
-0.03886854276061058,
0.012125212699174881,
-0.017071202397346497,
0.07347933948040009,
0.06267911195755005,
0.06666173785924911,
0.022962158545851707,
-0.0654217004776001,
-0.0449848435819149,
0.05597465857863426,
0.05055402219295502,
0.01358730997890234,
-0.045630939304828644,
-0.061178527772426605,
0.023925598710775375,
-0.003976262174546719,
-0.062053244560956955,
-0.0516296923160553,
-0.01162129919975996,
0.006106684450060129,
-0.03612132370471954,
-0.05910491570830345,
-0.006673456635326147,
0.0710362046957016,
0.11385366320610046,
0.04632674157619476,
-0.04231959581375122,
-0.024222085252404213,
0.016187172383069992,
-0.07883603870868683,
-0.006925834342837334,
-0.05635986849665642,
0.08011805266141891,
-0.07561832666397095,
-0.018858056515455246,
-0.02620527148246765,
-0.034573737531900406,
-0.013086526654660702,
-0.021681029349565506,
0.07335924357175827,
0.10231351852416992,
-0.005992596969008446,
0.009612726047635078,
-0.01508186012506485,
-0.016400126740336418,
-0.0029069692827761173,
-0.01870039664208889,
0.016321176663041115,
0.021158620715141296,
-0.03581981360912323,
-0.06994660198688507,
-0.005901481490582228,
-0.043451085686683655,
-0.05027799680829048,
-0.022211531177163124,
-0.06302814930677414,
-0.03279905021190643,
-0.02846052683889866,
0.06520526856184006,
0.1603642702102661,
-0.040857359766960144,
0.0000391406356357038,
0.018386181443929672,
0.027499224990606308,
0.046969667077064514,
-0.0005809222348034382,
-0.03910699114203453,
-0.018133265897631645,
-0.012671055272221565,
0.05756174400448799,
-0.022105030715465546,
-0.023121610283851624,
0.001414031721651554,
0.043567873537540436,
0.06082887202501297,
-0.015320033766329288,
0.004512792453169823,
-0.03877469524741173,
-0.08891061693429947,
0.028273260220885277,
-0.009382440708577633,
0.007939225994050503,
0.024160781875252724,
-0.03688030689954758,
-0.013639764860272408,
0.02236112952232361,
0.01447799801826477,
0.09150965511798859,
-0.029733067378401756,
-0.04169707000255585,
0.0679456889629364,
-0.02096465975046158,
0.08137349039316177,
0.006278530228883028,
-0.028352761641144753,
0.08332378417253494,
-0.03388446569442749,
2.080436187175348e-33,
0.03413417935371399,
-0.041975799947977066,
-0.011621876619756222,
-0.037388455122709274,
-0.03633247688412666,
-0.03236206993460655,
-0.006785899866372347,
0.024171050637960434,
-0.08064843714237213,
-0.014395764097571373,
-0.023876171559095383,
0.06390523910522461,
-0.050211336463689804,
-0.0952397957444191,
0.07160349935293198,
-0.014998365193605423,
-0.004690687637776136,
0.009389891289174557,
-0.03122803196310997,
-0.02349144220352173,
0.10024798661470413,
-0.11460407078266144,
-0.10370641201734543,
-0.005181124433875084,
-0.02298007346689701,
-0.04834737628698349,
0.010538228787481785,
-0.031036147847771645,
-0.06075435131788254,
0.017373649403452873,
0.007518041878938675,
-0.0051662614569067955,
0.10277720540761948,
0.02752509154379368,
-0.011232824064791203,
0.024348996579647064,
-0.0006073567201383412,
0.04738249257206917,
-0.020362408831715584,
-0.06506198644638062,
-0.02124766819179058,
-0.03972932696342468,
0.013841317035257816,
-0.036638326942920685,
-0.01683725416660309,
-0.06458598375320435,
0.0023542374838143587,
0.101976178586483,
0.03773024305701256,
-0.021332288160920143,
-0.022952664643526077,
0.00040115611045621336,
0.011705758981406689,
-0.015896780416369438,
0.01915695331990719,
-0.03200087323784828,
0.04124315083026886,
0.06099618971347809,
-0.012323853559792042,
0.024239564314484596,
-0.0913383886218071,
-0.00681088725104928,
-0.03317083790898323,
0.020319316536188126,
-0.04785606265068054,
0.06233656406402588,
0.015674376860260963,
0.002597302896901965,
-0.037454478442668915,
0.01005327794700861,
-0.01159053947776556,
0.08526068925857544,
-0.11560328304767609,
0.005081729032099247,
-0.013389182277023792,
-0.10352946817874908,
0.05671374127268791,
-0.024970557540655136,
-0.12490694969892502,
-0.0455113984644413,
-0.04703991487622261,
0.05461828410625458,
-0.03306235000491142,
0.1545325070619583,
-0.02046084776520729,
-0.011590061709284782,
0.03854351490736008,
0.046589307487010956,
-0.03276348486542702,
-0.019298279657959938,
-0.06782826036214828,
-0.02476387470960617,
-0.02077394537627697,
-0.07133172452449799,
-0.051914092153310776,
-1.8745856368402645e-33,
0.07620064914226532,
0.00380047713406384,
-0.012476447969675064,
0.08115705847740173,
0.055330030620098114,
-0.05466238036751747,
0.0389835350215435,
0.03685054928064346,
-0.00999589916318655,
-0.02804691344499588,
-0.047630827873945236,
-0.03464634343981743,
0.02444872073829174,
-0.04188373684883118,
-0.0025964125525206327,
0.0025540287606418133,
-0.15810199081897736,
-0.046969059854745865,
0.030322225764393806,
-0.046909842640161514,
-0.018245341256260872,
0.040839631110429764,
0.01988721825182438,
0.07523957639932632,
-0.029051177203655243,
0.009673306718468666,
0.0007484104135073721,
0.022040821611881256,
-0.0767173245549202,
0.022322412580251694,
0.03581513464450836,
-0.08184561133384705,
-0.028346998617053032,
0.07181032001972198,
-0.0009126524091698229,
-0.08384737372398376,
0.058402832597494125,
-0.009886134415864944,
-0.03022022545337677,
0.10066422075033188,
-0.00849402416497469,
0.03849804773926735,
-0.061977025121450424,
-0.010955028235912323,
-0.10322760790586472,
0.03731760010123253,
0.12782418727874756,
0.01578179933130741,
-0.012865024618804455,
-0.0823863074183464,
0.049176886677742004,
-0.004726824350655079,
-0.034369245171546936,
0.12867747247219086,
-0.02807161957025528,
0.027548229321837425,
-0.01576678268611431,
-0.023307472467422485,
0.03138641268014908,
-0.017269350588321686,
0.0207978468388319,
-0.05076848343014717,
0.04952064901590347,
0.0789555236697197,
0.04706345498561859,
-0.04740823060274124,
0.04380466043949127,
0.008642234839498997,
0.0329861082136631,
-0.040043141692876816,
0.005420563276857138,
0.00023574079386889935,
0.01233715284615755,
0.043065596371889114,
-0.024866735562682152,
0.0016560869989916682,
0.02702496387064457,
0.05097056180238724,
0.14907610416412354,
0.03177101910114288,
-0.0066361683420836926,
0.017499469220638275,
0.033091481775045395,
0.004437441937625408,
0.024278150871396065,
0.010296838358044624,
0.07775896042585373,
0.14407549798488617,
-0.008931688033044338,
0.11603203415870667,
-0.041503842920064926,
0.05239942669868469,
-0.002868096577003598,
0.05811388045549393,
-0.06233246251940727,
-4.6573507717084794e-8,
-0.1116807833313942,
-0.060149241238832474,
-0.07016636431217194,
0.07061745226383209,
0.0042236377485096455,
-0.01698959246277809,
0.08619654178619385,
0.0068249572068452835,
0.01078834943473339,
0.0014326213859021664,
-0.02017347700893879,
0.08003953099250793,
-0.106257364153862,
-0.046511854976415634,
0.01836976781487465,
-0.08475490659475327,
0.01795295812189579,
0.07412303239107132,
-0.03503478318452835,
-0.012236867100000381,
-0.05182883143424988,
-0.01562615856528282,
-0.0026673150714486837,
-0.02882407233119011,
0.037369586527347565,
-0.0002006482391152531,
0.027568381279706955,
0.038125038146972656,
0.09460201859474182,
0.05613313615322113,
-0.019044267013669014,
-0.03780287131667137,
0.01829509064555168,
0.04808804392814636,
-0.0371844507753849,
0.0392543226480484,
-0.09473142772912979,
0.0510636642575264,
0.03642253205180168,
0.08586452156305313,
-0.005293367430567741,
-0.014831491746008396,
-0.07193729281425476,
-0.009004785679280758,
-0.010337273590266705,
0.0069409506395459175,
-0.05395358055830002,
0.0036503246519714594,
0.028201479464769363,
0.07742037624120712,
0.015059131197631359,
-0.049013443291187286,
0.027009280398488045,
0.04793490841984749,
-0.1169491857290268,
0.005874296184629202,
0.0196326095610857,
0.006498613394796848,
-0.024423254653811455,
-0.0676463320851326,
0.048284679651260376,
0.0004472767759580165,
0.030709918588399887,
0.021792156621813774
] | 0.030308
|
check the type | | 'array | list | | 'array' with x-kubernetes-list-type=map | list with map based Equality & unique key guarantees | | 'array' with x-kubernetes-list-type=set | list with set based Equality & unique entry guarantees | | 'boolean' | boolean | | 'number' (all formats) | double | | 'integer' (all formats) | int (64) | | 'null' | null\_type | | 'string' | string | | 'string' with format=byte (base64 encoded) | bytes | | 'string' with format=date | timestamp (google.protobuf.Timestamp) | | 'string' with format=datetime | timestamp (google.protobuf.Timestamp) | | 'string' with format=duration | duration (google.protobuf.Duration) | xref: [CEL types](https://github.com/google/cel-spec/blob/v0.6.0/doc/langdef.md#values), [OpenAPI types](https://swagger.io/specification/#data-types), [Kubernetes Structural Schemas](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema). #### The messageExpression field Similar to the `message` field, which defines the string reported for a validation rule failure, `messageExpression` allows you to use a CEL expression to construct the message string. This allows you to insert more descriptive information into the validation failure message. `messageExpression` must evaluate a string and may use the same variables that are available to the `rule` field. For example: ```yaml x-kubernetes-validations: - rule: "self.x <= self.maxLimit" messageExpression: '"x exceeded max limit of " + string(self.maxLimit)' ``` Keep in mind that CEL string concatenation (`+` operator) does not auto-cast to string. If you have a non-string scalar, use the `string()` function to cast the scalar to a string like shown in the above example. `messageExpression` must evaluate to a string, and this is checked while the CRD is being written. Note that it is possible to set `message` and `messageExpression` on the same rule, and if both are present, `messageExpression` will be used. However, if `messageExpression` evaluates to an error, the string defined in `message` will be used instead, and the `messageExpression` error will be logged. This fallback will also occur if the CEL expression defined in `messageExpression` generates an empty string, or a string containing line breaks. If one of the above conditions are met and no `message` has been set, then the default validation failure message will be used instead. `messageExpression` is a CEL expression, so the restrictions listed in [Resource use by validation functions](#resource-use-by-validation-functions) apply. If evaluation halts due to resource constraints during `messageExpression` execution, then no further validation rules will be executed. Setting `messageExpression` is optional. #### The `message` field {#field-message} If you want to set a static message, you can supply `message` rather than `messageExpression`. The value of `message` is used as an opaque error string if validation fails. Setting `message` is optional. #### The `reason` field {#field-reason} You can add a machine-readable validation failure reason within a `validation`, to be returned whenever a request fails this validation rule. For example: ```yaml x-kubernetes-validations: - rule: "self.x <= self.maxLimit" reason: "FieldValueInvalid" ``` The HTTP status code returned to the caller will match the reason of the first failed validation rule. The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". If not set or unknown reasons, default to use "FieldValueInvalid". Setting `reason` is optional. #### The `fieldPath` field {#field-field-path} You can specify the field path returned when the validation fails. For example: ```yaml x-kubernetes-validations: - rule: "self.foo.test.x <= self.maxLimit" fieldPath: ".foo.test.x" ``` In the example above, the validation checks the value of field `x` should be less than the value of `maxLimit`. If no `fieldPath` specified, when validation fails, the fieldPath would be default to wherever `self` scoped. With `fieldPath` specified, the returned error will have `fieldPath` properly refer to the location of field `x`. The `fieldPath` value must be a relative JSON path that is scoped to the location of this x-kubernetes-validations extension in the schema. Additionally, it should refer to
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.0003698513319250196,
-0.009188844822347164,
0.03478160873055458,
-0.09365005046129227,
-0.024425849318504333,
0.031178483739495277,
0.05378665030002594,
-0.018133340403437614,
0.06270882487297058,
-0.022737370803952217,
0.007015529554337263,
-0.1209389790892601,
0.024362897500395775,
-0.030638568103313446,
-0.0035364185459911823,
-0.04340264946222305,
-0.0564962662756443,
-0.0493304505944252,
0.009892771951854229,
-0.10152774304151535,
0.027140770107507706,
0.0137352729216218,
0.02915412373840809,
0.018002735450863838,
-0.06847284734249115,
-0.018023286014795303,
-0.01653575897216797,
0.009225348010659218,
0.028039315715432167,
-0.05113133043050766,
0.00812751054763794,
0.04399743303656578,
0.010897640138864517,
0.07363228499889374,
0.10705050081014633,
0.04989377781748772,
-0.01865185610949993,
-0.029741311445832253,
-0.05372752249240875,
0.004445420578122139,
0.05880012735724449,
-0.13407976925373077,
-0.11547441780567169,
-0.0602245032787323,
0.007685374468564987,
0.05475988611578941,
-0.017979297786951065,
-0.05704405903816223,
0.024077782407402992,
0.00015375819930341095,
0.029869375750422478,
-0.021148445084691048,
-0.05774978548288345,
0.04131466522812843,
0.10278347134590149,
0.048158589750528336,
-0.15720489621162415,
0.05263577401638031,
0.07339047640562057,
0.00247627473436296,
-0.036943770945072174,
-0.0381372794508934,
0.03215090185403824,
-0.027081234380602837,
-0.024930395185947418,
0.08573157340288162,
0.002090120455250144,
0.01802455633878708,
0.0822383463382721,
0.013228034600615501,
0.047006964683532715,
0.05022771283984184,
-0.05700782686471939,
0.018165063112974167,
-0.05398581922054291,
0.053961798548698425,
0.026441797614097595,
0.00643412908539176,
-0.0058136070147156715,
-0.05266958475112915,
-0.0707605630159378,
-0.02780933678150177,
0.021582230925559998,
0.02560136467218399,
-0.02636808529496193,
-0.07407793402671814,
0.01943265274167061,
0.026868941262364388,
0.013820013962686062,
0.01097776647657156,
-0.053113628178834915,
0.0028124635573476553,
0.04514523968100548,
-0.05250139534473419,
0.0523773692548275,
0.029972076416015625,
0.06768902391195297,
0.024272995069622993,
0.0901833102107048,
0.009378205984830856,
-0.04276736453175545,
-0.012815576046705246,
0.003733825869858265,
-0.046933580189943314,
0.033320240676403046,
-0.051702287048101425,
-0.03209519386291504,
-0.0206631850451231,
-0.06782277673482895,
0.02756253257393837,
-0.008864178322255611,
0.02126179449260235,
0.005652719177305698,
-0.01023766491562128,
-0.01435684785246849,
0.0055289617739617825,
-0.06548238545656204,
0.01503350492566824,
0.08800623565912247,
0.020312238484621048,
0.0623185820877552,
-0.07356122136116028,
0.03386738523840904,
0.014794645830988884,
-0.11120053380727768,
-0.006299351807683706,
0.054583221673965454,
7.265139896521271e-33,
0.027012990787625313,
-0.02231231890618801,
0.06654132157564163,
-0.0644029751420021,
-0.030557719990611076,
-0.05016661435365677,
-0.016268765553832054,
0.0022201177198439837,
-0.05455971136689186,
-0.05870378017425537,
-0.04373452439904213,
0.04014008492231369,
-0.08388342708349228,
-0.05291398987174034,
0.01683305948972702,
0.08817275613546371,
-0.04099602997303009,
0.06046298146247864,
0.038395658135414124,
-0.016189029440283775,
0.058014195412397385,
-0.06414667516946793,
-0.0376473031938076,
-0.04794229194521904,
0.059320081025362015,
-0.061435021460056305,
-0.008518432267010212,
-0.06068951636552811,
-0.06603667885065079,
-0.002767351223155856,
-0.018620725721120834,
-0.05895187705755234,
0.03536883369088173,
0.10749255120754242,
-0.015728628262877464,
-0.007346817292273045,
-0.014545595273375511,
0.00344122014939785,
-0.08942610025405884,
-0.00830377358943224,
0.010685347951948643,
-0.007504603825509548,
0.011768353171646595,
-0.06486080586910248,
0.021595412865281105,
-0.04196085035800934,
-0.022625891491770744,
-0.05855104327201843,
0.06310802698135376,
0.0713893324136734,
0.047333575785160065,
-0.005972733721137047,
-0.018322784453630447,
-0.06337957829236984,
0.012450658716261387,
-0.019652778282761574,
0.10757284611463547,
-0.031054673716425896,
-0.0421067476272583,
0.08111875504255295,
-0.037517283111810684,
0.046366166323423386,
-0.012804639525711536,
-0.01430338155478239,
0.0025992421433329582,
0.018407152965664864,
-0.007057087495923042,
0.017711427062749863,
-0.04015866667032242,
-0.025800509378314018,
-0.013660061173141003,
-0.003026793012395501,
0.0444490946829319,
-0.043385349214076996,
-0.01529660727828741,
-0.08593646436929703,
0.04707597941160202,
0.020906582474708557,
-0.06604868173599243,
0.02155274525284767,
0.017530126497149467,
-0.06928139179944992,
-0.03679473698139191,
0.09538422524929047,
-0.05490278825163841,
0.019519930705428123,
0.033999327570199966,
0.012709741480648518,
-0.02773803286254406,
0.0179754588752985,
-0.0389091931283474,
-0.02298310026526451,
-0.015795530751347542,
-0.04726460948586464,
-0.08534111827611923,
-7.668857553839431e-33,
0.07326816022396088,
0.026485534384846687,
0.0712297260761261,
0.05633925274014473,
0.08721254765987396,
-0.021866263821721077,
0.06721169501543045,
0.08214643597602844,
0.023377520963549614,
-0.010297642089426517,
0.025479672476649284,
-0.06492192298173904,
0.027599241584539413,
-0.04423781484365463,
-0.061560459434986115,
-0.024422787129878998,
-0.04620532691478729,
-0.038077861070632935,
-0.06386169046163559,
-0.004777494352310896,
0.026374222710728645,
0.0348723940551281,
0.016421258449554443,
0.05672433599829674,
0.07008576393127441,
-0.0028504894580692053,
0.05426489934325218,
0.05808430537581444,
-0.060337960720062256,
-0.02250567078590393,
0.019351709634065628,
-0.05762770026922226,
-0.031056459993124008,
0.026424426585435867,
0.06202562153339386,
-0.12370587885379791,
0.0767902284860611,
0.11537198722362518,
0.010567568242549896,
0.05819818004965782,
-0.03728249669075012,
0.01947302184998989,
-0.07749958336353302,
-0.06319963932037354,
-0.009422726929187775,
0.05477840453386307,
0.08068396151065826,
0.031303390860557556,
0.06153392419219017,
-0.04929354414343834,
0.06870125234127045,
0.01901472732424736,
-0.10647713392972946,
-0.0014190183719620109,
-0.013300582766532898,
0.04273385927081108,
-0.012193107046186924,
-0.01125838328152895,
0.012167039327323437,
-0.016092538833618164,
-0.008512860164046288,
-0.17521825432777405,
0.09472832083702087,
0.05218636989593506,
0.08853716403245926,
-0.08436714857816696,
-0.050995122641325,
-0.0414888896048069,
-0.0632503405213356,
-0.0011847219429910183,
0.03174910321831703,
-0.05078774318099022,
-0.014126469381153584,
0.018249502405524254,
-0.029893789440393448,
-0.05819563940167427,
0.011600764468312263,
0.055374518036842346,
0.10545646399259567,
0.030284537002444267,
-0.04521371051669121,
0.059093646705150604,
0.07445991784334183,
0.031095042824745178,
0.011657497845590115,
0.1215534657239914,
0.03717390075325966,
0.08671528100967407,
0.04513110592961311,
0.047447144985198975,
-0.03357286751270294,
0.06200726702809334,
-0.053647663444280624,
0.10972825437784195,
-0.011002498678863049,
-5.187298057762746e-8,
0.0019208808662369847,
-0.024927103891968727,
-0.10035476833581924,
0.07111920416355133,
0.03101886250078678,
-0.05674170330166817,
0.015495716594159603,
-0.06367655098438263,
0.07282187789678574,
-0.06990200281143188,
0.0263397004455328,
0.03360728174448013,
-0.07568079233169556,
-0.002493215724825859,
0.0001315573463216424,
-0.03216685354709625,
-0.043670590966939926,
-0.007520466111600399,
-0.01382448710501194,
-0.002812705934047699,
-0.004768921993672848,
-0.04887860268354416,
-0.01689021661877632,
-0.0592280849814415,
-0.013556981459259987,
0.011425592005252838,
0.0663241446018219,
0.07070661336183548,
0.07855112850666046,
0.05387694016098976,
-0.057120658457279205,
-0.03767431527376175,
-0.05727208033204079,
-0.001962107140570879,
0.012159273959696293,
-0.023257995024323463,
-0.08934144675731659,
0.04008638486266136,
-0.031125813722610474,
0.10888154059648514,
0.016095049679279327,
-0.020435787737369537,
-0.09589444100856781,
0.017843805253505707,
0.06258101761341095,
0.013420370407402515,
0.026443148031830788,
0.016352791339159012,
-0.014713162556290627,
0.0884208008646965,
-0.0006771004409529269,
-0.07961615175008774,
0.039452265948057175,
-0.020314428955316544,
-0.03513948619365692,
-0.00004565384369925596,
0.01628441922366619,
-0.07122516632080078,
0.08727515488862991,
-0.005449851043522358,
0.05135158821940422,
-0.026171080768108368,
0.05462512746453285,
0.03644859045743942
] | 0.015873
|
be default to wherever `self` scoped. With `fieldPath` specified, the returned error will have `fieldPath` properly refer to the location of field `x`. The `fieldPath` value must be a relative JSON path that is scoped to the location of this x-kubernetes-validations extension in the schema. Additionally, it should refer to an existing field within the schema. For example when validation checks if a specific attribute `foo` under a map `testMap`, you could set `fieldPath` to `".testMap.foo"` or `.testMap['foo']'`. If the validation requires checking for unique attributes in two lists, the fieldPath can be set to either of the lists. For example, it can be set to `.testList1` or `.testList2`. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](/docs/reference/kubectl/jsonpath/) for more info. The `fieldPath` field does not support indexing arrays numerically. Setting `fieldPath` is optional. #### The `optionalOldSelf` field {#field-optional-oldself} {{< feature-state feature\_gate\_name="CRDValidationRatcheting" >}} If your cluster does not have [CRD validation ratcheting](#validation-ratcheting) enabled, the CustomResourceDefinition API doesn't include this field, and trying to set it may result in an error. The `optionalOldSelf` field is a boolean field that alters the behavior of [Transition Rules](#transition-rules) described below. Normally, a transition rule will not evaluate if `oldSelf` cannot be determined: during object creation or when a new value is introduced in an update. If `optionalOldSelf` is set to true, then transition rules will always be evaluated and the type of `oldSelf` be changed to a CEL [`Optional`](https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes) type. `optionalOldSelf` is useful in cases where schema authors would like a more control tool [than provided by the default equality based behavior of](#validation-ratcheting) to introduce newer, usually stricter constraints on new values, while still allowing old values to be "grandfathered" or ratcheted using the older validation. Example Usage: | CEL | Description | |-----------------------------------------|-------------| | `self.foo == "foo" || (oldSelf.hasValue() && oldSelf.value().foo != "foo")` | Ratcheted rule. Once a value is set to "foo", it must stay foo. But if it existed before the "foo" constraint was introduced, it may use any value | | `[oldSelf.orValue(""), self].all(x, ["OldCase1", "OldCase2"].exists(case, x == case)) || ["NewCase1", "NewCase2"].exists(case, self == case) || ["NewCase"].has(self)` | "Ratcheted validation for removed enum cases if oldSelf used them" | | `oldSelf.optMap(o, o.size()).orValue(0) < 4 || self.size() >= 4` | Ratcheted validation of newly increased minimum map or list size | #### Validation functions {#available-validation-functions} Functions available include: - CEL standard functions, defined in the [list of standard definitions](https://github.com/google/cel-spec/blob/v0.7.0/doc/langdef.md#list-of-standard-definitions) - CEL standard [macros](https://github.com/google/cel-spec/blob/v0.7.0/doc/langdef.md#macros) - CEL [extended string function library](https://pkg.go.dev/github.com/google/cel-go@v0.11.2/ext#Strings) - Kubernetes [CEL extension library](https://pkg.go.dev/k8s.io/apiextensions-apiserver@v0.24.0/pkg/apiserver/schema/cel/library#pkg-functions) #### Transition rules A rule that contains an expression referencing the identifier `oldSelf` is implicitly considered a \_transition rule\_. Transition rules allow schema authors to prevent certain transitions between two otherwise valid states. For example: ```yaml type: string enum: ["low", "medium", "high"] x-kubernetes-validations: - rule: "!(self == 'high' && oldSelf == 'low') && !(self == 'low' && oldSelf == 'high')" message: cannot transition directly between 'low' and 'high' ``` Unlike other rules, transition rules apply only to operations meeting the following criteria: - The operation updates an existing object. Transition rules never apply to create operations. - Both an old and a new value exist. It remains possible to check if a value has been added or removed by placing a transition rule on the parent node. Transition rules are never applied to custom resource creation. When placed on an optional field, a transition rule will not apply to update operations that set or unset the field. - The path to the schema node being validated by a transition rule must resolve to a node that is comparable between the
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
0.020825430750846863,
0.03440748155117035,
0.0443514920771122,
-0.025519993156194687,
0.018386945128440857,
-0.00404035858809948,
0.019941898062825203,
-0.005444732028990984,
0.016028814017772675,
-0.03189144283533096,
-0.01584225706756115,
-0.08335140347480774,
0.036548931151628494,
0.07360021024942398,
0.04102581366896629,
0.05538873374462128,
-0.012050335295498371,
-0.005252406932413578,
-0.013575206510722637,
-0.01603841781616211,
0.049768052995204926,
0.0446028932929039,
0.017921607941389084,
0.016371576115489006,
-0.05959087237715721,
-0.016604000702500343,
-0.04742338880896568,
0.01062561571598053,
-0.04419885575771332,
0.0006636375328525901,
-0.01719767600297928,
0.018670665100216866,
-0.12886187434196472,
0.0362938717007637,
0.14895492792129517,
0.03272800147533417,
0.05537855997681618,
0.02031601220369339,
-0.009971478953957558,
0.07492196559906006,
0.010424795560538769,
-0.036675140261650085,
-0.024772565811872482,
-0.07938673347234726,
0.02647506445646286,
-0.02903452143073082,
0.03228917717933655,
-0.02850869484245777,
-0.03593606501817703,
0.03596487641334534,
-0.01856251433491707,
-0.03687431663274765,
-0.0021827404852956533,
0.037745993584394455,
0.08995352685451508,
0.08956697583198547,
-0.11515215039253235,
0.02461642399430275,
-0.013094264082610607,
-0.016057951375842094,
0.013251087628304958,
-0.06310638785362244,
0.03830902650952339,
-0.00666046142578125,
-0.033460404723882675,
-0.01799030229449272,
-0.04478589817881584,
-0.021285245195031166,
0.003497798228636384,
0.06560183316469193,
0.15038083493709564,
0.003405860858038068,
-0.02991986833512783,
-0.0018641958013176918,
-0.01698453538119793,
0.10191609710454941,
-0.0022836667485535145,
0.0005737964529544115,
0.040382687002420425,
-0.10514204204082489,
-0.050451841205358505,
-0.0036557218991219997,
0.005386380013078451,
-0.08212961256504059,
-0.06436702609062195,
-0.0445072278380394,
-0.028512688353657722,
-0.050863463431596756,
0.0199517160654068,
0.04770766943693161,
0.06026053428649902,
-0.1143893152475357,
0.031721681356430054,
-0.00505682872608304,
0.12787292897701263,
-0.002694191411137581,
-0.0023790490813553333,
-0.014766895212233067,
0.07154068350791931,
-0.043479837477207184,
-0.02318945899605751,
-0.05772316828370094,
0.019866205751895905,
0.009533528238534927,
0.10611074417829514,
-0.0186771173030138,
-0.03292139247059822,
-0.06414452195167542,
-0.0867762491106987,
0.04557544365525246,
0.01338040828704834,
0.029686585068702698,
-0.0004944131360389292,
-0.011407803744077682,
0.010866732336580753,
0.05486433580517769,
-0.014134753495454788,
0.05451811105012894,
-0.039628975093364716,
0.08183956891298294,
-0.011120922863483429,
-0.10998959094285965,
0.09787725657224655,
0.018686149269342422,
0.013995856046676636,
-0.02503247559070587,
-0.063520148396492,
2.6619194470645475e-33,
0.024134935811161995,
-0.0018406673334538937,
0.08094579726457596,
-0.0220012329518795,
-0.10722960531711578,
-0.09900062531232834,
-0.02190232090651989,
0.04059182107448578,
-0.10615292191505432,
-0.00709476787596941,
-0.009135246276855469,
0.06404752284288406,
-0.048221655189991,
-0.08806055784225464,
0.057834502309560776,
0.05076466500759125,
-0.03765304386615753,
-0.02808418683707714,
-0.01477283239364624,
-0.004063435830175877,
0.09762722253799438,
-0.06427183002233505,
-0.030848611146211624,
0.0026020011864602566,
-0.05057423189282417,
-0.052774231880903244,
-0.026186835020780563,
-0.010915100574493408,
-0.045137371867895126,
0.041063230484724045,
-0.05965471267700195,
-0.011752404272556305,
0.09613432735204697,
0.04529163986444473,
-0.033389247953891754,
0.07234563678503036,
-0.006256501190364361,
0.05360713601112366,
-0.13351088762283325,
-0.007334141060709953,
0.038972023874521255,
-0.005850984249264002,
-0.0010967218549922109,
-0.018676836043596268,
0.08187124133110046,
-0.06253498792648315,
-0.0587749145925045,
-0.003468363778665662,
0.0601428858935833,
-0.0036822324618697166,
-0.009079676121473312,
0.001974637620151043,
0.03009311854839325,
0.017525916919112206,
0.07754761725664139,
0.019442588090896606,
0.04316648840904236,
-0.04633539170026779,
-0.0216160137206316,
-0.0072364117950201035,
-0.018654918298125267,
-0.042335979640483856,
-0.1345474272966385,
0.02638780139386654,
-0.02104809693992138,
-0.0020244379993528128,
0.04372658580541611,
-0.011183689348399639,
-0.08604434132575989,
-0.05159318447113037,
-0.007597422692924738,
0.016056237742304802,
-0.060616448521614075,
-0.006590031553059816,
0.01017091330140829,
-0.12491181492805481,
0.010422926396131516,
0.03357386589050293,
-0.10484461486339569,
-0.014100237749516964,
-0.0430871844291687,
-0.033557627350091934,
-0.09226362407207489,
0.12462438642978668,
-0.022384988144040108,
0.0058703115209937096,
-0.01079537533223629,
0.033719751983881,
-0.06679743528366089,
-0.06796401739120483,
0.058827005326747894,
0.04622427746653557,
-0.07338188588619232,
-0.006369934417307377,
0.01551441103219986,
-4.176205596131219e-33,
0.09432131797075272,
-0.040183328092098236,
0.07629602402448654,
0.03794489800930023,
0.03865206986665726,
-0.009531526826322079,
0.08502255380153656,
-0.015352128073573112,
0.007034404668956995,
-0.029760709032416344,
-0.08846433460712433,
-0.07129842787981033,
0.029426325112581253,
-0.022801827639341354,
-0.04500185325741768,
-0.028603851795196533,
-0.11635527014732361,
-0.024552004411816597,
0.008373968303203583,
0.010778750292956829,
0.048301808536052704,
0.02450365014374256,
0.01742519810795784,
0.03166917338967323,
-0.010354946367442608,
-0.010691304691135883,
-0.026548828929662704,
0.03272572532296181,
-0.08960259705781937,
0.03649976849555969,
0.03853575885295868,
-0.04234512150287628,
0.0007917847251519561,
0.023278452455997467,
0.058543987572193146,
-0.08412624150514603,
0.03410857915878296,
0.006875609513372183,
-0.010371722280979156,
0.0480121411383152,
-0.032866641879081726,
0.11896760016679764,
-0.03607857972383499,
-0.001855533686466515,
-0.022797714918851852,
0.048528749495744705,
0.05748673900961876,
0.034752897918224335,
0.004500296898186207,
-0.0964130163192749,
0.006082830019295216,
0.025753673166036606,
-0.0981258749961853,
0.08781452476978302,
-0.012880116701126099,
0.04871731624007225,
-0.06338005512952805,
0.044301118701696396,
0.030854975804686546,
0.02857924811542034,
-0.01070217415690422,
-0.043460018932819366,
0.03670426830649376,
0.11404933780431747,
0.034171197563409805,
-0.07590771466493607,
-0.006306461524218321,
-0.015517331659793854,
-0.0024622566998004913,
-0.03756549581885338,
-0.09309946000576019,
-0.03283781185746193,
-0.026717694476246834,
0.04251597076654434,
0.02617812529206276,
-0.03702186420559883,
-0.003111140104010701,
0.028998715803027153,
0.1045318990945816,
-0.01587624102830887,
0.036727745085954666,
-0.00039357494097203016,
-0.009679067879915237,
0.07653606683015823,
0.062185466289520264,
0.058763328939676285,
0.10777117311954498,
0.08564656972885132,
-0.036824848502874374,
0.04553360864520073,
0.05270049721002579,
0.02714115008711815,
-0.019673407077789307,
-0.005181861110031605,
-0.055009037256240845,
-5.2611675016578374e-8,
-0.10048865526914597,
-0.005123943090438843,
-0.07271641492843628,
0.05011370778083801,
-0.01868302747607231,
-0.07134159654378891,
0.06287530809640884,
-0.004850000608712435,
0.07949066907167435,
-0.024885237216949463,
-0.03252436965703964,
0.09411147236824036,
-0.061294376850128174,
-0.02510690689086914,
0.030468441545963287,
-0.07903381437063217,
0.009558988735079765,
0.05598926544189453,
-0.01988547295331955,
0.07426952570676804,
0.0011174945393577218,
-0.020692551508545876,
-0.01425397489219904,
0.0015604515792801976,
0.062402255833148956,
0.016548698768019676,
0.01709809899330139,
0.008030910044908524,
0.06608545780181885,
0.013033322989940643,
0.0030424499418586493,
-0.06937165558338165,
-0.03779282420873642,
0.06952201575040817,
-0.07153324782848358,
0.04822569712996483,
-0.013005536049604416,
0.013410039246082306,
0.0019678825046867132,
0.1004827618598938,
0.009419337846338749,
-0.050498999655246735,
-0.08471902459859848,
-0.0373942106962204,
-0.002363427309319377,
0.02478170394897461,
-0.020261753350496292,
0.05046918988227844,
-0.005915573798120022,
0.000489197438582778,
-0.09297249466180801,
-0.0339900404214859,
0.0010722412262111902,
0.0030034752562642097,
-0.01416832022368908,
-0.009987648576498032,
0.020447028800845146,
0.017596401274204254,
0.006312050390988588,
-0.03331577032804489,
0.07369732856750488,
0.03374028950929642,
0.006701643578708172,
0.01414299476891756
] | 0.039822
|
never applied to custom resource creation. When placed on an optional field, a transition rule will not apply to update operations that set or unset the field. - The path to the schema node being validated by a transition rule must resolve to a node that is comparable between the old object and the new object. For example, list items and their descendants (`spec.foo[10].bar`) can't necessarily be correlated between an existing object and a later update to the same object. Errors will be generated on CRD writes if a schema node contains a transition rule that can never be applied, e.g. "oldSelf cannot be used on the uncorrelatable portion of the schema within \*path\*". Transition rules are only allowed on \_correlatable portions\_ of a schema. A portion of the schema is correlatable if all `array` parent schemas are of type `x-kubernetes-list-type=map`; any `set`or `atomic`array parent schemas make it impossible to unambiguously correlate a `self` with `oldSelf`. Here are some examples for transition rules: {{< table caption="Transition rules examples" >}} | Use Case | Rule | -------- | -------- | Immutability | `self.foo == oldSelf.foo` | Prevent modification/removal once assigned | `oldSelf != 'bar' \|\| self == 'bar'` or `!has(oldSelf.field) \|\| has(self.field)` | Append-only set | `self.all(element, element in oldSelf)` | If previous value was X, new value can only be A or B, not Y or Z | `oldSelf != 'X' \|\| self in ['A', 'B']` | Monotonic (non-decreasing) counters | `self >= oldSelf` {{< /table >}} #### Resource use by validation functions When you create or update a CustomResourceDefinition that uses validation rules, the API server checks the likely impact of running those validation rules. If a rule is estimated to be prohibitively expensive to execute, the API server rejects the create or update operation, and returns an error message. A similar system is used at runtime that observes the actions the interpreter takes. If the interpreter executes too many instructions, execution of the rule will be halted, and an error will result. Each CustomResourceDefinition is also allowed a certain amount of resources to finish executing all of its validation rules. If the sum total of its rules are estimated at creation time to go over that limit, then a validation error will also occur. You are unlikely to encounter issues with the resource budget for validation if you only specify rules that always take the same amount of time regardless of how large their input is. For example, a rule that asserts that `self.foo == 1` does not by itself have any risk of rejection on validation resource budget groups. But if `foo` is a string and you define a validation rule `self.foo.contains("someString")`, that rule takes longer to execute depending on how long `foo` is. Another example would be if `foo` were an array, and you specified a validation rule `self.foo.all(x, x > 5)`. The cost system always assumes the worst-case scenario if a limit on the length of `foo` is not given, and this will happen for anything that can be iterated over (lists, maps, etc.). Because of this, it is considered best practice to put a limit via `maxItems`, `maxProperties`, and `maxLength` for anything that will be processed in a validation rule in order to prevent validation errors during cost estimation. For example, given this schema with one rule: ```yaml openAPIV3Schema: type: object properties: foo: type: array items: type: string x-kubernetes-validations: - rule: "self.all(x, x.contains('a string'))" ``` then the API server rejects this rule on validation budget grounds with error: ``` spec.validation.openAPIV3Schema.properties[spec].properties[foo].x-kubernetes-validations[0].rule: Forbidden: CEL rule exceeded budget by more than 100x (try simplifying the rule, or
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.032312847673892975,
0.009811889380216599,
0.051021967083215714,
-0.012978835962712765,
-0.0004931987496092916,
0.009178709238767624,
0.015546159818768501,
-0.055738553404808044,
0.059017788618803024,
0.006587051786482334,
0.00046817277325317264,
-0.07839778810739517,
0.008341568522155285,
0.03053857944905758,
0.023383142426609993,
0.017652077600359917,
0.02007777988910675,
-0.005955986212939024,
-0.042827293276786804,
0.01634209230542183,
0.035040099173784256,
-0.004308762494474649,
-0.04916984215378761,
-0.026821721345186234,
-0.023443957790732384,
-0.055568549782037735,
-0.06074624881148338,
-0.009157015942037106,
0.03922012820839882,
-0.013059230521321297,
-0.02016563154757023,
0.009480920620262623,
-0.06763774901628494,
-0.002182824769988656,
0.10781355202198029,
0.0717233344912529,
0.08871732652187347,
-0.015202472917735577,
-0.022535698488354683,
0.09972694516181946,
0.03905855119228363,
0.011356687173247337,
-0.06687209755182266,
-0.010877015069127083,
-0.04358278587460518,
0.01809934340417385,
0.01864418014883995,
-0.07658498734235764,
-0.10334720462560654,
0.01582186669111252,
0.01734260842204094,
-0.06447099149227142,
0.035984575748443604,
0.0349922701716423,
0.08998173475265503,
0.15868505835533142,
-0.02135027013719082,
0.07828297466039658,
0.011821147985756397,
-0.020101772621273994,
0.02891487069427967,
-0.04698314517736435,
0.07329662144184113,
-0.041883986443281174,
0.007671466562896967,
-0.006929565686732531,
-0.0041246917098760605,
0.008688036352396011,
0.022407682612538338,
0.007609015796333551,
0.061707280576229095,
-0.015228386968374252,
-0.07872342318296432,
0.019358454272150993,
0.03710624948143959,
0.09814324229955673,
-0.012152294628322124,
0.050404779613018036,
-0.0022451148834079504,
-0.20933768153190613,
-0.05308786407113075,
0.017616385594010353,
0.05011620372533798,
-0.09476004540920258,
-0.011982334777712822,
0.015694687142968178,
-0.0020810526330024004,
-0.04848295822739601,
0.04574445262551308,
0.05875707045197487,
0.04159533977508545,
-0.07980051636695862,
0.02449503168463707,
-0.05640023201704025,
0.0832720398902893,
-0.014625553973019123,
-0.00753091461956501,
-0.006416258867830038,
0.06384661048650742,
0.005361199378967285,
0.015496295876801014,
0.06203103065490723,
0.008705678395926952,
0.05142293870449066,
0.03888220712542534,
0.01574208214879036,
-0.06563638150691986,
0.0680423453450203,
-0.1341560035943985,
0.06496763229370117,
-0.030188975855708122,
-0.0200563445687294,
-0.03696143254637718,
-0.07122166454792023,
0.005212309304624796,
0.03803239390254021,
-0.05172653868794441,
0.020280271768569946,
-0.0035338508896529675,
0.02708875574171543,
0.06540811061859131,
-0.07182982563972473,
0.03548383340239525,
0.0976305603981018,
-0.08553417026996613,
0.013471467420458794,
-0.10754332691431046,
3.7979928601480404e-33,
0.05613335222005844,
-0.06025656312704086,
-0.03182226046919823,
-0.021560516208410263,
-0.07268207520246506,
-0.07863331586122513,
-0.02440786175429821,
0.027546001598238945,
-0.0600183941423893,
-0.056979235261678696,
0.017712723463773727,
0.05885936692357063,
-0.09497591108083725,
-0.11391828954219818,
0.0796387642621994,
0.05943450704216957,
-0.09327593445777893,
-0.02178165130317211,
0.1062881201505661,
-0.013911007903516293,
0.0745571181178093,
0.04572916403412819,
-0.07282832264900208,
-0.03583168983459473,
0.019348913803696632,
-0.011794773861765862,
0.011094236746430397,
-0.042966071516275406,
-0.06722447276115417,
0.0022491123527288437,
-0.0087564243003726,
-0.02833704650402069,
0.055673401802778244,
0.03569139912724495,
-0.04998264089226723,
-0.014160407707095146,
0.005080771632492542,
0.0002545239694882184,
-0.11770106852054596,
-0.03926887363195419,
0.06614790111780167,
-0.003422091482207179,
-0.0009668378042988479,
-0.06422165036201477,
0.030984513461589813,
-0.1018892303109169,
0.08264505118131638,
-0.025401363149285316,
-0.02918105386197567,
-0.038236647844314575,
0.0004987164866179228,
0.09143739938735962,
0.036913029849529266,
-0.018898963928222656,
0.012361985631287098,
-0.049829646944999695,
0.023781925439834595,
0.0027795154601335526,
0.008597133681178093,
-0.028830548748373985,
0.06393130123615265,
0.06871262192726135,
0.0048486897721886635,
0.042513128370046616,
0.02916453592479229,
0.07046134769916534,
-0.0091182766482234,
-0.04558160528540611,
-0.005830886773765087,
-0.03523501008749008,
-0.04055200144648552,
0.03822525963187218,
-0.09113085269927979,
0.023162104189395905,
0.07854771614074707,
-0.13063034415245056,
0.003284843172878027,
-0.0620972141623497,
-0.08316793292760849,
-0.04815531149506569,
0.0011913679772987962,
-0.031137216836214066,
-0.03822391480207443,
0.08134407550096512,
-0.08202819526195526,
-0.05052700638771057,
0.04602059721946716,
-0.031069345772266388,
-0.07611171901226044,
-0.015458411537110806,
0.12123233824968338,
-0.058189257979393005,
-0.028224671259522438,
0.059585828334093094,
-0.02337513118982315,
-6.16648393799239e-33,
0.039297983050346375,
-0.02627364732325077,
0.055588312447071075,
0.01832275278866291,
-0.0019124792888760567,
-0.0008057682425715029,
0.06799371540546417,
0.02744055539369583,
0.007719559594988823,
-0.06736976653337479,
-0.03761468082666397,
-0.03226274996995926,
0.030818674713373184,
-0.004044478293508291,
-0.041754450649023056,
-0.035299357026815414,
-0.04967900365591049,
-0.049475930631160736,
-0.00756082171574235,
0.0674615353345871,
0.06132413074374199,
0.08556748926639557,
-0.023831088095903397,
0.05090342462062836,
0.04399977996945381,
0.009856483899056911,
-0.040819551795721054,
0.001962136011570692,
-0.10491256415843964,
-0.03474844619631767,
-0.004020477179437876,
-0.034588273614645004,
0.0099267503246665,
-0.007865022867918015,
-0.02457134798169136,
-0.08002408593893051,
-0.07029752433300018,
-0.008375698700547218,
-0.050826288759708405,
-0.025046929717063904,
0.02431088127195835,
0.06530658155679703,
0.003619130002334714,
0.03419540077447891,
-0.02623060904443264,
0.005088362377136946,
-0.031050074845552444,
0.0004750956140924245,
0.025817841291427612,
-0.09006145596504211,
0.0008955279481597245,
0.036227986216545105,
-0.013388638384640217,
0.006184385158121586,
0.05207645893096924,
0.1004297062754631,
0.03617028519511223,
0.04906851053237915,
-0.045567311346530914,
0.044342514127492905,
0.022173786535859108,
-0.007913898676633835,
0.027438625693321228,
-0.02881481871008873,
0.08643396943807602,
-0.07325784862041473,
-0.0671733096241951,
-0.07238858193159103,
0.004176398739218712,
-0.035784754902124405,
-0.0015272125601768494,
0.0064217946492135525,
-0.05205688998103142,
0.006055321078747511,
0.05156710743904114,
-0.07319002598524094,
0.04926811158657074,
-0.03755832090973854,
0.03320111334323883,
0.04107101261615753,
-0.12789416313171387,
0.021611448377370834,
0.0657336637377739,
0.03622400015592575,
0.06047415733337402,
0.01172762643545866,
0.015521327033638954,
0.04062676802277565,
-0.0014698165468871593,
0.08064544945955276,
-0.011247565038502216,
-0.02038438431918621,
-0.04843899607658386,
0.04339047521352768,
-0.0489271841943264,
-5.942500180822208e-8,
-0.025019042193889618,
0.017614368349313736,
-0.0024736043997108936,
0.044846463948488235,
0.05221627280116081,
-0.0860726535320282,
0.057074498385190964,
0.013989812694489956,
0.0010012512793764472,
0.002879966516047716,
-0.067051462829113,
0.09019557386636734,
0.013624205254018307,
0.015278180129826069,
0.0074288491159677505,
-0.03296751156449318,
0.059900280088186264,
-0.0035963328555226326,
-0.017373600974678993,
-0.012687116861343384,
-0.05597658082842827,
0.008452306501567364,
-0.02886495552957058,
0.003340623341500759,
-0.014997921884059906,
-0.010447952896356583,
0.05251026898622513,
0.036713458597660065,
0.07548683881759644,
-0.002884039655327797,
0.009881962090730667,
-0.04120307415723801,
0.02236255072057247,
0.11914922297000885,
-0.013369650579988956,
0.06965339928865433,
-0.0760035365819931,
0.09699679911136627,
-0.057970307767391205,
0.055481430143117905,
0.030999580398201942,
-0.02000170759856701,
-0.11781973391771317,
0.034436099231243134,
-0.003143939422443509,
0.00769940298050642,
-0.07159966230392456,
0.03413711488246918,
-0.07357682287693024,
-0.011326844803988934,
0.016725922003388405,
-0.008935335092246532,
-0.06797492504119873,
0.0018412974895909429,
0.028299879282712936,
0.034789927303791046,
0.043133631348609924,
-0.010832241736352444,
-0.025944171473383904,
0.01772894896566868,
0.0919385775923729,
-0.007958895526826382,
0.013577204197645187,
-0.04208393767476082
] | 0.091756
|
with one rule: ```yaml openAPIV3Schema: type: object properties: foo: type: array items: type: string x-kubernetes-validations: - rule: "self.all(x, x.contains('a string'))" ``` then the API server rejects this rule on validation budget grounds with error: ``` spec.validation.openAPIV3Schema.properties[spec].properties[foo].x-kubernetes-validations[0].rule: Forbidden: CEL rule exceeded budget by more than 100x (try simplifying the rule, or adding maxItems, maxProperties, and maxLength where arrays, maps, and strings are used) ``` The rejection happens because `self.all` implies calling `contains()` on every string in `foo`, which in turn will check the given string to see if it contains `'a string'`. Without limits, this is a very expensive rule. If you do not specify any validation limit, the estimated cost of this rule will exceed the per-rule cost limit. But if you add limits in the appropriate places, the rule will be allowed: ```yaml openAPIV3Schema: type: object properties: foo: type: array maxItems: 25 items: type: string maxLength: 10 x-kubernetes-validations: - rule: "self.all(x, x.contains('a string'))" ``` The cost estimation system takes into account how many times the rule will be executed in addition to the estimated cost of the rule itself. For instance, the following rule will have the same estimated cost as the previous example (despite the rule now being defined on the individual array items): ```yaml openAPIV3Schema: type: object properties: foo: type: array maxItems: 25 items: type: string x-kubernetes-validations: - rule: "self.contains('a string'))" maxLength: 10 ``` If a list inside of a list has a validation rule that uses `self.all`, that is significantly more expensive than a non-nested list with the same rule. A rule that would have been allowed on a non-nested list might need lower limits set on both nested lists in order to be allowed. For example, even without having limits set, the following rule is allowed: ```yaml openAPIV3Schema: type: object properties: foo: type: array items: type: integer x-kubernetes-validations: - rule: "self.all(x, x == 5)" ``` But the same rule on the following schema (with a nested array added) produces a validation error: ```yaml openAPIV3Schema: type: object properties: foo: type: array items: type: array items: type: integer x-kubernetes-validations: - rule: "self.all(x, x == 5)" ``` This is because each item of `foo` is itself an array, and each subarray in turn calls `self.all`. Avoid nested lists and maps if possible where validation rules are used. ### Defaulting {{< note >}} To use defaulting, your CustomResourceDefinition must use API version `apiextensions.k8s.io/v1`. {{< /note >}} Defaulting allows to specify default values in the [OpenAPI v3 validation schema](#validation): ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com versions: - name: v1 served: true storage: true schema: # openAPIV3Schema is the schema for validating custom objects. openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string pattern: '^(\d+|\\*)(/\d+)?(\s+(\d+|\\*)(/\d+)?){4}$' default: "5 0 \* \* \*" image: type: string replicas: type: integer minimum: 1 maximum: 10 default: 1 scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct ``` With this both `cronSpec` and `replicas` are defaulted: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: image: my-awesome-cron-image ``` leads to ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "5 0 \* \* \*" image: my-awesome-cron-image replicas: 1 ``` Defaulting happens on the object \* in the request to the API server using the request version defaults, \* when reading from etcd using the storage version defaults, \* after mutating admission plugins with non-empty patches using the admission webhook object version defaults. Defaults applied when reading data from etcd are not automatically written back to etcd. An update request via the API is required to persist those defaults back into etcd. Default values for non-leaf
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
0.02410576492547989,
0.08534697443246841,
0.07442550361156464,
-0.008124555461108685,
0.021404314786195755,
-0.06971901655197144,
0.03179817274212837,
-0.014891608618199825,
0.10107117891311646,
0.0413675382733345,
-0.04012720286846161,
-0.11325938254594803,
0.031006332486867905,
-0.025313500314950943,
0.07471112906932831,
0.060441985726356506,
0.030489379540085793,
-0.022648058831691742,
-0.10645880550146103,
-0.048960812389850616,
0.047792624682188034,
0.013581883162260056,
0.024263987317681313,
-0.0015060186851769686,
-0.08074245601892471,
0.03287646546959877,
-0.06677722930908203,
-0.004210107959806919,
0.01638221926987171,
-0.023319536820054054,
-0.05346493422985077,
-0.0025991550646722317,
-0.04534438997507095,
0.04548084735870361,
0.10158056020736694,
0.029557617381215096,
-0.014125308021903038,
-0.066538006067276,
-0.06101691350340843,
0.06128621846437454,
0.02034533955156803,
0.013765036128461361,
-0.09567916393280029,
0.013910779729485512,
0.010163295082747936,
0.009949334897100925,
-0.009084253571927547,
-0.1042063906788826,
-0.0061785317957401276,
-0.024851316586136818,
-0.011980690993368626,
-0.07511360943317413,
-0.004584963899105787,
0.02279841899871826,
0.13569651544094086,
-0.01145515963435173,
-0.08994371443986893,
0.03873176872730255,
0.013954405672848225,
-0.014819541946053505,
0.03990868479013443,
-0.11046388000249863,
0.010045010596513748,
-0.05176667496562004,
0.016125304624438286,
-0.037111904472112656,
-0.033079683780670166,
-0.04667418450117111,
-0.01943783462047577,
0.06567337363958359,
0.0936785414814949,
0.005314880516380072,
-0.021742219105362892,
0.06780564039945602,
-0.006825508549809456,
0.07546704262495041,
0.016661066561937332,
0.0021774908527731895,
0.05614562705159187,
-0.05623530596494675,
-0.08237101137638092,
-0.0203759353607893,
0.013461407274007797,
-0.05511680245399475,
-0.017789052799344063,
0.000252581579843536,
-0.052757378667593,
-0.04470108821988106,
0.04608369618654251,
0.08068285882472992,
0.043885618448257446,
-0.09107740223407745,
0.0014184071915224195,
-0.05542939528822899,
0.0734662339091301,
-0.02753584086894989,
-0.08579685539007187,
-0.0715167447924614,
0.032767247408628464,
0.027250826358795166,
-0.003844393417239189,
0.03334379568696022,
0.056025102734565735,
0.0010490246349945664,
0.04253768175840378,
-0.011485145427286625,
0.0439939983189106,
0.004680268932133913,
-0.07400033622980118,
0.053153105080127716,
-0.020061712712049484,
0.02620210312306881,
0.035019081085920334,
-0.0020295095164328814,
-0.021620534360408783,
0.04816878214478493,
0.013220293447375298,
0.022353967651724815,
0.03135630860924721,
0.04267742112278938,
-0.011053482070565224,
-0.0701785683631897,
0.10105463862419128,
0.04805164411664009,
-0.07295370101928711,
0.03189777582883835,
-0.04757002741098404,
3.37261120928621e-33,
-0.00837737787514925,
0.03084825724363327,
0.00046864786418154836,
-0.08151917904615402,
-0.056211214512586594,
-0.07334426045417786,
-0.005455073434859514,
0.03097664937376976,
-0.047603704035282135,
0.007279856130480766,
-0.047126900404691696,
0.05321977287530899,
-0.05971217900514603,
-0.051271289587020874,
0.12720176577568054,
0.03181617707014084,
0.02508794516324997,
0.0037514774594455957,
0.02493024803698063,
0.004055004566907883,
0.07548315823078156,
-0.12891273200511932,
-0.003698137355968356,
-0.01547648012638092,
-0.09149213880300522,
-0.0567685104906559,
0.05434107780456543,
-0.02676629088819027,
0.02479027397930622,
0.013855960220098495,
-0.035666245967149734,
-0.039068229496479034,
0.1121819019317627,
0.03882846236228943,
-0.03352377563714981,
0.06170233339071274,
-0.020527226850390434,
0.036662328988313675,
-0.05780540034174919,
0.0020708730444312096,
-0.05447588860988617,
0.010405831038951874,
0.019235504791140556,
-0.016851970925927162,
0.012946384958922863,
-0.038023900240659714,
-0.02861006185412407,
-0.005802037660032511,
-0.012564037926495075,
-0.003926903009414673,
-0.0022784441243857145,
0.024273501709103584,
0.004925638437271118,
0.023536166176199913,
0.05346517637372017,
-0.04831865057349205,
0.09998539835214615,
0.024101320654153824,
-0.05281730741262436,
0.06802770495414734,
-0.07101073861122131,
-0.049135711044073105,
-0.04626944288611412,
0.023421816527843475,
-0.012327848002314568,
0.06554984301328659,
0.0019486133242025971,
0.061115801334381104,
-0.08615413308143616,
-0.03064517304301262,
0.014098923653364182,
0.08268050104379654,
-0.11234084516763687,
0.008694780059158802,
0.01856960356235504,
-0.1379537582397461,
0.08448326587677002,
0.05492858961224556,
-0.05472201481461525,
-0.047175176441669464,
-0.015858285129070282,
0.006498590111732483,
0.022928530350327492,
0.13703998923301697,
-0.09323298931121826,
0.002276140497997403,
0.03138295188546181,
0.05592486634850502,
-0.0024129762314260006,
0.025911463424563408,
-0.01048541720956564,
-0.03865627199411392,
-0.08701646327972412,
-0.0638728141784668,
-0.0551568977534771,
-3.2238222771469094e-33,
0.06355364620685577,
-0.01097184233367443,
0.00000502959119330626,
0.036337122321128845,
0.06332964450120926,
-0.02656971476972103,
-0.005530243273824453,
0.06851725280284882,
0.05553615465760231,
-0.07533487677574158,
-0.010632439516484737,
-0.041612692177295685,
0.04771651700139046,
0.00935499370098114,
-0.058526165783405304,
-0.06732244044542313,
-0.14827960729599,
-0.060917168855667114,
0.020306486636400223,
-0.01168045774102211,
-0.024555489420890808,
0.03629504516720772,
0.02472607232630253,
0.05359220504760742,
-0.04729714244604111,
0.03140664100646973,
-0.08279717713594437,
0.04435604438185692,
-0.056175269186496735,
0.022296132519841194,
0.0020347824320197105,
-0.06641384214162827,
-0.03534996509552002,
0.034638386219739914,
0.014493166469037533,
-0.09021921455860138,
0.008534220978617668,
0.08466576039791107,
-0.011892118491232395,
0.057721588760614395,
-0.04320020228624344,
0.06216335669159889,
-0.030761871486902237,
-0.026953617110848427,
-0.02738538756966591,
-0.003943200223147869,
0.02523096092045307,
-0.05078430846333504,
0.053891029208898544,
-0.06270346790552139,
0.03283243253827095,
-0.009130848571658134,
-0.004517815075814724,
0.063463494181633,
-0.04221859946846962,
0.012219232507050037,
-0.014182637445628643,
0.026595938950777054,
0.008395894430577755,
-0.019121143966913223,
-0.027155186980962753,
-0.005769981537014246,
0.03383883088827133,
0.061376020312309265,
0.04557853192090988,
-0.01563955843448639,
0.05040644481778145,
-0.006095649674534798,
0.07394170761108398,
-0.05081965774297714,
-0.04314911738038063,
-0.03554990142583847,
-0.07532072067260742,
0.06912219524383545,
-0.03548611328005791,
0.001715626334771514,
0.04051033407449722,
0.025601178407669067,
0.14629998803138733,
0.037146229296922684,
-0.014072569087147713,
0.05906981974840164,
0.0182034969329834,
0.01923026517033577,
0.0944850742816925,
0.030251814052462578,
0.05519194155931473,
0.057272959500551224,
-0.0344197079539299,
0.1285841017961502,
0.013964109122753143,
0.02267252467572689,
-0.0052300323732197285,
0.0780690461397171,
-0.04895253852009773,
-4.8443578037904444e-8,
-0.05633283779025078,
0.0015599840553477407,
-0.07496326416730881,
0.08959914743900299,
0.04090125858783722,
-0.025898735970258713,
0.0809333398938179,
-0.0014543236466124654,
0.001990973250940442,
-0.012301085516810417,
-0.016538819298148155,
0.09398800879716873,
-0.09883173555135727,
-0.004111419897526503,
-0.05455474182963371,
-0.050469059497117996,
-0.013065232895314693,
0.07046366482973099,
-0.025559410452842712,
-0.02540748007595539,
-0.054790254682302475,
-0.007664359174668789,
-0.03290565684437752,
-0.06425800919532776,
0.04101971164345741,
0.03550401329994202,
0.0570920929312706,
0.057527102530002594,
0.026205385103821754,
0.040151841938495636,
-0.021066630259156227,
-0.05155959725379944,
-0.0164087675511837,
0.019513899460434914,
-0.000751367537304759,
0.0590280257165432,
-0.08947396278381348,
0.021529534831643105,
-0.009375953115522861,
0.10900036245584488,
0.028288833796977997,
-0.01681077666580677,
-0.03356645628809929,
-0.009883430786430836,
0.03380685672163963,
0.0013624964049085975,
-0.037797462195158005,
0.005035060457885265,
-0.01914624311029911,
0.04393497854471207,
0.015754183754324913,
-0.04946272447705269,
-0.00984952598810196,
0.048205554485321045,
-0.10300341248512268,
-0.014116746373474598,
-0.008561774156987667,
-0.0030277736950665712,
-0.0175944697111845,
-0.061091963201761246,
0.06845003366470337,
-0.05875026807188988,
0.07236550748348236,
0.011692342348396778
] | 0.061733
|
version defaults, \* after mutating admission plugins with non-empty patches using the admission webhook object version defaults. Defaults applied when reading data from etcd are not automatically written back to etcd. An update request via the API is required to persist those defaults back into etcd. Default values for non-leaf fields must be pruned (with the exception of defaults for `metadata` fields) and must validate against a provided schema. For example in the above example, a default of `{"replicas": "foo", "badger": 1}` for the `spec` field would be invalid, because `badger` is an unknown field, and `replicas` is not a string. Default values for `metadata` fields of `x-kubernetes-embedded-resources: true` nodes (or parts of a default value covering `metadata`) are not pruned during CustomResourceDefinition creation, but through the pruning step during handling of requests. #### Defaulting and Nullable Null values for fields that either don't specify the nullable flag, or give it a `false` value, will be pruned before defaulting happens. If a default is present, it will be applied. When nullable is `true`, null values will be conserved and won't be defaulted. For example, given the OpenAPI schema below: ```yaml type: object properties: spec: type: object properties: foo: type: string nullable: false default: "default" bar: type: string nullable: true baz: type: string ``` creating an object with null values for `foo` and `bar` and `baz` ```yaml spec: foo: null bar: null baz: null ``` leads to ```yaml spec: foo: "default" bar: null ``` with `foo` pruned and defaulted because the field is non-nullable, `bar` maintaining the null value due to `nullable: true`, and `baz` pruned because the field is non-nullable and has no default. ### Publish Validation Schema in OpenAPI CustomResourceDefinition [OpenAPI v3 validation schemas](#validation) which are [structural](#specifying-a-structural-schema) and [enable pruning](#field-pruning) are published as [OpenAPI v3](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions) and OpenAPI v2 from Kubernetes API server. It is recommended to use the OpenAPI v3 document as it is a lossless representation of the CustomResourceDefinition OpenAPI v3 validation schema while OpenAPI v2 represents a lossy conversion. The [kubectl](/docs/reference/kubectl/) command-line tool consumes the published schema to perform client-side validation (`kubectl create` and `kubectl apply`), schema explanation (`kubectl explain`) on custom resources. The published schema can be consumed for other purposes as well, like client generation or documentation. #### Compatibility with OpenAPI V2 For compatibility with OpenAPI V2, the OpenAPI v3 validation schema performs a lossy conversion to the OpenAPI v2 schema. The schema show up in `definitions` and `paths` fields in the [OpenAPI v2 spec](/docs/concepts/overview/kubernetes-api/#openapi-and-swagger-definitions). The following modifications are applied during the conversion to keep backwards compatibility with kubectl in previous 1.13 version. These modifications prevent kubectl from being over-strict and rejecting valid OpenAPI schemas that it doesn't understand. The conversion won't modify the validation schema defined in CRD, and therefore won't affect [validation](#validation) in the API server. 1. The following fields are removed as they aren't supported by OpenAPI v2. - The fields `allOf`, `anyOf`, `oneOf` and `not` are removed 2. If `nullable: true` is set, we drop `type`, `nullable`, `items` and `properties` because OpenAPI v2 is not able to express nullable. To avoid kubectl to reject good objects, this is necessary. ### Additional printer columns The kubectl tool relies on server-side output formatting. Your cluster's API server decides which columns are shown by the `kubectl get` command. You can customize these columns for a CustomResourceDefinition. The following example adds the `Spec`, `Replicas`, and `Age` columns. Save the CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct versions: - name: v1 served: true storage: true schema: openAPIV3Schema:
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.019066933542490005,
0.07235849648714066,
0.03458463400602341,
-0.031120654195547104,
0.011199005879461765,
-0.017645541578531265,
-0.04985485225915909,
-0.030732817947864532,
-0.017935538664460182,
0.04848458245396614,
0.048869602382183075,
-0.063224196434021,
0.004626201465725899,
0.020039888098835945,
0.06670243293046951,
0.03898753970861435,
0.04426674544811249,
-0.06507235020399094,
-0.04628331586718559,
0.017148956656455994,
0.01925068348646164,
0.050318676978349686,
0.009282938204705715,
-0.010798053815960884,
0.004230196122080088,
0.011745680123567581,
-0.0613531693816185,
0.01948314532637596,
0.042865462601184845,
-0.03508209437131882,
-0.04355727508664131,
0.057256247848272324,
-0.07632050663232803,
-0.001121777924709022,
0.09147976338863373,
0.08830998837947845,
0.03757135942578316,
-0.011041903868317604,
-0.034307703375816345,
0.08469562232494354,
0.037115227431058884,
-0.06773556768894196,
-0.06425204873085022,
0.005978232249617577,
-0.03510085493326187,
-0.00048074923688545823,
-0.06997271627187729,
-0.0944228395819664,
-0.03364301472902298,
-0.027214251458644867,
0.024243241176009178,
-0.0268554724752903,
0.03419613465666771,
0.05493577569723129,
0.09470746666193008,
0.03887186199426651,
-0.08877549320459366,
0.054925043135881424,
0.0030680575873702765,
0.027781235054135323,
0.05828780308365822,
-0.08401353657245636,
0.0660918727517128,
0.014730491675436497,
-0.014002470299601555,
0.007736241910606623,
0.0041770339012146,
-0.010752901434898376,
0.05455651879310608,
-0.03152963146567345,
0.02082555554807186,
0.014909708872437477,
-0.05781155452132225,
-0.02031397446990013,
-0.02262152172625065,
0.10654803365468979,
-0.047067802399396896,
0.09191212058067322,
0.058955252170562744,
-0.11784365028142929,
-0.03689359128475189,
-0.05285053327679634,
-0.019716300070285797,
-0.012265413999557495,
-0.06986454874277115,
0.012539168819785118,
-0.03295837715268135,
-0.04991976544260979,
0.000048189900553552434,
0.06142350286245346,
-0.008220076560974121,
-0.12800438702106476,
-0.000599511491600424,
-0.01434551551938057,
-0.030372167006134987,
0.0268901027739048,
0.0058557079173624516,
0.03297683596611023,
-0.030570628121495247,
0.04963254556059837,
0.009691276587545872,
-0.014178265817463398,
0.014064998365938663,
0.030775608494877815,
0.0331619568169117,
-0.09913923591375351,
-0.016091885045170784,
0.013669906184077263,
-0.006805189419537783,
0.04757234454154968,
0.0060239448212087154,
0.033856552094221115,
-0.022172847762703896,
-0.005844691768288612,
-0.037565842270851135,
0.026750098913908005,
0.004489604849368334,
-0.04141564294695854,
-0.014424992725253105,
0.06640492379665375,
0.02869044803082943,
-0.010397051461040974,
0.026624295860528946,
0.06631723046302795,
-0.09539864212274551,
0.008978527970612049,
-0.02260049432516098,
3.960488423759913e-33,
0.1159105896949768,
0.011173008941113949,
-0.02012025937438011,
-0.06406673043966293,
-0.04547790065407753,
-0.0737844854593277,
-0.022257236763834953,
0.014541462995111942,
-0.0017604422755539417,
-0.0640110895037651,
0.007244796957820654,
0.061326202005147934,
-0.07050817459821701,
-0.02886858582496643,
0.03001774661242962,
-0.01936624012887478,
-0.034638531506061554,
0.06713054329156876,
0.05002867057919502,
-0.019407907500863075,
0.10798428952693939,
-0.010576482862234116,
-0.08577434718608856,
-0.05829568952322006,
0.034031715244054794,
0.0033992102835327387,
-0.01634155958890915,
-0.0663038119673729,
-0.05684328079223633,
0.03369550779461861,
0.02800661139190197,
-0.07447662204504013,
0.0881766676902771,
0.024459462612867355,
-0.07613322138786316,
-0.008640280924737453,
-0.012495605275034904,
0.009828789159655571,
-0.09240523725748062,
-0.10406601428985596,
0.05961618199944496,
0.021725639700889587,
-0.002153369365260005,
-0.03449229151010513,
0.0651836171746254,
-0.07628819346427917,
0.019359735772013664,
-0.011222911067306995,
0.05359119921922684,
-0.05507294833660126,
-0.02616712637245655,
-0.008408972062170506,
0.04193490371108055,
-0.017821183428168297,
0.020784273743629456,
-0.027427086606621742,
0.07892010360956192,
-0.06125941500067711,
-0.08108360320329666,
-0.03387125954031944,
0.013092456385493279,
0.04251277819275856,
-0.01270567812025547,
0.0039292131550610065,
0.04359664395451546,
0.051840249449014664,
-0.021503150463104248,
-0.01359383575618267,
-0.05230181664228439,
-0.012008958496153355,
-0.08080872148275375,
0.03245016187429428,
-0.10474905371665955,
0.021945888176560402,
-0.03258105739951134,
-0.07423307001590729,
0.03973400220274925,
0.04030563682317734,
-0.055174440145492554,
0.020656682550907135,
0.02814086526632309,
0.004840721841901541,
-0.11720486730337143,
0.07271549850702286,
-0.03649907559156418,
0.0016954797320067883,
0.07262963801622391,
-0.028012065216898918,
0.018029190599918365,
-0.03949657827615738,
0.1161084845662117,
-0.007428409997373819,
-0.06993373483419418,
-0.04295731708407402,
-0.03103436343371868,
-4.356303452962686e-33,
0.06287380307912827,
-0.0011374650057405233,
-0.006851338781416416,
0.05759871378540993,
0.04221079498529434,
0.019587138667702675,
0.07443658262491226,
0.1003401130437851,
0.039828937500715256,
-0.0763116255402565,
0.012974407523870468,
-0.009493953548371792,
-0.027871567755937576,
-0.03578563407063484,
-0.03275288641452789,
0.04255020245909691,
-0.09841999411582947,
-0.09530998766422272,
0.08696336299180984,
0.054982081055641174,
0.04803122952580452,
0.047377169132232666,
-0.009970176964998245,
0.06874459236860275,
0.0871986374258995,
-0.02044478990137577,
0.00048158896970562637,
-0.0020534908398985863,
-0.03947464004158974,
-0.01099620945751667,
0.06747772544622421,
-0.018689796328544617,
-0.1364242434501648,
0.022594237700104713,
-0.026613755151629448,
-0.09351208806037903,
-0.01409177202731371,
0.10677001625299454,
-0.012601503171026707,
0.012916156090795994,
0.01346528623253107,
-0.013493743725121021,
-0.10866767913103104,
0.10118308663368225,
-0.029860004782676697,
-0.01363897230476141,
0.00450826995074749,
-0.039746079593896866,
0.016392575576901436,
-0.09950179606676102,
-0.021006431430578232,
-0.008711052127182484,
0.03526265174150467,
0.06212342903017998,
-0.006139070261269808,
0.05246769264340401,
0.0038080026861280203,
0.040919166058301926,
-0.03312766179442406,
-0.03770415857434273,
0.049169667065143585,
0.004076762590557337,
-0.01242514606565237,
0.009501846507191658,
-0.04301084205508232,
-0.040568381547927856,
-0.07508623600006104,
-0.0108086122199893,
-0.09523570537567139,
-0.03522937372326851,
-0.018428180366754532,
-0.07187893241643906,
-0.04087354242801666,
-0.0791308656334877,
0.028812358155846596,
-0.016890713945031166,
-0.014191902242600918,
-0.027087602764368057,
0.05767718702554703,
0.03511723130941391,
-0.10944903641939163,
0.10217992216348648,
-0.010567845776677132,
0.035376451909542084,
0.07911220192909241,
-0.0021995999850332737,
0.017839793115854263,
0.10684864223003387,
0.014362574554979801,
0.08298049867153168,
-0.03386060521006584,
0.05040263757109642,
-0.07506146281957626,
0.08631516993045807,
-0.08055171370506287,
-5.347899545427026e-8,
-0.021482860669493675,
-0.007232816889882088,
-0.04582921415567398,
0.12368113547563553,
0.10820496827363968,
-0.05685156583786011,
0.0350535549223423,
-0.023086639121174812,
0.01368044875562191,
-0.00758570758625865,
-0.0471724309027195,
0.11055689305067062,
-0.08179903030395508,
-0.014224081300199032,
0.016217779368162155,
-0.00804927945137024,
0.013367382809519768,
0.0685829222202301,
-0.01984425261616707,
-0.0013111591106280684,
-0.07106238603591919,
-0.022910885512828827,
-0.01575084775686264,
-0.06106206774711609,
0.08907448500394821,
0.09729598462581635,
0.1009836345911026,
0.03509194403886795,
0.07849001884460449,
0.10252570360898972,
0.03202155977487564,
-0.012732039205729961,
0.01567729003727436,
0.0067478809505701065,
-0.056497830897569656,
0.07165694236755371,
-0.024952778592705727,
0.06317934393882751,
-0.018230624496936798,
0.015162298455834389,
-0.027977384626865387,
-0.006660424638539553,
-0.031523242592811584,
0.02330593578517437,
0.025747204199433327,
0.01417233981192112,
-0.0167680736631155,
0.06369852274656296,
0.015023906715214252,
-0.05889708176255226,
-0.03986368700861931,
-0.051086749881505966,
-0.0005697680171579123,
0.028507133945822716,
-0.036417607218027115,
0.05476749315857887,
0.029738759621977806,
-0.022427529096603394,
0.01241533923894167,
-0.02383076213300228,
0.07200609147548676,
-0.03883500024676323,
0.04120979085564613,
0.03890177235007286
] | 0.076387
|
a CustomResourceDefinition. The following example adds the `Spec`, `Replicas`, and `Age` columns. Save the CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct versions: - name: v1 served: true storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string image: type: string replicas: type: integer additionalPrinterColumns: - name: Spec type: string description: The cron spec defining the interval a CronJob is run jsonPath: .spec.cronSpec - name: Replicas type: integer description: The number of jobs launched by the CronJob jsonPath: .spec.replicas - name: Age type: date jsonPath: .metadata.creationTimestamp ``` Create the CustomResourceDefinition: ```shell kubectl apply -f resourcedefinition.yaml ``` Create an instance using the `my-crontab.yaml` from the previous section. Invoke the server-side printing: ```shell kubectl get crontab my-new-cron-object ``` Notice the `NAME`, `SPEC`, `REPLICAS`, and `AGE` columns in the output: ``` NAME SPEC REPLICAS AGE my-new-cron-object \* \* \* \* \* 1 7s ``` {{< note >}} The `NAME` column is implicit and does not need to be defined in the CustomResourceDefinition. {{< /note >}} #### Priority Each column includes a `priority` field. Currently, the priority differentiates between columns shown in standard view or wide view (using the `-o wide` flag). - Columns with priority `0` are shown in standard view. - Columns with priority greater than `0` are shown only in wide view. #### Type A column's `type` field can be any of the following (compare [OpenAPI v3 data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)): - `integer` – non-floating-point numbers - `number` – floating point numbers - `string` – strings - `boolean` – `true` or `false` - `date` – rendered differentially as time since this timestamp. If the value inside a CustomResource does not match the type specified for the column, the value is omitted. Use CustomResource validation to ensure that the value types are correct. #### Format A column's `format` field can be any of the following: - `int32` - `int64` - `float` - `double` - `byte` - `date` - `date-time` - `password` The column's `format` controls the style used when `kubectl` prints the value. ### Field selectors [Field Selectors](/docs/concepts/overview/working-with-objects/field-selectors/) let clients select custom resources based on the value of one or more resource fields. All custom resources support the `metadata.name` and `metadata.namespace` field selectors. Fields declared in a {{< glossary\_tooltip term\_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} may also be used with field selectors when included in the `spec.versions[\*].selectableFields` field of the {{< glossary\_tooltip term\_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}. #### Selectable fields for custom resources {#crd-selectable-fields} {{< feature-state feature\_gate\_name="CustomResourceFieldSelectors" >}} The `spec.versions[\*].selectableFields` field of a {{< glossary\_tooltip term\_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} may be used to declare which other fields in a custom resource may be used in field selectors with the feature of `CustomResourceFieldSelectors` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) (This feature gate is enabled by default since Kubernetes v1.31). The following example adds the `.spec.color` and `.spec.size` fields as selectable fields. Save the CustomResourceDefinition to `shirt-resource-definition.yaml`: {{% code\_sample file="customresourcedefinition/shirt-resource-definition.yaml" %}} Create the CustomResourceDefinition: ```shell kubectl apply -f https://k8s.io/examples/customresourcedefinition/shirt-resource-definition.yaml ``` Define some Shirts by editing `shirt-resources.yaml`; for example: {{% code\_sample file="customresourcedefinition/shirt-resources.yaml" %}} Create the custom resources: ```shell kubectl apply -f https://k8s.io/examples/customresourcedefinition/shirt-resources.yaml ``` Get all the resources: ```shell kubectl get shirts.stable.example.com ``` The output is: ``` NAME COLOR SIZE example1 blue S example2 blue M example3 green M ``` Fetch blue shirts (retrieve Shirts with a `color` of `blue`): ```shell kubectl get shirts.stable.example.com --field-selector spec.color=blue ``` Should output: ``` NAME COLOR SIZE example1 blue S example2 blue M ``` Get only resources with a `color` of `green` and a `size` of `M`: ```shell kubectl get shirts.stable.example.com --field-selector spec.color=green,spec.size=M ``` Should output: ``` NAME COLOR SIZE
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.10368797928094864,
0.0008747904794290662,
-0.06565549224615097,
-0.0011534788645803928,
-0.011532776057720184,
0.024698380380868912,
-0.014290466904640198,
0.0374472476541996,
-0.004795474465936422,
0.024502528831362724,
0.013096862472593784,
-0.08345316350460052,
0.010193582624197006,
0.015806855633854866,
-0.0049873702228069305,
-0.02122955024242401,
-0.008140276186168194,
-0.05374054238200188,
-0.03722995147109032,
-0.011465522460639477,
0.1083088368177414,
0.02156621403992176,
0.050967857241630554,
-0.02266111597418785,
-0.02479560114443302,
-0.03555368632078171,
-0.02190404199063778,
0.056241609156131744,
0.04654417932033539,
0.014549505896866322,
-0.03700880706310272,
0.0714886486530304,
-0.012364604510366917,
-0.003974860068410635,
0.14774520695209503,
0.16267548501491547,
0.03861270472407341,
-0.0451585054397583,
0.016681065782904625,
0.01495276764035225,
0.02805357240140438,
0.030544456094503403,
-0.03816962242126465,
-0.040826957672834396,
-0.022227872163057327,
-0.02756243385374546,
0.007981295697391033,
-0.059631504118442535,
-0.06297372281551361,
0.0455767847597599,
0.015081501565873623,
-0.07354017347097397,
-0.04617719724774361,
0.047606371343135834,
0.08148908615112305,
0.06427837908267975,
-0.10279814898967743,
0.022631438449025154,
0.026839276775717735,
-0.0015392386121675372,
0.0784059464931488,
-0.027126774191856384,
-0.002125843893736601,
-0.05938387289643288,
-0.03837423771619797,
-0.035373248159885406,
-0.05557430908083916,
0.024864258244633675,
0.03193863853812218,
-0.028958750888705254,
-0.046704985201358795,
0.005818310659378767,
-0.04747575893998146,
-0.04330989718437195,
0.020047325640916824,
0.05327286943793297,
0.012855235487222672,
-0.011197766289114952,
-0.0390622578561306,
-0.13796062767505646,
-0.09185466170310974,
0.001808429486118257,
0.028246691450476646,
0.035148028284311295,
-0.010834208689630032,
0.006840301677584648,
0.04828162491321564,
-0.028238628059625626,
0.07340802997350693,
0.0043083797208964825,
-0.0003488953225314617,
-0.028529895469546318,
-0.035071246325969696,
-0.06389171630144119,
-0.047086965292692184,
0.040506478399038315,
-0.04015197977423668,
0.0620574876666069,
0.006110692396759987,
0.04695698618888855,
0.013037391006946564,
0.05645785480737686,
0.015019313432276249,
0.011490811593830585,
0.06130492314696312,
0.03766969218850136,
-0.08148312568664551,
0.11265240609645844,
-0.091637521982193,
0.0334143228828907,
0.020081844180822372,
0.09099514037370682,
-0.02110295183956623,
-0.0804782509803772,
0.06616897881031036,
0.04963267594575882,
-0.14468267560005188,
0.010255173780024052,
0.028878264129161835,
0.028599392622709274,
0.14053063094615936,
-0.008234464563429356,
-0.0054886844009160995,
-0.03349354490637779,
-0.03841063380241394,
0.01494880672544241,
-0.02707744389772415,
7.102289847894228e-33,
0.03551585227251053,
0.027940696105360985,
0.01663239672780037,
-0.02134469896554947,
0.012865202501416206,
-0.08118021488189697,
-0.03898432478308678,
0.08431264758110046,
-0.06872732192277908,
-0.11314097046852112,
0.011888348497450352,
0.06239132210612297,
-0.07193509489297867,
-0.017633767798542976,
-0.04987480491399765,
0.0017566202441230416,
-0.03843015059828758,
0.06583065539598465,
0.021559545770287514,
-0.01912781037390232,
0.011084392666816711,
-0.029128078371286392,
-0.04051118344068527,
0.01368663739413023,
0.019324975088238716,
-0.07818038761615753,
0.03276772424578667,
0.004875119309872389,
-0.06768420338630676,
0.01720784790813923,
0.05890364944934845,
0.05649881437420845,
0.002628331072628498,
-0.013696463778614998,
-0.0063333772122859955,
-0.0264775101095438,
0.02108832262456417,
-0.009653846733272076,
-0.14346742630004883,
0.002914902986958623,
0.038288816809654236,
0.05068888142704964,
-0.04262537509202957,
-0.05958306044340134,
0.05354635417461395,
-0.1370537430047989,
0.045784320682287216,
-0.03422040492296219,
0.0352962464094162,
-0.01628938317298889,
-0.0013686573365703225,
0.02469382993876934,
0.06338143348693848,
-0.07430101931095123,
-0.014323030598461628,
-0.04961875081062317,
0.034395482391119,
-0.021438036113977432,
0.043728891760110855,
-0.012640764005482197,
-0.03671906888484955,
-0.02837122045457363,
0.018789995461702347,
0.04571859538555145,
0.016934596002101898,
0.05188368633389473,
0.014880649745464325,
-0.10954578220844269,
0.015508437529206276,
0.04046015813946724,
-0.011400544084608555,
0.0257908646017313,
-0.02618882991373539,
-0.0009362822165712714,
0.038502104580402374,
-0.14000210165977478,
0.07814864814281464,
-0.01867634244263172,
-0.12069588899612427,
0.05322076007723808,
0.034375157207250595,
0.03176267072558403,
-0.034867048263549805,
-0.0059158336371183395,
-0.061381008476018906,
-0.09844335913658142,
0.06530766934156418,
-0.046436045318841934,
0.07672739028930664,
-0.08462144434452057,
0.003760670078918338,
-0.0613398551940918,
-0.08837702125310898,
-0.054252397269010544,
-0.07201626151800156,
-6.194416622503805e-33,
0.06389909237623215,
-0.048024289309978485,
0.01569449156522751,
0.017439862713217735,
-0.005414936691522598,
-0.01824270375072956,
0.05304649844765663,
0.07324528694152832,
-0.014470611698925495,
-0.033010467886924744,
0.021894993260502815,
-0.03161041811108589,
0.003884947393089533,
0.0015632844297215343,
-0.02566065639257431,
0.03786265850067139,
-0.044625937938690186,
-0.08877008408308029,
0.004193240310996771,
0.02744540572166443,
0.02587680146098137,
0.11438366770744324,
0.08589582145214081,
0.095119908452034,
0.03799426555633545,
0.0024891940411180258,
-0.10909336060285568,
0.019999708980321884,
-0.02772299200296402,
-0.030258264392614365,
0.00026130443438887596,
-0.1403777003288269,
-0.08239027112722397,
-0.008573705330491066,
-0.026227908208966255,
-0.057704851031303406,
-0.03782913461327553,
0.06672471761703491,
-0.036217838525772095,
0.0448308028280735,
0.0856027752161026,
-0.023275749757885933,
0.0012145829387009144,
0.01936446502804756,
-0.06409022957086563,
-0.035585980862379074,
0.05732042342424393,
0.010857443325221539,
-0.02880377136170864,
-0.07414361089468002,
0.026041537523269653,
0.01739640161395073,
-0.05294908583164215,
0.005722584668546915,
0.08794374763965607,
0.008217569440603256,
0.0028114481829106808,
0.011341189965605736,
-0.013564764522016048,
0.004673313815146685,
0.08060241490602493,
-0.043664515018463135,
-0.0011536605888977647,
0.031415652483701706,
0.08254671096801758,
-0.05600963160395622,
-0.06545621901750565,
-0.018469978123903275,
-0.03236875683069229,
0.001614417415112257,
-0.0424828864634037,
-0.014136875979602337,
-0.009539805352687836,
-0.035554368048906326,
0.05163745582103729,
-0.06339765340089798,
-0.023684538900852203,
-0.05017974600195885,
-0.015511846169829369,
0.10719137638807297,
-0.10687733441591263,
-0.001208424218930304,
0.07646115124225616,
0.07455134391784668,
0.016487475484609604,
-0.016670802608132362,
-0.01666157692670822,
0.10429120063781738,
0.011217083781957626,
0.06594808399677277,
-0.009551375173032284,
0.012252002023160458,
0.005621504969894886,
0.09784438461065292,
0.024209484457969666,
-5.726905172309671e-8,
-0.036671534180641174,
0.018910609185695648,
0.01695176213979721,
0.040072161704301834,
0.06988433748483658,
-0.08781155943870544,
0.05331533029675484,
0.035944707691669464,
0.0174696184694767,
0.05094384029507637,
-0.026379287242889404,
-0.0029103124979883432,
-0.0014453119365498424,
0.03151994198560715,
-0.028056029230356216,
0.004173071589320898,
-0.0027671766001731157,
0.051765166223049164,
-0.021015837788581848,
-0.053848642855882645,
-0.013417575508356094,
0.033893585205078125,
0.019002310931682587,
-0.0660833939909935,
0.06304501742124557,
0.03460528701543808,
0.03568222001194954,
0.06125245988368988,
-0.023612165823578835,
0.044005829840898514,
0.0509914830327034,
-0.06751011312007904,
0.08397483825683594,
-0.007458688225597143,
-0.04882296174764633,
0.040057066828012466,
0.002011477015912533,
0.06852926313877106,
-0.04392402991652489,
-0.009443449787795544,
0.03534333407878876,
0.006929344963282347,
-0.049339212477207184,
0.07301449775695801,
0.043468672782182693,
0.012955929152667522,
-0.03969539329409599,
0.07740887999534607,
-0.03662702068686485,
-0.03180978447198868,
-0.016687847673892975,
-0.04884224757552147,
0.04109610989689827,
0.007308961357921362,
-0.02171756699681282,
0.02968445047736168,
0.05554402992129326,
-0.050195105373859406,
0.060902487486600876,
0.018844138830900192,
0.08223748952150345,
0.038626182824373245,
0.01679571345448494,
-0.0176082793623209
] | 0.109303
|
a `color` of `blue`): ```shell kubectl get shirts.stable.example.com --field-selector spec.color=blue ``` Should output: ``` NAME COLOR SIZE example1 blue S example2 blue M ``` Get only resources with a `color` of `green` and a `size` of `M`: ```shell kubectl get shirts.stable.example.com --field-selector spec.color=green,spec.size=M ``` Should output: ``` NAME COLOR SIZE example3 green M ``` ### Subresources Custom resources support `/status` and `/scale` subresources. The status and scale subresources can be optionally enabled by defining them in the CustomResourceDefinition. #### Status subresource When the status subresource is enabled, the `/status` subresource for the custom resource is exposed. - The status and the spec stanzas are represented by the `.status` and `.spec` JSONPaths respectively inside of a custom resource. - `PUT` requests to the `/status` subresource take a custom resource object and ignore changes to anything except the status stanza. - `PUT` requests to the `/status` subresource only validate the status stanza of the custom resource. - `PUT`/`POST`/`PATCH` requests to the custom resource ignore changes to the status stanza. - The `.metadata.generation` value is incremented for all changes, except for changes to `.metadata` or `.status`. - Only the following constructs are allowed at the root of the CRD OpenAPI validation schema: - `description` - `example` - `exclusiveMaximum` - `exclusiveMinimum` - `externalDocs` - `format` - `items` - `maximum` - `maxItems` - `maxLength` - `minimum` - `minItems` - `minLength` - `multipleOf` - `pattern` - `properties` - `required` - `title` - `type` - `uniqueItems` #### Scale subresource When the scale subresource is enabled, the `/scale` subresource for the custom resource is exposed. The `autoscaling/v1.Scale` object is sent as the payload for `/scale`. To enable the scale subresource, the following fields are defined in the CustomResourceDefinition. - `specReplicasPath` defines the JSONPath inside of a custom resource that corresponds to `scale.spec.replicas`. - It is a required value. - Only JSONPaths under `.spec` and with the dot notation are allowed. - If there is no value under the `specReplicasPath` in the custom resource, the `/scale` subresource will return an error on GET. - `statusReplicasPath` defines the JSONPath inside of a custom resource that corresponds to `scale.status.replicas`. - It is a required value. - Only JSONPaths under `.status` and with the dot notation are allowed. - If there is no value under the `statusReplicasPath` in the custom resource, the status replica value in the `/scale` subresource will default to 0. - `labelSelectorPath` defines the JSONPath inside of a custom resource that corresponds to `Scale.Status.Selector`. - It is an optional value. - It must be set to work with HPA and VPA. - Only JSONPaths under `.status` or `.spec` and with the dot notation are allowed. - If there is no value under the `labelSelectorPath` in the custom resource, the status selector value in the `/scale` subresource will default to the empty string. - The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. In the following example, both status and scale subresources are enabled. Save the CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com versions: - name: v1 served: true storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string image: type: string replicas: type: integer status: type: object properties: replicas: type: integer labelSelector: type: string # subresources describes the subresources for custom resources. subresources: # status enables the status subresource. status: {} # scale enables the scale subresource. scale: # specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas. specReplicasPath: .spec.replicas # statusReplicasPath defines the JSONPath inside of
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.007283746264874935,
0.07394543290138245,
-0.02668697200715542,
0.04429296776652336,
0.020220700651407242,
0.006595316343009472,
0.02705688215792179,
0.025984318926930428,
0.018845301121473312,
-0.008832219056785107,
-0.00837252102792263,
-0.109954833984375,
0.03724338859319687,
-0.02886871248483658,
0.05906040593981743,
0.030483361333608627,
0.042294517159461975,
0.0025724824517965317,
-0.11750385165214539,
-0.08460704982280731,
0.05041586607694626,
-0.007781907916069031,
0.06725440919399261,
-0.09405823796987534,
-0.08365319669246674,
-0.04954385757446289,
-0.04654219374060631,
-0.0069238124415278435,
0.019188379868865013,
-0.07315905392169952,
-0.021501213312149048,
0.03907804936170578,
-0.006569587625563145,
0.009827591478824615,
0.11579803377389908,
0.061754196882247925,
0.04594960808753967,
-0.08919806778430939,
-0.04767980799078941,
0.0407901331782341,
0.03900080546736717,
0.00017246094648726285,
-0.06503436714410782,
-0.05157771334052086,
-0.027809621766209602,
-0.026912644505500793,
-0.034751661121845245,
-0.03496091067790985,
-0.062002796679735184,
-0.029460133984684944,
0.029446614906191826,
-0.05421186611056328,
-0.016130726784467697,
0.037854067981243134,
0.06276622414588928,
0.05348338559269905,
-0.0400005541741848,
0.04364374279975891,
0.05482342094182968,
0.0045969015918672085,
0.03714694455265999,
-0.03725156560540199,
-0.020214516669511795,
-0.03706203028559685,
0.03374483063817024,
0.00670540751889348,
-0.014017876237630844,
0.04549042880535126,
-0.01763380877673626,
-0.03763876482844353,
0.01515002641826868,
-0.02398936077952385,
0.03022725135087967,
0.030869681388139725,
0.03761371970176697,
0.03230881690979004,
-0.012641952373087406,
0.06642112880945206,
-0.04266529902815819,
-0.1597302258014679,
-0.07853091508150101,
0.0031357433181256056,
0.014345129951834679,
0.026331361383199692,
0.028144586831331253,
0.07110045105218887,
-0.03012031689286232,
-0.023647012189030647,
0.027577577158808708,
0.01677064038813114,
0.012376383878290653,
-0.07428005337715149,
-0.050943031907081604,
-0.034310825169086456,
-0.006388577166944742,
0.04406903684139252,
-0.021148711442947388,
-0.022205621004104614,
0.023072833195328712,
-0.0052623869851231575,
0.027573537081480026,
-0.021445974707603455,
0.1248459592461586,
0.01370219886302948,
0.0019923655781894922,
-0.046458445489406586,
-0.099784255027771,
0.1442074030637741,
0.019800478592514992,
0.04814765974879265,
0.01145288534462452,
0.04190506413578987,
-0.07284992188215256,
-0.0009323765989392996,
0.05203748494386673,
0.05860316380858421,
0.07666145265102386,
-0.001402040827088058,
0.003382178023457527,
0.041187137365341187,
0.1459071785211563,
-0.045199837535619736,
0.01699211075901985,
-0.015668783336877823,
-0.04315496236085892,
-0.004762922413647175,
-0.03543306142091751,
2.968280825537683e-33,
0.08859565109014511,
-0.05346013978123665,
0.051830533891916275,
-0.025536149740219116,
-0.015643015503883362,
-0.09032151103019714,
-0.035240836441516876,
-0.014806159771978855,
-0.0734805166721344,
-0.02468564547598362,
-0.029344843700528145,
0.12811502814292908,
-0.07285632193088531,
0.0034939327742904425,
-0.016902999952435493,
-0.01486161258071661,
0.024537744000554085,
0.006204445846378803,
0.04767235368490219,
-0.007400307804346085,
0.021160239353775978,
-0.002534723374992609,
-0.030708078294992447,
0.04545114189386368,
0.03381285443902016,
-0.05398807302117348,
0.033357031643390656,
-0.005845464300364256,
-0.0918830931186676,
-0.008730895817279816,
0.05301870405673981,
-0.02741868793964386,
0.013713120482861996,
0.02107502706348896,
-0.072600819170475,
-0.04791921004652977,
-0.02121620811522007,
0.0521073155105114,
-0.08585478365421295,
-0.009162132628262043,
-0.0033946363255381584,
0.021784551441669464,
-0.016540151089429855,
-0.0074085392989218235,
0.01693863980472088,
-0.07985000312328339,
0.033927518874406815,
-0.08001558482646942,
0.009984336793422699,
0.01604444906115532,
0.0008983166189864278,
0.02432698756456375,
0.07154698669910431,
-0.07300686091184616,
0.07607506215572357,
-0.005644218530505896,
0.05685267969965935,
0.029869800433516502,
0.003064921125769615,
-0.0372169204056263,
0.001358350389637053,
0.026719452813267708,
-0.021091662347316742,
0.04344956949353218,
0.03311485797166824,
0.042828503996133804,
-0.03915299102663994,
-0.011289815418422222,
-0.0732382982969284,
-0.02318522147834301,
-0.03288331255316734,
0.09102800488471985,
0.08862375468015671,
-0.0018557936418801546,
0.0051057846285402775,
-0.09660673886537552,
0.007143247872591019,
0.0006186504615470767,
-0.13483108580112457,
0.012478070333600044,
-0.0036181220784783363,
0.013041173107922077,
-0.05684380978345871,
0.04556947946548462,
-0.058791134506464005,
0.021747037768363953,
0.022678878158330917,
-0.026759406551718712,
0.01722707599401474,
-0.06334798038005829,
-0.012371974065899849,
0.004041299223899841,
-0.10533419251441956,
-0.10340818762779236,
-0.09125753492116928,
-4.28355174024831e-33,
0.1259060502052307,
0.017556024715304375,
-0.018508702516555786,
0.03857814520597458,
0.03852427378296852,
-0.04661743342876434,
0.02852502465248108,
0.0731930062174797,
-0.008374879136681557,
-0.02963283285498619,
-0.014440438710153103,
0.019161444157361984,
-0.06015874817967415,
-0.008130394853651524,
-0.04226326942443848,
0.06253919750452042,
-0.08418438583612442,
-0.004056282341480255,
0.016075139865279198,
0.026769855991005898,
-0.10896239429712296,
0.06515709310770035,
0.0707189291715622,
0.04038124531507492,
-0.07539259642362595,
0.010000851936638355,
-0.02993183396756649,
-0.030904430896043777,
-0.10651171952486038,
-0.024109022691845894,
0.015033550560474396,
-0.07539994269609451,
-0.08755064010620117,
0.045402854681015015,
0.01919598877429962,
-0.11062341183423996,
-0.07617739588022232,
0.05454680696129799,
-0.022024407982826233,
0.10144422948360443,
0.0038711633533239365,
-0.009468773379921913,
-0.017501814290881157,
0.0037993674632161856,
-0.07787588983774185,
-0.05961471050977707,
0.07398815453052521,
-0.0678931400179863,
-0.039536524564027786,
-0.14264227449893951,
0.081515833735466,
0.016565050929784775,
-0.03742670267820358,
0.03347859904170036,
0.016170689836144447,
0.03260260820388794,
0.03375865891575813,
0.06664472073316574,
-0.07032418996095657,
0.006187297869473696,
0.028261153027415276,
-0.06622669845819473,
-0.009573324583470821,
-0.00995284877717495,
0.002446654951199889,
-0.021112971007823944,
-0.03818916901946068,
-0.030505385249853134,
0.012424908578395844,
-0.019188066944479942,
-0.018079277127981186,
-0.07152482122182846,
0.08937844634056091,
0.015903763473033905,
0.014346427284181118,
-0.05070001259446144,
0.013212275691330433,
-0.0057519287802278996,
0.05635354295372963,
0.1371285319328308,
-0.0779237225651741,
0.04015786573290825,
-0.021179962903261185,
0.017943907529115677,
0.0788441076874733,
0.045952972024679184,
-0.03844402730464935,
0.11392073333263397,
0.0424952358007431,
-0.00008408487337874249,
-0.0028807183261960745,
0.04554354399442673,
0.03501780703663826,
0.11633964627981186,
-0.02044559083878994,
-5.007553127711617e-8,
0.007564551662653685,
-0.04000883176922798,
-0.03748580068349838,
0.06400195509195328,
0.006681809201836586,
0.013504301197826862,
0.02836747094988823,
-0.0020772446878254414,
0.020712094381451607,
0.06219818815588951,
-0.051315441727638245,
0.014207292348146439,
-0.0669948011636734,
0.029261521995067596,
-0.007091328967362642,
-0.041662003844976425,
0.026712654158473015,
0.06427857279777527,
-0.04130974039435387,
-0.045852046459913254,
-0.06065863370895386,
0.002721252152696252,
-0.013231548480689526,
0.016481539234519005,
0.0882948562502861,
0.04298824071884155,
0.0016660456312820315,
-0.0004366295179352164,
-0.018661417067050934,
0.06367722898721695,
0.03220576420426369,
-0.004790490958839655,
-0.023541992530226707,
0.0467967726290226,
0.024263717234134674,
-0.029940225183963776,
-0.08579308539628983,
0.11189398169517517,
0.034219589084386826,
0.07923293113708496,
-0.006248372606933117,
0.0005479116807691753,
-0.08160139620304108,
0.07448942214250565,
0.0719277560710907,
-0.019481375813484192,
-0.0349990539252758,
0.08605193346738815,
-0.030307335779070854,
-0.004789278842508793,
-0.0370478481054306,
-0.09050779789686203,
-0.027211008593440056,
0.046936847269535065,
-0.06687823683023453,
0.006837387103587389,
0.02300047129392624,
0.037448011338710785,
0.011746849864721298,
0.044410910457372665,
0.025809263810515404,
-0.032979726791381836,
-0.049839287996292114,
-0.005742434877902269
] | 0.114472
|
labelSelector: type: string # subresources describes the subresources for custom resources. subresources: # status enables the status subresource. status: {} # scale enables the scale subresource. scale: # specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas. specReplicasPath: .spec.replicas # statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas. statusReplicasPath: .status.replicas # labelSelectorPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Selector. labelSelectorPath: .status.labelSelector scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct ``` And create it: ```shell kubectl apply -f resourcedefinition.yaml ``` After the CustomResourceDefinition object has been created, you can create custom objects. If you save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \* \*/5" image: my-awesome-cron-image replicas: 3 ``` and create it: ```shell kubectl apply -f my-crontab.yaml ``` Then new namespaced RESTful API endpoints are created at: ```none /apis/stable.example.com/v1/namespaces/\*/crontabs/status ``` and ```none /apis/stable.example.com/v1/namespaces/\*/crontabs/scale ``` A custom resource can be scaled using the `kubectl scale` command. For example, the following command sets `.spec.replicas` of the custom resource created above to 5: ```shell kubectl scale --replicas=5 crontabs/my-new-cron-object crontabs "my-new-cron-object" scaled kubectl get crontabs my-new-cron-object -o jsonpath='{.spec.replicas}' 5 ``` You can use a [PodDisruptionBudget](/docs/tasks/run-application/configure-pdb/) to protect custom resources that have the scale subresource enabled. ### Categories Categories is a list of grouped resources the custom resource belongs to (eg. `all`). You can use `kubectl get ` to list the resources belonging to the category. The following example adds `all` in the list of categories in the CustomResourceDefinition and illustrates how to output the custom resource using `kubectl get all`. Save the following CustomResourceDefinition to `resourcedefinition.yaml`: ```yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: crontabs.stable.example.com spec: group: stable.example.com versions: - name: v1 served: true storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: cronSpec: type: string image: type: string replicas: type: integer scope: Namespaced names: plural: crontabs singular: crontab kind: CronTab shortNames: - ct # categories is a list of grouped resources the custom resource belongs to. categories: - all ``` and create it: ```shell kubectl apply -f resourcedefinition.yaml ``` After the CustomResourceDefinition object has been created, you can create custom objects. Save the following YAML to `my-crontab.yaml`: ```yaml apiVersion: "stable.example.com/v1" kind: CronTab metadata: name: my-new-cron-object spec: cronSpec: "\* \* \* \* \*/5" image: my-awesome-cron-image ``` and create it: ```shell kubectl apply -f my-crontab.yaml ``` You can specify the category when using `kubectl get`: ```shell kubectl get all ``` and it will include the custom resources of kind `CronTab`: ```none NAME AGE crontabs/my-new-cron-object 3s ``` ## {{% heading "whatsnext" %}} \* Read about [custom resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/). \* See [CustomResourceDefinition](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#customresourcedefinition-v1-apiextensions-k8s-io). \* Serve [multiple versions](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/) of a CustomResourceDefinition.
| null |
./vendor/kubernetes/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md
|
[
-0.04600369185209274,
0.015657803043723106,
-0.04335582256317139,
0.027560006827116013,
-0.062361620366573334,
0.026754964143037796,
0.007679299917072058,
0.03357888013124466,
0.02141195721924305,
-0.011447558179497719,
0.017160683870315552,
-0.11095597594976425,
-0.0301967803388834,
0.018026379868388176,
0.07892303913831711,
-0.023727968335151672,
0.08471155166625977,
0.008208924904465675,
-0.06807662546634674,
-0.013172484003007412,
0.09361952543258667,
-0.01050856988877058,
0.050135351717472076,
-0.017245689406991005,
-0.04500391706824303,
-0.03675776347517967,
0.0010365754133090377,
0.006351536139845848,
0.08733195066452026,
-0.024677716195583344,
0.011257040314376354,
0.027536295354366302,
0.0043285926803946495,
0.017923763021826744,
0.1506006121635437,
0.11750271171331406,
0.027177628129720688,
-0.0757141187787056,
-0.02052251622080803,
-0.015352485701441765,
0.0934668779373169,
0.023031586781144142,
-0.050344694405794144,
-0.0061325253918766975,
-0.038299623876810074,
-0.038720130920410156,
0.0001244478189619258,
-0.06306897848844528,
-0.06755225360393524,
0.017452601343393326,
0.021881267428398132,
-0.11168673634529114,
-0.013550898060202599,
0.03694336116313934,
0.04326147958636284,
0.08209700137376785,
-0.027421222999691963,
-0.019919579848647118,
0.08209293335676193,
0.03557657077908516,
0.034838784486055374,
-0.011024126783013344,
0.02172333002090454,
-0.06642820686101913,
0.005378483794629574,
-0.004054111894220114,
-0.03589203581213951,
-0.012537653557956219,
0.003466318128630519,
-0.025934910401701927,
0.026054933667182922,
-0.03768065571784973,
0.043794140219688416,
0.017193811014294624,
0.03553200513124466,
0.018575405701994896,
-0.05549030005931854,
0.014606167562305927,
-0.01808481477200985,
-0.10055821388959885,
-0.08078263700008392,
0.032707326114177704,
0.049478061497211456,
0.018758730962872505,
-0.009405305609107018,
0.04113747179508209,
0.0619022361934185,
-0.02902495302259922,
0.026816368103027344,
0.022159915417432785,
0.006371281109750271,
-0.06003820523619652,
-0.05823928490281105,
-0.08853963017463684,
-0.04207694157958031,
0.017121145501732826,
-0.06394412368535995,
0.01039822306483984,
0.04625707492232323,
-0.012085840106010437,
0.053952112793922424,
0.041999753564596176,
0.07798684388399124,
0.025672385469079018,
0.04339984431862831,
0.013188116252422333,
-0.09280645102262497,
0.04909934476017952,
-0.002344525884836912,
0.08212283998727798,
-0.01696866750717163,
0.06677516549825668,
-0.04551376402378082,
-0.01930234022438526,
0.060191553086042404,
0.02382698655128479,
-0.0465247705578804,
-0.0027996059507131577,
0.01885051093995571,
0.02308765798807144,
0.07829909771680832,
-0.06438496708869934,
0.00005874767157365568,
-0.028061145916581154,
-0.030380867421627045,
0.0525469034910202,
-0.11062604188919067,
6.416131020116212e-33,
0.0775056704878807,
-0.0018356235232204199,
0.033072344958782196,
-0.03192693740129471,
0.007152520585805178,
-0.09847387671470642,
-0.07320725917816162,
0.043832309544086456,
-0.05921419337391853,
-0.08374533802270889,
-0.02866879664361477,
0.11256884038448334,
-0.04110065475106239,
-0.0019923970103263855,
-0.04757918044924736,
-0.04578383266925812,
-0.06428694725036621,
0.0633113831281662,
0.01535133644938469,
-0.03369712084531784,
-0.0016694972291588783,
-0.02587013505399227,
-0.00852967333048582,
-0.015177996829152107,
-0.00539205688983202,
-0.04556867852807045,
-0.008758432231843472,
-0.0063690245151519775,
-0.08317148685455322,
0.004158057272434235,
0.015680037438869476,
-0.022961441427469254,
0.05353279411792755,
0.02849511243402958,
-0.04478327929973602,
-0.04336392134428024,
0.047191232442855835,
0.010887540876865387,
-0.13867659866809845,
-0.012045901268720627,
0.015401159413158894,
0.02555469423532486,
-0.04372546076774597,
-0.07278218865394592,
0.021491259336471558,
-0.08120718598365784,
0.0765315443277359,
-0.08600156754255295,
0.020199334248900414,
-0.05561598017811775,
0.003844402963295579,
-0.028208740055561066,
0.04526573047041893,
-0.09735453873872757,
0.01774488389492035,
0.018882030621170998,
0.06888521462678909,
0.010712694376707077,
0.04673384130001068,
-0.0413961261510849,
-0.0365617610514164,
0.013025385327637196,
-0.013817907311022282,
0.09472285956144333,
0.08122967183589935,
0.06966622918844223,
-0.016801323741674423,
-0.0406271331012249,
-0.02802419662475586,
0.004052576143294573,
0.0004913269658572972,
0.0805496871471405,
-0.030542530119419098,
-0.01461106538772583,
0.05813969671726227,
-0.10250553488731384,
0.003938950132578611,
-0.014232398942112923,
-0.1765240728855133,
0.07952611893415451,
-0.024567779153585434,
0.014480555430054665,
-0.034650903195142746,
0.05073927715420723,
-0.027018079534173012,
-0.0523931160569191,
0.02268996275961399,
-0.08726101368665695,
0.05117407813668251,
-0.0374741405248642,
-0.013086391612887383,
-0.037724819034338,
-0.11302068829536438,
-0.06355995684862137,
-0.08003928512334824,
-6.338666677080992e-33,
0.07135244458913803,
-0.026398073881864548,
0.02338511124253273,
0.033569980412721634,
0.005110763944685459,
-0.02714873105287552,
0.02445715293288231,
0.1290726214647293,
-0.032105326652526855,
-0.070353202521801,
-0.03815440461039543,
-0.04929197207093239,
-0.003636592300608754,
-0.021164067089557648,
-0.03947649896144867,
0.0057724821381270885,
-0.08677326887845993,
-0.041473232209682465,
0.007214222103357315,
0.020499682053923607,
0.028754685074090958,
0.08414005488157272,
0.043628036975860596,
0.048554666340351105,
0.01424784492701292,
-0.021026169881224632,
-0.05399872362613678,
-0.013844717293977737,
-0.006583796814084053,
-0.04661500081419945,
-0.007337274495512247,
-0.07065355777740479,
-0.026303661987185478,
-0.043106768280267715,
-0.006136124953627586,
-0.05687170848250389,
-0.06417687982320786,
0.010608523152768612,
-0.028293436393141747,
0.0038120646495372057,
0.031756315380334854,
-0.0076891956850886345,
-0.03426715359091759,
0.009457604959607124,
-0.059236906468868256,
-0.06868217885494232,
0.07747357338666916,
-0.01048812735825777,
-0.03950274735689163,
-0.10274796932935715,
0.02486417256295681,
0.005948503501713276,
-0.06237379461526871,
0.023321345448493958,
-0.003381178015843034,
0.048552267253398895,
0.005156133323907852,
0.03477117419242859,
-0.039284877479076385,
0.0005855732597410679,
0.026477262377738953,
-0.0818457156419754,
0.03292672336101532,
-0.02110956236720085,
0.05500027537345886,
-0.03499661013484001,
0.0024604725185781717,
-0.03058304637670517,
-0.004637850448489189,
0.017302775755524635,
-0.026162872090935707,
0.0061874957755208015,
0.01062444131821394,
0.0058506387285888195,
0.00867861695587635,
-0.05838099867105484,
-0.016689710319042206,
-0.041220471262931824,
0.03209873288869858,
0.10701775550842285,
-0.03642166778445244,
0.05909481644630432,
-0.02120891772210598,
0.09361641108989716,
0.13225188851356506,
-0.010782964527606964,
-0.020709136500954628,
0.12287856638431549,
0.013007029891014099,
0.08700676262378693,
0.004349426832050085,
0.05247758328914642,
0.011494282633066177,
0.15576229989528656,
-0.06918299943208694,
-4.827071009572137e-8,
-0.0675603523850441,
0.036991722881793976,
-0.029446009546518326,
0.09910707175731659,
-0.0021313661709427834,
-0.015739670023322105,
0.03975042328238487,
-0.004923151805996895,
-0.004634329583495855,
0.07026227563619614,
-0.039201803505420685,
0.007145056501030922,
-0.055735763162374496,
0.07873034477233887,
-0.010377499274909496,
-0.015041390433907509,
0.04346780106425285,
0.05413233861327171,
0.009475489147007465,
-0.029609760269522667,
-0.04866208881139755,
0.024117758497595787,
0.017423592507839203,
0.0013803477631881833,
0.052755530923604965,
0.06856357306241989,
0.014742358587682247,
0.028244754299521446,
-0.00881157349795103,
0.05101124569773674,
0.027191130444407463,
0.009581498801708221,
-0.012689098715782166,
0.12724316120147705,
-0.048789311200380325,
0.017409060150384903,
-0.08710891008377075,
0.0803229808807373,
0.05675416812300682,
0.010193051770329475,
0.06802321970462799,
0.006086908280849457,
-0.10837291926145554,
0.07107999175786972,
0.054709292948246,
0.0823836624622345,
-0.0917661264538765,
0.07257947325706482,
-0.03372742608189583,
0.007915133610367775,
-0.043431736528873444,
-0.05769619345664978,
0.012030957266688347,
0.027641069144010544,
-0.0070641906931996346,
0.04806803911924362,
0.07428886741399765,
-0.02822776511311531,
-0.0005311983404681087,
0.023216521367430687,
0.08133812248706818,
0.014733782969415188,
0.002800930058583617,
-0.034354738891124725
] | 0.150406
|
This page shows how to run automated tasks using Kubernetes {{< glossary\_tooltip text="CronJob" term\_id="cronjob" >}} object. ## {{% heading "prerequisites" %}} \* {{< include "task-tutorial-prereqs.md" >}} ## Creating a CronJob {#creating-a-cron-job} Cron jobs require a config file. Here is a manifest for a CronJob that runs a simple demonstration task every minute: {{% code\_sample file="application/job/cronjob.yaml" %}} Run the example CronJob by using this command: ```shell kubectl create -f https://k8s.io/examples/application/job/cronjob.yaml ``` The output is similar to this: ``` cronjob.batch/hello created ``` After creating the cron job, get its status using this command: ```shell kubectl get cronjob hello ``` The output is similar to this: ``` NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE hello \*/1 \* \* \* \* False 0 10s ``` As you can see from the results of the command, the cron job has not scheduled or run any jobs yet. {{< glossary\_tooltip text="Watch" term\_id="watch" >}} for the job to be created in around one minute: ```shell kubectl get jobs --watch ``` The output is similar to this: ``` NAME COMPLETIONS DURATION AGE hello-4111706356 0/1 0s hello-4111706356 0/1 0s 0s hello-4111706356 1/1 5s 5s ``` Now you've seen one running job scheduled by the "hello" cron job. You can stop watching the job and view the cron job again to see that it scheduled the job: ```shell kubectl get cronjob hello ``` The output is similar to this: ``` NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE hello \*/1 \* \* \* \* False 0 50s 75s ``` You should see that the cron job `hello` successfully scheduled a job at the time specified in `LAST SCHEDULE`. There are currently 0 active jobs, meaning that the job has completed or failed. Now, find the pods that the last scheduled job created and view the standard output of one of the pods. {{< note >}} The job name is different from the pod name. {{< /note >}} ```shell # Replace "hello-4111706356" with the job name in your system pods=$(kubectl get pods --selector=job-name=hello-4111706356 --output=jsonpath={.items[\*].metadata.name}) ``` Show the pod log: ```shell kubectl logs $pods ``` The output is similar to this: ``` Fri Feb 22 11:02:09 UTC 2019 Hello from the Kubernetes cluster ``` ## Deleting a CronJob {#deleting-a-cron-job} When you don't need a cron job any more, delete it with `kubectl delete cronjob `: ```shell kubectl delete cronjob hello ``` Deleting the cron job removes all the jobs and pods it created and stops it from creating additional jobs. You can read more about removing jobs in [garbage collection](/docs/concepts/architecture/garbage-collection/).
| null |
./vendor/kubernetes/content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/automated-tasks-with-cron-jobs.md
|
[
-0.07088340818881989,
0.011758101172745228,
0.029030900448560715,
-0.03789720684289932,
-0.08187806606292725,
-0.0007017036550678313,
0.004928357899188995,
0.0006523823831230402,
0.015590683557093143,
0.06235862895846367,
-0.021883845329284668,
-0.129948690533638,
-0.013528560288250446,
0.009499337524175644,
-0.012710233218967915,
0.003981171175837517,
0.06939248740673065,
-0.10985293239355087,
-0.03996386379003525,
-0.11862306296825409,
0.0033343906980007887,
0.05771694704890251,
0.06034747511148453,
0.03944632038474083,
-0.06605543196201324,
-0.039835646748542786,
0.013900252059102058,
-0.03818671032786369,
0.009325956925749779,
0.07257410883903503,
-0.014688564464449883,
-0.04254719242453575,
0.00876822043210268,
0.08761470019817352,
0.1098579615354538,
0.120904840528965,
0.03358236327767372,
-0.030080951750278473,
-0.04581321030855179,
0.026836998760700226,
0.04065299406647682,
0.00045210766256786883,
-0.1183730885386467,
-0.036712486296892166,
0.05359360948204994,
-0.019392775371670723,
-0.06332840770483017,
-0.037432800978422165,
0.013113975524902344,
0.001855809474363923,
-0.00591563293710351,
-0.1520891636610031,
0.03292674571275711,
0.02918410673737526,
0.08912261575460434,
0.10568815469741821,
-0.03516235947608948,
0.02219717763364315,
0.1272546947002411,
-0.0361606739461422,
-0.024426471441984177,
-0.018474500626325607,
0.0065161981619894505,
-0.04708098992705345,
0.005133311729878187,
-0.014755756594240665,
-0.040224626660346985,
-0.007818026468157768,
0.019772252067923546,
-0.009305077604949474,
-0.011180817149579525,
0.01205676794052124,
-0.043192896991968155,
-0.05052027478814125,
-0.05935538187623024,
-0.0017573402728885412,
-0.06779564917087555,
0.029648277908563614,
-0.08642929047346115,
-0.08759159594774246,
-0.04686681181192398,
0.0032878494821488857,
0.06387069076299667,
0.03208005055785179,
-0.04572305828332901,
-0.017965571954846382,
0.031292688101530075,
-0.018162712454795837,
0.0854838564991951,
-0.026441076770424843,
0.010678590275347233,
-0.07474526762962341,
-0.028855876997113228,
-0.1495235562324524,
0.019471634179353714,
0.046478696167469025,
-0.020490923896431923,
0.049605317413806915,
0.00025535226450301707,
-0.034449703991413116,
0.03482603281736374,
-0.004456120543181896,
0.027291420847177505,
-0.030182020738720894,
0.04886288940906525,
0.052583176642656326,
-0.06410380452871323,
0.012779973447322845,
0.013191997073590755,
0.013052958995103836,
-0.0486946664750576,
0.08489274978637695,
0.030442357063293457,
0.01581415720283985,
0.05039563402533531,
-0.04057613015174866,
0.008783639408648014,
0.05370244383811951,
0.06258688122034073,
0.10365566611289978,
0.06035725027322769,
-0.0486932098865509,
-0.03890784829854965,
-0.0263246838003397,
-0.012825882993638515,
0.04721999540925026,
0.026695333421230316,
6.821941057378836e-33,
0.05118769034743309,
-0.05501044541597366,
0.03921402618288994,
-0.01354511920362711,
0.0034675407223403454,
-0.10566206276416779,
-0.03529827296733856,
0.031646039336919785,
-0.04424609616398811,
-0.049457356333732605,
-0.06825219094753265,
0.06993188709020615,
-0.012037842534482479,
-0.04225980117917061,
-0.07321614772081375,
0.009769218042492867,
-0.05486895889043808,
-0.018244115635752678,
0.037711165845394135,
0.009236427955329418,
0.03972659632563591,
-0.05087653547525406,
-0.0252027940005064,
0.004306155722588301,
0.009543954394757748,
-0.055681534111499786,
0.08735958486795425,
-0.004299076274037361,
-0.03468432277441025,
0.004279370419681072,
0.004518528468906879,
0.00019295528181828558,
-0.005134039558470249,
0.009715162217617035,
-0.17852112650871277,
-0.014899620786309242,
0.004651191178709269,
0.020166127011179924,
-0.045336294919252396,
-0.02456614561378956,
0.04741133004426956,
-0.04238516464829445,
-0.02813713066279888,
-0.06716707348823547,
0.04764008894562721,
-0.06756916642189026,
0.006703601218760014,
-0.06732385605573654,
0.12149839848279953,
0.0477600134909153,
0.02626880444586277,
-0.02867623046040535,
0.0633949264883995,
-0.06382566690444946,
0.030446739867329597,
0.08790997415781021,
0.10757963359355927,
-0.07626572251319885,
0.009359913878142834,
-0.03617539629340172,
-0.033540964126586914,
0.011880043894052505,
-0.05718635022640228,
0.055648814886808395,
0.019673043861985207,
-0.04639299213886261,
0.009967050515115261,
0.004271690268069506,
0.005387275014072657,
0.0012527391081675887,
-0.020982276648283005,
0.017982318997383118,
-0.04727516323328018,
-0.012850286439061165,
0.09829941391944885,
-0.06533944606781006,
0.03347759321331978,
-0.04176141321659088,
-0.1577024757862091,
0.07083021849393845,
0.07133467495441437,
-0.07158150523900986,
-0.032871171832084656,
0.004250149242579937,
0.07376366853713989,
-0.029750660061836243,
0.008216078393161297,
0.0007447001407854259,
-0.000697650364600122,
0.011536461301147938,
0.0017693758709356189,
-0.06345410645008087,
-0.10211985558271408,
0.08497970551252365,
-0.05054985359311104,
-7.102037851292771e-33,
0.14908213913440704,
-0.013569321483373642,
-0.015591587871313095,
0.04157062992453575,
0.04143352806568146,
0.05641050264239311,
0.04564607888460159,
0.008460246957838535,
-0.03128715977072716,
-0.08143192529678345,
-0.04237498342990875,
-0.024899642914533615,
-0.016493868082761765,
0.06563486903905869,
-0.010491319000720978,
0.011472339741885662,
-0.06563661247491837,
0.021807311102747917,
-0.017081182450056076,
0.04301552101969719,
0.004759347531944513,
0.05374201014637947,
0.03829565644264221,
0.04539545252919197,
0.00257325591519475,
-0.01951037347316742,
0.04412456601858139,
0.06487724930047989,
-0.06413924694061279,
-0.015071953646838665,
0.01209214422851801,
-0.06692301481962204,
-0.01771542616188526,
0.06218726560473442,
-0.026500161737203598,
-0.08545616269111633,
-0.009425788186490536,
0.013109885156154633,
-0.00290206097997725,
0.06424545496702194,
0.11766000837087631,
0.035903479903936386,
-0.05978311970829964,
-0.052835460752248764,
-0.08668714016675949,
0.07818857580423355,
0.038566578179597855,
-0.015606324188411236,
-0.07331967353820801,
-0.08997635543346405,
0.010550846345722675,
0.01161808893084526,
-0.06599602848291397,
0.05956539511680603,
0.006366903427988291,
0.03558987006545067,
-0.00018692402227316052,
-0.03799394518136978,
-0.0553969107568264,
0.03408961743116379,
0.0017002623062580824,
-0.05313496291637421,
0.11740303039550781,
0.011991155333817005,
0.03568277135491371,
-0.02910500206053257,
-0.03698480874300003,
0.05532171577215195,
0.0011218285653740168,
-0.020723098888993263,
-0.04396553337574005,
0.0029266804922372103,
0.008172468282282352,
-0.0016886411467567086,
0.006539438851177692,
0.025037093088030815,
-0.054258931428194046,
-0.06188632920384407,
-0.011199567466974258,
0.05501646548509598,
0.017603319138288498,
0.008593986742198467,
-0.023207833990454674,
0.011723941192030907,
-0.033756036311388016,
0.036692868918180466,
0.0002528229379095137,
0.09160282462835312,
0.04205170273780823,
0.0420156829059124,
0.05166051164269447,
0.0004008751129731536,
0.03519294783473015,
0.14509572088718414,
0.008693810552358627,
-5.7944504305851297e-8,
0.0236212108284235,
0.06264615058898926,
0.012527595274150372,
0.02886069379746914,
0.016819117590785027,
-0.02737726829946041,
0.029407553374767303,
-0.024221692234277725,
-0.029760906472802162,
-0.028784118592739105,
-0.08679062873125076,
-0.038694217801094055,
-0.03599035367369652,
0.10826964676380157,
-0.03212619572877884,
0.009242302738130093,
0.012686127796769142,
0.008675520308315754,
0.0737827867269516,
-0.03774419054389,
0.025766894221305847,
-0.014217125251889229,
0.05530543997883797,
0.05133664235472679,
0.009046646766364574,
0.09032735973596573,
0.01653679646551609,
0.0536140501499176,
-0.05426574498414993,
0.031065775081515312,
-0.02372303605079651,
-0.014763925224542618,
-0.06857841461896896,
0.07172057777643204,
-0.02732802741229534,
0.02004111558198929,
-0.05137423053383827,
0.007325319107621908,
0.04941756650805473,
-0.025916043668985367,
0.006561779882758856,
0.047609347850084305,
-0.0795639231801033,
-0.039633434265851974,
-0.006001301575452089,
0.04736330732703209,
-0.011056827381253242,
0.020938599482178688,
-0.017375104129314423,
-0.05153036490082741,
-0.008543043397367,
-0.0513564832508564,
0.009280289523303509,
0.0569867342710495,
-0.019724536687135696,
0.005562968552112579,
0.07935436069965363,
-0.11484628170728683,
0.01204428169876337,
-0.002531830221414566,
0.034552931785583496,
0.025913437828421593,
-0.002278692089021206,
0.004020731430500746
] | 0.090116
|
{{< feature-state feature\_gate\_name="JobPodFailurePolicy" >}} This document shows you how to use the [Pod failure policy](/docs/concepts/workloads/controllers/job#pod-failure-policy), in combination with the default [Pod backoff failure policy](/docs/concepts/workloads/controllers/job#pod-backoff-failure-policy), to improve the control over the handling of container- or Pod-level failure within a {{}}. The definition of Pod failure policy may help you to: \* better utilize the computational resources by avoiding unnecessary Pod retries. \* avoid Job failures due to Pod disruptions (such {{}}, {{}} or {{}}-based eviction). ## {{% heading "prerequisites" %}} You should already be familiar with the basic use of [Job](/docs/concepts/workloads/controllers/job/). {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Usage scenarios Consider the following usage scenarios for Jobs that define a Pod failure policy : - [Avoiding unnecessary Pod retries](#pod-failure-policy-failjob) - [Ignoring Pod disruptions](#pod-failure-policy-ignore) - [Avoiding unnecessary Pod retries based on custom Pod Conditions](#pod-failure-policy-config-issue) - [Avoiding unnecessary Pod retries per index](#backoff-limit-per-index-failindex) ### Using Pod failure policy to avoid unnecessary Pod retries {#pod-failure-policy-failjob} With the following example, you can learn how to use Pod failure policy to avoid unnecessary Pod restarts when a Pod failure indicates a non-retriable software bug. 1. Examine the following manifest: {{% code\_sample file="/controllers/job-pod-failure-policy-failjob.yaml" %}} 1. Apply the manifest: ```sh kubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-failjob.yaml ``` 1. After around 30 seconds the entire Job should be terminated. Inspect the status of the Job by running: ```sh kubectl get jobs -l job-name=job-pod-failure-policy-failjob -o yaml ``` In the Job status, the following conditions display: - `FailureTarget` condition: has a `reason` field set to `PodFailurePolicy` and a `message` field with more information about the termination, like `Container main for pod default/job-pod-failure-policy-failjob-8ckj8 failed with exit code 42 matching FailJob rule at index 0`. The Job controller adds this condition as soon as the Job is considered a failure. For details, see [Termination of Job Pods](/docs/concepts/workloads/controllers/job/#termination-of-job-pods). - `Failed` condition: same `reason` and `message` as the `FailureTarget` condition. The Job controller adds this condition after all of the Job's Pods are terminated. For comparison, if the Pod failure policy was disabled it would take 6 retries of the Pod, taking at least 2 minutes. #### Clean up Delete the Job you created: ```sh kubectl delete jobs/job-pod-failure-policy-failjob ``` The cluster automatically cleans up the Pods. ### Using Pod failure policy to ignore Pod disruptions {#pod-failure-policy-ignore} With the following example, you can learn how to use Pod failure policy to ignore Pod disruptions from incrementing the Pod retry counter towards the `.spec.backoffLimit` limit. {{< caution >}} Timing is important for this example, so you may want to read the steps before execution. In order to trigger a Pod disruption it is important to drain the node while the Pod is running on it (within 90s since the Pod is scheduled). {{< /caution >}} 1. Examine the following manifest: {{% code\_sample file="/controllers/job-pod-failure-policy-ignore.yaml" %}} 1. Apply the manifest: ```sh kubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-ignore.yaml ``` 1. Run this command to check the `nodeName` the Pod is scheduled to: ```sh nodeName=$(kubectl get pods -l job-name=job-pod-failure-policy-ignore -o jsonpath='{.items[0].spec.nodeName}') ``` 1. Drain the node to evict the Pod before it completes (within 90s): ```sh kubectl drain nodes/$nodeName --ignore-daemonsets --grace-period=0 ``` 1. Inspect the `.status.failed` to check the counter for the Job is not incremented: ```sh kubectl get jobs -l job-name=job-pod-failure-policy-ignore -o yaml ``` 1. Uncordon the node: ```sh kubectl uncordon nodes/$nodeName ``` The Job resumes and succeeds. For comparison, if the Pod failure policy was disabled the Pod disruption would result in terminating the entire Job (as the `.spec.backoffLimit` is set to 0). #### Cleaning up Delete the Job you created: ```sh kubectl delete jobs/job-pod-failure-policy-ignore ``` The cluster automatically cleans up the Pods. ### Using Pod failure policy to avoid unnecessary Pod retries
| null |
./vendor/kubernetes/content/en/docs/tasks/job/pod-failure-policy.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/pod-failure-policy.md
|
[
-0.007593181915581226,
0.055311642587184906,
0.06809110194444656,
0.062442846596241,
0.04828517884016037,
-0.026388706639409065,
0.011223026551306248,
-0.01448974758386612,
-0.07848610728979111,
0.01998170278966427,
-0.013231071643531322,
0.03998906910419464,
0.005724876653403044,
-0.0024644355289638042,
0.04454178735613823,
0.030700258910655975,
0.007029250729829073,
-0.02349499799311161,
-0.01560356467962265,
-0.06996277719736099,
0.0569806843996048,
0.06615724414587021,
0.026338936761021614,
0.046694859862327576,
-0.09260563552379608,
0.04606813192367554,
-0.0654006153345108,
-0.006400046404451132,
-0.016819754615426064,
-0.019035834819078445,
-0.009154028259217739,
-0.03175867721438408,
0.006989500485360622,
0.010278459638357162,
0.08957630395889282,
0.14828716218471527,
-0.01345511432737112,
-0.09202330559492111,
-0.04604751244187355,
-0.045826591551303864,
-0.013803444802761078,
-0.011977883987128735,
-0.06319218128919601,
-0.019160127267241478,
-0.02737553045153618,
-0.006048019975423813,
-0.01243013609200716,
-0.0387519933283329,
0.032735154032707214,
0.005334306042641401,
0.007227829657495022,
-0.07226226478815079,
0.15047335624694824,
-0.01389934029430151,
0.07380609959363937,
0.04437592625617981,
0.048938486725091934,
-0.033561911433935165,
-0.00434322003275156,
-0.027731986716389656,
0.06838599592447281,
-0.06188957020640373,
-0.05300041660666466,
-0.056780148297548294,
0.044080622494220734,
-0.025552228093147278,
-0.05153004825115204,
0.02067725360393524,
0.02527455985546112,
0.08347965031862259,
-0.027298294007778168,
0.008186605758965015,
-0.01715906709432602,
-0.0125285554677248,
-0.008501231670379639,
-0.01035990472882986,
-0.015661155804991722,
-0.0016487255925312638,
0.018975501880049706,
-0.07303230464458466,
-0.032335106283426285,
-0.05710642784833908,
-0.002862517721951008,
-0.03398045152425766,
0.018564028665423393,
0.006840662565082312,
0.02351645566523075,
-0.05657132714986801,
0.05642439424991608,
-0.03169693797826767,
0.02069648914039135,
-0.10364554077386856,
0.1470709592103958,
-0.053165603429079056,
0.05764418840408325,
0.05928996577858925,
0.015842167660593987,
-0.039369795471429825,
-0.04971034824848175,
0.07360537350177765,
0.014834335073828697,
-0.028175650164484978,
0.06537259370088577,
0.003479048376902938,
0.08144634962081909,
-0.04729749634861946,
-0.035722192376852036,
-0.020625533536076546,
-0.019371338188648224,
0.06220203638076782,
0.0014599203132092953,
0.045904409140348434,
-0.0009736079955473542,
0.056887488812208176,
-0.016575125977396965,
-0.022381803020834923,
-0.019691750407218933,
0.052378516644239426,
-0.0002464180579409003,
0.07863066345453262,
0.10454080998897552,
-0.04783973470330238,
0.01727876625955105,
-0.008645549416542053,
0.010724544525146484,
-0.06264536827802658,
-0.013709533028304577,
1.3954967511153175e-33,
0.08090600371360779,
-0.06911958009004593,
-0.0816001445055008,
0.0020256778225302696,
0.09830699115991592,
-0.014353041537106037,
0.031390540301799774,
0.0521271713078022,
0.035150427371263504,
0.06207691505551338,
-0.03333636000752449,
0.020742464810609818,
-0.026498103514313698,
-0.032993484288454056,
-0.0484449565410614,
-0.11346671730279922,
-0.08040280640125275,
0.10161817818880081,
0.07553958892822266,
-0.0000955545183387585,
-0.008981152437627316,
-0.048236750066280365,
-0.09489285200834274,
-0.015418961644172668,
0.07925378531217575,
0.019744833931326866,
0.028598368167877197,
-0.07254816591739655,
-0.02852323092520237,
0.047368019819259644,
0.022739529609680176,
0.016149254515767097,
0.0005933094653300941,
-0.008657263591885567,
-0.10476112365722656,
-0.028968587517738342,
-0.010547797195613384,
-0.046014610677957535,
-0.037923261523246765,
-0.08574975281953812,
-0.0020508267916738987,
-0.05324677377939224,
0.0011867323191836476,
-0.0009005414904095232,
-0.008758647367358208,
-0.06868533045053482,
0.09467779844999313,
-0.031264178454875946,
0.017268072813749313,
0.010187526233494282,
-0.03897637873888016,
-0.02287844382226467,
0.005961810238659382,
-0.09889334440231323,
-0.00017379416385665536,
-0.10950121283531189,
-0.021637022495269775,
0.035516493022441864,
0.004181823693215847,
-0.023523658514022827,
-0.014721601270139217,
0.02062341570854187,
0.011924060061573982,
0.013714179396629333,
0.016858482733368874,
0.013381191529333591,
0.007545128930360079,
0.019756857305765152,
0.08810931444168091,
0.016432641074061394,
-0.06577914208173752,
-0.009179720655083656,
-0.015020628459751606,
0.0005113204242661595,
-0.059966035187244415,
-0.048941221088171005,
0.06271644681692123,
-0.026066893711686134,
-0.09851479530334473,
-0.00840177945792675,
-0.025600692257285118,
-0.0188469048589468,
-0.05484714359045029,
0.05008392781019211,
0.08821989595890045,
0.01692594587802887,
0.045736487954854965,
-0.023306427523493767,
-0.053792621940374374,
-0.001474424614571035,
-0.04073444753885269,
-0.04452080279588699,
-0.028001679107546806,
-0.03967142105102539,
0.009209461510181427,
-2.3345257195903166e-33,
0.12152068316936493,
-0.025769395753741264,
0.04405057430267334,
-0.01826334558427334,
0.0070381322875618935,
-0.03231734037399292,
0.06101999431848526,
-0.02651716209948063,
-0.014719771221280098,
-0.07223036885261536,
-0.1340634673833847,
-0.01990525610744953,
0.022633040323853493,
0.010885002091526985,
-0.0760805755853653,
0.04547787085175514,
-0.11688199639320374,
-0.06409701704978943,
-0.007111740298569202,
0.06662654131650925,
-0.038145434111356735,
0.012856859713792801,
-0.011652713641524315,
0.1265954077243805,
-0.014154056087136269,
-0.02645859308540821,
0.03660314157605171,
-0.02538713440299034,
-0.012738486751914024,
-0.034911755472421646,
0.016634194180369377,
-0.0721983090043068,
-0.0009406956960447133,
0.08201313763856888,
-0.009160601533949375,
-0.04160160943865776,
-0.10511299222707748,
0.07004380226135254,
0.0008443608530797064,
0.05308236926794052,
0.1928582340478897,
0.0023905285634100437,
-0.041975684463977814,
-0.01327076368033886,
-0.0549733005464077,
-0.04122467711567879,
0.06823697686195374,
0.007853487506508827,
-0.04959256947040558,
-0.07283377647399902,
-0.044969961047172546,
-0.07812768220901489,
-0.0822950080037117,
0.058566864579916,
-0.004225677810609341,
0.016990745440125465,
0.06499788165092468,
-0.02641967311501503,
-0.07344727963209152,
0.04998571053147316,
-0.013962519355118275,
-0.0012011558283120394,
0.13795341551303864,
0.04532519727945328,
0.013165941461920738,
-0.15628904104232788,
-0.05099932849407196,
0.038106270134449005,
0.04321851208806038,
-0.007304877508431673,
0.0006743315025232732,
0.04781384393572807,
0.06976830214262009,
0.029056252911686897,
0.03478464111685753,
-0.0072896964848041534,
-0.00808708742260933,
-0.07867495715618134,
0.018996428698301315,
0.032835833728313446,
-0.04302403703331947,
0.06600739061832428,
-0.0525994636118412,
0.07182485610246658,
0.028309762477874756,
0.09688548743724823,
0.05629517138004303,
0.0987577959895134,
0.034490250051021576,
0.034698016941547394,
-0.01760844700038433,
0.029475277289748192,
0.010179191827774048,
0.08969180285930634,
-0.0473102405667305,
-5.079326470536216e-8,
-0.00203761481679976,
0.030378781259059906,
0.08695448189973831,
0.01822836883366108,
0.026200490072369576,
-0.04453923553228378,
0.02680688351392746,
-0.004099671728909016,
-0.07903825491666794,
-0.04065846651792526,
0.0141507713124156,
0.015227352268993855,
-0.07216380536556244,
0.02171000838279724,
0.016455121338367462,
-0.03450150787830353,
0.030142856761813164,
0.14351971447467804,
-0.07199360430240631,
-0.0285519827157259,
-0.021858345717191696,
-0.02467728592455387,
0.03587593138217926,
0.03424284607172012,
0.027849383652210236,
0.06143828481435776,
-0.017003865912556648,
0.015128481201827526,
0.08296991884708405,
-0.004348434507846832,
0.02416396513581276,
-0.0002855343045666814,
-0.03547672554850578,
0.0299761351197958,
-0.010240299627184868,
0.032446444034576416,
0.007473785895854235,
-0.0385717935860157,
0.0017268509836867452,
0.019126828759908676,
0.02673926390707493,
0.04210089147090912,
-0.0351698063313961,
0.03383609279990196,
-0.023407211527228355,
0.02163582295179367,
-0.09181385487318039,
0.019878653809428215,
0.01594499684870243,
-0.0350516214966774,
-0.03484012186527252,
-0.051537301391363144,
0.025090282782912254,
0.1299983114004135,
0.035394009202718735,
-0.0030926039908081293,
0.03422034904360771,
-0.02979726344347,
-0.008307920768857002,
0.03273539990186691,
0.035277046263217926,
0.01773759350180626,
0.015864497050642967,
0.009700763039290905
] | 0.127289
|
policy was disabled the Pod disruption would result in terminating the entire Job (as the `.spec.backoffLimit` is set to 0). #### Cleaning up Delete the Job you created: ```sh kubectl delete jobs/job-pod-failure-policy-ignore ``` The cluster automatically cleans up the Pods. ### Using Pod failure policy to avoid unnecessary Pod retries based on custom Pod Conditions {#pod-failure-policy-config-issue} With the following example, you can learn how to use Pod failure policy to avoid unnecessary Pod restarts based on custom Pod Conditions. {{< note >}} The example below works since version 1.27 as it relies on transitioning of deleted pods, in the `Pending` phase, to a terminal phase (see: [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)). {{< /note >}} 1. Examine the following manifest: {{% code\_sample file="/controllers/job-pod-failure-policy-config-issue.yaml" %}} 1. Apply the manifest: ```sh kubectl create -f https://k8s.io/examples/controllers/job-pod-failure-policy-config-issue.yaml ``` Note that, the image is misconfigured, as it does not exist. 1. Inspect the status of the job's Pods by running: ```sh kubectl get pods -l job-name=job-pod-failure-policy-config-issue -o yaml ``` You will see output similar to this: ```yaml containerStatuses: - image: non-existing-repo/non-existing-image:example ... state: waiting: message: Back-off pulling image "non-existing-repo/non-existing-image:example" reason: ImagePullBackOff ... phase: Pending ``` Note that the pod remains in the `Pending` phase as it fails to pull the misconfigured image. This, in principle, could be a transient issue and the image could get pulled. However, in this case, the image does not exist so we indicate this fact by a custom condition. 1. Add the custom condition. First prepare the patch by running: ```sh cat < patch.yaml status: conditions: - type: ConfigIssue status: "True" reason: "NonExistingImage" lastTransitionTime: "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" EOF ``` Second, select one of the pods created by the job by running: ``` podName=$(kubectl get pods -l job-name=job-pod-failure-policy-config-issue -o jsonpath='{.items[0].metadata.name}') ``` Then, apply the patch on one of the pods by running the following command: ```sh kubectl patch pod $podName --subresource=status --patch-file=patch.yaml ``` If applied successfully, you will get a notification like this: ```sh pod/job-pod-failure-policy-config-issue-k6pvp patched ``` 1. Delete the pod to transition it to `Failed` phase, by running the command: ```sh kubectl delete pods/$podName ``` 1. Inspect the status of the Job by running: ```sh kubectl get jobs -l job-name=job-pod-failure-policy-config-issue -o yaml ``` In the Job status, see a job `Failed` condition with the field `reason` equal `PodFailurePolicy`. Additionally, the `message` field contains a more detailed information about the Job termination, such as: `Pod default/job-pod-failure-policy-config-issue-k6pvp has condition ConfigIssue matching FailJob rule at index 0`. {{< note >}} In a production environment, the steps 3 and 4 should be automated by a user-provided controller. {{< /note >}} #### Cleaning up Delete the Job you created: ```sh kubectl delete jobs/job-pod-failure-policy-config-issue ``` The cluster automatically cleans up the Pods. ### Using Pod Failure Policy to avoid unnecessary Pod retries per index {#backoff-limit-per-index-failindex} To avoid unnecessary Pod restarts per index, you can use the \_Pod failure policy\_ and \_backoff limit per index\_ features. This section of the page shows how to use these features together. 1. Examine the following manifest: {{% code\_sample file="/controllers/job-backoff-limit-per-index-failindex.yaml" %}} 1. Apply the manifest: ```sh kubectl create -f https://k8s.io/examples/controllers/job-backoff-limit-per-index-failindex.yaml ``` 1. After around 15 seconds, inspect the status of the Pods for the Job. You can do that by running: ```shell kubectl get pods -l job-name=job-backoff-limit-per-index-failindex -o yaml ``` You will see output similar to this: ```none NAME READY STATUS RESTARTS AGE job-backoff-limit-per-index-failindex-0-4g4cm 0/1 Error 0 4s job-backoff-limit-per-index-failindex-0-fkdzq 0/1 Error 0 15s job-backoff-limit-per-index-failindex-1-2bgdj 0/1 Error 0 15s job-backoff-limit-per-index-failindex-2-vs6lt 0/1 Completed 0 11s job-backoff-limit-per-index-failindex-3-s7s47 0/1 Completed 0 6s ``` Note that the output shows the following: \* Two Pods have index 0, because of the backoff limit allowed for one retry of the index. \*
| null |
./vendor/kubernetes/content/en/docs/tasks/job/pod-failure-policy.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/pod-failure-policy.md
|
[
0.03530669957399368,
-0.002370858332142234,
0.07665575295686722,
0.04683157056570053,
0.05531947314739227,
-0.026583356782794,
-0.004546149633824825,
-0.05947837978601456,
0.0008119843550957739,
0.077844999730587,
0.021293865516781807,
0.02487051859498024,
0.006546235177665949,
-0.023556828498840332,
0.038302578032016754,
-0.03437338024377823,
0.0006486111669801176,
-0.008807591162621975,
-0.029193656519055367,
-0.03369973227381706,
0.021906455978751183,
0.017411891371011734,
0.04066040366888046,
0.05771529674530029,
-0.058056801557540894,
0.03019155003130436,
-0.016261640936136246,
-0.03047037497162819,
-0.014612533152103424,
0.012547613121569157,
-0.06532654166221619,
0.020019927993416786,
0.013422427698969841,
-0.01770218461751938,
0.08812645077705383,
0.13977886736392975,
-0.043301474303007126,
-0.07796455919742584,
-0.06867343932390213,
-0.004564862232655287,
0.010768869891762733,
-0.04370315000414848,
-0.13597993552684784,
-0.019622091203927994,
0.006323221605271101,
-0.007077968679368496,
-0.05356745049357414,
-0.037810251116752625,
-0.0002695541188586503,
-0.01683744229376316,
0.058913979679346085,
-0.03694132715463638,
0.12056570500135422,
0.017025360837578773,
0.09444500505924225,
0.05148778110742569,
0.03727110102772713,
0.020105570554733276,
0.09015950560569763,
-0.010459630750119686,
0.04987318441271782,
-0.06583670526742935,
-0.009706753306090832,
-0.086125947535038,
0.047149669378995895,
-0.003859475953504443,
-0.023478331044316292,
-0.0054971082136034966,
0.016901977360248566,
0.05084582790732384,
0.04358888790011406,
0.010154816322028637,
0.009095199406147003,
-0.026965536177158356,
-0.03820281848311424,
0.037201229482889175,
-0.012758021242916584,
0.010599736124277115,
-0.014254363253712654,
-0.02068055048584938,
-0.00823838822543621,
-0.04697278141975403,
0.06493008136749268,
-0.008255301043391228,
-0.10372712463140488,
-0.027140798047184944,
-0.030453387647867203,
-0.059588510543107986,
0.07818284630775452,
-0.008908838964998722,
0.010850869119167328,
0.01162821426987648,
0.07214094698429108,
-0.08706697821617126,
0.05695182830095291,
-0.03052833303809166,
-0.024509329348802567,
0.010273590683937073,
-0.008791912347078323,
-0.0012526733335107565,
0.05394463986158371,
-0.012496105395257473,
-0.019260874018073082,
0.010677998885512352,
0.05966074392199516,
-0.053686827421188354,
-0.056464195251464844,
-0.042317748069763184,
0.02957911416888237,
0.06491407752037048,
0.00936214905232191,
0.016301658004522324,
0.05895790830254555,
0.070376455783844,
-0.017374541610479355,
0.08346602320671082,
-0.0055230422876775265,
0.053801681846380234,
-0.00151740456931293,
0.04152537137269974,
0.06705352663993835,
-0.06423801928758621,
0.02677803859114647,
-0.00927587877959013,
-0.04511977732181549,
0.021304979920387268,
0.028198057785630226,
1.1304079894900102e-33,
0.04684063047170639,
-0.09992919117212296,
-0.05421202629804611,
-0.055142927914857864,
0.10271834582090378,
-0.06996730715036392,
-0.04304236173629761,
0.005738073959946632,
0.03648305684328079,
-0.04533093422651291,
-0.044899992644786835,
0.05025361850857735,
-0.028716668486595154,
-0.03724534437060356,
0.0342852808535099,
-0.05042343959212303,
-0.04903361201286316,
0.10787199437618256,
0.061249371618032455,
-0.003121215384453535,
0.06438922882080078,
-0.03571733832359314,
-0.06288585811853409,
0.05050167813897133,
-0.018819713965058327,
0.02271982468664646,
0.04124079644680023,
-0.11121201515197754,
0.01047861110419035,
0.05068889260292053,
-0.03595418483018875,
0.05182027816772461,
0.014829129911959171,
0.018936535343527794,
-0.15012125670909882,
-0.033408332616090775,
-0.07577630877494812,
0.01937364600598812,
-0.06422228366136551,
-0.04614667966961861,
0.03422124311327934,
-0.01090397872030735,
0.02085385099053383,
-0.04374825581908226,
0.04443489760160446,
-0.087863489985466,
0.09814894199371338,
-0.057332608848810196,
0.04957227036356926,
0.04939506947994232,
0.017523424699902534,
-0.02457904815673828,
0.03020777367055416,
-0.12383854389190674,
0.005457471124827862,
-0.02949596755206585,
0.03147829696536064,
0.0034310014452785254,
-0.056865014135837555,
0.004295090679079294,
0.012975477613508701,
0.01590125449001789,
0.02043556421995163,
0.007965854369103909,
0.03159717842936516,
0.09150777757167816,
-0.05566531792283058,
0.055435910820961,
0.00284407427534461,
0.019467007368803024,
-0.06711351871490479,
0.07311229407787323,
-0.031233103945851326,
-0.013857676647603512,
-0.023681920021772385,
-0.055661022663116455,
0.08445142209529877,
0.026744745671749115,
-0.15053002536296844,
-0.02141083963215351,
0.0024429659824818373,
-0.004429328255355358,
-0.07200179994106293,
0.0019854006823152304,
0.034922484308481216,
0.010643727146089077,
0.04765328764915466,
0.02948795258998871,
-0.08501917868852615,
0.0004490241117309779,
0.004677518270909786,
-0.04570760577917099,
-0.04707406461238861,
0.03320291265845299,
-0.03784659877419472,
-2.39246289740647e-33,
0.09482835978269577,
-0.0025900783948600292,
0.000605296459980309,
-0.009904541075229645,
-0.02497449889779091,
-0.004585364367812872,
-0.008000439032912254,
0.06892305612564087,
-0.0014186756452545524,
-0.08163347095251083,
-0.061888448894023895,
-0.05552805960178375,
0.026311157271265984,
0.0479702427983284,
-0.12933017313480377,
-0.019940035417675972,
-0.07886896282434464,
-0.047675296664237976,
-0.06965412199497223,
0.043633006513118744,
0.010634622536599636,
-0.06570989638566971,
0.013742480427026749,
0.11292903870344162,
-0.03566867858171463,
-0.0059952097944915295,
-0.013606216758489609,
-0.011151092126965523,
-0.017510095611214638,
-0.029494166374206543,
0.02709813229739666,
-0.08906024694442749,
0.01418110728263855,
0.09827548265457153,
0.044061079621315,
-0.06937044858932495,
-0.11496848613023758,
0.05044884979724884,
-0.006078524515032768,
-0.037316031754016876,
0.09593483805656433,
-0.007773927412927151,
-0.06472750008106232,
0.00387905933894217,
-0.020588098093867302,
0.006458240561187267,
0.033540789037942886,
-0.03229060396552086,
0.00340678496286273,
-0.10617810487747192,
-0.004348353482782841,
-0.027683285996317863,
-0.03708254545927048,
0.0890626460313797,
-0.0386805534362793,
-0.008179519325494766,
0.05822790041565895,
0.0164803396910429,
-0.10213673114776611,
0.022667722776532173,
0.03991963714361191,
-0.02945411391556263,
0.09251098334789276,
0.04781930148601532,
0.03159857913851738,
-0.09583690762519836,
0.031781841069459915,
0.05179477483034134,
0.04216093569993973,
-0.02242177166044712,
0.06908764690160751,
0.07457958906888962,
0.0361320897936821,
0.06812266260385513,
0.010822821408510208,
0.008756544440984726,
-0.056654032319784164,
-0.08676964789628983,
0.015167107805609703,
0.05096307024359703,
-0.05158156529068947,
0.10106389224529266,
-0.0723334550857544,
0.0525539331138134,
0.05546703562140465,
0.09154976159334183,
0.0023221320006996393,
0.0948273092508316,
0.06185244023799896,
0.1042797714471817,
0.008214451372623444,
-0.043281275779008865,
-0.004936601035296917,
0.07590289413928986,
-0.049409981817007065,
-4.5581852958775926e-8,
0.08082979172468185,
0.03601254150271416,
0.01048408355563879,
0.04091188311576843,
0.08625341951847076,
-0.04920629411935806,
0.0244868416339159,
0.027030151337385178,
-0.05765553563833237,
-0.011977280490100384,
-0.02128532901406288,
0.04670801758766174,
-0.07525192946195602,
0.011736730113625526,
0.043145883828401566,
-0.05736314132809639,
0.06175006553530693,
0.0817602127790451,
0.009693366475403309,
-0.05006052553653717,
-0.0920652523636818,
-0.08074226975440979,
-0.018308060243725777,
0.030354799702763557,
-0.01893228106200695,
0.09796199947595596,
0.0444234199821949,
0.009768105112016201,
0.04916558042168617,
-0.03370707854628563,
-0.040815796703100204,
-0.05210944637656212,
-0.03495754301548004,
0.0485987551510334,
-0.08084843307733536,
0.041984573006629944,
-0.04665384069085121,
0.008463533595204353,
0.002241070382297039,
-0.005518011283129454,
-0.0015211167046800256,
0.015223980881273746,
-0.05399611219763756,
-0.01954655908048153,
-0.02865893952548504,
0.024853987619280815,
-0.009210601449012756,
0.06900250166654587,
-0.027015304192900658,
0.009600860998034477,
-0.0564676932990551,
-0.0462813675403595,
-0.016961265355348587,
0.08657567203044891,
-0.01695304922759533,
-0.043900758028030396,
-0.04903906211256981,
-0.028198588639497757,
-0.032055411487817764,
0.02029837667942047,
0.06347139179706573,
-0.01763327047228813,
-0.023960119113326073,
-0.03437763452529907
] | 0.134273
|
Error 0 4s job-backoff-limit-per-index-failindex-0-fkdzq 0/1 Error 0 15s job-backoff-limit-per-index-failindex-1-2bgdj 0/1 Error 0 15s job-backoff-limit-per-index-failindex-2-vs6lt 0/1 Completed 0 11s job-backoff-limit-per-index-failindex-3-s7s47 0/1 Completed 0 6s ``` Note that the output shows the following: \* Two Pods have index 0, because of the backoff limit allowed for one retry of the index. \* Only one Pod has index 1, because the exit code of the failed Pod matched the Pod failure policy with the `FailIndex` action. 1. Inspect the status of the Job by running: ```sh kubectl get jobs -l job-name=job-backoff-limit-per-index-failindex -o yaml ``` In the Job status, see that the `failedIndexes` field shows "0,1", because both indexes failed. Because the index 1 was not retried the number of failed Pods, indicated by the status field "failed" equals 3. #### Cleaning up Delete the Job you created: ```sh kubectl delete jobs/job-backoff-limit-per-index-failindex ``` The cluster automatically cleans up the Pods. ## Alternatives You could rely solely on the [Pod backoff failure policy](/docs/concepts/workloads/controllers/job#pod-backoff-failure-policy), by specifying the Job's `.spec.backoffLimit` field. However, in many situations it is problematic to find a balance between setting a low value for `.spec.backoffLimit` to avoid unnecessary Pod retries, yet high enough to make sure the Job would not be terminated by Pod disruptions.
| null |
./vendor/kubernetes/content/en/docs/tasks/job/pod-failure-policy.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/pod-failure-policy.md
|
[
0.0008599280845373869,
-0.01522943563759327,
0.0413607656955719,
0.02813829854130745,
0.012295628897845745,
-0.026978908106684685,
-0.022652722895145416,
-0.0388592854142189,
0.033107731491327286,
-0.000782498624175787,
-0.0007693312363699079,
-0.022177711129188538,
0.005566406063735485,
-0.08930867165327072,
-0.10037936270236969,
-0.04438222944736481,
-0.02594802714884281,
-0.009473755024373531,
-0.027852263301610947,
-0.053962837904691696,
0.0365525521337986,
0.07205654680728912,
-0.015553566627204418,
-0.006553743965923786,
-0.059105370193719864,
0.01566932164132595,
-0.06627950817346573,
-0.012596342712640762,
-0.02346164546906948,
-0.05394535884261131,
-0.04984138906002045,
0.02153465338051319,
-0.031084848567843437,
0.03713807463645935,
0.0671156793832779,
0.09815392643213272,
-0.00548511790111661,
-0.11157381534576416,
-0.07025273889303207,
0.011387882754206657,
0.03267819061875343,
-0.0027317162603139877,
-0.1003318578004837,
0.0011434908956289291,
0.0007351522799581289,
-0.019072655588388443,
-0.06158570945262909,
-0.04734209179878235,
0.03693046793341637,
-0.04392433911561966,
-0.04057290032505989,
0.005696536973118782,
0.07172996550798416,
0.04880037158727646,
0.09811971336603165,
0.03040740080177784,
-0.0784640684723854,
0.019354447722434998,
0.05709213763475418,
0.020185161381959915,
0.10017465054988861,
-0.03954172134399414,
-0.011643737554550171,
-0.06566384434700012,
0.031219011172652245,
-0.07266606390476227,
0.0027208717074245214,
-0.11294151097536087,
-0.038937680423259735,
0.0329119935631752,
0.021107211709022522,
-0.008050250820815563,
-0.07585971802473068,
0.015908801928162575,
-0.03197489306330681,
0.03993143141269684,
-0.0170696210116148,
-0.010478890500962734,
-0.01109908428043127,
-0.07407648861408234,
-0.05837296321988106,
-0.06016329675912857,
0.06914939731359482,
-0.03392628952860832,
-0.07360899448394775,
-0.060087088495492935,
-0.0020821799989789724,
-0.046168699860572815,
0.08340492099523544,
0.001525607076473534,
0.07756495475769043,
-0.006572969723492861,
0.024331755936145782,
-0.022981062531471252,
0.12339657545089722,
0.022513603791594505,
-0.006521787494421005,
0.12759211659431458,
0.037093307822942734,
-0.02011854201555252,
0.02389785274863243,
-0.041747648268938065,
0.027213532477617264,
0.047920309007167816,
0.05002344027161598,
-0.03554866835474968,
-0.048355408012866974,
-0.05751193314790726,
-0.010966547764837742,
-0.03147361800074577,
-0.007734815124422312,
0.021660810336470604,
0.05906979367136955,
0.03757883980870247,
0.020210860297083855,
0.05968260392546654,
-0.024116408079862595,
0.053192172199487686,
0.01661571115255356,
0.041916992515325546,
0.06552889943122864,
0.015371113084256649,
0.027479909360408783,
-0.0034289800096303225,
-0.059842828661203384,
0.01939331740140915,
0.0397939495742321,
4.3704005689649225e-33,
0.06677944213151932,
-0.07654502242803574,
-0.00923820398747921,
-0.06458161026239395,
0.014454985968768597,
-0.06425527483224869,
-0.03095248155295849,
0.0013899115147069097,
-0.028594883158802986,
0.029030950739979744,
-0.13191282749176025,
0.05374182015657425,
-0.023680852726101875,
-0.046967651695013046,
0.024122094735503197,
-0.03259645774960518,
0.04778951033949852,
0.0639251098036766,
0.041075706481933594,
-0.02523178793489933,
0.0854986384510994,
-0.08570573478937149,
-0.06206408515572548,
0.013230739161372185,
0.009517377242445946,
0.05118836089968681,
0.04076967015862465,
-0.11434030532836914,
0.005473791621625423,
0.045650310814380646,
-0.03686381131410599,
0.03402695432305336,
0.02205648086965084,
-0.046465255320072174,
-0.07372495532035828,
0.04502280056476593,
-0.04603877663612366,
0.06455609947443008,
-0.053269825875759125,
-0.08263231813907623,
-0.030790096148848534,
-0.0041671134531497955,
-0.06623546034097672,
-0.052217934280633926,
0.04559551924467087,
-0.06862560659646988,
0.004995855502784252,
-0.02671074867248535,
-0.007755034137517214,
0.11295725405216217,
-0.036430247128009796,
-0.0011863179970532656,
0.04169018939137459,
-0.014516972005367279,
0.05098818987607956,
0.03019801713526249,
0.07969693839550018,
0.061692140996456146,
-0.052836209535598755,
0.08513718843460083,
-0.021531185135245323,
0.024973472580313683,
-0.030676698312163353,
0.028608450666069984,
0.03891414776444435,
0.04059428721666336,
0.025967983528971672,
0.0475490540266037,
-0.005069741513580084,
0.06481220573186874,
-0.042266178876161575,
0.011606263928115368,
0.06364625692367554,
-0.04742106795310974,
0.03232892230153084,
-0.08033575862646103,
0.056378934532403946,
-0.018935207277536392,
-0.09988494962453842,
-0.03480485454201698,
-0.05146653577685356,
-0.019583549350500107,
-0.009337040595710278,
-0.07818011194467545,
0.04473996162414551,
0.04750487208366394,
0.004283694550395012,
0.026702342554926872,
-0.07385081052780151,
0.04564516246318817,
0.016973650082945824,
-0.027005821466445923,
-0.033904608339071274,
-0.036786891520023346,
-0.07201989740133286,
-4.777141818158589e-33,
0.015190372243523598,
0.0044128308072686195,
-0.001386036747135222,
-0.01932968944311142,
0.018908198922872543,
0.0036146999336779118,
0.05974868685007095,
0.04226299747824669,
-0.01976487971842289,
-0.022416334599256516,
-0.04239732027053833,
-0.038373496383428574,
0.04113352298736572,
0.04161996766924858,
-0.10874264687299728,
0.013011772185564041,
-0.03914961218833923,
-0.01667085289955139,
-0.056582752615213394,
0.060015056282281876,
-0.020759986713528633,
0.07195596396923065,
0.02522299252450466,
0.10278487950563431,
-0.06153309345245361,
0.04069697856903076,
0.052201468497514725,
0.023884158581495285,
-0.05722776800394058,
-0.06306053698062897,
0.10059233754873276,
-0.12080957740545273,
-0.011640140786767006,
0.13595429062843323,
0.06239031255245209,
-0.0682719498872757,
-0.07830023020505905,
0.0194088164716959,
0.005958510562777519,
0.056031376123428345,
0.10700483620166779,
0.03679215908050537,
0.0017100311815738678,
0.02277730032801628,
-0.03880620375275612,
-0.03402409702539444,
-0.011335979215800762,
-0.03406764566898346,
-0.008140187710523605,
-0.15520654618740082,
-0.030785128474235535,
-0.002085739281028509,
-0.017816193401813507,
0.11632370203733444,
-0.027249865233898163,
-0.01821676269173622,
-0.017105935141444206,
0.04682837054133415,
-0.08379019796848297,
0.06334362924098969,
0.056107666343450546,
-0.02697892114520073,
0.07103800773620605,
0.07147190719842911,
0.07782945781946182,
-0.026248272508382797,
-0.02313174121081829,
-0.01045194361358881,
0.024408699944615364,
-0.020588530227541924,
0.09671846777200699,
0.024309879168868065,
0.03380681201815605,
0.030442332848906517,
-0.005269970279186964,
0.025784026831388474,
-0.10755058377981186,
-0.02961905673146248,
0.0025477588642388582,
0.05554679408669472,
-0.05834061652421951,
0.0875919908285141,
-0.027167724445462227,
0.06160299479961395,
0.02273322083055973,
0.07024212926626205,
0.061119724065065384,
0.16671952605247498,
0.029814548790454865,
0.07927673310041428,
0.009318654425442219,
-0.02843092940747738,
-0.01952975243330002,
0.06857441365718842,
0.026713350787758827,
-4.150449584017224e-8,
0.05060923472046852,
-0.020567452535033226,
-0.009103003889322281,
0.01667262241244316,
0.07665296643972397,
-0.07325907051563263,
-0.05101298168301582,
0.014089285396039486,
-0.07096856832504272,
-0.04447998106479645,
0.020909763872623444,
0.013764957897365093,
-0.10103387385606766,
0.045127641409635544,
0.07982783764600754,
-0.07175662368535995,
-0.007553623989224434,
0.016588879749178886,
0.017913492396473885,
-0.05639219284057617,
-0.05966218188405037,
0.00713188573718071,
0.005774250719696283,
-0.009980371221899986,
-0.017583008855581284,
0.08259887248277664,
0.07731661200523376,
0.046975210309028625,
0.04230387881398201,
-0.004737834446132183,
0.01220072340220213,
-0.04770370200276375,
-0.0016808738000690937,
0.027943123131990433,
-0.022193262353539467,
0.023060550913214684,
-0.03351457789540291,
-0.004339040722697973,
-0.003915103152394295,
0.024322807788848877,
-0.018275579437613487,
-0.008253199979662895,
0.0024928590282797813,
0.02679121308028698,
-0.00523030199110508,
0.03640930354595184,
-0.0802951529622078,
0.0399436391890049,
0.015954405069351196,
-0.061240024864673615,
-0.07105105370283127,
-0.09206955879926682,
-0.01377186831086874,
0.08925264328718185,
0.005311610642820597,
-0.02154402621090412,
-0.024034500122070312,
-0.024824706837534904,
-0.04058540239930153,
0.04713199660181999,
0.05313987284898758,
-0.03483561798930168,
-0.038467250764369965,
0.024159256368875504
] | 0.146187
|
In this example, you will run a Kubernetes Job with multiple parallel worker processes. In this example, as each pod is created, it picks up one unit of work from a task queue, completes it, deletes it from the queue, and exits. Here is an overview of the steps in this example: 1. \*\*Start a message queue service.\*\* In this example, you use RabbitMQ, but you could use another one. In practice you would set up a message queue service once and reuse it for many jobs. 1. \*\*Create a queue, and fill it with messages.\*\* Each message represents one task to be done. In this example, a message is an integer that we will do a lengthy computation on. 1. \*\*Start a Job that works on tasks from the queue\*\*. The Job starts several pods. Each pod takes one task from the message queue, processes it, and exits. ## {{% heading "prerequisites" %}} You should already be familiar with the basic, non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/). {{< include "task-tutorial-prereqs.md" >}} You will need a container image registry where you can upload images to run in your cluster. This task example also assumes that you have Docker installed locally. ## Starting a message queue service This example uses RabbitMQ, however, you can adapt the example to use another AMQP-type message service. In practice you could set up a message queue service once in a cluster and reuse it for many jobs, as well as for long-running services. Start RabbitMQ as follows: ```shell # make a Service for the StatefulSet to use kubectl create -f https://kubernetes.io/examples/application/job/rabbitmq/rabbitmq-service.yaml ``` ``` service "rabbitmq-service" created ``` ```shell kubectl create -f https://kubernetes.io/examples/application/job/rabbitmq/rabbitmq-statefulset.yaml ``` ``` statefulset "rabbitmq" created ``` ## Testing the message queue service Now, we can experiment with accessing the message queue. We will create a temporary interactive pod, install some tools on it, and experiment with queues. First create a temporary interactive Pod. ```shell # Create a temporary interactive container kubectl run -i --tty temp --image ubuntu:22.04 ``` ``` Waiting for pod default/temp-loe07 to be running, status is Pending, pod ready: false ... [ previous line repeats several times .. hit return when it stops ] ... ``` Note that your pod name and command prompt will be different. Next install the `amqp-tools` so you can work with message queues. The next commands show what you need to run inside the interactive shell in that Pod: ```shell apt-get update && apt-get install -y curl ca-certificates amqp-tools python3 dnsutils ``` Later, you will make a container image that includes these packages. Next, you will check that you can discover the Service for RabbitMQ: ``` # Run these commands inside the Pod # Note the rabbitmq-service has a DNS name, provided by Kubernetes: nslookup rabbitmq-service ``` ``` Server: 10.0.0.10 Address: 10.0.0.10#53 Name: rabbitmq-service.default.svc.cluster.local Address: 10.0.147.152 ``` (the IP addresses will vary) If the kube-dns addon is not set up correctly, the previous step may not work for you. You can also find the IP address for that Service in an environment variable: ```shell # run this check inside the Pod env | grep RABBITMQ\_SERVICE | grep HOST ``` ``` RABBITMQ\_SERVICE\_SERVICE\_HOST=10.0.147.152 ``` (the IP address will vary) Next you will verify that you can create a queue, and publish and consume messages. ```shell # Run these commands inside the Pod # In the next line, rabbitmq-service is the hostname where the rabbitmq-service # can be reached. 5672 is the standard port for rabbitmq. export BROKER\_URL=amqp://guest:guest@rabbitmq-service:5672 # If you could not resolve "rabbitmq-service" in the previous step, # then use this command instead: BROKER\_URL=amqp://guest:guest@$RABBITMQ\_SERVICE\_SERVICE\_HOST:5672 # Now create a queue:
| null |
./vendor/kubernetes/content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
[
0.00443373853340745,
-0.021364448592066765,
0.0007112135645002127,
0.04455914348363876,
-0.08175947517156601,
-0.033306438475847244,
0.0612042099237442,
-0.061352670192718506,
0.03741424158215523,
0.07034876197576523,
-0.0006824056035839021,
0.0034325048327445984,
0.02359357662498951,
0.007002369500696659,
0.041614748537540436,
0.00336591643281281,
0.09032262861728668,
-0.08114563673734665,
-0.05915508791804314,
-0.08421109616756439,
0.05320950970053673,
0.03987579420208931,
0.046846382319927216,
0.010762469843029976,
-0.0919644683599472,
-0.0325043722987175,
-0.06647298485040665,
-0.007635302841663361,
0.0021072847303003073,
-0.037130072712898254,
0.0137231620028615,
-0.04467637836933136,
0.01456120703369379,
0.059896320104599,
0.06413402408361435,
0.079285629093647,
0.03776822239160538,
-0.06085889786481857,
-0.04605979472398758,
0.05158127099275589,
0.028773820027709007,
-0.05691741406917572,
-0.12223771214485168,
-0.013819309882819653,
0.055209435522556305,
0.009872750379145145,
-0.10706585645675659,
-0.015004423446953297,
0.05110704153776169,
0.02876071073114872,
-0.03099931590259075,
-0.08555569499731064,
0.02502351626753807,
0.09294915199279785,
0.09812698513269424,
0.026312997564673424,
0.0012713628821074963,
-0.05526193231344223,
0.015644777566194534,
-0.06432311981916428,
0.002628039801493287,
-0.01473256666213274,
-0.00008953920769272372,
-0.03246007487177849,
0.024659903720021248,
-0.06641920655965805,
-0.016199959442019463,
0.048950765281915665,
0.07588880509138107,
-0.015372163616120815,
0.011969439685344696,
-0.014812558889389038,
-0.07208044081926346,
-0.009662904776632786,
-0.06158287078142166,
0.041659146547317505,
-0.0010202656267210841,
0.035178374499082565,
-0.11442193388938904,
-0.08162437379360199,
-0.02229534275829792,
0.003907301928848028,
0.024199707433581352,
-0.013211783021688461,
-0.04835784435272217,
-0.02252637967467308,
-0.012662515044212341,
-0.052970387041568756,
0.07241672277450562,
-0.07383710145950317,
0.015704786404967308,
-0.009539066813886166,
0.056268300861120224,
-0.03708799183368683,
0.05256936699151993,
0.004420245997607708,
0.010450348258018494,
0.04054895415902138,
0.033174771815538406,
0.038140829652547836,
0.06484544277191162,
-0.0489058792591095,
0.06988993287086487,
0.013020064681768417,
0.04451470822095871,
-0.02677789330482483,
-0.051309939473867416,
0.0022907559759914875,
-0.023861777037382126,
-0.04833335801959038,
-0.011785127222537994,
0.031244216486811638,
0.033844977617263794,
0.08094732463359833,
0.0755772590637207,
0.02028622105717659,
0.06660006195306778,
-0.01049324031919241,
0.059538584202528,
0.12457731366157532,
0.0633314698934555,
-0.07431560754776001,
0.00019251318008173257,
0.024890132248401642,
-0.011301360093057156,
-0.004874629899859428,
0.01789616420865059,
2.244370445670032e-33,
0.06145906075835228,
-0.04517783597111702,
0.015730716288089752,
0.017208728939294815,
0.1138911172747612,
0.0009378130198456347,
-0.013203044421970844,
0.010595540516078472,
-0.025645412504673004,
-0.009053830988705158,
-0.11938712745904922,
0.04160154610872269,
0.0136482622474432,
0.033474259078502655,
-0.0630945935845375,
-0.06020184978842735,
-0.058327917009592056,
0.029907017946243286,
0.12584805488586426,
0.01487929467111826,
0.0007772053359076381,
-0.0368543341755867,
-0.10008299350738525,
0.09313341230154037,
0.10434626042842865,
-0.008089589886367321,
0.04929882660508156,
-0.1093844398856163,
-0.0018741905223578215,
0.0260701272636652,
0.00962154846638441,
0.043684277683496475,
-0.050013262778520584,
0.0007557692588306963,
-0.11177285760641098,
0.029511626809835434,
-0.0290763508528471,
0.018444394692778587,
-0.021151242777705193,
-0.09970976412296295,
-0.04174359515309334,
-0.07493121922016144,
-0.046780362725257874,
-0.059892263263463974,
-0.06849394738674164,
-0.06019248068332672,
-0.025558393448591232,
-0.035565488040447235,
0.03414918854832649,
-0.028652820736169815,
0.05419313535094261,
-0.03262514993548393,
0.07567387819290161,
-0.024011483415961266,
0.08236218243837357,
-0.03767673671245575,
0.08741417527198792,
0.006108771078288555,
-0.021773498505353928,
0.046226616948843,
-0.09138917922973633,
0.005269136745482683,
-0.07523476332426071,
0.061379142105579376,
0.0764317438006401,
-0.02352239191532135,
-0.04482685402035713,
0.011295833624899387,
0.05875278264284134,
-0.0017336534801870584,
-0.0639384537935257,
0.021191850304603577,
0.027448778972029686,
-0.033228788524866104,
-0.0027615362778306007,
-0.036382488906383514,
-0.01173044927418232,
0.007307281251996756,
-0.14008545875549316,
0.04394667223095894,
-0.03926605358719826,
0.004005365539342165,
-0.07508329302072525,
-0.010836820118129253,
0.026334522292017937,
-0.007759174797683954,
0.08173386007547379,
-0.032089609652757645,
-0.04262508079409599,
-0.0011079565156251192,
-0.04817592352628708,
0.016061460599303246,
-0.008287275210022926,
0.020980682224035263,
-0.024171385914087296,
-2.3088858000759824e-33,
0.04121851921081543,
0.040884099900722504,
-0.07816266268491745,
0.06300278753042221,
0.0421486534178257,
-0.028141791000962257,
0.006860269233584404,
-0.06343092024326324,
-0.025568941608071327,
-0.03409289941191673,
-0.12659095227718353,
-0.029270848259329796,
0.029810257256031036,
0.04227720573544502,
-0.005598029121756554,
-0.023828815668821335,
0.01055856328457594,
-0.05305728316307068,
-0.04047881439328194,
0.061137840151786804,
-0.0672985091805458,
0.008528742007911205,
-0.022501615807414055,
0.02167607471346855,
0.005607982166111469,
0.017802299931645393,
0.02254524827003479,
-0.02260715141892433,
-0.02485591731965542,
-0.03165196254849434,
-0.032357361167669296,
-0.1330411732196808,
0.06389249861240387,
0.03145531192421913,
0.004010088741779327,
-0.05075957253575325,
0.00040170896681956947,
0.07258161902427673,
0.0008053979836404324,
-0.0156866405159235,
0.13779453933238983,
-0.02580898255109787,
-0.06753147393465042,
-0.03702731058001518,
-0.0464622862637043,
0.04179065302014351,
0.00019980600336566567,
-0.017000602558255196,
-0.11304239928722382,
-0.036772891879081726,
-0.030486101284623146,
-0.05426574498414993,
-0.04184303060173988,
0.09999825060367584,
-0.012552349828183651,
-0.019367879256606102,
0.049380604177713394,
0.0450398251414299,
-0.024779804050922394,
-0.000493726518470794,
0.018333030864596367,
-0.06522215157747269,
0.14239980280399323,
-0.02214023843407631,
0.04642065614461899,
-0.09259306639432907,
0.035386137664318085,
-0.024730682373046875,
-0.02265930362045765,
-0.012105491012334824,
0.01735711097717285,
0.0686573013663292,
0.034692246466875076,
0.07161610573530197,
0.04938827082514763,
-0.022607998922467232,
-0.05699364095926285,
-0.04952309653162956,
-0.027724415063858032,
0.03739406168460846,
-0.03792988881468773,
0.000742304022423923,
-0.004246987868100405,
0.11901413649320602,
-0.0179666168987751,
0.08123049885034561,
0.11174861341714859,
0.0951775535941124,
0.007135870400816202,
-0.011911440640687943,
0.027849504724144936,
0.0011367577826604247,
0.015883997082710266,
0.1098589226603508,
-0.02826068364083767,
-4.926913632630203e-8,
0.006578988861292601,
-0.04667150601744652,
-0.018112633377313614,
0.05285358056426048,
0.03970783203840256,
-0.04760580509901047,
0.013946128077805042,
0.04720200598239899,
-0.001926414086483419,
0.020243071019649506,
0.05120982974767685,
0.012672829441726208,
-0.0047704363241791725,
0.020966365933418274,
0.06898503005504608,
-0.020129021257162094,
0.05927407741546631,
-0.018485505133867264,
-0.0017843777313828468,
-0.0583132803440094,
0.030440552160143852,
0.03355817496776581,
0.007052221801131964,
0.06856125593185425,
-0.020420901477336884,
0.0637771338224411,
0.07853946089744568,
-0.003365296870470047,
0.004629125818610191,
-0.0424346886575222,
-0.0590798519551754,
-0.04331618547439575,
-0.0608622208237648,
0.07965659350156784,
-0.03227105736732483,
-0.04808861389756203,
-0.0211660023778677,
-0.021604757755994797,
0.054612088948488235,
0.02819850482046604,
0.018712017685174942,
0.005600201431661844,
-0.06025780737400055,
0.016048714518547058,
0.06016870215535164,
0.016576210036873817,
-0.1084694117307663,
-0.04181455820798874,
-0.026550017297267914,
0.0003649424761533737,
-0.07482816278934479,
0.0006204143865033984,
0.04593189060688019,
0.10854539275169373,
-0.04754892736673355,
-0.015497656539082527,
0.054256193339824677,
-0.08275257050991058,
0.021146297454833984,
0.05819573998451233,
0.031876660883426666,
0.022881025448441505,
0.002472266089171171,
-0.017355674877762794
] | 0.196743
|
the Pod # In the next line, rabbitmq-service is the hostname where the rabbitmq-service # can be reached. 5672 is the standard port for rabbitmq. export BROKER\_URL=amqp://guest:guest@rabbitmq-service:5672 # If you could not resolve "rabbitmq-service" in the previous step, # then use this command instead: BROKER\_URL=amqp://guest:guest@$RABBITMQ\_SERVICE\_SERVICE\_HOST:5672 # Now create a queue: /usr/bin/amqp-declare-queue --url=$BROKER\_URL -q foo -d ``` ``` foo ``` Publish one message to the queue: ```shell /usr/bin/amqp-publish --url=$BROKER\_URL -r foo -p -b Hello # And get it back. /usr/bin/amqp-consume --url=$BROKER\_URL -q foo -c 1 cat && echo 1>&2 ``` ``` Hello ``` In the last command, the `amqp-consume` tool took one message (`-c 1`) from the queue, and passes that message to the standard input of an arbitrary command. In this case, the program `cat` prints out the characters read from standard input, and the echo adds a carriage return so the example is readable. ## Fill the queue with tasks Now, fill the queue with some simulated tasks. In this example, the tasks are strings to be printed. In a practice, the content of the messages might be: - names of files to that need to be processed - extra flags to the program - ranges of keys in a database table - configuration parameters to a simulation - frame numbers of a scene to be rendered If there is large data that is needed in a read-only mode by all pods of the Job, you typically put that in a shared file system like NFS and mount that readonly on all the pods, or write the program in the pod so that it can natively read data from a cluster file system (for example: HDFS). For this example, you will create the queue and fill it using the AMQP command line tools. In practice, you might write a program to fill the queue using an AMQP client library. ```shell # Run this on your computer, not in the Pod /usr/bin/amqp-declare-queue --url=$BROKER\_URL -q job1 -d ``` ``` job1 ``` Add items to the queue: ```shell for f in apple banana cherry date fig grape lemon melon do /usr/bin/amqp-publish --url=$BROKER\_URL -r job1 -p -b $f done ``` You added 8 messages to the queue. ## Create a container image Now you are ready to create an image that you will run as a Job. The job will use the `amqp-consume` utility to read the message from the queue and run the actual work. Here is a very simple example program: {{% code\_sample language="python" file="application/job/rabbitmq/worker.py" %}} Give the script execution permission: ```shell chmod +x worker.py ``` Now, build an image. Make a temporary directory, change to it, download the [Dockerfile](/examples/application/job/rabbitmq/Dockerfile), and [worker.py](/examples/application/job/rabbitmq/worker.py). In either case, build the image with this command: ```shell docker build -t job-wq-1 . ``` For the [Docker Hub](https://hub.docker.com/), tag your app image with your username and push to the Hub with the below commands. Replace `` with your Hub username. ```shell docker tag job-wq-1 /job-wq-1 docker push /job-wq-1 ``` If you are using an alternative container image registry, tag the image and push it there instead. ## Defining a Job Here is a manifest for a Job. You'll need to make a copy of the Job manifest (call it `./job.yaml`), and edit the name of the container image to match the name you used. {{% code\_sample file="application/job/rabbitmq/job.yaml" %}} In this example, each pod works on one item from the queue and then exits. So, the completion count of the Job corresponds to the number of work items done. That is why the example manifest has `.spec.completions` set to `8`. ## Running the Job Now, run the Job:
| null |
./vendor/kubernetes/content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
[
0.10263903439044952,
0.015141753479838371,
-0.01852455362677574,
0.05626964941620827,
-0.12238644808530807,
-0.02723129279911518,
0.05673953890800476,
-0.047768279910087585,
0.014937249012291431,
0.09354732185602188,
-0.03647952526807785,
-0.044973231852054596,
0.0407426580786705,
0.02287415973842144,
0.03081309050321579,
0.013308584690093994,
0.175315260887146,
-0.07166893035173416,
0.026124291121959686,
-0.015933934599161148,
-0.054675936698913574,
0.07809596508741379,
0.02083299309015274,
0.0022015655413269997,
-0.03757946565747261,
-0.16922670602798462,
-0.065823495388031,
0.03542953357100487,
-0.015623754821717739,
-0.06780584156513214,
0.04097026586532593,
0.05825324356555939,
-0.05383770167827606,
0.017506953328847885,
0.09944590926170349,
0.09321388602256775,
0.04561803862452507,
-0.01595914736390114,
-0.02475678361952305,
0.046691037714481354,
0.09073657542467117,
-0.0937386229634285,
-0.053472790867090225,
0.0004927331465296447,
0.05892272666096687,
-0.00037778005935251713,
-0.030699986964464188,
0.08022219687700272,
0.035721223801374435,
0.00480597373098135,
-0.08955815434455872,
-0.011393393389880657,
-0.04144857078790665,
0.059612810611724854,
0.048470478504896164,
0.046424414962530136,
-0.0766039714217186,
0.02580668032169342,
0.01566341519355774,
-0.03264549747109413,
-0.024473058059811592,
0.03445521742105484,
0.04821666330099106,
-0.03429355099797249,
-0.06028389558196068,
-0.05630286782979965,
-0.0007729939534328878,
0.037232108414173126,
0.039998847991228104,
-0.00888595450669527,
0.010072780773043633,
-0.02781073935329914,
-0.07100316882133484,
-0.06267040222883224,
0.014071392826735973,
0.034472789615392685,
-0.026043346151709557,
0.03747015446424484,
-0.04487248510122299,
-0.03557850047945976,
-0.003222900675609708,
-0.06520091742277145,
-0.010009600780904293,
-0.01107761263847351,
-0.05872851982712746,
0.033721573650836945,
0.00021304770780261606,
-0.0794866532087326,
0.047429170459508896,
-0.08543237298727036,
-0.03477516397833824,
-0.01543879508972168,
-0.00837867334485054,
-0.02086508460342884,
0.10392069816589355,
-0.036763712763786316,
0.01610906980931759,
0.024127328768372536,
0.04034372791647911,
0.03215281292796135,
0.06001991406083107,
-0.002341210376471281,
-0.015004061162471771,
0.04053544998168945,
0.015994686633348465,
-0.0324777215719223,
0.01759423315525055,
0.034170158207416534,
0.0730995163321495,
-0.03043551743030548,
-0.01765940710902214,
0.018154485151171684,
0.04851674288511276,
-0.02770606242120266,
0.0623839907348156,
0.13289417326450348,
0.07487944513559341,
0.001182687352411449,
0.04128427058458328,
0.01483428105711937,
0.06730766594409943,
-0.06330449879169464,
0.021267173811793327,
0.02637488953769207,
-0.023849202319979668,
0.04232136905193329,
0.09455970674753189,
2.742352831690555e-33,
0.02931925095617771,
-0.031974997371435165,
0.029643099755048752,
0.07207612693309784,
0.15992701053619385,
0.04731060191988945,
0.07566418498754501,
-0.05284731835126877,
-0.03649657219648361,
-0.03031989000737667,
-0.0818638950586319,
-0.009811297990381718,
-0.03902757167816162,
-0.03360390663146973,
-0.07977116107940674,
0.026382939890027046,
-0.0586438924074173,
-0.007509622722864151,
0.07342425733804703,
-0.000492993276566267,
-0.017084531486034393,
-0.005114669445902109,
-0.06924141198396683,
0.046776268631219864,
0.03855754807591438,
0.022299015894532204,
-0.005121443886309862,
-0.07069011777639389,
0.049297887831926346,
0.011672863736748695,
0.10475046932697296,
0.07034492492675781,
-0.044255491346120834,
-0.005974370986223221,
-0.1566152274608612,
-0.052101779729127884,
-0.07583732157945633,
0.034535109996795654,
-0.10775849223136902,
-0.03733820840716362,
-0.04875502362847328,
-0.017158599570393562,
-0.04059673473238945,
-0.03326130285859108,
-0.06235694885253906,
-0.055913738906383514,
-0.08289173245429993,
-0.04685725271701813,
0.05110463500022888,
-0.039291322231292725,
0.02625981532037258,
-0.021107610315084457,
0.06515423953533173,
-0.027174076065421104,
0.05845257639884949,
-0.047491684556007385,
0.034093815833330154,
-0.0027072750963270664,
-0.07754259556531906,
0.002572898520156741,
-0.1013435572385788,
0.02822915092110634,
-0.039470355957746506,
0.025657588616013527,
0.07487612217664719,
0.02493426203727722,
-0.06457489728927612,
0.03480304032564163,
0.011465238407254219,
0.06422056257724762,
0.006996139418333769,
0.002999476855620742,
0.016526419669389725,
-0.04077862948179245,
0.0173709224909544,
-0.07603849470615387,
-0.0447889119386673,
-0.02266211435198784,
-0.008917798288166523,
-0.020936140790581703,
0.07816480100154877,
0.0069061145186424255,
-0.051890674978494644,
0.016076698899269104,
-0.0033844367135316133,
-0.034691959619522095,
0.05746864154934883,
-0.03713053837418556,
0.007798890583217144,
0.04085148870944977,
-0.06564592570066452,
0.07231942564249039,
0.02894209884107113,
0.036645714193582535,
-0.03620697185397148,
-2.7303221980228657e-33,
-0.048943229019641876,
0.03722304105758667,
-0.08280415832996368,
0.09781519323587418,
-0.030774850398302078,
-0.060072969645261765,
0.06147429347038269,
-0.046609263867139816,
-0.0019204214913770556,
-0.06456349790096283,
-0.10694049298763275,
0.025477733463048935,
0.04680272191762924,
0.018005678430199623,
-0.024622105062007904,
-0.02450033649802208,
-0.0029794087167829275,
-0.09039109200239182,
0.0029983213171362877,
0.0586586557328701,
-0.07428713142871857,
0.01792781427502632,
0.0011698651360347867,
0.027403855696320534,
-0.004623636603355408,
0.02359708398580551,
0.13001681864261627,
-0.021621208637952805,
-0.01751510053873062,
-0.09119824320077896,
-0.004181644879281521,
-0.038331497460603714,
-0.014690359123051167,
0.029128743335604668,
-0.04788006842136383,
-0.021048929542303085,
0.02184237353503704,
0.13150657713413239,
-0.042926374822854996,
-0.0769842341542244,
0.07259337604045868,
-0.028982343152165413,
-0.10888030380010605,
-0.04810364916920662,
-0.02381267212331295,
0.05634361132979393,
0.06317543238401413,
-0.00019193757907487452,
-0.028785377740859985,
0.021166779100894928,
-0.0064302897080779076,
-0.08529527485370636,
0.03937884420156479,
0.09248648583889008,
-0.031173618510365486,
0.07360183447599411,
-0.02260514348745346,
0.07734528183937073,
0.04129274562001228,
-0.009835604578256607,
0.06514196842908859,
-0.012000140734016895,
0.05052502453327179,
-0.03852080926299095,
0.010256030596792698,
-0.04004357382655144,
0.015023337677121162,
0.010118736885488033,
0.035493601113557816,
-0.0737830251455307,
0.029108161106705666,
0.02573731541633606,
-0.001676401006989181,
0.07063791155815125,
0.09715719521045685,
0.023779917508363724,
-0.0445907786488533,
-0.018530873581767082,
-0.01659107580780983,
0.04173951968550682,
-0.03956087306141853,
0.012502580881118774,
-0.00924740545451641,
0.007125339936465025,
-0.007557069417089224,
0.00047776769497431815,
0.1022537499666214,
0.09234150499105453,
0.037828478962183,
0.005311356391757727,
0.06149844080209732,
-0.013643816113471985,
-0.05846155807375908,
-0.036816976964473724,
-0.040880218148231506,
-4.3902915081162064e-8,
-0.009173545986413956,
-0.08266277611255646,
-0.06145680695772171,
0.022181762382388115,
-0.002828837838023901,
0.0039406209252774715,
0.061911094933748245,
0.014102787710726261,
-0.0265110582113266,
0.07852483540773392,
-0.004560071509331465,
0.03282269090414047,
0.04114707186818123,
0.024702919647097588,
0.034164439886808395,
-0.03563019260764122,
0.010123959742486477,
-0.0523228794336319,
-0.004590677563101053,
-0.04035015404224396,
-0.07718425989151001,
-0.01065125036984682,
0.01725112833082676,
-0.0135197089985013,
-0.04649650305509567,
-0.0057975430972874165,
0.01945389248430729,
-0.026491696015000343,
-0.04222298786044121,
-0.04522344097495079,
-0.07381527870893478,
-0.031493719667196274,
-0.008327431976795197,
0.016874484717845917,
-0.11399973928928375,
-0.04939588904380798,
-0.033715445548295975,
-0.017905214801430702,
0.0669497698545456,
-0.009688504040241241,
-0.0031854838598519564,
-0.006985025946050882,
0.04836038872599602,
-0.015448562800884247,
-0.010657427832484245,
-0.02639409713447094,
-0.018545199185609818,
-0.015673387795686722,
0.02185552939772606,
0.06614164263010025,
-0.004433319438248873,
-0.04248078539967537,
0.10116052627563477,
-0.028715642169117928,
0.0012903204187750816,
-0.005636697169393301,
0.025591835379600525,
-0.03649551421403885,
0.040356434881687164,
0.032574161887168884,
0.006243214476853609,
0.01907973922789097,
-0.0064086043275892735,
-0.035140205174684525
] | 0.031216
|
%}} In this example, each pod works on one item from the queue and then exits. So, the completion count of the Job corresponds to the number of work items done. That is why the example manifest has `.spec.completions` set to `8`. ## Running the Job Now, run the Job: ```shell # this assumes you downloaded and then edited the manifest already kubectl apply -f ./job.yaml ``` You can wait for the Job to succeed, with a timeout: ```shell # The check for condition name is case insensitive kubectl wait --for=condition=complete --timeout=300s job/job-wq-1 ``` Next, check on the Job: ```shell kubectl describe jobs/job-wq-1 ``` ``` Name: job-wq-1 Namespace: default Selector: controller-uid=41d75705-92df-11e7-b85e-fa163ee3c11f Labels: controller-uid=41d75705-92df-11e7-b85e-fa163ee3c11f job-name=job-wq-1 Annotations: Parallelism: 2 Completions: 8 Start Time: Wed, 06 Sep 2022 16:42:02 +0000 Pods Statuses: 0 Running / 8 Succeeded / 0 Failed Pod Template: Labels: controller-uid=41d75705-92df-11e7-b85e-fa163ee3c11f job-name=job-wq-1 Containers: c: Image: container-registry.example/causal-jigsaw-637/job-wq-1 Port: Environment: BROKER\_URL: amqp://guest:guest@rabbitmq-service:5672 QUEUE: job1 Mounts: Volumes: Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message ───────── ──────── ───── ──── ───────────── ────── ────── ─────── 27s 27s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-hcobb 27s 27s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-weytj 27s 27s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-qaam5 27s 27s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-b67sr 26s 26s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-xe5hj 15s 15s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-w2zqe 14s 14s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-d6ppa 14s 14s 1 {job } Normal SuccessfulCreate Created pod: job-wq-1-p17e0 ``` All the pods for that Job succeeded! You're done. ## Alternatives This approach has the advantage that you do not need to modify your "worker" program to be aware that there is a work queue. You can include the worker program unmodified in your container image. Using this approach does require that you run a message queue service. If running a queue service is inconvenient, you may want to consider one of the other [job patterns](/docs/concepts/workloads/controllers/job/#job-patterns). This approach creates a pod for every work item. If your work items only take a few seconds, though, creating a Pod for every work item may add a lot of overhead. Consider another design, such as in the [fine parallel work queue example](/docs/tasks/job/fine-parallel-processing-work-queue/), that executes multiple work items per Pod. In this example, you used the `amqp-consume` utility to read the message from the queue and run the actual program. This has the advantage that you do not need to modify your program to be aware of the queue. The [fine parallel work queue example](/docs/tasks/job/fine-parallel-processing-work-queue/) shows how to communicate with the work queue using a client library. ## Caveats If the number of completions is set to less than the number of items in the queue, then not all items will be processed. If the number of completions is set to more than the number of items in the queue, then the Job will not appear to be completed, even though all items in the queue have been processed. It will start additional pods which will block waiting for a message. You would need to make your own mechanism to spot when there is work to do and measure the size of the queue, setting the number of completions to match. There is an unlikely race with this pattern. If the container is killed in between the time that the message is acknowledged by the `amqp-consume` command and the time that the container exits with success, or if the node crashes before the kubelet is able to post the success of the pod back to the API server, then the Job
| null |
./vendor/kubernetes/content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
[
0.01638508401811123,
-0.002363424049690366,
0.0014420348452404141,
-0.016611702740192413,
-0.021001022309064865,
-0.03233864903450012,
0.03559894487261772,
-0.05563969910144806,
0.10430429875850677,
0.020097116008400917,
0.003013439243659377,
-0.06789765506982803,
-0.02011847123503685,
-0.062409695237874985,
0.008910661563277245,
-0.019020168110728264,
0.04178693890571594,
-0.06270439177751541,
-0.025898434221744537,
-0.14262022078037262,
0.04164842516183853,
0.04829585179686546,
0.06501775234937668,
-0.043910592794418335,
-0.10580398142337799,
0.014269676990807056,
-0.05238611251115799,
-0.04270847886800766,
0.04238143935799599,
-0.05862315371632576,
-0.030006129294633865,
0.041009288281202316,
0.027867183089256287,
0.033201150596141815,
0.09637369215488434,
0.07936961948871613,
-0.04375964775681496,
-0.07552123069763184,
-0.059186577796936035,
0.020919067785143852,
0.07806676626205444,
-0.043878454715013504,
-0.11244484037160873,
0.00804529432207346,
0.029277000576257706,
-0.037467069923877716,
-0.09081128984689713,
-0.05167968198657036,
0.03726711869239807,
-0.01520427968353033,
0.0011892876354977489,
-0.07750684022903442,
0.05384231358766556,
0.031102992594242096,
0.0976550281047821,
0.03373335674405098,
0.009567883796989918,
0.04523535445332527,
0.09165722131729126,
-0.004332765005528927,
0.01948169432580471,
-0.05545033887028694,
-0.00837683118879795,
-0.035342540591955185,
0.021025102585554123,
-0.037588655948638916,
-0.03037106618285179,
-0.033819716423749924,
0.0087043521925807,
0.0029749730601906776,
0.021769635379314423,
-0.026634633541107178,
-0.002876727841794491,
-0.04348149523139,
-0.05830225348472595,
0.009847549721598625,
0.0008758505573496222,
0.03477130085229874,
-0.06645644456148148,
-0.07495695352554321,
-0.029485277831554413,
-0.03747430071234703,
0.0020235017873346806,
-0.0466698594391346,
-0.06570246070623398,
-0.006719006225466728,
-0.0015969176311045885,
-0.0598372258245945,
0.07115613669157028,
-0.026208030059933662,
0.018999133259058,
-0.037312936037778854,
-0.04222904145717621,
-0.07577276974916458,
0.023758793249726295,
-0.003013275098055601,
-0.010438676923513412,
0.07904691249132156,
0.02923629619181156,
0.009057853370904922,
0.039420247077941895,
-0.01111751701682806,
0.010118423029780388,
0.003029630985110998,
0.030204905197024345,
-0.07100333273410797,
-0.06098781153559685,
0.00014767197717446834,
-0.01332068257033825,
0.017261549830436707,
-0.020676331594586372,
-0.006441903300583363,
0.03491219878196716,
0.09249967336654663,
0.008652002550661564,
0.015931712463498116,
0.036563530564308167,
0.049644552171230316,
0.00814605038613081,
0.047973208129405975,
0.13901503384113312,
-0.003017691895365715,
0.006296705920249224,
0.0014046316500753164,
-0.09408516436815262,
-0.008170966058969498,
0.07873410731554031,
8.907504971317662e-34,
0.06409864872694016,
-0.14383149147033691,
0.015702923759818077,
-0.02404140681028366,
0.04833226650953293,
-0.1215066984295845,
-0.0038177326787263155,
0.03724991902709007,
-0.006823358591645956,
0.027298565953969955,
-0.07074488699436188,
0.018672823905944824,
-0.05093634873628616,
0.011437742039561272,
-0.03337814658880234,
0.012284732423722744,
-0.04945160821080208,
0.03403249755501747,
0.014936820603907108,
0.006729177664965391,
0.08241791278123856,
-0.10457512736320496,
-0.12427480518817902,
0.06756033003330231,
0.01950196363031864,
0.012600641697645187,
0.031201811507344246,
-0.08624555915594101,
-0.013772562146186829,
0.036608170717954636,
0.007009598426520824,
0.014469452202320099,
-0.0399160273373127,
-0.007708562072366476,
-0.11307700723409653,
0.010832295753061771,
0.02374194748699665,
0.04056921601295471,
-0.021351685747504234,
-0.10383780300617218,
-0.02716018632054329,
-0.054098691791296005,
0.0008401252562180161,
-0.03835703432559967,
0.005647274665534496,
-0.0723213404417038,
0.021094372496008873,
-0.06698062270879745,
0.03625989705324173,
0.0955667719244957,
0.03702592849731445,
-0.03596183657646179,
0.06778840720653534,
-0.02406897023320198,
0.02104124426841736,
0.01424578670412302,
0.07792497426271439,
0.018781522288918495,
-0.04912209510803223,
0.07355830818414688,
-0.08946289867162704,
-0.01181826088577509,
-0.05264648050069809,
0.05382664129137993,
0.007576188072562218,
0.029088648036122322,
-0.010503849945962429,
0.041111476719379425,
0.007895252667367458,
0.0858037993311882,
-0.0708463117480278,
0.0609457790851593,
0.010693201795220375,
-0.027818752452731133,
0.03860246762633324,
-0.08191774785518646,
0.017665578052401543,
-0.029327193275094032,
-0.16667260229587555,
0.04505738988518715,
0.0067903208546340466,
-0.016541028395295143,
-0.07093192636966705,
-0.04747204855084419,
0.07328479737043381,
0.05131354182958603,
0.007116259075701237,
-0.016406137496232986,
-0.057090096175670624,
0.017740357667207718,
-0.014657119289040565,
0.005086595192551613,
-0.07142902910709381,
0.025360675528645515,
-0.03767716884613037,
-3.667715759982283e-33,
0.11898421496152878,
-0.04157787561416626,
0.0044734119437634945,
0.008218924514949322,
0.04075591266155243,
-0.0044253128580749035,
-0.017211750149726868,
0.03861352801322937,
-0.012067870236933231,
-0.04717561602592468,
-0.07431115955114365,
-0.001606825622729957,
0.05264647677540779,
0.07014642655849457,
-0.1115221455693245,
0.03721890598535538,
-0.04445165395736694,
-0.02905398979783058,
-0.03405707702040672,
0.06174863129854202,
-0.006995673291385174,
-0.04077635705471039,
0.04111836105585098,
0.03637564927339554,
-0.031133875250816345,
0.023987986147403717,
-0.004163485951721668,
-0.01471673883497715,
-0.043070439249277115,
0.015615319833159447,
0.031515397131443024,
-0.10350867360830307,
-0.048998329788446426,
0.08096310496330261,
0.006275290623307228,
-0.06436540931463242,
-0.005896095186471939,
0.087199866771698,
0.0047789691016077995,
0.03105953335762024,
0.05207769572734833,
-0.0008738820906728506,
-0.008477485738694668,
-0.023621687665581703,
-0.10153202712535858,
0.011371604166924953,
0.09623782336711884,
-0.04588594660162926,
-0.03558547794818878,
-0.10579389333724976,
0.00946859922260046,
0.06393473595380783,
-0.07241007685661316,
0.16285823285579681,
-0.030660560354590416,
0.007423927076160908,
-0.024911435320973396,
-0.0357988141477108,
-0.09203311055898666,
0.027863144874572754,
0.029964424669742584,
-0.043330367654561996,
0.1446492075920105,
-0.00817229226231575,
0.032988496124744415,
-0.06645815819501877,
0.049184929579496384,
0.04597625136375427,
0.0501328781247139,
0.006793971173465252,
0.014870185405015945,
0.030005106702446938,
-0.021390393376350403,
0.0347537137567997,
-0.03133039548993111,
0.00501609593629837,
-0.01795336790382862,
-0.041608184576034546,
0.018168868497014046,
0.06427717208862305,
-0.03283870220184326,
0.025640355423092842,
-0.04431299492716789,
-0.008110717870295048,
0.004409025888890028,
0.09851518273353577,
0.0723688155412674,
0.0914553850889206,
0.030849602073431015,
0.06477213650941849,
0.02813299559056759,
0.03952990099787712,
0.03725960850715637,
0.07307597994804382,
-0.06055359169840813,
-4.9562462578478517e-8,
0.0030208902899175882,
-0.03785410895943642,
-0.021142419427633286,
-0.0218520350754261,
0.07059560716152191,
-0.022420063614845276,
-0.03430904075503349,
0.03935685381293297,
-0.08472748100757599,
-0.06075627729296684,
-0.0018240315839648247,
0.012750623747706413,
-0.07729840278625488,
0.0888998806476593,
0.06589855253696442,
-0.05069925636053085,
0.06449289619922638,
0.04145776852965355,
0.037868525832891464,
-0.05773117393255234,
-0.03684629499912262,
-0.028628144413232803,
0.018457908183336258,
-0.026474399492144585,
-0.02857188694179058,
0.10752426087856293,
0.04626493901014328,
0.015461607836186886,
0.04492703452706337,
0.019145909696817398,
-0.013143801130354404,
-0.0014401067746803164,
-0.09685423225164413,
0.028177741914987564,
0.016102926805615425,
-0.017505047842860222,
-0.021241692826151848,
-0.01712016575038433,
0.03330318257212639,
0.03474139794707298,
-0.0025585032999515533,
0.0022258234675973654,
-0.09045412391424179,
0.019943159073591232,
0.001011467189528048,
0.04807691276073456,
-0.04346931353211403,
0.03033640794456005,
-0.026567334309220314,
-0.015288922935724258,
-0.008451470173895359,
-0.10499205440282822,
-0.011110269464552402,
0.05433853715658188,
-0.010371347889304161,
-0.01860181987285614,
0.05084046721458435,
-0.08825117349624634,
0.03347058966755867,
0.028149528428912163,
0.006176138296723366,
-0.05120116472244263,
0.011941962875425816,
0.03046438656747341
] | 0.158635
|
container is killed in between the time that the message is acknowledged by the `amqp-consume` command and the time that the container exits with success, or if the node crashes before the kubelet is able to post the success of the pod back to the API server, then the Job will not appear to be complete, even though all items in the queue have been processed.
| null |
./vendor/kubernetes/content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/coarse-parallel-processing-work-queue.md
|
[
0.021474923938512802,
0.06718718260526657,
0.042264025658369064,
0.03448248282074928,
-0.00028650229796767235,
-0.05551041290163994,
0.009118716232478619,
-0.06799077242612839,
0.08951221406459808,
0.014069278724491596,
-0.047616180032491684,
-0.038315050303936005,
-0.01589878462255001,
-0.04182787984609604,
-0.04506747052073479,
-0.0012114628916606307,
0.1292342096567154,
-0.06840121001005173,
-0.019738372415304184,
-0.04827765375375748,
-0.0055884504690766335,
0.044813647866249084,
0.05389103665947914,
0.017655275762081146,
-0.047674521803855896,
-0.022371891885995865,
-0.04449998959898949,
-0.060713086277246475,
0.0692685917019844,
-0.028174011036753654,
-0.05171898007392883,
-0.01574132777750492,
0.0009550153044983745,
0.04326402023434639,
0.09050414711236954,
0.145771786570549,
0.030895723029971123,
-0.09495320916175842,
-0.04288015142083168,
0.031900856643915176,
0.027739129960536957,
-0.02628493495285511,
-0.1614837646484375,
0.060136422514915466,
0.03913359344005585,
-0.012342596426606178,
-0.06098611280322075,
-0.05239313468337059,
-0.0014194324612617493,
0.00104723428376019,
-0.04848998412489891,
-0.06993184983730316,
0.06917133927345276,
0.056797388941049576,
0.08953255414962769,
0.06520400941371918,
-0.03290865570306778,
0.041629258543252945,
0.012329100631177425,
0.03115778975188732,
-0.0005981120630167425,
0.010662556625902653,
0.017672071233391762,
0.011563509702682495,
0.05796676501631737,
-0.04331117868423462,
-0.030923597514629364,
-0.017180364578962326,
0.033365797251462936,
-0.036590348929166794,
0.07377008348703384,
-0.05784895271062851,
-0.06832876801490784,
-0.023524247109889984,
0.011123716831207275,
0.03166899085044861,
-0.009695252403616905,
-0.04370838403701782,
-0.07452178746461868,
0.04521048441529274,
-0.02065720222890377,
-0.038323406130075455,
0.05154898762702942,
-0.08081072568893433,
-0.079238161444664,
-0.021276868879795074,
-0.034713808447122574,
-0.017459707334637642,
0.03257284685969353,
-0.05050968751311302,
-0.012496892362833023,
-0.006955412216484547,
-0.021865693852305412,
-0.07526563107967377,
0.08201123774051666,
0.005309668369591236,
-0.006009760312736034,
0.0390423946082592,
-0.0012317703804001212,
-0.010771670378744602,
0.07909033447504044,
0.05324095860123634,
-0.03185320645570755,
0.036356016993522644,
0.05809679999947548,
-0.08473780006170273,
-0.016319070011377335,
-0.006101446226239204,
0.004492428619414568,
-0.02443930134177208,
0.014811844564974308,
-0.05523151531815529,
0.04366949573159218,
0.06833609938621521,
0.031226985156536102,
0.09277720004320145,
-0.022787725552916527,
-0.0014555121306329966,
0.0019416932482272387,
0.025769861415028572,
0.04470549896359444,
-0.049196403473615646,
-0.014387554489076138,
0.001538810203783214,
-0.061186533421278,
0.03330415114760399,
0.07367447018623352,
-1.0453067902652845e-33,
0.009137299843132496,
-0.13558009266853333,
0.06939226388931274,
-0.017376523464918137,
0.0635552778840065,
-0.08614810556173325,
0.002309186616912484,
-0.007766899652779102,
-0.006184576544910669,
-0.06747373938560486,
-0.07941380143165588,
-0.0672902762889862,
-0.04038390889763832,
0.004051091615110636,
-0.027859333902597427,
-0.03363104164600372,
-0.06589086353778839,
0.05575079098343849,
0.03298763185739517,
-0.011283202096819878,
0.039908792823553085,
-0.07220523804426193,
-0.08640088140964508,
0.07818932831287384,
0.01796823740005493,
0.030719749629497528,
0.017554905265569687,
-0.03982134908437729,
-0.0051876576617360115,
0.02918703854084015,
-0.028343988582491875,
0.0742630660533905,
-0.06595662236213684,
0.02849026955664158,
-0.17874854803085327,
0.03370406851172447,
-0.046502940356731415,
0.038300834596157074,
-0.04949222505092621,
-0.08419620245695114,
-0.05840575695037842,
0.040475983172655106,
-0.028303463011980057,
-0.059820063412189484,
-0.04222910851240158,
-0.10360987484455109,
0.03058687411248684,
-0.06031301990151405,
0.029052333906292915,
0.05708366632461548,
0.009029904380440712,
-0.03960632160305977,
0.05248419940471649,
0.0030798225197941065,
0.013494089245796204,
0.05113109201192856,
0.12591545283794403,
-0.018103519454598427,
-0.0680629163980484,
0.05907242372632027,
-0.03792864456772804,
-0.01471895631402731,
-0.012049642391502857,
-0.009721695445477962,
0.04811958223581314,
0.09350656718015671,
-0.02043323591351509,
0.03207603096961975,
0.01762058399617672,
0.09344176203012466,
-0.031928613781929016,
0.03837225213646889,
0.00020571050117723644,
-0.007565632462501526,
0.014303176663815975,
-0.03807305172085762,
-0.026576105505228043,
-0.01675158366560936,
-0.12861280143260956,
0.02941720001399517,
0.12383121252059937,
-0.07478176057338715,
0.02772360108792782,
-0.03125042840838432,
0.00829513929784298,
0.011726758442819118,
0.07681699097156525,
-0.002676567295566201,
0.022620301693677902,
0.09168632328510284,
-0.022811103612184525,
0.0424625426530838,
-0.02964252047240734,
0.04607285186648369,
-0.07229303568601608,
-6.107122483466322e-34,
0.019162863492965698,
-0.011799593456089497,
-0.0705265998840332,
0.037840522825717926,
-0.01284755114465952,
-0.022847002372145653,
-0.016247376799583435,
0.02764914184808731,
0.0035030636936426163,
-0.02668868936598301,
-0.07212405651807785,
-0.00947302021086216,
0.03176411986351013,
0.12393598258495331,
-0.0797596201300621,
0.002418592106550932,
0.00916165579110384,
-0.01859433390200138,
-0.019994528964161873,
0.076655313372612,
-0.03255847468972206,
-0.02982182241976261,
-0.010075855068862438,
0.01555799413472414,
-0.05043642967939377,
0.03040081076323986,
0.05544668808579445,
-0.051391541957855225,
-0.054651468992233276,
-0.06593590974807739,
0.08202313631772995,
-0.09992649406194687,
0.002345541724935174,
0.07057066261768341,
0.038971129804849625,
-0.05032951384782791,
-0.031062226742506027,
0.11038607358932495,
-0.03700503706932068,
-0.03272607550024986,
0.10743953287601471,
0.021009568125009537,
-0.07935722172260284,
-0.004154771566390991,
-0.03252808377146721,
-0.06622297316789627,
0.0394662506878376,
-0.03649645298719406,
0.017427241429686546,
-0.07253556698560715,
-0.0451432466506958,
-0.017080485820770264,
0.047059278935194016,
0.1271880865097046,
-0.04663047939538956,
0.013890630565583706,
0.02984933741390705,
0.07297272235155106,
0.013566020876169205,
-0.06466398388147354,
0.01390813384205103,
-0.024314522743225098,
0.10089250653982162,
-0.0598018653690815,
0.06537645310163498,
-0.08176489919424057,
0.059496477246284485,
0.0442848838865757,
0.05335024371743202,
-0.01532759889960289,
0.048996470868587494,
0.08659514039754868,
-0.015888476744294167,
0.08415138721466064,
-0.046991173177957535,
0.04536886885762215,
-0.07327231019735336,
-0.03914816305041313,
0.03922679275274277,
0.010703573934733868,
-0.039658088237047195,
0.043127380311489105,
-0.03361724317073822,
0.028714755550026894,
0.04848258197307587,
0.023805899545550346,
0.0761345773935318,
0.02053835801780224,
0.009891332127153873,
0.011208970099687576,
0.01810639165341854,
0.00815067533403635,
-0.07082532346248627,
0.07421361654996872,
-0.022888923063874245,
-3.3936291998770685e-8,
0.05414360389113426,
-0.03907762095332146,
-0.025700818747282028,
0.038574282079935074,
0.07073447853326797,
-0.045561663806438446,
0.04210842400789261,
0.030454352498054504,
-0.043843451887369156,
0.034578319638967514,
-0.06443162262439728,
-0.01007643062621355,
-0.020508144050836563,
0.00740628968924284,
0.06994424015283585,
-0.04149128496646881,
-0.00424224091693759,
-0.018358245491981506,
0.02864781580865383,
-0.07040388882160187,
-0.08875620365142822,
-0.0242704376578331,
0.020816054195165634,
-0.012096616439521313,
-0.04130008816719055,
0.07141812890768051,
0.08376064151525497,
0.03173583000898361,
0.020118407905101776,
-0.030752133578062057,
-0.0535249263048172,
-0.021830003708600998,
-0.03718059882521629,
0.016712535172700882,
-0.02199924923479557,
-0.006354188080877066,
-0.04948064312338829,
-0.023657169193029404,
0.023664502426981926,
-0.0090531837195158,
-0.021208686754107475,
-0.0007920474745333195,
-0.023869287222623825,
-0.013970136642456055,
0.039213892072439194,
0.06446810811758041,
-0.009529617615044117,
0.08289339393377304,
-0.025511037558317184,
0.05688094720244408,
0.02578023076057434,
-0.09572935104370117,
-0.018195684999227524,
0.01664510928094387,
0.04450705274939537,
-0.03901512548327446,
0.03641271963715553,
-0.052949875593185425,
0.020075291395187378,
0.005787602625787258,
0.0673912838101387,
-0.02239588461816311,
0.045880816876888275,
-0.010483568534255028
] | 0.134426
|
In this example, you will run a Kubernetes Job that runs multiple parallel tasks as worker processes, each running as a separate Pod. In this example, as each pod is created, it picks up one unit of work from a task queue, processes it, and repeats until the end of the queue is reached. Here is an overview of the steps in this example: 1. \*\*Start a storage service to hold the work queue.\*\* In this example, you will use Redis to store work items. In the [previous example](/docs/tasks/job/coarse-parallel-processing-work-queue), you used RabbitMQ. In this example, you will use Redis and a custom work-queue client library; this is because AMQP does not provide a good way for clients to detect when a finite-length work queue is empty. In practice you would set up a store such as Redis once and reuse it for the work queues of many jobs, and other things. 1. \*\*Create a queue, and fill it with messages.\*\* Each message represents one task to be done. In this example, a message is an integer that we will do a lengthy computation on. 1. \*\*Start a Job that works on tasks from the queue\*\*. The Job starts several pods. Each pod takes one task from the message queue, processes it, and repeats until the end of the queue is reached. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} You will need a container image registry where you can upload images to run in your cluster. The example uses [Docker Hub](https://hub.docker.com/), but you could adapt it to a different container image registry. This task example also assumes that you have Docker installed locally. You use Docker to build container images. Be familiar with the basic, non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/). ## Starting Redis For this example, for simplicity, you will start a single instance of Redis. See the [Redis Example](https://github.com/kubernetes/examples/tree/master/web/guestbook/) for an example of deploying Redis scalably and redundantly. You could also download the following files directly: - [`redis-pod.yaml`](/examples/application/job/redis/redis-pod.yaml) - [`redis-service.yaml`](/examples/application/job/redis/redis-service.yaml) - [`Dockerfile`](/examples/application/job/redis/Dockerfile) - [`job.yaml`](/examples/application/job/redis/job.yaml) - [`rediswq.py`](/examples/application/job/redis/rediswq.py) - [`worker.py`](/examples/application/job/redis/worker.py) To start a single instance of Redis, you need to create the redis pod and redis service: ```shell kubectl apply -f https://k8s.io/examples/application/job/redis/redis-pod.yaml kubectl apply -f https://k8s.io/examples/application/job/redis/redis-service.yaml ``` ## Filling the queue with tasks Now let's fill the queue with some "tasks". In this example, the tasks are strings to be printed. Start a temporary interactive pod for running the Redis CLI. ```shell kubectl run -i --tty temp --image redis --command "/bin/sh" ``` ``` Waiting for pod default/redis2-c7h78 to be running, status is Pending, pod ready: false Hit enter for command prompt ``` Now hit enter, start the Redis CLI, and create a list with some work items in it. ```shell redis-cli -h redis ``` ```console redis:6379> rpush job2 "apple" (integer) 1 redis:6379> rpush job2 "banana" (integer) 2 redis:6379> rpush job2 "cherry" (integer) 3 redis:6379> rpush job2 "date" (integer) 4 redis:6379> rpush job2 "fig" (integer) 5 redis:6379> rpush job2 "grape" (integer) 6 redis:6379> rpush job2 "lemon" (integer) 7 redis:6379> rpush job2 "melon" (integer) 8 redis:6379> rpush job2 "orange" (integer) 9 redis:6379> lrange job2 0 -1 1) "apple" 2) "banana" 3) "cherry" 4) "date" 5) "fig" 6) "grape" 7) "lemon" 8) "melon" 9) "orange" ``` So, the list with key `job2` will be the work queue. Note: if you do not have Kube DNS setup correctly, you may need to change the first step of the above block to `redis-cli -h $REDIS\_SERVICE\_HOST`. ## Create a container image {#create-an-image} Now you are ready to create an image that will process the work in that queue. You're going to use a Python worker program with
| null |
./vendor/kubernetes/content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
[
-0.029509978368878365,
-0.02279595099389553,
-0.007850894704461098,
0.03098149038851261,
-0.10928931832313538,
-0.04495891183614731,
0.034495677798986435,
-0.040813516825437546,
0.08075739443302155,
0.06489881128072739,
-0.042408253997564316,
-0.007297573611140251,
0.02992803417146206,
-0.03705465421080589,
-0.007587927393615246,
-0.03511807322502136,
0.10533124953508377,
-0.055726177990436554,
-0.05101776868104935,
-0.11622945219278336,
0.02585955709218979,
-0.0054978360421955585,
0.034460872411727905,
-0.016196442767977715,
-0.08099915087223053,
-0.02332417294383049,
-0.05622505024075508,
-0.019124099984765053,
-0.014206944033503532,
-0.028591405600309372,
0.007291688118129969,
-0.05223100259900093,
0.020881542935967445,
0.04980733245611191,
0.05435739830136299,
0.10330653190612793,
0.011284342966973782,
-0.06463328003883362,
-0.09614410996437073,
0.04516970366239548,
0.027135204523801804,
-0.06330556422472,
-0.094271220266819,
0.0185531135648489,
0.056375857442617416,
-0.007928659208118916,
-0.09098675847053528,
-0.0008505001314915717,
0.07445147633552551,
-0.014082372188568115,
-0.018573235720396042,
-0.08633562177419662,
0.012754051946103573,
0.10649745166301727,
0.07570452243089676,
0.05890392139554024,
-0.01710515096783638,
-0.048540037125349045,
0.02458309382200241,
-0.011194520629942417,
0.034498803317546844,
-0.05030382424592972,
0.04420620575547218,
-0.014161253347992897,
-0.016017330810427666,
0.004925095476210117,
-0.016207287088036537,
0.04141920432448387,
0.02855648659169674,
-0.06860528886318207,
0.04403889924287796,
-0.02233409881591797,
-0.053299665451049805,
-0.022741490975022316,
-0.031168384477496147,
0.0256907157599926,
0.013833826407790184,
0.05337340384721756,
-0.09515396505594254,
-0.06690604984760284,
-0.01939455047249794,
0.0061789583414793015,
0.04454187676310539,
-0.018621845170855522,
-0.03221248462796211,
-0.008152307942509651,
-0.010370930656790733,
-0.04723197594285011,
0.0387275256216526,
-0.10199744254350662,
0.007909479551017284,
0.022267064079642296,
0.004828188102692366,
-0.09643915295600891,
0.06457947939634323,
-0.012928800657391548,
0.0015394482761621475,
0.03917606174945831,
0.04198029637336731,
-0.010115239769220352,
0.07602716982364655,
-0.026246754452586174,
0.09567134827375412,
0.025735775008797646,
0.0030438194517046213,
-0.04672720283269882,
-0.05314964801073074,
-0.018828848376870155,
-0.02917546033859253,
-0.06307870149612427,
-0.0016594803892076015,
0.025407755747437477,
0.022958507761359215,
0.020441733300685883,
0.06089228391647339,
0.05186596140265465,
0.021784968674182892,
-0.024477411061525345,
0.009428339079022408,
0.09243053942918777,
0.04775072634220123,
-0.06691259145736694,
-0.027956349775195122,
-0.027141425758600235,
0.025543414056301117,
0.03122539259493351,
0.0166560597717762,
3.230121090157394e-33,
0.019283447414636612,
-0.036729034036397934,
0.054995134472846985,
-0.006271866150200367,
0.08895623683929443,
-0.04552186653017998,
-0.01126935426145792,
0.010414160788059235,
-0.05802436172962189,
-0.040680646896362305,
-0.08397667855024338,
0.06629384309053421,
-0.00847210269421339,
0.048107657581567764,
-0.031527575105428696,
-0.020628225058317184,
-0.023735996335744858,
0.022506767883896828,
0.11256667971611023,
0.004390928894281387,
-0.005279627162963152,
-0.0782347247004509,
-0.06649307906627655,
0.07071889936923981,
0.08099987357854843,
-0.05642883852124214,
0.01709403283894062,
-0.11129596829414368,
0.022471027448773384,
0.01598089374601841,
0.006322109140455723,
0.06648343056440353,
-0.05912444368004799,
0.04160833731293678,
-0.1711978167295456,
0.047419365495443344,
-0.08002059161663055,
0.03628716245293617,
-0.01164715550839901,
-0.07649283856153488,
-0.031661249697208405,
0.0019804469775408506,
-0.004773293621838093,
-0.05046868324279785,
-0.04256044328212738,
-0.019656050950288773,
-0.016416369006037712,
-0.09303217381238937,
0.02226608246564865,
0.0005525822634808719,
0.05591381713747978,
0.021145939826965332,
0.08439775556325912,
-0.01682940684258938,
0.06536461412906647,
0.011456272564828396,
0.09533105790615082,
0.041729189455509186,
-0.035425759851932526,
0.10658378154039383,
-0.07404123246669769,
-0.0013265664456412196,
-0.07281225919723511,
0.06006678193807602,
0.053235139697790146,
0.01598546653985977,
-0.007248890586197376,
0.01662883348762989,
0.0674673318862915,
0.04101433604955673,
-0.021305633708834648,
0.042265791445970535,
0.07085414230823517,
-0.04467478394508362,
0.03386329859495163,
-0.0193420872092247,
-0.011274464428424835,
0.0018586008809506893,
-0.15242870151996613,
-0.004576195031404495,
-0.04454505443572998,
-0.013096652925014496,
-0.031087109819054604,
0.034037381410598755,
0.007475639693439007,
-0.022138502448797226,
0.06471001356840134,
0.022297993302345276,
-0.013911494985222816,
0.0061026974581182,
-0.012967661023139954,
-0.00583674805238843,
-0.012062362395226955,
0.015618582256138325,
-0.0324009470641613,
-2.6324338243131013e-33,
0.042653538286685944,
-0.005835658870637417,
-0.11206717789173126,
0.08211492747068405,
0.056233715265989304,
-0.0049653672613203526,
0.02814248390495777,
-0.02119130827486515,
-0.029017334803938866,
-0.06368143856525421,
-0.10007024556398392,
-0.038994040340185165,
0.019797170534729958,
0.06900884211063385,
-0.03962366282939911,
-0.030773542821407318,
0.02228653058409691,
-0.057422198355197906,
-0.020411796867847443,
0.046599164605140686,
-0.0433541014790535,
-0.009562713094055653,
0.0031357493717223406,
-0.007071702741086483,
0.018390003591775894,
0.03442811220884323,
0.00706871785223484,
-0.08617237955331802,
-0.06519205868244171,
-0.07003220170736313,
-0.043901801109313965,
-0.12124505639076233,
0.01955500617623329,
-0.017426177859306335,
0.04526076838374138,
-0.06606296449899673,
-0.021954724565148354,
0.0829058513045311,
-0.005997741594910622,
-0.048646099865436554,
0.10267741978168488,
-0.03457464650273323,
-0.048890020698308945,
-0.05416500195860863,
-0.049355652183294296,
0.002724716207012534,
-0.054455578327178955,
0.019341321662068367,
-0.0813477635383606,
-0.056658945977687836,
-0.056521810591220856,
-0.010682990774512291,
-0.061268121004104614,
0.08841211348772049,
0.011953217908740044,
0.0011338023468852043,
0.03698711842298508,
0.04315008968114853,
-0.024242276325821877,
0.029405180364847183,
-0.01767902262508869,
-0.10829430818557739,
0.11533649265766144,
0.0036357201170176268,
0.03790368139743805,
-0.04213957116007805,
0.0840258076786995,
-0.04623410850763321,
-0.02378673292696476,
0.00986831821501255,
0.02268856391310692,
0.0849810466170311,
0.046384427696466446,
0.10567490011453629,
0.0046845488250255585,
-0.0515592135488987,
-0.02923332341015339,
-0.04354487732052803,
-0.00028235092759132385,
0.06535626202821732,
-0.01814054511487484,
0.0036878162063658237,
-0.00013425428187474608,
0.10599265992641449,
0.018530143424868584,
0.06571096181869507,
0.121749147772789,
0.04505287483334541,
0.038654476404190063,
-0.04625152796506882,
0.038980137556791306,
0.022944068536162376,
-0.06767921894788742,
0.08961785584688187,
-0.007701151538640261,
-4.954110011112789e-8,
0.03744697943329811,
-0.019188877195119858,
-0.034859996289014816,
0.0526825487613678,
0.05480296164751053,
-0.056290555745363235,
0.03436949849128723,
0.031907159835100174,
-0.011045480147004128,
0.04549400135874748,
0.012791764922440052,
-0.01907264068722725,
0.02806372195482254,
-0.01619594730436802,
0.07384810596704483,
0.02610054239630699,
0.06853801757097244,
-0.013650227338075638,
0.01543557271361351,
-0.036064762622117996,
0.02298717573285103,
0.05388343334197998,
-0.008555837906897068,
0.051022522151470184,
-0.02945483848452568,
0.05312070623040199,
0.10240672528743744,
-0.05435650050640106,
0.06427311152219772,
-0.03781759738922119,
-0.04499875754117966,
-0.02159590646624565,
-0.03181515261530876,
0.06516766548156738,
0.0070848483592271805,
-0.08456795662641525,
-0.03803898021578789,
0.05381364747881889,
0.0552094429731369,
0.0049715060740709305,
-0.0037629082798957825,
-0.020505227148532867,
-0.02523653395473957,
-0.00807268638163805,
0.07432741671800613,
0.027270980179309845,
-0.11713188886642456,
0.012486251071095467,
0.005452209152281284,
0.0538608655333519,
-0.046271201223134995,
-0.030531488358974457,
0.08003891259431839,
0.09762009233236313,
-0.019972670823335648,
-0.03123624622821808,
0.0680960938334465,
-0.07597913593053818,
0.06129945069551468,
0.04545007646083832,
0.01808561570942402,
-0.006121351383626461,
-0.030063781887292862,
0.04373777657747269
] | 0.223382
|
DNS setup correctly, you may need to change the first step of the above block to `redis-cli -h $REDIS\_SERVICE\_HOST`. ## Create a container image {#create-an-image} Now you are ready to create an image that will process the work in that queue. You're going to use a Python worker program with a Redis client to read the messages from the message queue. A simple Redis work queue client library is provided, called `rediswq.py` ([Download](/examples/application/job/redis/rediswq.py)). The "worker" program in each Pod of the Job uses the work queue client library to get work. Here it is: {{% code\_sample language="python" file="application/job/redis/worker.py" %}} You could also download [`worker.py`](/examples/application/job/redis/worker.py), [`rediswq.py`](/examples/application/job/redis/rediswq.py), and [`Dockerfile`](/examples/application/job/redis/Dockerfile) files, then build the container image. Here's an example using Docker to do the image build: ```shell docker build -t job-wq-2 . ``` ### Push the image For the [Docker Hub](https://hub.docker.com/), tag your app image with your username and push to the Hub with the below commands. Replace `` with your Hub username. ```shell docker tag job-wq-2 /job-wq-2 docker push /job-wq-2 ``` You need to push to a public repository or [configure your cluster to be able to access your private repository](/docs/concepts/containers/images/). ## Defining a Job Here is a manifest for the Job you will create: {{% code\_sample file="application/job/redis/job.yaml" %}} {{< note >}} Be sure to edit the manifest to change `gcr.io/myproject` to your own path. {{< /note >}} In this example, each pod works on several items from the queue and then exits when there are no more items. Since the workers themselves detect when the workqueue is empty, and the Job controller does not know about the workqueue, it relies on the workers to signal when they are done working. The workers signal that the queue is empty by exiting with success. So, as soon as \*\*any\*\* worker exits with success, the controller knows the work is done, and that the Pods will exit soon. So, you need to leave the completion count of the Job unset. The job controller will wait for the other pods to complete too. ## Running the Job So, now run the Job: ```shell # this assumes you downloaded and then edited the manifest already kubectl apply -f ./job.yaml ``` Now wait a bit, then check on the Job: ```shell kubectl describe jobs/job-wq-2 ``` ``` Name: job-wq-2 Namespace: default Selector: controller-uid=b1c7e4e3-92e1-11e7-b85e-fa163ee3c11f Labels: controller-uid=b1c7e4e3-92e1-11e7-b85e-fa163ee3c11f job-name=job-wq-2 Annotations: Parallelism: 2 Completions: Start Time: Mon, 11 Jan 2022 17:07:59 +0000 Pods Statuses: 1 Running / 0 Succeeded / 0 Failed Pod Template: Labels: controller-uid=b1c7e4e3-92e1-11e7-b85e-fa163ee3c11f job-name=job-wq-2 Containers: c: Image: container-registry.example/exampleproject/job-wq-2 Port: Environment: Mounts: Volumes: Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 33s 33s 1 {job-controller } Normal SuccessfulCreate Created pod: job-wq-2-lglf8 ``` You can wait for the Job to succeed, with a timeout: ```shell # The check for condition name is case insensitive kubectl wait --for=condition=complete --timeout=300s job/job-wq-2 ``` ```shell kubectl logs pods/job-wq-2-7r7b2 ``` ``` Worker with sessionID: bbd72d0a-9e5c-4dd6-abf6-416cc267991f Initial queue state: empty=False Working on banana Working on date Working on lemon ``` As you can see, one of the pods for this Job worked on several work units. ## Alternatives If running a queue service or modifying your containers to use a work queue is inconvenient, you may want to consider one of the other [job patterns](/docs/concepts/workloads/controllers/job/#job-patterns). If you have a continuous stream of background processing work to run, then consider running your background workers with a ReplicaSet instead, and consider running a background processing library such as [https://github.com/resque/resque](https://github.com/resque/resque).
| null |
./vendor/kubernetes/content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
[
-0.05355029180645943,
-0.022357916459441185,
-0.053157415241003036,
-0.0034472281113266945,
-0.03811004385352135,
-0.13078844547271729,
0.042928315699100494,
-0.03870806097984314,
0.006298982072621584,
-0.004191124811768532,
-0.05636279657483101,
-0.0005020871758460999,
0.014540047384798527,
0.03332711011171341,
0.01447291299700737,
-0.04108121618628502,
0.060854680836200714,
-0.010287528857588768,
-0.02971159853041172,
-0.10797785967588425,
0.028323937207460403,
0.03735744580626488,
0.04601531848311424,
-0.02341427095234394,
-0.10665906220674515,
-0.03868403658270836,
-0.04473916068673134,
0.010108050890266895,
-0.037307657301425934,
-0.04474705085158348,
0.04673631489276886,
-0.014038612134754658,
0.010364300571382046,
-0.0023675025440752506,
0.1264125108718872,
0.19035501778125763,
0.06579606980085373,
-0.06648068130016327,
-0.02333865873515606,
0.05021137371659279,
0.11177042871713638,
-0.022975614294409752,
0.03423478081822395,
-0.02722974866628647,
0.01575424335896969,
0.0012440001592040062,
-0.016254901885986328,
0.08979768306016922,
0.08040781319141388,
-0.05278675630688667,
-0.014306441880762577,
-0.033492110669612885,
0.057728659361600876,
0.022069474682211876,
0.012456011027097702,
0.015152184292674065,
-0.010063509456813335,
-0.03804101049900055,
-0.021766778081655502,
-0.08957549929618835,
-0.024158867076039314,
-0.03438882902264595,
0.048814985901117325,
-0.038801416754722595,
-0.060679737478494644,
-0.005156330298632383,
-0.06959712505340576,
0.022987063974142075,
0.0009802584536373615,
-0.02061556838452816,
-0.010992989875376225,
-0.012218908406794071,
-0.04120080545544624,
-0.06283410638570786,
-0.0179285928606987,
-0.03003091551363468,
0.045375265181064606,
0.017689935863018036,
-0.1205919086933136,
-0.10505533963441849,
0.022866006940603256,
-0.02313905581831932,
0.07678869366645813,
0.05539886653423309,
-0.045494444668293,
-0.02707616612315178,
0.019039824604988098,
-0.058369312435388565,
0.05124269425868988,
-0.08411786705255508,
0.00044577839435078204,
-0.03187600150704384,
-0.023164503276348114,
-0.004363080486655235,
0.048530321568250656,
0.01763182319700718,
-0.011189009062945843,
0.017034845426678658,
-0.010264266282320023,
0.04760599136352539,
0.03762929514050484,
-0.06946412473917007,
0.07929591834545135,
0.009252486750483513,
0.020913485437631607,
0.016560794785618782,
-0.11297056823968887,
0.0057419901713728905,
-0.02882751077413559,
-0.003809823654592037,
-0.01703263260424137,
0.05631077662110329,
0.02046537958085537,
0.0477030947804451,
0.01571078784763813,
0.014593577943742275,
-0.04747994616627693,
0.006033055949956179,
-0.07225821912288666,
-0.0016886757221072912,
0.11991369724273682,
-0.06775768101215363,
-0.06054962798953056,
-0.06887394934892654,
0.04406609758734703,
-0.08454562723636627,
-0.01210295595228672,
9.038519326846575e-34,
0.02270914614200592,
-0.03592580556869507,
0.046939726918935776,
0.06017802283167839,
0.11362911760807037,
0.007129968609660864,
0.005291086155921221,
0.018864154815673828,
0.0031526568345725536,
-0.020275169983506203,
-0.12642216682434082,
0.05781089887022972,
0.011381522752344608,
0.014509419910609722,
-0.05717076361179352,
0.046858593821525574,
0.04313690587878227,
0.03878549486398697,
0.05595269426703453,
0.09689504653215408,
0.029136361554265022,
-0.026424456387758255,
-0.08753420412540436,
0.0012554414570331573,
0.04341629520058632,
-0.03471478447318077,
0.015304399654269218,
-0.1176040768623352,
0.04923712834715843,
-0.03378687798976898,
0.03645009547472,
0.007125000935047865,
0.08648969233036041,
0.07110174000263214,
-0.05472114309668541,
-0.015029256232082844,
0.007597781252115965,
0.019362730905413628,
-0.07676408439874649,
-0.026376470923423767,
0.022331053391098976,
0.01811222732067108,
-0.0695091113448143,
0.027368655428290367,
-0.0281258225440979,
0.007246826775372028,
-0.034702181816101074,
-0.07123320549726486,
0.037506792694330215,
0.04962677136063576,
0.07898878306150436,
-0.02803771197795868,
0.11867266148328781,
-0.021609364077448845,
0.05630333721637726,
-0.0393187440931797,
0.03090953826904297,
0.01642964966595173,
0.003962715622037649,
-0.0400509238243103,
-0.04061513394117355,
0.03756744787096977,
-0.007420234382152557,
0.04104620963335037,
0.15114447474479675,
0.03979630023241043,
0.030243678018450737,
0.004584004636853933,
0.023078782483935356,
0.01024721935391426,
-0.04847731068730354,
0.10561828315258026,
0.027422495186328888,
0.017315370962023735,
0.025264175608754158,
-0.0454929918050766,
0.020009176805615425,
-0.018132125958800316,
-0.05033932626247406,
0.043345365673303604,
0.010913500562310219,
-0.020638421177864075,
-0.07116701453924179,
0.014439267106354237,
0.0130693931132555,
0.008957925252616405,
0.008458063006401062,
0.03763369098305702,
0.007369993254542351,
-0.007746451068669558,
-0.007766573689877987,
-0.055448174476623535,
-0.018744036555290222,
-0.040104545652866364,
0.018585287034511566,
-1.5767162866968585e-33,
0.021126842126250267,
-0.05223798379302025,
-0.10689140111207962,
0.02581799402832985,
0.028360264375805855,
-0.04556640610098839,
0.08155574649572372,
0.026286965236067772,
-0.030429525300860405,
0.005889825988560915,
-0.041081301867961884,
-0.0281542781740427,
-0.023414386436343193,
0.07273737341165543,
-0.053942739963531494,
0.024327287450432777,
0.006749098654836416,
-0.01149475947022438,
-0.039691824465990067,
0.03306388854980469,
-0.07612674683332443,
0.05359572917222977,
0.00821754615753889,
0.034922268241643906,
-0.040114399045705795,
0.039007242769002914,
0.014472399838268757,
-0.031652841717004776,
-0.10611084848642349,
-0.10566775500774384,
-0.06772977113723755,
0.00016863069322425872,
-0.029770243912935257,
0.027917293831706047,
0.009386113844811916,
0.0039023205172270536,
-0.07097993046045303,
0.08962927758693695,
0.004081456921994686,
-0.035068999975919724,
0.11752448230981827,
-0.05610637366771698,
-0.0967552661895752,
-0.03279964625835419,
0.009771683253347874,
-0.03875306621193886,
-0.053167231380939484,
0.05218229070305824,
-0.09949401766061783,
0.005104219075292349,
0.005656130611896515,
0.001197859295643866,
-0.009077181108295918,
0.054057106375694275,
0.014307971112430096,
-0.006451387889683247,
0.022454967722296715,
0.04632878303527832,
-0.0676930844783783,
0.0734865590929985,
-0.00116982392501086,
-0.1336604356765747,
-0.008123406209051609,
0.0643591433763504,
-0.03169972077012062,
-0.07632757723331451,
-0.027033280581235886,
-0.0043344879522919655,
0.044961344450712204,
0.0031291558407247066,
0.024622106924653053,
0.05153387412428856,
0.009748736396431923,
0.08613472431898117,
0.015395250171422958,
-0.020042354241013527,
-0.006145332474261522,
-0.04529262334108353,
-0.0022419297602027655,
0.12188898772001266,
-0.053925156593322754,
-0.011113940738141537,
0.01577015221118927,
0.1000242754817009,
0.08151811361312866,
0.06668946146965027,
0.09111440926790237,
-0.004863850772380829,
0.06446076184511185,
-0.0663747489452362,
0.040560927242040634,
-0.03535899892449379,
0.008040066808462143,
-0.00787828117609024,
-0.023318078368902206,
-4.3376065406164344e-8,
0.023151429370045662,
0.006503700278699398,
-0.03191213309764862,
0.0206143856048584,
-0.014739084988832474,
0.021658623591065407,
0.025310028344392776,
-0.01799819804728031,
-0.046249669045209885,
0.024805331602692604,
-0.041678402572870255,
-0.038526859134435654,
-0.029965467751026154,
-0.05093465745449066,
0.032047294080257416,
0.08952748775482178,
0.0674273744225502,
0.0600011944770813,
0.017580388113856316,
-0.06080329045653343,
0.06599942594766617,
0.01106409914791584,
-0.050606269389390945,
0.02629358507692814,
-0.04750712960958481,
0.045247167348861694,
0.12232889980077744,
-0.11851347982883453,
0.012898856773972511,
-0.04585903882980347,
0.06600413471460342,
-0.0661999061703682,
-0.02586759626865387,
0.0642324686050415,
-0.010302451439201832,
-0.1009063720703125,
-0.04132644459605217,
-0.014183960855007172,
0.05618850141763687,
-0.03229084983468056,
-0.024846013635396957,
0.03165152668952942,
-0.03590429201722145,
-0.05214126780629158,
0.03338615968823433,
0.007627313490957022,
-0.09637128561735153,
0.00329213822260499,
0.021136553958058357,
0.005691457539796829,
-0.03864813223481178,
-0.008694037795066833,
0.0233258455991745,
0.06838306039571762,
0.026218388229608536,
-0.03515397757291794,
0.08661409467458725,
-0.040112417191267014,
0.013747723773121834,
0.08889491856098175,
0.010844768024981022,
0.02860145829617977,
-0.008891716599464417,
0.07400191575288773
] | 0.098759
|
a continuous stream of background processing work to run, then consider running your background workers with a ReplicaSet instead, and consider running a background processing library such as [https://github.com/resque/resque](https://github.com/resque/resque).
| null |
./vendor/kubernetes/content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/fine-parallel-processing-work-queue.md
|
[
-0.017210373654961586,
-0.056257352232933044,
-0.02903030440211296,
-0.021780312061309814,
0.04644493758678436,
-0.1281987726688385,
-0.0673576220870018,
-0.0654466450214386,
0.00462624104693532,
0.023776108399033546,
-0.05706057325005531,
0.0039351871237158775,
-0.021904943510890007,
-0.028072601184248924,
-0.010312598198652267,
-0.020521482452750206,
0.07691653817892075,
-0.03446348384022713,
-0.04086823761463165,
-0.025765255093574524,
-0.10858854651451111,
-0.042747195810079575,
0.03950672596693039,
0.017242787405848503,
-0.05096553638577461,
0.027573904022574425,
0.02452099323272705,
-0.11611506342887878,
0.008286948315799236,
0.02010677009820938,
-0.0015820757253095508,
-0.027001434937119484,
-0.05785723030567169,
0.014608370140194893,
0.08388013392686844,
0.06929725408554077,
-0.060375019907951355,
-0.007790285628288984,
-0.05022049695253372,
-0.03782395273447037,
0.10965307056903839,
0.0069585200399160385,
-0.06239018216729164,
0.042904965579509735,
-0.02092044986784458,
-0.0006403017905540764,
0.03161293640732765,
-0.04282689467072487,
0.017321093007922173,
-0.05033533275127411,
-0.013174218125641346,
-0.03555646166205406,
0.03269002586603165,
0.021535662934184074,
-0.010775656439363956,
0.035992469638586044,
0.04399432986974716,
0.015296527184545994,
0.0336192324757576,
-0.00024548222427256405,
0.045736853033304214,
0.010482551530003548,
-0.055074967443943024,
-0.03696181997656822,
0.002269057324156165,
0.07520439475774765,
0.03277549147605896,
0.04459257423877716,
0.1141175776720047,
-0.06195769086480141,
0.0539364255964756,
0.10919958353042603,
-0.06750993430614471,
0.020680230110883713,
-0.017070310190320015,
-0.00187508889939636,
-0.039454247802495956,
-0.10364986211061478,
-0.0005474197678267956,
-0.0704178437590599,
-0.004520993214100599,
-0.12048174440860748,
-0.022132573649287224,
0.015433436259627342,
0.007324845064431429,
0.054553307592868805,
0.04492725059390068,
0.04090599715709686,
0.0017499434761703014,
-0.004344250541180372,
-0.017760487273335457,
0.07563543319702148,
-0.006152709946036339,
-0.03087671473622322,
-0.006714251823723316,
0.018006419762969017,
0.04051264002919197,
0.08308190852403641,
0.06397349387407303,
-0.00023529115424025804,
0.02747288905084133,
-0.021587353199720383,
0.10898970067501068,
0.05716400966048241,
0.04332643002271652,
-0.02215869538486004,
0.007357288617640734,
0.03252789378166199,
-0.047821804881095886,
-0.05765167623758316,
0.021801693364977837,
0.02193365804851055,
0.020596031099557877,
0.10302028805017471,
0.04573127627372742,
0.05605167895555496,
0.050155431032180786,
-0.014117862097918987,
-0.11559643596410751,
0.0671297162771225,
0.07251784950494766,
0.028294768184423447,
-0.06934512406587601,
-0.08382236212491989,
0.02704131044447422,
-0.04774419963359833,
0.06714209914207458,
8.179114488605439e-34,
0.058704983443021774,
-0.03701997920870781,
0.018668368458747864,
-0.01882200315594673,
0.09485509246587753,
-0.029086394235491753,
0.0012791036861017346,
0.017681576311588287,
0.010100034065544605,
-0.003460749052464962,
-0.046640794724226,
0.030071157962083817,
0.017673278227448463,
-0.022615939378738403,
-0.03660432994365692,
-0.11062998324632645,
0.06923386454582214,
0.037399228662252426,
0.010810640640556812,
0.05900829657912254,
0.04459343105554581,
-0.06360417604446411,
-0.12663312256336212,
0.04620308056473732,
-0.0072863223031163216,
0.01993866264820099,
-0.012119422666728497,
0.04022882878780365,
0.059635914862155914,
0.005779253784567118,
0.06415414810180664,
0.08926904201507568,
-0.04957905039191246,
0.028209146112203598,
-0.08053173869848251,
-0.045868098735809326,
-0.013998975977301598,
0.006271874997764826,
-0.014421903528273106,
-0.09227842837572098,
0.0005763325607404113,
0.05973593518137932,
-0.026631196960806847,
0.0021351524628698826,
-0.007496638223528862,
-0.08126959204673767,
0.0033266893588006496,
-0.026177233085036278,
0.01258764322847128,
0.07083271443843842,
0.09022790193557739,
0.0150530356913805,
-0.0019234581850469112,
-0.05162889510393143,
-0.017615314573049545,
0.02345249056816101,
0.057916197925806046,
-0.030591407790780067,
0.016674697399139404,
0.048718709498643875,
0.02618950977921486,
-0.018270067870616913,
-0.1050071120262146,
0.060644447803497314,
0.06383556127548218,
-0.023604504764080048,
0.0005411780439317226,
0.04990028217434883,
-0.0029282604809850454,
0.0603853277862072,
0.012606303207576275,
0.02100885845720768,
0.07083548605442047,
-0.03348342701792717,
0.06572562456130981,
0.0030944577883929014,
-0.05088890716433525,
0.015110522508621216,
-0.21082358062267303,
0.027305539697408676,
0.03396594896912575,
0.012664001435041428,
-0.018122268840670586,
-0.043223924934864044,
0.050492558628320694,
0.0997147262096405,
-0.03699449077248573,
-0.007353285327553749,
-0.04923427477478981,
0.044989440590143204,
0.0026137803215533495,
-0.0365065261721611,
0.004286332055926323,
0.00872125942260027,
-0.05425013229250908,
4.258145633907194e-34,
-0.01975080370903015,
-0.010851511731743813,
-0.005238305777311325,
0.05666914954781532,
0.10080865770578384,
0.0258012842386961,
-0.004426517989486456,
-0.017157061025500298,
-0.007150536868721247,
-0.01649741642177105,
-0.09111890196800232,
-0.06626366078853607,
-0.005387356039136648,
0.11717062443494797,
-0.048228804022073746,
-0.054986704140901566,
0.07979602366685867,
-0.011569997295737267,
-0.026867996901273727,
0.025437960401177406,
-0.055952101945877075,
0.042161088436841965,
-0.024827096611261368,
-0.03197477385401726,
0.010749544948339462,
0.036404360085725784,
-0.07381422072649002,
0.04928605258464813,
-0.007425331976264715,
-0.029384363442659378,
-0.008873817510902882,
0.005785580724477768,
-0.05614320561289787,
-0.07551655918359756,
0.03269806131720543,
-0.03384597226977348,
-0.014935492537915707,
0.12365017086267471,
-0.005605997052043676,
-0.06732340902090073,
0.060412678867578506,
-0.02581699937582016,
-0.08133556693792343,
0.004005126189440489,
-0.00054514518706128,
-0.054832734167575836,
-0.05569501221179962,
-0.03111797384917736,
-0.11561073362827301,
0.022469615563750267,
-0.0015557666774839163,
0.03974957391619682,
0.03318320959806442,
0.03661132603883743,
0.015785036608576775,
0.00728817330673337,
0.04106910154223442,
0.055400919169187546,
-0.03010733611881733,
-0.003557724179700017,
0.04710904136300087,
-0.0471113920211792,
0.02373061701655388,
-0.023794876411557198,
0.056906647980213165,
0.025169342756271362,
-0.008801715448498726,
0.05183493718504906,
-0.010406583547592163,
0.02160252444446087,
0.04286739602684975,
0.08908333629369736,
-0.042204663157463074,
0.09689729660749435,
-0.04680199176073074,
-0.04820432513952255,
-0.046497639268636703,
-0.07890457659959793,
-0.0010289663914591074,
0.175226628780365,
-0.02112524025142193,
0.03496231883764267,
-0.013291439041495323,
0.04016736522316933,
0.029529208317399025,
0.06720364093780518,
-0.027812045067548752,
-0.005145811475813389,
0.03821137174963951,
-0.006781715899705887,
-0.019746169447898865,
-0.008033227175474167,
-0.02515356056392193,
0.04461623728275299,
-0.007562836166471243,
-3.7334842772906995e-8,
0.005066296551376581,
0.06976532191038132,
-0.03180166706442833,
0.08528167009353638,
0.006876982282847166,
-0.01693360134959221,
-0.03629613295197487,
-0.013818287290632725,
0.006509417202323675,
-0.003343178890645504,
-0.022607091814279556,
-0.11304433643817902,
0.049253832548856735,
0.04898719862103462,
0.05511891469359398,
-0.047532856464385986,
0.09173405915498734,
-0.06899810582399368,
-0.05142027884721756,
-0.06614834815263748,
-0.018740655854344368,
0.063824363052845,
-0.01283317431807518,
0.0432145819067955,
-0.03677438199520111,
0.030562998726963997,
0.1080593466758728,
-0.03239141032099724,
-0.04960748180747032,
-0.03351705148816109,
-0.07420535385608673,
0.0064436220563948154,
-0.0052672214806079865,
-0.07108254730701447,
0.011037476360797882,
0.03272261843085289,
0.06720364838838577,
-0.04715912789106369,
-0.020186228677630424,
-0.05915217846632004,
0.0530443899333477,
0.020847942680120468,
0.010678224265575409,
0.005512606352567673,
0.02340126223862171,
-0.041987184435129166,
-0.04591800644993782,
0.00843467190861702,
0.08463385701179504,
0.009876194410026073,
0.09886553883552551,
-0.09524088352918625,
-0.018160758540034294,
0.06855335831642151,
0.05866072699427605,
-0.04296047240495682,
0.06766001135110855,
-0.06637109071016312,
0.046232350170612335,
0.052605364471673965,
0.0532572977244854,
-0.06108269467949867,
-0.042478661984205246,
0.031736526638269424
] | 0.079302
|
{{< feature-state for\_k8s\_version="v1.24" state="stable" >}} In this example, you will run a Kubernetes Job that uses multiple parallel worker processes. Each worker is a different container running in its own Pod. The Pods have an \_index number\_ that the control plane sets automatically, which allows each Pod to identify which part of the overall task to work on. The pod index is available in the {{< glossary\_tooltip text="annotation" term\_id="annotation" >}} `batch.kubernetes.io/job-completion-index` as a string representing its decimal value. In order for the containerized task process to obtain this index, you can publish the value of the annotation using the [downward API](/docs/concepts/workloads/pods/downward-api/) mechanism. For convenience, the control plane automatically sets the downward API to expose the index in the `JOB\_COMPLETION\_INDEX` environment variable. Here is an overview of the steps in this example: 1. \*\*Define a Job manifest using indexed completion\*\*. The downward API allows you to pass the pod index annotation as an environment variable or file to the container. 2. \*\*Start an `Indexed` Job based on that manifest\*\*. ## {{% heading "prerequisites" %}} You should already be familiar with the basic, non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/). {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Choose an approach To access the work item from the worker program, you have a few options: 1. Read the `JOB\_COMPLETION\_INDEX` environment variable. The Job {{< glossary\_tooltip text="controller" term\_id="controller" >}} automatically links this variable to the annotation containing the completion index. 1. Read a file that contains the completion index. 1. Assuming that you can't modify the program, you can wrap it with a script that reads the index using any of the methods above and converts it into something that the program can use as input. For this example, imagine that you chose option 3 and you want to run the [rev](https://man7.org/linux/man-pages/man1/rev.1.html) utility. This program accepts a file as an argument and prints its content reversed. ```shell rev data.txt ``` You'll use the `rev` tool from the [`busybox`](https://hub.docker.com/\_/busybox) container image. As this is only an example, each Pod only does a tiny piece of work (reversing a short string). In a real workload you might, for example, create a Job that represents the task of producing 60 seconds of video based on scene data. Each work item in the video rendering Job would be to render a particular frame of that video clip. Indexed completion would mean that each Pod in the Job knows which frame to render and publish, by counting frames from the start of the clip. ## Define an Indexed Job Here is a sample Job manifest that uses `Indexed` completion mode: {{% code\_sample language="yaml" file="application/job/indexed-job.yaml" %}} In the example above, you use the builtin `JOB\_COMPLETION\_INDEX` environment variable set by the Job controller for all containers. An [init container](/docs/concepts/workloads/pods/init-containers/) maps the index to a static value and writes it to a file that is shared with the container running the worker through an [emptyDir volume](/docs/concepts/storage/volumes/#emptydir). Optionally, you can [define your own environment variable through the downward API](/docs/tasks/inject-data-application/environment-variable-expose-pod-information/) to publish the index to containers. You can also choose to load a list of values from a [ConfigMap as an environment variable or file](/docs/tasks/configure-pod-container/configure-pod-configmap/). Alternatively, you can directly [use the downward API to pass the annotation value as a volume file](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#store-pod-fields), like shown in the following example: {{% code\_sample language="yaml" file="application/job/indexed-job-vol.yaml" %}} ## Running the Job Now run the Job: ```shell # This uses the first approach (relying on $JOB\_COMPLETION\_INDEX) kubectl apply -f https://kubernetes.io/examples/application/job/indexed-job.yaml ``` When you create this Job, the control plane creates a series of Pods, one for each index you specified. The value of `.spec.parallelism` determines how many can run at once
| null |
./vendor/kubernetes/content/en/docs/tasks/job/indexed-parallel-processing-static.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/indexed-parallel-processing-static.md
|
[
-0.03391454741358757,
0.031979456543922424,
0.049510784447193146,
0.027528883889317513,
-0.030323421582579613,
0.006289327517151833,
0.05699162557721138,
-0.03777977451682091,
0.049311891198158264,
0.016361990943551064,
-0.07098173350095749,
-0.06307084858417511,
-0.04442468658089638,
-0.027780806645751,
-0.031102342531085014,
-0.021106500178575516,
0.02747790515422821,
-0.02300223335623741,
-0.051304563879966736,
-0.08536041527986526,
0.09239029884338379,
0.04827527329325676,
0.03577495366334915,
0.04195062071084976,
-0.04732353985309601,
0.031985219568014145,
-0.03655605763196945,
-0.025248738005757332,
0.056731194257736206,
0.03031099960207939,
-0.09055180102586746,
0.030435843393206596,
-0.01792023703455925,
0.05038842931389809,
0.08099320530891418,
0.03687841445207596,
-0.025336431339383125,
-0.03964937850832939,
-0.01836569607257843,
0.015021262690424919,
0.08090079575777054,
-0.060517676174640656,
-0.09642759710550308,
-0.008106022141873837,
0.0054059866815805435,
0.012983489781618118,
-0.07316291332244873,
-0.058294087648391724,
0.013497918844223022,
0.03637681156396866,
0.009283910505473614,
-0.10626992583274841,
0.070722796022892,
0.039414599537849426,
0.0775439664721489,
0.04418749362230301,
0.01019352488219738,
0.013487052172422409,
0.03913082554936409,
0.030591437593102455,
0.05219773203134537,
-0.07180634140968323,
-0.02108663320541382,
-0.03346506878733635,
0.062276944518089294,
-0.0628107562661171,
0.026390891522169113,
-0.05114022269845009,
-0.023327117785811424,
-0.10154905170202255,
0.057049091905355453,
-0.025746691972017288,
0.010382206179201603,
-0.04323951154947281,
-0.020298050716519356,
0.004387937020510435,
-0.018723219633102417,
0.06149496138095856,
-0.0024857267271727324,
-0.0979335680603981,
0.022036593407392502,
0.02526092156767845,
0.11794935911893845,
0.03531902655959129,
-0.06765098869800568,
-0.09007676690816879,
0.018572896718978882,
-0.035287074744701385,
0.08638034760951996,
-0.0005219590966589749,
-0.008778568357229233,
-0.07669220119714737,
-0.00028645771089941263,
-0.1187363862991333,
0.06503156572580338,
0.0304552149027586,
-0.0369751937687397,
0.048472970724105835,
0.00654186587780714,
-0.0025162396486848593,
0.017884530127048492,
-0.00862240232527256,
0.007176696322858334,
0.017825989052653313,
0.05350019410252571,
-0.017696676775813103,
-0.07937025278806686,
-0.06270386278629303,
-0.02126549556851387,
-0.0065123154781758785,
0.011417503468692303,
0.050881002098321915,
0.013614976778626442,
0.06028057634830475,
0.03770323842763901,
-0.0552886500954628,
0.00416804663836956,
0.008962251245975494,
0.07071316987276077,
0.09740356355905533,
0.04112417623400688,
-0.10050655901432037,
-0.012686062604188919,
-0.011201680637896061,
-0.08954928070306778,
0.053945593535900116,
-0.0003940607130061835,
4.954948379360914e-34,
0.05443863198161125,
-0.08948695659637451,
0.0035913160536438227,
-0.03723810613155365,
0.0073938751593232155,
-0.07531136274337769,
-0.0423240028321743,
0.0006833149818703532,
-0.03721999749541283,
-0.00111265922896564,
-0.09858133643865585,
0.07195619493722916,
-0.017402078956365585,
-0.009515414945781231,
-0.06798045337200165,
-0.0569087378680706,
-0.016063421964645386,
0.09443624317646027,
0.018443437293171883,
0.008714544586837292,
0.08503641933202744,
-0.039767373353242874,
-0.073740154504776,
-0.03198746219277382,
0.10406168550252914,
-0.01665234938263893,
0.0013444296782836318,
-0.11984091997146606,
-0.05728306248784065,
0.028736090287566185,
0.002298761857673526,
0.005161861423403025,
0.009180349297821522,
0.00940723717212677,
-0.14773771166801453,
-0.026217609643936157,
-0.013012956827878952,
0.017075201496481895,
0.0276541355997324,
-0.04945916309952736,
-0.0028561537619680166,
-0.004363571759313345,
0.0013281259452924132,
-0.08765890449285507,
-0.03063390403985977,
0.028792284429073334,
-0.009495554491877556,
-0.07295697927474976,
0.09001705050468445,
0.057553261518478394,
0.044238653033971786,
-0.0282866433262825,
0.014759262092411518,
-0.05404643341898918,
0.049236543476581573,
-0.006655458360910416,
0.08401833474636078,
-0.010970816016197205,
0.0019510694546625018,
0.004464447498321533,
-0.09206271916627884,
0.03033030405640602,
-0.043324775993824005,
0.010052698664367199,
0.04773089662194252,
0.026354942470788956,
0.00757517060264945,
0.085469551384449,
0.03609199449419975,
0.014820492826402187,
-0.10580193996429443,
0.035700954496860504,
0.03027508594095707,
-0.002209956292062998,
0.037307195365428925,
-0.0643790066242218,
0.028887392953038216,
-0.056817371398210526,
-0.1539987325668335,
0.014435061253607273,
-0.020940685644745827,
-0.03303259238600731,
-0.03516942262649536,
0.007651693187654018,
0.07354902476072311,
-0.012906190939247608,
-0.01911306008696556,
-0.01753934659063816,
-0.04073897376656532,
-0.020846471190452576,
-0.013025075197219849,
-0.03711219131946564,
-0.08679002523422241,
0.017910879105329514,
-0.11337665468454361,
-2.3545282253374963e-33,
0.11579964309930801,
-0.005778324790298939,
-0.05510132014751434,
0.02235562913119793,
0.01015239767730236,
-0.024345267564058304,
0.05223456025123596,
0.012555723078548908,
-0.04673745855689049,
-0.020166577771306038,
-0.06585776805877686,
0.00515691889449954,
-0.00015672988956794143,
0.07725069671869278,
-0.04106346145272255,
0.04044586420059204,
-0.10296937078237534,
0.03459696099162102,
-0.005310975480824709,
0.021577054634690285,
-0.0371067151427269,
-0.03509250655770302,
-0.013850890100002289,
0.0731436088681221,
-0.02013157680630684,
-0.042392320930957794,
0.04477716609835625,
-0.01817169040441513,
0.001730576972477138,
-0.065045066177845,
-0.016904419288039207,
-0.1039464995265007,
0.002427907893434167,
0.05558914691209793,
0.03805917501449585,
-0.06881697475910187,
-0.005715247709304094,
-0.04534162953495979,
-0.0008041688706725836,
0.049406997859478,
0.08404424041509628,
-0.0023918941151350737,
-0.037559688091278076,
-0.024527667090296745,
-0.04301781579852104,
0.01755106821656227,
-0.015092859044671059,
0.00630528386682272,
-0.04222448915243149,
-0.11277846992015839,
0.019515741616487503,
0.018290163949131966,
-0.07859818637371063,
0.10914377123117447,
-0.04860391467809677,
-0.02338356338441372,
0.04935217648744583,
-0.037345752120018005,
-0.0890849381685257,
0.020983103662729263,
0.01892496645450592,
-0.07857999205589294,
0.13829898834228516,
0.020970655605196953,
0.05230959504842758,
-0.00823584571480751,
0.0088262427598238,
0.006090688519179821,
-0.029265668243169785,
-0.010142691433429718,
0.009424150921404362,
-0.01329075451940298,
0.06163550168275833,
0.030087577179074287,
-0.005917184520512819,
-0.03995547816157341,
0.05687854811549187,
-0.05830153822898865,
0.06480590999126434,
-0.002410982735455036,
-0.033253785222768784,
0.07244371622800827,
0.010186946019530296,
0.028798921033740044,
0.017203206196427345,
0.1291157305240631,
0.06734522432088852,
0.1643429845571518,
0.036912862211465836,
0.06142747402191162,
0.00466820178553462,
0.013822533190250397,
-0.04402739554643631,
0.10528930276632309,
0.0016463471110910177,
-5.2056506660846935e-8,
0.033222299069166183,
0.03826967254281044,
-0.028470203280448914,
0.031978800892829895,
0.008116723038256168,
-0.019957371056079865,
-0.013496537692844868,
0.05334384739398956,
-0.02514537423849106,
-0.032686226069927216,
0.011025435291230679,
0.020110806450247765,
-0.05366723611950874,
0.034309402108192444,
0.06723945587873459,
-0.004509709309786558,
0.006765818223357201,
0.04631670191884041,
0.018861107528209686,
-0.05658218637108803,
0.019658753648400307,
0.005801489111036062,
0.04029988870024681,
-0.008610508404672146,
-0.03587181493639946,
0.06789960712194443,
0.009638059884309769,
0.08653350919485092,
0.017570452764630318,
-0.0037742387503385544,
0.009318465366959572,
0.01656726934015751,
-0.08531245589256287,
0.09058962017297745,
0.024942273274064064,
0.00516338599845767,
-0.06935696303844452,
0.02993808500468731,
0.09743893146514893,
0.0475648008286953,
-0.005852244328707457,
-0.020025329664349556,
-0.07557770609855652,
-0.009265119209885597,
0.07113831490278244,
0.05989143252372742,
-0.05904436856508255,
0.011228013783693314,
-0.010856067761778831,
-0.02070978842675686,
-0.0651012435555458,
-0.03701265528798103,
0.01096470095217228,
0.15673384070396423,
-0.03602731227874756,
-0.016934940591454506,
-0.029829999431967735,
-0.05815867707133293,
0.03235515579581261,
0.020275777205824852,
0.02004282921552658,
-0.024247830733656883,
-0.017072070389986038,
0.008393951691687107
] | 0.191235
|
Job Now run the Job: ```shell # This uses the first approach (relying on $JOB\_COMPLETION\_INDEX) kubectl apply -f https://kubernetes.io/examples/application/job/indexed-job.yaml ``` When you create this Job, the control plane creates a series of Pods, one for each index you specified. The value of `.spec.parallelism` determines how many can run at once whereas `.spec.completions` determines how many Pods the Job creates in total. Because `.spec.parallelism` is less than `.spec.completions`, the control plane waits for some of the first Pods to complete before starting more of them. You can wait for the Job to succeed, with a timeout: ```shell # The check for condition name is case insensitive kubectl wait --for=condition=complete --timeout=300s job/indexed-job ``` Now, describe the Job and check that it was successful. ```shell kubectl describe jobs/indexed-job ``` The output is similar to: ``` Name: indexed-job Namespace: default Selector: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 Labels: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 job-name=indexed-job Annotations: Parallelism: 3 Completions: 5 Start Time: Thu, 11 Mar 2021 15:47:34 +0000 Pods Statuses: 2 Running / 3 Succeeded / 0 Failed Completed Indexes: 0-2 Pod Template: Labels: controller-uid=bf865e04-0b67-483b-9a90-74cfc4c3e756 job-name=indexed-job Init Containers: input: Image: docker.io/library/bash Port: Host Port: Command: bash -c items=(foo bar baz qux xyz) echo ${items[$JOB\_COMPLETION\_INDEX]} > /input/data.txt Environment: Mounts: /input from input (rw) Containers: worker: Image: docker.io/library/busybox Port: Host Port: Command: rev /input/data.txt Environment: Mounts: /input from input (rw) Volumes: input: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-njkjj Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-9kd4h Normal SuccessfulCreate 4s job-controller Created pod: indexed-job-qjwsz Normal SuccessfulCreate 1s job-controller Created pod: indexed-job-fdhq5 Normal SuccessfulCreate 1s job-controller Created pod: indexed-job-ncslj ``` In this example, you run the Job with custom values for each index. You can inspect the output of one of the pods: ```shell kubectl logs indexed-job-fdhq5 # Change this to match the name of a Pod from that Job ``` The output is similar to: ``` xuq ```
| null |
./vendor/kubernetes/content/en/docs/tasks/job/indexed-parallel-processing-static.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/indexed-parallel-processing-static.md
|
[
0.004866140428930521,
0.0063950843177735806,
0.001953974599018693,
0.01972482167184353,
-0.02396492101252079,
-0.04188951477408409,
-0.0420728363096714,
-0.03266998380422592,
0.08992515504360199,
0.0425008200109005,
0.01076466217637062,
-0.05090828239917755,
-0.018632065504789352,
-0.0949096605181694,
0.022914379835128784,
-0.07322993874549866,
0.016450725495815277,
-0.0562235452234745,
-0.0403083860874176,
-0.10145656019449234,
0.06934330612421036,
0.007484756410121918,
0.04773259907960892,
-0.03135646879673004,
-0.09966373443603516,
-0.0015987985534593463,
-0.045118898153305054,
-0.056331466883420944,
0.024195590987801552,
-0.04889320209622383,
-0.033697910606861115,
0.03281757980585098,
-0.021461278200149536,
0.047253403812646866,
0.04429139569401741,
0.07330001890659332,
-0.025997282937169075,
-0.07179437577724457,
-0.05289003252983093,
0.045312777161598206,
0.06186513602733612,
-0.07623864710330963,
-0.12536342442035675,
-0.012813007459044456,
0.009269816800951958,
-0.022990211844444275,
-0.07886049896478653,
-0.06049693003296852,
0.05604531988501549,
-0.06109246611595154,
-0.042808759957551956,
-0.09282931685447693,
0.036641236394643784,
0.033704422414302826,
0.08161365240812302,
0.056136488914489746,
-0.018675586208701134,
0.016169264912605286,
0.05105379596352577,
-0.0006594547303393483,
0.0060416329652071,
-0.05003361031413078,
-0.003089353907853365,
-0.033565450459718704,
0.05949806794524193,
-0.03724900633096695,
-0.01346307247877121,
-0.036282122135162354,
-0.000011608000932028517,
0.01107150036841631,
0.07057647407054901,
-0.018038708716630936,
-0.031057512387633324,
-0.01012515090405941,
-0.036958396434783936,
-0.010958108119666576,
0.045039672404527664,
0.03133232891559601,
-0.06574127078056335,
-0.08615896105766296,
-0.025796616449952126,
-0.009452581405639648,
0.01699642837047577,
-0.059131644666194916,
-0.10051491111516953,
-0.03654613718390465,
0.009110718965530396,
-0.05434585362672806,
0.04424434155225754,
-0.022995496168732643,
0.055895496159791946,
-0.023489397019147873,
-0.03722521662712097,
-0.06739185005426407,
0.07580244541168213,
0.031440138816833496,
-0.0358290895819664,
0.09587787836790085,
0.03708377480506897,
-0.027769429609179497,
0.06531649827957153,
-0.019918063655495644,
0.053575869649648666,
0.025479672476649284,
0.041503097862005234,
-0.035181280225515366,
-0.045430656522512436,
-0.04139045625925064,
-0.02031521499156952,
0.010003584437072277,
0.03225209191441536,
0.03723004832863808,
0.030847148969769478,
0.07553384453058243,
-0.007111879996955395,
0.0243392251431942,
0.016965163871645927,
0.03331433981657028,
0.07093051820993423,
0.10956685990095139,
0.10624955594539642,
0.007312914822250605,
0.04263267293572426,
0.0019311312353238463,
-0.06841710209846497,
0.0024090164806693792,
0.012442521750926971,
1.2120743574874347e-33,
0.04650356248021126,
-0.08920367062091827,
0.0008684609201736748,
-0.06877020001411438,
0.0060234530828893185,
-0.06603143364191055,
-0.016582287847995758,
0.023085931316018105,
-0.06212999299168587,
0.03583913668990135,
-0.1199680045247078,
0.030681559816002846,
-0.061316002160310745,
0.03774533048272133,
-0.051373183727264404,
-0.03464500606060028,
-0.025517897680401802,
0.02967134676873684,
0.014541863463819027,
0.024555092677474022,
0.09467215836048126,
-0.09035570174455643,
-0.08951327204704285,
0.07584287971258163,
0.02676261030137539,
-0.05037842318415642,
0.03339799493551254,
-0.10693881660699844,
-0.0528508760035038,
0.05455932766199112,
-0.013808620162308216,
-0.003677831031382084,
-0.01787891611456871,
0.01796392723917961,
-0.10737374424934387,
0.028952356427907944,
0.01341134775429964,
0.03578558936715126,
-0.016898401081562042,
-0.0672050192952156,
-0.04348672181367874,
-0.020206039771437645,
-0.002760381903499365,
-0.057988863438367844,
-0.006208730861544609,
-0.048177868127822876,
-0.05282249674201012,
-0.025529958307743073,
0.03025740198791027,
0.13055895268917084,
0.034258466213941574,
-0.001965518109500408,
0.031367525458335876,
-0.006976895499974489,
0.06330933421850204,
0.057232197374105453,
0.04978933557868004,
0.01951737515628338,
-0.02939288504421711,
0.10257689654827118,
-0.0831422209739685,
-0.011238576844334602,
-0.0753583163022995,
0.053806010633707047,
-0.02230170927941799,
0.03428799286484718,
0.011053518392145634,
0.06858975440263748,
-0.00016464493819512427,
0.08261550217866898,
-0.09998133033514023,
0.041985124349594116,
-0.015198446810245514,
-0.004809285048395395,
0.03734295442700386,
-0.07442054897546768,
0.028388196602463722,
-0.043167755007743835,
-0.1673300713300705,
-0.0072001246735453606,
-0.009875375777482986,
0.04802810028195381,
-0.06727591902017593,
-0.01803264021873474,
0.05214890465140343,
0.06844855099916458,
0.02615189738571644,
0.026846984401345253,
-0.046334169805049896,
-0.053732991218566895,
0.003587571904063225,
-0.0042601884342730045,
-0.04402092099189758,
0.0017568987095728517,
-0.07805794477462769,
-3.0233424502981375e-33,
0.14224541187286377,
-0.0693209171295166,
-0.011232279241085052,
0.056947484612464905,
0.05359388515353203,
-0.030476728454232216,
0.014693118631839752,
-0.005015313625335693,
-0.06268200278282166,
-0.04454631730914116,
-0.06509366631507874,
0.0024641696363687515,
0.02975136786699295,
0.0392884835600853,
-0.0831841304898262,
0.019939059391617775,
-0.03266485780477524,
-0.05508110672235489,
-0.013133608736097813,
0.029676197096705437,
-0.020778043195605278,
-0.04836286976933479,
0.04337679222226143,
0.03898056969046593,
-0.056116752326488495,
0.004696473944932222,
0.004041093401610851,
-0.02702801674604416,
-0.05212119594216347,
0.009939031675457954,
-0.003263719379901886,
-0.09295529872179031,
-0.03615367412567139,
0.08387961983680725,
0.027389701455831528,
-0.013111921958625317,
-0.03924907371401787,
0.04123218357563019,
0.026479341089725494,
0.061129871755838394,
0.04898154363036156,
0.012440389953553677,
-0.015519607812166214,
-0.016324231401085854,
-0.10881995409727097,
0.0011297229211777449,
0.05017409101128578,
-0.05296188220381737,
-0.007205666042864323,
-0.09857678413391113,
-0.00399238895624876,
0.054272592067718506,
-0.012063522823154926,
0.15120430290699005,
-0.00546473590657115,
-0.09122847020626068,
-0.010174518451094627,
-0.01571262627840042,
-0.07838215678930283,
0.03190508112311363,
0.014282475225627422,
-0.04343058541417122,
0.11742394417524338,
0.019643429666757584,
0.03851150721311569,
-0.0437750481069088,
0.015445571392774582,
-0.014078539796173573,
0.06852024793624878,
0.019616378471255302,
0.05259329080581665,
0.033560167998075485,
-0.01206758338958025,
0.03922678902745247,
-0.02985239587724209,
-0.020460309460759163,
-0.04103643074631691,
0.0022378440480679274,
0.028700681403279305,
0.1044827401638031,
-0.024271823465824127,
0.05902501568198204,
-0.018673598766326904,
-0.01695549301803112,
-0.0059999870136380196,
0.10742221027612686,
0.06335221976041794,
0.11409106850624084,
0.008962040767073631,
0.04384252801537514,
0.06530238687992096,
0.0594283752143383,
0.011882143095135689,
0.07877278327941895,
-0.0005814568721689284,
-4.501210071339301e-8,
0.08133579790592194,
-0.03917057439684868,
-0.02576875127851963,
0.04514599218964577,
0.06689240783452988,
-0.059082575142383575,
-0.044882189482450485,
0.010548840276896954,
-0.08859598636627197,
-0.04776117950677872,
0.019298281520605087,
0.032136302441358566,
-0.05293266847729683,
0.07835417240858078,
0.06341809034347534,
-0.02188158594071865,
0.04837321490049362,
0.02530202828347683,
0.029776107519865036,
-0.045051101595163345,
-0.03773340955376625,
0.04330341890454292,
-0.012078733183443546,
-0.012652909383177757,
-0.0209371205419302,
0.11489018052816391,
0.07083752751350403,
-0.002863145899027586,
0.02614491432905197,
0.032973259687423706,
-0.02740936167538166,
-0.021389363333582878,
-0.10160068422555923,
0.017290109768509865,
0.03367721661925316,
-0.02760491520166397,
-0.06271925568580627,
0.006808989681303501,
0.06072341278195381,
0.03851908817887306,
-0.007788802497088909,
-0.0008856146014295518,
-0.007777742110192776,
-0.00324423098936677,
0.03569413349032402,
0.024626636877655983,
-0.042166031897068024,
0.04727740213274956,
-0.012976862490177155,
-0.051176004111766815,
-0.06295276433229446,
-0.07431942969560623,
0.005616025533527136,
0.1207195445895195,
-0.028386864811182022,
0.008058160543441772,
0.0001952009042724967,
-0.06358925998210907,
0.018125683069229126,
0.013360160402953625,
0.010622053407132626,
-0.05190492793917656,
-0.026284072548151016,
0.01149581465870142
] | 0.140839
|
In this example, you will run a Job in [Indexed completion mode](/blog/2021/04/19/introducing-indexed-jobs/) configured such that the pods created by the Job can communicate with each other using pod hostnames rather than pod IP addresses. Pods within a Job might need to communicate among themselves. The user workload running in each pod could query the Kubernetes API server to learn the IPs of the other Pods, but it's much simpler to rely on Kubernetes' built-in DNS resolution. Jobs in Indexed completion mode automatically set the pods' hostname to be in the format of `${jobName}-${completionIndex}`. You can use this format to deterministically build pod hostnames and enable pod communication \*without\* needing to create a client connection to the Kubernetes control plane to obtain pod hostnames/IPs via API requests. This configuration is useful for use cases where pod networking is required but you don't want to depend on a network connection with the Kubernetes API server. ## {{% heading "prerequisites" %}} You should already be familiar with the basic use of [Job](/docs/concepts/workloads/controllers/job/). {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} {{< note >}} If you are using minikube or a similar tool, you may need to take [extra steps](https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/) to ensure you have DNS. {{< /note >}} ## Starting a Job with pod-to-pod communication To enable pod-to-pod communication using pod hostnames in a Job, you must do the following: 1. Set up a [headless Service](/docs/concepts/services-networking/service/#headless-services) with a valid label selector for the pods created by your Job. The headless service must be in the same namespace as the Job. One easy way to do this is to use the `job-name: ` selector, since the `job-name` label will be automatically added by Kubernetes. This configuration will trigger the DNS system to create records of the hostnames of the pods running your Job. 1. Configure the headless service as subdomain service for the Job pods by including the following value in your Job template spec: ```yaml subdomain: ``` ### Example Below is a working example of a Job with pod-to-pod communication via pod hostnames enabled. The Job is completed only after all pods successfully ping each other using hostnames. {{< note >}} In the Bash script executed on each pod in the example below, the pod hostnames can be prefixed by the namespace as well if the pod needs to be reached from outside the namespace. {{< /note >}} ```yaml apiVersion: v1 kind: Service metadata: name: headless-svc spec: clusterIP: None # clusterIP must be None to create a headless service selector: job-name: example-job # must match Job name --- apiVersion: batch/v1 kind: Job metadata: name: example-job spec: completions: 3 parallelism: 3 completionMode: Indexed template: spec: subdomain: headless-svc # has to match Service name restartPolicy: Never containers: - name: example-workload image: bash:latest command: - bash - -c - | for i in 0 1 2 do gotStatus="-1" wantStatus="0" while [ $gotStatus -ne $wantStatus ] do ping -c 1 example-job-${i}.headless-svc > /dev/null 2>&1 gotStatus=$? if [ $gotStatus -ne $wantStatus ]; then echo "Failed to ping pod example-job-${i}.headless-svc, retrying in 1 second..." sleep 1 fi done echo "Successfully pinged pod: example-job-${i}.headless-svc" done ``` After applying the example above, reach each other over the network using: `.`. You should see output similar to the following: ```shell kubectl logs example-job-0-qws42 ``` ``` Failed to ping pod example-job-0.headless-svc, retrying in 1 second... Successfully pinged pod: example-job-0.headless-svc Successfully pinged pod: example-job-1.headless-svc Successfully pinged pod: example-job-2.headless-svc ``` {{< note >}} Keep in mind that the `.` name format used in this example would not work with DNS policy set to `None` or `Default`. Refer to [Pod's DNS Policy](/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). {{< /note >}}
| null |
./vendor/kubernetes/content/en/docs/tasks/job/job-with-pod-to-pod-communication.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/job-with-pod-to-pod-communication.md
|
[
-0.0026576260570436716,
0.0051438044756650925,
0.06557109206914902,
0.03152962774038315,
-0.08953311294317245,
-0.013136805966496468,
-0.008333651348948479,
-0.07497153431177139,
0.051522914320230484,
0.028179815039038658,
-0.10847517848014832,
-0.013484456576406956,
-0.011546852067112923,
0.01078220084309578,
0.02268662489950657,
-0.04633670300245285,
0.039447322487831116,
0.021448872983455658,
0.04593123868107796,
-0.09138844162225723,
0.06242489069700241,
0.041862208396196365,
0.0050528147257864475,
-0.015052955597639084,
-0.08304955810308456,
-0.008045687340199947,
-0.020070111379027367,
-0.02838066592812538,
0.002746892161667347,
0.05859324708580971,
-0.06620317697525024,
0.006807252764701843,
-0.005451403092592955,
0.09007079899311066,
-0.008330952376127243,
0.023102765902876854,
-0.0046873087994754314,
-0.020571380853652954,
-0.05736558139324188,
0.01576460711658001,
0.08218193799257278,
-0.05236068367958069,
-0.07561881840229034,
0.002075519412755966,
-0.037408530712127686,
-0.018303632736206055,
-0.018261734396219254,
-0.0076674893498420715,
0.0063890148885548115,
-0.0004826546646654606,
0.006214718800038099,
-0.12907598912715912,
0.10779949277639389,
0.007397164590656757,
0.1151537224650383,
0.01564541459083557,
-0.0465044341981411,
0.011236120015382767,
0.05958883464336395,
0.02595922350883484,
0.021475689485669136,
-0.040471285581588745,
-0.007871893234550953,
-0.05563017725944519,
0.037012673914432526,
-0.0360904224216938,
0.009882998652756214,
0.044947970658540726,
0.0004619069513864815,
-0.023137977346777916,
0.08905158191919327,
0.009911940433084965,
-0.0782206654548645,
-0.03998639062047005,
-0.029216742143034935,
0.037343382835388184,
-0.0168386809527874,
0.04144507646560669,
-0.04130728915333748,
-0.05101640895009041,
0.01917867735028267,
0.06912411004304886,
0.058382418006658554,
0.005463145207613707,
-0.13946318626403809,
-0.06525687128305435,
-0.010238073766231537,
-0.07160252332687378,
0.05786333978176117,
-0.027157047763466835,
-0.014374413527548313,
-0.09617678821086884,
-0.026057112962007523,
-0.13105997443199158,
0.086183562874794,
0.05854656174778938,
0.039046768099069595,
-0.0024308189749717712,
0.0007397509762085974,
0.011682119220495224,
0.028570905327796936,
-0.027681156992912292,
-0.017861509695649147,
-0.024056673049926758,
0.06593148410320282,
0.008551167324185371,
-0.07489465177059174,
-0.059540241956710815,
0.04514108970761299,
0.09581982344388962,
-0.02677059918642044,
0.04690130800008774,
0.013964275829494,
0.06777302920818329,
0.0072169615887105465,
0.03343837708234787,
0.027206040918827057,
0.03107667900621891,
0.09254802763462067,
0.05844941362738609,
-0.010783009231090546,
-0.09684460610151291,
-0.0027070443611592054,
-0.0032218103297054768,
-0.05469822138547897,
0.019076602533459663,
-0.009893545880913734,
3.965707618677564e-33,
0.08137750625610352,
-0.05300767347216606,
-0.002486491110175848,
-0.005821754224598408,
0.029566913843154907,
-0.05494008585810661,
0.043905340135097504,
0.004564308095723391,
-0.03475822135806084,
-0.017446085810661316,
-0.11210457980632782,
0.08464513719081879,
0.0745312049984932,
-0.03423941880464554,
-0.026057934388518333,
0.006054872181266546,
-0.017511889338493347,
0.06949778646230698,
0.12890423834323883,
0.09138492494821548,
0.02806861139833927,
-0.0667886957526207,
-0.024669837206602097,
0.059991952031850815,
0.06857345253229141,
-0.06732213497161865,
-0.02690098062157631,
-0.12336976826190948,
0.0168654415756464,
0.017787937074899673,
-0.0019657460507005453,
-0.028643876314163208,
0.052095670253038406,
0.013000614941120148,
-0.10835625231266022,
0.007438261993229389,
-0.03376002237200737,
0.01586393639445305,
-0.05895049870014191,
-0.038509488105773926,
0.07155914604663849,
0.005727889947593212,
-0.04194043576717377,
-0.04315735399723053,
-0.0230864267796278,
0.03440975397825241,
0.005459423176944256,
-0.06582195311784744,
0.06064769998192787,
0.05576811358332634,
0.02526877447962761,
-0.023156696930527687,
0.0203489251434803,
-0.09119562804698944,
0.12118994444608688,
0.010127812623977661,
0.06394560635089874,
-0.011720993556082249,
-0.02699139341711998,
-0.019057177007198334,
-0.10258419066667557,
-0.05990121141076088,
-0.02291398122906685,
0.04384402558207512,
0.05368512496352196,
0.009050518274307251,
0.0015998897142708302,
0.10268589109182358,
0.04381142556667328,
0.0199598278850317,
-0.04711403325200081,
0.04307293891906738,
-0.04315106198191643,
-0.010582638904452324,
-0.016458503901958466,
-0.04560622200369835,
-0.00011914468632312492,
-0.021324168890714645,
-0.07265825569629669,
0.049717120826244354,
0.026685498654842377,
0.039371561259031296,
-0.05408346280455589,
0.04575267434120178,
0.008083613589406013,
0.024091040715575218,
0.022807661443948746,
-0.007803210057318211,
-0.07056159526109695,
-0.019227219745516777,
0.018567657098174095,
-0.00017503408889751881,
-0.062074024230241776,
0.0007831049151718616,
-0.08046058565378189,
-4.615824687633415e-33,
0.10021310299634933,
-0.0441194586455822,
-0.018780799582600594,
-0.04108500853180885,
-0.018600724637508392,
-0.010955934412777424,
0.055430348962545395,
-0.004361616913229227,
-0.035547345876693726,
-0.07311766594648361,
-0.055221542716026306,
-0.08591514080762863,
0.027278194203972816,
0.010056601837277412,
-0.09973997622728348,
0.051462240517139435,
-0.07693509757518768,
-0.03167276456952095,
-0.011797670274972916,
0.04068712517619133,
-0.05960417166352272,
-0.031173478811979294,
0.014424677938222885,
0.022685550153255463,
0.013606252148747444,
-0.008831583894789219,
-0.022205445915460587,
0.02469026856124401,
-0.08699097484350204,
-0.019912609830498695,
0.013462798669934273,
-0.10103260725736618,
0.014895853586494923,
0.0021276879124343395,
-0.011772033758461475,
0.029225042089819908,
-0.05239155888557434,
0.06874188035726547,
0.033470142632722855,
0.0021061208099126816,
0.07483335584402084,
-0.006294324062764645,
-0.09910073131322861,
-0.0027612396515905857,
-0.05270477756857872,
-0.03310833498835564,
-0.026778491213917732,
0.05830390751361847,
-0.050035636872053146,
-0.10000378638505936,
-0.004651662893593311,
0.0027252929285168648,
-0.1375930905342102,
0.07968879491090775,
-0.037374068051576614,
-0.0009969280799850821,
0.003965004812926054,
0.07177864015102386,
-0.03920897841453552,
0.07123767584562302,
0.04759114608168602,
-0.12028443068265915,
0.0887448787689209,
0.0798415020108223,
-0.02356688119471073,
-0.06032196804881096,
0.021507984027266502,
0.03687836974859238,
0.01501556672155857,
0.0009474350954405963,
0.016014033928513527,
-0.040396932512521744,
0.035849981009960175,
0.09140361845493317,
0.01636187732219696,
-0.019090421497821808,
0.06949155777692795,
0.02945941686630249,
0.014850570820271969,
0.07688121497631073,
-0.0687163695693016,
0.12085646390914917,
-0.039546262472867966,
0.0269581601023674,
0.06573934853076935,
0.1207621842622757,
0.08885364234447479,
0.13755525648593903,
0.017511768266558647,
0.06971439719200134,
0.03447719290852547,
0.03600531071424484,
-0.004981241654604673,
0.042166151106357574,
-0.009710130281746387,
-4.7451155893440955e-8,
0.04602963104844093,
0.051823366433382034,
-0.049435462802648544,
0.030553363263607025,
-0.05035366863012314,
0.017908388748764992,
-0.0036615219432860613,
-0.00294454675167799,
-0.039594873785972595,
0.017138050869107246,
-0.05814053490757942,
0.013353406451642513,
-0.09165913611650467,
0.06963274627923965,
0.05907835066318512,
0.006532589439302683,
0.0725695937871933,
0.04439433291554451,
-0.01823575794696808,
-0.0350160226225853,
-0.07516548037528992,
0.012150517664849758,
-0.006070749368518591,
-0.05638108402490616,
-0.005315357353538275,
0.08372101932764053,
0.025523100048303604,
-0.04413188621401787,
0.020014075562357903,
0.04712064191699028,
-0.027034912258386612,
-0.0072339195758104324,
-0.058677081018686295,
0.009886459447443485,
0.04274190589785576,
0.0004820744798053056,
-0.0893898606300354,
-0.02450774610042572,
-0.02707129344344139,
0.023433027788996696,
-0.029436124488711357,
-0.011577565222978592,
-0.052199073135852814,
-0.02080390602350235,
0.06722060590982437,
0.013641039840877056,
0.00488999905064702,
0.04509175568819046,
0.008190134540200233,
-0.02733125165104866,
-0.058507662266492844,
-0.028227588161826134,
0.02736630104482174,
0.06395555287599564,
0.012739296071231365,
-0.0252390019595623,
-0.0830003097653389,
-0.031035758554935455,
0.022282153367996216,
0.014201538637280464,
-0.006228686310350895,
-0.004717823583632708,
-0.013044968247413635,
0.01414809562265873
] | 0.160776
|
Successfully pinged pod: example-job-0.headless-svc Successfully pinged pod: example-job-1.headless-svc Successfully pinged pod: example-job-2.headless-svc ``` {{< note >}} Keep in mind that the `.` name format used in this example would not work with DNS policy set to `None` or `Default`. Refer to [Pod's DNS Policy](/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy). {{< /note >}}
| null |
./vendor/kubernetes/content/en/docs/tasks/job/job-with-pod-to-pod-communication.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/job-with-pod-to-pod-communication.md
|
[
-0.008066955953836441,
0.01562400534749031,
0.014729787595570087,
-0.01115170307457447,
-0.02875836007297039,
-0.04954363405704498,
-0.02644139528274536,
-0.059738121926784515,
0.03223313018679619,
0.05586356297135353,
-0.015170861966907978,
0.003603787161409855,
-0.06588917970657349,
0.029926417395472527,
0.0698993057012558,
-0.041889626532793045,
0.018471071496605873,
-0.0851701870560646,
0.06181108579039574,
-0.07038559019565582,
0.025615578517317772,
0.048396289348602295,
0.05925881490111351,
-0.01827433332800865,
-0.018920429050922394,
0.03089667111635208,
-0.05644811689853668,
-0.0011871217284351587,
0.012924293987452984,
-0.011127959005534649,
-0.003146058414131403,
-0.0026572449132800102,
0.005939164664596319,
0.046588774770498276,
0.11192856729030609,
0.0870884358882904,
0.06795409321784973,
0.016776418313384056,
-0.0912681370973587,
0.022996049374341965,
0.05597303435206413,
-0.010031088255345821,
-0.03577645868062973,
-0.029245859012007713,
0.0027072851080447435,
0.03245570883154869,
-0.013484274037182331,
-0.06698749214410782,
0.017899706959724426,
-0.0006881182198412716,
-0.007124658208340406,
-0.09677934646606445,
0.09342752397060394,
-0.014786397106945515,
0.08689942955970764,
0.078087717294693,
-0.012125648558139801,
0.05019019544124603,
0.07507448643445969,
-0.01739870011806488,
-0.003533578012138605,
-0.09697950631380081,
-0.00870018545538187,
-0.05009465664625168,
0.016217129305005074,
-0.09727731347084045,
-0.023081954568624496,
0.05018196254968643,
-0.06396452337503433,
0.07248779386281967,
0.022230500355362892,
0.0379519946873188,
-0.01809234730899334,
-0.04538324475288391,
-0.034427158534526825,
0.01104358397424221,
0.01177937351167202,
-0.0003441314911469817,
0.04155692085623741,
-0.04540616646409035,
-0.01712983474135399,
0.004746665712445974,
0.0058334930799901485,
0.05722133815288544,
-0.10883791744709015,
0.041772305965423584,
-0.016089582815766335,
-0.09761717915534973,
0.05486031249165535,
0.0017303468193858862,
-0.007314528804272413,
-0.058229658752679825,
0.01881323754787445,
-0.11359649896621704,
0.021773388609290123,
0.016906457021832466,
0.04156438633799553,
0.06326137483119965,
-0.07944037020206451,
0.01773012802004814,
0.06631819158792496,
-0.037356410175561905,
0.025331322103738785,
0.0032745993230491877,
0.06576500087976456,
0.0034380743745714426,
-0.055182941257953644,
0.0022365469485521317,
0.05801466852426529,
0.10875752568244934,
0.006293295882642269,
0.009533938020467758,
0.03540574386715889,
0.025413090363144875,
-0.08825373649597168,
-0.04758073017001152,
-0.028139183297753334,
0.039177268743515015,
0.030956802889704704,
0.01670745573937893,
0.034839365631341934,
-0.09776429086923599,
-0.0371185839176178,
0.009843888692557812,
-0.0953981950879097,
0.007160527631640434,
0.04429778829216957,
-2.5865694211779365e-35,
0.10431791841983795,
-0.0597526989877224,
-0.0387139618396759,
-0.037248097360134125,
0.08403655141592026,
-0.08234408497810364,
-0.01627722568809986,
0.049100302159786224,
-0.023860134184360504,
0.04065835475921631,
-0.04402785003185272,
0.007932772859930992,
0.045749176293611526,
-0.010518972761929035,
-0.05745458975434303,
0.05816632881760597,
0.008429760113358498,
0.03864707797765732,
0.08170613646507263,
0.04021371528506279,
0.028007647022604942,
-0.02132941037416458,
-0.053699884563684464,
0.007026285398751497,
0.012065413407981396,
-0.0005684151547029614,
-0.0018088693032041192,
-0.13290999829769135,
0.020637856796383858,
-0.0056976680643856525,
0.02888445369899273,
0.021156763657927513,
0.05989328399300575,
0.009224303998053074,
-0.03384999558329582,
-0.004111827351152897,
0.0166437067091465,
0.038299497216939926,
-0.11402551829814911,
-0.04399770498275757,
0.0671941339969635,
-0.033960942178964615,
-0.02927345409989357,
-0.023037105798721313,
-0.0015211912104859948,
-0.037766020745038986,
0.056525181978940964,
-0.05028610676527023,
0.02909705974161625,
0.08133349567651749,
-0.023042798042297363,
-0.017056899145245552,
-0.018162641674280167,
-0.08539516478776932,
0.09762081503868103,
0.003081396222114563,
0.008756035007536411,
0.019101645797491074,
-0.08357585221529007,
-0.04380912333726883,
-0.05310726538300514,
0.018221493810415268,
0.0031019714660942554,
-0.04562244564294815,
0.0769117921590805,
0.03564409911632538,
-0.018252065405249596,
0.056430477648973465,
0.02830236405134201,
-0.01342497393488884,
-0.009627546183764935,
0.03698820248246193,
-0.030949294567108154,
0.08019351959228516,
-0.033625390380620956,
-0.030742572620511055,
0.008597377687692642,
0.005441813264042139,
-0.05947373807430267,
0.012197468429803848,
0.004159710370004177,
0.02608651854097843,
-0.03717241436243057,
0.061372336000204086,
0.05142832547426224,
0.06453284621238708,
0.04208246245980263,
-0.030767716467380524,
-0.0597761869430542,
0.020861582830548286,
-0.022325100377202034,
-0.02737271599471569,
-0.058248598128557205,
0.027140898630023003,
-0.11211815476417542,
-2.1484124540895085e-33,
0.04608692601323128,
-0.0016785933403298259,
-0.10804273933172226,
0.00908697210252285,
-0.07125850021839142,
0.057307127863168716,
0.06946999579668045,
0.02748403325676918,
0.00703289033845067,
-0.014110315591096878,
-0.009943059645593166,
-0.0850285217165947,
0.01863582618534565,
0.012179943732917309,
-0.051321689039468765,
0.013331044465303421,
-0.1073077842593193,
-0.02728959172964096,
-0.030796045437455177,
0.05900472030043602,
-0.022660180926322937,
0.04310212656855583,
-0.003847056534141302,
0.10451507568359375,
-0.006026391871273518,
-0.04692932590842247,
0.06276164203882217,
0.0278665442019701,
-0.09572301059961319,
-0.06645829975605011,
0.03433442488312721,
-0.061333488672971725,
-0.014043877832591534,
0.03977825120091438,
-0.0043851230293512344,
-0.004586121533066034,
-0.035756684839725494,
0.05122518911957741,
0.03986181691288948,
-0.02296559140086174,
0.051871951669454575,
-0.018380561843514442,
-0.08076010644435883,
0.029323609545826912,
-0.06834597885608673,
-0.10333923250436783,
0.03413866460323334,
0.045971017330884933,
-0.03964775428175926,
-0.05831415206193924,
-0.0013261124258860946,
-0.07880605757236481,
-0.09917018562555313,
0.09952601790428162,
-0.010460118763148785,
0.02324027009308338,
0.05030291900038719,
0.024688007310032845,
-0.05384298413991928,
0.04246025159955025,
0.05054696649312973,
-0.11809860169887543,
0.0052970414981245995,
0.10350986570119858,
0.06014525890350342,
-0.0452747717499733,
-0.03321578726172447,
0.0663142129778862,
0.05694322660565376,
-0.0572826974093914,
0.05462270975112915,
0.016270816326141357,
0.04894645884633064,
0.03151211515069008,
0.033707085996866226,
-0.03363713249564171,
0.051641225814819336,
0.001368730328977108,
0.012764869257807732,
0.022214747965335846,
-0.07471954077482224,
0.10647571831941605,
-0.06750095635652542,
0.003729041200131178,
0.09160119295120239,
0.10798025131225586,
0.11808575689792633,
0.08406504988670349,
-0.04736460745334625,
0.08780539035797119,
0.018385794013738632,
-0.01676723174750805,
0.033718522638082504,
0.08882047235965729,
-0.055904947221279144,
-3.592383635009355e-8,
0.0447484515607357,
0.018737655133008957,
-0.025636371225118637,
0.00818282924592495,
-0.024343200027942657,
0.0343853197991848,
0.03522269055247307,
-0.06632339954376221,
-0.08620697259902954,
0.02097402513027191,
-0.10860379040241241,
0.026561712846159935,
-0.14373314380645752,
0.023415643721818924,
0.025797422975301743,
-0.008720147423446178,
0.06580933928489685,
0.1088118851184845,
-0.02503504417836666,
-0.07114739716053009,
-0.08193488419055939,
-0.02251807227730751,
-0.06239098310470581,
-0.015565287321805954,
-0.03551550582051277,
0.06953885406255722,
0.037053465843200684,
-0.021951930597424507,
0.025210196152329445,
0.014031767845153809,
-0.08993155509233475,
0.016487721353769302,
-0.06496912240982056,
-0.06638198345899582,
0.026714174076914787,
-0.003982361406087875,
0.0049303509294986725,
0.007312964182347059,
0.0030566263012588024,
-0.02756457030773163,
-0.041950516402721405,
0.05027686432003975,
-0.08815217763185501,
-0.03668545186519623,
-0.01182805560529232,
0.02804473042488098,
0.007011241279542446,
0.028225408867001534,
0.003426982555538416,
0.004521623719483614,
0.008884798735380173,
-0.016726311296224594,
0.02350117638707161,
0.00832407083362341,
-0.01574455201625824,
-0.01684875413775444,
0.046787772327661514,
-0.08170580863952637,
-0.07512637227773666,
0.061466068029403687,
0.0692325010895729,
-0.03654129058122635,
-0.0009185593808069825,
0.018961863592267036
] | 0.136232
|
This task demonstrates running multiple {{< glossary\_tooltip text="Jobs" term\_id="job" >}} based on a common template. You can use this approach to process batches of work in parallel. For this example there are only three items: \_apple\_, \_banana\_, and \_cherry\_. The sample Jobs process each item by printing a string then pausing. See [using Jobs in real workloads](#using-jobs-in-real-workloads) to learn about how this pattern fits more realistic use cases. ## {{% heading "prerequisites" %}} You should be familiar with the basic, non-parallel, use of [Job](/docs/concepts/workloads/controllers/job/). {{< include "task-tutorial-prereqs.md" >}} For basic templating you need the command-line utility `sed`. To follow the advanced templating example, you need a working installation of [Python](https://www.python.org/), and the Jinja2 template library for Python. Once you have Python set up, you can install Jinja2 by running: ```shell pip install --user jinja2 ``` ## Create Jobs based on a template First, download the following template of a Job to a file called `job-tmpl.yaml`. Here's what you'll download: {{% code\_sample file="application/job/job-tmpl.yaml" %}} ```shell # Use curl to download job-tmpl.yaml curl -L -s -O https://k8s.io/examples/application/job/job-tmpl.yaml ``` The file you downloaded is not yet a valid Kubernetes {{< glossary\_tooltip text="manifest" term\_id="manifest" >}}. Instead that template is a YAML representation of a Job object with some placeholders that need to be filled in before it can be used. The `$ITEM` syntax is not meaningful to Kubernetes. ### Create manifests from the template The following shell snippet uses `sed` to replace the string `$ITEM` with the loop variable, writing into a temporary directory named `jobs`. Run this now: ```shell # Expand the template into multiple files, one for each item to be processed. mkdir ./jobs for i in apple banana cherry do cat job-tmpl.yaml | sed "s/\$ITEM/$i/" > ./jobs/job-$i.yaml done ``` Check if it worked: ```shell ls jobs/ ``` The output is similar to this: ``` job-apple.yaml job-banana.yaml job-cherry.yaml ``` You could use any type of template language (for example: Jinja2; ERB), or write a program to generate the Job manifests. ### Create Jobs from the manifests Next, create all the Jobs with one kubectl command: ```shell kubectl create -f ./jobs ``` The output is similar to this: ``` job.batch/process-item-apple created job.batch/process-item-banana created job.batch/process-item-cherry created ``` Now, check on the jobs: ```shell kubectl get jobs -l jobgroup=jobexample ``` The output is similar to this: ``` NAME COMPLETIONS DURATION AGE process-item-apple 1/1 14s 22s process-item-banana 1/1 12s 21s process-item-cherry 1/1 12s 20s ``` Using the `-l` option to kubectl selects only the Jobs that are part of this group of jobs (there might be other unrelated jobs in the system). You can check on the Pods as well using the same {{< glossary\_tooltip text="label selector" term\_id="selector" >}}: ```shell kubectl get pods -l jobgroup=jobexample ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE process-item-apple-kixwv 0/1 Completed 0 4m process-item-banana-wrsf7 0/1 Completed 0 4m process-item-cherry-dnfu9 0/1 Completed 0 4m ``` We can use this single command to check on the output of all jobs at once: ```shell kubectl logs -f -l jobgroup=jobexample ``` The output should be: ``` Processing item apple Processing item banana Processing item cherry ``` ### Clean up {#cleanup-1} ```shell # Remove the Jobs you created # Your cluster automatically cleans up their Pods kubectl delete job -l jobgroup=jobexample ``` ## Use advanced template parameters In the [first example](#create-jobs-based-on-a-template), each instance of the template had one parameter, and that parameter was also used in the Job's name. However, [names](/docs/concepts/overview/working-with-objects/names/#names) are restricted to contain only certain characters. This slightly more complex example uses the [Jinja template language](https://palletsprojects.com/p/jinja/) to generate manifests and then objects from those manifests, with a multiple parameters for
| null |
./vendor/kubernetes/content/en/docs/tasks/job/parallel-processing-expansion.md
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tasks/job/parallel-processing-expansion.md
|
[
-0.10990124195814133,
0.018579663708806038,
0.015602154657244682,
-0.024098150432109833,
-0.046316687017679214,
-0.029877401888370514,
0.04912585765123367,
-0.04516027867794037,
-0.06190510466694832,
0.02654603309929371,
0.028322726488113403,
-0.01738365925848484,
0.015678249299526215,
-0.04346848279237747,
0.02478511817753315,
-0.02011198177933693,
-0.009859462268650532,
-0.016161054372787476,
-0.04351762682199478,
-0.12070423364639282,
0.09068945795297623,
0.08607331663370132,
0.07278475910425186,
0.03973880410194397,
-0.04613835737109184,
0.05568285286426544,
-0.03358875960111618,
-0.010293684899806976,
0.025741610676050186,
0.02419823408126831,
0.02179696597158909,
-0.002624575048685074,
-0.07091110199689865,
0.07068084925413132,
0.051799289882183075,
0.06352324038743973,
-0.0442754402756691,
0.040110718458890915,
-0.011296084150671959,
0.021211236715316772,
0.03327935189008713,
0.05440206825733185,
-0.1104024201631546,
-0.017834754660725594,
0.007816754281520844,
-0.03735216706991196,
-0.05498377978801727,
-0.06369952112436295,
0.0766744315624237,
0.014554139226675034,
-0.039450306445360184,
-0.13811515271663666,
0.02908923104405403,
-0.015553660690784454,
0.050338540226221085,
0.02952623926103115,
0.049195583909749985,
-0.06851352751255035,
0.02632690966129303,
-0.02130568027496338,
-0.059746164828538895,
-0.02868063747882843,
-0.03540723770856857,
-0.044992391020059586,
0.09143540263175964,
-0.027378428727388382,
-0.01032645720988512,
0.017396138980984688,
-0.02218271791934967,
0.00019146065460518003,
-0.05988031625747681,
-0.0026480124797672033,
0.02885488048195839,
0.0035051254089921713,
-0.04649561643600464,
-0.002411033259704709,
-0.014078909531235695,
-0.002012783894315362,
-0.07824593782424927,
-0.13356992602348328,
0.001422641915269196,
0.00129628402646631,
0.05824645608663559,
0.06469438970088959,
0.030413532629609108,
-0.12131516635417938,
0.00046652494347654283,
0.004957083147019148,
0.04113483428955078,
-0.04041285440325737,
0.038051482290029526,
-0.09760931134223938,
0.07300705462694168,
-0.055025916546583176,
0.0024854394141584635,
0.10212533175945282,
0.041844096034765244,
-0.02486913464963436,
-0.007265458814799786,
0.008714601397514343,
0.0420343279838562,
-0.08975612372159958,
0.10886289179325104,
-0.03355551138520241,
-0.03118683584034443,
0.029299091547727585,
-0.06842407584190369,
0.0024574734270572662,
-0.05357985198497772,
-0.020460041239857674,
0.009220690466463566,
0.06445059925317764,
-0.03605170547962189,
0.02670004405081272,
-0.01678202860057354,
-0.07841362059116364,
0.028207246214151382,
-0.017998836934566498,
0.01565585471689701,
0.11500898748636246,
0.02800876274704933,
0.03679976612329483,
0.01146729476749897,
-0.03612671047449112,
0.006246814504265785,
-0.05948229879140854,
-0.019627749919891357,
2.2426525708789006e-33,
0.06623243540525436,
-0.026096001267433167,
-0.039352793246507645,
0.020837359130382538,
0.0023475384805351496,
0.003952097613364458,
-0.02729805000126362,
0.08300293982028961,
-0.04021010920405388,
0.04968986660242081,
-0.0052405656315386295,
0.053794197738170624,
-0.04928634688258171,
0.031926609575748444,
-0.08421391993761063,
-0.05870414152741432,
0.031987257301807404,
0.07240474969148636,
0.013052882626652718,
0.02793717198073864,
-0.03342645242810249,
-0.031671080738306046,
-0.03655989468097687,
-0.004041201900690794,
0.078763447701931,
0.017315618693828583,
0.026046229526400566,
-0.06309865415096283,
0.013982686214148998,
0.013896635733544827,
0.04105236008763313,
-0.005991303361952305,
-0.04894960671663284,
0.005881691817194223,
-0.07135236263275146,
0.006232863292098045,
0.017296472564339638,
-0.04640895873308182,
0.0724574476480484,
-0.06947370618581772,
-0.0501258410513401,
-0.029166728258132935,
0.060797661542892456,
-0.00399808632209897,
-0.05811702087521553,
0.03568360209465027,
-0.06338851153850555,
-0.03315449133515358,
0.08857882022857666,
0.030675765126943588,
0.039790354669094086,
-0.05220520496368408,
0.005856307689100504,
0.014816646464169025,
0.028138790279626846,
0.04600813612341881,
-0.07411763817071915,
-0.02250526286661625,
0.06684014946222305,
0.012781227938830853,
-0.06055067479610443,
0.043431248515844345,
-0.09239209443330765,
0.075360968708992,
0.03144068270921707,
-0.060445234179496765,
0.013305095955729485,
0.0509629026055336,
0.07177282124757767,
0.012296545319259167,
-0.06485643237829208,
-0.02622060291469097,
0.05961473286151886,
-0.004879273474216461,
0.0646151751279831,
0.03083854354918003,
0.008371147327125072,
-0.06774424016475677,
-0.09866783767938614,
-0.003948272671550512,
-0.016822930425405502,
-0.01875864341855049,
-0.023012852296233177,
-0.04485216364264488,
0.08638707548379898,
0.023490779101848602,
0.05193854868412018,
-0.050253838300704956,
-0.021912956610322,
-0.016208434477448463,
-0.0712529793381691,
-0.007227845955640078,
-0.06145087629556656,
-0.011959906667470932,
-0.03430967777967453,
-4.30490643184092e-33,
0.15460661053657532,
0.010481136851012707,
0.005352049134671688,
0.030465658754110336,
0.12648731470108032,
-0.02336600422859192,
0.044627368450164795,
-0.0325029157102108,
-0.07603856921195984,
-0.047609057277441025,
-0.06800655275583267,
0.017306672409176826,
-0.0038541611284017563,
0.02729976736009121,
0.016382131725549698,
0.03891761600971222,
-0.0158974751830101,
0.0922522097826004,
0.010529269464313984,
0.02008945308625698,
-0.04171937704086304,
-0.025585388764739037,
0.003586017759516835,
0.011626418679952621,
-0.010666333138942719,
-0.032982781529426575,
0.016584616154432297,
-0.01910809427499771,
-0.007870667614042759,
0.04531591013073921,
-0.04207736626267433,
0.02375957928597927,
0.029211673885583878,
-0.01959381252527237,
-0.010698958300054073,
-0.02343558520078659,
-0.019795453175902367,
-0.021905850619077682,
-0.027725718915462494,
0.11062803119421005,
0.15747490525245667,
-0.022282667458057404,
-0.015410801395773888,
-0.06841821223497391,
-0.024035824462771416,
-0.018484150990843773,
-0.04337479546666145,
0.00024019196280278265,
-0.07246609777212143,
-0.010280241258442402,
-0.02674843929708004,
-0.017253702506422997,
-0.06570683419704437,
0.035304389894008636,
-0.015492306090891361,
-0.10046441853046417,
0.05261175334453583,
-0.1684659868478775,
-0.08741698414087296,
-0.008743337355554104,
-0.01103215292096138,
-0.035716596990823746,
0.10659787058830261,
-0.044409435242414474,
0.07861492782831192,
-0.0731455534696579,
-0.021459467709064484,
-0.07140599191188812,
-0.00602134270593524,
-0.026516437530517578,
-0.06319991499185562,
-0.028676217421889305,
0.042105745524168015,
-0.041150305420160294,
0.01268029399216175,
0.01632232591509819,
0.006678519770503044,
-0.09153793007135391,
0.0060598100535571575,
-0.01844855770468712,
0.06855706870555878,
0.0179043710231781,
-0.0013719641137868166,
0.06256826221942902,
-0.07763556391000748,
0.08171073347330093,
0.03508336842060089,
0.1427764892578125,
0.018638938665390015,
-0.0020228680223226547,
-0.01890222728252411,
0.01476520299911499,
0.11044375598430634,
0.13344858586788177,
-0.004617512691766024,
-5.271179048804697e-8,
0.007191540207713842,
0.1119886189699173,
0.03373202681541443,
0.02649146318435669,
-0.015103688463568687,
0.008636616170406342,
-0.06947209686040878,
0.024798469617962837,
0.029636366292834282,
-0.007174360565841198,
0.04067089408636093,
0.015454982407391071,
-0.003492688527330756,
0.05567050725221634,
-0.03673260658979416,
0.062049735337495804,
-0.01821970008313656,
-0.011101110838353634,
-0.004052740056067705,
-0.06694835424423218,
0.08371918648481369,
0.0728808343410492,
-0.014137934893369675,
0.06343917548656464,
-0.02491597831249237,
0.01842610351741314,
0.022750718519091606,
0.02724466845393181,
-0.018367230892181396,
-0.02910488285124302,
0.006572884973138571,
-0.03150376304984093,
-0.08753186464309692,
0.04360530152916908,
0.0488988421857357,
-0.1134561076760292,
0.014253267087042332,
-0.03269711509346962,
0.12182416766881943,
-0.00023133996000979096,
-0.015258710831403732,
0.004866017494350672,
-0.03310653194785118,
0.01212312001734972,
0.05659463256597519,
-0.0028462165500968695,
-0.09100378304719925,
0.02951858751475811,
0.0014437227509915829,
-0.004119479563087225,
-0.10346334427595139,
0.014603299088776112,
0.025827309116721153,
0.0659116804599762,
-0.007378239184617996,
-0.008093159645795822,
0.07336701452732086,
-0.018353331834077835,
-0.01014789193868637,
0.010130196809768677,
0.034560561180114746,
-0.04813297465443611,
-0.0006718026124872267,
0.037707433104515076
] | -0.030865
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.