content
stringlengths 3
20.5k
| url
stringlengths 54
193
| embeddings
listlengths 384
384
| score
float64 -0.21
0.65
|
|---|---|---|---|
Create kind cluster 2. Create new namespace 3. Apply `baseline` Pod Security Standard in `enforce` mode while applying `restricted` Pod Security Standard also in `warn` and `audit` mode. 4. Create a new pod with the following pod security standards applied - [Pod Security Admission](/docs/concepts/security/pod-security-admission/) - [Pod Security Standards](/docs/concepts/security/pod-security-standards/) - [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/security/ns-level-pss.md
|
[
0.06717932969331741,
-0.023358983919024467,
-0.009705285541713238,
0.00944898184388876,
0.05298437923192978,
0.019590549170970917,
0.010189819149672985,
0.017964864149689674,
-0.020440755411982536,
0.0643693283200264,
0.023014010861516,
-0.034899625927209854,
0.03804164379835129,
0.03763802349567413,
0.011681385338306427,
-0.027333879843354225,
0.053522393107414246,
0.04004674777388573,
0.033374518156051636,
0.0014099752297624946,
0.05835266038775444,
-0.03213280439376831,
0.053524237126111984,
0.01650078035891056,
-0.13852523267269135,
0.018789151683449745,
-0.03740483522415161,
0.05194120481610298,
0.007795189507305622,
-0.04467463120818138,
-0.041465140879154205,
0.014624779112637043,
0.10139806568622589,
0.031993065029382706,
0.053519267588853836,
0.021903349086642265,
0.06938794255256653,
-0.011285592801868916,
-0.06084447726607323,
-0.027335839346051216,
-0.003822829108685255,
-0.07216788083314896,
-0.08627908676862717,
0.02004735730588436,
-0.06816492974758148,
-0.07710666954517365,
-0.021117055788636208,
-0.0517972894012928,
0.030250202864408493,
-0.051081907004117966,
0.02419627271592617,
-0.03647603467106819,
0.06311257183551788,
-0.0006843183073215187,
-0.02185535430908203,
0.013018959201872349,
-0.021941374987363815,
0.058647193014621735,
0.04981814697384834,
-0.01808735728263855,
0.040066733956336975,
-0.05064932256937027,
-0.023030469194054604,
-0.0396977998316288,
0.015133633278310299,
0.012850738130509853,
-0.05168353393673897,
0.06598988175392151,
0.059735145419836044,
0.03531375899910927,
0.03176421672105789,
0.028364339843392372,
-0.013427650555968285,
-0.037423763424158096,
-0.037119489163160324,
0.03954298049211502,
-0.04302679002285004,
0.022870559245347977,
-0.004173677880316973,
-0.01648077182471752,
-0.042734209448099136,
0.024881690740585327,
0.026895998045802116,
0.01968894526362419,
-0.0786900669336319,
0.12397395074367523,
-0.022565564140677452,
-0.07236870378255844,
0.007907130755484104,
0.002215281128883362,
0.03821432963013649,
-0.017682135105133057,
0.0555102601647377,
-0.05053815618157387,
0.05138428136706352,
-0.06475943326950073,
-0.013835880905389786,
-0.01857765018939972,
0.03791595622897148,
0.0040536015294492245,
-0.0007914709858596325,
-0.011434633284807205,
-0.06903132051229477,
-0.03761548176407814,
0.08489877730607986,
0.03238823264837265,
-0.024087944999337196,
-0.08181770145893097,
0.044652752578258514,
0.09682094305753708,
0.004776272457093,
0.031182071194052696,
-0.04597603529691696,
-0.004504811018705368,
-0.03415890038013458,
0.06869132071733475,
-0.014370969496667385,
0.014760378748178482,
-0.005698319524526596,
0.04782393202185631,
0.10681508481502533,
-0.04512721672654152,
0.059422481805086136,
-0.015391976572573185,
-0.042508870363235474,
0.002625951310619712,
-0.048882484436035156,
-5.128895944138059e-35,
-0.0038792735431343317,
0.005076346453279257,
-0.012594908475875854,
-0.02380930259823799,
0.014367807656526566,
-0.030760619789361954,
-0.05280669033527374,
0.024313973262906075,
-0.04331032931804657,
-0.015269056893885136,
0.002303200541064143,
0.029318196699023247,
0.022379469126462936,
-0.08294729888439178,
0.06157613545656204,
0.018380695953965187,
-0.02562776394188404,
0.07405927777290344,
0.11620271950960159,
0.01460352074354887,
0.010619418695569038,
-0.062319930642843246,
-0.009986357763409615,
0.04118886590003967,
0.03824111446738243,
-0.001871868735179305,
0.022578295320272446,
-0.1419009566307068,
0.10894607752561569,
0.02738548256456852,
-0.014891804195940495,
-0.020414650440216064,
0.05967792123556137,
0.027538441121578217,
-0.093924380838871,
0.017244301736354828,
-0.0004014316073153168,
0.0349038727581501,
-0.04654082655906677,
-0.11415870487689972,
0.043954916298389435,
-0.0028383429162204266,
0.03193975239992142,
-0.026105115190148354,
0.13187521696090698,
0.04080093652009964,
0.06714655458927155,
-0.0004946260596625507,
0.04537505283951759,
0.02118615433573723,
-0.03537830710411072,
-0.08694065362215042,
-0.0224642101675272,
-0.02286415547132492,
-0.009014373645186424,
-0.06636382639408112,
0.019928308203816414,
0.008150698617100716,
-0.028369909152388573,
-0.005035430658608675,
-0.05598575994372368,
0.00617018761113286,
0.032343048602342606,
-0.0416589193046093,
0.0007627520826645195,
0.009180204011499882,
-0.04269914701581001,
0.004070113878697157,
0.043678298592567444,
0.060741133987903595,
-0.09161050617694855,
0.04234355688095093,
-0.056638672947883606,
0.10734926164150238,
-0.07785485684871674,
-0.07563694566488266,
0.04901422560214996,
0.0717136561870575,
-0.04391103982925415,
-0.021228056401014328,
-0.06521596759557724,
-0.016058817505836487,
-0.01432063989341259,
0.08888238668441772,
-0.04882499575614929,
-0.002659714315086603,
0.00017934101924765855,
0.09035472571849823,
-0.09242957830429077,
0.013396845199167728,
0.02061976119875908,
-0.029563141986727715,
0.055165596306324005,
0.03134910389780998,
-0.06588798016309738,
-1.6882479253868464e-33,
0.0021148889791220427,
-0.018450167030096054,
-0.04703162983059883,
-0.0016667034942656755,
-0.04594435542821884,
0.00005243090708972886,
-0.05124645680189133,
0.041535668075084686,
0.00053509691497311,
0.04416826739907265,
-0.02080600894987583,
-0.05554798245429993,
0.14389874041080475,
-0.02883528359234333,
-0.10631370544433594,
-0.022810038179159164,
-0.06387974321842194,
0.010738907381892204,
0.015018251724541187,
0.0571468360722065,
0.0027117785066366196,
0.05668783560395241,
0.04426850378513336,
0.0794014260172844,
0.028626015409827232,
0.026907918974757195,
0.005078543908894062,
0.02851468324661255,
-0.047363512217998505,
-0.008289421908557415,
0.0014409531140699983,
-0.06614767014980316,
-0.03671278804540634,
0.03804999962449074,
0.004085831344127655,
-0.12896253168582916,
-0.007377022877335548,
-0.036387961357831955,
0.05625252425670624,
-0.030988989397883415,
0.03470759838819504,
0.040874652564525604,
-0.057925235480070114,
-0.042064666748046875,
-0.038255512714385986,
-0.0433957539498806,
0.061688732355833054,
0.018614672124385834,
-0.00807144120335579,
-0.09351428598165512,
-0.03676214441657066,
-0.08659828454256058,
-0.035811323672533035,
0.048202142119407654,
-0.04797523841261864,
0.017840804532170296,
0.03215217590332031,
0.037442177534103394,
-0.05020834878087044,
0.06940722465515137,
0.07075303047895432,
-0.0763838142156601,
-0.017032360658049583,
0.11278647184371948,
-0.01578563079237938,
-0.14313176274299622,
0.006704299245029688,
0.07805135101079941,
-0.07611245661973953,
0.023435937240719795,
-0.026280542835593224,
0.0123809315264225,
0.06748727709054947,
0.0836077407002449,
0.01571563258767128,
-0.06206180900335312,
0.05602256581187248,
-0.05722203478217125,
0.020071620121598244,
0.044761572033166885,
-0.08194433152675629,
0.11878103762865067,
-0.044280972331762314,
0.030746489763259888,
0.0975571721792221,
0.07789510488510132,
0.10608930885791779,
0.03362186253070831,
0.04390387982130051,
0.0603855662047863,
-0.0637303814291954,
-0.007294896524399519,
-0.024019913747906685,
0.027883149683475494,
-0.03255903720855713,
-4.3090420120961426e-8,
0.11927217245101929,
-0.07589657604694366,
0.039438437670469284,
0.07239163666963577,
0.05363750457763672,
-0.001947475946508348,
-0.10911986976861954,
0.011368382722139359,
-0.04616052657365799,
-0.011658941395580769,
-0.030696341767907143,
0.007986469194293022,
-0.09962640702724457,
-0.03073153831064701,
0.05460374429821968,
-0.07089146226644516,
0.005139085464179516,
0.09257073700428009,
-0.061309125274419785,
-0.07298287749290466,
-0.07689189910888672,
-0.09197588264942169,
0.007684496697038412,
-0.004566903226077557,
-0.004823734983801842,
0.04503655806183815,
0.07229093462228775,
-0.11733181029558182,
0.035864152014255524,
0.014307969249784946,
-0.05755038931965828,
-0.05682136118412018,
-0.022999228909611702,
0.012043852359056473,
-0.0681380033493042,
0.05189431458711624,
-0.05866497382521629,
0.07670808583498001,
-0.005670004524290562,
0.06022961065173149,
-0.0324634313583374,
-0.0452021099627018,
-0.005049746949225664,
-0.012029509991407394,
-0.07042548805475235,
0.0017752263229340315,
0.02060670778155327,
0.0024277360644191504,
0.021231893450021744,
0.07876238226890564,
-0.0006686261622235179,
-0.04420679435133934,
0.02114945836365223,
0.03007979691028595,
-0.011538331396877766,
0.04753023386001587,
-0.03785701096057892,
-0.03615433722734451,
0.039031852036714554,
-0.030848605558276176,
0.045340586453676224,
-0.044442761689424515,
0.011444858275353909,
0.033566128462553024
] | 0.161737
|
This page provides an example of how to provision and configure swap memory on a Kubernetes node using kubeadm. ## {{% heading "objectives" %}} \* Provision swap memory on a Kubernetes node using kubeadm. \* Learn to configure both encrypted and unencrypted swap. \* Learn to enable swap on boot. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} You need at least one worker node in your cluster which needs to run a Linux operating system. It is required for this demo that the kubeadm tool be installed, following the steps outlined in the [kubeadm installation guide](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm). On each worker node where you will configure swap use, you need: \* `fallocate` \* `mkswap` \* `swapon` \* For encrypted swap space (recommended), you also need: \* `cryptsetup` ## Install a swap-enabled cluster with kubeadm ### Create a swap file and turn swap on If swap is not enabled, there's a need to provision swap on the node. The following sections demonstrate creating 4GiB of swap, both in the encrypted and unencrypted case. {{< tabs name="Create a swap file and turn swap on" >}} {{% tab name="Setting up encrypted swap" %}} An encrypted swap file can be set up as follows. Bear in mind that this example uses the `cryptsetup` binary (which is available on most Linux distributions). ```bash # Allocate storage and restrict access fallocate --length 4GiB /swapfile chmod 600 /swapfile # Create an encrypted device backed by the allocated storage cryptsetup --type plain --cipher aes-xts-plain64 --key-size 256 -d /dev/urandom open /swapfile cryptswap # Format the swap space mkswap /dev/mapper/cryptswap # Activate the swap space for paging swapon /dev/mapper/cryptswap ``` {{% /tab %}} {{% tab name="Setting up unencrypted swap" %}} An unencrypted swap file can be set up as follows. ```bash # Allocate storage and restrict access fallocate --length 4GiB /swapfile chmod 600 /swapfile # Format the swap space mkswap /swapfile # Activate the swap space for paging swapon /swapfile ``` {{% /tab %}} {{< /tabs >}} #### Verify that swap is enabled Swap can be verified to be enabled with both `swapon -s` command or the `free` command. Using `swapon -s`: ``` Filename Type Size Used Priority /dev/dm-0 partition 4194300 0 -2 ``` Using `free -h`: ``` total used free shared buff/cache available Mem: 3.8Gi 1.3Gi 249Mi 25Mi 2.5Gi 2.5Gi Swap: 4.0Gi 0B 4.0Gi ``` #### Enable swap on boot After setting up swap, to start the swap file at boot time, you typically either set up a systemd unit to activate (encrypted) swap, or you add a line similar to `/swapfile swap swap defaults 0 0` into `/etc/fstab`. Using systemd for swap activation allows the system to delay kubelet start until swap is available, if that is something you want to ensure. In a similar way, using systemd allows your server to leave swap active until kubelet (and, typically, your container runtime) have shut down. ### Set up kubelet configuration After enabling swap on the node, kubelet needs to be configured to use it. You need to select a [swap behavior](/docs/reference/node/swap-behavior/) for this node. You'll configure \_LimitedSwap\_ behavior for this tutorial. Find and edit the kubelet configuration file, and: - set `failSwapOn` to false - set `memorySwap.swapBehavior` to LimitedSwap ```yaml # this fragment goes into the kubelet's configuration file failSwapOn: false memorySwap: swapBehavior: LimitedSwap ``` In order for these configurations to take effect, kubelet needs to be restarted. Typically you do that by running: ```shell systemctl restart kubelet.service ``` You should find that the kubelet is now healthy, and that you can run Pods that use swap memory as needed.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/provision-swap-memory.md
|
[
0.005653566215187311,
-0.009413953870534897,
-0.009270235896110535,
-0.00607705395668745,
-0.03932654857635498,
0.056982386857271194,
0.0025098847690969706,
0.05183377489447594,
0.029984893277287483,
0.055673256516456604,
-0.01568063721060753,
-0.042556047439575195,
0.025353670120239258,
-0.040979672223329544,
-0.017839578911662102,
0.047818753868341446,
-0.027108028531074524,
0.06584803014993668,
0.023739252239465714,
-0.03834935277700424,
0.013772069476544857,
-0.11211374402046204,
0.015466202981770039,
-0.014497445896267891,
-0.05654590204358101,
-0.0031349207274615765,
0.04188615083694458,
0.034647442400455475,
-0.046960800886154175,
-0.04775630682706833,
-0.029164748266339302,
0.002701238729059696,
-0.0526810921728611,
0.01244667824357748,
0.01397574134171009,
0.10598235577344894,
-0.08159328252077103,
-0.08020399510860443,
-0.04217734560370445,
-0.020853998139500618,
0.06519927829504013,
-0.004989876877516508,
-0.10311578959226608,
-0.0014934696955606341,
-0.023615717887878418,
0.06574960052967072,
0.007790645118802786,
-0.012272020801901817,
-0.02835693024098873,
-0.04420493543148041,
0.06001368165016174,
0.01711348257958889,
0.02204275317490101,
0.07285886257886887,
-0.09994255751371384,
0.03581397235393524,
0.004785507917404175,
-0.03118973597884178,
0.11012285947799683,
0.009162046015262604,
0.05963873490691185,
0.0014974436489865184,
0.03400494530797005,
-0.01528274267911911,
-0.09920279681682587,
0.06169283762574196,
0.09830329567193985,
-0.0320357084274292,
0.007036609575152397,
0.02203652821481228,
0.02265201322734356,
0.002509651007130742,
0.006754695437848568,
0.015406805090606213,
-0.05510254204273224,
-0.005342381540685892,
-0.011575324460864067,
-0.01343510951846838,
-0.029553819447755814,
-0.031115056946873665,
-0.005976786836981773,
0.0360528789460659,
0.06466656923294067,
-0.05194859951734543,
-0.05786501243710518,
0.01937798224389553,
-0.029323644936084747,
-0.07071751356124878,
0.02438485063612461,
-0.045445073395967484,
0.02551884390413761,
-0.023167895153164864,
-0.03527391329407692,
-0.11874465644359589,
0.09337693452835083,
-0.008008010685443878,
0.0035852959845215082,
0.021949496120214462,
-0.02003411203622818,
-0.04738974571228027,
0.025288889184594154,
0.0010126091074198484,
0.040333736687898636,
0.0063031637109816074,
0.02880050055682659,
0.001855375012382865,
0.01361222192645073,
-0.03518639877438545,
-0.0558122918009758,
0.052890896797180176,
0.05622922256588936,
0.11849650740623474,
0.020727645605802536,
0.057469356805086136,
0.02560768462717533,
0.03768282011151314,
-0.0020568391773849726,
-0.0678563117980957,
-0.028166890144348145,
0.11120501905679703,
0.0327872671186924,
0.0042859818786382675,
-0.011089552193880081,
0.0326991081237793,
-0.12851972877979279,
0.01209576427936554,
-0.056058261543512344,
6.757399070679e-33,
0.05087760090827942,
-0.0848698765039444,
0.04610954225063324,
-0.01878926157951355,
0.02179490216076374,
-0.043313149362802505,
-0.026080064475536346,
-0.006953503470867872,
-0.07837624102830887,
-0.016309073194861412,
-0.04644165188074112,
-0.06261777877807617,
0.016907714307308197,
-0.04550403356552124,
-0.016378432512283325,
-0.03112667426466942,
-0.03305792436003685,
-0.031109243631362915,
0.15834838151931763,
-0.0356026291847229,
0.012056272476911545,
0.0043017263524234295,
0.03981085121631622,
-0.012621232308447361,
-0.05569685250520706,
-0.013058841228485107,
0.05478447675704956,
-0.09319113940000534,
0.03271089866757393,
0.004163761623203754,
-0.08921319246292114,
-0.012056790292263031,
-0.0016434594290331006,
0.028143584728240967,
-0.05886850506067276,
-0.03315161541104317,
-0.01857939548790455,
-0.0021818005479872227,
-0.04708753526210785,
-0.07677796483039856,
0.06645984202623367,
0.013316994532942772,
0.08157414942979813,
-0.1629258096218109,
0.07396429777145386,
-0.02265552245080471,
0.10169495642185211,
-0.015580950304865837,
0.08997832983732224,
0.08757958561182022,
-0.005263772327452898,
-0.017344297841191292,
-0.015193548053503036,
-0.034649595618247986,
0.057945940643548965,
0.015887204557657242,
0.0911809429526329,
-0.029055314138531685,
-0.009596696123480797,
0.0612594299018383,
-0.10281013697385788,
-0.04178687185049057,
-0.004949890077114105,
-0.004286848474293947,
-0.0005531653296202421,
-0.005201938562095165,
0.0036037371028214693,
0.02020413614809513,
-0.08856040239334106,
-0.04537874832749367,
-0.06936082988977432,
-0.08538144081830978,
0.028624653816223145,
0.1264137327671051,
-0.06605276465415955,
0.05570511892437935,
0.0080899428576231,
0.040558889508247375,
-0.0813552513718605,
0.0003824268060270697,
0.06799047440290451,
-0.014667640440165997,
0.007037205621600151,
0.04665025323629379,
-0.011447333730757236,
-0.03077363409101963,
0.02749761939048767,
-0.04247581586241722,
-0.021984057500958443,
0.03902902454137802,
0.08633816987276077,
-0.015148436650633812,
0.003694256767630577,
0.00775163946673274,
-0.08935771137475967,
-7.240001949828936e-33,
0.005144156515598297,
-0.010018802247941494,
-0.019779324531555176,
0.08315409719944,
0.08683055639266968,
0.04592253640294075,
0.007010524161159992,
0.0288601852953434,
-0.038918185979127884,
-0.07554682344198227,
-0.08248245716094971,
-0.06091844663023949,
0.07229208201169968,
0.0063363597728312016,
-0.02537515200674534,
0.0028021058533340693,
-0.00041820804472081363,
0.07357537001371384,
0.01976010575890541,
0.08031193166971207,
-0.012381636537611485,
0.11382149159908295,
0.04170168191194534,
-0.005461879540234804,
0.05322768911719322,
0.04286804795265198,
0.015034908428788185,
0.11479954421520233,
-0.05079365894198418,
0.011535806581377983,
-0.008858956396579742,
-0.07946572452783585,
0.006527445279061794,
0.030885696411132812,
-0.01605275087058544,
-0.09526345878839493,
0.03239046782255173,
-0.003731005359441042,
-0.0009634876041673124,
0.010042821988463402,
0.07486913353204727,
-0.03220219165086746,
-0.07676524668931961,
-0.06793788820505142,
-0.00729581480845809,
0.009886064566671848,
-0.0488441064953804,
-0.07192545384168625,
0.010240967385470867,
-0.04426690563559532,
-0.1051286980509758,
-0.00334053672850132,
-0.07212948054075241,
0.015714533627033234,
-0.04642203077673912,
-0.06280963867902756,
0.035622626543045044,
0.08699599653482437,
0.026128405705094337,
0.04486750438809395,
0.0834311842918396,
-0.059515997767448425,
0.07551933079957962,
-0.07291197776794434,
0.045043520629405975,
-0.0342523530125618,
-0.04868599399924278,
-0.02726394310593605,
-0.06642641127109528,
0.10021049529314041,
-0.019754119217395782,
0.011987111531198025,
0.053401537239551544,
0.00107378582470119,
0.02210185118019581,
-0.039404381066560745,
0.04199299216270447,
-0.018864667043089867,
0.05725868046283722,
-0.04282538592815399,
0.0029933000914752483,
-0.03238651901483536,
-0.05712443217635155,
0.06661684811115265,
0.010585634037852287,
0.05573583394289017,
0.030665691941976547,
0.03645661845803261,
0.00330145051702857,
-0.012854940257966518,
-0.06500377506017685,
-0.06522630155086517,
-0.025653108954429626,
0.07609692215919495,
0.03662547096610069,
-4.995271041252636e-8,
0.1090741902589798,
0.002026894362643361,
-0.004980878438800573,
0.04239640757441521,
0.0330192930996418,
-0.062230248004198074,
0.0131587078794837,
-0.009675618261098862,
-0.047622229903936386,
-0.004011176060885191,
0.04392068833112717,
0.03374628350138664,
0.0054237633012235165,
0.03284990042448044,
0.0078886728733778,
0.058299701660871506,
-0.019343672320246696,
0.06571339815855026,
0.0028199662920087576,
-0.09145823866128922,
-0.022896934300661087,
-0.0018780841492116451,
-0.034524157643318176,
0.04730471596121788,
0.10383040457963943,
0.016091182827949524,
0.10612519830465317,
0.01937963254749775,
0.017922962084412575,
0.01899108476936817,
-0.08943053334951401,
-0.07017681002616882,
-0.019834108650684357,
0.020149054005742073,
-0.0010970410658046603,
0.0511961355805397,
-0.09308844059705734,
0.06895086169242859,
0.09398060292005539,
0.0003547356463968754,
-0.06009567901492119,
0.05831761285662651,
-0.08732124418020248,
0.018526673316955566,
-0.035566650331020355,
0.09431762248277664,
-0.08023257553577423,
0.035931434482336044,
-0.024869775399565697,
0.020018892362713814,
-0.024953363463282585,
-0.018676633015275,
-0.004809952341020107,
0.07040363550186157,
-0.012812463566660881,
0.044457707554101944,
-0.0141544034704566,
-0.016319341957569122,
0.03094218298792839,
-0.016904717311263084,
0.004391954280436039,
0.02194868214428425,
-0.05239700525999069,
-0.10846677422523499
] | 0.109011
|
In order for these configurations to take effect, kubelet needs to be restarted. Typically you do that by running: ```shell systemctl restart kubelet.service ``` You should find that the kubelet is now healthy, and that you can run Pods that use swap memory as needed.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/provision-swap-memory.md
|
[
0.08184439688920975,
0.022860581055283546,
0.0434599332511425,
-0.02882050909101963,
-0.10041756182909012,
0.011810464784502983,
-0.028554772958159447,
0.02562040090560913,
0.08382725715637207,
0.032959360629320145,
-0.014875762164592743,
-0.025870492681860924,
-0.03164390102028847,
-0.05951124057173729,
0.03704410046339035,
0.0285351499915123,
-0.04184921458363533,
0.04273488372564316,
-0.01999598927795887,
0.03456062823534012,
-0.018548287451267242,
-0.033663325011730194,
-0.010477082803845406,
0.021027399227023125,
-0.04147131368517876,
-0.035225413739681244,
0.019983837381005287,
-0.014366342686116695,
-0.00018984881171490997,
-0.12658876180648804,
-0.04424735903739929,
0.06193096563220024,
-0.0519077442586422,
0.0038075726479291916,
0.0834394320845604,
0.08380063623189926,
-0.02340022660791874,
-0.05684899166226387,
-0.021079834550619125,
-0.005535389296710491,
0.013318829238414764,
-0.014136651530861855,
-0.09854037314653397,
0.03795848786830902,
-0.005749375559389591,
0.11542560160160065,
-0.04396457597613335,
-0.055944059044122696,
0.06119273602962494,
-0.06930685043334961,
0.0031633053440600634,
-0.023217113688588142,
0.07843028753995895,
0.039541177451610565,
0.06920181214809418,
0.058032263070344925,
0.0034110629931092262,
0.04821273311972618,
0.09779627621173859,
0.025610413402318954,
0.026967529207468033,
0.0035890373401343822,
0.01988868974149227,
-0.0044546001590788364,
-0.06058589741587639,
-0.03121933899819851,
0.04135311022400856,
0.006299922242760658,
-0.013202698901295662,
0.03985027223825455,
0.07310417294502258,
0.013106736354529858,
0.0114953787997365,
-0.014301043935120106,
0.01879521831870079,
-0.029884139075875282,
-0.012452171184122562,
-0.047727521508932114,
-0.04011373594403267,
-0.03449415788054466,
-0.0065613179467618465,
0.06684698164463043,
0.048994775861501694,
-0.038797296583652496,
-0.05122566968202591,
-0.015946436673402786,
-0.037416182458400726,
-0.06695689260959625,
-0.039784736931324005,
-0.02087308280169964,
0.03312814235687256,
-0.05578070133924484,
0.05475581809878349,
-0.10505402833223343,
0.03682719171047211,
-0.02521747350692749,
0.05314906686544418,
0.03624649718403816,
-0.017077624797821045,
-0.045447833836078644,
0.0689387246966362,
0.0553433820605278,
0.04955810680985451,
0.09396285563707352,
0.08111844211816788,
-0.09893293678760529,
0.008653908967971802,
0.002073965035378933,
-0.022232919931411743,
-0.03570392727851868,
0.060447853058576584,
0.028893206268548965,
-0.00061382120475173,
0.07490094006061554,
0.023202557116746902,
0.024873580783605576,
-0.043035514652729034,
-0.01855446584522724,
-0.024072377011179924,
0.030441803857684135,
0.039561234414577484,
-0.030385421589016914,
-0.05008338391780853,
0.04534086212515831,
-0.11793515086174011,
0.020985601469874382,
0.004357397556304932,
7.674665322451959e-34,
0.057503920048475266,
-0.11409921944141388,
0.026602018624544144,
0.004522405099123716,
-0.04390349239110947,
-0.10839992016553879,
-0.09507979452610016,
-0.028126399964094162,
-0.08871565014123917,
-0.03282788023352623,
-0.056850582361221313,
-0.0380307175219059,
-0.045000240206718445,
0.015491116791963577,
0.04532880336046219,
-0.04178830608725548,
-0.09177461266517639,
0.06338512897491455,
0.08835972100496292,
-0.046864353120326996,
0.08888626098632812,
-0.01878579892218113,
-0.0333377905189991,
0.0006930767558515072,
-0.000588463619351387,
0.012309685349464417,
0.06315139681100845,
-0.08729861676692963,
-0.04581779986619949,
0.007951946929097176,
-0.029622778296470642,
0.03842867910861969,
0.000009184589544020128,
0.0425165519118309,
-0.12706074118614197,
0.009251250885426998,
-0.003959348890930414,
0.01573498733341694,
-0.0549776554107666,
-0.07676387578248978,
-0.02556517720222473,
0.04436294734477997,
0.005729619413614273,
-0.09175528585910797,
0.07752575725317001,
-0.05619243159890175,
0.07714707404375076,
-0.020879507064819336,
0.02222530171275139,
0.08787515014410019,
-0.028435219079256058,
0.0020047312136739492,
0.012957430444657803,
0.08177696168422699,
0.057125356048345566,
0.048546385020017624,
0.11161905527114868,
-0.052738502621650696,
-0.05357205122709274,
0.06735987216234207,
-0.0057423310354352,
-0.004933554213494062,
0.05253349244594574,
0.014642882160842419,
0.05437501147389412,
0.06246250495314598,
-0.0006169435218907893,
0.048830583691596985,
-0.07779587805271149,
0.0015218654880300164,
-0.08346950262784958,
-0.017650699242949486,
-0.012214922346174717,
0.04445084184408188,
-0.06121806427836418,
-0.032045215368270874,
0.0002312816068297252,
-0.015474827960133553,
-0.20723064243793488,
0.035296667367219925,
0.11526596546173096,
-0.05271749198436737,
-0.014864807948470116,
0.013941592536866665,
0.028556397184729576,
-0.003916471730917692,
0.08622012287378311,
0.019682977348566055,
-0.07725898176431656,
0.08919364213943481,
0.02954150177538395,
-0.013201824389398098,
-0.05090703070163727,
0.029677297919988632,
-0.13247546553611755,
-3.3932374617232945e-33,
0.06965092569589615,
-0.029432808980345726,
0.027502160519361496,
0.010175247676670551,
-0.03498530387878418,
0.03384668752551079,
-0.046064864844083786,
0.03524397686123848,
-0.08323249220848083,
-0.05993729829788208,
-0.02086491324007511,
-0.031012142077088356,
-0.0011584711028262973,
0.027985166758298874,
-0.06267977505922318,
0.01450454443693161,
-0.05110727250576019,
0.022238411009311676,
-0.017228364944458008,
0.04297816380858421,
-0.05492561310529709,
0.04733140021562576,
0.04236256331205368,
-0.011761501431465149,
-0.018698517233133316,
0.012587456963956356,
0.021989652886986732,
0.06300622224807739,
-0.0337226428091526,
0.01810745894908905,
0.0670677199959755,
-0.06398611515760422,
-0.013778560794889927,
0.08955524861812592,
0.031849365681409836,
-0.06645241379737854,
-0.017356673255562782,
0.025308510288596153,
0.005642579402774572,
-0.002917926525697112,
0.016970032826066017,
0.07264411449432373,
-0.04945944622159004,
-0.03425643593072891,
0.0033674694132059813,
0.008980103768408298,
-0.03170119225978851,
-0.03950411081314087,
0.05462121590971947,
-0.08292564749717712,
-0.021055638790130615,
-0.03543120622634888,
-0.031144071370363235,
0.03933931142091751,
-0.05321357399225235,
-0.029048647731542587,
0.03193306922912598,
0.06388131529092789,
-0.015343715436756611,
-0.05682757496833801,
0.029873274266719818,
-0.05933603271842003,
0.03657912835478783,
-0.11797134578227997,
0.024209002032876015,
-0.053308237344026566,
-0.02036415785551071,
0.023941533640027046,
0.021297389641404152,
-0.0021470864303410053,
0.024404481053352356,
0.02513534016907215,
0.021277060732245445,
0.006780451163649559,
0.00869071390479803,
0.011898803524672985,
-0.04443567991256714,
0.02786266803741455,
0.1044543981552124,
0.019695335999131203,
-0.05842003598809242,
0.024841632694005966,
-0.015478775836527348,
0.02780251018702984,
-0.026898324489593506,
0.04628361389040947,
0.0261706430464983,
0.04737396910786629,
0.0006991508998908103,
0.0003798747784458101,
0.002740636467933655,
-0.0063576591201126575,
0.016352690756320953,
0.10090459138154984,
-0.025984125211834908,
-3.252126745678652e-8,
0.1376643180847168,
-0.07079491019248962,
-0.004714785609394312,
0.10709017515182495,
0.03464016690850258,
-0.10787179321050644,
-0.019578659906983376,
0.04506480693817139,
-0.07569137960672379,
0.0006142943748272955,
-0.03900647535920143,
0.10219760984182358,
-0.03930642455816269,
0.029475457966327667,
0.055617570877075195,
-0.011121261864900589,
-0.04176640883088112,
0.027239590883255005,
0.0412512868642807,
-0.06911527365446091,
-0.0713513121008873,
-0.05027010291814804,
0.04915378987789154,
0.03752244636416435,
0.04656442254781723,
0.07594554126262665,
0.12279662489891052,
-0.003906422760337591,
0.015299150720238686,
-0.022881804034113884,
-0.03538408875465393,
-0.024532249197363853,
-0.08301923424005508,
0.021926922723650932,
0.016042720526456833,
0.021246641874313354,
-0.11046074330806732,
0.03610340878367424,
0.04686922952532768,
0.002306891605257988,
-0.06745006144046783,
-0.059356991201639175,
-0.0559907890856266,
0.013945170678198338,
-0.07053252309560776,
0.03967161476612091,
0.014605008997023106,
0.08481570333242416,
0.0036456789821386337,
-0.030728759244084358,
-0.041714489459991455,
-0.013700633309781551,
0.010105209425091743,
0.03227563202381134,
-0.0028354779351502657,
0.0427548922598362,
-0.03120831400156021,
-0.029018277302384377,
-0.014460766687989235,
0.00287832785397768,
-0.03065715916454792,
-0.025346949696540833,
-0.04975121468305588,
-0.05323117598891258
] | 0.139561
|
Kubernetes {{< glossary\_tooltip text="namespaces" term\_id="namespace" >}} help different projects, teams, or customers to share a Kubernetes cluster. It does this by providing the following: 1. A scope for [Names](/docs/concepts/overview/working-with-objects/names/). 2. A mechanism to attach authorization and policy to a subsection of the cluster. Use of multiple namespaces is optional. This example demonstrates how to use Kubernetes namespaces to subdivide your cluster. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Prerequisites This example assumes the following: 1. You have an [existing Kubernetes cluster](/docs/setup/). 2. You have a basic understanding of Kubernetes {{< glossary\_tooltip text="Pods" term\_id="pod" >}}, {{< glossary\_tooltip term\_id="service" text="Services" >}}, and {{< glossary\_tooltip text="Deployments" term\_id="deployment" >}}. ## Understand the default namespace By default, a Kubernetes cluster will instantiate a default namespace when provisioning the cluster to hold the default set of Pods, Services, and Deployments used by the cluster. Assuming you have a fresh cluster, you can inspect the available namespaces by doing the following: ```shell kubectl get namespaces ``` ``` NAME STATUS AGE default Active 13m ``` ## Create new namespaces For this exercise, we will create two additional Kubernetes namespaces to hold our content. Let's imagine a scenario where an organization is using a shared Kubernetes cluster for development and production use cases. The development team would like to maintain a space in the cluster where they can get a view on the list of Pods, Services, and Deployments they use to build and run their application. In this space, Kubernetes resources come and go, and the restrictions on who can or cannot modify resources are relaxed to enable agile development. The operations team would like to maintain a space in the cluster where they can enforce strict procedures on who can or cannot manipulate the set of Pods, Services, and Deployments that run the production site. One pattern this organization could follow is to partition the Kubernetes cluster into two namespaces: `development` and `production`. Let's create two new namespaces to hold our work. Use the file [`namespace-dev.yaml`](/examples/admin/namespace-dev.yaml) which describes a `development` namespace: {{% code\_sample language="yaml" file="admin/namespace-dev.yaml" %}} Create the `development` namespace using kubectl. ```shell kubectl create -f https://k8s.io/examples/admin/namespace-dev.yaml ``` Save the following contents into file [`namespace-prod.yaml`](/examples/admin/namespace-prod.yaml) which describes a `production` namespace: {{% code\_sample language="yaml" file="admin/namespace-prod.yaml" %}} And then let's create the `production` namespace using kubectl. ```shell kubectl create -f https://k8s.io/examples/admin/namespace-prod.yaml ``` To be sure things are right, let's list all of the namespaces in our cluster. ```shell kubectl get namespaces --show-labels ``` ``` NAME STATUS AGE LABELS default Active 32m development Active 29s name=development production Active 23s name=production ``` ## Create pods in each namespace A Kubernetes namespace provides the scope for Pods, Services, and Deployments in the cluster. Users interacting with one namespace do not see the content in another namespace. To demonstrate this, let's spin up a simple Deployment and Pods in the `development` namespace. We first check what is the current context: ```shell kubectl config view ``` ```yaml apiVersion: v1 clusters: - cluster: certificate-authority-data: REDACTED server: https://130.211.122.180 name: lithe-cocoa-92103\_kubernetes contexts: - context: cluster: lithe-cocoa-92103\_kubernetes user: lithe-cocoa-92103\_kubernetes name: lithe-cocoa-92103\_kubernetes current-context: lithe-cocoa-92103\_kubernetes kind: Config preferences: {} users: - name: lithe-cocoa-92103\_kubernetes user: client-certificate-data: REDACTED client-key-data: REDACTED token: 65rZW78y8HbwXXtSXuUw9DbP4FLjHi4b - name: lithe-cocoa-92103\_kubernetes-basic-auth user: password: h5M0FtUUIflBSdI7 username: admin ``` ```shell kubectl config current-context ``` ``` lithe-cocoa-92103\_kubernetes ``` The next step is to define a context for the kubectl client to work in each namespace. The value of "cluster" and "user" fields are copied from the current context. ```shell kubectl config set-context dev --namespace=development \ --cluster=lithe-cocoa-92103\_kubernetes \ --user=lithe-cocoa-92103\_kubernetes kubectl config set-context prod --namespace=production \ --cluster=lithe-cocoa-92103\_kubernetes \ --user=lithe-cocoa-92103\_kubernetes ``` By default, the above commands add two
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/namespaces-walkthrough.md
|
[
-0.051812395453453064,
-0.009854266420006752,
0.06395453214645386,
0.019220266491174698,
-0.012732596136629581,
-0.009958993643522263,
0.09245965629816055,
-0.07056976109743118,
0.027622146531939507,
0.032764703035354614,
-0.009688863530755043,
-0.10584450513124466,
0.017011763527989388,
0.015155564993619919,
0.013890687376260757,
0.019565992057323456,
0.042420893907547,
-0.09782665222883224,
-0.01948622427880764,
-0.08364065736532211,
0.03584624081850052,
0.030367644503712654,
0.05193668603897095,
0.02634437568485737,
-0.04743596166372299,
0.0223812535405159,
-0.0704074427485466,
0.021741285920143127,
0.004529395140707493,
0.06201846897602081,
-0.008968664333224297,
0.02302941121160984,
-0.027835294604301453,
0.07729294151067734,
0.07997570186853409,
0.07343751192092896,
-0.009680877439677715,
0.03771379217505455,
-0.03402724862098694,
0.04217188432812691,
0.009719198569655418,
0.028271932154893875,
-0.08184691518545151,
-0.02546435222029686,
-0.026446202769875526,
0.0041902028024196625,
-0.04865973815321922,
-0.04349268600344658,
0.021351773291826248,
0.05294247344136238,
0.007182106375694275,
-0.17119993269443512,
0.035512059926986694,
-0.014941330999135971,
0.06347059458494186,
0.05418536812067032,
-0.05174786597490311,
-0.0034149365965276957,
0.03322245925664902,
-0.046141188591718674,
0.015789266675710678,
-0.037525251507759094,
-0.0037980906199663877,
-0.03726622462272644,
0.01266297698020935,
0.004697236232459545,
-0.006009735632687807,
0.06710656732320786,
-0.022871995344758034,
-0.02449137717485428,
0.03761059045791626,
0.013783861882984638,
0.012456323020160198,
-0.005658275913447142,
-0.016563300043344498,
0.023632435128092766,
-0.07171937823295593,
0.08793846517801285,
0.02065996266901493,
-0.1562727987766266,
0.03521793708205223,
0.118032306432724,
0.08794466406106949,
0.045957051217556,
-0.037415385246276855,
-0.04299849271774292,
0.04734795168042183,
-0.05476608872413635,
-0.009143085218966007,
-0.06322702020406723,
-0.0020931533072143793,
-0.1169535368680954,
0.07697521895170212,
-0.11026862263679504,
0.05717209354043007,
0.025516783818602562,
-0.013383433222770691,
-0.04562178626656532,
0.0029258979484438896,
0.0013362257741391659,
-0.0008311321143992245,
-0.07826398313045502,
0.019095923751592636,
-0.041524436324834824,
-0.011548865586519241,
0.03836464509367943,
-0.08993837237358093,
0.009355270303785801,
0.01949385739862919,
0.06728183478116989,
-0.05427823215723038,
0.11249461770057678,
-0.06687157601118088,
0.007242794614285231,
-0.018345540389418602,
-0.08966890722513199,
0.01727726310491562,
-0.01754499413073063,
0.056272242218256,
0.055509742349386215,
0.020653100684285164,
-0.0880427286028862,
0.039394088089466095,
0.013483691960573196,
-0.021600304171442986,
-0.0024035628885030746,
-0.07325512915849686,
2.93660322724619e-34,
0.06292429566383362,
-0.02735699713230133,
-0.03744668513536453,
0.003570695873349905,
-0.002809887519106269,
-0.0666908472776413,
-0.03819011524319649,
0.027380358427762985,
-0.08126048743724823,
-0.014661836437880993,
-0.0034159207716584206,
0.11807942390441895,
0.03550337255001068,
-0.07508673518896103,
0.027922583743929863,
0.012528570368885994,
-0.033209823071956635,
0.08759254217147827,
0.061692975461483,
-0.0416417121887207,
-0.01940508373081684,
-0.009664064273238182,
0.0012043650494888425,
-0.0270419642329216,
0.03238481283187866,
0.011449641548097134,
0.02525843121111393,
-0.07162084430456161,
0.024424459785223007,
0.018160538747906685,
-0.006614486686885357,
-0.014802717603743076,
0.049582336097955704,
-0.04963359609246254,
-0.1286611557006836,
0.04152824729681015,
0.00338164740242064,
-0.04505250230431557,
0.0037105039227753878,
-0.04501046985387802,
0.032285477966070175,
-0.04783894866704941,
0.042720451951026917,
-0.06899844110012054,
0.04645024240016937,
0.028697939589619637,
0.016065280884504318,
-0.0836578905582428,
0.10946468263864517,
0.008367977105081081,
-0.021214814856648445,
-0.10832284390926361,
0.01440445426851511,
0.001413756050169468,
0.031077947467565536,
0.081485316157341,
0.04166141897439957,
-0.03477136790752411,
0.00612250342965126,
-0.070399209856987,
-0.05938193202018738,
0.004451450426131487,
-0.0509725883603096,
0.01347785908728838,
0.013408862985670567,
-0.0005934163345955312,
-0.04050327092409134,
0.09508612006902695,
0.05949166417121887,
-0.03523794561624527,
-0.09199885278940201,
0.0005130358040332794,
0.0006258940557017922,
0.07191839069128036,
0.004257043823599815,
-0.028349684551358223,
-0.04627026244997978,
0.026605114340782166,
-0.05843298137187958,
0.043984148651361465,
-0.010903100483119488,
-0.11003953218460083,
-0.028955332934856415,
0.07500368356704712,
0.02715335041284561,
-0.02493535913527012,
0.028965016826987267,
-0.017782563343644142,
-0.06990660727024078,
0.020513519644737244,
-0.03892946243286133,
-0.05617578700184822,
-0.09467995166778564,
0.03828130289912224,
-0.054321207106113434,
-2.947946793649373e-33,
0.16001424193382263,
0.0024742656387388706,
0.00891073141247034,
0.012567835859954357,
0.08436889946460724,
0.01573220081627369,
0.03146291524171829,
0.016319263726472855,
-0.005103951320052147,
-0.02117333561182022,
-0.04757073149085045,
0.0034425475168973207,
0.04614271968603134,
0.06883326917886734,
-0.04146220535039902,
0.032923098653554916,
-0.08425445854663849,
0.02079925313591957,
-0.013345703482627869,
-0.015746507793664932,
-0.013177899643778801,
-0.03387153893709183,
0.029873570427298546,
-0.0008316306630149484,
0.025303654372692108,
-0.0001966014242498204,
0.01670362614095211,
0.005890926346182823,
0.0017220252193510532,
0.02707916498184204,
-0.019444210454821587,
-0.020112888887524605,
-0.032127734273672104,
-0.03569933772087097,
0.041084855794906616,
-0.07532583922147751,
-0.011958294548094273,
-0.035211313515901566,
-0.04315875098109245,
0.012137039564549923,
0.07273966819047928,
-0.008079657331109047,
-0.03500661998987198,
-0.09170828014612198,
-0.02262110263109207,
0.011904438026249409,
0.079374298453331,
-0.023474283516407013,
-0.0313454233109951,
-0.07562045753002167,
0.007839749567210674,
-0.08868511021137238,
-0.06360062211751938,
0.022750146687030792,
-0.06474897265434265,
0.0722045749425888,
0.05601884424686432,
-0.014319641515612602,
-0.022423233836889267,
-0.01786140911281109,
0.03567742183804512,
-0.06025310605764389,
0.049390509724617004,
0.038060471415519714,
0.0009233155869878829,
-0.09812063723802567,
-0.03871354088187218,
0.03418196365237236,
0.004869136959314346,
-0.01705142669379711,
-0.11166490614414215,
-0.046158239245414734,
0.06242130696773529,
-0.05037475377321243,
0.03420315310359001,
0.04865936189889908,
0.09652451425790787,
-0.04192458093166351,
0.06012158840894699,
-0.07107467949390411,
0.0067670405842363834,
0.027363549917936325,
-0.05196843668818474,
0.03448086604475975,
0.058864425867795944,
0.038597989827394485,
0.06006776914000511,
0.13558626174926758,
-0.011385290883481503,
0.022678151726722717,
-0.03054727613925934,
-0.012134435586631298,
0.0728723481297493,
0.11191821098327637,
-0.041105967015028,
-4.971727562974593e-8,
-0.0018036665860563517,
0.1668941229581833,
-0.015274804085493088,
0.057181596755981445,
0.00038474792381748557,
-0.010290647856891155,
-0.01250110100954771,
0.004737534560263157,
-0.007362182252109051,
-0.010869719088077545,
-0.01975916139781475,
0.09699893742799759,
-0.06820892542600632,
0.023331357166171074,
-0.05238017439842224,
0.01594977080821991,
-0.06812813878059387,
-0.005410390440374613,
0.01711469143629074,
-0.02526639588177204,
-0.01663125306367874,
-0.017794277518987656,
0.004418030381202698,
0.012899788096547127,
-0.024953410029411316,
0.023788372054696083,
-0.01111820712685585,
0.04149447754025459,
-0.01640257053077221,
-0.007146458141505718,
-0.01918753795325756,
0.0404357872903347,
-0.11500900983810425,
0.11118997633457184,
0.03165563941001892,
-0.03985438868403435,
-0.08380459994077682,
0.06099877879023552,
0.11551123857498169,
0.03206256031990051,
-0.00250511453486979,
0.020497092977166176,
-0.06224827840924263,
0.0029135560616850853,
0.05464654043316841,
0.0950305312871933,
-0.011379796080291271,
0.02261141687631607,
-0.0272093266248703,
-0.013408105820417404,
-0.09813998639583588,
0.0010207389714196324,
-0.027913199737668037,
0.08753345906734467,
-0.02818693034350872,
-0.007101137191057205,
0.005826957523822784,
0.014770600944757462,
0.025907553732395172,
-0.05043397098779678,
0.007948488928377628,
-0.0028759725391864777,
0.016879858449101448,
0.04625058174133301
] | 0.082306
|
context for the kubectl client to work in each namespace. The value of "cluster" and "user" fields are copied from the current context. ```shell kubectl config set-context dev --namespace=development \ --cluster=lithe-cocoa-92103\_kubernetes \ --user=lithe-cocoa-92103\_kubernetes kubectl config set-context prod --namespace=production \ --cluster=lithe-cocoa-92103\_kubernetes \ --user=lithe-cocoa-92103\_kubernetes ``` By default, the above commands add two contexts that are saved into file `.kube/config`. You can now view the contexts and alternate against the two new request contexts depending on which namespace you wish to work against. To view the new contexts: ```shell kubectl config view ``` ```yaml apiVersion: v1 clusters: - cluster: certificate-authority-data: REDACTED server: https://130.211.122.180 name: lithe-cocoa-92103\_kubernetes contexts: - context: cluster: lithe-cocoa-92103\_kubernetes user: lithe-cocoa-92103\_kubernetes name: lithe-cocoa-92103\_kubernetes - context: cluster: lithe-cocoa-92103\_kubernetes namespace: development user: lithe-cocoa-92103\_kubernetes name: dev - context: cluster: lithe-cocoa-92103\_kubernetes namespace: production user: lithe-cocoa-92103\_kubernetes name: prod current-context: lithe-cocoa-92103\_kubernetes kind: Config preferences: {} users: - name: lithe-cocoa-92103\_kubernetes user: client-certificate-data: REDACTED client-key-data: REDACTED token: 65rZW78y8HbwXXtSXuUw9DbP4FLjHi4b - name: lithe-cocoa-92103\_kubernetes-basic-auth user: password: h5M0FtUUIflBSdI7 username: admin ``` Let's switch to operate in the `development` namespace. ```shell kubectl config use-context dev ``` You can verify your current context by doing the following: ```shell kubectl config current-context ``` ``` dev ``` At this point, all requests we make to the Kubernetes cluster from the command line are scoped to the `development` namespace. Let's create some contents. {{% code\_sample file="admin/snowflake-deployment.yaml" %}} Apply the manifest to create a Deployment ```shell kubectl apply -f https://k8s.io/examples/admin/snowflake-deployment.yaml ``` We have created a deployment whose replica size is 2 that is running the pod called `snowflake` with a basic container that serves the hostname. ```shell kubectl get deployment ``` ``` NAME READY UP-TO-DATE AVAILABLE AGE snowflake 2/2 2 2 2m ``` ```shell kubectl get pods -l app=snowflake ``` ``` NAME READY STATUS RESTARTS AGE snowflake-3968820950-9dgr8 1/1 Running 0 2m snowflake-3968820950-vgc4n 1/1 Running 0 2m ``` And this is great, developers are able to do what they want, and they do not have to worry about affecting content in the `production` namespace. Let's switch to the `production` namespace and show how resources in one namespace are hidden from the other. ```shell kubectl config use-context prod ``` The `production` namespace should be empty, and the following commands should return nothing. ```shell kubectl get deployment kubectl get pods ``` Production likes to run cattle, so let's create some cattle pods. ```shell kubectl create deployment cattle --image=registry.k8s.io/serve\_hostname --replicas=5 kubectl get deployment ``` ``` NAME READY UP-TO-DATE AVAILABLE AGE cattle 5/5 5 5 10s ``` ```shell kubectl get pods -l app=cattle ``` ``` NAME READY STATUS RESTARTS AGE cattle-2263376956-41xy6 1/1 Running 0 34s cattle-2263376956-kw466 1/1 Running 0 34s cattle-2263376956-n4v97 1/1 Running 0 34s cattle-2263376956-p5p3i 1/1 Running 0 34s cattle-2263376956-sxpth 1/1 Running 0 34s ``` At this point, it should be clear that the resources users create in one namespace are hidden from the other namespace. As the policy support in Kubernetes evolves, we will extend this scenario to show how you can provide different authorization rules for each namespace.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/namespaces-walkthrough.md
|
[
0.018853366374969482,
-0.02571103721857071,
-0.016430439427495003,
-0.008589561097323895,
-0.024906229227781296,
-0.03850299119949341,
0.06404513865709305,
-0.02785619907081127,
0.09171848744153976,
-0.002656625583767891,
0.006521947681903839,
-0.14691734313964844,
0.01355052087455988,
-0.036457162350416183,
0.0826520323753357,
-0.03270351141691208,
0.04267006367444992,
0.0070329937152564526,
-0.010846354998648167,
-0.03330979496240616,
0.02583468146622181,
-0.015467087738215923,
-0.004221836570650339,
-0.03134333714842796,
-0.0915515124797821,
-0.035155002027750015,
-0.03997430577874184,
-0.00595139991492033,
0.00972504261881113,
-0.02949545532464981,
0.025752630084753036,
0.0800684243440628,
-0.027921758592128754,
0.020861495286226273,
0.07524944096803665,
0.11057618260383606,
0.06468072533607483,
-0.011061239056289196,
-0.08063585311174393,
0.01103247795253992,
0.06105014681816101,
-0.0033525286708027124,
-0.07281780987977982,
0.003828680142760277,
-0.07547098398208618,
-0.004109262954443693,
-0.023413384333252907,
-0.019573606550693512,
0.009034515358507633,
-0.04360257089138031,
0.0013336667325347662,
-0.038501422852277756,
-0.00914742797613144,
0.028985602781176567,
0.05976233631372452,
0.03942079842090607,
-0.029877474531531334,
0.12433166801929474,
0.10958565771579742,
0.006872243247926235,
-0.011462443508207798,
0.013396658934652805,
0.02066737413406372,
0.0031294741202145815,
-0.04253259301185608,
0.040864892303943634,
-0.051589298993349075,
-0.002760684583336115,
0.02283167652785778,
-0.01677347533404827,
0.03439747542142868,
0.00021595203725155443,
-0.04225039482116699,
-0.09568947553634644,
-0.012452446855604649,
0.0069863866083323956,
-0.0726107507944107,
0.10515328496694565,
-0.062203917652368546,
-0.13431061804294586,
0.06881385296583176,
0.10644940286874771,
0.0510479100048542,
0.005968953017145395,
-0.06608851999044418,
0.010930472053587437,
-0.008838951587677002,
-0.08084547519683838,
0.04789005592465401,
0.05393870919942856,
0.003569667926058173,
-0.1090174987912178,
0.003779210150241852,
-0.0603104792535305,
0.032983843237161636,
-0.018042637035250664,
0.011556594632565975,
0.03901408240199089,
0.060586731880903244,
0.02073398418724537,
-0.003394585568457842,
-0.018085116520524025,
0.010260297916829586,
0.02715935744345188,
0.016477223485708237,
-0.020279536023736,
-0.10432503372430801,
-0.006532731465995312,
0.010180868208408356,
0.11410979181528091,
0.005178770050406456,
0.12365042418241501,
-0.06385936588048935,
0.02308305725455284,
0.03125850856304169,
-0.010990760289132595,
0.05189232528209686,
-0.025082489475607872,
0.0168184582144022,
0.08172521740198135,
0.021809076890349388,
-0.10950875282287598,
-0.011787260882556438,
0.02077382430434227,
-0.06309229880571365,
-0.010202650912106037,
0.004487954080104828,
3.1119313779959515e-33,
0.05896565318107605,
-0.07785574346780777,
0.03832599148154259,
0.006445091683417559,
0.003869596403092146,
-0.04489520564675331,
0.021531620994210243,
0.042064934968948364,
-0.010885583236813545,
-0.06258943676948547,
0.006702922750264406,
0.12206801772117615,
-0.018911510705947876,
-0.07573395222425461,
0.01113458164036274,
0.057141657918691635,
-0.062150489538908005,
0.04558747261762619,
0.08919244259595871,
-0.0072873616591095924,
-0.02341458946466446,
0.01838349737226963,
-0.04328884556889534,
0.014542088843882084,
0.009454077109694481,
0.00436766492202878,
0.014808805659413338,
-0.11760231852531433,
-0.06115848571062088,
0.016650883480906487,
-0.020955335348844528,
-0.016455724835395813,
0.06026608496904373,
0.07015567272901535,
-0.10198257118463516,
0.044596560299396515,
0.06219324469566345,
0.022785449400544167,
-0.1578996181488037,
-0.043442502617836,
0.02517607808113098,
0.026356671005487442,
0.0550435446202755,
-0.019032416865229607,
0.010207978077232838,
-0.09658097475767136,
-0.03248963505029678,
-0.03651973232626915,
0.07095993310213089,
0.012647336348891258,
-0.02459404058754444,
-0.04852919280529022,
0.08327477425336838,
-0.05462828651070595,
0.05932392552495003,
0.013249202631413937,
0.0011635639239102602,
-0.045041684061288834,
-0.041543155908584595,
0.0033704147208482027,
0.001411313540302217,
-0.0008934476645663381,
-0.022897467017173767,
0.05653509870171547,
0.04934728518128395,
0.023389214649796486,
-0.05450451374053955,
-0.0018518577562645078,
-0.008398421108722687,
0.024583080783486366,
-0.11513353139162064,
0.05717150494456291,
-0.07173128426074982,
0.044296443462371826,
-0.009489539079368114,
-0.062486499547958374,
-0.033580150455236435,
0.038796521723270416,
-0.10863004624843597,
0.06659018248319626,
0.042617980390787125,
0.023051774129271507,
-0.08491276204586029,
0.09464839845895767,
-0.02308705262839794,
0.03565485030412674,
-0.0017730498220771551,
-0.007324098609387875,
-0.031161321327090263,
-0.0306862685829401,
0.022856436669826508,
-0.05405537784099579,
-0.06236230581998825,
0.022178586572408676,
-0.08651252090930939,
-4.8291140968282884e-33,
0.10938527435064316,
-0.0773928090929985,
0.0014929298777133226,
-0.0021563663613051176,
0.010585875250399113,
0.011027248576283455,
0.015791967511177063,
0.06389991194009781,
-0.06299015134572983,
-0.020116055384278297,
-0.0282053891569376,
-0.033088549971580505,
0.03565967082977295,
0.03605213388800621,
-0.07315503805875778,
0.018886815756559372,
-0.05852006748318672,
-0.021205732598900795,
-0.034164946526288986,
-0.023333385586738586,
-0.026523862034082413,
-0.039071954786777496,
0.04102475941181183,
0.012316876091063023,
-0.019512565806508064,
-0.021675605326890945,
-0.04357634857296944,
0.024088680744171143,
-0.04813060536980629,
-0.008969088084995747,
0.013057573698461056,
-0.028152629733085632,
-0.07873561978340149,
0.03471054136753082,
-0.04417143017053604,
-0.05631374195218086,
-0.07136821001768112,
0.07981612533330917,
0.006008440162986517,
0.011848854832351208,
0.022252611815929413,
0.09536463767290115,
-0.06533704698085785,
-0.002074743853881955,
-0.029654202982783318,
0.08697754889726639,
0.05359102413058281,
-0.06451704353094101,
0.030678382143378258,
-0.08667972683906555,
-0.0000293031771434471,
-0.012181714177131653,
-0.10699799656867981,
0.04917936027050018,
-0.05306628718972206,
0.07109362632036209,
0.04856821522116661,
0.072299525141716,
-0.040675390511751175,
-0.03478994965553284,
0.0786510705947876,
-0.04158899933099747,
0.010759519413113594,
0.04755808040499687,
-0.0008023150730878115,
-0.05671008676290512,
0.023155776783823967,
-0.01187649555504322,
0.005461555439978838,
-0.031780775636434555,
-0.052813224494457245,
-0.09456903487443924,
-0.06168658286333084,
0.014664363116025925,
0.02804984338581562,
-0.007346103433519602,
0.07849932461977005,
-0.06699145585298538,
0.020289750769734383,
0.08342365175485611,
0.02153037115931511,
0.01529730949550867,
-0.09277745336294174,
0.04397409036755562,
0.0473458431661129,
0.07960497587919235,
0.02939329855144024,
0.11701172590255737,
0.03687027841806412,
0.07584232091903687,
0.009261101484298706,
0.06507154554128647,
-0.07382022589445114,
0.03985728323459625,
-0.04448813572525978,
-5.261092184127847e-8,
-0.021098412573337555,
0.0020739170722663403,
-0.08321918547153473,
0.0670149177312851,
0.004454948473721743,
0.028195824474096298,
0.013115630485117435,
0.015219907276332378,
-0.04523695260286331,
-0.012057794257998466,
-0.044330012053251266,
0.04665575176477432,
-0.06613677740097046,
-0.018272465094923973,
-0.01549497339874506,
0.015068023465573788,
0.04802636057138443,
0.026270920410752296,
0.03536239638924599,
-0.034961167722940445,
-0.01776416040956974,
-0.025285903364419937,
-0.017370667308568954,
-0.002690509893000126,
0.014937332831323147,
0.05594060570001602,
0.06408678740262985,
0.011123490519821644,
0.0276092067360878,
0.012864017859101295,
-0.03839215263724327,
0.014147755689918995,
-0.08762014657258987,
0.03307192027568817,
-0.06541495770215988,
-0.010255989618599415,
-0.12224813550710678,
0.03296985477209091,
0.016101567074656487,
0.05600995197892189,
-0.007575542666018009,
0.02089378796517849,
-0.03509260341525078,
0.012435859069228172,
-0.006397601682692766,
0.10060108453035355,
0.0968760997056961,
0.10196346789598465,
0.014022517949342728,
-0.015088016167283058,
-0.08037596195936203,
-0.028113001957535744,
0.0064504751935601234,
0.0698096975684166,
-0.07914330810308456,
0.008078730665147305,
-0.020129369571805,
-0.02743270993232727,
0.04843596741557121,
-0.02926044911146164,
-0.033648278564214706,
-0.03855683654546738,
-0.006895056925714016,
0.03723246976733208
] | 0.126695
|
This tutorial shows you how to run a standalone kubelet instance. You may have different motivations for running a standalone kubelet. This tutorial is aimed at introducing you to Kubernetes, even if you don't have much experience with it. You can follow this tutorial and learn about node setup, basic (static) Pods, and how Kubernetes manages containers. Once you have followed this tutorial, you could try using a cluster that has a {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} to manage pods and nodes, and other types of objects. For example, [Hello, minikube](/docs/tutorials/hello-minikube/). You can also run the kubelet in standalone mode to suit production use cases, such as to run the control plane for a highly available, resiliently deployed cluster. This tutorial does not cover the details you need for running a resilient control plane. ## {{% heading "objectives" %}} \* Install `cri-o`, and `kubelet` on a Linux system and run them as `systemd` services. \* Launch a Pod running `nginx` that listens to requests on TCP port 80 on the Pod's IP address. \* Learn how the different components of the solution interact among themselves. {{< caution >}} The kubelet configuration used for this tutorial is insecure by design and should \_not\_ be used in a production environment. {{< /caution >}} ## {{% heading "prerequisites" %}} \* Admin (`root`) access to a Linux system that uses `systemd` and `iptables` (or nftables with `iptables` emulation). \* Access to the Internet to download the components needed for the tutorial, such as: \* A {{< glossary\_tooltip text="container runtime" term\_id="container-runtime" >}} that implements the Kubernetes {{< glossary\_tooltip term\_id="cri" text="(CRI)">}}. \* Network plugins (these are often known as {{< glossary\_tooltip text="Container Networking Interface (CNI)" term\_id="cni" >}}) \* Required CLI tools: `curl`, `tar`, `jq`. ## Prepare the system ### Swap configuration By default, kubelet fails to start if swap memory is detected on a node. This means that swap should either be disabled or tolerated by kubelet. {{< note >}} If you configure the kubelet to tolerate swap, the kubelet still configures Pods (and the containers in those Pods) not to use swap space. To find out how Pods can actually use the available swap, you can read more about [swap memory management](/docs/concepts/architecture/nodes/#swap-memory) on Linux nodes. {{< /note >}} If you have swap memory enabled, either disable it or add `failSwapOn: false` to the kubelet configuration file. To check if swap is enabled: ```shell sudo swapon --show ``` If there is no output from the command, then swap memory is already disabled. To disable swap temporarily: ```shell sudo swapoff -a ``` To make this change persistent across reboots: Make sure swap is disabled in either `/etc/fstab` or `systemd.swap`, depending on how it was configured on your system. ### Enable IPv4 packet forwarding To check if IPv4 packet forwarding is enabled: ```shell cat /proc/sys/net/ipv4/ip\_forward ``` If the output is `1`, it is already enabled. If the output is `0`, then follow next steps. To enable IPv4 packet forwarding, create a configuration file that sets the `net.ipv4.ip\_forward` parameter to `1`: ```shell sudo tee /etc/sysctl.d/k8s.conf < crio-install ``` Run the installer script: ```shell sudo bash crio-install ``` Enable and start the `crio` service: ```shell sudo systemctl daemon-reload sudo systemctl enable --now crio.service ``` Quick test: ```shell sudo systemctl is-active crio.service ``` The output is similar to: ``` active ``` Detailed service check: ```shell sudo journalctl -f -u crio.service ``` ### Install network plugins The `cri-o` installer installs and configures the `cni-plugins` package. You can verify the installation running the following command: ```shell /opt/cni/bin/bridge --version ``` The output is similar to: ``` CNI bridge plugin v1.5.1 CNI protocol versions
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/kubelet-standalone.md
|
[
0.043760478496551514,
-0.008513806387782097,
-0.01617341674864292,
0.05394607409834862,
-0.04289453104138374,
0.019290463998913765,
-0.02313929982483387,
0.08114901185035706,
0.00016858942399267107,
0.03230321407318115,
-0.014098025858402252,
-0.05638990178704262,
0.027556955814361572,
-0.09160948544740677,
0.03861328959465027,
-0.0013236870290711522,
0.06959106773138046,
-0.026356380432844162,
-0.0330030657351017,
-0.036283329129219055,
-0.032863929867744446,
0.006546518765389919,
0.009795889258384705,
0.008756927214562893,
-0.10563785582780838,
-0.0029102987609803677,
-0.0035346297081559896,
0.05752961337566376,
0.036213457584381104,
-0.051972489804029465,
0.019743189215660095,
0.01567193679511547,
-0.025650080293416977,
0.07718431204557419,
0.034891702234745026,
0.14192447066307068,
0.07332423329353333,
-0.04825504124164581,
-0.09711192548274994,
-0.023239517584443092,
0.031180288642644882,
0.015965040773153305,
-0.10757838934659958,
-0.03493141010403633,
-0.009441332891583443,
0.007216497790068388,
-0.09770342707633972,
-0.039189234375953674,
0.04310322552919388,
-0.09176106750965118,
0.025188276544213295,
-0.13338510692119598,
0.06278301030397415,
0.006622605957090855,
0.06939666718244553,
0.043572988361120224,
0.0101202093064785,
-0.0067975930869579315,
0.08870989829301834,
-0.06920179724693298,
0.04002001881599426,
0.031228510662913322,
0.05317297950387001,
-0.029378259554505348,
-0.023423369973897934,
-0.021734250709414482,
-0.01481783390045166,
0.060655996203422546,
0.0589744970202446,
-0.033020488917827606,
0.022773027420043945,
-0.03530276566743851,
-0.05013284832239151,
0.022109301760792732,
-0.039617739617824554,
-0.02781907469034195,
-0.012607365846633911,
-0.0076912264339625835,
-0.06710425764322281,
0.04984588176012039,
0.0041897795163095,
0.06915141642093658,
-0.0010220013791695237,
0.02265395037829876,
-0.11639955639839172,
-0.03216063231229782,
0.0022805107291787863,
-0.022742467001080513,
0.07968224585056305,
-0.011673166416585445,
-0.03432288393378258,
0.020315324887633324,
0.08545977622270584,
-0.10870233178138733,
0.06908107548952103,
-0.036846864968538284,
0.03894204646348953,
-0.051694005727767944,
0.007633846253156662,
0.007936597801744938,
0.06401748210191727,
-0.035118844360113144,
0.004494813270866871,
-0.02470649778842926,
0.02315647527575493,
-0.02037699893116951,
0.0037118843756616116,
-0.08557648211717606,
0.029692433774471283,
-0.01693812757730484,
-0.06793500483036041,
0.05808442458510399,
-0.06428955495357513,
0.007422957103699446,
0.03249908238649368,
-0.05761534348130226,
0.020101452246308327,
-0.04556172713637352,
0.04830295220017433,
0.057643674314022064,
0.04125962406396866,
-0.10863330960273743,
0.03336360678076744,
0.024585900828242302,
0.043280214071273804,
0.051665227860212326,
-0.02722041867673397,
2.4363209589776342e-33,
0.07535846531391144,
-0.052258528769016266,
-0.015596873126924038,
-0.014788230881094933,
0.03526150435209274,
-0.05663768947124481,
-0.029242554679512978,
-0.025110216811299324,
-0.08159174770116806,
-0.04358513653278351,
-0.06663498282432556,
0.0011672902619466186,
-0.030391406267881393,
-0.030081089586019516,
0.08272598683834076,
-0.08963719010353088,
-0.022047635167837143,
0.02934083715081215,
0.06156643480062485,
-0.023349637165665627,
-0.004088202025741339,
-0.03433505445718765,
-0.013382140547037125,
-0.011077520437538624,
0.060995325446128845,
-0.03645014390349388,
0.05153527110815048,
-0.046603500843048096,
-0.02139117754995823,
0.012378075160086155,
0.004310942254960537,
0.027256343513727188,
-0.04208415001630783,
0.06309647113084793,
-0.14210793375968933,
0.012181268073618412,
-0.07426852732896805,
0.03546138107776642,
-0.08177585154771805,
-0.009226919151842594,
-0.05406888946890831,
-0.016018982976675034,
0.028121821582317352,
-0.0982111319899559,
0.04324616491794586,
0.026562782004475594,
0.05851393938064575,
-0.015514157712459564,
0.0621151402592659,
-0.010397546924650669,
-0.07680962979793549,
0.0033673252910375595,
0.049405135214328766,
-0.004872196353971958,
0.014267216436564922,
0.018617350608110428,
0.07556964457035065,
-0.09307185560464859,
-0.003690664190798998,
0.03293268010020256,
-0.07296968996524811,
0.01517336443066597,
-0.06031392514705658,
0.06469810754060745,
0.04310019686818123,
0.036520134657621384,
-0.01867002435028553,
0.05128244683146477,
-0.0024116861168295145,
0.00215607276186347,
-0.07414602488279343,
0.039315737783908844,
0.02835359238088131,
-0.0007179284584708512,
0.044024400413036346,
-0.026889894157648087,
0.012564733624458313,
-0.048595234751701355,
-0.15404504537582397,
0.05001876503229141,
0.0034527371171861887,
-0.03275381401181221,
-0.01994345709681511,
0.0593942254781723,
0.0885472297668457,
-0.07704920321702957,
0.02421097457408905,
0.025923054665327072,
-0.07289382070302963,
0.016927087679505348,
0.007208597380667925,
-0.06251516193151474,
-0.06283725798130035,
0.006417054682970047,
-0.06428422778844833,
-3.341275835971149e-33,
0.11151370406150818,
-0.0062442985363304615,
-0.014849781058728695,
0.017714494839310646,
0.04374164715409279,
0.033138129860162735,
-0.06316133588552475,
0.04203842580318451,
-0.07945965230464935,
-0.05218742787837982,
-0.12678034603595734,
-0.03847810998558998,
0.06226165592670441,
0.02269657514989376,
-0.08695654571056366,
0.00006693384057143703,
-0.09607852250337601,
-0.02979060634970665,
0.04210464656352997,
0.004684535786509514,
-0.004441084805876017,
-0.010301332920789719,
-0.010773591697216034,
-0.0282212495803833,
-0.026006335392594337,
0.004792771767824888,
0.02564089559018612,
0.07987125217914581,
-0.08531897515058517,
-0.01340387761592865,
0.005856167525053024,
-0.058576975017786026,
0.01994231529533863,
0.0689985603094101,
-0.013745571486651897,
-0.03606356680393219,
-0.014168855734169483,
-0.03564184531569481,
0.009052321314811707,
-0.04297027364373207,
0.023784631863236427,
0.06346087157726288,
-0.09685081988573074,
-0.05053364112973213,
-0.011012226343154907,
0.03274737298488617,
-0.01713910512626171,
0.034152571111917496,
-0.024946119636297226,
-0.06605328619480133,
-0.08401305973529816,
-0.0503360852599144,
-0.03697890043258667,
0.048172254115343094,
0.0006329432944767177,
-0.0025339594576507807,
0.07756170630455017,
0.11557463556528091,
-0.016469135880470276,
0.01003940962255001,
-0.011157438158988953,
-0.14030687510967255,
0.04339486360549927,
0.05017026513814926,
-0.03945055976510048,
-0.0555587075650692,
0.06444317102432251,
0.06723803281784058,
-0.008924463763833046,
0.03512438014149666,
-0.016899513080716133,
0.08181541413068771,
0.0795372724533081,
0.024687277153134346,
0.013376872055232525,
0.002898051403462887,
-0.021461833268404007,
-0.034801457077264786,
0.032606951892375946,
0.02563576214015484,
0.02464163675904274,
0.023406362161040306,
-0.037066731601953506,
-0.015635542571544647,
0.07886220514774323,
0.05335969850420952,
0.024876320734620094,
0.07064107060432434,
0.032692085951566696,
0.05203384533524513,
0.028190748766064644,
0.04825809597969055,
0.04836861044168472,
0.14354315400123596,
-0.019573919475078583,
-5.2403873240791654e-8,
0.055981848388910294,
0.03551483899354935,
-0.014204286970198154,
0.044380635023117065,
-0.016611706465482712,
-0.028915192931890488,
0.05626337602734566,
-0.06946751475334167,
-0.043600600212812424,
0.019330088049173355,
-0.06740216165781021,
-0.008269628509879112,
-0.06257745623588562,
0.04524478688836098,
-0.012025291100144386,
0.040602896362543106,
0.02100912667810917,
0.05551275610923767,
0.040172427892684937,
-0.0187392421066761,
-0.028403911739587784,
-0.04272909462451935,
0.03456723317503929,
0.09428869932889938,
0.026585282757878304,
0.07279300689697266,
0.009262681938707829,
0.02302170731127262,
0.014833105728030205,
0.015777286142110825,
-0.04981580376625061,
0.04264572262763977,
-0.07486982643604279,
0.11439824104309082,
-0.018956981599330902,
0.021900203078985214,
-0.13923324644565582,
0.07517309486865997,
0.04666835814714432,
0.03150399401783943,
0.015690287575125694,
0.03197828307747841,
-0.056634850800037384,
-0.03639983758330345,
0.038444578647613525,
0.07537176460027695,
-0.03939644619822502,
-0.003899757284671068,
0.019066356122493744,
-0.04304232448339462,
0.040675029158592224,
-0.02193356677889824,
0.0016663335263729095,
0.08140366524457932,
0.0314229354262352,
0.11721091717481613,
-0.019348356872797012,
-0.03423982858657837,
0.049305737018585205,
0.026289507746696472,
-0.04769705608487129,
0.06538186967372894,
-0.022242937237024307,
-0.009122381918132305
] | 0.129216
|
``` Detailed service check: ```shell sudo journalctl -f -u crio.service ``` ### Install network plugins The `cri-o` installer installs and configures the `cni-plugins` package. You can verify the installation running the following command: ```shell /opt/cni/bin/bridge --version ``` The output is similar to: ``` CNI bridge plugin v1.5.1 CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0 ``` To check the default configuration: ```shell cat /etc/cni/net.d/11-crio-ipv4-bridge.conflist ``` The output is similar to: ```json { "cniVersion": "1.0.0", "name": "crio", "plugins": [ { "type": "bridge", "bridge": "cni0", "isGateway": true, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "host-local", "routes": [ { "dst": "0.0.0.0/0" } ], "ranges": [ [{ "subnet": "10.85.0.0/16" }] ] } } ] } ``` {{< note >}} Make sure that the default `subnet` range (`10.85.0.0/16`) does not overlap with any of your active networks. If there is an overlap, you can edit the file and change it accordingly. Restart the service after the change. {{< /note >}} ### Download and set up the kubelet Download the [latest stable release](/releases/download/) of the kubelet. {{< tabs name="download\_kubelet" >}} {{< tab name="x86-64" codelang="bash" >}} curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubelet" {{< /tab >}} {{< tab name="ARM64" codelang="bash" >}} curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubelet" {{< /tab >}} {{< /tabs >}} Configure: ```shell sudo mkdir -p /etc/kubernetes/manifests ``` ```shell sudo tee /etc/kubernetes/kubelet.yaml <}} Because you are not setting up a production cluster, you are using plain HTTP (`readOnlyPort: 10255`) for unauthenticated queries to the kubelet's API. The \_authentication webhook\_ is disabled and \_authorization mode\_ is set to `AlwaysAllow` for the purpose of this tutorial. You can learn more about [authorization modes](/docs/reference/access-authn-authz/authorization/#authorization-modules) and [webhook authentication](/docs/reference/access-authn-authz/webhook/) to properly configure kubelet in standalone mode in your environment. See [Ports and Protocols](/docs/reference/networking/ports-and-protocols/) to understand which ports Kubernetes components use. {{< /note >}} Install: ```shell chmod +x kubelet sudo cp kubelet /usr/bin/ ``` Create a `systemd` service unit file: ```shell sudo tee /etc/systemd/system/kubelet.service < static-web.yaml apiVersion: v1 kind: Pod metadata: name: static-web spec: containers: - name: web image: nginx ports: - name: web containerPort: 80 protocol: TCP EOF ``` Copy the `static-web.yaml` manifest file to the `/etc/kubernetes/manifests` directory. ```shell sudo cp static-web.yaml /etc/kubernetes/manifests/ ``` ### Find out information about the kubelet and the Pod {#find-out-information} The Pod networking plugin creates a network bridge (`cni0`) and a pair of `veth` interfaces for each Pod (one of the pair is inside the newly made Pod, and the other is at the host level). Query the kubelet's API endpoint at `http://localhost:10255/pods`: ```shell curl http://localhost:10255/pods | jq '.' ``` To obtain the IP address of the `static-web` Pod: ```shell curl http://localhost:10255/pods | jq '.items[].status.podIP' ``` The output is similar to: ``` "10.85.0.4" ``` Connect to the `nginx` server Pod on `http://:` (port 80 is the default), in this case: ```shell curl http://10.85.0.4 ``` The output is similar to: ```html Welcome to nginx! ... ``` ## Where to look for more details If you need to diagnose a problem getting this tutorial to work, you can look within the following directories for monitoring and troubleshooting: ``` /var/lib/cni /var/lib/containers /var/lib/kubelet /var/log/containers /var/log/pods ``` ## Clean up ### kubelet ```shell sudo systemctl disable --now kubelet.service sudo systemctl daemon-reload sudo rm /etc/systemd/system/kubelet.service sudo rm /usr/bin/kubelet sudo rm -rf /etc/kubernetes sudo rm -rf /var/lib/kubelet sudo rm -rf /var/log/containers sudo rm -rf /var/log/pods ``` ### Container Runtime ```shell sudo systemctl disable --now crio.service sudo systemctl daemon-reload sudo rm -rf /usr/local/bin sudo rm -rf /usr/local/lib sudo rm -rf /usr/local/share sudo rm -rf /usr/libexec/crio sudo rm -rf /etc/crio sudo rm -rf /etc/containers ``` ### Network Plugins ```shell sudo rm -rf /opt/cni sudo rm -rf /etc/cni sudo rm -rf /var/lib/cni ``` ##
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/kubelet-standalone.md
|
[
-0.07392598688602448,
0.03513764217495918,
0.00297661148943007,
-0.07285095006227493,
-0.01015922799706459,
0.0032875039614737034,
-0.06206560879945755,
0.023961810395121574,
-0.04271439462900162,
-0.0023487969301640987,
-0.022822003811597824,
-0.11166379600763321,
-0.0101651381701231,
0.05063740536570549,
-0.055883921682834625,
0.03801882639527321,
-0.0028244713321328163,
-0.08584390580654144,
0.04234529286623001,
0.003493296215310693,
-0.0323372446000576,
0.02597688138484955,
-0.01324601098895073,
-0.05570235103368759,
-0.06487895548343658,
-0.0606808140873909,
0.060759030282497406,
0.10572822391986847,
-0.037154145538806915,
0.033325955271720886,
-0.059667207300662994,
0.06163204461336136,
-0.03225337341427803,
-0.02544189989566803,
0.04968196526169777,
0.06749901175498962,
0.05857750400900841,
-0.05369720235466957,
0.0703345462679863,
-0.028763379901647568,
0.03194968029856682,
0.04260438680648804,
0.05279487371444702,
-0.05264003947377205,
0.11220715194940567,
0.0004681551654357463,
0.003949400503188372,
-0.026560677215456963,
0.06455303728580475,
-0.07583434134721756,
0.008014767430722713,
0.003238305449485779,
0.04186960309743881,
0.06365365535020828,
0.04756702110171318,
0.08871345221996307,
-0.09354715049266815,
0.04633156582713127,
0.04098018631339073,
-0.015559139661490917,
-0.04847943037748337,
-0.021672867238521576,
0.028226852416992188,
0.013852620497345924,
-0.04778921976685524,
-0.020416975021362305,
-0.0712088942527771,
-0.051079846918582916,
-0.06073375418782234,
0.005502876825630665,
-0.0414285883307457,
0.05161048099398613,
-0.019886614754796028,
-0.02472170814871788,
0.02860410325229168,
0.06208116188645363,
0.06485296785831451,
-0.027971599251031876,
-0.03189618140459061,
-0.019455084577202797,
-0.0687701553106308,
-0.02261202782392502,
-0.01588856242597103,
0.05318893492221832,
0.0497778058052063,
0.052182771265506744,
-0.04330774024128914,
-0.06621839851140976,
0.018796702846884727,
-0.008250551298260689,
0.02485973946750164,
0.02782023511826992,
-0.07210426777601242,
-0.03637971356511116,
-0.00959325022995472,
0.02255689539015293,
0.02024766616523266,
0.008773229084908962,
-0.031782764941453934,
0.047257035970687866,
0.034565385431051254,
0.014752182178199291,
0.02430444210767746,
0.003966278396546841,
0.04880527779459953,
0.02791653200984001,
0.02894381806254387,
0.06651436537504196,
0.017954539507627487,
0.036659516394138336,
-0.052412182092666626,
0.01829608529806137,
0.0030763440299779177,
-0.05485302582383156,
-0.04093988239765167,
0.12114718556404114,
-0.023100458085536957,
0.008486936800181866,
0.04564952850341797,
0.005371042527258396,
-0.0022710440680384636,
-0.03542706370353699,
-0.1018664762377739,
-0.05212336406111717,
-0.0107939587906003,
0.014472142793238163,
0.03521321341395378,
1.9031031297912132e-33,
0.010736632160842419,
0.015909183770418167,
-0.0036395860370248556,
0.038853053003549576,
0.03254682943224907,
0.03887945041060448,
-0.05065787583589554,
0.02429158426821232,
-0.06335368007421494,
-0.05917574092745781,
-0.0993805006146431,
0.05112873762845993,
-0.03262421861290932,
-0.05354706570506096,
-0.0337044820189476,
-0.0011926983715966344,
-0.08625555783510208,
-0.09827006608247757,
0.051055144518613815,
-0.009745201095938683,
0.052067238837480545,
-0.06299230456352234,
0.039050158113241196,
0.011645655147731304,
-0.02086995355784893,
-0.08867307007312775,
0.027614550665020943,
-0.031322695314884186,
0.02920783869922161,
-0.0002453697379678488,
-0.005951311439275742,
0.02512417919933796,
0.00754696736112237,
-0.08310006558895111,
-0.058248016983270645,
0.014937727712094784,
-0.0589706189930439,
0.029701614752411842,
-0.1311189979314804,
0.03981577232480049,
0.02584068477153778,
0.02320651337504387,
-0.135104700922966,
-0.08066930621862411,
0.06565778702497482,
-0.0836716964840889,
-0.013897687196731567,
-0.07074796408414841,
0.07548943161964417,
0.039540261030197144,
-0.07695747911930084,
-0.014251918531954288,
0.0019199138041585684,
-0.004681015852838755,
0.05193251371383667,
-0.038787174969911575,
0.053923238068819046,
0.008473110385239124,
-0.020589012652635574,
-0.010985701344907284,
-0.00975117739289999,
-0.01548610907047987,
-0.01755051501095295,
0.04236889258027077,
0.07591304928064346,
0.10434041917324066,
-0.002335924655199051,
-0.020116550847887993,
0.030987650156021118,
-0.04685664921998978,
-0.016708770766854286,
-0.008603059686720371,
-0.021758180111646652,
0.025360189378261566,
0.02358062192797661,
-0.02570509910583496,
-0.04586959257721901,
-0.07975352555513382,
0.04211227968335152,
0.046034399420022964,
-0.02608412504196167,
0.011623203754425049,
0.05102291330695152,
0.08578943461179733,
0.10313413292169571,
-0.053527265787124634,
0.041853178292512894,
0.010449902154505253,
0.07867167890071869,
0.024105746299028397,
0.10282077640295029,
-0.007366645615547895,
0.016060391440987587,
0.014981672167778015,
-0.07006006687879562,
-2.6074415287176733e-33,
-0.05102323368191719,
0.052995748817920685,
0.0008390136063098907,
-0.022677188739180565,
-0.0744272917509079,
-0.028637034818530083,
-0.05333476513624191,
-0.021950384601950645,
0.0812474936246872,
-0.014114616438746452,
0.09482920169830322,
-0.002965625375509262,
-0.015316558070480824,
-0.03574176877737045,
0.009373320266604424,
0.049503426998853683,
-0.1271490603685379,
-0.059524569660425186,
-0.0016521726502105594,
0.12988229095935822,
0.07819296419620514,
0.08711633086204529,
0.016434328630566597,
-0.0253660436719656,
-0.04255487024784088,
0.03920326754450798,
0.06553518772125244,
0.027823515236377716,
0.011576758697628975,
-0.04861301928758621,
-0.05796324089169502,
-0.034296851605176926,
-0.06807666271924973,
0.05998513847589493,
0.006635847967118025,
0.003636973910033703,
0.07316289842128754,
0.10863008350133896,
0.06580792367458344,
-0.002578537445515394,
0.07621896266937256,
0.035600557923316956,
-0.09914181381464005,
0.000312462798319757,
-0.05598672851920128,
-0.02050120010972023,
-0.05005113407969475,
-0.015961337834596634,
-0.10839502513408661,
-0.008304170332849026,
-0.07769402861595154,
-0.031682852655649185,
-0.004904331639409065,
0.0329618826508522,
0.05293252319097519,
0.018434587866067886,
0.016403930261731148,
0.06262985616922379,
-0.06565983593463898,
0.061780475080013275,
0.03769569844007492,
-0.050565674901008606,
-0.0757744163274765,
0.020114140585064888,
0.026098350062966347,
0.016964290291070938,
-0.11135762929916382,
0.015239343978464603,
0.03487497568130493,
0.032881539314985275,
-0.04001115262508392,
0.025534676387906075,
0.07527172565460205,
0.014718519523739815,
0.015069200657308102,
-0.025707606226205826,
-0.039944227784872055,
0.028832659125328064,
-0.03351607918739319,
0.03330380097031593,
-0.05511688441038132,
0.002061085542663932,
0.011456089094281197,
-0.01151969376951456,
-0.0936100035905838,
-0.04926668852567673,
-0.016322068870067596,
-0.0019354817923158407,
0.05519389733672142,
0.04845241457223892,
0.04461897909641266,
-0.023648899048566818,
-0.019707879051566124,
0.09068140387535095,
-0.08763203024864197,
-4.9061618767609616e-8,
0.01824428141117096,
-0.058782804757356644,
-0.05173800513148308,
-0.027014298364520073,
0.04205852374434471,
0.038772888481616974,
0.09255172312259674,
-0.05217519402503967,
0.0010905216913670301,
0.026476047933101654,
0.024233749136328697,
0.07022328674793243,
0.007082805037498474,
0.012168063782155514,
-0.02721429243683815,
0.09933855384588242,
-0.09026490896940231,
-0.03176095336675644,
0.026265475898981094,
0.02059008926153183,
0.0007155734347179532,
-0.07587314397096634,
-0.00278132944367826,
0.07849176228046417,
0.05596771091222763,
-0.053186722099781036,
-0.03636803478002548,
-0.025955863296985626,
-0.14058034121990204,
0.023055318742990494,
-0.05727788433432579,
0.037418216466903687,
0.09263438731431961,
-0.008862928487360477,
-0.004521532449871302,
0.06252474337816238,
0.03163010999560356,
0.022075530141592026,
-0.04564981162548065,
-0.01604856736958027,
0.03329038247466087,
0.006768516730517149,
-0.03953276202082634,
-0.06418727338314056,
0.09039555490016937,
-0.021777255460619926,
-0.03831442445516586,
0.0861353650689125,
0.12246555089950562,
-0.03600488603115082,
0.03161287680268288,
0.0076637594029307365,
0.08467549830675125,
-0.03503664210438728,
0.007758075837045908,
0.11720315366983414,
-0.0032648902852088213,
-0.05160282179713249,
-0.010142713785171509,
-0.06080860644578934,
-0.01735910214483738,
0.0492202565073967,
0.03716715797781944,
-0.05391698330640793
] | 0.147597
|
systemctl disable --now crio.service sudo systemctl daemon-reload sudo rm -rf /usr/local/bin sudo rm -rf /usr/local/lib sudo rm -rf /usr/local/share sudo rm -rf /usr/libexec/crio sudo rm -rf /etc/crio sudo rm -rf /etc/containers ``` ### Network Plugins ```shell sudo rm -rf /opt/cni sudo rm -rf /etc/cni sudo rm -rf /var/lib/cni ``` ## Conclusion This page covered the basic aspects of deploying a kubelet in standalone mode. You are now ready to deploy Pods and test additional functionality. Notice that in standalone mode the kubelet does \*not\* support fetching Pod configurations from the control plane (because there is no control plane connection). You also cannot use a {{< glossary\_tooltip text="ConfigMap" term\_id="configmap" >}} or a {{< glossary\_tooltip text="Secret" term\_id="secret" >}} to configure the containers in a static Pod. ## {{% heading "whatsnext" %}} \* Follow [Hello, minikube](/docs/tutorials/hello-minikube/) to learn about running Kubernetes \_with\_ a control plane. The minikube tool helps you set up a practice cluster on your own computer. \* Learn more about [Network Plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) \* Learn more about [Container Runtimes](/docs/setup/production-environment/container-runtimes/) \* Learn more about [kubelet](/docs/reference/command-line-tools-reference/kubelet/) \* Learn more about [static Pods](/docs/tasks/configure-pod-container/static-pod/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/kubelet-standalone.md
|
[
-0.020993273705244064,
0.01929657906293869,
0.020477071404457092,
-0.05167116969823837,
-0.03808291628956795,
-0.012536359019577503,
-0.0030580030288547277,
0.020067811012268066,
0.005902087781578302,
-0.03162110224366188,
0.019387898966670036,
-0.09193020313978195,
0.04255206510424614,
-0.007030594162642956,
0.005575874820351601,
-0.020939061418175697,
0.06229671090841293,
-0.08694562315940857,
0.015414795838296413,
0.002878646831959486,
-0.059534404426813126,
0.0013631286565214396,
-0.03353303298354149,
0.06629151105880737,
-0.01986376941204071,
-0.03730285167694092,
-0.008950240910053253,
0.019982315599918365,
-0.01980706676840782,
-0.035041555762290955,
-0.02532331831753254,
0.059045929461717606,
-0.03192199766635895,
-0.02069169282913208,
0.11857402324676514,
0.06913907825946808,
0.07728829234838486,
-0.055107440799474716,
-0.03930169343948364,
0.01477460004389286,
-0.02550307847559452,
-0.01293378509581089,
-0.08675426244735718,
0.004700764082372189,
0.0321970097720623,
0.005806514527648687,
-0.0005492478376254439,
-0.09645821154117584,
0.05808010697364807,
-0.09758348017930984,
0.02682686038315296,
-0.07216034084558487,
0.045352060347795486,
0.0549466498196125,
0.12745730578899384,
0.0625426173210144,
-0.048379868268966675,
0.05698287859559059,
0.11828005313873291,
-0.016747906804084778,
-0.008118708617985249,
0.0508028008043766,
0.05145881325006485,
-0.010057701729238033,
-0.032448358833789825,
-0.010636145249009132,
-0.044396739453077316,
-0.054783254861831665,
0.031917210668325424,
0.04596826434135437,
0.0416286364197731,
0.010912143625319004,
0.022153601050376892,
-0.030913928523659706,
0.044512469321489334,
-0.019662419334053993,
-0.0007408612291328609,
-0.04064807668328285,
-0.02986356057226658,
-0.020742757245898247,
-0.02365112118422985,
0.04175350442528725,
0.0657411739230156,
0.0003607836551964283,
-0.07091687619686127,
-0.023802300915122032,
-0.00993401650339365,
-0.06829332560300827,
0.05680084601044655,
-0.026174431666731834,
0.01644713059067726,
-0.022006386891007423,
0.046633530408144,
-0.10825679451227188,
0.07663899660110474,
-0.06086163967847824,
0.03136950358748436,
0.01271982491016388,
-0.020693566650152206,
0.002341254847124219,
0.08325278759002686,
0.015382569283246994,
0.01899426430463791,
0.04420938342809677,
0.01570926234126091,
-0.04586776718497276,
0.009257846511900425,
-0.014705969020724297,
-0.008571327663958073,
-0.032267969101667404,
-0.034495048224925995,
0.06769949197769165,
-0.03624923527240753,
0.03543738275766373,
-0.02246653474867344,
0.05137791857123375,
-0.011914505623281002,
0.012076451443135738,
0.05573146417737007,
0.006954412907361984,
0.019585981965065002,
-0.07874800264835358,
-0.016905875876545906,
-0.0010380506282672286,
0.032571252435445786,
0.03982306271791458,
0.023864902555942535,
2.907752050019951e-33,
0.055048417299985886,
-0.05695965513586998,
0.020438505336642265,
0.02638087049126625,
0.022714026272296906,
-0.09691105037927628,
-0.09740914404392242,
-0.026667671278119087,
-0.03503509610891342,
-0.047673702239990234,
-0.07109969109296799,
0.042266737669706345,
-0.059541281312704086,
0.008777000941336155,
0.07278786599636078,
-0.04246560111641884,
-0.02531670220196247,
-0.017300089821219444,
0.07617808133363724,
-0.029581768438220024,
0.08242419362068176,
-0.024798627942800522,
-0.0684276670217514,
-0.0018953934777528048,
0.028117578476667404,
-0.03604878485202789,
-0.018990356475114822,
-0.014945851638913155,
-0.013165013864636421,
0.035026915371418,
-0.008495078422129154,
0.03842586278915405,
-0.020373355597257614,
0.04886863753199577,
-0.13248811662197113,
-0.008929183706641197,
-0.05022738128900528,
0.043580733239650726,
-0.13860245048999786,
0.036232881247997284,
0.025248952209949493,
0.029416600242257118,
-0.09165925532579422,
-0.06668419390916824,
0.07003279775381088,
-0.0438666045665741,
0.046538759022951126,
-0.09523012489080429,
0.07255139946937561,
-0.018823321908712387,
-0.04476143792271614,
0.026834439486265182,
0.03373152017593384,
-0.00731839332729578,
0.03965182974934578,
0.015109541825950146,
0.10051711648702621,
-0.08017337322235107,
-0.028556503355503082,
0.023321684449911118,
-0.02583857625722885,
0.029050573706626892,
0.0206484105437994,
0.07179756462574005,
0.10431742668151855,
0.04150477051734924,
-0.013263915665447712,
0.01309263613075018,
-0.031112805008888245,
-0.004565148148685694,
-0.09533388912677765,
0.022274509072303772,
0.021274587139487267,
-0.04668649658560753,
0.019258324056863785,
-0.07133670896291733,
0.0024648981634527445,
-0.06068361550569534,
-0.14277751743793488,
0.03475349768996239,
0.033399585634469986,
-0.06194296479225159,
0.02418956533074379,
0.03244432806968689,
0.09981004148721695,
-0.07454138994216919,
0.017456594854593277,
0.01377556286752224,
-0.035214658826589584,
0.07133959233760834,
0.03865553066134453,
-0.003704669186845422,
-0.08551418781280518,
-0.019980836659669876,
-0.14065900444984436,
-4.0530552978093066e-33,
0.07352865487337112,
-0.016514815390110016,
0.060048658400774,
-0.02127900719642639,
-0.0669371709227562,
0.04852631688117981,
-0.032884713262319565,
0.04827209562063217,
0.042550452053546906,
-0.0554036907851696,
0.005282196681946516,
-0.016237353906035423,
0.00739665050059557,
0.028057046234607697,
-0.08938717097043991,
0.06256277114152908,
-0.19137713313102722,
-0.025904402136802673,
-0.04039889574050903,
0.10958731174468994,
0.017405781894922256,
0.040752097964286804,
0.047085393220186234,
-0.012035739608108997,
-0.08214044570922852,
0.03860737755894661,
-0.007845737040042877,
0.06379617005586624,
-0.04602421075105667,
-0.02657468244433403,
0.019825002178549767,
-0.046653177589178085,
0.0015116473659873009,
0.0036796743515878916,
-0.013192694634199142,
-0.021304799243807793,
-0.052726686000823975,
0.07193612307310104,
-0.04466966912150383,
-0.006513757631182671,
0.013091894797980785,
0.08545249700546265,
-0.06190812587738037,
-0.006939469370990992,
-0.04833400249481201,
0.033154599368572235,
0.011882691644132137,
-0.03887428715825081,
-0.025978708639740944,
-0.028763096779584885,
-0.07559888809919357,
-0.03800986707210541,
0.007141334470361471,
0.021567922085523605,
0.009190392680466175,
0.03626297041773796,
0.028847001492977142,
0.07516220957040787,
-0.06055598333477974,
-0.013980873860418797,
0.08908828347921371,
-0.06058673933148384,
-0.03936195373535156,
-0.012369902804493904,
0.055119588971138,
-0.008633144199848175,
-0.02503780648112297,
0.13125984370708466,
0.06847652047872543,
0.010761070065200329,
-0.008085427805781364,
0.043069563806056976,
0.05326832830905914,
0.01360120065510273,
0.007098474074155092,
0.031140228733420372,
-0.05479689687490463,
-0.07905673235654831,
0.01661759428679943,
0.016100529581308365,
-0.004478471353650093,
0.010447117500007153,
-0.03515878692269325,
-0.0636722519993782,
-0.02230696938931942,
-0.01612955331802368,
0.008928379975259304,
0.0531630665063858,
0.06957756727933884,
0.039065171033144,
0.07499804347753525,
-0.023897357285022736,
0.039674062281847,
0.143870547413826,
-0.023428812623023987,
-5.445813044957504e-8,
0.05576382577419281,
0.00018629997794050723,
-0.06803549081087112,
0.07900997251272202,
0.05378405749797821,
-0.06226253882050514,
0.06279148161411285,
-0.012551186606287956,
-0.029729897156357765,
-0.0013091672444716096,
-0.10434700548648834,
0.020876463502645493,
-0.054266881197690964,
0.04955663904547691,
0.0025549978017807007,
0.05194590240716934,
-0.05922010913491249,
0.05017700418829918,
0.032838571816682816,
-0.037869349122047424,
-0.0244463998824358,
-0.05048348382115364,
0.0025880385655909777,
0.08918473869562149,
0.045642659068107605,
0.06627684831619263,
0.04658384993672371,
-0.001874987268820405,
0.009065833874046803,
0.08223177492618561,
-0.09015630185604095,
-0.018432805314660072,
-0.05659164488315582,
0.10484816133975983,
-0.04675745591521263,
0.021932469680905342,
-0.09985199570655823,
0.0765354260802269,
0.0043173604644834995,
-0.03579876944422722,
0.012565894052386284,
-0.011727639473974705,
-0.05022144317626953,
-0.021053016185760498,
-0.03378349170088768,
0.014548910781741142,
-0.03827469423413277,
0.08298850804567337,
0.04964469373226166,
-0.007776149548590183,
0.022279249504208565,
-0.020176690071821213,
0.054019879549741745,
0.0407664030790329,
0.038184698671102524,
0.12944257259368896,
-0.007987560704350471,
-0.03011203557252884,
-0.008304550312459469,
-0.0041833664290606976,
-0.06629494577646255,
-0.02077259123325348,
-0.010148605331778526,
-0.04597469046711922
] | 0.1632
|
{{< feature-state feature\_gate\_name="DynamicResourceAllocation" >}} This tutorial shows you how to install {{< glossary\_tooltip term\_id="dra" text="Dynamic Resource Allocation (DRA)" >}} drivers in your cluster and how to use them in conjunction with the DRA APIs to allocate {{< glossary\_tooltip text="devices" term\_id="device" >}} to Pods. This page is intended for cluster administrators. {{< glossary\_tooltip text="Dynamic Resource Allocation (DRA)" term\_id="dra" >}} lets a cluster manage availability and allocation of hardware resources to satisfy Pod-based claims for hardware requirements and preferences. To support this, a mixture of Kubernetes built-in components (like the Kubernetes scheduler, kubelet, and kube-controller-manager) and third-party drivers from device owners (called DRA drivers) share the responsibility to advertise, allocate, prepare, mount, healthcheck, unprepare, and cleanup resources throughout the Pod lifecycle. These components share information via a series of DRA specific APIs in the `resource.k8s.io` API group including {{< glossary\_tooltip text="DeviceClasses" term\_id="deviceclass" >}}, {{< glossary\_tooltip text="ResourceSlices" term\_id="resourceslice" >}}, {{< glossary\_tooltip text="ResourceClaims" term\_id="resourceclaim" >}}, as well as new fields in the Pod spec itself. ### {{% heading "objectives" %}} \* Deploy an example DRA driver \* Deploy a Pod requesting a hardware claim using DRA APIs \* Delete a Pod that has a claim ## {{% heading "prerequisites" %}} Your cluster should support [RBAC](/docs/reference/access-authn-authz/rbac/). You can try this tutorial with a cluster using a different authorization mechanism, but in that case you will have to adapt the steps around defining roles and permissions. {{< include "task-tutorial-prereqs.md" >}} This tutorial has been tested with Linux nodes, though it may also work with other types of nodes. {{< version-check >}} If your cluster is not currently running Kubernetes {{< skew currentVersion >}} then please check the documentation for the version of Kubernetes that you plan to use. ## Explore the initial cluster state {#explore-initial-state} You can spend some time to observe the initial state of a cluster with DRA enabled, especially if you have not used these APIs extensively before. If you set up a new cluster for this tutorial, with no driver installed and no Pod claims yet to satisfy, the output of these commands won't show any resources. 1. Get a list of {{< glossary\_tooltip text="DeviceClasses" term\_id="deviceclass" >}}: ```shell kubectl get deviceclasses ``` The output is similar to this: ``` No resources found ``` 1. Get a list of {{< glossary\_tooltip text="ResourceSlices" term\_id="resourceslice" >}}: ```shell kubectl get resourceslices ``` The output is similar to this: ``` No resources found ``` 1. Get a list of {{< glossary\_tooltip text="ResourceClaims" term\_id="resourceclaim" >}} and {{< glossary\_tooltip text="ResourceClaimTemplates" term\_id="resourceclaimtemplate" >}} ```shell kubectl get resourceclaims -A kubectl get resourceclaimtemplates -A ``` The output is similar to this: ``` No resources found No resources found ``` At this point, you have confirmed that DRA is enabled and configured properly in the cluster, and that no DRA drivers have advertised any resources to the DRA APIs yet. ## Install an example DRA driver {#install-example-driver} DRA drivers are third-party applications that run on each node of your cluster to interface with the hardware of that node and Kubernetes' built-in DRA components. The installation procedure depends on the driver you choose, but is likely deployed as a {{< glossary\_tooltip term\_id="daemonset" >}} to all or a selection of the nodes (using {{< glossary\_tooltip text="selectors" term\_id="selector" >}} or similar mechanisms) in your cluster. Check your driver's documentation for specific installation instructions, which might include a Helm chart, a set of manifests, or other deployment tooling. This tutorial uses an example driver which can be found in the [kubernetes-sigs/dra-example-driver](https://github.com/kubernetes-sigs/dra-example-driver) repository to demonstrate driver installation. This example driver advertises simulated GPUs to Kubernetes for your Pods to interact with. ### Prepare your cluster for driver installation
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/install-use-dra.md
|
[
-0.028775984421372414,
0.002613908378407359,
0.07062999904155731,
0.03176746889948845,
-0.049676407128572464,
-0.013247520662844181,
0.05762318894267082,
0.0008130656206049025,
0.027596591040492058,
0.029351238161325455,
-0.019161613658070564,
-0.09345497190952301,
-0.026824725791811943,
-0.03394236043095589,
0.02675732597708702,
0.028811143711209297,
0.0520600751042366,
-0.029839789494872093,
-0.05610759183764458,
-0.011611525900661945,
0.08644113689661026,
0.04258379712700844,
0.021692300215363503,
0.051885321736335754,
-0.047302424907684326,
0.04962578043341637,
0.0041143642738461494,
-0.02079443261027336,
0.06315261125564575,
0.018833624199032784,
-0.0531349703669548,
0.015684084966778755,
0.0018938180292025208,
0.02989017963409424,
0.09048119187355042,
0.04944228753447533,
-0.029581580311059952,
-0.03732430934906006,
-0.09370847791433334,
-0.016430489718914032,
0.033998794853687286,
-0.04987086355686188,
-0.0915834978222847,
-0.004544482100754976,
0.005683661438524723,
0.0038026950787752867,
-0.05376548320055008,
0.012919129803776741,
0.03177809715270996,
-0.020763354375958443,
0.016461918130517006,
-0.08924061805009842,
0.05163075774908066,
0.031236084178090096,
0.06819716095924377,
0.03831442445516586,
0.013794596306979656,
0.022894693538546562,
0.10651233047246933,
0.00583941675722599,
0.06544172018766403,
-0.02384946681559086,
0.018628789111971855,
0.014507433399558067,
0.008417710661888123,
-0.015135657042264938,
0.03215055912733078,
0.01904170960187912,
-0.03735901787877083,
-0.058349303901195526,
0.01890258677303791,
-0.017802277579903603,
0.04852258414030075,
-0.028594616800546646,
0.05598549544811249,
0.03181774541735649,
-0.05241894721984863,
0.07099482417106628,
0.04623157158493996,
-0.0734526589512825,
0.02548767812550068,
0.09151503443717957,
0.10765904933214188,
0.049528978765010834,
-0.038411956280469894,
-0.014719715341925621,
-0.00688741821795702,
-0.07100032269954681,
0.06826897710561752,
-0.017430927604436874,
-0.007387835998088121,
-0.07068042457103729,
0.03735339641571045,
-0.11782142519950867,
0.04303476959466934,
-0.00928423460572958,
-0.006371186580508947,
-0.0843726247549057,
0.005908750928938389,
-0.0028679969254881144,
0.011647835373878479,
-0.02597709372639656,
-0.010176205076277256,
-0.012828046455979347,
-0.008365349844098091,
-0.01391495019197464,
-0.1265091896057129,
-0.03137454017996788,
0.02440190128982067,
0.027016978710889816,
0.03839796409010887,
0.08672453463077545,
-0.04980580136179924,
0.02838711068034172,
-0.031498026102781296,
-0.05058739706873894,
-0.034154005348682404,
-0.019635193049907684,
0.08719153702259064,
0.017614729702472687,
-0.036505114287137985,
-0.13294939696788788,
-0.029655860736966133,
-0.03332731872797012,
0.006363908294588327,
0.030411195009946823,
-0.09923575073480606,
2.558178764526619e-33,
0.04328468069434166,
-0.09540922194719315,
-0.05651046708226204,
-0.024081116542220116,
-0.024884693324565887,
-0.0857190489768982,
-0.03830656781792641,
-0.00448240153491497,
-0.06423624604940414,
-0.05273336544632912,
-0.031022299081087112,
0.11547931283712387,
-0.017748888581991196,
-0.005978564266115427,
0.041735779494047165,
-0.04333390295505524,
-0.023221908137202263,
0.10677822679281235,
0.0995812639594078,
-0.03538110852241516,
0.05060390383005142,
-0.02834884449839592,
0.019939402118325233,
-0.055629193782806396,
0.05124795809388161,
0.019262228161096573,
0.013899199664592743,
-0.07611098140478134,
0.011271517723798752,
0.02696862444281578,
-0.05561894178390503,
-0.02064424753189087,
0.06908690929412842,
0.0029967287555336952,
-0.14174042642116547,
-0.01678536832332611,
-0.09254590421915054,
-0.054560668766498566,
-0.03390372171998024,
-0.017058923840522766,
0.010697835125029087,
-0.05923286825418472,
-0.007880390621721745,
-0.11578235775232315,
0.035333648324012756,
0.03059753030538559,
0.04280916228890419,
-0.10667842626571655,
0.06630835682153702,
0.008613022044301033,
-0.03464763984084129,
-0.06038428470492363,
0.04084328934550285,
-0.031060954555869102,
0.027738193050026894,
-0.013252154923975468,
0.03654848784208298,
-0.05230407789349556,
0.014132942073047161,
0.0051726410165429115,
-0.11835119128227234,
0.039485909044742584,
-0.019169028848409653,
-0.013469889760017395,
0.012559092603623867,
0.015740394592285156,
0.01696780137717724,
0.08745377510786057,
-0.01839674636721611,
-0.010244006291031837,
-0.020608898252248764,
0.013551699928939342,
-0.009530477225780487,
0.07098501920700073,
-0.01977194845676422,
-0.07048557698726654,
0.013668918050825596,
0.024700313806533813,
-0.15946398675441742,
0.027170732617378235,
0.015799297019839287,
-0.03687684237957001,
-0.04476108402013779,
0.07497937232255936,
0.045423462986946106,
-0.040496576577425,
0.011777445673942566,
-0.05214368551969528,
-0.07306861877441406,
0.03221497684717178,
-0.03302516043186188,
-0.053796738386154175,
-0.09192570298910141,
0.0157923623919487,
-0.10589569807052612,
-4.918976966528806e-33,
0.09511741995811462,
-0.03862476348876953,
0.04194701090455055,
0.023154720664024353,
0.012114937417209148,
0.003821850987151265,
-0.018241088837385178,
0.03070278838276863,
0.009185200557112694,
-0.03991301730275154,
-0.058926958590745926,
0.0224969070404768,
0.02000555209815502,
0.050019294023513794,
-0.05801843851804733,
0.08072423934936523,
-0.09293033182621002,
-0.03217778727412224,
-0.010873772203922272,
0.017966831102967262,
0.003272231901064515,
0.005400748923420906,
0.039232563227415085,
0.028594370931386948,
-0.03513143211603165,
-0.060838788747787476,
0.0575592964887619,
0.04355236515402794,
-0.002835324266925454,
-0.051953237503767014,
-0.005952045321464539,
-0.05091365426778793,
-0.07573328167200089,
-0.028997767716646194,
0.03354308009147644,
-0.06285573542118073,
-0.0002710877452045679,
-0.021989284083247185,
0.005166374146938324,
0.03493233397603035,
0.09928630292415619,
-0.03586959466338158,
-0.020431388169527054,
-0.05878036096692085,
0.004695645999163389,
0.009027412161231041,
0.005103139206767082,
-0.023447327315807343,
-0.02235066518187523,
-0.07617664337158203,
0.06317665427923203,
-0.04436355456709862,
-0.0477994903922081,
0.07839279621839523,
-0.12043610215187073,
0.05462530255317688,
0.11248267441987991,
0.006008812692016363,
-0.04059832543134689,
0.00902672577649355,
0.04995942860841751,
-0.12611262500286102,
0.04344464838504791,
0.03861439973115921,
-0.026702769100666046,
-0.060258567333221436,
0.0308520644903183,
-0.0031015577260404825,
-0.03172212466597557,
0.007345900405198336,
-0.01679094322025776,
-0.03452466055750847,
0.019419880583882332,
-0.00008614447870058939,
-0.02369607798755169,
0.04713716357946396,
0.013536127284169197,
-0.06937436759471893,
0.07886923849582672,
-0.02839607745409012,
-0.022382548078894615,
0.05471425503492355,
0.029739128425717354,
0.037597157061100006,
0.045912809669971466,
0.040117088705301285,
0.07030922919511795,
0.11426560580730438,
0.04326828569173813,
0.10766562074422836,
-0.03926144540309906,
0.014036246575415134,
-0.002679286291822791,
0.17551733553409576,
-0.04541292414069176,
-5.178781847803293e-8,
0.04319062456488609,
0.08594261854887009,
0.013276745565235615,
0.03648858517408371,
-0.002803761512041092,
-0.07356328517198563,
0.053341347724199295,
0.021787405014038086,
-0.05277802795171738,
0.00034874919219873846,
0.011450018733739853,
0.04739901050925255,
-0.06820039451122284,
0.05293431133031845,
0.04980797320604324,
0.07497668266296387,
-0.07107953727245331,
0.06442049890756607,
-0.0005465603899210691,
-0.0925522968173027,
0.011022107675671577,
-0.04996704310178757,
0.06920423358678818,
0.038270216435194016,
0.021791769191622734,
0.008424632251262665,
0.050190046429634094,
0.03380817547440529,
-0.002117529045790434,
-0.009012051858007908,
-0.04831838980317116,
0.017787907272577286,
-0.07683338969945908,
0.07172007858753204,
0.008102715946733952,
-0.019205842167139053,
-0.10471425950527191,
0.03261265531182289,
0.0924765095114708,
0.05639081820845604,
-0.012969507835805416,
-0.008841820061206818,
-0.06515461951494217,
0.012885116040706635,
0.01748570427298546,
0.07896718382835388,
-0.05285455659031868,
0.05967004969716072,
-0.013430671766400337,
0.014177431352436543,
-0.032159484922885895,
-0.03415761515498161,
-0.0014580351999029517,
0.09987201541662216,
-0.021811721846461296,
-0.013130764476954937,
-0.01989809423685074,
-0.009050192311406136,
0.045755062252283096,
0.004440448712557554,
-0.0020320401526987553,
0.02170471101999283,
0.00851509254425764,
-0.010032173246145248
] | 0.176014
|
a Helm chart, a set of manifests, or other deployment tooling. This tutorial uses an example driver which can be found in the [kubernetes-sigs/dra-example-driver](https://github.com/kubernetes-sigs/dra-example-driver) repository to demonstrate driver installation. This example driver advertises simulated GPUs to Kubernetes for your Pods to interact with. ### Prepare your cluster for driver installation {#prepare-cluster-driver} To simplify cleanup, create a namespace named dra-tutorial: 1. Create the namespace: ```shell kubectl create namespace dra-tutorial ``` In a production environment, you would likely be using a previously released or qualified image from the driver vendor or your own organization, and your nodes would need to have access to the image registry where the driver image is hosted. In this tutorial, you will use a publicly released image of the dra-example-driver to simulate access to a DRA driver image. 1. Confirm your nodes have access to the image by running the following from within one of your cluster's nodes: ```shell docker pull registry.k8s.io/dra-example-driver/dra-example-driver:v0.2.0 ``` ### Deploy the DRA driver components For this tutorial, you will install the critical example resource driver components individually with `kubectl`. 1. Create the DeviceClass representing the device types this DRA driver supports: {{% code\_sample language="yaml" file="dra/driver-install/deviceclass.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/deviceclass.yaml ``` 1. Create the ServiceAccount, ClusterRole and ClusterRoleBinding that will be used by the driver to gain permissions to interact with the Kubernetes API on this cluster: 1. Create the Service Account: {{% code\_sample language="yaml" file="dra/driver-install/serviceaccount.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/serviceaccount.yaml ``` 1. Create the ClusterRole: {{% code\_sample language="yaml" file="dra/driver-install/clusterrole.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/clusterrole.yaml ``` 1. Create the ClusterRoleBinding: {{% code\_sample language="yaml" file="dra/driver-install/clusterrolebinding.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/clusterrolebinding.yaml ``` 1. Create a {{< glossary\_tooltip term\_id="priority-class" >}} for the DRA driver. The PriorityClass prevents preemption of th DRA driver component, which is responsible for important lifecycle operations for Pods with claims. Learn more about [pod priority and preemption here](/docs/concepts/scheduling-eviction/pod-priority-preemption/). {{% code\_sample language="yaml" file="dra/driver-install/priorityclass.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/priorityclass.yaml ``` 1. Deploy the actual DRA driver as a DaemonSet configured to run the example driver binary with the permissions provisioned above. The DaemonSet has the permissions that you granted to the ServiceAccount in the previous steps. {{% code\_sample language="yaml" file="dra/driver-install/daemonset.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/daemonset.yaml ``` The DaemonSet is configured with the volume mounts necessary to interact with the underlying Container Device Interface (CDI) directory, and to expose its socket to `kubelet` via the `kubelet/plugins` directory. ### Verify the DRA driver installation {#verify-driver-install} 1. Get a list of the Pods of the DRA driver DaemonSet across all worker nodes: ```shell kubectl get pod -l app.kubernetes.io/name=dra-example-driver -n dra-tutorial ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE dra-example-driver-kubeletplugin-4sk2x 1/1 Running 0 13s dra-example-driver-kubeletplugin-cttr2 1/1 Running 0 13s ``` 1. The initial responsibility of each node's local DRA driver is to update the cluster with what devices are available to Pods on that node, by publishing its metadata to the ResourceSlices API. You can check that API to see that each node with a driver is advertising the device class it represents. Check for available ResourceSlices: ```shell kubectl get resourceslices ``` The output is similar to this: ``` NAME NODE DRIVER POOL AGE kind-worker-gpu.example.com-k69gd kind-worker gpu.example.com kind-worker 19s kind-worker2-gpu.example.com-qdgpn kind-worker2 gpu.example.com kind-worker2 19s ``` At this point, you have successfully installed the example DRA driver, and confirmed its initial configuration. You're now ready to use DRA to schedule Pods. ## Claim resources and deploy a Pod {#claim-resources-pod} To request resources using DRA, you create ResourceClaims or ResourceClaimTemplates that define the resources that your Pods need. In the example driver,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/install-use-dra.md
|
[
0.04912218824028969,
0.018356168642640114,
0.035228487104177475,
0.0008094953373074532,
-0.007661599665880203,
-0.029770392924547195,
-0.03304434195160866,
0.039701808243989944,
0.034177739173173904,
0.030065365135669708,
-0.02839541807770729,
-0.1127304956316948,
-0.00004290193828637712,
-0.06889963895082474,
0.006268048193305731,
-0.02054581046104431,
0.052731964737176895,
-0.002162934048101306,
0.010195447131991386,
-0.0652085542678833,
-0.012417709454894066,
-0.024202600121498108,
0.016009453684091568,
-0.01366965938359499,
-0.09676273167133331,
0.04106598719954491,
0.04574320837855339,
0.006674637086689472,
0.015599885024130344,
-0.030007097870111465,
-0.03404669091105461,
-0.019121237099170685,
0.052149560302495956,
0.0005607972852885723,
0.018172401934862137,
0.09081310033798218,
0.06845470517873764,
-0.028685497120022774,
-0.10769714415073395,
-0.0033476422540843487,
0.059737786650657654,
-0.015354706905782223,
-0.0808340311050415,
-0.025609195232391357,
0.010905681177973747,
-0.046210307627916336,
-0.10754252225160599,
-0.014311755076050758,
0.06296248733997345,
-0.04552435874938965,
-0.015318622812628746,
-0.11310210824012756,
0.04668089747428894,
0.021982628852128983,
0.026962416246533394,
0.05779653415083885,
-0.03548109158873558,
-0.0001677368418313563,
0.1263362318277359,
-0.01650420017540455,
0.05600692331790924,
-0.016119759529829025,
0.021606432273983955,
-0.01671653427183628,
-0.04534078761935234,
0.0048939879052340984,
0.04542812332510948,
-0.011781237088143826,
0.01717086136341095,
-0.004260609392076731,
0.04818452149629593,
0.006901169661432505,
-0.013585315085947514,
-0.06913638859987259,
-0.0017717484151944518,
0.05033975839614868,
-0.01966855488717556,
0.07746528834104538,
0.01619063690304756,
-0.04721876233816147,
0.013612089678645134,
0.10056937485933304,
0.047755856066942215,
-0.014303594827651978,
-0.09560216218233109,
0.01931135170161724,
-0.03201575204730034,
-0.061065997928380966,
0.03147399052977562,
-0.024580061435699463,
-0.013179220259189606,
-0.04679231718182564,
-0.05780215188860893,
-0.11273744702339172,
0.09010099619626999,
0.016838539391756058,
0.011057917028665543,
-0.014968804083764553,
0.09354013949632645,
0.028715034946799278,
0.029977278783917427,
-0.052489716559648514,
-0.06521907448768616,
-0.05227192863821983,
-0.04514768347144127,
0.03665817156434059,
-0.10019650310277939,
-0.03646327555179596,
0.011776481755077839,
0.08034556359052658,
-0.014064016751945019,
0.07063792645931244,
-0.06415581703186035,
0.048128917813301086,
-0.008727888576686382,
-0.008284763433039188,
-0.02798251062631607,
-0.014329837635159492,
0.01932786963880062,
0.033689163625240326,
0.012264938093721867,
-0.10242220014333725,
0.030925994738936424,
0.014328469522297382,
0.024082181975245476,
0.033648476004600525,
-0.08273346722126007,
2.3404632517589153e-33,
0.07225458323955536,
-0.06796751916408539,
0.011754320934414864,
0.0035692453384399414,
0.0525507926940918,
-0.05473034828901291,
-0.04061431810259819,
-0.03682728856801987,
0.0012910014484077692,
-0.02972474694252014,
-0.07105038315057755,
0.11810516566038132,
-0.048172108829021454,
-0.03445053473114967,
0.014627939090132713,
-0.01983494684100151,
-0.033593595027923584,
0.03023129142820835,
0.049422089010477066,
-0.04675961658358574,
0.006858751177787781,
-0.07595860213041306,
-0.013301012106239796,
0.030861128121614456,
0.016453448683023453,
0.06296491622924805,
0.03591263294219971,
-0.07182860374450684,
0.06801337003707886,
0.022062724456191063,
-0.07281819730997086,
-0.0545642226934433,
0.03196711465716362,
0.015221127308905125,
-0.1329324096441269,
0.035636670887470245,
-0.07858165353536606,
0.01600158028304577,
-0.09235785156488419,
0.02268555760383606,
0.041897568851709366,
-0.09498511999845505,
0.0036218445748090744,
-0.07858546823263168,
0.01448800042271614,
-0.015450642444193363,
0.00458502396941185,
-0.039061564952135086,
0.07124261558055878,
0.015410534106194973,
-0.061304278671741486,
-0.0777992308139801,
0.03042578138411045,
-0.06519899517297745,
0.014970330521464348,
0.039137594401836395,
0.1052158921957016,
-0.0583014190196991,
-0.04925500601530075,
0.016966570168733597,
-0.057800307869911194,
0.034190475940704346,
0.007305960636585951,
0.03391999006271362,
-0.008445189334452152,
-0.018645472824573517,
-0.08216889202594757,
0.04796824976801872,
-0.05994996801018715,
0.05149923637509346,
-0.045541662722826004,
0.0808081328868866,
-0.08267173916101456,
0.010623591020703316,
0.02223537117242813,
-0.04286998137831688,
-0.0265386700630188,
0.05532186105847359,
-0.12049783021211624,
0.0998164713382721,
0.009118841029703617,
-0.011434738524258137,
-0.05128991976380348,
0.04801725968718529,
0.013622787781059742,
-0.06413372606039047,
-0.007560097612440586,
0.032248999923467636,
-0.06855499744415283,
-0.019434530287981033,
0.013600361533463001,
-0.0028696900699287653,
-0.04470901936292648,
0.03530632331967354,
-0.0272055733948946,
-4.9597574369527236e-33,
0.07155070453882217,
0.04710778966546059,
0.1094449833035469,
0.020110219717025757,
0.07394713908433914,
0.02282583899796009,
0.0037855550181120634,
0.06815794855356216,
-0.031014228239655495,
-0.051723625510931015,
-0.059371061623096466,
-0.03905206546187401,
-0.011960992589592934,
0.029501531273126602,
-0.07867871969938278,
0.03238493576645851,
-0.037140853703022,
-0.006617535836994648,
-0.01810147427022457,
0.007854587398469448,
-0.059817709028720856,
0.030400559306144714,
0.058886852115392685,
0.024953613057732582,
-0.03923860192298889,
-0.04358436167240143,
0.04989079758524895,
0.048127517104148865,
-0.06550440192222595,
-0.011975878849625587,
0.006283662281930447,
-0.08434586226940155,
-0.012840533629059792,
0.003815895412117243,
0.06014369800686836,
-0.001554683200083673,
0.023097625002264977,
0.010338133201003075,
0.017538467422127724,
-0.031183307990431786,
0.029223784804344177,
0.009876818396151066,
-0.03612055256962776,
-0.014766057021915913,
-0.028341513127088547,
0.0038696008268743753,
0.01906241662800312,
-0.009892336092889309,
-0.01626223884522915,
-0.045164499431848526,
-0.023235585540533066,
-0.02619147300720215,
-0.05823983624577522,
0.07213348150253296,
-0.06643005460500717,
0.05639491230249405,
0.05410574749112129,
0.11002170294523239,
-0.020353663712739944,
0.04467454180121422,
0.02857782319188118,
-0.144318088889122,
0.06703520566225052,
0.05372416228055954,
-0.07593191415071487,
-0.08751789480447769,
-0.0065519376657903194,
-0.010786682367324829,
-0.07711031287908554,
0.10378773510456085,
0.003953338135033846,
0.01836768537759781,
-0.041475191712379456,
0.06733785569667816,
0.002170960418879986,
-0.0495276115834713,
-0.028631171211600304,
0.036813247948884964,
0.07715000957250595,
0.030433157458901405,
0.026031658053398132,
0.023238711059093475,
-0.013741147704422474,
0.023737803101539612,
0.06516556441783905,
0.0840403363108635,
0.08946477621793747,
0.0270343367010355,
0.0764833614230156,
0.09349335730075836,
0.019909128546714783,
0.03330406919121742,
-0.044011425226926804,
0.1573866605758667,
-0.03588925302028656,
-5.3548173895023865e-8,
0.04641040414571762,
-0.011609840206801891,
-0.02276405319571495,
0.005918880458921194,
0.029675617814064026,
-0.04743008688092232,
0.008816213347017765,
-0.0004801628238055855,
-0.08126435428857803,
-0.03344050794839859,
-0.0016124328831210732,
-0.040119171142578125,
-0.07606778293848038,
0.010705655440688133,
0.05198746919631958,
0.0670897513628006,
0.013919254764914513,
0.10883533954620361,
0.03404766693711281,
-0.06422100216150284,
-0.030445681884884834,
-0.04708249121904373,
0.07754726707935333,
0.041328828781843185,
0.057591527700424194,
0.008848604746162891,
0.04370233044028282,
-0.0024066483601927757,
0.03600991144776344,
-0.003921437542885542,
-0.04865554720163345,
0.015321237035095692,
-0.08406317234039307,
0.07068420946598053,
0.005981873720884323,
-0.014169404283165932,
-0.12866336107254028,
0.06936615705490112,
0.05625748261809349,
0.07516517490148544,
-0.039147570729255676,
0.0793561190366745,
-0.06172143295407295,
-0.03511308133602142,
0.0003659298236016184,
0.08413374423980713,
-0.029510153457522392,
0.017098264768719673,
-0.030680866912007332,
0.03987140953540802,
-0.030127955600619316,
-0.08997371047735214,
0.013209536671638489,
0.07128363102674484,
-0.0496971569955349,
0.019127625972032547,
-0.014124520123004913,
-0.05128144100308418,
0.02086515538394451,
0.022939162328839302,
-0.07510622590780258,
0.049290649592876434,
0.006018532905727625,
-0.02807040698826313
] | 0.163861
|
successfully installed the example DRA driver, and confirmed its initial configuration. You're now ready to use DRA to schedule Pods. ## Claim resources and deploy a Pod {#claim-resources-pod} To request resources using DRA, you create ResourceClaims or ResourceClaimTemplates that define the resources that your Pods need. In the example driver, a memory capacity attribute is exposed for mock GPU devices. This section shows you how to use {{< glossary\_tooltip term\_id="cel" >}} to express your requirements in a ResourceClaim, select that ResourceClaim in a Pod specification, and observe the resource allocation. This tutorial showcases only one basic example of a DRA ResourceClaim. Read [Dynamic Resource Allocation](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) to learn more about ResourceClaims. ### Create the ResourceClaim In this section, you create a ResourceClaim and reference it in a Pod. Whatever the claim, the `deviceClassName` is a required field, narrowing down the scope of the request to a specific device class. The request itself can include a {{< glossary\_tooltip term\_id="cel" >}} expression that references attributes that may be advertised by the driver managing that device class. In this example, you will create a request for any GPU advertising over 10Gi memory capacity. The attribute exposing capacity from the example driver takes the form `device.capacity['gpu.example.com'].memory`. Note also that the name of the claim is set to `some-gpu`. {{% code\_sample language="yaml" file="dra/driver-install/example/resourceclaim.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/example/resourceclaim.yaml ``` ### Create the Pod that references that ResourceClaim Below is the Pod manifest referencing the ResourceClaim you just made, `some-gpu`, in the `spec.resourceClaims.resourceClaimName` field. The local name for that claim, `gpu`, is then used in the `spec.containers.resources.claims.name` field to allocate the claim to the Pod's underlying container. {{% code\_sample language="yaml" file="dra/driver-install/example/pod.yaml" %}} ```shell kubectl apply --server-side -f http://k8s.io/examples/dra/driver-install/example/pod.yaml ``` 1. Confirm the pod has deployed: ```shell kubectl get pod pod0 -n dra-tutorial ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE pod0 1/1 Running 0 9s ``` ### Explore the DRA state After you create the Pod, the cluster tries to schedule that Pod to a node where Kubernetes can satisfy the ResourceClaim. In this tutorial, the DRA driver is deployed on all nodes, and is advertising mock GPUs on all nodes, all of which have enough capacity advertised to satisfy the Pod's claim, so Kubernetes can schedule this Pod on any node and can allocate any of the mock GPUs on that node. When Kubernetes allocates a mock GPU to a Pod, the example driver adds environment variables in each container it is allocated to in order to indicate which GPUs \_would\_ have been injected into them by a real resource driver and how they would have been configured, so you can check those environment variables to see how the Pods have been handled by the system. 1. Check the Pod logs, which report the name of the mock GPU that was allocated: ```shell kubectl logs pod0 -c ctr0 -n dra-tutorial | grep -E "GPU\_DEVICE\_[0-9]+=" | grep -v "RESOURCE\_CLAIM" ``` The output is similar to this: ``` declare -x GPU\_DEVICE\_0="gpu-0" ``` 1. Check the state of the ResourceClaim object: ```shell kubectl get resourceclaims -n dra-tutorial ``` The output is similar to this: ``` NAME STATE AGE some-gpu allocated,reserved 34s ``` In this output, the `STATE` column shows that the ResourceClaim is allocated and reserved. 1. Check the details of the `some-gpu` ResourceClaim. The `status` stanza of the ResourceClaim has information about the allocated device and the Pod it has been reserved for: ```shell kubectl get resourceclaim some-gpu -n dra-tutorial -o yaml ``` The output is similar to this: {{< highlight yaml "linenos=inline, hl\_lines=27-30 38-41, style=emacs" >}} apiVersion: resource.k8s.io/v1 kind: ResourceClaim
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/install-use-dra.md
|
[
-0.059182580560445786,
0.01091021578758955,
0.01899532973766327,
0.06666804850101471,
-0.045990198850631714,
-0.07578756660223007,
0.007249907124787569,
0.020096713677048683,
-0.008205555379390717,
-0.005721345543861389,
-0.06905082613229752,
-0.06639371812343597,
-0.02948993258178234,
0.011059917509555817,
0.017813611775636673,
-0.01481617521494627,
0.08443799614906311,
-0.0021921941079199314,
-0.034923192113637924,
0.041651658713817596,
0.16549018025398254,
0.00836232490837574,
0.019727647304534912,
0.0505482479929924,
-0.036367498338222504,
-0.0126496572047472,
0.05831969901919365,
-0.013683205470442772,
0.05884770303964615,
-0.029696596786379814,
0.02190842106938362,
-0.008056702092289925,
0.021171849220991135,
0.0020028511062264442,
0.13334116339683533,
0.0239112451672554,
-0.028362737968564034,
-0.10652904212474823,
-0.05903743579983711,
-0.01806572638452053,
0.029429715126752853,
-0.04302437603473663,
-0.09705785661935806,
0.05400743708014488,
0.002415845636278391,
-0.024962827563285828,
0.017906732857227325,
0.06041865423321724,
0.018666572868824005,
-0.019351519644260406,
0.03831467404961586,
-0.06661763042211533,
0.03508273512125015,
0.014202337712049484,
0.01263980008661747,
0.03801505267620087,
0.05561095476150513,
-0.02435467764735222,
0.09234295040369034,
0.042307425290346146,
0.02662176825106144,
-0.07442285865545273,
0.018414802849292755,
-0.011610454879701138,
0.02523963898420334,
-0.014360853470861912,
0.033290278166532516,
0.03327555954456329,
-0.0015639023622497916,
-0.05306355655193329,
0.025317465886473656,
-0.008687850087881088,
0.04969338700175285,
-0.016122406348586082,
0.025608103722333908,
0.061232611536979675,
-0.04842934384942055,
0.04418083652853966,
0.06334161013364792,
-0.09283372014760971,
-0.00604657270014286,
0.05231568589806557,
0.09688522666692734,
-0.013008871115744114,
0.006494961213320494,
0.024426249787211418,
0.05493425950407982,
0.004821211099624634,
0.06097149848937988,
-0.015340520069003105,
0.08395276218652725,
0.02643541991710663,
-0.040203195065259933,
-0.06155918166041374,
0.07862523198127747,
-0.0033221112098544836,
0.02827426977455616,
-0.1089867353439331,
0.014752869494259357,
0.012574306689202785,
0.025584304705262184,
0.02793249301612377,
-0.009457188658416271,
-0.020854683592915535,
-0.004768075421452522,
-0.01895359344780445,
-0.10010503977537155,
-0.03708595409989357,
-0.05699349194765091,
0.034342262893915176,
0.08646860718727112,
0.0386035293340683,
-0.034750740975141525,
0.058906521648168564,
0.008390615694224834,
0.011563338339328766,
-0.07937657088041306,
-0.013826427049934864,
0.05617334321141243,
-0.02195289358496666,
-0.056171949952840805,
-0.07808346301317215,
0.0027380711399018764,
-0.019825614988803864,
-0.02242417447268963,
-0.016847088932991028,
-0.06809373944997787,
2.2518669772214088e-33,
0.05234825611114502,
-0.09058615565299988,
-0.06872550398111343,
-0.017370400950312614,
-0.002764031756669283,
-0.08817405998706818,
0.0055052852258086205,
0.05474964901804924,
-0.019961433485150337,
-0.0635722428560257,
-0.016460508108139038,
0.1137683168053627,
-0.04783904179930687,
-0.034117188304662704,
-0.027474181726574898,
-0.034487947821617126,
-0.01983785256743431,
0.07990437746047974,
0.10065475851297379,
0.01315862312912941,
0.03241460770368576,
-0.04059707745909691,
0.016803285107016563,
-0.07963452488183975,
0.04511605575680733,
0.06348805129528046,
0.005296903662383556,
-0.06906536221504211,
0.06899826973676682,
0.03700869157910347,
-0.031239943578839302,
-0.08098627626895905,
0.005233077332377434,
0.031145576387643814,
-0.05129466950893402,
0.0028558392077684402,
-0.06957607716321945,
0.004822160117328167,
-0.07730678468942642,
0.006647544447332621,
0.044166289269924164,
-0.030811218544840813,
0.0014805743703618646,
-0.1196323111653328,
-0.04119762033224106,
-0.04305166006088257,
0.035711925476789474,
-0.09778513014316559,
0.0012042869348078966,
0.05366994068026543,
-0.00007222704880405217,
-0.05043356493115425,
-0.006400883663445711,
-0.08181478083133698,
0.020353417843580246,
-0.07836055755615234,
0.013590875081717968,
0.0008562469738535583,
0.09172528237104416,
0.058373596519231796,
-0.099579356610775,
0.03803898021578789,
-0.0521751306951046,
-0.0008601736626587808,
-0.03806721419095993,
0.04356909915804863,
-0.054620034992694855,
0.03329828009009361,
-0.013758804649114609,
0.057331383228302,
0.034200165420770645,
-0.03539545461535454,
0.0025806098710745573,
0.04168025404214859,
-0.016510797664523125,
-0.05572234094142914,
0.041367292404174805,
0.06254198402166367,
-0.18720318377017975,
0.045765168964862823,
0.037991713732481,
0.023046383634209633,
-0.019592449069023132,
0.03841043636202812,
-0.07928337156772614,
-0.05366181209683418,
-0.004737581126391888,
-0.027359284460544586,
-0.10234567523002625,
-0.021608011797070503,
0.009595394134521484,
-0.03037789650261402,
-0.03866702318191528,
0.007269612047821283,
-0.04757876694202423,
-3.5963783139087404e-33,
0.04123927280306816,
-0.03151850774884224,
0.07593284547328949,
0.0803891122341156,
0.034022849053144455,
-0.05066337063908577,
-0.04968877509236336,
0.03760663419961929,
0.02921859361231327,
-0.021670229732990265,
-0.07179858535528183,
-0.02088194526731968,
0.031087655574083328,
0.049903351813554764,
-0.06327614933252335,
0.011318850331008434,
-0.08591354638338089,
-0.06299138814210892,
-0.0356721505522728,
0.04898259788751602,
0.0016159391961991787,
0.08502446860074997,
0.08419537544250488,
-0.02305261231958866,
0.0013820143649354577,
-0.017258068546652794,
0.043101709336042404,
0.02039462700486183,
0.020311463624238968,
-0.057845085859298706,
0.027091074734926224,
-0.07082168757915497,
-0.06924785673618317,
-0.02955291047692299,
0.04883362352848053,
-0.046989403665065765,
0.007989919744431973,
0.07181643694639206,
0.0056531671434640884,
0.06981632858514786,
0.15919455885887146,
-0.040964409708976746,
-0.012971880845725536,
-0.02391800470650196,
0.03684092313051224,
0.010002395138144493,
-0.023402497172355652,
-0.034089505672454834,
0.029163742437958717,
-0.057889871299266815,
0.06648093461990356,
-0.018459318205714226,
-0.055854130536317825,
0.08640669286251068,
-0.02875830978155136,
-0.018195897340774536,
0.09510882198810577,
0.012154480442404747,
-0.021387141197919846,
0.059326909482479095,
0.046750377863645554,
-0.08699978142976761,
0.016017021611332893,
0.004594867117702961,
-0.05588265508413315,
-0.09713736921548843,
-0.010649429634213448,
-0.07669979333877563,
-0.006484337616711855,
0.06456727534532547,
0.05164466053247452,
-0.009244241751730442,
-0.004248118028044701,
0.0018634508596733212,
-0.049468159675598145,
0.027601007372140884,
-0.02267806977033615,
-0.054638758301734924,
0.05499689653515816,
0.0020175306126475334,
-0.06790533661842346,
0.0589958131313324,
0.06108177825808525,
0.038239914923906326,
0.03145308792591095,
0.0698976069688797,
0.051975999027490616,
0.022458449006080627,
0.011327985674142838,
0.11455734819173813,
-0.007938742637634277,
-0.034421514719724655,
-0.018062906339764595,
0.16481155157089233,
-0.03554009273648262,
-5.0082121560990345e-8,
0.0655047595500946,
0.05366501957178116,
0.06653442233800888,
0.04409370943903923,
0.026261640712618828,
-0.1137029305100441,
0.06165999546647072,
-0.02869538404047489,
0.027431096881628036,
0.04042243957519531,
0.05096198245882988,
-0.05864489823579788,
-0.03057943843305111,
0.009645774029195309,
0.02584616281092167,
0.09264346212148666,
0.00041170488111674786,
0.03894883394241333,
-0.0007749259821139276,
-0.1004749983549118,
-0.008624016307294369,
-0.059428006410598755,
0.06492538750171661,
-0.0010949417483061552,
0.018867453560233116,
0.0202706977725029,
0.07564246654510498,
0.0036087925545871258,
-0.010693997144699097,
-0.027040919288992882,
-0.059396591037511826,
0.0311665628105402,
-0.04396570101380348,
-0.020463595166802406,
0.012127932161092758,
-0.04232484847307205,
-0.08431621640920639,
0.030869102105498314,
0.049381621181964874,
0.053126197308301926,
-0.06245139241218567,
-0.023883691057562828,
0.003729561110958457,
-0.03302228823304176,
0.028544533997774124,
0.03527956083416939,
-0.09595552831888199,
0.008466040715575218,
-0.045542072504758835,
0.050570297986269,
-0.026016751304268837,
-0.06871847808361053,
-0.01704779453575611,
0.06960928440093994,
-0.047573402523994446,
0.01081142295151949,
-0.010937998071312904,
-0.03928016126155853,
-0.015421104617416859,
-0.024561500176787376,
0.040953379124403,
0.031478215008974075,
-0.011505224741995335,
-0.015437033958733082
] | 0.150214
|
`some-gpu` ResourceClaim. The `status` stanza of the ResourceClaim has information about the allocated device and the Pod it has been reserved for: ```shell kubectl get resourceclaim some-gpu -n dra-tutorial -o yaml ``` The output is similar to this: {{< highlight yaml "linenos=inline, hl\_lines=27-30 38-41, style=emacs" >}} apiVersion: resource.k8s.io/v1 kind: ResourceClaim metadata: creationTimestamp: "2025-08-20T18:17:31Z" finalizers: - resource.kubernetes.io/delete-protection name: some-gpu namespace: dra-tutorial resourceVersion: "2326" uid: d3e48dbf-40da-47c3-a7b9-f7d54d1051c3 spec: devices: requests: - exactly: allocationMode: ExactCount count: 1 deviceClassName: gpu.example.com selectors: - cel: expression: device.capacity['gpu.example.com'].memory.compareTo(quantity('10Gi')) >= 0 name: some-gpu status: allocation: devices: results: - device: gpu-0 driver: gpu.example.com pool: kind-worker request: some-gpu nodeSelector: nodeSelectorTerms: - matchFields: - key: metadata.name operator: In values: - kind-worker reservedFor: - name: pod0 resource: pods uid: c4dadf20-392a-474d-a47b-ab82080c8bd7 {{< /highlight >}} 1. To check how the driver handled device allocation, get the logs for the driver DaemonSet Pods: ```shell kubectl logs -l app.kubernetes.io/name=dra-example-driver -n dra-tutorial ``` The output is similar to this: ``` I0820 18:17:44.131324 1 driver.go:106] PrepareResourceClaims is called: number of claims: 1 I0820 18:17:44.135056 1 driver.go:133] Returning newly prepared devices for claim 'd3e48dbf-40da-47c3-a7b9-f7d54d1051c3': [{[some-gpu] kind-worker gpu-0 [k8s.gpu.example.com/gpu=common k8s.gpu.example.com/gpu=d3e48dbf-40da-47c3-a7b9-f7d54d1051c3-gpu-0]}] ``` You have now successfully deployed a Pod that claims devices using DRA, verified that the Pod was scheduled to an appropriate node, and saw that the associated DRA APIs kinds were updated with the allocation status. ## Delete a Pod that has a claim {#delete-pod-claim} When a Pod with a claim is deleted, the DRA driver deallocates the resource so it can be available for future scheduling. To validate this behavior, delete the Pod that you created in the previous steps and watch the corresponding changes to the ResourceClaim and driver. 1. Delete the `pod0` Pod: ```shell kubectl delete pod pod0 -n dra-tutorial ``` The output is similar to this: ``` pod "pod0" deleted ``` ### Observe the DRA state When the Pod is deleted, the driver deallocates the device from the ResourceClaim and updates the ResourceClaim resource in the Kubernetes API. The ResourceClaim has a `pending` state until it's referenced in a new Pod. 1. Check the state of the `some-gpu` ResourceClaim: ```shell kubectl get resourceclaims -n dra-tutorial ``` The output is similar to this: ``` NAME STATE AGE some-gpu pending 76s ``` 1. Verify that the driver has processed unpreparing the device for this claim by checking the driver logs: ```shell kubectl logs -l app.kubernetes.io/name=dra-example-driver -n dra-tutorial ``` The output is similar to this: ``` I0820 18:22:15.629376 1 driver.go:138] UnprepareResourceClaims is called: number of claims: 1 ``` You have now deleted a Pod that had a claim, and observed that the driver took action to unprepare the underlying hardware resource and update the DRA APIs to reflect that the resource is available again for future scheduling. ## {{% heading "cleanup" %}} To clean up the resources that you created in this tutorial, follow these steps: ```shell kubectl delete namespace dra-tutorial kubectl delete deviceclass gpu.example.com kubectl delete clusterrole dra-example-driver-role kubectl delete clusterrolebinding dra-example-driver-role-binding kubectl delete priorityclass dra-driver-high-priority ``` ## {{% heading "whatsnext" %}} \* [Learn more about DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation) \* [Allocate Devices to Workloads with DRA](/docs/tasks/configure-pod-container/assign-resources/allocate-devices-dra)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/cluster-management/install-use-dra.md
|
[
-0.041352272033691406,
0.049331922084093094,
0.011558551341295242,
0.014160643331706524,
0.053727757185697556,
-0.06461873650550842,
-0.00019518534827511758,
-0.024993890896439552,
0.10201213508844376,
0.025604326277971268,
-0.022647012025117874,
-0.06820198148488998,
-0.037997640669345856,
-0.0012088388903066516,
0.00515508558601141,
-0.029860660433769226,
0.03473682329058647,
-0.0364241860806942,
-0.054459962993860245,
-0.02221115492284298,
0.11513229459524155,
0.055984292179346085,
0.018009351566433907,
0.000855082820635289,
-0.010328531265258789,
-0.010237699374556541,
0.0072066448628902435,
0.012216394767165184,
0.044037483632564545,
-0.05932985991239548,
-0.014210003428161144,
0.023033129051327705,
0.04640497639775276,
-0.0047048404812812805,
0.11059238761663437,
0.08099237084388733,
-0.017318811267614365,
-0.13347859680652618,
-0.07464095950126648,
-0.0027659398037940264,
0.022545460611581802,
-0.014546350575983524,
-0.11276692152023315,
0.030316490679979324,
-0.026804260909557343,
0.0038768299855291843,
-0.021754546090960503,
-0.0470389761030674,
0.0028479681350290775,
-0.039142392575740814,
0.06466047465801239,
-0.036550432443618774,
0.038684647530317307,
-0.002783730160444975,
0.057134728878736496,
-0.001715952530503273,
-0.021562453359365463,
0.004571784753352404,
0.07094705104827881,
0.0506734699010849,
0.03938376531004906,
-0.04070913419127464,
0.03821219503879547,
-0.03734521195292473,
0.004259661305695772,
-0.03627587854862213,
0.023042311891913414,
0.006821738556027412,
-0.03416056931018829,
-0.032482992857694626,
0.0653449147939682,
0.006778592709451914,
0.0018216650933027267,
0.003450472606346011,
-0.017874300479888916,
0.04588006064295769,
-0.01552515383809805,
0.05422394722700119,
0.05043480545282364,
-0.0932343602180481,
-0.025499645620584488,
0.024534638971090317,
0.05507141724228859,
-0.02486332878470421,
-0.019652824848890305,
0.043800074607133865,
-0.021525893360376358,
-0.03527480736374855,
0.05208310857415199,
-0.005048211198300123,
0.013993042521178722,
-0.019117742776870728,
-0.0015443905722349882,
-0.022137822583317757,
0.08315882086753845,
-0.031086226925253868,
-0.06094672530889511,
-0.030501190572977066,
-0.054001469165086746,
0.042446669191122055,
0.007284039165824652,
0.07078620046377182,
0.04608917981386185,
0.04477405548095703,
-0.003594352165237069,
-0.015998728573322296,
-0.10057640820741653,
0.05425701290369034,
-0.05005874112248421,
0.03862766548991203,
0.055720265954732895,
0.02673579566180706,
-0.0484030656516552,
0.08063475787639618,
0.016567151993513107,
0.015238565392792225,
-0.04846381023526192,
0.013081332668662071,
0.05103834345936775,
0.017508508637547493,
0.028428921476006508,
-0.07466482371091843,
-0.04286482557654381,
0.001524968072772026,
-0.09769288450479507,
-0.005993981845676899,
-0.048925235867500305,
4.439979916300017e-33,
0.10919898003339767,
-0.08363370597362518,
0.0023122315760701895,
-0.052055723965168,
0.015208159573376179,
-0.0830841213464737,
-0.034472569823265076,
0.00020275906717870384,
-0.05839144438505173,
-0.013092514127492905,
-0.07061028480529785,
0.07699312269687653,
-0.02610090933740139,
-0.0023629898205399513,
-0.021099751815199852,
-0.021834393963217735,
-0.013181407004594803,
0.09279109537601471,
0.05168628320097923,
0.05529091879725456,
0.04966886714100838,
-0.002659677295014262,
0.012350521981716156,
-0.06363462656736374,
-0.01381529401987791,
0.04645713418722153,
0.0000348121247952804,
-0.09109900146722794,
0.025844747200608253,
0.02295934408903122,
-0.04170868918299675,
-0.07407408207654953,
0.03729452192783356,
0.019622569903731346,
-0.06270020455121994,
-0.009002598002552986,
0.0021050474606454372,
0.0006583963404409587,
-0.1219296008348465,
-0.0011965618468821049,
0.03831704705953598,
0.011334089562296867,
0.008555802516639233,
-0.10766806453466415,
0.005813517142087221,
-0.04869857802987099,
0.027806509286165237,
-0.11863119155168533,
-0.00742711778730154,
0.11013181507587433,
-0.07304315268993378,
-0.01478296983987093,
0.011389615014195442,
-0.08078458905220032,
0.029457302764058113,
-0.06174173578619957,
0.06636929512023926,
0.03440263867378235,
0.031330496072769165,
-0.004943631589412689,
-0.0498167984187603,
0.03415235877037048,
-0.013902228325605392,
-0.021837785840034485,
-0.03106943890452385,
0.02208723872900009,
-0.056705836206674576,
0.052953675389289856,
-0.05664866045117378,
0.06401295959949493,
-0.06300607323646545,
0.0036734326276928186,
0.020490894094109535,
0.038780577480793,
0.008065594360232353,
-0.10643969476222992,
0.030530525371432304,
-0.0052670580334961414,
-0.14608612656593323,
0.025508705526590347,
0.011331751942634583,
-0.0220322422683239,
-0.026919858530163765,
0.02693381905555725,
-0.08085105568170547,
-0.053211987018585205,
-0.00040460648597218096,
0.013342839665710926,
-0.03843861445784569,
0.028231898322701454,
-0.0477290153503418,
-0.023475751280784607,
-0.08265421539545059,
-0.02020176686346531,
-0.12389615923166275,
-7.126798905108873e-33,
0.08974966406822205,
-0.019689535722136497,
0.044057682156562805,
0.011714741587638855,
0.046298548579216,
-0.03362761810421944,
-0.012574891559779644,
0.08269955217838287,
-0.014690387062728405,
-0.0564594492316246,
-0.002361520193517208,
-0.00047652286593802273,
0.004888241179287434,
0.029600374400615692,
-0.009740372188389301,
0.047160033136606216,
-0.08284322172403336,
-0.04382413625717163,
-0.04183294624090195,
0.021871961653232574,
-0.011557666584849358,
0.07797686755657196,
0.11887786537408829,
0.006047909613698721,
-0.010043758898973465,
-0.017811255529522896,
0.07499632239341736,
0.00386740337125957,
-0.018412142992019653,
-0.03908713534474373,
0.05744690075516701,
-0.09939664602279663,
-0.15457701683044434,
0.05632844939827919,
-0.0059301359578967094,
-0.08509086817502975,
0.026419172063469887,
0.06723395735025406,
-0.043296679854393005,
0.01617266982793808,
0.07445023208856583,
0.024337008595466614,
0.004646360874176025,
0.0415460430085659,
-0.047507528215646744,
-0.0035485837142914534,
0.07342476397752762,
-0.05445774644613266,
0.06143458932638168,
-0.11910704523324966,
0.07294349372386932,
-0.0240018367767334,
-0.02908490039408207,
0.11286258697509766,
-0.020076995715498924,
-0.010944181121885777,
0.0770367756485939,
0.08033447712659836,
-0.03668686002492905,
0.01405806839466095,
0.08998478949069977,
-0.06324061006307602,
-0.034829504787921906,
-0.00815525185316801,
-0.01177580188959837,
-0.0791202113032341,
-0.025628728792071342,
0.02350986748933792,
-0.004060016013681889,
0.043213166296482086,
0.017473235726356506,
-0.01060765702277422,
-0.03431917726993561,
-0.0011116990353912115,
-0.017685391008853912,
0.029083458706736565,
-0.0607144795358181,
-0.05868203938007355,
0.04666411131620407,
0.03242100402712822,
-0.04936179891228676,
0.01382410991936922,
-0.0030977092683315277,
0.012638678774237633,
0.11400450021028519,
0.009512878954410553,
0.03220819681882858,
0.0761023610830307,
0.04495483636856079,
0.0802183523774147,
-0.03280668333172798,
0.01937779039144516,
-0.07791564613580704,
0.16756443679332733,
-0.08045835047960281,
-5.359234833690607e-8,
0.06512816995382309,
0.003660689340904355,
-0.022204365581274033,
0.03863311931490898,
0.05649569258093834,
-0.08045949786901474,
0.0821295902132988,
-0.014764047227799892,
-0.021281590685248375,
-0.014055375941097736,
0.021337443962693214,
0.013373436406254768,
-0.08173171430826187,
-0.019154276698827744,
0.06256712973117828,
-0.015651999041438103,
-0.09355884790420532,
0.0850834846496582,
0.03140661492943764,
-0.10738123208284378,
-0.04579870402812958,
-0.06354738026857376,
0.005031993612647057,
-0.07404540479183197,
-0.004983961582183838,
0.03348420932888985,
0.08665940910577774,
0.009397484362125397,
-0.018664492294192314,
-0.011529014445841312,
0.0019505922682583332,
0.021379999816417694,
-0.00951195228844881,
-0.013906391337513924,
0.061360377818346024,
-0.030185431241989136,
-0.0802648589015007,
0.0798615887761116,
0.026471789926290512,
0.0255671925842762,
-0.08851423859596252,
-0.013087430968880653,
-0.0040922523476183414,
0.024499304592609406,
0.04401935264468193,
0.07693985104560852,
-0.0629979744553566,
0.0663147121667862,
-0.044998954981565475,
-0.008153855800628662,
0.0005385825643315911,
-0.06297336518764496,
-0.03361445292830467,
0.07796427607536316,
-0.033539511263370514,
0.005994186270982027,
-0.040073126554489136,
-0.0639946386218071,
-0.01494384091347456,
-0.03681521117687225,
0.07275492697954178,
-0.007484463509172201,
0.0399458222091198,
0.006563159171491861
] | 0.173342
|
## {{% heading "objectives" %}} This tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along. Using the tutorials, you can learn to: \* Deploy a containerized application on a cluster. \* Scale the deployment. \* Update the containerized application with a new software version. \* Debug the containerized application. ## What can Kubernetes do for you? With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community. ## Kubernetes Basics Modules {{< tutorials/modules >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_01.svg?v=1469803628347" alt="Module 1" title="1. Create a Kubernetes cluster" >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_02.svg?v=1469803628347" alt="Module 2" title="2. Deploy an app" >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/explore/explore-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_03.svg?v=1469803628347" alt="Module 3" title="3. Explore your app" >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/expose/expose-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_04.svg?v=1469803628347" alt="Module 4" title="4. Expose your app publicly" >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/scale/scale-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_05.svg?v=1469803628347" alt="Module 5" title="5. Scale up your app" >}} {{< tutorials/module path="/docs/tutorials/kubernetes-basics/update/update-intro/" image="/docs/tutorials/kubernetes-basics/public/images/module\_06.svg?v=1469803628347" alt="Module 6" title="6. Update your app" >}} {{< /tutorials/modules >}} ## {{% heading "whatsnext" %}} \* See the [Learning environment](/docs/setup/learning-environment/) page to learn more about practice clusters and how you can run your own one. \* Tutorial [Using Minikube to Create a Cluster](/docs/tutorials/kubernetes-basics/create-cluster/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/_index.md
|
[
0.03313141688704491,
0.00011462666589068249,
0.06634743511676788,
-0.008419782854616642,
0.004560566507279873,
-0.018406694754958153,
-0.017161961644887924,
0.0007087453850544989,
-0.023477500304579735,
0.029122572392225266,
-0.03291695937514305,
-0.017694678157567978,
0.005169181618839502,
-0.044181693345308304,
0.03293141350150108,
-0.014424419961869717,
0.11104316264390945,
-0.01707332395017147,
-0.08817455917596817,
-0.06221090257167816,
-0.06025446951389313,
0.002593619516119361,
-0.016222713515162468,
0.00023078422236721963,
-0.049775075167417526,
0.08551956713199615,
-0.03382890298962593,
-0.029269857332110405,
0.025506077334284782,
0.00682509271427989,
-0.05156994238495827,
0.03433951362967491,
0.03805730119347572,
0.060886166989803314,
0.004955373704433441,
0.09963062405586243,
0.04629135504364967,
-0.02325253374874592,
-0.07689063251018524,
0.026879291981458664,
0.011282403022050858,
-0.07272345572710037,
-0.11335491389036179,
-0.029489340260624886,
-0.008004903793334961,
-0.08183516561985016,
-0.0720214992761612,
-0.03767191991209984,
-0.0033497551921755075,
-0.014400461688637733,
0.0006152141140773892,
-0.13535474240779877,
0.013387414626777172,
0.016147280111908913,
-0.032663892954587936,
0.02805371955037117,
-0.007287507876753807,
0.030904199928045273,
0.0580589585006237,
-0.0118488110601902,
0.06639581173658371,
-0.007397373206913471,
0.02341928333044052,
0.004984449129551649,
0.028092999011278152,
-0.05192269757390022,
0.05364212766289711,
0.04377308860421181,
0.06901338696479797,
-0.08350692689418793,
-0.0009196909377351403,
0.04848029091954231,
-0.051126573234796524,
-0.01769891567528248,
-0.06665337085723877,
-0.018298443406820297,
0.025761503726243973,
0.021656392142176628,
0.028856106102466583,
0.006106894928961992,
0.024430276826024055,
0.04656485468149185,
0.016713354736566544,
0.0213784109801054,
-0.1116427481174469,
-0.03665640577673912,
0.004461692180484533,
0.015712086111307144,
0.014669770374894142,
-0.030029598623514175,
-0.02693958580493927,
-0.01778269186615944,
0.025107605382800102,
-0.1077488362789154,
0.05446985363960266,
0.02757132425904274,
-0.07394452393054962,
-0.03710872679948807,
0.07531191408634186,
0.040445711463689804,
0.03872793912887573,
-0.01860564947128296,
0.054693613201379776,
-0.0885113924741745,
0.024531595408916473,
-0.04726988077163696,
-0.023215439170598984,
0.03145589679479599,
0.03727836161851883,
0.008524881675839424,
-0.0485667884349823,
0.052950892597436905,
-0.01764940656721592,
-0.01747301034629345,
-0.023067904636263847,
-0.03193484991788864,
0.06176097318530083,
-0.04331253096461296,
0.045615918934345245,
0.12636730074882507,
0.07309433072805405,
-0.06005007401108742,
0.04167330637574196,
0.0002467116282787174,
0.03301568329334259,
0.05617697536945343,
-0.06209810450673103,
5.8795049919963755e-33,
0.028461698442697525,
-0.08605533838272095,
0.022920237854123116,
0.027856608852744102,
0.07849689573049545,
-0.09462013095617294,
0.007979721762239933,
-0.035597700625658035,
-0.05506504327058792,
-0.060258060693740845,
-0.028780052438378334,
0.12044457346200943,
0.008453572168946266,
0.008635591715574265,
0.06032542511820793,
-0.08835529536008835,
-0.059906966984272,
0.04422488436102867,
0.1281733214855194,
-0.02741905115544796,
0.0037586947437375784,
-0.07448859512805939,
-0.014658997766673565,
0.040279630571603775,
0.08156666159629822,
-0.03065839223563671,
0.0779956504702568,
-0.016336826607584953,
-0.0408208891749382,
0.0052484674379229546,
0.036332014948129654,
-0.03216465562582016,
-0.020779835060238838,
0.020726919174194336,
-0.09019540995359421,
0.030595850199460983,
-0.06294944137334824,
-0.038874074816703796,
-0.046491920948028564,
-0.022393936291337013,
-0.07283404469490051,
-0.04093724489212036,
-0.056674838066101074,
-0.06396463513374329,
0.062054652720689774,
-0.011845291592180729,
0.03166967257857323,
-0.06406421214342117,
0.08835559338331223,
-0.05656404420733452,
0.02167518064379692,
-0.020411232486367226,
0.05648166313767433,
0.04852759465575218,
-0.005596810951828957,
0.07308223098516464,
0.10655205696821213,
-0.10883813351392746,
-0.05977858230471611,
-0.013460438698530197,
-0.04529546573758125,
-0.08804243803024292,
-0.0685228556394577,
-0.008042250759899616,
0.016229791566729546,
-0.022445891052484512,
0.02740045078098774,
0.1095973327755928,
-0.010879685170948505,
0.030660131946206093,
-0.036570530384778976,
-0.003505390603095293,
0.04328064247965813,
0.043904777616262436,
-0.01820340007543564,
-0.013402190990746021,
-0.0008468293235637248,
-0.006435283459722996,
-0.09437348693609238,
0.042023077607154846,
0.02245427295565605,
0.007278215605765581,
-0.052015215158462524,
0.06001006066799164,
0.03164926543831825,
-0.040632057934999466,
-0.004983379505574703,
0.023656586185097694,
-0.04715654253959656,
0.05016985908150673,
0.01567082107067108,
-0.009541913866996765,
-0.019788267090916634,
0.05593973398208618,
-0.011214888654649258,
-6.785457386149159e-33,
0.0401347279548645,
0.04533937945961952,
-0.07603434473276138,
0.04014813154935837,
0.0374385230243206,
0.021064570173621178,
-0.03693776577711105,
0.04272023215889931,
-0.03984467685222626,
-0.08172684162855148,
-0.0836017057299614,
-0.010403250344097614,
0.015321379527449608,
0.047900814563035965,
-0.17674365639686584,
0.01015523262321949,
-0.02150142751634121,
-0.036487773060798645,
0.024747250601649284,
0.012085328809916973,
-0.04338805377483368,
-0.007832083851099014,
0.02627326361835003,
-0.05216648802161217,
-0.03042999841272831,
-0.018738294020295143,
0.008188340812921524,
0.006173540838062763,
-0.03302474692463875,
-0.00793707836419344,
0.010203516110777855,
-0.09475115686655045,
0.04825318977236748,
-0.02713942900300026,
0.05295385420322418,
0.0068116444163024426,
-0.006247216835618019,
-0.02420772612094879,
0.04781065508723259,
-0.059766072779893875,
0.033582013100385666,
-0.016420064494013786,
0.010740925557911396,
-0.09699515253305435,
-0.05559329316020012,
0.060361869633197784,
0.0026238723658025265,
-0.007212087512016296,
-0.045730724930763245,
-0.09257768839597702,
-0.02154267393052578,
-0.016433196142315865,
-0.04435943067073822,
0.012528767809271812,
-0.04203846678137779,
0.03565151244401932,
0.005751852877438068,
0.049180664122104645,
-0.06073489412665367,
0.07790499180555344,
0.030370749533176422,
-0.09173272550106049,
0.06871620565652847,
0.05025452375411987,
-0.04729180783033371,
-0.06022186204791069,
-0.003091653576120734,
0.04842030629515648,
-0.11036916822195053,
0.05068071559071541,
-0.051726941019296646,
0.0022237140219658613,
-0.004031611606478691,
0.08938037604093552,
-0.08980348706245422,
-0.07058936357498169,
0.04970948398113251,
-0.006477924529463053,
0.03476058319211006,
-0.019022420048713684,
0.03098795935511589,
0.04093290865421295,
-0.08161111176013947,
-0.016517680138349533,
0.03876960277557373,
0.017467737197875977,
0.11550279706716537,
0.05398570001125336,
0.0470159612596035,
0.04648960381746292,
-0.04465515539050102,
0.03563949093222618,
-0.06847016513347626,
0.12366758286952972,
-0.04454173147678375,
-5.8453824891557815e-8,
0.04114777594804764,
0.024245917797088623,
-0.07400761544704437,
0.04132871702313423,
-0.019012514501810074,
0.020914139226078987,
0.05758722126483917,
0.0076486836187541485,
-0.018505578860640526,
-0.016188092529773712,
-0.0027526451740413904,
0.014814033173024654,
-0.08248081803321838,
0.023486638441681862,
0.06878294050693512,
0.04648776352405548,
-0.050822913646698,
0.00902798306196928,
0.026254165917634964,
-0.09231642633676529,
-0.0009705470292828977,
-0.04295586422085762,
0.03762205317616463,
0.04357657954096794,
0.04339025914669037,
0.06553585082292557,
0.06588268280029297,
0.0786280557513237,
0.027473807334899902,
-0.021982572972774506,
-0.030102603137493134,
0.027632534503936768,
-0.06676386296749115,
0.06684436649084091,
-0.001753889606334269,
0.0374155193567276,
-0.1595979630947113,
0.038104649633169174,
0.05359736457467079,
0.05756014585494995,
0.006574001628905535,
0.0598333515226841,
-0.035671133548021317,
-0.028381995856761932,
0.03019244782626629,
0.06201902776956558,
-0.05869287624955177,
0.035362012684345245,
-0.03223112225532532,
0.01626005955040455,
0.060444362461566925,
-0.03268139436841011,
-0.003627822734415531,
0.09066314995288849,
0.04425380378961563,
0.08251582831144333,
0.01688639633357525,
-0.04801803082227707,
0.12455086410045624,
0.043091289699077606,
-0.04776248335838318,
0.062068872153759,
-0.03089393489062786,
-0.0020819460041821003
] | 0.204318
|
## {{% heading "objectives" %}} \* Scale an existing app manually using kubectl. ## Scaling an application {{% alert %}} \_You can create from the start a Deployment with multiple instances using the --replicas parameter for the kubectl create deployment command.\_ {{% /alert %}} Previously we created a [Deployment](/docs/concepts/workloads/controllers/deployment/), and then exposed it publicly via a [Service](/docs/concepts/services-networking/service/). The Deployment created only one Pod for running our application. When traffic increases, we will need to scale the application to keep up with user demand. If you haven't worked through the earlier sections, start from [Using minikube to create a cluster](/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/). \_Scaling\_ is accomplished by changing the number of replicas in a Deployment. {{< note >}} If you are trying this after the [previous section](/docs/tutorials/kubernetes-basics/expose/expose-intro/), then you may have deleted the service you created, or have created a Service of `type: NodePort`. In this section, it is assumed that a service with `type: LoadBalancer` is created for the kubernetes-bootcamp Deployment. If you have \_not\_ deleted the Service created in [the previous section](/docs/tutorials/kubernetes-basics/expose/expose-intro), first delete that Service and then run the following command to create a new Service with its `type` set to `LoadBalancer`: ```shell kubectl expose deployment/kubernetes-bootcamp --type="LoadBalancer" --port 8080 ``` {{< /note >}} ## Scaling overview {{< tutorials/carousel id="myCarousel" interval="3000" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_05\_scaling1.svg" active="true" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_05\_scaling2.svg" >}} {{< /tutorials/carousel >}} {{% alert %}} \_Scaling is accomplished by changing the number of replicas in a Deployment.\_ {{% /alert %}} Scaling out a Deployment will ensure new Pods are created and scheduled to Nodes with available resources. Scaling will increase the number of Pods to the new desired state. Kubernetes also supports [autoscaling](/docs/concepts/workloads/autoscaling/) of Pods, but it is outside of the scope of this tutorial. Scaling to zero is also possible, and it will terminate all Pods of the specified Deployment. Running multiple instances of an application will require a way to distribute the traffic to all of them. Services have an integrated load-balancer that will distribute network traffic to all Pods of an exposed Deployment. Services will monitor continuously the running Pods using endpoints, to ensure the traffic is sent only to available Pods. Once you have multiple instances of an application running, you would be able to do Rolling updates without downtime. We'll cover that in the next section of the tutorial. Now, let's go to the terminal and scale our application. ### Scaling a Deployment To list your Deployments, use the `get deployments` subcommand: ```shell kubectl get deployments ``` The output should be similar to: ``` NAME READY UP-TO-DATE AVAILABLE AGE kubernetes-bootcamp 1/1 1 1 11m ``` We should have 1 Pod. If not, run the command again. This shows: \* \_NAME\_ lists the names of the Deployments in the cluster. \* \_READY\_ shows the ratio of CURRENT/DESIRED replicas \* \_UP-TO-DATE\_ displays the number of replicas that have been updated to achieve the desired state. \* \_AVAILABLE\_ displays how many replicas of the application are available to your users. \* \_AGE\_ displays the amount of time that the application has been running. To see the ReplicaSet created by the Deployment, run: ```shell kubectl get rs ``` Notice that the name of the ReplicaSet is always formatted as [DEPLOYMENT-NAME]-[RANDOM-STRING]. The random string is randomly generated and uses the pod-template-hash as a seed. Two important columns of this output are: \* \_DESIRED\_ displays the desired number of replicas of the application, which you define when you create the Deployment. This is the desired state. \* \_CURRENT\_ displays how many replicas are currently running. Next, let’s scale the Deployment to 4 replicas. We’ll use the `kubectl scale` command, followed by
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/scale/scale-intro.md
|
[
0.05417091026902199,
-0.03883999213576317,
0.010074297897517681,
-0.003967950586229563,
-0.052568092942237854,
-0.02062293514609337,
-0.02085060253739357,
0.04728173092007637,
0.031103841960430145,
0.06392378360033035,
-0.02474600449204445,
-0.05956824868917465,
0.03780439496040344,
-0.03688690811395645,
0.056902334094047546,
0.03393437713384628,
0.05447857081890106,
0.008336415514349937,
-0.04671098291873932,
-0.05445344001054764,
0.016332747414708138,
-0.03179517015814781,
0.021956125274300575,
0.017333483323454857,
-0.06304813921451569,
-0.02981356717646122,
-0.04323273152112961,
0.013466228730976582,
0.02588401548564434,
-0.029309283941984177,
0.0007539568468928337,
0.02156592532992363,
0.021119805052876472,
0.03095937892794609,
0.0420808345079422,
0.06694573909044266,
0.008048485033214092,
-0.061803270131349564,
-0.05886385589838028,
0.008167163468897343,
0.0648488849401474,
-0.05623190850019455,
-0.13858520984649658,
-0.01820298843085766,
-0.013391481712460518,
-0.05341804027557373,
-0.04857853427529335,
0.01726287603378296,
0.05606431886553764,
-0.08156732469797134,
0.07326771318912506,
-0.09026002138853073,
0.0450776182115078,
0.014669600874185562,
0.02187361568212509,
-0.015385922975838184,
0.031130865216255188,
0.006040529813617468,
0.12220419198274612,
-0.01092558354139328,
0.03323177248239517,
0.008787648752331734,
0.07537668198347092,
-0.0002947079192381352,
0.0019770318176597357,
-0.04298829287290573,
0.0017597300466150045,
0.007045794744044542,
-0.01305887196213007,
0.04882114753127098,
0.056180134415626526,
0.028134560212492943,
-0.0184964407235384,
-0.027918396517634392,
-0.03875920549035072,
-0.05350344628095627,
-0.020304381847381592,
0.06604204326868057,
-0.0025854376144707203,
0.01650315336883068,
-0.028808703646063805,
-0.018766697496175766,
0.000144920326420106,
-0.009022673591971397,
-0.1132463589310646,
-0.07309939712285995,
0.007493017707020044,
-0.07952284067869186,
0.046121008694171906,
0.000650519214104861,
0.017707960680127144,
0.02376270852982998,
0.01419267151504755,
-0.03573830425739288,
0.021660346537828445,
-0.03011120855808258,
-0.07771008461713791,
-0.033913806080818176,
0.03246806934475899,
0.007821100763976574,
0.053445592522621155,
-0.025022437795996666,
0.05388614535331726,
0.00213840720243752,
0.0842212662100792,
-0.028783870860934258,
-0.06123056262731552,
-0.010703783482313156,
0.03423764929175377,
0.06599662452936172,
0.012775983661413193,
0.05732191726565361,
-0.0054212952964007854,
0.04568856582045555,
-0.0013227391755208373,
0.032224249094724655,
0.05879729613661766,
-0.00398173276335001,
-0.009100749157369137,
0.12607558071613312,
0.057987459003925323,
-0.12086302787065506,
-0.007769815158098936,
-0.006320405285805464,
0.02094215527176857,
0.0915001630783081,
-0.020768743008375168,
7.230559883291452e-34,
0.03241483122110367,
-0.04831875115633011,
0.009595462121069431,
0.006429900415241718,
0.01602279581129551,
-0.03870733082294464,
-0.04781600087881088,
-0.006611378397792578,
-0.058959949761629105,
-0.10149069130420685,
-0.08037680387496948,
0.10507270693778992,
0.019614066928625107,
-0.005582110956311226,
-0.0030995032284408808,
-0.0868726372718811,
-0.06023988872766495,
0.057349029928445816,
0.13331255316734314,
-0.036668382585048676,
0.008110620081424713,
-0.10323146730661392,
-0.08756905794143677,
0.02552025206387043,
0.02360512688755989,
-0.028335586190223694,
0.07792546600103378,
-0.10238001495599747,
-0.051864054054021835,
0.025564000010490417,
-0.017072033137083054,
-0.023355480283498764,
-0.012846389785408974,
0.03362927585840225,
-0.1384967714548111,
-0.02051362581551075,
0.009786717593669891,
0.022565558552742004,
-0.07885574549436569,
-0.013153033331036568,
-0.00999064277857542,
-0.023832114413380623,
-0.029665986075997353,
-0.07381512969732285,
0.01749267429113388,
0.03538084775209427,
0.08844731003046036,
-0.02989339269697666,
0.050590630620718,
-0.033559076488018036,
0.009936856105923653,
-0.052419815212488174,
0.03324669599533081,
-0.03127950057387352,
0.04516613110899925,
-0.00043287663720548153,
0.07217193394899368,
-0.0916772112250328,
-0.005654368549585342,
-0.038232699036598206,
-0.08851899951696396,
-0.07477719336748123,
-0.05520166829228401,
0.0784941166639328,
0.04750683531165123,
0.015708936378359795,
0.009818578138947487,
0.05973897874355316,
-0.010597102344036102,
0.06250234693288803,
-0.0173252671957016,
0.038773201406002045,
0.03596010431647301,
0.002146713202819228,
0.00908583402633667,
-0.060822419822216034,
0.010128302499651909,
0.03874756768345833,
-0.1004486232995987,
0.07573986798524857,
-0.021980183199048042,
-0.0038002387154847383,
-0.07804712653160095,
0.04041413217782974,
0.04211150109767914,
-0.017914174124598503,
0.019359024241566658,
-0.009258848614990711,
-0.0853831097483635,
0.045204468071460724,
-0.01562289334833622,
-0.02614568918943405,
-0.0335429310798645,
0.018131064251065254,
-0.0893116220831871,
-1.9419192389523114e-33,
0.06386979669332504,
0.031193403527140617,
0.007440163753926754,
0.03358875960111618,
0.07665304839611053,
0.029087992385029793,
0.02531723864376545,
0.11958003044128418,
-0.049282416701316833,
-0.03952275961637497,
-0.07552212476730347,
-0.03633604571223259,
0.018306320533156395,
0.0031443668995052576,
-0.1405576914548874,
-0.014871637336909771,
-0.014815147966146469,
-0.005923399701714516,
0.03421982750296593,
0.008795361034572124,
-0.05035780742764473,
-0.030829191207885742,
0.018212303519248962,
0.007295593153685331,
0.02844078280031681,
-0.015930993482470512,
-0.017190231010317802,
0.023681359365582466,
-0.047986846417188644,
-0.028262978419661522,
-0.014148276299238205,
-0.07794887572526932,
0.0014811813598498702,
0.019046200439333916,
0.014112159609794617,
-0.0005256535368971527,
-0.026727398857474327,
0.048795994371175766,
0.04451308771967888,
-0.0030752455350011587,
0.03959936276078224,
-0.01692994497716427,
-0.023160016164183617,
-0.05453350767493248,
-0.050148870795965195,
-0.02145032398402691,
0.04306621104478836,
-0.028864741325378418,
-0.0403047539293766,
-0.0953160747885704,
-0.023687932640314102,
0.015345634892582893,
-0.06322166323661804,
0.09963399916887283,
-0.05494790896773338,
0.07949797809123993,
0.043962765485048294,
0.08283475786447525,
-0.07757268100976944,
0.0769638940691948,
0.06855563074350357,
-0.10926224291324615,
0.04989338666200638,
0.026026789098978043,
-0.029777538031339645,
-0.06919608265161514,
0.0679008811712265,
0.05628388747572899,
-0.05132211372256279,
0.03815082460641861,
-0.022702664136886597,
0.02166135609149933,
0.040033530443906784,
0.06207482889294624,
-0.08579356223344803,
-0.07254531979560852,
0.041411057114601135,
-0.05414309725165367,
0.034574396908283234,
0.006705485284328461,
-0.036806367337703705,
0.08358127623796463,
-0.06640596687793732,
-0.022385550662875175,
0.019029682502150536,
0.03706449270248413,
0.08351639658212662,
0.08219852298498154,
0.07994043827056885,
0.13348329067230225,
-0.05759531259536743,
0.05178437754511833,
-0.023140260949730873,
0.04474082961678505,
-0.06504887342453003,
-5.177849971005344e-8,
0.026950769126415253,
0.047756969928741455,
-0.00235423119738698,
0.07861559838056564,
0.011771384626626968,
-0.024720139801502228,
0.024621224030852318,
-0.009784060530364513,
-0.028738316148519516,
-0.006083065643906593,
-0.02707449160516262,
0.07906720787286758,
-0.07165850698947906,
0.0937148779630661,
0.03675151243805885,
-0.028494948521256447,
0.04018523916602135,
-0.025617782026529312,
0.00475130882114172,
-0.09546373784542084,
-0.06345736235380173,
0.013937408104538918,
-0.013926039449870586,
0.0038209008052945137,
0.040336836129426956,
0.06950566917657852,
0.03723716363310814,
0.008339690044522285,
0.0253584124147892,
-0.07103444635868073,
-0.07761029154062271,
0.028129324316978455,
-0.10549648851156235,
0.07728464901447296,
-0.028586572036147118,
0.0345953032374382,
-0.15539246797561646,
0.0881916880607605,
0.042211879044771194,
0.05506927892565727,
-0.012662725523114204,
0.012224627658724785,
-0.01011131051927805,
-0.006513446569442749,
0.04020516201853752,
0.08008147776126862,
-0.11512252688407898,
0.06798173487186432,
0.017541032284498215,
-0.006075048819184303,
0.026248760521411896,
-0.053734809160232544,
-0.002267837058752775,
0.06998556107282639,
0.025136254727840424,
0.008110892958939075,
-0.02641470544040203,
-0.017972217872738838,
0.06110202893614769,
0.03535750135779381,
0.023684676736593246,
-0.02076450176537037,
-0.054515913128852844,
-0.0005547674372792244
] | 0.114113
|
are: \* \_DESIRED\_ displays the desired number of replicas of the application, which you define when you create the Deployment. This is the desired state. \* \_CURRENT\_ displays how many replicas are currently running. Next, let’s scale the Deployment to 4 replicas. We’ll use the `kubectl scale` command, followed by the Deployment type, name and desired number of instances: ```shell kubectl scale deployments/kubernetes-bootcamp --replicas=4 ``` To list your Deployments once again, use `get deployments`: ```shell kubectl get deployments ``` The change was applied, and we have 4 instances of the application available. Next, let’s check if the number of Pods changed: ```shell kubectl get pods -o wide ``` There are 4 Pods now, with different IP addresses. The change was registered in the Deployment events log. To check that, use the `describe` subcommand: ```shell kubectl describe deployments/kubernetes-bootcamp ``` You can also view in the output of this command that there are 4 replicas now. ### Load Balancing Let's check that the Service is load-balancing the traffic. To find out the exposed IP and Port we can use `describe service` as we learned in the previous part of the tutorial: ```shell kubectl describe services/kubernetes-bootcamp ``` Create an environment variable called NODE\_PORT that has a value as the Node port: ```shell export NODE\_PORT="$(kubectl get services/kubernetes-bootcamp -o go-template='{{(index .spec.ports 0).nodePort}}')" echo NODE\_PORT=$NODE\_PORT ``` Next, we’ll do a `curl` to the exposed IP address and port. Execute the command multiple times: ```shell curl http://"$(minikube ip):$NODE\_PORT" ``` We hit a different Pod with every request. This demonstrates that the load-balancing is working. The output should be similar to: ``` Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-644c5687f4-wp67j | v=1 Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-644c5687f4-hs9dj | v=1 Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-644c5687f4-4hjvf | v=1 Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-644c5687f4-wp67j | v=1 Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-644c5687f4-4hjvf | v=1 ``` {{< note >}} If you're running minikube with Docker Desktop as the container driver, a minikube tunnel is needed. This is because containers inside Docker Desktop are isolated from your host computer. In a separate terminal window, execute: ```shell minikube service kubernetes-bootcamp --url ``` The output looks like this: ``` http://127.0.0.1:51082 ! Because you are using a Docker driver on darwin, the terminal needs to be open to run it. ``` Then use the given URL to access the app: ```shell curl 127.0.0.1:51082 ``` {{< /note >}} ### Scale Down To scale down the Deployment to 2 replicas, run again the `scale` subcommand: ```shell kubectl scale deployments/kubernetes-bootcamp --replicas=2 ``` List the Deployments to check if the change was applied with the `get deployments` subcommand: ```shell kubectl get deployments ``` The number of replicas decreased to 2. List the number of Pods, with `get pods`: ```shell kubectl get pods -o wide ``` This confirms that 2 Pods were terminated. ## {{% heading "whatsnext" %}} \* Tutorial [Performing a Rolling Update](/docs/tutorials/kubernetes-basics/update/update-intro/). \* Learn more about [ReplicaSet](/docs/concepts/workloads/controllers/replicaset/). \* Learn more about [Autoscaling](/docs/concepts/workloads/autoscaling/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/scale/scale-intro.md
|
[
0.08137202262878418,
-0.03397446870803833,
0.051583122462034225,
-0.009970547631382942,
-0.05412793904542923,
-0.0283214021474123,
0.0029504161793738604,
-0.027880026027560234,
0.0747038722038269,
0.06850842386484146,
-0.0006670302827842534,
-0.10714014619588852,
0.042885247617959976,
-0.05287929251790047,
0.015056534670293331,
-0.010328366421163082,
0.035789038985967636,
-0.01036398857831955,
-0.04677247256040573,
-0.05996587127447128,
0.010049396194517612,
-0.011632897891104221,
-0.007459302898496389,
0.03935510665178299,
-0.03464135527610779,
-0.031204460188746452,
-0.053508270531892776,
0.005080883856862783,
0.016485385596752167,
-0.053684983402490616,
-0.03162894770503044,
0.08108934760093689,
-0.008762530982494354,
0.023166362196207047,
0.11743323504924774,
0.009025940671563148,
-0.012775029055774212,
-0.049594514071941376,
-0.034401386976242065,
-0.012301724404096603,
0.10486412048339844,
-0.06145171448588371,
-0.05141656845808029,
-0.0024904701858758926,
-0.020836008712649345,
0.028675738722085953,
-0.06249048188328743,
0.004476888105273247,
0.04167957976460457,
-0.020665733143687248,
0.04857739061117172,
-0.06403262913227081,
-0.028024209663271904,
-0.0014870510203763843,
0.02309545688331127,
-0.003290684660896659,
0.014205249026417732,
0.0433090440928936,
0.08877318352460861,
0.01564081944525242,
0.084090456366539,
-0.024375062435865402,
0.008628586307168007,
-0.020673153921961784,
-0.04608487710356712,
0.025214534252882004,
-0.002843912923708558,
-0.06561321020126343,
0.045365020632743835,
-0.006747540086507797,
0.051757391542196274,
0.058980345726013184,
0.0009484818438068032,
-0.06414822489023209,
-0.058876167982816696,
-0.06914172321557999,
-0.032294027507305145,
0.08782102912664413,
0.027526866644620895,
-0.0890854075551033,
-0.021887633949518204,
0.04183654487133026,
-0.010922800749540329,
-0.023958589881658554,
-0.0735328271985054,
-0.04956136271357536,
0.007616471499204636,
-0.056148357689380646,
0.031901415437459946,
0.03277429938316345,
-0.012915318831801414,
-0.024918803945183754,
-0.022553978487849236,
-0.053799111396074295,
-0.030939491465687752,
0.003938225097954273,
-0.031049711629748344,
0.05377073213458061,
0.10068055242300034,
0.009651879779994488,
0.06145580857992172,
0.008465401828289032,
0.0686916708946228,
-0.004488032311201096,
0.007969462312757969,
-0.02166213095188141,
-0.07961666584014893,
-0.03724883124232292,
0.02369607426226139,
0.07027608901262283,
0.0006940148305147886,
0.05128704011440277,
-0.025046562775969505,
0.059730157256126404,
0.023066626861691475,
0.036738328635692596,
0.02172413468360901,
0.03523564338684082,
-0.040864307433366776,
0.10692095756530762,
0.04261185601353645,
-0.08921641856431961,
0.05426272377371788,
-0.02104710415005684,
-0.09643356502056122,
0.061473384499549866,
0.010296352207660675,
1.8144365092636497e-33,
0.046549223363399506,
-0.12712280452251434,
0.023593099787831306,
0.042431917041540146,
0.06428129971027374,
-0.018883833661675453,
-0.04668276757001877,
0.007598239928483963,
-0.039101988077163696,
-0.06166250258684158,
-0.04370327293872833,
0.10553039610385895,
-0.011818010360002518,
0.024178611114621162,
0.0024166270159184933,
-0.06997504830360413,
-0.04143119230866432,
0.08051791042089462,
0.08654297888278961,
-0.003773205913603306,
0.012016387656331062,
-0.03300611674785614,
-0.10839901119470596,
0.02019837312400341,
0.059942543506622314,
-0.021539581939578056,
-0.014728488400578499,
-0.024749446660280228,
-0.06080958992242813,
0.015369074419140816,
-0.008202633820474148,
-0.015406930819153786,
0.024375097826123238,
-0.051362860947847366,
-0.08378235995769501,
-0.06710309535264969,
0.027888797223567963,
0.014053837396204472,
-0.09102705121040344,
-0.04829910397529602,
0.05093687027692795,
-0.0061502414755523205,
-0.01689198426902294,
-0.04590774327516556,
0.04195409640669823,
-0.005622411612421274,
0.02164541371166706,
-0.04559527710080147,
0.0495811328291893,
-0.04634857550263405,
0.03131692484021187,
-0.030524909496307373,
0.04360327497124672,
-0.061376821249723434,
0.04692230001091957,
-0.007626152131706476,
0.05147091671824455,
-0.026109009981155396,
-0.0005227876245044172,
-0.0006348248571157455,
-0.03997725993394852,
0.0038873348385095596,
-0.031765323132276535,
0.06827412545681,
0.08196961879730225,
0.0649002194404602,
-0.00006928963557584211,
0.011588136665523052,
-0.029912056401371956,
0.12914876639842987,
-0.040694329887628555,
0.03643231466412544,
-0.024079954251646996,
-0.010039114393293858,
-0.018057959154248238,
-0.10887165367603302,
0.01305521372705698,
0.023735392838716507,
-0.16355031728744507,
0.11259738355875015,
-0.02032143995165825,
0.04651410132646561,
-0.11995229125022888,
0.04261203855276108,
-0.041949670761823654,
-0.01594165526330471,
0.03090035729110241,
-0.0353413000702858,
-0.06099061295390129,
0.02285563014447689,
0.02495437115430832,
-0.06653572618961334,
-0.0701185092329979,
-0.0066489106975495815,
-0.10096275061368942,
-4.031220122900798e-33,
0.047678232192993164,
0.055069491267204285,
0.0614922009408474,
-0.03438683599233627,
-0.000003510845090204384,
-0.003167847404256463,
0.042711760848760605,
0.11746950447559357,
-0.0549970380961895,
-0.05466927960515022,
-0.013534045778214931,
-0.01878824084997177,
0.017842380329966545,
0.02309698611497879,
-0.12000802159309387,
0.04887571185827255,
-0.028928419575095177,
-0.04838985577225685,
0.02410818822681904,
0.03364485502243042,
-0.032086823135614395,
0.028617361560463905,
0.06894241273403168,
0.0331486314535141,
0.043326810002326965,
-0.05391140654683113,
0.010820157825946808,
0.027091922238469124,
0.011119619943201542,
-0.08386755734682083,
0.023345796391367912,
-0.07289097458124161,
-0.05679804086685181,
0.09535343945026398,
0.008580773137509823,
-0.03585262969136238,
0.005179638974368572,
0.07539960741996765,
0.014934401959180832,
0.0000489229969389271,
0.022118451073765755,
-0.014838837087154388,
-0.05887627974152565,
-0.007625937927514315,
-0.03361494839191437,
-0.0007363568875007331,
0.049810659140348434,
-0.014148473739624023,
0.013394100591540337,
-0.09483984857797623,
0.008108736015856266,
-0.031067626550793648,
-0.08164780586957932,
0.11175172030925751,
-0.009527227841317654,
0.04997243359684944,
-0.06609111279249191,
0.05646614730358124,
-0.07164137810468674,
0.015767190605401993,
0.04474363103508949,
-0.1013367623090744,
0.04633148014545441,
0.06511245667934418,
-0.05319871008396149,
-0.0232887864112854,
-0.04707920923829079,
0.020384201779961586,
-0.07636323571205139,
0.004680117592215538,
0.02027999423444271,
-0.024913091212511063,
-0.02223961427807808,
0.01850014366209507,
-0.06575898081064224,
-0.07742422074079514,
-0.001536751165986061,
-0.04047371447086334,
-0.003405699273571372,
0.06412144005298615,
-0.0846359059214592,
0.08427214622497559,
-0.06657306849956512,
-0.019303802400827408,
-0.02406952902674675,
0.035406678915023804,
0.0826447531580925,
0.13792556524276733,
0.08839831501245499,
0.1349927932024002,
-0.039353761821985245,
0.029331149533391,
-0.0672570988535881,
0.030767308548092842,
-0.07156560570001602,
-4.717367119155824e-8,
0.022063501179218292,
0.017151828855276108,
0.0064222551882267,
0.07664815336465836,
0.035515397787094116,
0.018353942781686783,
0.043735090643167496,
-0.03491656854748726,
-0.05666957423090935,
-0.04064047709107399,
-0.04854533076286316,
0.05312274768948555,
-0.08724813163280487,
0.06181251257658005,
0.015448295511305332,
-0.021957941353321075,
-0.014016348868608475,
-0.011282364837825298,
0.050222527235746384,
-0.06228270381689072,
-0.07445456087589264,
-0.004884164314717054,
0.05494777113199234,
0.01734408177435398,
-0.010572751052677631,
0.07344405353069305,
0.013460156507790089,
-0.004977393429726362,
0.004745256621390581,
0.022625604644417763,
0.06414379924535751,
-0.02027210220694542,
-0.03961222991347313,
0.029649220407009125,
0.013662544079124928,
-0.006876037921756506,
-0.16547644138336182,
0.08378712087869644,
0.07044430077075958,
0.05055714398622513,
-0.04170886054635048,
-0.010711234994232655,
-0.035759780555963516,
0.0468633733689785,
0.00425290409475565,
0.050307344645261765,
-0.037317197769880295,
0.007966220378875732,
-0.01896975189447403,
-0.06765764951705933,
-0.004621361382305622,
-0.046764809638261795,
-0.007948209531605244,
0.07957421988248825,
-0.038959480822086334,
0.04812874272465706,
-0.0033465903252363205,
-0.025494689121842384,
0.07860484719276428,
0.03734881058335304,
-0.008106959983706474,
-0.014559295028448105,
-0.02946789748966694,
-0.002129357773810625
] | 0.15188
|
## {{% heading "objectives" %}} Perform a rolling update using kubectl. ## Updating an application {{% alert %}} \_Rolling updates allow Deployments' update to take place with zero downtime by incrementally updating Pods instances with new ones.\_ {{% /alert %}} Users expect applications to be available all the time, and developers are expected to deploy new versions of them several times a day. In Kubernetes this is done with rolling updates. A \*\*rolling update\*\* allows a Deployment update to take place with zero downtime. It does this by incrementally replacing the current Pods with new ones. The new Pods are scheduled on Nodes with available resources, and Kubernetes waits for those new Pods to start before removing the old Pods. In the previous module we scaled our application to run multiple instances. This is a requirement for performing updates without affecting application availability. By default, the maximum number of Pods that can be unavailable during the update and the maximum number of new Pods that can be created, is one. Both options can be configured to either numbers or percentages (of Pods). In Kubernetes, updates are versioned and any Deployment update can be reverted to a previous (stable) version. ## Rolling updates overview {{< tutorials/carousel id="myCarousel" interval="3000" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_06\_rollingupdates1.svg" active="true" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_06\_rollingupdates2.svg" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_06\_rollingupdates3.svg" >}} {{< tutorials/carousel-item image="/docs/tutorials/kubernetes-basics/public/images/module\_06\_rollingupdates4.svg" >}} {{< /tutorials/carousel >}} {{% alert %}} \_If a Deployment is exposed publicly, the Service will load-balance the traffic only to available Pods during the update.\_ {{% /alert %}} Similar to application Scaling, if a Deployment is exposed publicly, the Service will load-balance the traffic only to available Pods during the update. An available Pod is an instance that is available to the users of the application. Rolling updates allow the following actions: \* Promote an application from one environment to another (via container image updates) \* Rollback to previous versions \* Continuous Integration and Continuous Delivery of applications with zero downtime In the following interactive tutorial, we'll update our application to a new version, and also perform a rollback. ### Update the version of the app To list your Deployments, run the `get deployments` subcommand: ```shell kubectl get deployments ``` To list the running Pods, run the `get pods` subcommand: ```shell kubectl get pods ``` To view the current image version of the app, run the `describe pods` subcommand and look for the `Image` field: ```shell kubectl describe pods ``` To update the image of the application to version 2, use the `set image` subcommand, followed by the deployment name and the new image version: ```shell kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=docker.io/jocatalin/kubernetes-bootcamp:v2 ``` The command notified the Deployment to use a different image for your app and initiated a rolling update. Check the status of the new Pods, and view the old one terminating with the `get pods` subcommand: ```shell kubectl get pods ``` ### Verify an update First, check that the service is running, as you might have deleted it in previous tutorial step, run `describe services/kubernetes-bootcamp`. If it's missing, you can create it again with: ```shell kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080 ``` Create an environment variable called `NODE\_PORT` that has the value of the Node port assigned: ```shell export NODE\_PORT="$(kubectl get services/kubernetes-bootcamp -o go-template='{{(index .spec.ports 0).nodePort}}')" echo "NODE\_PORT=$NODE\_PORT" ``` Next, do a `curl` to the exposed IP and port: ```shell curl http://"$(minikube ip):$NODE\_PORT" ``` Every time you run the `curl` command, you will hit a different Pod. Notice that all Pods are now running the latest version (`v2`). You can also confirm the update by running the `rollout status` subcommand: ```shell kubectl rollout
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/update/update-intro.md
|
[
-0.0025098754558712244,
0.008445349521934986,
0.03173373267054558,
-0.0059791444800794125,
0.007560198660939932,
-0.05827610194683075,
0.03495750203728676,
0.003307738108560443,
0.10406232625246048,
0.052481427788734436,
0.03134704753756523,
-0.002767321653664112,
0.03389127925038338,
-0.06832589209079742,
0.02991843782365322,
0.046931955963373184,
0.012010139413177967,
-0.02160988561809063,
-0.10696391761302948,
-0.04095805808901787,
-0.04474572464823723,
-0.014863504096865654,
-0.017561059445142746,
0.032004281878471375,
-0.06322120130062103,
0.01673606038093567,
-0.07069015502929688,
-0.012719406746327877,
0.05401604622602463,
-0.011986305937170982,
-0.05718386918306351,
0.06676314771175385,
0.04745899513363838,
0.04440848529338837,
0.04294149577617645,
0.04264571890234947,
0.012770221568644047,
-0.002000797539949417,
-0.04386577010154724,
0.03960166126489639,
0.07356538623571396,
-0.05974495783448219,
-0.1175616905093193,
0.018140822649002075,
-0.01434833649545908,
-0.02325081266462803,
-0.07877306640148163,
-0.04639070853590965,
-0.02346212975680828,
-0.020378397777676582,
0.05202539637684822,
-0.1067282110452652,
-0.01755504682660103,
0.023762695491313934,
0.06268598884344101,
0.002246735617518425,
0.044985949993133545,
0.0414111465215683,
0.07018338143825531,
0.0021048318594694138,
0.0556815005838871,
-0.02426442876458168,
0.012990466319024563,
0.00402202969416976,
-0.010833139531314373,
-0.07736600190401077,
0.005072644911706448,
-0.00987256970256567,
0.03742371127009392,
0.0334407314658165,
0.008199349977076054,
0.03691564500331879,
-0.03450064733624458,
-0.04936598986387253,
-0.04509561136364937,
-0.02112896740436554,
0.07124893367290497,
0.09172261506319046,
0.016628755256533623,
-0.048011861741542816,
0.020792875438928604,
0.015949325636029243,
0.012807158753275871,
-0.057206328958272934,
-0.09198398888111115,
-0.0677432119846344,
-0.010472382418811321,
-0.05715083330869675,
0.07586132735013962,
0.015774376690387726,
0.037315335124731064,
-0.006826519966125488,
0.07159637659788132,
-0.04956090450286865,
0.01508332509547472,
0.04401615634560585,
-0.03759495168924332,
0.011388600803911686,
0.024994991719722748,
0.04854227975010872,
0.02157672494649887,
-0.0513492226600647,
0.032280083745718,
-0.01144151110202074,
0.05125359818339348,
-0.09075767546892166,
-0.060532622039318085,
-0.03699227049946785,
0.015499383211135864,
0.003691289108246565,
-0.010566730052232742,
0.027956880629062653,
0.019360043108463287,
0.020142657682299614,
-0.03585226833820343,
0.0025393159594386816,
0.04379850625991821,
0.034642450511455536,
0.022944901138544083,
0.10433503985404968,
0.09259318560361862,
-0.08045870810747147,
0.05855315923690796,
-0.04467393830418587,
-0.03269924223423004,
0.07029895484447479,
0.001042761723510921,
6.307363262518595e-33,
0.042075011879205704,
-0.08620461076498032,
-0.02028988115489483,
0.0019424367928877473,
0.028018316254019737,
-0.08705535531044006,
-0.050603535026311874,
-0.02511122077703476,
0.00017216325795743614,
-0.08091667294502258,
-0.08280511200428009,
0.1136721596121788,
-0.00025619976804591715,
0.016073977574706078,
0.042490944266319275,
-0.09041158109903336,
-0.02691584825515747,
0.09665194898843765,
0.13238289952278137,
-0.03468242287635803,
0.045929908752441406,
-0.10484757274389267,
-0.06419624388217926,
0.04253556206822395,
0.06045662984251976,
-0.00723203644156456,
0.08513080328702927,
-0.06057675927877426,
-0.06440151482820511,
0.022972941398620605,
-0.015851696953177452,
0.03020835481584072,
-0.01084091141819954,
0.019046446308493614,
-0.10443390160799026,
0.008035933598876,
-0.0530959814786911,
-0.010880962014198303,
-0.026891488581895828,
-0.034842219203710556,
-0.0504658967256546,
-0.00584053760394454,
-0.05520299822092056,
-0.04502508416771889,
0.057905592024326324,
-0.026276985183358192,
0.029739124700427055,
-0.03316347673535347,
0.027405625209212303,
-0.006758099887520075,
-0.008144651539623737,
0.01283592451363802,
0.020132098346948624,
-0.031210994347929955,
0.005547496024519205,
-0.0055044274777174,
0.06711611151695251,
-0.09761595726013184,
-0.03890684247016907,
0.004630059469491243,
-0.013491717167198658,
-0.04309585690498352,
-0.03759608045220375,
0.017798667773604393,
0.051375534385442734,
0.04585740342736244,
0.03145034983754158,
0.035027485340833664,
0.02538333646953106,
0.07472655177116394,
-0.041286271065473557,
0.057191260159015656,
-0.030246896669268608,
-0.025503359735012054,
-0.03863295912742615,
-0.09166407585144043,
0.03654247522354126,
0.042107682675123215,
-0.08663277328014374,
0.03696250170469284,
0.004920055624097586,
-0.001909774262458086,
-0.10156062990427017,
0.008133737370371819,
0.02102731354534626,
-0.011725310236215591,
-0.009730193763971329,
0.009921050630509853,
-0.12235047668218613,
0.021924152970314026,
0.001599957700818777,
-0.037833619862794876,
-0.07948190718889236,
-0.010714123956859112,
-0.06030881404876709,
-7.777316009485988e-33,
0.09088556468486786,
-0.004744971636682749,
-0.056477926671504974,
0.030994972214102745,
0.0027291460428386927,
0.020119061693549156,
-0.02116446942090988,
0.071973517537117,
-0.029091883450746536,
-0.052291035652160645,
-0.11738760769367218,
0.003391253761947155,
0.000534002436324954,
0.024439245462417603,
-0.09532385319471359,
-0.010265059769153595,
-0.08754521608352661,
-0.04850650206208229,
-0.025025418028235435,
0.03946857526898384,
-0.04166831821203232,
0.008777948096394539,
-0.05085516348481178,
0.05470258742570877,
-0.020321941003203392,
-0.02385547198355198,
-0.056270401924848557,
0.0678766518831253,
-0.012824316509068012,
-0.03940688818693161,
-0.03590492159128189,
-0.12871019542217255,
-0.02002057246863842,
0.013922972604632378,
0.018879856914281845,
-0.015892041847109795,
-0.013553940691053867,
0.025193743407726288,
0.0251870546489954,
0.049128416925668716,
0.08437792956829071,
0.005904197692871094,
0.015003925189375877,
-0.03664621710777283,
-0.03692412003874779,
0.08527541905641556,
0.012058801017701626,
-0.002903203247115016,
-0.04356177896261215,
-0.13371525704860687,
0.007721362169831991,
0.003657833207398653,
-0.07025860249996185,
0.09973624348640442,
-0.04667253419756889,
0.027611656114459038,
-0.0025522918440401554,
0.03315328061580658,
-0.09420092403888702,
0.06232597306370735,
0.0381414070725441,
-0.06505265086889267,
0.0977998897433281,
-0.0009823323925957084,
-0.05648677796125412,
0.0045073735527694225,
-0.0008224290795624256,
-0.0046159978955984116,
-0.07204408198595047,
0.03838351368904114,
0.02265949174761772,
-0.010025108233094215,
-0.0477822981774807,
-0.012040679343044758,
-0.10259387642145157,
-0.04217108339071274,
0.03027876652777195,
-0.07785144448280334,
0.030683385208249092,
-0.022918812930583954,
-0.1218160018324852,
0.05982933193445206,
-0.05128441005945206,
0.033211834728717804,
-0.06824935227632523,
0.023646431043744087,
0.09319082647562027,
0.06985350698232651,
0.11401209235191345,
0.06656491011381149,
0.017080042511224747,
0.04586927965283394,
-0.0691768229007721,
0.11582962423563004,
-0.060567617416381836,
-5.713641115789869e-8,
0.049189239740371704,
0.05027545243501663,
-0.033652909100055695,
0.060265086591243744,
0.08533584326505661,
-0.00843539834022522,
0.057032495737075806,
-0.004031925927847624,
-0.0031594466418027878,
-0.037411388009786606,
0.009853597730398178,
0.05972912907600403,
-0.05027423053979874,
0.03097306191921234,
0.07298101484775543,
0.04607405886054039,
-0.028465846553444862,
0.00394099485129118,
0.011069629341363907,
-0.06082891300320625,
-0.055314045399427414,
0.0073899803683161736,
0.012445063330233097,
0.008873243816196918,
0.03600289672613144,
0.021525133401155472,
0.07851991802453995,
0.07531248778104782,
0.0261909868568182,
-0.04260048270225525,
-0.014785722829401493,
0.01664598658680916,
-0.05649193748831749,
0.10577753931283951,
-0.0035292578395456076,
0.03197024017572403,
-0.11129220575094223,
0.04388127848505974,
0.05671092867851257,
0.1103254109621048,
-0.032792214304208755,
-0.04732079431414604,
-0.055174972862005234,
0.0187225379049778,
-0.028036801144480705,
0.03284113109111786,
-0.09593917429447174,
0.009551651775836945,
-0.040880654007196426,
-0.019911469891667366,
-0.006738497409969568,
-0.033334583044052124,
-0.02952759712934494,
0.0998765230178833,
0.0050346385687589645,
0.02607029303908348,
0.024021215736865997,
-0.08199666440486908,
0.06137019395828247,
0.08272518217563629,
-0.048605434596538544,
-0.036895304918289185,
0.015110606327652931,
-0.024418869987130165
] | 0.23266
|
to the exposed IP and port: ```shell curl http://"$(minikube ip):$NODE\_PORT" ``` Every time you run the `curl` command, you will hit a different Pod. Notice that all Pods are now running the latest version (`v2`). You can also confirm the update by running the `rollout status` subcommand: ```shell kubectl rollout status deployments/kubernetes-bootcamp ``` To view the current image version of the app, run the describe pods subcommand: ```shell kubectl describe pods ``` In the `Image` field of the output, verify that you are running the latest image version (`v2`). ### Roll back an update Let’s perform another update, and try to deploy an image tagged with `v10`: ```shell kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=gcr.io/google-samples/kubernetes-bootcamp:v10 ``` Use `get deployments` to see the status of the deployment: ```shell kubectl get deployments ``` Notice that the output doesn't list the desired number of available Pods. Run the `get pods` subcommand to list all Pods: ```shell kubectl get pods ``` Notice that some of the Pods have a status of `ImagePullBackOff`. To get more insight into the problem, run the `describe pods` subcommand: ```shell kubectl describe pods ``` In the `Events` section of the output for the affected Pods, notice that the `v10` image version did not exist in the repository. To roll back the deployment to your last working version, use the `rollout undo` subcommand: ```shell kubectl rollout undo deployments/kubernetes-bootcamp ``` The `rollout undo` command reverts the deployment to the previous known state (`v2` of the image). Updates are versioned and you can revert to any previously known state of a Deployment. Use the `get pods` subcommand to list the Pods again: ```shell kubectl get pods ``` To check the image deployed on the running Pods, use the `describe pods` subcommand: ```shell kubectl describe pods ``` The Deployment is once again using a stable version of the app (`v2`). The rollback was successful. Remember to clean up your local cluster. ```shell kubectl delete deployments/kubernetes-bootcamp services/kubernetes-bootcamp ``` ## {{% heading "whatsnext" %}} \* Learn more about [Deployments](/docs/concepts/workloads/controllers/deployment/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/update/update-intro.md
|
[
0.06982322782278061,
0.020787853747606277,
0.07204081863164902,
-0.03283499553799629,
0.045072007924318314,
-0.045943472534418106,
-0.1045757606625557,
-0.028935682028532028,
0.02950427308678627,
0.07403505593538284,
0.04848337173461914,
-0.012997443787753582,
-0.01652115397155285,
-0.08037540316581726,
0.06490334868431091,
0.006368333473801613,
0.04972640797495842,
0.02237115427851677,
0.005719589535146952,
-0.03471064195036888,
-0.10245801508426666,
0.0012226495891809464,
0.015442810952663422,
-0.06449621170759201,
-0.06735240668058395,
-0.014625130221247673,
-0.050394296646118164,
0.033984869718551636,
0.020173439756035805,
-0.060942504554986954,
-0.051203615963459015,
0.01696779392659664,
-0.03600732982158661,
0.01917950250208378,
0.059427909553050995,
0.07489710301160812,
0.032762084156274796,
-0.014913350343704224,
-0.03038637340068817,
0.003598617622628808,
0.07801082730293274,
-0.06751672923564911,
-0.03549426794052124,
-0.07476702332496643,
0.01852578856050968,
0.020630495622754097,
-0.04254024475812912,
-0.055710319429636,
-0.015349079854786396,
-0.07878883183002472,
0.02111332304775715,
-0.09525611996650696,
-0.009929938241839409,
0.027254046872258186,
0.001647095661610365,
-0.020153561607003212,
-0.04560336843132973,
0.09638143330812454,
0.12228333204984665,
0.07143085449934006,
0.02629249356687069,
0.007229022681713104,
0.04204916954040527,
0.007071314845234156,
-0.06528705358505249,
-0.06998399645090103,
0.03637151047587395,
-0.05316950008273125,
0.03521071746945381,
-0.016657959669828415,
0.08573607355356216,
0.0555550642311573,
-0.08117137104272842,
-0.11876975744962692,
-0.10243094712495804,
0.019063593819737434,
0.06371014565229416,
0.05828343331813812,
-0.013298481702804565,
-0.006172505207359791,
-0.0045065609738230705,
-0.027494244277477264,
0.02036336064338684,
0.02372904308140278,
-0.11090420186519623,
-0.018732598051428795,
0.004884145222604275,
-0.06226430460810661,
0.003974585328251123,
0.012299161404371262,
-0.014832950197160244,
-0.021414518356323242,
0.02386542782187462,
-0.022314708679914474,
0.00824472401291132,
-0.023628514260053635,
0.02702631801366806,
0.060356371104717255,
-0.019129520282149315,
0.025805851444602013,
0.04827889800071716,
-0.03362179547548294,
0.016214661300182343,
-0.03157398849725723,
0.0949183776974678,
-0.010301776230335236,
0.021592766046524048,
-0.05709882080554962,
0.06401948630809784,
0.024731812998652458,
-0.006420690566301346,
0.0012744474224746227,
-0.05053548514842987,
0.017895953729748726,
-0.03918920457363129,
-0.026598356664180756,
0.031114822253584862,
0.012146553955972195,
-0.031358301639556885,
0.061034929007291794,
0.07487049698829651,
-0.07724513858556747,
0.04266366362571716,
-0.028287891298532486,
-0.10598833858966827,
0.007051374763250351,
0.05511811003088951,
1.971800856363191e-33,
0.0765952616930008,
-0.09525246918201447,
0.028844323009252548,
-0.00541636161506176,
0.03421485424041748,
-0.032103266566991806,
0.037176281213760376,
-0.02726691961288452,
-0.051068637520074844,
-0.008486420847475529,
-0.12120966613292694,
0.03234730660915375,
-0.07015253603458405,
0.029036391526460648,
-0.03820775821805,
-0.018364761024713516,
-0.08615274727344513,
0.034613288938999176,
0.09718907624483109,
0.026462456211447716,
0.013361827470362186,
-0.09592563658952713,
-0.05951804295182228,
-0.0692037045955658,
0.036131054162979126,
-0.038702379912137985,
0.09240330010652542,
-0.09758413583040237,
-0.038991156965494156,
0.011014319024980068,
0.007460690103471279,
0.00474268663674593,
0.02245349809527397,
0.012764186598360538,
-0.09638849645853043,
-0.07677921652793884,
0.04800497740507126,
0.03893539682030678,
-0.1106504425406456,
0.014863386750221252,
0.05831107497215271,
-0.02362983673810959,
-0.05142464116215706,
-0.08473333716392517,
0.12643863260746002,
0.024434026330709457,
-0.0002539089764468372,
-0.07502266764640808,
0.07463821768760681,
0.004313713405281305,
-0.05556880310177803,
-0.053809162229299545,
-0.02222534641623497,
-0.03386705741286278,
0.04484511911869049,
0.01995500735938549,
0.05868350714445114,
-0.04775644838809967,
-0.0866965726017952,
-0.050271209329366684,
0.024864153936505318,
0.0629224106669426,
-0.01526153739541769,
0.026441633701324463,
0.03336262330412865,
0.07134915143251419,
0.015086790546774864,
0.04354425519704819,
-0.018883340060710907,
0.08041255921125412,
-0.07668650895357132,
0.06064392998814583,
-0.0006978592136874795,
-0.0013842625776305795,
0.05675768107175827,
-0.06837756931781769,
-0.026837915182113647,
0.011103825643658638,
-0.05024392157793045,
0.0757213681936264,
0.052777860313653946,
-0.01011540088802576,
-0.0839753970503807,
0.049622029066085815,
-0.011014665476977825,
0.021041447296738625,
0.03059965930879116,
0.03716371953487396,
-0.028466390445828438,
0.08844942599534988,
0.03566919267177582,
0.005782917141914368,
-0.07032717019319534,
-0.028308942914009094,
-0.09921674430370331,
-4.594601871813288e-33,
0.006157910451292992,
0.005941236391663551,
-0.0022503025829792023,
0.010272199288010597,
-0.007624834775924683,
-0.028026428073644638,
0.026801807805895805,
0.0949322059750557,
-0.03786594793200493,
-0.025429096072912216,
-0.005173723213374615,
0.03256862238049507,
-0.016351334750652313,
0.0037474709097296,
-0.1334264725446701,
0.03314933180809021,
-0.08410832285881042,
-0.07853841036558151,
-0.004694040399044752,
0.011443558149039745,
-0.07739400863647461,
0.032854221761226654,
0.07803035527467728,
0.053977109491825104,
-0.03012445755302906,
-0.019754014909267426,
0.09406735748052597,
0.014823609963059425,
-0.052545707672834396,
-0.03350646421313286,
0.05585675686597824,
-0.06876371055841446,
-0.04656378552317619,
0.12442505359649658,
0.02233283221721649,
-0.008857527747750282,
0.003643972100690007,
0.0005791838048025966,
0.029200496152043343,
-0.028307301923632622,
0.013113537803292274,
-0.02588794007897377,
-0.05179722234606743,
-0.017988266423344612,
-0.010236568748950958,
-0.03927641734480858,
-0.004249455872923136,
-0.044545404613018036,
0.0015672707231715322,
-0.08034798502922058,
0.028565024957060814,
0.01275858748704195,
-0.06267248094081879,
0.14171017706394196,
-0.003121213521808386,
0.022402632981538773,
-0.03995133191347122,
0.09234113991260529,
-0.07224459946155548,
0.07342729717493057,
0.047341521829366684,
-0.099240742623806,
0.03505406901240349,
0.011773858219385147,
-0.031683553010225296,
0.03162849694490433,
-0.0176454558968544,
0.052182942628860474,
-0.05976710096001625,
0.022934051230549812,
0.02256450429558754,
0.0023172206711024046,
0.024600138887763023,
0.01761709712445736,
0.015674777328968048,
-0.013430164195597172,
0.006807898636907339,
-0.016568440943956375,
0.023409705609083176,
0.026875225827097893,
-0.036369044333696365,
0.06972666829824448,
-0.09365878254175186,
-0.025770235806703568,
0.04278251901268959,
0.059662796556949615,
0.025403879582881927,
0.048191919922828674,
0.08602923899888992,
0.014139405451714993,
0.01055814791470766,
0.03171025589108467,
-0.11516980826854706,
0.04648024961352348,
-0.03638104349374771,
-4.8152074327845185e-8,
0.08358408510684967,
0.02437349408864975,
-0.012806459330022335,
0.05206501483917236,
0.04514874890446663,
0.035199448466300964,
0.022742385044693947,
-0.04987097531557083,
-0.03570811077952385,
-0.013261429965496063,
-0.041448164731264114,
0.07686062902212143,
-0.051395148038864136,
0.07499118894338608,
0.08030138164758682,
0.009001679718494415,
-0.02749362401664257,
-0.005487256217747927,
0.09499893337488174,
-0.09687035530805588,
-0.1098092570900917,
-0.06036878004670143,
0.03294917941093445,
-0.026541275903582573,
-0.007714681793004274,
0.014376049861311913,
0.04396587610244751,
-0.017190851271152496,
0.010933753103017807,
-0.03670744597911835,
-0.01584596559405327,
0.003649668302386999,
-0.059651799499988556,
0.019314821809530258,
0.0032553968485444784,
0.024447022005915642,
-0.09558887034654617,
0.040900759398937225,
0.04225817695260048,
0.06222948804497719,
-0.02931954897940159,
-0.001967635238543153,
-0.025075888261198997,
-0.025845766067504883,
-0.00499018095433712,
0.04355835169553757,
0.04008828476071358,
0.030211320146918297,
-0.07336724549531937,
0.0010541070951148868,
0.003951330669224262,
-0.095716692507267,
0.03948582336306572,
0.060278430581092834,
0.005444809328764677,
0.021132009103894234,
-0.030033091083168983,
-0.0765739381313324,
-0.04251197725534439,
0.04452024772763252,
-0.0243724063038826,
0.02404187060892582,
0.007402217946946621,
0.06349419802427292
] | 0.039095
|
## {{% heading "objectives" %}} \* Learn what a Kubernetes cluster is. \* Learn what Minikube is. \* Start a Kubernetes cluster on your computer. ## Kubernetes Clusters {{% alert %}} \_Kubernetes is a production-grade, open-source platform that orchestrates the placement (scheduling) and execution of application containers within and across computer clusters.\_ {{% /alert %}} \*\*Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.\*\* The abstractions in Kubernetes allow you to deploy containerized applications to a cluster without tying them specifically to individual machines. To make use of this new model of deployment, applications need to be packaged in a way that decouples them from individual hosts: they need to be containerized. Containerized applications are more flexible and available than in past deployment models, where applications were installed directly onto specific machines as packages deeply integrated into the host. \*\*Kubernetes automates the distribution and scheduling of application containers across a cluster in a more efficient way.\*\* Kubernetes is an open-source platform and is production-ready. A Kubernetes cluster consists of two types of resources: \* The \*\*Control Plane\*\* coordinates the cluster \* \*\*Nodes\*\* are the workers that run applications ### Cluster Diagram {{< figure src="/docs/tutorials/kubernetes-basics/public/images/module\_01\_cluster.svg" style="width: 100%;" >}} \*\*The Control Plane is responsible for managing the cluster.\*\* The Control Plane coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates. {{% alert %}} \_Control Planes manage the cluster and the nodes that are used to host the running applications.\_ {{% /alert %}} \*\*A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster.\*\* Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes control plane. The node should also have tools for handling container operations, such as {{< glossary\_tooltip text="containerd" term\_id="containerd" >}} or {{< glossary\_tooltip term\_id="cri-o" >}}. A Kubernetes cluster that handles production traffic should have a minimum of three nodes because if one node goes down, both an [etcd](/docs/concepts/architecture/#etcd) member and a control plane instance are lost, and redundancy is compromised. You can mitigate this risk by adding more control plane nodes. When you deploy applications on Kubernetes, you tell the control plane to start the application containers. The control plane schedules the containers to run on the cluster's nodes. \*\*Node-level components, such as the kubelet, communicate with the control plane using the [Kubernetes API](/docs/concepts/overview/kubernetes-api/)\*\*, which the control plane exposes. End users can also use the Kubernetes API directly to interact with the cluster. A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. ## {{% heading "whatsnext" %}} \* Tutorial [Hello Minikube](/docs/tutorials/hello-minikube/). \* Learn more about [Cluster Architecture](/docs/concepts/architecture/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.md
|
[
0.052897002547979355,
0.03836088255047798,
0.01696842722594738,
-0.002313021570444107,
0.06111214682459831,
0.01597498171031475,
0.07034087926149368,
0.043307967483997345,
0.017235124483704567,
0.024506598711013794,
0.01124392356723547,
-0.04418028146028519,
0.036959946155548096,
-0.05539565533399582,
-0.025726819410920143,
0.044634751975536346,
0.05074264109134674,
-0.06261593103408813,
-0.09829976409673691,
-0.06416234374046326,
-0.01365349255502224,
-0.018990153446793556,
-0.04014476016163826,
-0.010660060681402683,
-0.04770248383283615,
0.031008973717689514,
-0.03976954147219658,
0.03288885951042175,
0.04611596837639809,
-0.004020886495709419,
-0.05887170508503914,
0.033400267362594604,
0.08202574402093887,
0.06485459208488464,
0.053718168288469315,
0.09121000021696091,
0.053634386509656906,
-0.03512538969516754,
-0.07497429847717285,
-0.00625620037317276,
0.024090930819511414,
-0.07963328063488007,
-0.09445469081401825,
-0.022531865164637566,
0.004046957939863205,
-0.015341756865382195,
-0.10758618265390396,
-0.12109881639480591,
-0.0722164511680603,
-0.06454663723707199,
-0.03248869627714157,
-0.0756324753165245,
-0.017066655680537224,
0.05767686665058136,
0.02010192908346653,
0.01043394859880209,
0.01556958258152008,
-0.053900737315416336,
0.10398436337709427,
-0.032614175230264664,
0.062092553824186325,
-0.014849431812763214,
0.005883142817765474,
0.04926837235689163,
0.02053374983370304,
-0.10477578639984131,
-0.01421352569013834,
0.057171303778886795,
0.03286126255989075,
-0.026639707386493683,
-0.0240183062851429,
0.042935263365507126,
-0.07892702519893646,
0.03953322395682335,
-0.029796382412314415,
-0.05383938178420067,
0.015582208521664143,
0.04530079662799835,
-0.01533848512917757,
-0.0731915682554245,
-0.03782245144248009,
0.012592023238539696,
0.03158760815858841,
0.00899079442024231,
-0.09958870708942413,
-0.029884815216064453,
-0.05413024500012398,
-0.05134856328368187,
0.04869998246431351,
-0.013249214738607407,
-0.010391080752015114,
-0.02398151531815529,
0.055746037513017654,
-0.031214693561196327,
0.045051123946905136,
0.013668754138052464,
-0.02912614680826664,
-0.07816208153963089,
0.048405859619379044,
0.0547611340880394,
0.028931787237524986,
-0.027943138033151627,
0.06028469279408455,
-0.05021171271800995,
0.020974716171622276,
-0.049794845283031464,
-0.02291126549243927,
0.017875289544463158,
0.06814568489789963,
-0.009777315892279148,
-0.041955962777137756,
0.03788158297538757,
-0.025433335453271866,
-0.02439733035862446,
0.0216144360601902,
-0.025974882766604424,
0.06516183167695999,
0.0069014765322208405,
0.08303176611661911,
0.11768271028995514,
0.023087112233042717,
-0.10361970216035843,
0.027620332315564156,
-0.027266450226306915,
0.04021209105849266,
0.046604543924331665,
-0.08312121778726578,
4.903652560955914e-33,
0.03536120057106018,
-0.06412559002637863,
-0.0033656905870884657,
-0.02276577241718769,
0.03636512532830238,
-0.09021198004484177,
-0.028767412528395653,
-0.04671693220734596,
-0.03691719099879265,
-0.03316416218876839,
-0.09821613878011703,
0.07855254411697388,
0.03099333867430687,
0.010721384547650814,
0.03595426678657532,
-0.10204635560512543,
-0.03923264890909195,
0.07562197744846344,
0.08477053046226501,
0.008245195262134075,
0.02271329052746296,
-0.010224994271993637,
-0.014045433141291142,
0.0032179043628275394,
0.061327166855335236,
-0.034604936838150024,
0.09061306715011597,
-0.07579049468040466,
-0.03896912932395935,
0.03625306487083435,
-0.002680682111531496,
-0.036520104855298996,
-0.027190323919057846,
0.04729752242565155,
-0.05018651485443115,
0.05602334812283516,
0.011553694494068623,
-0.031234482303261757,
-0.03565625846385956,
-0.06177474558353424,
-0.09555689990520477,
-0.063530832529068,
-0.037394169718027115,
-0.05855436995625496,
0.08039459586143494,
-0.009004423394799232,
0.04892672225832939,
-0.022907504811882973,
0.11529171466827393,
-0.01872243732213974,
-0.0341932587325573,
-0.03301326930522919,
0.08298692852258682,
0.009045515209436417,
0.034370213747024536,
0.03555731102824211,
0.05685923248529434,
-0.09601976722478867,
-0.02207222953438759,
0.02737349458038807,
-0.08642527461051941,
-0.03765556588768959,
-0.042763467878103256,
-0.034832101315259933,
0.02782505750656128,
-0.008707858622074127,
0.039278801530599594,
0.06822783499956131,
0.012419856153428555,
0.0341944694519043,
-0.09881099313497543,
0.028113076463341713,
0.07820343226194382,
0.014883516356348991,
-0.015038660727441311,
-0.0063260504975914955,
-0.05318698659539223,
-0.00957539863884449,
-0.09694918990135193,
0.03255132958292961,
-0.045131392776966095,
-0.02234744466841221,
-0.10394880920648575,
0.0486249215900898,
-0.03914735093712807,
-0.02053988166153431,
0.035598285496234894,
-0.026003120467066765,
-0.024176372215151787,
0.03338140994310379,
0.003211749019101262,
-0.023945538327097893,
-0.07977012544870377,
0.0293874628841877,
-0.07822737097740173,
-6.897587792274097e-33,
0.08138125389814377,
0.08300269395112991,
-0.07651632279157639,
0.012281847186386585,
0.049129877239465714,
0.008607100695371628,
-0.0034204504918307066,
0.022753983736038208,
-0.044551555067300797,
-0.05190233513712883,
-0.07964309304952621,
-0.0059050386771559715,
-0.004253334831446409,
-0.02587936259806156,
-0.11925013363361359,
0.013430516235530376,
-0.012515468522906303,
-0.040587421506643295,
-0.005228624679148197,
0.020447906106710434,
-0.04230482503771782,
0.007671067025512457,
-0.059339672327041626,
-0.0004663889412768185,
0.00217243330553174,
0.026975117623806,
-0.013293526135385036,
0.016076909378170967,
-0.02113962173461914,
0.020551342517137527,
-0.004539776127785444,
-0.09126026928424835,
-0.006309501361101866,
0.0616469532251358,
0.03512633219361305,
-0.011754292994737625,
-0.018576638773083687,
-0.05773442983627319,
0.05552687123417854,
-0.04816270247101784,
0.10772520303726196,
0.01712659001350403,
0.001827566884458065,
-0.02694256789982319,
-0.04314114525914192,
0.06952907145023346,
0.002023128094151616,
-0.012418205849826336,
-0.036053676158189774,
-0.10508670657873154,
-0.03751024231314659,
-0.056567247956991196,
-0.04520876333117485,
0.04104692488908768,
-0.07684721797704697,
0.0409080944955349,
0.034540653228759766,
0.07794667780399323,
-0.0381949320435524,
0.056352969259023666,
0.015236739069223404,
-0.13905155658721924,
0.07408659905195236,
0.05010683089494705,
-0.05039461329579353,
-0.04134015366435051,
0.07327277213335037,
0.052730709314346313,
-0.09613433480262756,
-0.022965123876929283,
0.01830417476594448,
0.007899629883468151,
0.0066046882420778275,
0.06675470620393753,
-0.062190622091293335,
-0.04380803182721138,
0.0624619796872139,
-0.005806379951536655,
-0.02115439437329769,
-0.01046506967395544,
0.003800831502303481,
0.03205510973930359,
-0.06404821574687958,
0.00618537375703454,
-0.0033570725936442614,
0.028720198199152946,
0.09228978306055069,
0.07085397094488144,
0.00827100407332182,
0.0032860836945474148,
-0.05643763765692711,
0.11624225974082947,
0.03619168698787689,
0.12608356773853302,
-0.04345427453517914,
-4.667401398705806e-8,
0.012158600613474846,
-0.02410568855702877,
-0.00004327049828134477,
0.013379480689764023,
-0.007554049137979746,
0.019694596529006958,
0.029885761439800262,
-0.008016816340386868,
-0.03691316023468971,
0.022739741951227188,
-0.009913096204400063,
0.06515628844499588,
-0.0849042534828186,
-0.005593383219093084,
0.04955016449093819,
0.03761383146047592,
-0.01988438330590725,
0.01431974209845066,
0.02611255645751953,
-0.08252426236867905,
0.015490701422095299,
-0.01336753461509943,
-0.00856773741543293,
0.013901542872190475,
0.008735536597669125,
0.04851766675710678,
0.06012381240725517,
0.08087988942861557,
0.005612298380583525,
-0.026164621114730835,
-0.016820499673485756,
0.06631096452474594,
-0.097823366522789,
0.07888677716255188,
-0.023613905534148216,
0.09759117662906647,
-0.07203803956508636,
0.028517423197627068,
0.043008510023355484,
0.08233574777841568,
-0.02010343223810196,
-0.011433744803071022,
-0.06447053700685501,
-0.033197030425071716,
0.022241491824388504,
0.06337256729602814,
-0.0742865651845932,
0.023009872063994408,
-0.04199637845158577,
-0.015294548124074936,
-0.00651554437354207,
-0.043157707899808884,
-0.010347196832299232,
0.09665483236312866,
-0.030358124524354935,
0.05180015787482262,
-0.016910919919610023,
-0.08433568477630615,
0.09305703639984131,
0.052325040102005005,
-0.027448242530226707,
0.13025251030921936,
0.009189104661345482,
0.001955516869202256
] | 0.269765
|
## {{% heading "objectives" %}} \* Learn about Kubernetes Pods. \* Learn about Kubernetes Nodes. \* Troubleshoot deployed applications. ## Kubernetes Pods {{% alert %}} \_A Pod is a group of one or more application containers (such as Docker) and includes shared storage (volumes), IP address and information about how to run them.\_ {{% /alert %}} When you created a Deployment in [Module 2](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/), Kubernetes created a \*\*Pod\*\* to host your application instance. A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker), and some shared resources for those containers. Those resources include: \* Shared storage, as Volumes \* Networking, as a unique cluster IP address \* Information about how to run each container, such as the container image version or specific ports to use A Pod models an application-specific "logical host" and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node. Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster. ### Pods overview {{< figure src="/docs/tutorials/kubernetes-basics/public/images/module\_03\_pods.svg" class="diagram-medium" >}} {{% alert %}} \_Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk.\_ {{% /alert %}} ## Nodes A Pod always runs on a \*\*Node\*\*. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the control plane. A Node can have multiple pods, and the Kubernetes control plane automatically handles scheduling the pods across the Nodes in the cluster. The control plane's automatic scheduling takes into account the available resources on each Node. Every Kubernetes Node runs at least: \* Kubelet, a process responsible for communication between the Kubernetes control plane and the Node; it manages the Pods and the containers running on a machine. \* A container runtime (like Docker) responsible for pulling the container image from a registry, unpacking the container, and running the application. ### Nodes overview {{< figure src="/docs/tutorials/kubernetes-basics/public/images/module\_03\_nodes.svg" class="diagram-medium" >}} ## Troubleshooting with kubectl In [Module 2](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/), you used the kubectl command-line interface. You'll continue to use it in Module 3 to get information about deployed applications and their environments. The most common operations can be done with the following kubectl subcommands: \* `kubectl get` - list resources \* `kubectl describe` - show detailed information about a resource \* `kubectl logs` - print the logs from a container in a pod \* `kubectl exec` - execute a command on a container in a pod You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are. Now that we know more about our cluster components and the command line, let's explore our application. ### Check application configuration Let's verify that the application we deployed in the previous scenario is running. We'll use the `kubectl get`
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/explore/explore-intro.md
|
[
0.06908393651247025,
0.010514569468796253,
0.03072470985352993,
0.015909114852547646,
0.032316628843545914,
-0.04278336465358734,
0.061818525195121765,
0.014475482515990734,
0.04259755089879036,
0.017639312893152237,
0.01889532059431076,
-0.0649728775024414,
0.042013417929410934,
-0.04948684945702553,
0.02166593074798584,
0.05110331252217293,
0.05133037269115448,
-0.018671682104468346,
-0.048902083188295364,
0.027380796149373055,
0.0017783227376639843,
0.08109889179468155,
0.019144995138049126,
0.02640852890908718,
-0.07785553485155106,
0.04375176876783371,
-0.04259592667222023,
0.028125189244747162,
0.02173001319169998,
-0.02872081845998764,
-0.037448443472385406,
0.02875395677983761,
0.021099738776683807,
0.07375257462263107,
0.1163802370429039,
0.10916683077812195,
0.062023259699344635,
-0.06920116394758224,
-0.055894285440444946,
-0.02430691197514534,
0.04657841473817825,
-0.0689670741558075,
-0.09736846387386322,
-0.019089987501502037,
-0.04045380279421806,
-0.026593251153826714,
-0.045020267367362976,
-0.08578675240278244,
-0.01254537608474493,
-0.01726546511054039,
-0.00438174931332469,
-0.0831882581114769,
0.019902842119336128,
-0.014738660305738449,
0.05269478261470795,
0.024924980476498604,
-0.016709182411432266,
0.039969995617866516,
0.08481141924858093,
0.014970521442592144,
0.05991240590810776,
0.020676251500844955,
0.018279438838362694,
0.0010110621806234121,
0.0029631350189447403,
-0.082235187292099,
-0.054364848881959915,
0.019120605662465096,
0.052807994186878204,
-0.04347473010420799,
0.0100264772772789,
0.05213338881731033,
-0.036414116621017456,
-0.025778884068131447,
-0.04903767257928848,
-0.027524316683411598,
0.019067568704485893,
0.07505638897418976,
-0.013901844620704651,
-0.0722472220659256,
0.02381543442606926,
0.02750985138118267,
0.023551156744360924,
-0.01599232107400894,
-0.10780893266201019,
-0.06517022848129272,
-0.02609497494995594,
-0.038002025336027145,
0.028003200888633728,
0.013674618676304817,
0.013767590746283531,
-0.0868026465177536,
0.04900354519486427,
-0.054912060499191284,
0.09045296162366867,
0.01864021271467209,
-0.05667879432439804,
-0.037534598261117935,
0.01671665348112583,
0.030224205926060677,
0.021094316616654396,
-0.022034112364053726,
0.006504261866211891,
-0.03688455745577812,
0.0921969786286354,
-0.05269007757306099,
-0.06620633602142334,
-0.02831888757646084,
0.030491597950458527,
-0.000017672897229203954,
-0.00013689791376236826,
0.006794495042413473,
-0.048669714480638504,
0.016438951715826988,
0.02491009794175625,
-0.01366864051669836,
0.010256609879434109,
0.028045421466231346,
0.0482516847550869,
0.11393661051988602,
0.046004507690668106,
-0.13207119703292847,
0.04715588688850403,
-0.003528604982420802,
-0.024996712803840637,
0.015865033492445946,
-0.07777729630470276,
4.0982368925511e-33,
0.033699601888656616,
-0.1199173852801323,
-0.039191074669361115,
0.08673739433288574,
0.05275442451238632,
-0.0703577920794487,
-0.011830194853246212,
-0.0064146616496145725,
-0.0355432964861393,
-0.023605873808264732,
-0.09223795682191849,
0.0929105132818222,
0.020739851519465446,
0.014668149873614311,
-0.007644969969987869,
-0.054756663739681244,
-0.08406645059585571,
0.07496853172779083,
0.10166943818330765,
-0.02781948633491993,
0.015402339398860931,
-0.020144788548350334,
-0.03869224712252617,
0.03175723925232887,
0.06743208318948746,
-0.010976317338645458,
0.05850301310420036,
-0.10562484711408615,
-0.026538198813796043,
0.039463695138692856,
-0.021942978724837303,
0.01356850378215313,
0.04686369001865387,
-0.00025990058202296495,
-0.07378411293029785,
-0.0053329444490373135,
0.0341930016875267,
0.015874486416578293,
-0.09452490508556366,
-0.01687403954565525,
-0.04144129902124405,
-0.02972555346786976,
-0.04557193070650101,
-0.057623475790023804,
0.03393537923693657,
-0.04420221969485283,
0.040106017142534256,
-0.02848462015390396,
0.08135909587144852,
0.010637170635163784,
-0.02651093900203705,
-0.06718140095472336,
0.05877668783068657,
0.014371595345437527,
0.02747972309589386,
-0.02483317069709301,
0.04365672543644905,
-0.07096919417381287,
-0.048525650054216385,
-0.025672897696495056,
-0.09276323020458221,
0.018347563222050667,
-0.05103033781051636,
-0.00630545848980546,
0.02933981455862522,
0.047510791569948196,
-0.01623504050076008,
0.05501168593764305,
-0.0006965660722926259,
0.11451676487922668,
-0.08418753743171692,
0.03506682440638542,
0.004541775677353144,
-0.0006933262338861823,
-0.036688778549432755,
-0.0606173612177372,
-0.013257445767521858,
0.023186109960079193,
-0.1215946301817894,
0.04244783893227577,
-0.01718812622129917,
0.013347519561648369,
-0.07520393282175064,
0.06658300012350082,
-0.09196608513593674,
-0.05742206797003746,
0.02909940853714943,
0.012445398606359959,
-0.0711783766746521,
0.04817579314112663,
0.04170336574316025,
-0.0016796458512544632,
-0.11295676231384277,
-0.018807051703333855,
-0.09906209260225296,
-7.33574743407135e-33,
0.09013725817203522,
0.07988592237234116,
-0.07997363805770874,
-0.05606886371970177,
0.023412643000483513,
-0.00010850742546608672,
0.024861767888069153,
0.03548770397901535,
-0.030382530763745308,
-0.0510103665292263,
-0.07868804037570953,
0.010135732591152191,
0.033124279230833054,
0.04861791431903839,
-0.1389198899269104,
0.024755747988820076,
-0.08162373304367065,
-0.03009275533258915,
0.00883516389876604,
0.02090129628777504,
-0.08392618596553802,
0.03701313957571983,
0.042934954166412354,
0.024877162650227547,
-0.04694606363773346,
-0.009953740052878857,
0.013898618519306183,
0.004626716487109661,
-0.002651419024914503,
-0.0027941614389419556,
0.009329043328762054,
-0.05453416705131531,
0.014883967116475105,
0.052795760333538055,
-0.005388051737099886,
-0.006694167386740446,
-0.04410574585199356,
-0.032618455588817596,
0.05010687932372093,
-0.059853602200746536,
0.07429881393909454,
0.02278905361890793,
-0.018097035586833954,
-0.01786985993385315,
-0.06769169867038727,
0.007604492362588644,
0.05815583094954491,
0.006553460843861103,
0.0016277512768283486,
-0.11492634564638138,
-0.020526576787233353,
-0.05860365554690361,
-0.053028129041194916,
0.06898384541273117,
-0.060453150421381,
0.04820447415113449,
0.03215586766600609,
0.07997676730155945,
-0.05970939248800278,
0.08289123326539993,
0.10121084004640579,
-0.09291806071996689,
0.043009497225284576,
0.013228362426161766,
-0.07941129058599472,
-0.0866420790553093,
-0.00015944770711939782,
0.01762399636209011,
-0.05054647848010063,
0.03431688994169235,
-0.014310577884316444,
0.007334788795560598,
0.014554240740835667,
0.05891641974449158,
-0.059930894523859024,
-0.011563447304069996,
0.026940226554870605,
-0.012303648516535759,
0.04007270559668541,
0.017165200784802437,
-0.033538658171892166,
0.07482489198446274,
-0.1056685522198677,
-0.00925053283572197,
0.007077791262418032,
0.014712976291775703,
0.09338626265525818,
0.11638505756855011,
0.03509078174829483,
0.03755959868431091,
0.016156945377588272,
0.06930810958147049,
-0.04101292043924332,
0.10514447838068008,
-0.0673450231552124,
-5.494755939139395e-8,
0.03778994455933571,
0.009893044829368591,
-0.021675381809473038,
0.02212817221879959,
-0.021347206085920334,
0.010773378424346447,
0.07425370067358017,
0.014730311930179596,
-0.016413886100053787,
-0.008810365572571754,
-0.09757918119430542,
0.07389896363019943,
-0.12709157168865204,
-0.007684181910008192,
0.010209193453192711,
-0.005178708117455244,
-0.04376913234591484,
0.027127228677272797,
0.01274438388645649,
-0.09677490592002869,
-0.029730357229709625,
-0.060622695833444595,
-0.012197459116578102,
-0.00020707387011498213,
0.00899621844291687,
0.07483819127082825,
0.024595091119408607,
-0.003351303981617093,
-0.0012738186633214355,
-0.03196343034505844,
0.012736352160573006,
0.008335861377418041,
-0.0756622701883316,
0.059174973517656326,
-0.033663004636764526,
0.0848485678434372,
-0.08643356710672379,
0.02123177982866764,
0.07083557546138763,
0.06793373078107834,
-0.07683935761451721,
-0.01222554873675108,
-0.0349305160343647,
-0.018202856183052063,
0.008599593304097652,
0.07932913303375244,
-0.03224383667111397,
0.04424070194363594,
-0.05663874372839928,
-0.0058480557054281235,
0.0006717958603985608,
-0.04525566101074219,
-0.0271206833422184,
0.06774962693452835,
-0.013452967628836632,
0.06085915490984917,
-0.015851521864533424,
-0.03454248234629631,
0.05743531882762909,
0.01977873593568802,
-0.004221309442073107,
0.07568888366222382,
0.001466928399167955,
-0.01150418072938919
] | 0.190843
|
statuses are, where they are running and what their configurations are. Now that we know more about our cluster components and the command line, let's explore our application. ### Check application configuration Let's verify that the application we deployed in the previous scenario is running. We'll use the `kubectl get` command and look for existing Pods: ```shell kubectl get pods ``` If no pods are running, please wait a couple of seconds and list the Pods again. You can continue once you see one Pod running. Next, to view what containers are inside that Pod and what images are used to build those containers we run the `kubectl describe pods` command: ```shell kubectl describe pods ``` We see here details about the Pod’s container: IP address, the ports used and a list of events related to the lifecycle of the Pod. The output of the `describe` subcommand is extensive and covers some concepts that we didn’t explain yet, but don’t worry, they will become familiar by the end of this tutorial. {{< note >}} The `describe` subcommand can be used to get detailed information about most of the Kubernetes primitives, including Nodes, Pods, and Deployments. The describe output is designed to be human readable, not to be scripted against. {{< /note >}} ### Show the app in the terminal Recall that Pods are running in an isolated, private network - so we need to proxy access to them so we can debug and interact with them. To do this, we'll use the `kubectl proxy` command to run a proxy in a \*\*second terminal\*\*. Open a new terminal window, and in that new terminal, run: ```shell kubectl proxy ``` Now again, we'll get the Pod name and query that pod directly through the proxy. To get the Pod name and store it in the `POD\_NAME` environment variable: ```shell export POD\_NAME="$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')" echo Name of the Pod: $POD\_NAME ``` To see the output of our application, run a `curl` request: ```shell curl http://localhost:8001/api/v1/namespaces/default/pods/$POD\_NAME:8080/proxy/ ``` The URL is the route to the API of the Pod. {{< note >}} We don't need to specify the container name, because we only have one container inside the pod. {{< /note >}} ### Executing commands on the container We can execute commands directly on the container once the Pod is up and running. For this, we use the `exec` subcommand and use the name of the Pod as a parameter. Let’s list the environment variables: ```shell kubectl exec "$POD\_NAME" -- env ``` Again, it's worth mentioning that the name of the container itself can be omitted since we only have a single container in the Pod. Next let’s start a bash session in the Pod’s container: ```shell kubectl exec -ti $POD\_NAME -- bash ``` We have now an open console on the container where we run our NodeJS application. The source code of the app is in the `server.js` file: ```shell cat server.js ``` You can check that the application is up by running a curl command: ```shell curl http://localhost:8080 ``` {{< note >}} Here we used `localhost` because we executed the command inside the NodeJS Pod. If you cannot connect to `localhost:8080`, check to make sure you have run the `kubectl exec` command and are launching the command from within the Pod. {{< /note >}} To close your container connection, type `exit`. ## {{% heading "whatsnext" %}} \* Tutorial [Using A Service To Expose Your App](/docs/tutorials/kubernetes-basics/expose/expose-intro/). \* Learn more about [Pods](/docs/concepts/workloads/pods/). \* Learn more about [Nodes](/docs/concepts/architecture/nodes/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/explore/explore-intro.md
|
[
0.01861703395843506,
0.007584500592201948,
0.04008379951119423,
0.017704768106341362,
0.06885690242052078,
-0.06104685366153717,
-0.016113512217998505,
-0.014278696849942207,
0.04401589557528496,
0.01970793306827545,
0.01444441918283701,
-0.03512068837881088,
-0.0155557282269001,
-0.05809294432401657,
0.012019210495054722,
-0.031486593186855316,
0.06579188257455826,
-0.06368466466665268,
-0.03937823697924614,
-0.06909951567649841,
0.0047227321192622185,
0.020710788667201996,
0.0007018743781372905,
-0.016952548176050186,
-0.07879646122455597,
0.07746495306491852,
-0.05402743071317673,
-0.030443459749221802,
0.007374572567641735,
-0.05848834663629532,
-0.06248705834150314,
0.06412579864263535,
0.038713619112968445,
0.05799229070544243,
0.0906602144241333,
0.11603791266679764,
0.07477620244026184,
-0.06125238537788391,
-0.04405934736132622,
-0.03428655490279198,
0.04972404986619949,
-0.09057460725307465,
-0.05282632261514664,
0.0010546481935307384,
-0.027275094762444496,
-0.014867258258163929,
-0.08713512122631073,
-0.12843476235866547,
-0.005147020798176527,
-0.0550374872982502,
-0.03172395005822182,
-0.07811363786458969,
0.03736532852053642,
0.01521365437656641,
0.08855598419904709,
0.06422460079193115,
-0.03251877427101135,
0.025493744760751724,
0.09638869762420654,
0.02950378693640232,
0.057321079075336456,
-0.02046450972557068,
0.0030538486316800117,
0.030114831402897835,
0.035345349460840225,
-0.027367884293198586,
0.0014665594790130854,
0.0068578762002289295,
0.09876749664545059,
-0.07253295183181763,
-0.0017358295153826475,
0.04232711344957352,
-0.010236596688628197,
-0.03556773066520691,
-0.0823415145277977,
-0.0028152873273938894,
0.012948933988809586,
0.03166154772043228,
-0.01247386448085308,
-0.07659494131803513,
-0.020345762372016907,
0.05407259985804558,
0.009557659737765789,
0.009003302082419395,
-0.08337538689374924,
0.0468301996588707,
0.01778491586446762,
-0.07409776002168655,
0.029596757143735886,
0.012311436235904694,
-0.031032558530569077,
-0.07688836753368378,
0.006618609186261892,
-0.04921901971101761,
0.03280464932322502,
0.03433171287178993,
-0.00045734565355814993,
-0.008041063323616982,
0.016360849142074585,
0.01905358023941517,
0.05461496859788895,
0.012136646546423435,
0.055580493062734604,
-0.06873559206724167,
0.03171030059456825,
-0.07655547559261322,
-0.09361616522073746,
-0.014232775196433067,
0.07016664743423462,
0.0793200358748436,
-0.04028870537877083,
-0.021559778600931168,
-0.052391134202480316,
0.044819608330726624,
-0.04059979319572449,
-0.01353547628968954,
0.0011626963969320059,
0.02370387502014637,
0.0068572089076042175,
0.04689234867691994,
0.08791637420654297,
-0.07470403611660004,
0.05352042615413666,
-0.012179882265627384,
-0.03598995879292488,
0.006415652111172676,
-0.04978456348180771,
2.0217037139624664e-33,
0.08487463742494583,
-0.1440686136484146,
0.01861424371600151,
0.0625428780913353,
0.04752841591835022,
-0.044664159417152405,
-0.012418035417795181,
-0.006000599358230829,
-0.03307143971323967,
0.015407957136631012,
-0.050933487713336945,
0.09262645244598389,
-0.05543570592999458,
0.053663454949855804,
-0.01172505971044302,
-0.06949516385793686,
-0.07042394578456879,
0.06544428318738937,
0.00423226086422801,
-0.030241690576076508,
0.005762700457125902,
0.001867351122200489,
-0.06110658496618271,
0.00915148202329874,
0.08323409408330917,
0.011509419418871403,
0.016350748017430305,
-0.10154043138027191,
-0.004527756478637457,
0.03366076946258545,
-0.014149182476103306,
0.0020467385184019804,
-0.012802799232304096,
0.024103865027427673,
-0.09194128960371017,
-0.012681960128247738,
-0.0019386406056582928,
-0.02125874161720276,
-0.08888168632984161,
-0.05925290286540985,
0.018331868574023247,
-0.04637666046619415,
-0.06285568326711655,
-0.03976297378540039,
0.06828659027814865,
-0.04321613162755966,
0.0024451720528304577,
-0.05043270066380501,
0.04134875163435936,
0.020016007125377655,
-0.0023675363045185804,
-0.021119587123394012,
0.028360756114125252,
-0.03996114805340767,
0.025157591328024864,
0.013439236208796501,
0.057132020592689514,
-0.019694626331329346,
-0.04171661287546158,
0.021828511729836464,
-0.02988845482468605,
0.05613177269697189,
-0.038950115442276,
0.01430410798639059,
0.014263981021940708,
0.08596693724393845,
-0.035540446639060974,
0.05347611755132675,
0.009241246618330479,
0.0870518907904625,
-0.06671909242868423,
0.04800280183553696,
0.0007684524171054363,
0.02796139009296894,
-0.014225454069674015,
-0.04075830057263374,
-0.02925928123295307,
0.0195834431797266,
-0.15378911793231964,
0.045161232352256775,
0.043542083352804184,
-0.024475349113345146,
-0.10645804554224014,
0.09802030771970749,
-0.027996594086289406,
0.005407495424151421,
0.03974972292780876,
-0.04143793135881424,
-0.0734647661447525,
0.04194095358252525,
0.010187309235334396,
0.026100751012563705,
-0.0896385908126831,
0.00236905412748456,
-0.10194453597068787,
-5.48303389000905e-33,
0.10525283217430115,
0.011538458056747913,
-0.03361334279179573,
-0.024397211149334908,
-0.051060013473033905,
-0.022359861060976982,
-0.03865199163556099,
0.058092352002859116,
-0.021993348374962807,
-0.07302383333444595,
-0.03217332437634468,
0.023443549871444702,
0.006059383042156696,
0.01220112107694149,
-0.14927010238170624,
0.04878159984946251,
-0.03888244181871414,
-0.08848913758993149,
-0.02296057902276516,
0.05591507628560066,
-0.07377099990844727,
0.04996291175484657,
0.053531091660261154,
0.039492249488830566,
-0.056594979017972946,
0.010297474451363087,
0.0957987904548645,
-0.04568089172244072,
-0.06254295259714127,
-0.057453181594610214,
0.046274103224277496,
-0.09425384551286697,
-0.034045346081256866,
0.09200304746627808,
0.010112051852047443,
-0.035614628344774246,
-0.02321896329522133,
0.01793443039059639,
0.03185298666357994,
-0.06994271278381348,
0.048325393348932266,
0.03728891536593437,
-0.06002598628401756,
-0.01071241032332182,
-0.07907939702272415,
-0.014781483449041843,
0.014109919779002666,
0.004096391145139933,
-0.008247779682278633,
-0.07905879616737366,
0.01850179210305214,
-0.027448810636997223,
-0.05282790586352348,
0.07868491858243942,
-0.047626812011003494,
0.03319599851965904,
-0.050236087292432785,
0.0723579153418541,
-0.02634740062057972,
0.013546664267778397,
0.06359962373971939,
-0.07463664561510086,
0.02104511484503746,
0.03973427042365074,
-0.026518601924180984,
-0.05949291214346886,
-0.019341032952070236,
0.002051288727670908,
-0.03659267723560333,
0.013880789279937744,
0.10110459476709366,
-0.01599004678428173,
-0.023402752354741096,
0.038045525550842285,
0.0067062112502753735,
-0.038546379655599594,
-0.000055186399549711496,
-0.06454727053642273,
0.012607534416019917,
0.035806335508823395,
-0.05840114504098892,
0.08230110257863998,
-0.05862405523657799,
-0.002617647172883153,
0.05223412439227104,
0.048602089285850525,
0.05261755362153053,
0.09476654976606369,
0.09514757990837097,
0.05294765532016754,
0.014895166270434856,
0.03450266271829605,
-0.1047670915722847,
0.1316939890384674,
-0.032691530883312225,
-5.339229858236649e-8,
0.06763084977865219,
-0.01662677899003029,
-0.02276342734694481,
0.011314285919070244,
0.057535503059625626,
0.016873996704816818,
0.03381488844752312,
0.019427284598350525,
-0.03658429905772209,
-0.008806167170405388,
-0.02036520093679428,
0.027472883462905884,
-0.1438920646905899,
0.029744386672973633,
0.0933481901884079,
0.02733795903623104,
-0.006053990218788385,
0.0495188944041729,
-0.00222893338650465,
-0.05078522861003876,
-0.07625672966241837,
-0.06565701961517334,
0.013647651299834251,
0.0500866174697876,
-0.009480491280555725,
0.05394292622804642,
0.0689074918627739,
0.013645399361848831,
-0.015784891322255135,
0.00349739589728415,
-0.01561051420867443,
0.04142128303647041,
-0.01685890555381775,
0.0234422255307436,
0.014766653999686241,
0.07913633435964584,
-0.11524394899606705,
0.017215752974152565,
0.050232160836458206,
0.04430551081895828,
-0.048080261796712875,
-0.033969391137361526,
-0.04687149450182915,
0.020656421780586243,
0.0006645962130278349,
0.04745083674788475,
0.0005155745311640203,
0.051597435027360916,
-0.045640189200639725,
-0.021879278123378754,
-0.03439125791192055,
-0.04718639701604843,
0.009558690711855888,
0.10466136783361435,
-0.044533804059028625,
0.05917138233780861,
-0.005243699066340923,
-0.05009216442704201,
0.05497109889984131,
0.0520901121199131,
0.006400410085916519,
0.03227581828832626,
0.01601918414235115,
0.049260515719652176
] | 0.266658
|
within the Pod. {{< /note >}} To close your container connection, type `exit`. ## {{% heading "whatsnext" %}} \* Tutorial [Using A Service To Expose Your App](/docs/tutorials/kubernetes-basics/expose/expose-intro/). \* Learn more about [Pods](/docs/concepts/workloads/pods/). \* Learn more about [Nodes](/docs/concepts/architecture/nodes/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/explore/explore-intro.md
|
[
0.0912662148475647,
0.06736026704311371,
0.03536296635866165,
0.03322484716773033,
0.03796127811074257,
0.016578231006860733,
-0.0038137095980346203,
0.014285581186413765,
0.03268498554825783,
0.059878844767808914,
-0.029764745384454727,
-0.021136345341801643,
-0.04387202858924866,
-0.049673669040203094,
0.03777546063065529,
-0.013558978214859962,
0.008081584237515926,
0.022512564435601234,
0.0327933207154274,
-0.01962425746023655,
0.04621061310172081,
0.0669722631573677,
0.05492636561393738,
0.0012053465470671654,
-0.09195524454116821,
0.05465403199195862,
-0.04337039217352867,
-0.042988549917936325,
0.030181538313627243,
-0.008714515715837479,
-0.03635995462536812,
-0.007619521114975214,
-0.01569301448762417,
0.038491494953632355,
0.03510773926973343,
0.09682734310626984,
0.04987188056111336,
-0.034875188022851944,
-0.004573639016598463,
0.0002929895999841392,
0.04369430989027023,
-0.03530865162611008,
-0.1589178889989853,
0.02029859460890293,
0.005552549380809069,
-0.0025680784601718187,
-0.09372466057538986,
-0.11657136678695679,
0.043534353375434875,
0.00852865632623434,
-0.02965399995446205,
-0.11614491790533066,
0.08349649608135223,
0.05719849467277527,
0.05803154036402702,
0.04229166358709335,
0.02496268041431904,
0.033024419099092484,
0.029179168865084648,
0.04773128777742386,
0.08952576667070389,
-0.010673454962670803,
-0.02092895098030567,
0.0017394570168107748,
0.057205382734537125,
-0.012669227086007595,
-0.027018209919333458,
0.08331725001335144,
0.014265883713960648,
-0.04712023213505745,
0.07075284421443939,
0.014152249321341515,
-0.03693418204784393,
-0.04724964126944542,
0.009388738311827183,
-0.05923681706190109,
0.010372578166425228,
-0.004404609091579914,
-0.04172850400209427,
0.056668125092983246,
0.0417538657784462,
0.03275385871529579,
0.015005418099462986,
-0.0009556669974699616,
-0.09254106134176254,
0.0448327474296093,
0.0255222637206316,
-0.05630350857973099,
0.03391267731785774,
-0.02200203575193882,
-0.06821654736995697,
-0.0677114948630333,
0.02656090445816517,
-0.08404750376939774,
0.011889699846506119,
0.029308073222637177,
-0.05697379633784294,
0.01901630125939846,
0.004996618255972862,
-0.002506287768483162,
0.081057108938694,
-0.04519025236368179,
-0.001004246762022376,
-0.004909905605018139,
0.05437153950333595,
-0.02187785878777504,
-0.04380416125059128,
0.00874932948499918,
0.030924184247851372,
0.0385240837931633,
0.0018845860613510013,
0.012800765223801136,
-0.059771500527858734,
0.048297442495822906,
-0.027811504900455475,
-0.015159445814788342,
-0.002257548039779067,
0.0519094243645668,
0.050017841160297394,
0.08486201614141464,
0.11913030594587326,
-0.06355101615190506,
-0.06622632592916489,
0.02530800737440586,
-0.059076711535453796,
-0.004130007233470678,
-0.04346880316734314,
-3.755437393254381e-33,
0.0430261492729187,
-0.11643330752849579,
-0.0316818542778492,
0.037899140268564224,
0.06070663034915924,
-0.08235298842191696,
0.01455229613929987,
0.02205802872776985,
-0.017531532794237137,
0.021526699885725975,
-0.05446964129805565,
0.01822834275662899,
-0.0032160498667508364,
-0.000728870218154043,
-0.049826204776763916,
-0.08880065381526947,
-0.08325900137424469,
0.04353034868836403,
0.07315875589847565,
-0.05200758948922157,
0.042149439454078674,
-0.07625334709882736,
-0.044019605964422226,
0.03894365578889847,
0.08468833565711975,
0.026588236913084984,
0.03923512622714043,
-0.11772093921899796,
-0.006663758773356676,
0.024405155330896378,
-0.02640046924352646,
-0.04639497026801109,
0.06355655938386917,
0.04327904433012009,
-0.11232896149158478,
-0.01896013133227825,
0.004453266505151987,
0.05212946981191635,
-0.0566021166741848,
-0.07385209202766418,
0.017203988507390022,
-0.042658910155296326,
-0.08236008882522583,
0.0011689122766256332,
0.02432693913578987,
-0.05302226170897484,
0.09195660054683685,
-0.04554636776447296,
0.0453195795416832,
-0.005574214272201061,
-0.04661404341459274,
-0.10137011855840683,
-0.006703565362840891,
-0.02765326015651226,
0.038591522723436356,
0.0132913151755929,
0.02409551292657852,
-0.032736774533987045,
-0.08994834870100021,
-0.046768669039011,
-0.0828859731554985,
0.021507790312170982,
0.036751650273799896,
-0.04049773886799812,
-0.023666780441999435,
0.026759015396237373,
-0.05542061850428581,
0.024110808968544006,
0.031514670699834824,
0.029253441840410233,
-0.13953065872192383,
0.06265303492546082,
-0.020364750176668167,
0.03259778395295143,
-0.07618191838264465,
-0.02217576652765274,
-0.04294428601861,
0.028572581708431244,
-0.035902805626392365,
0.0809270516037941,
0.11505959182977676,
0.0002990536449942738,
-0.04888100549578667,
0.09867173433303833,
0.04408205673098564,
-0.028946474194526672,
0.04559185355901718,
-0.0017860132502391934,
-0.036813195794820786,
0.03336750343441963,
-0.0322609543800354,
-0.022472728043794632,
-0.06345031410455704,
-0.020070180296897888,
-0.10797367244958878,
4.130043381961451e-34,
0.10191871970891953,
-0.0006960877799428999,
-0.03553857281804085,
0.0007340396987274289,
-0.033374302089214325,
0.0028218431398272514,
0.06103619560599327,
0.05747716873884201,
-0.03619991987943649,
-0.022667385637760162,
-0.013465308584272861,
0.013821118511259556,
0.046933356672525406,
0.06059541925787926,
-0.09302982687950134,
0.05156753584742546,
-0.025679390877485275,
0.0074479663744568825,
-0.045041657984256744,
0.008369083516299725,
-0.1183725968003273,
-0.06608132272958755,
0.07877034693956375,
0.0028378062415868044,
-0.010462353937327862,
-0.06254652142524719,
0.08302494138479233,
0.008612453937530518,
-0.03957661613821983,
-0.05032315477728844,
0.04523029178380966,
-0.09385933727025986,
0.05050361156463623,
0.04318836331367493,
0.008338146843016148,
0.030053487047553062,
-0.05536632612347603,
-0.023155001923441887,
0.04758777841925621,
-0.028295211493968964,
0.07396438717842102,
0.005665491800755262,
-0.048108432441949844,
-0.046801138669252396,
-0.06339141726493835,
0.018525587394833565,
-0.04189436510205269,
-0.0129531379789114,
-0.04011550918221474,
-0.07846443355083466,
-0.001450885203666985,
-0.045972637832164764,
-0.06344874948263168,
0.0062455530278384686,
-0.04268253967165947,
0.05438445508480072,
0.0485338531434536,
0.11156266927719116,
-0.021751366555690765,
-0.03328440710902214,
0.09552846103906631,
-0.07256612181663513,
0.03107239119708538,
0.017591822892427444,
0.004165042657405138,
-0.09935606271028519,
-0.05551177263259888,
0.06006324291229248,
-0.04840770363807678,
-0.0023866319097578526,
-0.010230515152215958,
0.03402178734540939,
0.021538959816098213,
0.07146086543798447,
-0.0021011640783399343,
-0.008283257484436035,
-0.010919899679720402,
-0.07003827393054962,
0.05891958624124527,
0.02091362699866295,
0.031777963042259216,
0.08010601252317429,
-0.06483980268239975,
-0.005469799507409334,
0.08779850602149963,
0.0652318149805069,
0.042757466435432434,
0.0761018618941307,
-0.02438529208302498,
0.04297251999378204,
-0.03125954419374466,
0.07993973046541214,
-0.019602052867412567,
0.06613009423017502,
-0.048811960965394974,
-4.495844407870209e-8,
0.02573508583009243,
-0.016153819859027863,
0.06485559046268463,
0.025632964447140694,
-0.010850567370653152,
0.027196723967790604,
0.05081829056143761,
0.06542069464921951,
-0.016989534720778465,
0.014068898744881153,
-0.041266027837991714,
0.034781862050294876,
-0.10502779483795166,
0.052673839032649994,
0.03304645046591759,
-0.05389273166656494,
0.019600803032517433,
0.07691167294979095,
0.05068453401327133,
-0.07635027170181274,
-0.0347839817404747,
-0.034680478274822235,
-0.009201372973620892,
0.013462645933032036,
0.031952496618032455,
0.05816778913140297,
0.052147794514894485,
0.0037089514080435038,
0.012986252084374428,
-0.11093105375766754,
0.006187652703374624,
-0.006039424799382687,
-0.08622562140226364,
0.05034268647432327,
-0.03800192475318909,
0.12114657461643219,
-0.06592640280723572,
0.04266103729605675,
0.00803395826369524,
0.07128597795963287,
-0.01990840584039688,
-0.01745050586760044,
-0.04716768115758896,
0.0034959116019308567,
-0.06644529849290848,
0.05096099525690079,
0.04433474689722061,
0.05943531170487404,
-0.013647145591676235,
0.008632381446659565,
0.014928674325346947,
-0.06766979396343231,
-0.008830676786601543,
-0.0005308823310770094,
-0.051550619304180145,
-0.004459656309336424,
0.025135857984423637,
-0.04944430664181709,
-0.07821112871170044,
-0.016741247847676277,
-0.024680020287632942,
0.07714243978261948,
-0.01682843454182148,
0.012076147831976414
] | 0.157057
|
## {{% heading "objectives" %}} \* Learn about a Service in Kubernetes. \* Understand how labels and selectors relate to a Service. \* Expose an application outside a Kubernetes cluster. ## Overview of Kubernetes Services Kubernetes [Pods](/docs/concepts/workloads/pods/) are mortal. Pods have a [lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/). When a worker node dies, the Pods running on the Node are also lost. A [Replicaset](/docs/concepts/workloads/controllers/replicaset/) might then dynamically drive the cluster back to the desired state via the creation of new Pods to keep your application running. As another example, consider an image-processing backend with 3 replicas. Those replicas are exchangeable; the front-end system should not care about backend replicas or even if a Pod is lost and recreated. That said, each Pod in a Kubernetes cluster has a unique IP address, even Pods on the same Node, so there needs to be a way of automatically reconciling changes among Pods so that your applications continue to function. {{% alert %}} \_A Kubernetes Service is an abstraction layer which defines a logical set of Pods and enables external traffic exposure, load balancing and service discovery for those Pods.\_ {{% /alert %}} A [Service](/docs/concepts/services-networking/service/) in Kubernetes is an abstraction which defines a logical set of Pods and a policy by which to access them. Services enable a loose coupling between dependent Pods. A Service is defined using YAML or JSON, like all Kubernetes object manifests. The set of Pods targeted by a Service is usually determined by a \_label selector\_ (see below for why you might want a Service without including a `selector` in the spec). Although each Pod has a unique IP address, those IPs are not exposed outside the cluster without a Service. Services allow your applications to receive traffic. Services can be exposed in different ways by specifying a `type` in the `spec` of the Service: \* \_ClusterIP\_ (default) - Exposes the Service on an internal IP in the cluster. This type makes the Service only reachable from within the cluster. \* \_NodePort\_ - Exposes the Service on the same port of each selected Node in the cluster using NAT. Makes a Service accessible from outside the cluster using `NodeIP:NodePort`. Superset of ClusterIP. \* \_LoadBalancer\_ - Creates an external load balancer in the current cloud (if supported) and assigns a fixed, external IP to the Service. Superset of NodePort. \* \_ExternalName\_ - Maps the Service to the contents of the `externalName` field (e.g. `foo.bar.example.com`), by returning a `CNAME` record with its value. No proxying of any kind is set up. This type requires v1.7 or higher of `kube-dns`, or CoreDNS version 0.0.8 or higher. More information about the different types of Services can be found in the [Using Source IP](/docs/tutorials/services/source-ip/) tutorial. Also see [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/). Additionally, note that there are some use cases with Services that involve not defining a `selector` in the spec. A Service created without `selector` will also not create the corresponding Endpoints object. This allows users to manually map a Service to specific endpoints. Another possibility why there may be no selector is you are strictly using `type: ExternalName`. ## Services and Labels A Service routes traffic across a set of Pods. Services are the abstraction that allows pods to die and replicate in Kubernetes without impacting your application. Discovery and routing among dependent Pods (such as the frontend and backend components in an application) are handled by Kubernetes Services. Services match a set of Pods using [labels and selectors](/docs/concepts/overview/working-with-objects/labels), a grouping primitive that allows logical operation on objects in Kubernetes. Labels are key/value pairs attached to objects and can be used in any number of ways: \*
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/expose/expose-intro.md
|
[
-0.016735956072807312,
-0.03366773575544357,
0.026241742074489594,
-0.013058164156973362,
-0.003303416073322296,
0.01969613879919052,
0.026442211121320724,
-0.025435565039515495,
0.0713692381978035,
0.052526600658893585,
-0.041587453335523605,
0.029713207855820656,
0.033379532396793365,
-0.045934706926345825,
0.006562001537531614,
-0.011914758011698723,
0.07445099204778671,
-0.005529419519007206,
-0.029536567628383636,
-0.03322918713092804,
-0.010857128538191319,
0.008627955801784992,
-0.008711692877113819,
0.03316957503557205,
-0.08932805061340332,
0.025905679911375046,
-0.0317428819835186,
-0.03467441722750664,
-0.012621081434190273,
-0.02156136743724346,
-0.07883884012699127,
-0.005993439815938473,
0.004685805179178715,
0.0394839309155941,
0.024792054668068886,
0.09387145936489105,
0.015776941552758217,
-0.04129957780241966,
-0.09390907734632492,
0.0014261762844398618,
0.04444735124707222,
-0.05155910179018974,
-0.12647880613803864,
0.010429290123283863,
0.014981134794652462,
0.0235785823315382,
-0.05723865330219269,
-0.020076623186469078,
0.006901761516928673,
-0.029276374727487564,
0.01690872199833393,
-0.13094371557235718,
0.07771168649196625,
0.07027680426836014,
0.07164829969406128,
0.05332374572753906,
0.02649639919400215,
0.017063388600945473,
0.03494223207235336,
0.028365349397063255,
0.08219818770885468,
-0.04777450114488602,
0.015121147967875004,
0.0004221715498715639,
0.07325058430433273,
-0.03464653715491295,
0.01931648887693882,
0.02952410653233528,
0.04767119139432907,
-0.02807552181184292,
0.04355670139193535,
0.042014285922050476,
-0.07144267112016678,
-0.007713446859270334,
-0.05708641931414604,
0.02766594849526882,
-0.037008047103881836,
0.02306535094976425,
-0.016427064314484596,
-0.045278213918209076,
0.02705524116754532,
0.05825549736618996,
0.06129813566803932,
0.0092431316152215,
-0.07779911160469055,
-0.05115042254328728,
-0.03876427188515663,
-0.046969689428806305,
0.07913604378700256,
0.012097866274416447,
-0.043222591280937195,
-0.012310158461332321,
0.08227715641260147,
-0.12987203896045685,
0.04991622269153595,
0.04486881569027901,
0.01359674334526062,
-0.02193734422326088,
0.054656099528074265,
0.008947934955358505,
0.029283365234732628,
-0.013438892550766468,
-0.013765187002718449,
-0.039543356746435165,
0.07071945816278458,
-0.03189782425761223,
-0.10389085114002228,
-0.009342695586383343,
0.05657407268881798,
0.04870494082570076,
-0.019583342596888542,
0.01846792735159397,
-0.016654768958687782,
0.0810544565320015,
0.016787683591246605,
0.005436423234641552,
0.030855022370815277,
-0.007314539048820734,
0.0221856702119112,
0.05474872142076492,
0.00223167659714818,
-0.1051228791475296,
0.03981160745024681,
-0.03532997518777847,
-0.035795021802186966,
0.013299133628606796,
-0.013048495166003704,
2.7131588784749064e-33,
0.0124466922134161,
-0.0790480524301529,
0.024009205400943756,
0.02462039701640606,
0.046842653304338455,
-0.13189254701137543,
-0.004179529380053282,
0.008229146711528301,
0.011214515194296837,
-0.07079306989908218,
-0.047840096056461334,
0.10546215623617172,
0.08496835082769394,
-0.011124149896204472,
-0.01625407673418522,
-0.041166987270116806,
-0.05655485391616821,
0.09836109727621078,
0.12833338975906372,
-0.04507071524858475,
0.013689267449080944,
-0.026368021965026855,
-0.02947865054011345,
-0.001272152760066092,
0.05797532573342323,
-0.00582153769209981,
0.015980547294020653,
-0.05879710242152214,
-0.03434726968407631,
0.01081105787307024,
-0.003083945717662573,
0.01351337693631649,
0.023243442177772522,
0.022023450583219528,
-0.17224381864070892,
0.007666363846510649,
-0.032175213098526,
0.005166017450392246,
-0.06855983287096024,
-0.038574036210775375,
0.020303962752223015,
0.005682046990841627,
-0.029597552493214607,
-0.0358496718108654,
0.033095307648181915,
-0.04266054183244705,
0.06025336682796478,
-0.06837715208530426,
0.05221007391810417,
-0.010554236359894276,
0.02118968777358532,
-0.0880851224064827,
0.05067469924688339,
-0.05805283784866333,
0.032048266381025314,
0.053578685969114304,
0.02366684190928936,
-0.05576453357934952,
-0.03261398524045944,
0.013182461261749268,
-0.009553246200084686,
-0.03286192566156387,
-0.04803716018795967,
0.05778962001204491,
0.05150674283504486,
0.06013662740588188,
0.016572488471865654,
-0.008494050242006779,
0.009318515658378601,
0.051153745502233505,
-0.014198717661201954,
0.0236721932888031,
-0.0543137863278389,
-0.02419782616198063,
-0.024691050872206688,
-0.044786032289266586,
-0.04475029930472374,
0.019792810082435608,
-0.1575833261013031,
0.07736970484256744,
0.028798336163163185,
-0.02659555897116661,
-0.11152323335409164,
0.08083821833133698,
-0.004227910656481981,
-0.028550075367093086,
0.052350934594869614,
-0.05971982330083847,
-0.05337279289960861,
0.02567610703408718,
0.06277777254581451,
-0.049550484865903854,
-0.06919330358505249,
0.028808390721678734,
-0.04578461870551109,
-4.3541324618335114e-33,
0.06000954285264015,
0.009486989118158817,
-0.02878768928349018,
0.0006098461453802884,
0.02948233112692833,
-0.0016699652187526226,
-0.026768241077661514,
0.09268476814031601,
-0.06065581738948822,
-0.04975046589970589,
-0.07098276913166046,
-0.04245787113904953,
-0.006200065836310387,
0.06650345772504807,
-0.14120805263519287,
-0.004123801365494728,
-0.07433221489191055,
-0.06323408335447311,
-0.050655756145715714,
0.043475788086652756,
-0.04940560832619667,
0.005313632544130087,
0.020530831068754196,
-0.0008104376029223204,
0.02305513620376587,
0.03909750655293465,
-0.004257976543158293,
0.01433784794062376,
-0.05923459306359291,
-0.06792421638965607,
0.020630858838558197,
-0.13384774327278137,
0.012684893794357777,
0.031410105526447296,
0.04345597326755524,
0.02634960040450096,
-0.06540946662425995,
0.04571104422211647,
0.04135943576693535,
-0.0029139434918761253,
0.08932948857545853,
-0.006482567172497511,
-0.05723334103822708,
-0.04575374722480774,
-0.021168608218431473,
-0.018480174243450165,
-0.020992642268538475,
0.03792577609419823,
-0.020884452387690544,
-0.10748182982206345,
-0.00020797690376639366,
-0.03886660560965538,
-0.0719328448176384,
0.0765974223613739,
-0.058119818568229675,
0.0688752830028534,
0.02045689895749092,
0.10022439807653427,
-0.018973946571350098,
0.056225236505270004,
0.06923006474971771,
-0.14479680359363556,
0.04137839749455452,
0.08937562257051468,
-0.03924766927957535,
-0.09698732942342758,
0.03193601593375206,
0.0017740372568368912,
-0.0432254821062088,
0.0063455598428845406,
0.017523830756545067,
0.03542463853955269,
0.007575945928692818,
0.05543552339076996,
-0.03300641104578972,
-0.07015368342399597,
0.031221631914377213,
-0.04809841513633728,
-0.021381767466664314,
0.015348604880273342,
-0.07277786731719971,
0.055144015699625015,
-0.09516093134880066,
0.029756294563412666,
0.06748660653829575,
0.048686470836400986,
0.05307219550013542,
0.07631616294384003,
0.0885622650384903,
0.06760797649621964,
-0.04031308367848396,
0.03884322941303253,
-0.05656434968113899,
0.09233488142490387,
-0.08590931445360184,
-5.326927166038331e-8,
0.04446550831198692,
0.062088742852211,
0.025942901149392128,
0.08518491685390472,
-0.020728824660182,
0.011249982751905918,
0.061981458216905594,
-0.010768432170152664,
-0.021081969141960144,
0.011579281650483608,
-0.045830659568309784,
0.04187032952904701,
-0.033607326447963715,
0.041925884783267975,
0.01174619235098362,
0.007715837564319372,
0.06687429547309875,
0.0026587762404233217,
-0.0008390017319470644,
-0.040214113891124725,
-0.06719262152910233,
-0.05163457244634628,
0.015029467642307281,
0.033833060413599014,
0.004778596572577953,
0.08046095818281174,
0.07732817530632019,
-0.02691611275076866,
0.008010579273104668,
0.027034923434257507,
-0.021744882687926292,
0.018425576388835907,
-0.03856806829571724,
0.092555470764637,
-0.04427723586559296,
0.04377063736319542,
-0.13834035396575928,
-0.009393326938152313,
-0.01828426495194435,
0.030610710382461548,
-0.06150118261575699,
0.0018566892249509692,
-0.07248200476169586,
0.009538733400404453,
0.06674639135599136,
0.04776805266737938,
-0.02767709270119667,
0.04621727019548416,
-0.05034801736474037,
-0.018759913742542267,
-0.04277417063713074,
-0.05432296171784401,
-0.015574363060295582,
0.06819415092468262,
0.02447814680635929,
-0.02932327799499035,
0.0019211751641705632,
-0.008700051344931126,
0.0790749117732048,
0.06415426731109619,
0.021335452795028687,
0.03958035632967949,
0.02672375924885273,
-0.027043508365750313
] | 0.24093
|
frontend and backend components in an application) are handled by Kubernetes Services. Services match a set of Pods using [labels and selectors](/docs/concepts/overview/working-with-objects/labels), a grouping primitive that allows logical operation on objects in Kubernetes. Labels are key/value pairs attached to objects and can be used in any number of ways: \* Designate objects for development, test, and production \* Embed version tags \* Classify an object using tags {{< figure src="/docs/tutorials/kubernetes-basics/public/images/module\_04\_labels.svg" class="diagram-medium" >}} Labels can be attached to objects at creation time or later on. They can be modified at any time. Let's expose our application now using a Service and apply some labels. ### Step 1: Creating a new Service Let’s verify that our application is running. We’ll use the `kubectl get` command and look for existing Pods: ```shell kubectl get pods ``` If no Pods are running then it means the objects from the previous tutorials were cleaned up. In this case, go back and recreate the deployment from the [Using kubectl to create a Deployment](/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro#deploy-an-app) tutorial. Please wait a couple of seconds and list the Pods again. You can continue once you see the one Pod running. Next, let’s list the current Services from our cluster: ```shell kubectl get services ``` To expose the deployment to external traffic, we'll use the kubectl expose command with the --type=NodePort option: ```shell kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080 ``` We have now a running Service called kubernetes-bootcamp. Here we see that the Service received a unique cluster-IP, an internal port and an external-IP (the IP of the Node). To find out what port was opened externally (for the `type: NodePort` Service) we’ll run the `describe service` subcommand: ```shell kubectl describe services/kubernetes-bootcamp ``` Create an environment variable called `NODE\_PORT` that has the value of the Node port assigned: ```shell export NODE\_PORT="$(kubectl get services/kubernetes-bootcamp -o go-template='{{(index .spec.ports 0).nodePort}}')" echo "NODE\_PORT=$NODE\_PORT" ``` Now we can test that the app is exposed outside of the cluster using `curl`, the IP address of the Node and the externally exposed port: ```shell curl http://"$(minikube ip):$NODE\_PORT" ``` {{< note >}} If you're running minikube with Docker Desktop as the container driver, a minikube tunnel is needed. This is because containers inside Docker Desktop are isolated from your host computer. In a separate terminal window, execute: ```shell minikube service kubernetes-bootcamp --url ``` The output looks like this: ``` http://127.0.0.1:51082 ! Because you are using a Docker driver on darwin, the terminal needs to be open to run it. ``` Then use the given URL to access the app: ```shell curl 127.0.0.1:51082 ``` {{< /note >}} And we get a response from the server. The Service is exposed. ### Step 2: Using labels The Deployment created automatically a label for our Pod. With the `describe deployment` subcommand you can see the name (the \_key\_) of that label: ```shell kubectl describe deployment ``` Let’s use this label to query our list of Pods. We’ll use the `kubectl get pods` command with `-l` as a parameter, followed by the label values: ```shell kubectl get pods -l app=kubernetes-bootcamp ``` You can do the same to list the existing Services: ```shell kubectl get services -l app=kubernetes-bootcamp ``` Get the name of the Pod and store it in the POD\_NAME environment variable: ```shell export POD\_NAME="$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')" echo "Name of the Pod: $POD\_NAME" ``` To apply a new label we use the label subcommand followed by the object type, object name and the new label: ```shell kubectl label pods "$POD\_NAME" version=v1 ``` This will apply a new label to our Pod (we pinned the application version to the Pod), and
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/expose/expose-intro.md
|
[
0.020115653052926064,
-0.0022883808705955744,
-0.02536187320947647,
0.026828356087207794,
0.041965991258621216,
0.025601785629987717,
0.04573315009474754,
-0.013355670496821404,
0.08925168961286545,
-0.021753493696451187,
0.020582715049386024,
-0.016140565276145935,
-0.00031424633925780654,
-0.0373767614364624,
0.0882425457239151,
0.0021931210067123175,
0.11974518746137619,
0.0012010934296995401,
-0.023907531052827835,
-0.051815666258335114,
-0.022707007825374603,
-0.011772140860557556,
0.0292289350181818,
0.013392063789069653,
-0.04188859090209007,
0.05320439860224724,
-0.031757157295942307,
-0.004926861263811588,
0.04674592614173889,
-0.08441773802042007,
0.003047169419005513,
0.010098399594426155,
-0.0262011531740427,
0.07837285101413727,
-0.0045483531430363655,
0.1467614322900772,
0.03777855262160301,
-0.025983354076743126,
-0.060635775327682495,
-0.004576977342367172,
0.0509374663233757,
-0.012572791427373886,
-0.07094493508338928,
0.023511916399002075,
-0.0008640929590910673,
0.007257990073412657,
-0.02363608218729496,
-0.10020454972982407,
-0.06507092714309692,
-0.010488152503967285,
0.015787944197654724,
-0.12342453747987747,
-0.008892899379134178,
-0.0036253866273909807,
-0.006929276045411825,
0.038543764501810074,
0.003219052217900753,
-0.018643297255039215,
0.05269455909729004,
0.06469333171844482,
0.01872260309755802,
-0.013657089322805405,
0.04558040574193001,
-0.012105494737625122,
0.02058500610291958,
-0.04428601264953613,
0.006624448113143444,
0.0039075626991689205,
0.03419550508260727,
-0.0533938966691494,
0.05234573036432266,
0.05901205912232399,
0.047258708626031876,
-0.025698654353618622,
-0.049626078456640244,
-0.005590054672211409,
-0.009757948108017445,
0.08184069395065308,
0.03748008608818054,
-0.1224459782242775,
0.013455349020659924,
0.0678626224398613,
0.014214515686035156,
0.025894206017255783,
-0.011444498784840107,
0.06220128387212753,
0.0141322435811162,
-0.027213342487812042,
-0.05039428919553757,
0.004017815459519625,
-0.027367914095520973,
-0.061413902789354324,
0.06451433151960373,
-0.07264985144138336,
0.038610056042671204,
0.01047956757247448,
0.0031799201387912035,
0.0015498072607442737,
0.08985742181539536,
0.0385957732796669,
0.018330663442611694,
-0.03696085140109062,
0.05767801031470299,
-0.013250269927084446,
0.060539696365594864,
-0.05130539834499359,
-0.07517876476049423,
-0.02890581637620926,
0.038056015968322754,
-0.0013000863837078214,
-0.04176512733101845,
0.026389669626951218,
-0.06998109817504883,
0.012010890990495682,
-0.03820544853806496,
-0.05147712677717209,
0.05221613124012947,
-0.09449155628681183,
0.05686451122164726,
-0.006122831720858812,
0.01924980990588665,
-0.000652060320135206,
0.045648105442523956,
-0.025580041110515594,
-0.012548602186143398,
0.02546573057770729,
-0.05510334670543671,
4.942547464972716e-33,
0.060127463191747665,
-0.08575330674648285,
0.05379824340343475,
-0.0012389078037813306,
0.03636149317026138,
-0.0638190507888794,
-0.055888839066028595,
-0.025563830509781837,
0.023997075855731964,
0.03846186399459839,
-0.04416593909263611,
0.09835457801818848,
-0.035741377621889114,
0.01639060117304325,
0.06243590638041496,
-0.03947591036558151,
-0.04053846746683121,
0.06640440225601196,
0.013054351322352886,
-0.07212868332862854,
-0.05466146394610405,
-0.05666344612836838,
-0.036122146993875504,
0.03152182325720787,
0.07831314206123352,
0.007768459618091583,
-0.035176098346710205,
-0.031064391136169434,
0.00011583576997509226,
-0.011265513487160206,
0.034344516694545746,
-0.030328869819641113,
0.07592494040727615,
0.04692729189991951,
-0.13567009568214417,
-0.025879941880702972,
-0.06424015760421753,
0.041509438306093216,
-0.050256967544555664,
-0.030510326847434044,
0.0515737310051918,
-0.026048928499221802,
-0.0608569011092186,
-0.05747843161225319,
0.03228778392076492,
-0.027608472853899002,
-0.0426083505153656,
-0.051780857145786285,
0.01870736852288246,
-0.026183543726801872,
0.006830892991274595,
-0.029556255787611008,
0.0548328272998333,
-0.06346642225980759,
0.027256842702627182,
0.025566473603248596,
0.07177868485450745,
-0.012161561287939548,
-0.06519056856632233,
-0.005753569304943085,
-0.007462522946298122,
0.018567031249403954,
-0.024188010022044182,
0.042961690574884415,
0.015475635416805744,
0.058389175683259964,
0.06021749973297119,
0.013877234421670437,
0.03968873992562294,
-0.005670357029885054,
-0.026415659114718437,
0.01995782181620598,
-0.04511050134897232,
-0.021347781643271446,
0.06429491937160492,
-0.08113299310207367,
-0.08700012415647507,
-0.03266790509223938,
-0.0914003774523735,
0.08676140755414963,
-0.038208093494176865,
-0.06211236119270325,
-0.040702179074287415,
0.08615278452634811,
0.029766706749796867,
0.0362112782895565,
0.024081721901893616,
-0.09050402045249939,
-0.0035359500907361507,
0.06848407536745071,
-0.038220468908548355,
-0.025981925427913666,
-0.09440524131059647,
0.009960965253412724,
-0.04058915749192238,
-6.607123138185909e-33,
0.03879650682210922,
0.05678341165184975,
-0.0029426252003759146,
0.03872518613934517,
-0.007743630092591047,
0.007123423274606466,
-0.016536947339773178,
0.11958300322294235,
-0.08402521908283234,
-0.03688685968518257,
-0.05000239983201027,
-0.035179223865270615,
-0.021482273936271667,
0.021204056218266487,
-0.08690240234136581,
0.009884224273264408,
-0.13979636132717133,
-0.0011399792274460196,
0.0020386497490108013,
0.04225294291973114,
-0.06271396577358246,
0.08849786967039108,
0.06948050856590271,
0.017602505162358284,
-0.011401550844311714,
0.002857208950445056,
0.06163698434829712,
0.002693288493901491,
-0.045821696519851685,
-0.07885626703500748,
-0.05361367017030716,
-0.14480167627334595,
0.03740023449063301,
-0.027073919773101807,
-0.007259955629706383,
-0.05303337424993515,
0.010805708356201649,
0.033607419580221176,
-0.031113246455788612,
-0.023402029648423195,
-0.0009299296070821583,
0.004056315403431654,
-0.10251810401678085,
0.003987443633377552,
-0.12849828600883484,
-0.03967525437474251,
-0.020839307457208633,
-0.015685822814702988,
-0.021493740379810333,
-0.07987030595541,
-0.0005477755912579596,
-0.04907824099063873,
-0.0664517804980278,
0.009145321324467659,
-0.06991029530763626,
-0.0062610856257379055,
-0.022277941927313805,
0.07684045284986496,
-0.07239384949207306,
0.07271882891654968,
-0.02383357286453247,
-0.06437866389751434,
0.05550260841846466,
0.02351303957402706,
0.020718958228826523,
-0.05953148007392883,
-0.0473153255879879,
-0.007570359390228987,
-0.03161683678627014,
-0.0022523030638694763,
0.08469384163618088,
0.03827754780650139,
-0.014434696175158024,
0.05662292614579201,
0.02497219108045101,
-0.04061426594853401,
-0.002210090169683099,
-0.007555458229035139,
0.07029923051595688,
-0.010001132264733315,
-0.0176050066947937,
0.013778282329440117,
-0.0573899932205677,
0.1056799665093422,
0.02059800922870636,
-0.0012209889246150851,
0.07319878786802292,
0.05547383800148964,
0.05571999400854111,
0.028433261439204216,
0.00464092381298542,
0.058610931038856506,
-0.026557421311736107,
0.17047879099845886,
-0.03557487949728966,
-5.707209638217137e-8,
0.009489413350820541,
0.03853370621800423,
-0.0463760569691658,
0.008078373037278652,
-0.04555945098400116,
0.02651919052004814,
-0.018926922231912613,
0.03233436867594719,
-0.0660323053598404,
0.0014954410726204515,
-0.007186566013842821,
0.06398669630289078,
-0.08481043577194214,
0.013294069096446037,
0.020013026893138885,
0.02028069645166397,
0.029349112883210182,
0.07271729409694672,
0.01895921677350998,
-0.03305288776755333,
-0.0598054863512516,
-0.007563129533082247,
0.04835033044219017,
0.06054828688502312,
0.07809437066316605,
0.018171759322285652,
0.010484102182090282,
0.02665993757545948,
0.08363986760377884,
0.029478248208761215,
0.01892389915883541,
0.0006524355849251151,
-0.05877611041069031,
0.14719173312187195,
0.03254259005188942,
0.01989637315273285,
-0.1790585219860077,
-0.044088732451200485,
0.045783862471580505,
0.09230219572782516,
0.011116192676126957,
-0.03292781859636307,
-0.07488870620727539,
-0.018989164382219315,
0.018257204443216324,
0.10675112158060074,
-0.026233026757836342,
-0.02467898093163967,
-0.047661103308200836,
-0.010147958062589169,
-0.09955354779958725,
-0.07749633491039276,
-0.047275301069021225,
0.0461701825261116,
-0.036446165293455124,
-0.011348569765686989,
0.08269363641738892,
-0.012313502840697765,
0.05417110025882721,
0.07822689414024353,
-0.02053750492632389,
0.04733134061098099,
0.06957872211933136,
-0.023073505610227585
] | 0.168685
|
the Pod: $POD\_NAME" ``` To apply a new label we use the label subcommand followed by the object type, object name and the new label: ```shell kubectl label pods "$POD\_NAME" version=v1 ``` This will apply a new label to our Pod (we pinned the application version to the Pod), and we can check it with the `describe pod` command: ```shell kubectl describe pods "$POD\_NAME" ``` We see here that the label is attached now to our Pod. And we can query now the list of pods using the new label: ```shell kubectl get pods -l version=v1 ``` And we see the Pod. ### Step 3: Deleting a service To delete Services you can use the `delete service` subcommand. Labels can be used also here: ```shell kubectl delete service -l app=kubernetes-bootcamp ``` Confirm that the Service is gone: ```shell kubectl get services ``` This confirms that our Service was removed. To confirm that route is not exposed anymore you can `curl` the previously exposed IP and port: ```shell curl http://"$(minikube ip):$NODE\_PORT" ``` This proves that the application is not reachable anymore from outside of the cluster. You can confirm that the app is still running with a `curl` from inside the pod: ```shell kubectl exec -ti $POD\_NAME -- curl http://localhost:8080 ``` We see here that the application is up. This is because the Deployment is managing the application. To shut down the application, you would need to delete the Deployment as well. ## {{% heading "whatsnext" %}} \* Tutorial [Running Multiple Instances of Your App](/docs/tutorials/kubernetes-basics/scale/scale-intro/). \* Learn more about [Service](/docs/concepts/services-networking/service/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/expose/expose-intro.md
|
[
0.019007587805390358,
0.011028424836695194,
0.01623331941664219,
-0.005487870890647173,
0.011685906909406185,
0.006107516121119261,
0.08103133738040924,
-0.03891051188111305,
0.10858991742134094,
-0.012012919411063194,
0.027833612635731697,
-0.05017753690481186,
0.0023210421204566956,
-0.02562037855386734,
0.08707410842180252,
-0.0054068006575107574,
0.0927136242389679,
-0.007092013489454985,
-0.016336586326360703,
-0.07572221010923386,
0.02795518934726715,
0.06582506746053696,
0.015219278633594513,
0.016636352986097336,
-0.02319112792611122,
-0.031153999269008636,
-0.06437508016824722,
-0.03399239853024483,
0.008371357806026936,
-0.04582396149635315,
-0.022145453840494156,
0.09812328219413757,
0.019453052431344986,
0.008290781639516354,
0.10707446932792664,
0.0764218419790268,
-0.004415614530444145,
-0.020834263414144516,
0.014833214692771435,
-0.012680714949965477,
0.053873661905527115,
-0.047646183520555496,
-0.08450182527303696,
-0.018945148214697838,
-0.048592690378427505,
0.012978586368262768,
-0.07356663793325424,
-0.08492206037044525,
-0.02097153477370739,
-0.007497715298086405,
0.004885644651949406,
-0.09535099565982819,
0.01747327484190464,
0.04202903434634209,
0.03453756868839264,
0.014393147081136703,
-0.03742307424545288,
0.08616781234741211,
0.014677051454782486,
0.08408697694540024,
0.0001230742345796898,
0.006414542905986309,
0.0023611767683178186,
-0.02618112973868847,
0.02307102456688881,
-0.06235513091087341,
-0.015053121373057365,
-0.0721089169383049,
0.043002109974622726,
-0.0016862360062077641,
0.016772650182247162,
0.017077932134270668,
0.041738416999578476,
-0.07294367998838425,
-0.09166392683982849,
0.04789348319172859,
0.04337477311491966,
0.09121549874544144,
-0.04221886396408081,
-0.06661008298397064,
-0.022893020883202553,
0.0615769624710083,
0.00624594883993268,
0.01616419106721878,
-0.08046867698431015,
0.05516699701547623,
-0.006337198428809643,
-0.10636378824710846,
0.017514070495963097,
0.018251486122608185,
-0.026157904416322708,
-0.07072462141513824,
0.040787070989608765,
-0.09712719917297363,
0.03493818640708923,
-0.012525166384875774,
-0.015840204432606697,
0.03416875749826431,
0.03145020455121994,
0.038200654089450836,
0.004925604909658432,
0.030929019674658775,
0.006832093000411987,
-0.029201403260231018,
0.009136554785072803,
-0.04358549416065216,
-0.08343006670475006,
-0.02180302143096924,
0.033505044877529144,
0.06841447949409485,
-0.03085358440876007,
0.022152137011289597,
-0.06513787806034088,
0.05101149529218674,
-0.04276439547538757,
0.02272704243659973,
0.038621850311756134,
-0.011027629487216473,
0.027637073770165443,
0.072630375623703,
0.03767717257142067,
-0.07432982325553894,
0.004841110669076443,
0.005518387071788311,
-0.13190686702728271,
0.060367096215486526,
0.022602874785661697,
8.702701712980764e-34,
0.05271013453602791,
-0.1139303594827652,
0.03550902381539345,
-0.010822877287864685,
0.033770568668842316,
-0.05205697566270828,
-0.031403735280036926,
0.05796755105257034,
0.031649570912122726,
0.039130378514528275,
-0.027348041534423828,
0.06284347176551819,
-0.028110750019550323,
-0.02248794585466385,
-0.04649343714118004,
-0.018205806612968445,
-0.07921552658081055,
0.033981624990701675,
-0.023382125422358513,
-0.04580388963222504,
0.025487611070275307,
0.03613566979765892,
-0.05787457525730133,
-0.024027474224567413,
0.07469633966684341,
-0.05321112275123596,
-0.0020818167831748724,
-0.09646730870008469,
0.03180437535047531,
0.003379432950168848,
-0.006357782986015081,
-0.05956018716096878,
0.03706274926662445,
0.032244618982076645,
-0.12278718501329422,
-0.023900488391518593,
0.009283733554184437,
0.0073477523401379585,
-0.08528684824705124,
-0.0542646199464798,
0.08340920507907867,
0.01644207537174225,
-0.014785632491111755,
-0.028754575178027153,
0.07527066022157669,
-0.060753922909498215,
-0.01986764930188656,
-0.060246385633945465,
0.013961601071059704,
-0.021250462159514427,
0.019892748445272446,
-0.011151588521897793,
0.013512174598872662,
-0.06396155059337616,
0.01594099961221218,
-0.013187139295041561,
0.06033233553171158,
0.030286990106105804,
-0.07069700956344604,
-0.044090636074543,
-0.05037970840930939,
0.012852076441049576,
0.04865529015660286,
0.03234723582863808,
0.08172152936458588,
0.08832936733961105,
-0.000016695328667992726,
0.02087661623954773,
0.01979336328804493,
0.037797119468450546,
-0.06241008639335632,
0.03556502237915993,
-0.0453951358795166,
0.04265156015753746,
0.05168667435646057,
-0.10515207797288895,
-0.004440008196979761,
-0.05053086206316948,
-0.05818856507539749,
0.042791854590177536,
0.02463085949420929,
-0.016594238579273224,
-0.06340052932500839,
0.1269065886735916,
-0.008298582397401333,
0.01703791879117489,
0.01792348362505436,
-0.07319466024637222,
-0.010004188865423203,
-0.005649171769618988,
-0.038119588047266006,
0.004122432321310043,
-0.11617859452962875,
0.033532291650772095,
-0.07413265109062195,
-4.6819646119664006e-33,
0.07473837584257126,
0.013811780139803886,
0.03301868215203285,
-0.025984885171055794,
-0.05957386642694473,
-0.03688738867640495,
0.022978641092777252,
0.11478342115879059,
-0.06496892869472504,
-0.020435495302081108,
-0.0305329617112875,
0.010290900245308876,
-0.011929281055927277,
0.07642962783575058,
-0.04999023675918579,
0.05725913494825363,
-0.13746997714042664,
-0.06058476120233536,
-0.03413012996315956,
0.06781692802906036,
-0.08203741908073425,
0.12266084551811218,
0.10465353727340698,
0.03816249221563339,
-0.040597181767225266,
-0.07081759721040726,
0.07417061924934387,
-0.008209490217268467,
-0.0044641029089689255,
-0.06950568407773972,
0.00016293747466988862,
-0.09152191877365112,
-0.024855980649590492,
0.036275316029787064,
-0.016256196424365044,
-0.056902606040239334,
-0.011944448575377464,
0.037364423274993896,
0.00473592896014452,
-0.03300127759575844,
-0.027047695592045784,
-0.017724955454468727,
-0.10153859108686447,
-0.015785811468958855,
-0.07571925222873688,
-0.07155472785234451,
0.03749191388487816,
-0.007533159572631121,
0.042537469416856766,
-0.053182486444711685,
0.017373057082295418,
-0.05504870042204857,
-0.10882232338190079,
0.06055703014135361,
-0.02616131864488125,
-0.008867111057043076,
-0.03459759056568146,
0.003469600807875395,
-0.09274245798587799,
-0.02859102375805378,
0.014234500005841255,
0.006842831149697304,
0.05448324605822563,
0.028577134013175964,
0.0478852242231369,
-0.0694679468870163,
-0.025334013625979424,
0.006029571406543255,
-0.026027359068393707,
-0.06638650596141815,
0.09213732928037643,
0.015240846201777458,
-0.022064559161663055,
0.07398863881826401,
-0.01978110522031784,
-0.016424838453531265,
0.010139082558453083,
-0.026434598490595818,
0.009563812986016273,
0.029862456023693085,
0.0003916406712960452,
0.046289898455142975,
-0.07150578498840332,
0.0324610099196434,
-0.03012566827237606,
-0.030827032402157784,
0.07462940365076065,
0.0684114322066307,
-0.0006930133095011115,
0.07709041982889175,
0.05596183240413666,
-0.00682490598410368,
-0.043854404240846634,
0.1330384761095047,
-0.05706418305635452,
-4.393326236140638e-8,
0.06007365882396698,
0.009645683690905571,
-0.05948658660054207,
0.08920306712388992,
0.027623489499092102,
0.001243581878952682,
-0.023550473153591156,
0.06186343729496002,
-0.059413377195596695,
-0.015853287652134895,
-0.02849516086280346,
0.034544069319963455,
-0.1446872055530548,
0.036951616406440735,
0.033419832587242126,
-0.046669989824295044,
0.016480334103107452,
0.06282354146242142,
0.056516025215387344,
-0.012731675989925861,
-0.11041386425495148,
-0.03118646889925003,
0.05496597662568092,
-0.052353981882333755,
0.025711949914693832,
0.06614405661821365,
0.028085418045520782,
0.02625766396522522,
0.047361429780721664,
0.031122419983148575,
0.023779399693012238,
0.02854062430560589,
0.00401623360812664,
0.08062267303466797,
-0.0214548297226429,
0.0332326665520668,
-0.16927938163280487,
0.01706911437213421,
0.047871917486190796,
0.08896060287952423,
-7.367908096966858e-7,
0.029545778408646584,
-0.07699462026357651,
0.010276642628014088,
0.003948987927287817,
0.024858495220541954,
0.031581100076436996,
0.0335855707526207,
0.00799846276640892,
-0.007931644096970558,
-0.09348263591527939,
-0.03932636231184006,
0.025327617302536964,
0.017279688268899918,
-0.042790502309799194,
0.026206422597169876,
0.024942263960838318,
-0.025386331602931023,
0.027849454432725906,
0.031030088663101196,
-0.0027957246638834476,
-0.0075600105337798595,
0.029522744938731194,
0.0017096170922741294
] | 0.15435
|
## {{% heading "objectives" %}} \* Learn about application Deployments. \* Deploy your first app on Kubernetes with kubectl. ## Kubernetes Deployments {{% alert %}} \_A Deployment is responsible for creating and updating instances of your application.\_ {{% /alert %}} {{< note >}} This tutorial uses a container that requires the AMD64 architecture. If you are using minikube on a computer with a different CPU architecture, you could try using minikube with a driver that can emulate AMD64. For example, the Docker Desktop driver can do this. {{< /note >}} Once you have a [running Kubernetes cluster](/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro/), you can deploy your containerized applications on top of it. To do so, you create a Kubernetes \*\*Deployment\*\*. The Deployment instructs Kubernetes how to create and update instances of your application. Once you've created a Deployment, the Kubernetes control plane schedules the application instances included in that Deployment to run on individual Nodes in the cluster. Once the application instances are created, a Kubernetes Deployment controller continuously monitors those instances. If the Node hosting an instance goes down or is deleted, the Deployment controller replaces the instance with an instance on another Node in the cluster. \*\*This provides a self-healing mechanism to address machine failure or maintenance.\*\* In a pre-orchestration world, installation scripts would often be used to start applications, but they did not allow recovery from machine failure. By both creating your application instances and keeping them running across Nodes, Kubernetes Deployments provide a fundamentally different approach to application management. ## Deploying your first app on Kubernetes {{% alert %}} \_Applications need to be packaged into one of the supported container formats in order to be deployed on Kubernetes.\_ {{% /alert %}} {{< figure src="/docs/tutorials/kubernetes-basics/public/images/module\_02\_first\_app.svg" class="diagram-medium" >}} You can create and manage a Deployment by using the Kubernetes command line interface, [kubectl](/docs/reference/kubectl/). `kubectl` uses the Kubernetes API to interact with the cluster. In this module, you'll learn the most common `kubectl` commands needed to create Deployments that run your applications on a Kubernetes cluster. When you create a Deployment, you'll need to specify the container image for your application and the number of replicas that you want to run. You can change that information later by updating your Deployment; [Module 5](/docs/tutorials/kubernetes-basics/scale/scale-intro/) and [Module 6](/docs/tutorials/kubernetes-basics/update/update-intro/) of the bootcamp discuss how you can scale and update your Deployments. For your first Deployment, you'll use a hello-node application packaged in a Docker container that uses NGINX to echo back all the requests. (If you didn't already try creating a hello-node application and deploying it using a container, you can do that first by following the instructions from the [Hello Minikube tutorial](/docs/tutorials/hello-minikube/).) You will need to have installed kubectl as well. If you need to install it, visit [install tools](/docs/tasks/tools/#kubectl). Now that you know what Deployments are, let's deploy our first app! ### kubectl basics The common format of a kubectl command is: `kubectl action resource`. This performs the specified \_action\_ (like `create`, `describe` or `delete`) on the specified \_resource\_ (like `node` or `deployment`. You can use `--help` after the subcommand to get additional info about possible parameters (for example: `kubectl get nodes --help`). Check that kubectl is configured to talk to your cluster, by running the `kubectl version` command. Check that kubectl is installed and that you can see both the client and the server versions. To view the nodes in the cluster, run the `kubectl get nodes` command. You see the available nodes. Later, Kubernetes will choose where to deploy our application based on Node available resources. ### Deploy an app Let’s deploy our first app on Kubernetes with the `kubectl create deployment` command.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.md
|
[
0.07581871747970581,
0.05926038324832916,
0.0020201459992676973,
-0.004517534282058477,
0.021332059055566788,
-0.04778251424431801,
-0.04908277466893196,
0.05272224545478821,
0.013457825407385826,
0.014944935217499733,
-0.03381891921162605,
-0.07462122291326523,
0.03508778288960457,
-0.05585074797272682,
0.000802133115939796,
0.003615299239754677,
0.0688890665769577,
0.031754083931446075,
0.004482359625399113,
-0.01633717119693756,
-0.060223113745450974,
0.009541168808937073,
0.0037598549388349056,
-0.007752031087875366,
-0.05667547509074211,
-0.004135150462388992,
0.019457463175058365,
0.04099636897444725,
0.062339019030332565,
0.008390343748033047,
0.019544251263141632,
-0.004557538311928511,
0.04295797273516655,
0.023301681503653526,
0.052007511258125305,
0.12296435981988907,
0.041204534471035004,
-0.05548432469367981,
-0.09284643083810806,
-0.06991833448410034,
0.042535632848739624,
-0.03310058265924454,
-0.08813242614269257,
-0.029339922592043877,
0.0037019848823547363,
-0.09393611550331116,
-0.04514306038618088,
-0.09916230291128159,
-0.0023439950309693813,
-0.0528404675424099,
0.02834855020046234,
-0.07762310653924942,
-0.004277580417692661,
-0.0067290342412889,
-0.048346251249313354,
-0.020007487386465073,
0.024403957650065422,
0.017620759084820747,
0.06622428447008133,
0.04575014114379883,
0.03660745918750763,
-0.02780233696103096,
0.13534952700138092,
0.010210733860731125,
-0.0607607401907444,
-0.04878736659884453,
0.019971491768956184,
0.018655434250831604,
0.03485952690243721,
-0.03658579662442207,
0.03950328752398491,
0.01922714337706566,
-0.010453451424837112,
-0.04351771995425224,
-0.109902523458004,
-0.03940505161881447,
0.029052743688225746,
0.03081958182156086,
-0.03912363573908806,
0.004022363107651472,
-0.03993334248661995,
-0.058723364025354385,
0.046944648027420044,
-0.03702434524893761,
-0.06486624479293823,
-0.035990484058856964,
0.006832331418991089,
-0.018687570467591286,
0.06331660598516464,
-0.056838855147361755,
-0.06977077573537827,
-0.043608102947473526,
0.015437664464116096,
-0.055819008499383926,
0.07884833961725235,
-0.012374237179756165,
-0.005262242630124092,
-0.0505903996527195,
-0.008312086574733257,
0.029406310990452766,
0.020628783851861954,
-0.03683503717184067,
0.014768589287996292,
-0.02568676695227623,
0.05358419939875603,
0.00005493428398040123,
-0.036213576793670654,
-0.018427522853016853,
-0.01776183396577835,
-0.0339367650449276,
-0.012589688412845135,
0.03606095910072327,
-0.014019904658198357,
-0.007176357787102461,
0.03073272295296192,
-0.04010201618075371,
-0.0003587474930100143,
0.003105102339759469,
0.061769045889377594,
0.11208392679691315,
0.04404345527291298,
-0.11192988604307175,
0.03140731528401375,
0.007117127999663353,
0.0931594967842102,
0.08348606526851654,
-0.08161723613739014,
4.802781554001931e-33,
0.08928904682397842,
-0.057562071830034256,
0.006507128942757845,
0.02541249245405197,
0.03701391816139221,
-0.06408564746379852,
0.011348757892847061,
-0.03501143679022789,
-0.039233047515153885,
-0.05310266837477684,
-0.11160090565681458,
0.03019697219133377,
0.02108735404908657,
-0.027834083884954453,
0.04331501945853233,
-0.08416267484426498,
-0.0950746238231659,
0.040900252759456635,
0.11385250836610794,
-0.0051696025766432285,
-0.0026496509090065956,
-0.06385349482297897,
-0.060492418706417084,
-0.0424460843205452,
0.07659114897251129,
-0.03524674102663994,
0.07226201891899109,
-0.051741600036621094,
-0.03116808459162712,
-0.0012375855585560203,
-0.00894134771078825,
-0.04914889857172966,
-0.05168716609477997,
0.00961587019264698,
-0.06403548270463943,
-0.04174463078379631,
-0.016334667801856995,
0.07256543636322021,
-0.06010672077536583,
0.02255217172205448,
0.02892366237938404,
-0.021097801625728607,
-0.047319862991571426,
-0.09707152098417282,
0.03803980350494385,
0.007386944722384214,
0.07197467982769012,
-0.023273935541510582,
0.08554475009441376,
-0.03229827061295509,
-0.00783445779234171,
-0.06547852605581284,
0.008766229264438152,
0.00013253076758701354,
0.017067886888980865,
-0.056142255663871765,
0.024987531825900078,
-0.0719170868396759,
0.03088207170367241,
0.003047056496143341,
-0.11099745333194733,
-0.03307471051812172,
-0.035157524049282074,
0.00670832023024559,
-0.009309954941272736,
-0.005644935183227062,
0.04512695595622063,
0.073671855032444,
-0.05715542286634445,
0.05823485553264618,
-0.06631278991699219,
0.019370045512914658,
0.07749565690755844,
-0.006507840473204851,
0.0480024628341198,
0.022322459146380424,
-0.04732334241271019,
-0.0014750336995348334,
-0.06741055846214294,
-0.0028201122768223286,
0.04483843594789505,
-0.01272472832351923,
-0.09750068932771683,
0.09392862766981125,
0.05330388993024826,
-0.00569162517786026,
-0.035496409982442856,
-0.0045631881803274155,
-0.03346286714076996,
0.06537004560232162,
0.04151775315403938,
-0.04973595589399338,
-0.022387642413377762,
-0.01735849678516388,
-0.10766616463661194,
-6.460961435920697e-33,
0.04157252237200737,
-0.0014286175137385726,
-0.019112080335617065,
0.03013455867767334,
0.0717041864991188,
0.0337209589779377,
0.06080532446503639,
0.05174701660871506,
-0.08540401607751846,
-0.12396012991666794,
-0.06495668739080429,
-0.010663718916475773,
0.02979130484163761,
0.04576908051967621,
-0.13712598383426666,
0.05881955102086067,
-0.04159846156835556,
0.005004937760531902,
0.08027941733598709,
-0.01712510921061039,
-0.04955204203724861,
-0.042323753237724304,
0.0127480523660779,
-0.008070695213973522,
0.01432802900671959,
0.03530105575919151,
0.010950492694973946,
-0.02687111496925354,
0.0037689858581870794,
0.017127830535173416,
-0.046964243054389954,
0.022700414061546326,
0.012973146513104439,
0.05619749426841736,
0.04052504524588585,
0.021405206993222237,
-0.02355797588825226,
-0.03275933116674423,
-0.0007068372797220945,
-0.04330452159047127,
0.07060984522104263,
-0.02190556563436985,
-0.026097027584910393,
-0.0010778493015095592,
-0.014639495871961117,
-0.011006943881511688,
-0.01691717654466629,
-0.023874273523688316,
-0.024793317541480064,
-0.07278230041265488,
-0.07757392525672913,
-0.057091228663921356,
-0.03406262770295143,
0.0283675417304039,
-0.0519745759665966,
0.007097909227013588,
0.03274941071867943,
0.06914163380861282,
-0.04446226358413696,
0.08780015259981155,
0.06585825234651566,
-0.17965862154960632,
0.11069978028535843,
-0.02849072404205799,
-0.04216120392084122,
0.006373235024511814,
0.06273939460515976,
0.06266160309314728,
-0.13815660774707794,
0.05328914150595665,
0.0540018193423748,
-0.00862111896276474,
-0.0005693902494385839,
0.0818333700299263,
-0.018750295042991638,
-0.04038405790925026,
0.054235804826021194,
0.0014119846746325493,
0.016834881156682968,
-0.026396123692393303,
0.043181516230106354,
0.04872332513332367,
-0.057130955159664154,
-0.05461924523115158,
-0.0018342756666243076,
0.032068561762571335,
0.05781152471899986,
0.046068642288446426,
0.05866299942135811,
-0.014241558499634266,
-0.03580128028988838,
0.1364206224679947,
0.01542830839753151,
0.0720692053437233,
-0.012615891173481941,
-5.620945486839446e-8,
0.050775717943906784,
-0.025401318445801735,
-0.00465504452586174,
0.0192805714905262,
-0.014792674221098423,
0.0065029640682041645,
0.03480147942900658,
-0.013741649687290192,
-0.01463914755731821,
-0.05033039301633835,
-0.06742273271083832,
0.049225371330976486,
-0.00012225841055624187,
0.01878851279616356,
0.06956732273101807,
0.08539338409900665,
0.017714500427246094,
-0.002913315314799547,
0.04828113690018654,
-0.11320789158344269,
-0.014769740402698517,
-0.018811658024787903,
0.015164199285209179,
0.045210421085357666,
0.007470726501196623,
-0.009888015687465668,
0.07599746435880661,
0.014610594138503075,
0.06769602745771408,
-0.0840090960264206,
-0.09664914011955261,
0.01709626242518425,
-0.08861754089593887,
0.09823525696992874,
0.039738427847623825,
0.035537030547857285,
-0.051837898790836334,
0.07398027926683426,
0.06551109254360199,
0.03551541268825531,
-0.04713325574994087,
-0.0020816465839743614,
-0.06573041528463364,
-0.07831569761037827,
0.026225492358207703,
0.0775812566280365,
-0.09406227618455887,
-0.015742598101496696,
-0.0399312824010849,
0.034666530787944794,
0.05276528000831604,
-0.011479442939162254,
-0.014146007597446442,
0.08430074900388718,
-0.008095921948552132,
0.0706547424197197,
-0.04711674153804779,
-0.04024863988161087,
0.05326496809720993,
0.024087706580758095,
-0.0015925811603665352,
0.052944716066122055,
0.03061402030289173,
0.0031633558683097363
] | 0.104163
|
versions. To view the nodes in the cluster, run the `kubectl get nodes` command. You see the available nodes. Later, Kubernetes will choose where to deploy our application based on Node available resources. ### Deploy an app Let’s deploy our first app on Kubernetes with the `kubectl create deployment` command. We need to provide the deployment name and app image location (include the full repository url for images hosted outside Docker Hub). ```shell kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 ``` Great! You just deployed your first application by creating a deployment. This performed a few things for you: \* searched for a suitable node where an instance of the application could be run (we have only 1 available node) \* scheduled the application to run on that Node \* configured the cluster to reschedule the instance on a new Node when needed To list your deployments use the `kubectl get deployments` command: ```shell kubectl get deployments ``` We see that there is 1 deployment running a single instance of your app. The instance is running inside a container on your node. ### View the app [Pods](/docs/concepts/workloads/pods/) that are running inside Kubernetes are running on a private, isolated network. By default they are visible from other pods and services within the same Kubernetes cluster, but not outside that network. When we use `kubectl`, we're interacting through an API endpoint to communicate with our application. We will cover other options on how to expose your application outside the Kubernetes cluster later, in [Module 4](/docs/tutorials/kubernetes-basics/expose/). Also as a basic tutorial, we're not explaining what `Pods` are in any detail here, it will be covered in later topics. The `kubectl proxy` command can create a proxy that will forward communications into the cluster-wide, private network. The proxy can be terminated by pressing control-C and won't show any output while it's running. \*\*You need to open a second terminal window to run the proxy.\*\* ```shell kubectl proxy ``` We now have a connection between our host (the terminal) and the Kubernetes cluster. The proxy enables direct access to the API from these terminals. You can see all those APIs hosted through the proxy endpoint. For example, we can query the version directly through the API using the `curl` command: ```shell curl http://localhost:8001/version ``` {{< note >}} If port 8001 is not accessible, ensure that the `kubectl proxy` that you started above is running in the second terminal. {{< /note >}} The API server will automatically create an endpoint for each pod, based on the pod name, that is also accessible through the proxy. First we need to get the Pod name, and we'll store it in the environment variable `POD\_NAME`. ```shell export POD\_NAME=$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') echo Name of the Pod: $POD\_NAME ``` You can access the Pod through the proxied API, by running: ```shell curl http://localhost:8001/api/v1/namespaces/default/pods/$POD\_NAME:8080/proxy/ ``` In order for the new Deployment to be accessible without using the proxy, a Service is required which will be explained in [Module 4](/docs/tutorials/kubernetes-basics/expose/). ## {{% heading "whatsnext" %}} \* Tutorial [Viewing Pods and Nodes](/docs/tutorials/kubernetes-basics/explore/explore-intro/). \* Learn more about [Deployments](/docs/concepts/workloads/controllers/deployment/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.md
|
[
0.05374665930867195,
-0.05926361307501793,
0.0420696847140789,
0.006968140136450529,
0.031638916581869125,
-0.0016257779207080603,
-0.030100032687187195,
0.0005020622629672289,
0.018161369487643242,
0.041303347796201706,
-0.03251367434859276,
-0.09153773635625839,
0.0611693449318409,
-0.05787660926580429,
-0.003506115172058344,
-0.049133218824863434,
0.09447788447141647,
-0.02878122590482235,
-0.00033823828562162817,
-0.02942683920264244,
-0.027079066261649132,
0.013225930742919445,
0.023177936673164368,
-0.0033107902854681015,
-0.047888465225696564,
-0.000023234848413267173,
-0.027993516996502876,
-0.01703614369034767,
0.014063151553273201,
-0.00020475761266425252,
-0.04284147545695305,
-0.015307863242924213,
0.02091098763048649,
0.05545967444777489,
0.09064842760562897,
0.12585677206516266,
0.00033253736910410225,
-0.008516849018633366,
-0.07659152150154114,
-0.016824042424559593,
0.09271642565727234,
-0.053456977009773254,
-0.008287976495921612,
-0.07521641999483109,
0.019191406667232513,
-0.03957495093345642,
-0.04409406706690788,
-0.029781831428408623,
0.008131276816129684,
0.0073178838938474655,
-0.009073066525161266,
-0.1113571748137474,
-0.051673244684934616,
0.017773499712347984,
-0.04504184424877167,
0.07974564284086227,
-0.019442811608314514,
0.048285625874996185,
0.061809051781892776,
0.008650173433125019,
0.041060686111450195,
-0.0341421402990818,
0.028842778876423836,
-0.013165856711566448,
-0.04893743619322777,
0.019070763140916824,
0.044512372463941574,
-0.03803884983062744,
0.06972967833280563,
-0.09990634024143219,
0.03675996512174606,
0.04409070685505867,
-0.0566791370511055,
-0.10248149931430817,
-0.13464204967021942,
-0.033193569630384445,
0.021618815138936043,
0.09541694819927216,
-0.0014987037284299731,
-0.061430834233760834,
0.018025998026132584,
0.02712923474609852,
0.02399194799363613,
0.0587945356965065,
-0.17034514248371124,
-0.03602834790945053,
-0.02127477526664734,
-0.03165078163146973,
0.06883911043405533,
-0.04143146425485611,
0.0016689469339326024,
-0.005628006067126989,
-0.05872412398457527,
-0.07057736814022064,
0.024818360805511475,
-0.0027055356185883284,
-0.020743634551763535,
0.027865177020430565,
0.10890534520149231,
0.0038023702800273895,
0.0424356646835804,
-0.026728114113211632,
0.015824321657419205,
-0.05370752885937691,
0.010625774040818214,
0.005002736113965511,
-0.053741205483675,
-0.04610942304134369,
0.019190290942788124,
0.05247640609741211,
-0.006748128682374954,
0.11609874665737152,
-0.047336988151073456,
0.0111110033467412,
-0.036898285150527954,
-0.02187863551080227,
0.03466269001364708,
-0.029935164377093315,
0.012180158868432045,
0.1034097895026207,
0.06448213756084442,
-0.09675627201795578,
0.07947082072496414,
-0.036569658666849136,
-0.04975077882409096,
-0.009623119607567787,
-0.0735841691493988,
3.1478805666379894e-33,
0.025377724319696426,
-0.14547766745090485,
0.0800824835896492,
-0.02184233069419861,
0.06916492432355881,
-0.03479820489883423,
-0.0479544959962368,
-0.027731265872716904,
-0.0673125609755516,
-0.08142843097448349,
-0.057793281972408295,
0.06870303303003311,
0.005129464901983738,
0.0015568782109767199,
-0.031153744086623192,
0.013771754689514637,
-0.06792334467172623,
0.031161727383732796,
0.047248002141714096,
-0.037837136536836624,
-0.00793459638953209,
-0.0636853277683258,
-0.06191716715693474,
0.014461133629083633,
-0.0021969967056065798,
-0.06223919987678528,
0.05452635511755943,
-0.042183056473731995,
-0.000018769225789583288,
0.004135059658437967,
-0.013254135847091675,
-0.012962750159204006,
0.021360324695706367,
-0.021240489557385445,
-0.07245878130197525,
-0.0027117235586047173,
-0.023178115487098694,
0.050459910184144974,
-0.0829203799366951,
0.01852160319685936,
0.020089179277420044,
0.0017346972599625587,
0.0442526675760746,
-0.09164968132972717,
0.10139121115207672,
-0.02179105207324028,
0.05452355742454529,
-0.09826686978340149,
0.09623569250106812,
-0.03772911801934242,
0.03811824321746826,
-0.08759232610464096,
0.02761245146393776,
-0.008653429336845875,
0.0029537328518927097,
0.08107203245162964,
0.0776357650756836,
-0.09099679440259933,
-0.028222953900694847,
0.014620594680309296,
-0.05796360597014427,
0.0046617574989795685,
-0.01842881739139557,
0.015038073062896729,
-0.01265562605112791,
0.019622720777988434,
-0.02587723731994629,
0.08488105982542038,
-0.03791132569313049,
0.09874435514211655,
-0.03427836671471596,
0.023333299905061722,
0.039171937853097916,
0.008087080903351307,
0.035779476165771484,
-0.033022601157426834,
0.021991435438394547,
0.03597955033183098,
-0.13851571083068848,
0.09036657214164734,
0.003425752744078636,
-0.06572391092777252,
-0.07927267253398895,
0.08130630850791931,
-0.014798257499933243,
-0.05704546347260475,
0.03858587145805359,
-0.018675247207283974,
0.013243419118225574,
0.0556972436606884,
0.01050699595361948,
-0.03547317534685135,
-0.06760615110397339,
-0.012320635840296745,
-0.05754777416586876,
-6.04711909882211e-33,
0.05490852892398834,
0.054935842752456665,
0.06084355711936951,
-0.020413599908351898,
0.05042639002203941,
0.005727678071707487,
-0.033430639654397964,
0.04408268630504608,
-0.03947537764906883,
-0.0293764378875494,
-0.04319187253713608,
0.021437425166368484,
0.0015516154235228896,
0.022467095404863358,
-0.14156600832939148,
0.016543176025152206,
0.05026783049106598,
-0.0483405701816082,
0.010917696170508862,
0.03489113971590996,
0.004953192546963692,
-0.026786204427480698,
0.06183962523937225,
-0.012342720292508602,
-0.008278359659016132,
-0.018800631165504456,
0.0561026930809021,
0.03856213018298149,
-0.05223556607961655,
-0.016934704035520554,
-0.026689305901527405,
-0.07298366725444794,
0.00860072672367096,
0.03370485454797745,
0.06705071777105331,
-0.014307134784758091,
-0.027416955679655075,
-0.04010988399386406,
0.03010481968522072,
-0.05205746740102768,
-0.010614299215376377,
-0.046758830547332764,
-0.021871503442525864,
-0.025639964267611504,
-0.011941224336624146,
0.0011718173045665026,
0.009530935436487198,
0.008709740824997425,
-0.010402522049844265,
-0.07932094484567642,
-0.04004933312535286,
0.0027558100409805775,
-0.09172391891479492,
0.08119650930166245,
0.016232620924711227,
0.04846028611063957,
-0.01409836858510971,
0.12686064839363098,
-0.0414155051112175,
0.03034798987209797,
0.06715923547744751,
-0.12459854036569595,
0.0011229399824514985,
0.022409232333302498,
-0.056680839508771896,
-0.04732158035039902,
-0.022642314434051514,
0.039686113595962524,
-0.11838990449905396,
0.09717823565006256,
-0.08373074978590012,
0.026099491864442825,
0.01795331761240959,
0.03464268520474434,
-0.06518833339214325,
-0.013305870816111565,
0.04976744204759598,
-0.019550058990716934,
0.001740694628097117,
-0.012171045877039433,
0.029307741671800613,
0.07330665737390518,
-0.09307655692100525,
-0.05496830865740776,
0.024109048768877983,
0.04954913258552551,
0.05093292146921158,
0.06564111262559891,
0.11082971841096878,
0.05454177409410477,
-0.03329964354634285,
0.01789149083197117,
-0.06496875733137131,
0.052861787378787994,
-0.05414322391152382,
-5.2761478741558676e-8,
0.01542847789824009,
0.05756600946187973,
-0.015528100542724133,
0.014900916256010532,
0.00984159391373396,
0.01740090735256672,
0.07982543110847473,
-0.00733825983479619,
-0.016042916104197502,
-0.016542948782444,
-0.03646393492817879,
-0.008571983315050602,
-0.06035643443465233,
0.002263615606352687,
0.039626047015190125,
0.04819658026099205,
-0.007194618694484234,
-0.0070456224493682384,
0.07372044771909714,
-0.034774407744407654,
-0.056453071534633636,
-0.052899058908224106,
0.06378080695867538,
0.023144209757447243,
0.007023068144917488,
0.03935074433684349,
0.03209855034947395,
0.0034384513273835182,
-0.0032033813185989857,
0.01766207255423069,
0.026850122958421707,
0.0063939145766198635,
-0.047774817794561386,
0.04866212606430054,
-0.0007495568133890629,
-0.0140813197940588,
-0.15884166955947876,
0.09020739048719406,
0.08582066744565964,
0.059710793197155,
0.003710821270942688,
0.014416590332984924,
-0.01069875992834568,
-0.027234584093093872,
0.0009601057390682399,
0.048050351440906525,
0.0365828238427639,
0.024794358760118484,
-0.041876886039972305,
0.04758135974407196,
-0.021626939997076988,
-0.07268736511468887,
-0.02176879718899727,
0.05302352458238602,
0.016039863228797913,
0.08047997951507568,
-0.006496747490018606,
-0.0789656862616539,
0.06197171285748482,
0.040837809443473816,
-0.01680164411664009,
0.040475115180015564,
-0.028972409665584564,
0.01884130947291851
] | 0.080046
|
This tutorial provides an introduction to managing applications with {{< glossary\_tooltip text="StatefulSets" term\_id="statefulset" >}}. It demonstrates how to create, delete, scale, and update the Pods of StatefulSets. ## {{% heading "prerequisites" %}} Before you begin this tutorial, you should familiarize yourself with the following Kubernetes concepts: \* [Pods](/docs/concepts/workloads/pods/) \* [Cluster DNS](/docs/concepts/services-networking/dns-pod-service/) \* [Headless Services](/docs/concepts/services-networking/service/#headless-services) \* [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) \* [PersistentVolumes Provisioning](/docs/concepts/storage/dynamic-provisioning/) \* The [kubectl](/docs/reference/kubectl/kubectl/) command line tool {{% include "task-tutorial-prereqs.md" %}} You should configure `kubectl` to use a context that uses the `default` namespace. If you are using an existing cluster, make sure that it's OK to use that cluster's default namespace to practice. Ideally, practice in a cluster that doesn't run any real workloads. It's also useful to read the concept page about [StatefulSets](/docs/concepts/workloads/controllers/statefulset/). {{< note >}} This tutorial assumes that your cluster is configured to dynamically provision PersistentVolumes. You'll also need to have a [default StorageClass](/docs/concepts/storage/storage-classes/#default-storageclass). If your cluster is not configured to provision storage dynamically, you will have to manually provision two 1 GiB volumes prior to starting this tutorial and set up your cluster so that those PersistentVolumes map to the PersistentVolumeClaim templates that the StatefulSet defines. {{< /note >}} ## {{% heading "objectives" %}} StatefulSets are intended to be used with stateful applications and distributed systems. However, the administration of stateful applications and distributed systems on Kubernetes is a broad, complex topic. In order to demonstrate the basic features of a StatefulSet, and not to conflate the former topic with the latter, you will deploy a simple web application using a StatefulSet. After this tutorial, you will be familiar with the following. \* How to create a StatefulSet \* How a StatefulSet manages its Pods \* How to delete a StatefulSet \* How to scale a StatefulSet \* How to update a StatefulSet's Pods ## Creating a StatefulSet Begin by creating a StatefulSet (and the Service that it relies upon) using the example below. It is similar to the example presented in the [StatefulSets](/docs/concepts/workloads/controllers/statefulset/) concept. It creates a [headless Service](/docs/concepts/services-networking/service/#headless-services), `nginx`, to publish the IP addresses of Pods in the StatefulSet, `web`. {{% code\_sample file="application/web/web.yaml" %}} You will need to use at least two terminal windows. In the first terminal, use [`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to {{< glossary\_tooltip text="watch" term\_id="watch" >}} the creation of the StatefulSet's Pods. ```shell # use this terminal to run commands that specify --watch # end this watch when you are asked to start a new watch kubectl get pods --watch -l app=nginx ``` In the second terminal, use [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands/#apply) to create the headless Service and StatefulSet: ```shell kubectl apply -f https://k8s.io/examples/application/web/web.yaml ``` ``` service/nginx created statefulset.apps/web created ``` The command above creates two Pods, each running an [NGINX](https://www.nginx.com) webserver. Get the `nginx` Service... ```shell kubectl get service nginx ``` ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE nginx ClusterIP None 80/TCP 12s ``` ...then get the `web` StatefulSet, to verify that both were created successfully: ```shell kubectl get statefulset web ``` ``` NAME READY AGE web 2/2 37s ``` ### Ordered Pod creation A StatefulSet defaults to creating its Pods in a strict order. For a StatefulSet with \_n\_ replicas, when Pods are being deployed, they are created sequentially, ordered from \_{0..n-1}\_. Examine the output of the `kubectl get` command in the first terminal. Eventually, the output will look like the example below. ```shell # Do not start a new watch; # this should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating 0 0s web-0 1/1 Running 0 19s web-1 0/1 Pending 0
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.00910323765128851,
-0.004446891136467457,
0.051073264330625534,
-0.022885575890541077,
-0.07664359360933304,
-0.011451374739408493,
-0.000399912241846323,
-0.015250660479068756,
0.011037223041057587,
0.07071785628795624,
-0.02265997789800167,
-0.05310710147023201,
-0.008111460134387016,
-0.02457408420741558,
0.02262233756482601,
-0.003794369287788868,
0.03224143385887146,
-0.046387623995542526,
-0.032205451279878616,
-0.04144354537129402,
0.02468140982091427,
0.038225315511226654,
0.01534317247569561,
0.030037524178624153,
-0.030997222289443016,
0.06135155260562897,
-0.03131910786032677,
-0.04926406219601631,
0.036432959139347076,
0.021697450429201126,
-0.023826735094189644,
0.021206924691796303,
0.03442104160785675,
0.017066244035959244,
0.0942196473479271,
0.09535630792379379,
0.04697072505950928,
-0.03187355399131775,
-0.08304253965616226,
-0.021958978846669197,
0.0678914338350296,
-0.04800941050052643,
-0.0832858756184578,
0.014762945473194122,
0.0224327240139246,
0.02168245054781437,
-0.04960436001420021,
-0.05707018822431564,
0.023157484829425812,
-0.029537661001086235,
0.012303173542022705,
-0.10842916369438171,
0.052511874586343765,
0.05391677841544151,
0.06723207980394363,
0.07361607253551483,
0.02026359923183918,
0.07864728569984436,
0.06721831858158112,
-0.017594266682863235,
0.03261234611272812,
0.0003360237751621753,
0.024440022185444832,
-0.02474278211593628,
0.02119850367307663,
0.002359747188165784,
-0.0003247309650760144,
0.023730486631393433,
0.011467879638075829,
-0.029004476964473724,
-0.01029799785465002,
0.054004013538360596,
-0.017186716198921204,
-0.05665384605526924,
-0.05289926752448082,
-0.029524654150009155,
-0.031140629202127457,
0.07721181213855743,
0.006631260737776756,
-0.06961693614721298,
0.021449364721775055,
0.06449496746063232,
0.03810951113700867,
0.0642506405711174,
-0.11436090618371964,
-0.04721026122570038,
0.009098894894123077,
-0.11366257071495056,
0.05113787204027176,
0.0063242060132324696,
0.0046759010292589664,
-0.08240621536970139,
0.046255454421043396,
-0.1605585813522339,
0.04019007086753845,
0.007382804527878761,
-0.018523551523685455,
0.002128294436261058,
0.007973168976604939,
-0.0008214209810830653,
0.050913844257593155,
-0.03672613948583603,
0.03414537385106087,
-0.009837805293500423,
0.018637103959918022,
-0.011852897703647614,
-0.08583531528711319,
-0.003478539176285267,
0.04315197840332985,
0.05624402314424515,
-0.015269874595105648,
0.03888998553156853,
-0.040033601224422455,
0.0501946285367012,
0.011439107358455658,
-0.02441505528986454,
0.01520172506570816,
-0.0035032592713832855,
0.03307020291686058,
0.0693150982260704,
0.026082992553710938,
-0.12912540137767792,
-0.017685936763882637,
-0.050996895879507065,
-0.06779856979846954,
0.05069518834352493,
0.005356102250516415,
3.2239030923835284e-33,
0.05794423446059227,
-0.07815564423799515,
-0.021746693179011345,
0.022331153973937035,
0.049637746065855026,
-0.08311772346496582,
0.0036832934711128473,
-0.002286211121827364,
-0.05668710172176361,
-0.038795579224824905,
-0.049809779971838,
0.14446665346622467,
-0.022383302450180054,
0.00024760272935964167,
0.007920142263174057,
-0.07077757269144058,
-0.05785863846540451,
0.08104892820119858,
0.1323758065700531,
-0.04001849144697189,
0.0435917004942894,
0.007478369865566492,
-0.04266476631164551,
-0.04734480381011963,
0.027962930500507355,
0.007385577540844679,
0.04511168971657753,
-0.07145853340625763,
-0.02769055776298046,
0.0018712746677920222,
-0.006998087745159864,
0.003918552305549383,
-0.002908549038693309,
0.0061029414646327496,
-0.15169893205165863,
-0.028757527470588684,
-0.04168090969324112,
0.005950785242021084,
-0.04520580172538757,
-0.08467528969049454,
0.03907147794961929,
-0.029123743996024132,
-0.014781436882913113,
-0.023158211261034012,
0.06325225532054901,
0.01686718501150608,
0.06685204803943634,
-0.09579045325517654,
0.07656165957450867,
0.030090898275375366,
0.0012502307072281837,
-0.09451477974653244,
0.0006626162794418633,
-0.07871370762586594,
0.020249268040060997,
0.034621961414813995,
0.05113908275961876,
-0.04558593034744263,
-0.046551816165447235,
-0.07337000221014023,
-0.06166248768568039,
-0.010828022845089436,
-0.04795078933238983,
0.039881907403469086,
0.05140214040875435,
0.0037856705021113157,
-0.021567804738879204,
0.04068954288959503,
0.02059307135641575,
-0.032667145133018494,
-0.05211273580789566,
0.035284385085105896,
-0.003966030664741993,
0.03996340557932854,
-0.003699436318129301,
-0.06359261274337769,
0.017878077924251556,
0.020909493789076805,
-0.1798347532749176,
0.03192907199263573,
0.03826098516583443,
-0.028712768107652664,
-0.0846470296382904,
0.10939820855855942,
0.06143134459853172,
-0.006075453478842974,
0.03098307177424431,
-0.023789379745721817,
-0.057815492153167725,
0.047654006630182266,
-0.004218781366944313,
-0.03248801827430725,
-0.06209471821784973,
0.008114894852042198,
-0.1004834994673729,
-4.981028741914822e-33,
0.15811191499233246,
-0.025563271716237068,
-0.029930315911769867,
0.043502259999513626,
0.009072059765458107,
0.03021801821887493,
-0.023384999483823776,
0.11599626392126083,
-0.008460949175059795,
-0.05882243067026138,
-0.07358068227767944,
-0.01688162423670292,
0.04191698879003525,
0.016125567257404327,
-0.11108773946762085,
0.025241214781999588,
-0.09385060518980026,
-0.04211261495947838,
-0.025053486227989197,
0.03459137678146362,
-0.03878656402230263,
0.03250071778893471,
-0.014591426588594913,
0.04245058819651604,
-0.03138718754053116,
-0.038852233439683914,
0.02370404824614525,
0.03337743505835533,
-0.06270057708024979,
-0.05045648664236069,
-0.019288131967186928,
-0.09423446655273438,
-0.020805606618523598,
-0.010026522912085056,
-0.002337929792702198,
-0.03720250725746155,
0.022919416427612305,
0.010859185829758644,
-0.02989273890852928,
0.005909602157771587,
0.04567497596144676,
-0.03967700153589249,
-0.0724969357252121,
-0.07207968086004257,
-0.005243286956101656,
0.008394625037908554,
-0.001099298824556172,
0.0023635902907699347,
-0.04233139380812645,
-0.05985391512513161,
0.014384620822966099,
-0.012385943904519081,
-0.11107705533504486,
0.08818814903497696,
-0.03417406976222992,
0.07103484123945236,
0.07905984669923782,
0.03624110668897629,
-0.041225749999284744,
0.02194266952574253,
0.03208247572183609,
-0.09075446426868439,
0.03569168224930763,
0.05194960907101631,
0.008245578035712242,
-0.05548766627907753,
-0.006102239713072777,
0.04143049195408821,
-0.031094104051589966,
-0.013830063864588737,
-0.03291891887784004,
-0.023597128689289093,
0.04277912899851799,
-0.011530407704412937,
0.0035341910552233458,
-0.04503441974520683,
0.03553632274270058,
-0.06082417443394661,
0.06227319687604904,
-0.007312362547963858,
-0.026126068085432053,
0.10491003841161728,
-0.06120589002966881,
0.006854117847979069,
0.04079563170671463,
0.07520482689142227,
0.08593151718378067,
0.09340965002775192,
0.038176972419023514,
0.11786589026451111,
-0.030068904161453247,
0.01544988714158535,
-0.017058920115232468,
0.117243692278862,
-0.06233442574739456,
-5.424134030818095e-8,
0.03497302159667015,
0.05482255294919014,
-0.0355926975607872,
0.08006312698125839,
0.009553150273859501,
-0.002404669998213649,
0.04162027686834335,
0.07726645469665527,
-0.04811299219727516,
-0.015344249084591866,
-0.053276218473911285,
0.06977137178182602,
-0.14093495905399323,
0.05325094982981682,
0.0009943753248080611,
-0.0069633047096431255,
0.02290869504213333,
0.0489291176199913,
-0.0005998950800858438,
-0.050790950655937195,
-0.02960645779967308,
-0.032330986112356186,
0.03835643455386162,
0.021102700382471085,
0.05542604252696037,
0.032061122357845306,
0.08746956288814545,
0.011259002611041069,
0.02938849851489067,
-0.0004065844404976815,
-0.016764789819717407,
0.020081395283341408,
-0.03293857350945473,
0.04984942823648453,
-0.01827598176896572,
0.001491438946686685,
-0.12171176820993423,
0.07393008470535278,
0.07599470019340515,
0.012746552005410194,
-0.03276285529136658,
0.023149903863668442,
-0.06735239923000336,
-0.005515389144420624,
0.02216506004333496,
0.07859907299280167,
-0.015215473249554634,
0.0719156339764595,
-0.005691859405487776,
-0.015232088975608349,
-0.06480713188648224,
-0.02205415815114975,
0.0011706273071467876,
0.06086378172039986,
-0.004848551470786333,
0.032266538590192795,
0.028605077415704727,
-0.05147974193096161,
0.04580637812614441,
0.036216121166944504,
0.020831715315580368,
0.01296971458941698,
-0.01805829256772995,
0.012272605672478676
] | 0.187977
|
# Do not start a new watch; # this should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating 0 0s web-0 1/1 Running 0 19s web-1 0/1 Pending 0 0s web-1 0/1 Pending 0 0s web-1 0/1 ContainerCreating 0 0s web-1 1/1 Running 0 18s ``` Notice that the `web-1` Pod is not launched until the `web-0` Pod is \_Running\_ (see [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)) and \_Ready\_ (see `type` in [Pod Conditions](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)). Later in this tutorial you will practice [parallel startup](#parallel-pod-management). {{< note >}} To configure the integer ordinal assigned to each Pod in a StatefulSet, see [Start ordinal](/docs/concepts/workloads/controllers/statefulset/#start-ordinal). {{< /note >}} ## Pods in a StatefulSet Pods in a StatefulSet have a unique ordinal index and a stable network identity. ### Examining the Pod's ordinal index Get the StatefulSet's Pods: ```shell kubectl get pods -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 1m web-1 1/1 Running 0 1m ``` As mentioned in the [StatefulSets](/docs/concepts/workloads/controllers/statefulset/) concept, the Pods in a StatefulSet have a sticky, unique identity. This identity is based on a unique ordinal index that is assigned to each Pod by the StatefulSet {{< glossary\_tooltip term\_id="controller" text="controller">}}. The Pods' names take the form `-`. Since the `web` StatefulSet has two replicas, it creates two Pods, `web-0` and `web-1`. ### Using stable network identities Each Pod has a stable hostname based on its ordinal index. Use [`kubectl exec`](/docs/reference/generated/kubectl/kubectl-commands/#exec) to execute the `hostname` command in each Pod: ```shell for i in 0 1; do kubectl exec "web-$i" -- sh -c 'hostname'; done ``` ``` web-0 web-1 ``` Use [`kubectl run`](/docs/reference/generated/kubectl/kubectl-commands/#run) to execute a container that provides the `nslookup` command from the `dnsutils` package. Using `nslookup` on the Pods' hostnames, you can examine their in-cluster DNS addresses: ```shell kubectl run -i --tty --image busybox:1.28 dns-test --restart=Never --rm ``` which starts a new shell. In that new shell, run: ```shell # Run this in the dns-test container shell nslookup web-0.nginx ``` The output is similar to: ``` Server: 10.0.0.10 Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local Name: web-0.nginx Address 1: 10.244.1.6 nslookup web-1.nginx Server: 10.0.0.10 Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local Name: web-1.nginx Address 1: 10.244.2.6 ``` (and now exit the container shell: `exit`) The CNAME of the headless service points to SRV records (one for each Pod that is Running and Ready). The SRV records point to A record entries that contain the Pods' IP addresses. In one terminal, watch the StatefulSet's Pods: ```shell # Start a new watch # End this watch when you've seen that the delete is finished kubectl get pod --watch -l app=nginx ``` In a second terminal, use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete) to delete all the Pods in the StatefulSet: ```shell kubectl delete pod -l app=nginx ``` ``` pod "web-0" deleted pod "web-1" deleted ``` Wait for the StatefulSet to restart them, and for both Pods to transition to Running and Ready: ```shell # This should already be running kubectl get pod --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 0/1 ContainerCreating 0 0s NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 2s web-1 0/1 Pending 0 0s web-1 0/1 Pending 0 0s web-1 0/1 ContainerCreating 0 0s web-1 1/1 Running 0 34s ``` Use `kubectl exec` and `kubectl run` to view the Pods' hostnames and in-cluster DNS entries. First, view the Pods' hostnames: ```shell for i in 0 1; do kubectl exec web-$i -- sh -c 'hostname'; done ``` ``` web-0 web-1 ``` then, run: ```shell kubectl run -i --tty --image busybox:1.28 dns-test --restart=Never --rm
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.022208012640476227,
0.005251131486147642,
0.02424679696559906,
-0.0024874063674360514,
0.0014527540188282728,
-0.025999711826443672,
-0.04173736646771431,
-0.02321632392704487,
0.02725715935230255,
0.0626126080751419,
0.027813704684376717,
-0.04328871890902519,
-0.05827844887971878,
-0.017082516103982925,
0.06792998313903809,
-0.009451230056583881,
0.01335426326841116,
-0.03401899337768555,
-0.016151707619428635,
-0.02632749266922474,
0.032890304923057556,
-0.006131855305284262,
0.05397772789001465,
0.005843532271683216,
-0.05779376998543739,
0.011936590075492859,
-0.08164418488740921,
-0.030522746965289116,
0.06428631395101547,
-0.03256591409444809,
0.0036828641314059496,
0.0030519512947648764,
-0.02795548178255558,
-0.0006071783136576414,
0.03655475378036499,
0.12817130982875824,
0.013935092836618423,
-0.08782824873924255,
-0.10847093909978867,
0.03911171853542328,
0.0960896834731102,
-0.04476004093885422,
-0.10332347452640533,
-0.03829042613506317,
-0.0364033542573452,
-0.0388910211622715,
-0.06295135617256165,
-0.022182339802384377,
0.04616426303982735,
-0.06347127258777618,
-0.09534009546041489,
-0.13393056392669678,
0.04077313840389252,
-0.027122726663947105,
0.062095701694488525,
0.003090131562203169,
-0.011294655501842499,
0.03063364326953888,
0.13216808438301086,
-0.01299691665917635,
0.04264652356505394,
-0.07087035477161407,
0.04261549189686775,
-0.052802674472332,
0.018140748143196106,
-0.040625736117362976,
-0.042916979640722275,
-0.0030052713118493557,
0.04496859386563301,
0.03698398172855377,
0.023283421993255615,
0.04039684310555458,
-0.01956513151526451,
-0.024310361593961716,
-0.06195494160056114,
-0.027351398020982742,
0.042729344218969345,
0.04102926328778267,
-0.035888344049453735,
-0.04147608205676079,
-0.04763906076550484,
-0.035605497658252716,
0.05248969793319702,
0.02160194329917431,
-0.06449271738529205,
-0.020090173929929733,
0.027074292302131653,
-0.04640556499361992,
0.02687242440879345,
-0.06023222580552101,
0.0108779426664114,
-0.00010609065066091716,
-0.0007400444010272622,
-0.02970021404325962,
0.052282970398664474,
0.03947625681757927,
-0.0016806158237159252,
0.09356346726417542,
-0.004045920912176371,
0.038407035171985626,
0.0610535591840744,
-0.026346122846007347,
0.04781889542937279,
0.051231469959020615,
0.028362561017274857,
-0.09228434413671494,
-0.06806512176990509,
0.03922585770487785,
0.02932683564722538,
0.0050238692201673985,
0.024651939049363136,
0.02912185713648796,
0.04491284117102623,
0.0890074372291565,
-0.07883977890014648,
0.03286292031407356,
-0.04967360571026802,
0.010096708312630653,
0.051693979650735855,
0.16159456968307495,
0.15411019325256348,
-0.040239300578832626,
0.01893439143896103,
0.03821232169866562,
0.015844233334064484,
-0.003760687541216612,
0.08256730437278748,
6.075753039182187e-33,
0.09632176160812378,
-0.09682568162679672,
-0.026776790618896484,
0.0015763636911287904,
0.08409909158945084,
-0.07197773456573486,
-0.027944764122366905,
0.0005800360231660306,
-0.05328601226210594,
0.029603395611047745,
-0.04292553663253784,
0.0402243547141552,
-0.06878583133220673,
0.027164367958903313,
-0.01023067906498909,
-0.0795421153306961,
-0.021102391183376312,
-0.03962859883904457,
0.1225263699889183,
-0.011042359285056591,
0.06547188013792038,
-0.08813444525003433,
-0.10329550504684448,
0.03009639121592045,
0.008865518495440483,
-0.016920072957873344,
-0.005563375074416399,
-0.0581708662211895,
-0.03464852645993233,
0.03337490186095238,
0.07477176934480667,
-0.041939977556467056,
-0.033592402935028076,
0.03670498728752136,
-0.1304079294204712,
-0.04612182453274727,
-0.0015354967908933759,
0.0480390228331089,
-0.13903602957725525,
-0.10110114514827728,
-0.01709926128387451,
0.0264420248568058,
-0.054850123822689056,
-0.09719038754701614,
-0.014808212406933308,
-0.08250288665294647,
-0.005138781853020191,
-0.04029902070760727,
0.06728716939687729,
0.049089740961790085,
-0.04192926734685898,
-0.018612653017044067,
0.016121365129947662,
-0.059211090207099915,
0.015676988288760185,
0.04250497370958328,
0.0014195420080795884,
-0.016370585188269615,
-0.08105460554361343,
-0.015856875106692314,
-0.034550078213214874,
0.016585813835263252,
0.017580723389983177,
0.02930852398276329,
0.016963616013526917,
0.03075741045176983,
0.043149277567863464,
0.017406553030014038,
0.039669714868068695,
0.04316854104399681,
-0.103807233273983,
0.03607569634914398,
0.005938262213021517,
0.026037177070975304,
-0.002266780473291874,
-0.030927738174796104,
0.048875465989112854,
-0.0035563160199671984,
-0.11625547707080841,
0.011689812876284122,
0.05884376913309097,
-0.0057806773111224174,
-0.028241336345672607,
0.06567768007516861,
-0.02324766293168068,
0.019044270738959312,
-0.013704144395887852,
0.00979631394147873,
-0.05242354795336723,
0.025076081976294518,
0.0000774353466113098,
0.009332988411188126,
-0.010787896811962128,
-0.030059482902288437,
-0.10823047906160355,
-7.736462438007129e-33,
0.0623689629137516,
-0.025755522772669792,
0.020996320992708206,
-0.023056650534272194,
-0.0038593262434005737,
-0.0026923497207462788,
0.008100834675133228,
0.01057923398911953,
-0.029301194474101067,
-0.007314873393625021,
0.025982603430747986,
-0.025562426075339317,
-0.02560330182313919,
0.09135653078556061,
-0.07619272917509079,
0.037309110164642334,
-0.028271915391087532,
-0.06261633336544037,
0.011057525873184204,
0.026276834309101105,
-0.049392107874155045,
0.053937751799821854,
0.028874579817056656,
0.04310115799307823,
0.007611873093992472,
0.027265001088380814,
0.077785424888134,
0.010590961202979088,
-0.06630172580480576,
-0.030655954033136368,
0.026129914447665215,
-0.0886155515909195,
-0.010954770259559155,
0.10090073198080063,
0.0035154714714735746,
-0.046454522758722305,
-0.0644315853714943,
0.03963717445731163,
0.04183455929160118,
-0.0392015315592289,
0.12944252789020538,
0.015672188252210617,
0.00040761922718957067,
-0.060930319130420685,
-0.07869649678468704,
-0.027815917506814003,
0.053926073014736176,
0.028418317437171936,
-0.04016495123505592,
-0.07405190914869308,
-0.04255980998277664,
0.027550851926207542,
-0.009032181464135647,
0.0329718291759491,
-0.0214100182056427,
-0.011122406460344791,
0.06124119460582733,
-0.02048225700855255,
-0.06529885530471802,
0.009908239357173443,
0.03075304813683033,
-0.10407756268978119,
0.026081815361976624,
0.0284685418009758,
0.000723521166946739,
-0.04173221439123154,
-0.08778132498264313,
0.031682077795267105,
0.011134566739201546,
0.002627691952511668,
0.045079853385686874,
0.06461091339588165,
0.011836221441626549,
0.021070625633001328,
-0.022759197279810905,
-0.024822473526000977,
-0.006752561777830124,
-0.036776166409254074,
0.021240422502160072,
0.01224574726074934,
-0.055327415466308594,
0.10835251957178116,
-0.07414644956588745,
-0.06699275225400925,
-0.0004996982170268893,
0.10612580925226212,
0.03082522563636303,
0.10863732546567917,
0.06538747251033783,
0.03337125480175018,
-0.020186908543109894,
0.028048917651176453,
-0.04037885367870331,
0.08268257975578308,
-0.008270081132650375,
-4.8459330770356246e-8,
0.0524531714618206,
-0.0008120963466353714,
-0.03334800899028778,
0.11143345385789871,
0.06599229574203491,
-0.06414689868688583,
-0.005161462817341089,
-0.061803583055734634,
-0.04165354743599892,
-0.0011714615393429995,
-0.004136047326028347,
0.07054024934768677,
-0.07260271161794662,
0.07146997004747391,
0.04303339123725891,
-0.0746229812502861,
-0.008805206045508385,
0.04676925763487816,
0.027567412704229355,
-0.05038546398282051,
-0.026971008628606796,
-0.07038384675979614,
0.005142934154719114,
0.014923159033060074,
0.05099233612418175,
0.054734356701374054,
0.08620501309633255,
0.011050873436033726,
0.010748573578894138,
-0.0055799419060349464,
-0.04380464553833008,
0.011991790495812893,
-0.07626792788505554,
0.02811291255056858,
-0.057087454944849014,
-0.039771128445863724,
-0.13605418801307678,
0.04700196906924248,
-0.005916312802582979,
-0.009899094700813293,
0.024530287832021713,
0.010560117661952972,
0.013140881434082985,
-0.006431060377508402,
0.0019104918465018272,
0.029360665008425713,
0.0009525016066618264,
0.06445185095071793,
0.050447072833776474,
-0.019679276272654533,
-0.03944207355380058,
-0.07307843863964081,
0.06604498624801636,
0.05600619316101074,
0.019591113552451134,
0.01843196339905262,
0.060981567949056625,
-0.04335673525929451,
-0.024055661633610725,
0.009104087948799133,
0.06528197973966599,
-0.06904499977827072,
-0.04775014892220497,
-0.021967891603708267
] | 0.131716
|
exec` and `kubectl run` to view the Pods' hostnames and in-cluster DNS entries. First, view the Pods' hostnames: ```shell for i in 0 1; do kubectl exec web-$i -- sh -c 'hostname'; done ``` ``` web-0 web-1 ``` then, run: ```shell kubectl run -i --tty --image busybox:1.28 dns-test --restart=Never --rm ``` which starts a new shell. In that new shell, run: ```shell # Run this in the dns-test container shell nslookup web-0.nginx ``` The output is similar to: ``` Server: 10.0.0.10 Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local Name: web-0.nginx Address 1: 10.244.1.7 nslookup web-1.nginx Server: 10.0.0.10 Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local Name: web-1.nginx Address 1: 10.244.2.8 ``` (and now exit the container shell: `exit`) The Pods' ordinals, hostnames, SRV records, and A record names have not changed, but the IP addresses associated with the Pods may have changed. In the cluster used for this tutorial, they have. This is why it is important not to configure other applications to connect to Pods in a StatefulSet by the IP address of a particular Pod (it is OK to connect to Pods by resolving their hostname). #### Discovery for specific Pods in a StatefulSet If you need to find and connect to the active members of a StatefulSet, you should query the CNAME of the headless Service (`nginx.default.svc.cluster.local`). The SRV records associated with the CNAME will contain only the Pods in the StatefulSet that are Running and Ready. If your application already implements connection logic that tests for liveness and readiness, you can use the SRV records of the Pods ( `web-0.nginx.default.svc.cluster.local`, `web-1.nginx.default.svc.cluster.local`), as they are stable, and your application will be able to discover the Pods' addresses when they transition to Running and Ready. If your application wants to find any healthy Pod in a StatefulSet, and therefore does not need to track each specific Pod, you could also connect to the IP address of a `type: ClusterIP` Service, backed by the Pods in that StatefulSet. You can use the same Service that tracks the StatefulSet (specified in the `serviceName` of the StatefulSet) or a separate Service that selects the right set of Pods. ### Writing to stable storage Get the PersistentVolumeClaims for `web-0` and `web-1`: ```shell kubectl get pvc -l app=nginx ``` The output is similar to: ``` NAME STATUS VOLUME CAPACITY ACCESSMODES AGE www-web-0 Bound pvc-15c268c7-b507-11e6-932f-42010a800002 1Gi RWO 48s www-web-1 Bound pvc-15c79307-b507-11e6-932f-42010a800002 1Gi RWO 48s ``` The StatefulSet controller created two {{< glossary\_tooltip text="PersistentVolumeClaims" term\_id="persistent-volume-claim" >}} that are bound to two {{< glossary\_tooltip text="PersistentVolumes" term\_id="persistent-volume" >}}. As the cluster used in this tutorial is configured to dynamically provision PersistentVolumes, the PersistentVolumes were created and bound automatically. The NGINX webserver, by default, serves an index file from `/usr/share/nginx/html/index.html`. The `volumeMounts` field in the StatefulSet's `spec` ensures that the `/usr/share/nginx/html` directory is backed by a PersistentVolume. Write the Pods' hostnames to their `index.html` files and verify that the NGINX webservers serve the hostnames: ```shell for i in 0 1; do kubectl exec "web-$i" -- sh -c 'echo "$(hostname)" > /usr/share/nginx/html/index.html'; done for i in 0 1; do kubectl exec -i -t "web-$i" -- curl http://localhost/; done ``` ``` web-0 web-1 ``` {{< note >}} If you instead see \*\*403 Forbidden\*\* responses for the above curl command, you will need to fix the permissions of the directory mounted by the `volumeMounts` (due to a [bug when using hostPath volumes](https://github.com/kubernetes/kubernetes/issues/2630)), by running: `for i in 0 1; do kubectl exec web-$i -- chmod 755 /usr/share/nginx/html; done` before retrying the `curl` command above. {{< /note >}} In one terminal, watch the StatefulSet's Pods: ```shell # End this watch when you've reached the end of the section. #
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
0.027184130623936653,
-0.011025787331163883,
-0.0018627865938469768,
-0.03210628777742386,
-0.06381490081548691,
-0.07756389677524567,
-0.06294496357440948,
-0.037625350058078766,
0.08354756981134415,
0.0512821264564991,
-0.011216899380087852,
-0.10776650160551071,
-0.06521504372358322,
-0.021234650164842606,
0.009546053595840931,
-0.06667153537273407,
0.02469640225172043,
0.0046742563135921955,
0.01795429177582264,
-0.04566353186964989,
0.006938386242836714,
0.052639272063970566,
0.0028161148075014353,
-0.06763122230768204,
-0.07285932451486588,
0.007766803726553917,
-0.07356336712837219,
-0.035407859832048416,
0.03543059527873993,
-0.07316751033067703,
0.0014160322025418282,
0.01640293002128601,
0.0008322989451698959,
0.009246021509170532,
0.11865099519491196,
0.1461123675107956,
0.06552070379257202,
0.02153094671666622,
-0.09584478288888931,
-0.02341468632221222,
0.1456703394651413,
-0.029293235391378403,
0.02342667430639267,
-0.07060558348894119,
-0.019256357103586197,
-0.014696740545332432,
-0.0724690854549408,
0.019965728744864464,
0.014548043720424175,
-0.07788821309804916,
-0.020296907052397728,
-0.11261569708585739,
-0.008270205929875374,
0.00598386162891984,
0.03499976918101311,
0.057459473609924316,
-0.04557732865214348,
0.07762771844863892,
0.10735823959112167,
0.005593911278992891,
-0.009217909537255764,
0.009536728262901306,
0.07624905556440353,
-0.01816701702773571,
0.027573050931096077,
-0.043150123208761215,
0.010522873140871525,
-0.0067979516461491585,
-0.00828398484736681,
0.014980621635913849,
0.03499457240104675,
0.045566361397504807,
-0.04598826915025711,
-0.0823432207107544,
-0.08233604580163956,
-0.004508251789957285,
-0.027697555720806122,
0.038882024586200714,
-0.09623633325099945,
-0.0008366230758838356,
0.019622234627604485,
0.0293061975389719,
0.01205222774296999,
-0.000059015259466832504,
-0.0973256304860115,
0.037948161363601685,
0.011207718402147293,
-0.07662460207939148,
0.03175114467740059,
-0.019966553896665573,
-0.02501533553004265,
-0.07272900640964508,
-0.009432995691895485,
-0.061051204800605774,
0.05243055894970894,
0.03686768189072609,
0.006485662888735533,
0.12756666541099548,
0.031864482909440994,
0.021173622459173203,
0.022449975833296776,
-0.021783405914902687,
0.029770465567708015,
-0.014312708750367165,
0.00400765985250473,
-0.040336187928915024,
-0.04412635788321495,
-0.013359256088733673,
0.07852949947118759,
0.014673016965389252,
-0.0303054042160511,
0.02143136039376259,
0.007098698057234287,
0.05795730650424957,
-0.05516853183507919,
-0.05373023450374603,
0.0151643892750144,
-0.008450527675449848,
0.06549842655658722,
0.0556153878569603,
0.07020419090986252,
-0.08327726274728775,
-0.0429806187748909,
0.03915812447667122,
-0.0380074568092823,
0.006784954108297825,
0.030919618904590607,
2.3377952469245334e-33,
0.0764850527048111,
-0.11798586696386337,
0.057963695377111435,
-0.008409947156906128,
0.07895579934120178,
-0.09353910386562347,
-0.01418127678334713,
0.010790692642331123,
-0.05466441810131073,
0.046146001666784286,
-0.04599851742386818,
0.04941783845424652,
0.01913335546851158,
-0.03450550138950348,
0.045747965574264526,
0.04847239330410957,
-0.02444479987025261,
0.0034843217581510544,
0.06314875185489655,
0.031071707606315613,
0.08666542172431946,
-0.04969623684883118,
-0.08126053214073181,
0.045233748853206635,
-0.0013594033662229776,
-0.029743742197752,
-0.0070919073186814785,
-0.08974888175725937,
-0.008448771201074123,
-0.020679689943790436,
0.08243303000926971,
-0.06249166652560234,
-0.0468672551214695,
0.07389418035745621,
-0.09701234102249146,
0.004725446458905935,
0.051198169589042664,
0.05827530100941658,
-0.09278764575719833,
-0.05196639895439148,
0.02483002468943596,
-0.02125944383442402,
-0.06717607378959656,
0.007991050370037556,
0.072610042989254,
-0.045605797320604324,
-0.04803973063826561,
-0.10386132448911667,
0.0633489266037941,
0.031413063406944275,
0.020519038662314415,
-0.07172422111034393,
0.030773432925343513,
-0.032742179930210114,
0.05500778183341026,
0.06411828845739365,
0.005288860760629177,
-0.04466484114527702,
-0.05354556813836098,
0.04493379965424538,
-0.05517011508345604,
0.0057520875707268715,
-0.05697355419397354,
0.035486333072185516,
0.02125275321304798,
-0.010376449674367905,
0.0518256351351738,
0.0534844771027565,
0.000704599020536989,
0.030854184180498123,
-0.0613667257130146,
0.03972722589969635,
0.013806049712002277,
0.04577815905213356,
0.0039735580794513226,
-0.013847553171217442,
-0.00416115066036582,
-0.050048068165779114,
-0.1134663000702858,
0.03128047287464142,
0.09230148047208786,
-0.0039650313556194305,
-0.1217157393693924,
0.063121497631073,
0.042261429131031036,
0.06117603927850723,
-0.03061838261783123,
-0.006538087502121925,
-0.02769908495247364,
-0.005423687864094973,
-0.009866157546639442,
0.022872742265462875,
-0.10451418161392212,
-0.015962235629558563,
-0.11076613515615463,
-4.74693749081421e-33,
0.11525020748376846,
-0.012172083370387554,
-0.011052777990698814,
0.0003469383518677205,
-0.025800947099924088,
0.004760403651744127,
0.037307318300008774,
0.03704956918954849,
-0.051027506589889526,
-0.06529318541288376,
-0.05775218829512596,
-0.023967940360307693,
0.04081825911998749,
0.0733967050909996,
-0.05982635170221329,
0.06820698827505112,
-0.02885073982179165,
-0.06946711987257004,
-0.019582495093345642,
0.008573951199650764,
-0.04870699346065521,
0.05662092939019203,
0.032542094588279724,
0.06693924218416214,
-0.06582605838775635,
-0.009592047892510891,
0.07615387439727783,
0.03056570142507553,
-0.12504330277442932,
-0.010397243313491344,
0.020116252824664116,
-0.04741706699132919,
-0.039376989006996155,
0.11320352554321289,
0.0025926127564162016,
0.017123257741332054,
-0.049246665090322495,
0.019018692895770073,
0.06056664139032364,
-0.05084797739982605,
0.031396396458148956,
0.013428829610347748,
-0.08798748254776001,
0.006715185474604368,
-0.07330220937728882,
0.01344507560133934,
0.04954042658209801,
0.021840278059244156,
-0.017117219045758247,
-0.007223909720778465,
0.015638556331396103,
-0.0007520829676650465,
-0.05697948858141899,
0.07978405803442001,
-0.0037338121328502893,
0.04671992361545563,
0.005105320829898119,
0.03802890330553055,
-0.053850799798965454,
0.030199676752090454,
0.08349236845970154,
-0.08835726231336594,
-0.004035596735775471,
0.08430413901805878,
-0.029829975217580795,
-0.03563994914293289,
-0.06158841401338577,
0.03968777507543564,
0.004234892316162586,
0.007697169203311205,
0.03098604641854763,
0.009385932236909866,
-0.037149082869291306,
0.057698432356119156,
-0.01685228757560253,
0.0005158173153176904,
0.05096304044127464,
-0.016397612169384956,
0.008759979158639908,
0.060394544154405594,
-0.06888493150472641,
0.0845939889550209,
-0.07449900358915329,
-0.0499880388379097,
0.02611399069428444,
0.0823681503534317,
0.061094846576452255,
0.07771503180265427,
0.04190739616751671,
0.06887979805469513,
0.023167988285422325,
0.029201321303844452,
0.017884396016597748,
0.024769021198153496,
-0.04819056764245033,
-4.655003493780896e-8,
0.07553243637084961,
-0.05221349373459816,
-0.05086159706115723,
0.07545223832130432,
0.011955207213759422,
0.02189529500901699,
0.01062778476625681,
-0.011931497603654861,
-0.07786913216114044,
-0.04572759196162224,
-0.046518877148628235,
0.02820790559053421,
-0.10470154881477356,
0.05286029353737831,
0.04102789983153343,
-0.011211544275283813,
0.022288378328084946,
0.04563193395733833,
0.04647807404398918,
-0.05767073109745979,
-0.07040413469076157,
-0.01919502764940262,
0.014434739015996456,
-0.033827900886535645,
-0.03477925807237625,
0.04070677608251572,
0.08086869865655899,
-0.025452354922890663,
-0.021813729777932167,
0.02147854119539261,
-0.015793148428201675,
-0.0027299742214381695,
-0.09349698573350906,
0.02138669416308403,
-0.0109014343470335,
-0.0249344315379858,
-0.11847154051065445,
0.02935601957142353,
0.012214244343340397,
-0.02558957412838936,
-0.012547441758215427,
0.04524896666407585,
0.02696586772799492,
-0.013851652853190899,
-0.017907071858644485,
0.032600145787000656,
0.04624760150909424,
0.059272248297929764,
0.05878413841128349,
-0.06601887196302414,
-0.04038954898715019,
-0.03014364279806614,
-0.017647020518779755,
0.04003654420375824,
-0.046672072261571884,
0.052294425666332245,
0.015781687572598457,
-0.05004028603434563,
-0.029286392033100128,
0.07672333717346191,
-0.009066309779882431,
0.012687736190855503,
-0.005102382507175207,
0.013540202751755714
] | 0.139069
|
when using hostPath volumes](https://github.com/kubernetes/kubernetes/issues/2630)), by running: `for i in 0 1; do kubectl exec web-$i -- chmod 755 /usr/share/nginx/html; done` before retrying the `curl` command above. {{< /note >}} In one terminal, watch the StatefulSet's Pods: ```shell # End this watch when you've reached the end of the section. # At the start of "Scaling a StatefulSet" you'll start a new watch. kubectl get pod --watch -l app=nginx ``` In a second terminal, delete all of the StatefulSet's Pods: ```shell kubectl delete pod -l app=nginx ``` ``` pod "web-0" deleted pod "web-1" deleted ``` Examine the output of the `kubectl get` command in the first terminal, and wait for all of the Pods to transition to Running and Ready. ```shell # This should already be running kubectl get pod --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 0/1 ContainerCreating 0 0s NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 2s web-1 0/1 Pending 0 0s web-1 0/1 Pending 0 0s web-1 0/1 ContainerCreating 0 0s web-1 1/1 Running 0 34s ``` Verify the web servers continue to serve their hostnames: ``` for i in 0 1; do kubectl exec -i -t "web-$i" -- curl http://localhost/; done ``` ``` web-0 web-1 ``` Even though `web-0` and `web-1` were rescheduled, they continue to serve their hostnames because the PersistentVolumes associated with their PersistentVolumeClaims are remounted to their `volumeMounts`. No matter what node `web-0`and `web-1` are scheduled on, their PersistentVolumes will be mounted to the appropriate mount points. ## Scaling a StatefulSet Scaling a StatefulSet refers to increasing or decreasing the number of replicas (horizontal scaling). This is accomplished by updating the `replicas` field. You can use either [`kubectl scale`](/docs/reference/generated/kubectl/kubectl-commands/#scale) or [`kubectl patch`](/docs/reference/generated/kubectl/kubectl-commands/#patch) to scale a StatefulSet. ### Scaling up Scaling up means adding more replicas. Provided that your app is able to distribute work across the StatefulSet, the new larger set of Pods can perform more of that work. In one terminal window, watch the Pods in the StatefulSet: ```shell # If you already have a watch running, you can continue using that. # Otherwise, start one. # End this watch when there are 5 healthy Pods for the StatefulSet kubectl get pods --watch -l app=nginx ``` In another terminal window, use `kubectl scale` to scale the number of replicas to 5: ```shell kubectl scale sts web --replicas=5 ``` ``` statefulset.apps/web scaled ``` Examine the output of the `kubectl get` command in the first terminal, and wait for the three additional Pods to transition to Running and Ready. ```shell # This should already be running kubectl get pod --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 2h web-1 1/1 Running 0 2h NAME READY STATUS RESTARTS AGE web-2 0/1 Pending 0 0s web-2 0/1 Pending 0 0s web-2 0/1 ContainerCreating 0 0s web-2 1/1 Running 0 19s web-3 0/1 Pending 0 0s web-3 0/1 Pending 0 0s web-3 0/1 ContainerCreating 0 0s web-3 1/1 Running 0 18s web-4 0/1 Pending 0 0s web-4 0/1 Pending 0 0s web-4 0/1 ContainerCreating 0 0s web-4 1/1 Running 0 19s ``` The StatefulSet controller scaled the number of replicas. As with [StatefulSet creation](#ordered-pod-creation), the StatefulSet controller created each Pod sequentially with respect to its ordinal index, and it waited for each Pod's predecessor to be Running and Ready before launching the subsequent Pod. ### Scaling down Scaling down means reducing the number of replicas. For example, you might do this because the level of traffic to a service has decreased, and at the current scale there are idle resources. In one terminal, watch the StatefulSet's
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
0.022219857200980186,
-0.012432853691279888,
0.03471161797642708,
0.026003843173384666,
-0.02538401260972023,
-0.05575033277273178,
-0.08408410847187042,
-0.05469271168112755,
0.07729671895503998,
0.05271460860967636,
-0.06054346263408661,
-0.02263086661696434,
-0.021597737446427345,
-0.02127925679087639,
0.0010216290829703212,
-0.02007969096302986,
0.01286794152110815,
0.07001789659261703,
-0.05821554362773895,
-0.005822938401252031,
-0.015384734608232975,
0.02661401405930519,
0.030499178916215897,
-0.017494473606348038,
-0.038338690996170044,
0.01781948283314705,
-0.09029890596866608,
-0.06335959583520889,
0.074294313788414,
-0.046519629657268524,
-0.009009646251797676,
-0.02432152070105076,
-0.06064556911587715,
0.0016540997894480824,
0.039902884513139725,
0.11112725734710693,
-0.007756712380796671,
-0.07732826471328735,
-0.09767171740531921,
0.028130080550909042,
0.15457703173160553,
0.00952127855271101,
-0.05427461862564087,
-0.08926207572221756,
-0.03232566639780998,
-0.04204000160098076,
-0.06320764869451523,
-0.01768137700855732,
0.0068788486532866955,
-0.06657146662473679,
0.0029379096813499928,
-0.1129690408706665,
0.008736977353692055,
0.05917394533753395,
0.040609829127788544,
-0.02286553755402565,
-0.0003436925180722028,
0.08151213824748993,
0.08479548245668411,
-0.006038241554051638,
0.0033306493423879147,
-0.01595563441514969,
0.04298785328865051,
-0.04235377907752991,
0.005406718235462904,
-0.0016077380860224366,
0.0037094743456691504,
-0.016126912087202072,
-0.017253682017326355,
0.03633016720414162,
0.06992486864328384,
0.05168290063738823,
-0.07581669092178345,
-0.03347991779446602,
0.012151259928941727,
-0.018386030569672585,
-0.024423765018582344,
0.010065856389701366,
-0.06853990256786346,
0.0183610450476408,
-0.03478988632559776,
-0.02752033807337284,
0.05576472356915474,
0.06128963083028793,
-0.07088074833154678,
-0.06274259090423584,
0.04891572147607803,
-0.04660096764564514,
0.03308602049946785,
-0.016536857932806015,
0.03326646238565445,
0.03816322237253189,
0.001794641138985753,
-0.07290144264698029,
0.08221552520990372,
0.019839348271489143,
-0.028806932270526886,
0.07594422996044159,
0.035893648862838745,
0.005197457037866116,
0.030468547716736794,
-0.04189262539148331,
0.04986172169446945,
0.0342550128698349,
0.042063064873218536,
-0.035719163715839386,
-0.021930476650595665,
0.03791380301117897,
0.031860604882240295,
0.03511872887611389,
0.0049303448759019375,
0.017909890040755272,
0.04955729842185974,
0.05734069645404816,
0.0004117016796953976,
0.004230831749737263,
-0.01625015214085579,
0.028872592374682426,
0.006907712202519178,
0.15502813458442688,
0.09171274304389954,
-0.08992426097393036,
-0.011432282626628876,
0.01522503886371851,
0.033759523183107376,
0.051110945641994476,
0.04944035783410072,
2.9054407342526467e-33,
0.02406078577041626,
-0.10374666005373001,
0.015427717939019203,
0.017440004274249077,
0.03688018396496773,
-0.05920251086354256,
0.00006949553790036589,
-0.0366605781018734,
-0.039292965084314346,
0.0016991272568702698,
-0.05214961618185043,
0.07360110431909561,
-0.06654604524374008,
0.0015057161217555404,
0.015505749732255936,
-0.054384995251894,
0.0029993776697665453,
0.005369191989302635,
0.1115153506398201,
-0.018200896680355072,
0.0990808755159378,
-0.05566226318478584,
-0.038852088153362274,
-0.005009538494050503,
0.035587068647146225,
-0.055288441479206085,
0.03905840963125229,
-0.028871426358819008,
-0.09481268376111984,
-0.0006480521988123655,
0.030788198113441467,
-0.02052796259522438,
-0.007564505096524954,
-0.002810498233884573,
-0.1410936564207077,
-0.036943916231393814,
0.020415466278791428,
0.09025592356920242,
-0.1159219965338707,
-0.042778149247169495,
0.031445737928152084,
0.021874280646443367,
-0.08924324065446854,
-0.03039359115064144,
0.008344126865267754,
-0.05737575888633728,
-0.016598928719758987,
-0.11126405000686646,
0.04397222027182579,
0.03654306381940842,
0.015025179833173752,
-0.004705111496150494,
0.05129778012633324,
-0.06459028273820877,
0.06143837049603462,
0.037435729056596756,
0.0891193225979805,
-0.05865306407213211,
-0.051879215985536575,
-0.026905283331871033,
0.01451905444264412,
0.01356825977563858,
0.01652749814093113,
0.016802696511149406,
0.04145360365509987,
0.055156536400318146,
0.028737841174006462,
0.05740787088871002,
-0.026235776022076607,
0.02222123183310032,
-0.08858836442232132,
0.07150320708751678,
-0.007115327287465334,
-0.014307808130979538,
0.009306440129876137,
-0.10199132561683655,
0.041645944118499756,
-0.02937130630016327,
-0.02064809389412403,
0.014191092923283577,
0.0704396516084671,
-0.05727687478065491,
-0.050675857812166214,
0.08430417627096176,
-0.01573093794286251,
-0.029677338898181915,
-0.0376170389354229,
-0.0014765297528356314,
-0.06021172180771828,
0.019137540832161903,
0.0243800301104784,
0.0006114761345088482,
-0.010974667966365814,
-0.02701331116259098,
-0.12117267400026321,
-4.431709578858013e-33,
0.102126345038414,
-0.040117450058460236,
0.022528313100337982,
0.04570142552256584,
0.0058550783433020115,
0.025719881057739258,
-0.03848697990179062,
0.08348116278648376,
-0.016683580353856087,
-0.06195176765322685,
-0.008720013312995434,
-0.015214512124657631,
0.009043927304446697,
0.09009817987680435,
-0.08750972896814346,
-0.001148236682638526,
-0.036130934953689575,
-0.10821093618869781,
0.006069127470254898,
-0.0041772834956645966,
-0.06412132829427719,
-0.008873699232935905,
0.04309100657701492,
0.08386014401912689,
-0.040082916617393494,
-0.01001984253525734,
0.03764045238494873,
0.01005508378148079,
-0.07135896384716034,
-0.04418748989701271,
0.019032098352909088,
-0.11786160618066788,
-0.04026206582784653,
0.04164031520485878,
-0.03336453065276146,
0.01867954432964325,
-0.03532830625772476,
0.1163993775844574,
-0.011238214559853077,
-0.040138039737939835,
0.04619773104786873,
0.02629207819700241,
-0.0005146413459442556,
-0.03132454678416252,
-0.05871541425585747,
-0.03435696288943291,
0.0338386595249176,
-0.025845708325505257,
-0.018297836184501648,
-0.08255045115947723,
-0.011774499900639057,
0.054365672171115875,
-0.01730022206902504,
0.10792681574821472,
-0.009945645928382874,
0.06567709147930145,
-0.009792360477149487,
0.046455420553684235,
-0.07905761152505875,
0.0042803408578038216,
0.031000511720776558,
-0.061797622591257095,
-0.011951657943427563,
0.04491472244262695,
-0.03755803778767586,
-0.013664993457496166,
-0.06251263618469238,
0.025970881804823875,
0.02278062142431736,
0.07193847000598907,
-0.003085305215790868,
0.03939849138259888,
0.0026656663976609707,
0.0326862633228302,
0.03793622925877571,
-0.005481356754899025,
0.016721710562705994,
-0.06779436767101288,
0.04539176821708679,
-0.0019410982495173812,
-0.01905464194715023,
0.0948370099067688,
-0.10038918256759644,
-0.08277489244937897,
0.05850307643413544,
0.12965020537376404,
-0.009302583523094654,
0.047884196043014526,
0.08276941627264023,
0.0911545604467392,
-0.0028183292597532272,
-0.016386419534683228,
-0.04371108487248421,
0.01448281854391098,
-0.04236902669072151,
-5.4077542444019855e-8,
0.02533191628754139,
0.031208502128720284,
-0.05898518115282059,
0.1180698499083519,
0.03674750402569771,
-0.06753959506750107,
0.04242231696844101,
-0.0054720020852983,
-0.014950412325561047,
0.019813602790236473,
-0.010432674549520016,
0.05759735032916069,
-0.0674935132265091,
0.07938399910926819,
0.07015831023454666,
-0.06860944628715515,
-0.016676943749189377,
0.03513108566403389,
0.04480594024062157,
-0.09240836650133133,
-0.07201781868934631,
-0.022321034222841263,
-0.022793903946876526,
-0.0025913070421665907,
0.06273238360881805,
-0.022778179496526718,
0.05591204762458801,
0.015459242276847363,
-0.01771487668156624,
-0.01990177482366562,
-0.029527483507990837,
-0.003665681229904294,
-0.08125733584165573,
0.008664373308420181,
0.005242616403847933,
0.006529246922582388,
-0.1701221466064453,
0.05523126572370529,
0.03975493833422661,
-0.025029180571436882,
0.008215266279876232,
0.030082227662205696,
-0.0014667643699795008,
-0.028733665123581886,
-0.03418435528874397,
0.03191355988383293,
0.039033956825733185,
0.10704415291547775,
0.03313368931412697,
-0.03653554990887642,
0.01693645864725113,
-0.06668371707201004,
-0.058352865278720856,
0.062390074133872986,
0.016615035012364388,
0.043129321187734604,
0.04767124727368355,
-0.02803725376725197,
-0.022772816941142082,
0.0020838521886616945,
0.03201368823647499,
-0.035755157470703125,
-0.05762665718793869,
-0.011726540513336658
] | 0.074314
|
Running and Ready before launching the subsequent Pod. ### Scaling down Scaling down means reducing the number of replicas. For example, you might do this because the level of traffic to a service has decreased, and at the current scale there are idle resources. In one terminal, watch the StatefulSet's Pods: ```shell # End this watch when there are only 3 Pods for the StatefulSet kubectl get pod --watch -l app=nginx ``` In another terminal, use `kubectl patch` to scale the StatefulSet back down to three replicas: ```shell kubectl patch sts web -p '{"spec":{"replicas":3}}' ``` ``` statefulset.apps/web patched ``` Wait for `web-4` and `web-3` to transition to Terminating. ```shell # This should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 3h web-1 1/1 Running 0 3h web-2 1/1 Running 0 55s web-3 1/1 Running 0 36s web-4 0/1 ContainerCreating 0 18s NAME READY STATUS RESTARTS AGE web-4 1/1 Running 0 19s web-4 1/1 Terminating 0 24s web-4 1/1 Terminating 0 24s web-3 1/1 Terminating 0 42s web-3 1/1 Terminating 0 42s ``` ### Ordered Pod termination The control plane deleted one Pod at a time, in reverse order with respect to its ordinal index, and it waited for each Pod to be completely shut down before deleting the next one. Get the StatefulSet's PersistentVolumeClaims: ```shell kubectl get pvc -l app=nginx ``` ``` NAME STATUS VOLUME CAPACITY ACCESSMODES AGE www-web-0 Bound pvc-15c268c7-b507-11e6-932f-42010a800002 1Gi RWO 13h www-web-1 Bound pvc-15c79307-b507-11e6-932f-42010a800002 1Gi RWO 13h www-web-2 Bound pvc-e1125b27-b508-11e6-932f-42010a800002 1Gi RWO 13h www-web-3 Bound pvc-e1176df6-b508-11e6-932f-42010a800002 1Gi RWO 13h www-web-4 Bound pvc-e11bb5f8-b508-11e6-932f-42010a800002 1Gi RWO 13h ``` There are still five PersistentVolumeClaims and five PersistentVolumes. When exploring a Pod's [stable storage](#writing-to-stable-storage), you saw that the PersistentVolumes mounted to the Pods of a StatefulSet are not deleted when the StatefulSet's Pods are deleted. This is still true when Pod deletion is caused by scaling the StatefulSet down. ## Updating StatefulSets The StatefulSet controller supports automated updates. The strategy used is determined by the `spec.updateStrategy` field of the StatefulSet API object. This feature can be used to upgrade the container images, resource requests and/or limits, labels, and annotations of the Pods in a StatefulSet. There are two valid update strategies, `RollingUpdate` (the default) and `OnDelete`. ### RollingUpdate {#rolling-update} The `RollingUpdate` update strategy will update all Pods in a StatefulSet, in reverse ordinal order, while respecting the StatefulSet guarantees. You can split updates to a StatefulSet that uses the `RollingUpdate` strategy into \_partitions\_, by specifying `.spec.updateStrategy.rollingUpdate.partition`. You'll practice that later in this tutorial. First, try a simple rolling update. In one terminal window, patch the `web` StatefulSet to change the container image again: ```shell kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.24"}]' ``` ``` statefulset.apps/web patched ``` In another terminal, watch the Pods in the StatefulSet: ```shell # End this watch when the rollout is complete # # If you're not sure, leave it running one more minute kubectl get pod -l app=nginx --watch ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 7m web-1 1/1 Running 0 7m web-2 1/1 Running 0 8m web-2 1/1 Terminating 0 8m web-2 1/1 Terminating 0 8m web-2 0/1 Terminating 0 8m web-2 0/1 Terminating 0 8m web-2 0/1 Terminating 0 8m web-2 0/1 Terminating 0 8m web-2 0/1 Pending 0 0s web-2 0/1 Pending 0 0s web-2 0/1 ContainerCreating 0 0s web-2 1/1 Running 0 19s web-1 1/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Pending 0 0s web-1
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
0.044239796698093414,
-0.030753133818507195,
0.048544708639383316,
0.017862532287836075,
-0.04236233979463577,
-0.035710930824279785,
-0.053231023252010345,
0.006044247653335333,
-0.0040345340967178345,
0.060333508998155594,
-0.02992691658437252,
-0.024809425696730614,
-0.02776339277625084,
-0.02179487608373165,
0.068740114569664,
-0.044951241463422775,
0.05744554102420807,
0.05636388808488846,
-0.061521947383880615,
-0.0233195498585701,
0.0011229556985199451,
-0.04182707518339157,
0.039944637566804886,
-0.00019896693993359804,
-0.027518412098288536,
0.0467049777507782,
-0.08128386735916138,
-0.07133655250072479,
0.032390046864748,
-0.05001794546842575,
-0.062263865023851395,
0.01438234094530344,
-0.014027422294020653,
-0.011857721954584122,
0.03459244593977928,
0.06895022094249725,
-0.010302871465682983,
-0.06286434829235077,
-0.07300543785095215,
0.02622567117214203,
0.07562536001205444,
-0.027921484783291817,
-0.10424371063709259,
-0.045499686151742935,
-0.023435210809111595,
-0.05932703986763954,
-0.0652993842959404,
-0.029265068471431732,
0.05949287861585617,
-0.08317039161920547,
-0.009619727730751038,
-0.10499613732099533,
0.032439932227134705,
0.014215449802577496,
0.0621153749525547,
0.011596239171922207,
0.036150217056274414,
0.0493302196264267,
0.11962798237800598,
0.0009621308417990804,
0.037009160965681076,
-0.016597962006926537,
0.028606532141566277,
-0.021735064685344696,
0.052323125302791595,
-0.007348180282860994,
0.028074711561203003,
-0.032334424555301666,
0.005684891249984503,
0.035285498946905136,
0.028376730158925056,
0.022137785330414772,
0.016518715769052505,
-0.04725409299135208,
-0.0312289260327816,
-0.07195330411195755,
-0.012269150465726852,
0.01349080353975296,
-0.00881071574985981,
0.024011174216866493,
-0.030053338035941124,
-0.020197028294205666,
0.03834312781691551,
0.031703174114227295,
-0.10599098354578018,
-0.020953552797436714,
0.03354267776012421,
-0.069923035800457,
0.022594518959522247,
-0.028565116226673126,
0.02055835910141468,
0.031700413674116135,
0.0017695152200758457,
-0.025702746585011482,
0.00868640560656786,
-0.01832832768559456,
-0.05266150087118149,
0.041869647800922394,
0.04201597720384598,
0.00761888874694705,
0.09203863888978958,
0.016794297844171524,
0.10332900285720825,
0.04484287276864052,
0.03779706358909607,
-0.07646825909614563,
-0.07129356265068054,
0.02937941625714302,
0.05324399098753929,
0.041848037391901016,
0.03627772629261017,
0.00856021512299776,
0.031133679673075676,
0.09529434144496918,
-0.03781462088227272,
0.05944788455963135,
0.0011357096955180168,
0.018686780706048012,
-0.01861037127673626,
0.11283157020807266,
0.12136876583099365,
-0.05023126304149628,
0.01230341475456953,
-0.0021766661666333675,
0.0033334828913211823,
0.052235301584005356,
0.062225643545389175,
4.003696290018279e-33,
0.056361012160778046,
-0.10028056800365448,
-0.013855652883648872,
-0.009118299931287766,
0.046548180282115936,
-0.01179626677185297,
-0.06452436745166779,
-0.023257192224264145,
-0.10731975734233856,
-0.036725375801324844,
-0.019575152546167374,
0.10522854328155518,
-0.07562682032585144,
0.04423132911324501,
0.014459878206253052,
-0.10441054403781891,
-0.02906634658575058,
0.016531717032194138,
0.11466765403747559,
-0.0056111738085746765,
0.0840349793434143,
-0.10309509932994843,
-0.07859600335359573,
0.0251031331717968,
0.03434165567159653,
-0.05065018683671951,
-0.009832244366407394,
-0.03678813949227333,
-0.11235201358795166,
0.011492122896015644,
0.015233371406793594,
-0.01694466732442379,
-0.04277009516954422,
0.012079431675374508,
-0.14062714576721191,
-0.0941154882311821,
0.00582988653331995,
0.048457931727170944,
-0.1146395206451416,
-0.10355151444673538,
-0.004826552700251341,
0.03644852340221405,
-0.03240324184298515,
-0.03634321317076683,
0.028670504689216614,
-0.050879113376140594,
0.0426582470536232,
-0.07627730071544647,
0.008782451041042805,
0.026240728795528412,
0.04338906332850456,
-0.025053836405277252,
0.012884140945971012,
-0.06906907260417938,
0.01708500273525715,
0.012233872897922993,
0.07529793679714203,
-0.019565749913454056,
-0.04353900998830795,
-0.020220452919602394,
-0.02557532675564289,
-0.0590163953602314,
-0.015416367910802364,
0.04757647216320038,
0.058374520391225815,
0.06838706135749817,
-0.014459561556577682,
0.03830403462052345,
-0.03205825760960579,
0.1056782528758049,
-0.0424482524394989,
0.029380787163972855,
0.023460302501916885,
0.03605145588517189,
-0.003191166091710329,
-0.050271905958652496,
0.031186722218990326,
0.0026661979500204325,
-0.15249542891979218,
0.058142442256212234,
0.03438522666692734,
0.019353080540895462,
-0.06524736434221268,
0.04641612246632576,
0.009614589624106884,
-0.013739082962274551,
-0.013734064064919949,
-0.008763797581195831,
-0.05530695617198944,
0.034775812178850174,
-0.029834061861038208,
-0.03580310195684433,
-0.036417052149772644,
-0.009161383844912052,
-0.10807983577251434,
-4.8477210703758513e-33,
0.08126910775899887,
-0.01388478372246027,
0.019604448229074478,
0.039659250527620316,
-0.018382102251052856,
0.0029475127812474966,
-0.0012021574657410383,
0.07628728449344635,
-0.03204965963959694,
-0.04339483380317688,
-0.016683058813214302,
-0.045432452112436295,
0.01284924428910017,
0.058084458112716675,
-0.12359344214200974,
0.02230415679514408,
-0.018249310553073883,
-0.0775710940361023,
0.025025220587849617,
0.014523882418870926,
0.009928926825523376,
-0.027359919622540474,
0.035800207406282425,
0.0719093382358551,
0.016550512984395027,
-0.0120431212708354,
0.04963386058807373,
0.005433641839772463,
-0.05040830001235008,
-0.061383187770843506,
0.03523889183998108,
-0.09589933604001999,
-0.0030181047040969133,
0.04751012474298477,
0.004225272219628096,
0.004914878401905298,
-0.04783988371491432,
0.062229517847299576,
-0.0014103653375059366,
-0.03976719453930855,
0.0557369589805603,
0.016965916380286217,
-0.02353925257921219,
-0.04287285730242729,
-0.034285590052604675,
-0.0387401282787323,
0.0254975613206625,
-0.0017642003949731588,
-0.040104541927576065,
-0.06895031034946442,
-0.0036129902582615614,
0.04606333747506142,
-0.01441994309425354,
0.0856337621808052,
-0.03751703351736069,
-0.00012000726565020159,
0.001968826400116086,
0.04458853602409363,
-0.08259352296590805,
0.013579655438661575,
0.052920155227184296,
-0.08274833112955093,
0.056406229734420776,
0.019801538437604904,
-0.023107608780264854,
-0.02260207198560238,
-0.04777122288942337,
0.05073012784123421,
-0.013963278383016586,
0.05207075923681259,
0.03463912010192871,
0.00873147789388895,
0.0241425521671772,
0.03174731507897377,
-0.030604463070631027,
-0.07162033021450043,
-0.025700384750962257,
-0.039411190897226334,
0.07819593697786331,
0.03346751257777214,
-0.059012845158576965,
0.1071307435631752,
-0.04314013198018074,
-0.02849821373820305,
0.031686000525951385,
0.12784382700920105,
0.013336200267076492,
0.11064204573631287,
0.0979648157954216,
0.1334000825881958,
-0.021427499130368233,
-0.01578911580145359,
-0.04671991616487503,
0.030812937766313553,
-0.03864951804280281,
-4.545315590576138e-8,
0.060746558010578156,
0.024038953706622124,
-0.009531103074550629,
0.1288868486881256,
0.05123206228017807,
-0.04624124616384506,
0.021324533969163895,
-0.022059127688407898,
-0.03697817772626877,
-0.0005745877861045301,
-0.0019221429247409105,
0.0595831423997879,
-0.05679713189601898,
0.10437528789043427,
0.09214716404676437,
-0.046062543988227844,
0.020948020741343498,
0.03556499257683754,
0.04019412025809288,
-0.05965536832809448,
-0.05855874344706535,
-0.03362875431776047,
-0.004058636724948883,
0.03147725388407707,
0.05484212934970856,
0.033434804528951645,
0.064712755382061,
0.04245081543922424,
0.0006191654247231781,
-0.03595181182026863,
-0.027493100613355637,
-0.014834719710052013,
-0.06462116539478302,
0.015361960977315903,
-0.016614066436886787,
-0.04548495635390282,
-0.15284819900989532,
0.0748039036989212,
0.043278686702251434,
-0.02644251100718975,
-0.01543630100786686,
-0.006027019117027521,
-0.012479125522077084,
0.008974443189799786,
-0.019975408911705017,
0.024706676602363586,
-0.005249090492725372,
0.09263966232538223,
0.062369029968976974,
-0.02876722626388073,
0.02628416195511818,
-0.07363682985305786,
-0.012515141628682613,
0.04881977289915085,
0.006333736702799797,
0.00555359898135066,
0.019844047725200653,
-0.01682346686720848,
-0.016959432512521744,
0.007673029787838459,
0.03123161382973194,
-0.1057296022772789,
-0.08638497442007065,
-0.014974676072597504
] | 0.122127
|
0/1 Terminating 0 8m web-2 0/1 Pending 0 0s web-2 0/1 Pending 0 0s web-2 0/1 ContainerCreating 0 0s web-2 1/1 Running 0 19s web-1 1/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Terminating 0 8m web-1 0/1 Pending 0 0s web-1 0/1 Pending 0 0s web-1 0/1 ContainerCreating 0 0s web-1 1/1 Running 0 6s web-0 1/1 Terminating 0 7m web-0 1/1 Terminating 0 7m web-0 0/1 Terminating 0 7m web-0 0/1 Terminating 0 7m web-0 0/1 Terminating 0 7m web-0 0/1 Terminating 0 7m web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating 0 0s web-0 1/1 Running 0 10s ``` The Pods in the StatefulSet are updated in reverse ordinal order. The StatefulSet controller terminates each Pod, and waits for it to transition to Running and Ready prior to updating the next Pod. Note that, even though the StatefulSet controller will not proceed to update the next Pod until its ordinal successor is Running and Ready, it will restore any Pod that fails during the update to that Pod's existing version. Pods that have already received the update will be restored to the updated version, and Pods that have not yet received the update will be restored to the previous version. In this way, the controller attempts to continue to keep the application healthy and the update consistent in the presence of intermittent failures. Get the Pods to view their container images: ```shell for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done ``` ``` registry.k8s.io/nginx-slim:0.24 registry.k8s.io/nginx-slim:0.24 registry.k8s.io/nginx-slim:0.24 ``` All the Pods in the StatefulSet are now running the previous container image. {{< note >}} You can also use `kubectl rollout status sts/` to view the status of a rolling update to a StatefulSet {{< /note >}} #### Staging an update You can split updates to a StatefulSet that uses the `RollingUpdate` strategy into \_partitions\_, by specifying `.spec.updateStrategy.rollingUpdate.partition`. For more context, you can read [Partitioned rolling updates](/docs/concepts/workloads/controllers/statefulset/#partitions) in the StatefulSet concept page. You can stage an update to a StatefulSet by using the `partition` field within `.spec.updateStrategy.rollingUpdate`. For this update, you will keep the existing Pods in the StatefulSet unchanged whilst you change the pod template for the StatefulSet. Then you - or, outside of a tutorial, some external automation - can trigger that prepared update. First, patch the `web` StatefulSet to add a partition to the `updateStrategy` field: ```shell # The value of "partition" determines which ordinals a change applies to # Make sure to use a number bigger than the last ordinal for the # StatefulSet kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"RollingUpdate","rollingUpdate":{"partition":3}}}}' ``` ``` statefulset.apps/web patched ``` Patch the StatefulSet again to change the container image that this StatefulSet uses: ```shell kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.21"}]' ``` ``` statefulset.apps/web patched ``` Delete a Pod in the StatefulSet: ```shell kubectl delete pod web-2 ``` ``` pod "web-2" deleted ``` Wait for the replacement `web-2` Pod to be Running and Ready: ```shell # End the watch when you see that web-2 is healthy kubectl get pod -l app=nginx --watch ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 4m web-1 1/1 Running 0 4m web-2 0/1 ContainerCreating 0 11s web-2 1/1 Running 0 18s ``` Get the Pod's container image: ```shell kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ``` ``` registry.k8s.io/nginx-slim:0.24 ``` Notice that, even though the update strategy is `RollingUpdate` the StatefulSet restored the Pod with the original container image. This is because the ordinal
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.017255740240216255,
-0.011790157295763493,
-0.021941935643553734,
-0.009112486615777016,
-0.034267131239175797,
-0.03550471365451813,
0.0239487886428833,
-0.07338225096464157,
-0.029871784150600433,
0.03934934735298157,
0.06514117121696472,
-0.04996126890182495,
-0.00035605221637524664,
-0.043867938220500946,
-0.05826210975646973,
-0.0011538327671587467,
-0.026216376572847366,
-0.04980340972542763,
-0.016229398548603058,
-0.05709223449230194,
0.06445382535457611,
0.05080009624361992,
-0.02405339851975441,
-0.05090560391545296,
0.008657732047140598,
0.09969907253980637,
-0.06818833947181702,
-0.015469110570847988,
0.0663924515247345,
-0.09201272577047348,
-0.011761425994336605,
0.04226827248930931,
0.02847454510629177,
0.04515354707837105,
0.021693989634513855,
0.036337465047836304,
0.046922773122787476,
-0.07978500425815582,
-0.052338674664497375,
0.0354955829679966,
0.05018706992268562,
-0.026163985952734947,
-0.004951594863086939,
0.02995355613529682,
-0.02283615618944168,
0.004610137548297644,
-0.12041006237268448,
-0.05198795720934868,
-0.059371545910835266,
-0.025202201679348946,
-0.05235634371638298,
0.00022960770002100617,
0.006646744441241026,
0.11487975716590881,
0.04286988079547882,
0.01538026612251997,
-0.0014700224855914712,
-0.02529837191104889,
0.006457760464400053,
0.0038472148589789867,
-0.00025327972252853215,
-0.026766855269670486,
0.009602605365216732,
-0.017606737092137337,
0.05907786637544632,
-0.020129024982452393,
0.044765472412109375,
-0.004781010095030069,
0.0168453436344862,
0.000009500809937890153,
-0.05269467830657959,
-0.02351846732199192,
-0.03410497307777405,
0.003249990288168192,
-0.0657968521118164,
0.011591333895921707,
0.05132996663451195,
0.013565084896981716,
-0.06184808164834976,
-0.06717398017644882,
-0.07120372354984283,
-0.05281293764710426,
0.055245768278837204,
0.0015750660095363855,
-0.02651362307369709,
-0.02923305332660675,
-0.05471797659993172,
-0.005036037415266037,
0.05233385041356087,
0.027951018884778023,
-0.09648954123258591,
-0.026318561285734177,
0.02102523110806942,
-0.06787431985139847,
-0.015404648147523403,
0.051144327968358994,
0.023664036765694618,
0.0713769719004631,
0.02017885632812977,
0.06340216845273972,
0.013705361634492874,
-0.008840222842991352,
-0.04068906977772713,
0.014541104435920715,
0.048346374183893204,
-0.028895510360598564,
-0.09493909031152725,
0.09757952392101288,
0.03558981046080589,
-0.027134139090776443,
-0.0458153672516346,
0.012410859577357769,
0.07204962521791458,
0.006987801752984524,
-0.05743773654103279,
-0.013794193975627422,
0.0058692400343716145,
0.03624604642391205,
0.08166283369064331,
0.00035195660893805325,
0.08417988568544388,
0.016742777079343796,
0.004622221924364567,
0.05028240382671356,
-0.062325526028871536,
0.01095733605325222,
0.023297522217035294,
7.335009811366209e-33,
0.07964886724948883,
-0.12222864478826523,
0.003776390105485916,
-0.08704782277345657,
0.08103637397289276,
-0.001833540853112936,
-0.008074207231402397,
-0.006620139814913273,
-0.029384411871433258,
0.012720072641968727,
-0.07281969487667084,
0.08972156792879105,
-0.04595775902271271,
-0.017390158027410507,
0.020126229152083397,
-0.16875311732292175,
0.02536230906844139,
0.03753756731748581,
0.019717738032341003,
-0.05339095741510391,
0.058452058583498,
0.017635459080338478,
-0.017379457131028175,
-0.10879883915185928,
0.061908572912216187,
-0.010510985739529133,
-0.05411609634757042,
-0.01705317385494709,
-0.05889013782143593,
0.03196975588798523,
0.046322692185640335,
0.04508056119084358,
-0.06571581214666367,
0.04363078996539116,
0.027194125577807426,
0.015615742653608322,
0.0415564589202404,
0.007215854246169329,
-0.013264760375022888,
-0.14864833652973175,
-0.060011979192495346,
-0.02246970869600773,
-0.019475845620036125,
0.03462532162666321,
-0.0358424074947834,
-0.1195869892835617,
-0.02419418655335903,
0.00835419911891222,
-0.017648978158831596,
0.046158649027347565,
0.02794465981423855,
0.011208503507077694,
-0.004522705916315317,
-0.03861290588974953,
-0.06943287700414658,
-0.03795924037694931,
0.026153646409511566,
0.06974072009325027,
-0.011284291744232178,
0.11967485398054123,
-0.031722430139780045,
0.06973984837532043,
-0.030470533296465874,
-0.023876382037997246,
0.00605357438325882,
0.10183324664831161,
-0.011585481464862823,
-0.014470310881733894,
0.08691105991601944,
0.032522913068532944,
-0.03391508385539055,
0.0782090574502945,
0.09276232123374939,
0.01786566525697708,
-0.027492567896842957,
-0.040780916810035706,
-0.0021195714361965656,
-0.04281415045261383,
-0.13670288026332855,
-0.023908397182822227,
0.05928592383861542,
-0.001561005599796772,
-0.05152006447315216,
0.011446250602602959,
-0.006349506322294474,
-0.03688647225499153,
-0.006002737209200859,
-0.013994729146361351,
-0.06422322243452072,
-0.0035497185308486223,
-0.02653900906443596,
-0.02099917083978653,
0.06897149980068207,
-0.028492800891399384,
-0.048504699021577835,
-7.356483154419855e-33,
-0.04960625246167183,
0.046640004962682724,
-0.07863854616880417,
0.04510630667209625,
-0.021270690485835075,
-0.02707301639020443,
0.07466970384120941,
0.04306408762931824,
-0.007912788540124893,
0.03790432959794998,
0.04132504016160965,
0.06128234416246414,
-0.03229515254497528,
0.04226439818739891,
-0.011280364356935024,
0.0024162621702998877,
0.010444223880767822,
-0.04241827875375748,
0.025750605389475822,
0.008576110936701298,
-0.022650182247161865,
0.12320207059383392,
-0.11625969409942627,
0.0795658677816391,
0.04735305905342102,
0.058811336755752563,
0.028779568150639534,
0.05814730376005173,
0.022043097764253616,
-0.039094019681215286,
0.04640232026576996,
-0.12982366979122162,
-0.0331905335187912,
0.050755638629198074,
0.03965118154883385,
-0.043611954897642136,
-0.044301509857177734,
0.0879807397723198,
0.00022963991796132177,
0.04420752450823784,
0.08919242024421692,
-0.04665852710604668,
-0.054191578179597855,
0.09199301153421402,
0.006462049670517445,
0.03064994513988495,
0.010977516882121563,
0.04914624243974686,
-0.049562763422727585,
-0.04715007171034813,
0.0034621250815689564,
0.06396035850048065,
0.012828190810978413,
0.07664180546998978,
-0.031028322875499725,
0.024448055773973465,
-0.04985443502664566,
-0.0534878708422184,
-0.032857608050107956,
-0.04687383770942688,
0.029924234375357628,
-0.06536192446947098,
0.060715921223163605,
0.0532851479947567,
0.069017693400383,
-0.027594830840826035,
-0.10790835320949554,
-0.06807424128055573,
-0.02745518647134304,
-0.026585496962070465,
0.044337198138237,
0.03607587143778801,
-0.017525246366858482,
-0.059272684156894684,
0.050184182822704315,
-0.07167588919401169,
-0.030803102999925613,
-0.030066903680562973,
-0.006975483149290085,
0.03814515843987465,
-0.16689465939998627,
0.08247606456279755,
0.02013876847922802,
0.006459848489612341,
-0.019150063395500183,
0.016697071492671967,
0.043266359716653824,
0.09224431961774826,
0.03410913050174713,
0.028056833893060684,
0.030119089409708977,
0.01574196293950081,
-0.06233731284737587,
0.048328835517168045,
-0.016307499259710312,
-3.614032095811126e-8,
0.017967773601412773,
-0.06559151411056519,
-0.01166466809809208,
0.10932113230228424,
0.12256664037704468,
-0.02573275752365589,
0.023007582873106003,
-0.006402167491614819,
-0.07349617779254913,
-0.061303459107875824,
0.05544868856668472,
0.0388980358839035,
-0.06778807193040848,
-0.07519005239009857,
0.08659090101718903,
0.017902690917253494,
0.03596660494804382,
0.015800781548023224,
-0.04539424553513527,
-0.021445658057928085,
-0.013464737683534622,
-0.049004703760147095,
-0.023940198123455048,
0.039439357817173004,
-0.03551159054040909,
0.012891620397567749,
0.056790389120578766,
0.08651507645845413,
-0.007245404180139303,
0.057877317070961,
-0.016318820416927338,
0.012376549653708935,
-0.031948987394571304,
0.04005133733153343,
-0.03420627489686012,
0.045233264565467834,
-0.10320642590522766,
0.011208656243979931,
-0.0015985151985660195,
-0.023588737472891808,
-0.05978846549987793,
-0.003636311972513795,
-0.03829833120107651,
0.10295812040567398,
0.05206559598445892,
0.032897286117076874,
-0.039541762322187424,
0.015732962638139725,
0.06447207927703857,
-0.07081618905067444,
-0.033775173127651215,
-0.04457426071166992,
0.01780041679739952,
0.0369669608771801,
0.007432717364281416,
0.0006319249514490366,
0.0401986762881279,
-0.0870998278260231,
-0.03292021155357361,
0.10491342097520828,
0.03667392581701279,
-0.017094600945711136,
0.026919908821582794,
0.012849508784711361
] | 0.161089
|
web-2 1/1 Running 0 18s ``` Get the Pod's container image: ```shell kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ``` ``` registry.k8s.io/nginx-slim:0.24 ``` Notice that, even though the update strategy is `RollingUpdate` the StatefulSet restored the Pod with the original container image. This is because the ordinal of the Pod is less than the `partition` specified by the `updateStrategy`. #### Rolling out a canary You're now going to try a [canary rollout](https://glossary.cncf.io/canary-deployment/) of that staged change. You can roll out a canary (to test the modified template) by decrementing the `partition` you specified [above](#staging-an-update). Patch the StatefulSet to decrement the partition: ```shell # The value of "partition" should match the highest existing ordinal for # the StatefulSet kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"RollingUpdate","rollingUpdate":{"partition":2}}}}' ``` ``` statefulset.apps/web patched ``` The control plane triggers replacement for `web-2` (implemented by a graceful \*\*delete\*\* followed by creating a new Pod once the deletion is complete). Wait for the new `web-2` Pod to be Running and Ready. ```shell # This should already be running kubectl get pod -l app=nginx --watch ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 4m web-1 1/1 Running 0 4m web-2 0/1 ContainerCreating 0 11s web-2 1/1 Running 0 18s ``` Get the Pod's container: ```shell kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ``` ``` registry.k8s.io/nginx-slim:0.21 ``` When you changed the `partition`, the StatefulSet controller automatically updated the `web-2` Pod because the Pod's ordinal was greater than or equal to the `partition`. Delete the `web-1` Pod: ```shell kubectl delete pod web-1 ``` ``` pod "web-1" deleted ``` Wait for the `web-1` Pod to be Running and Ready. ```shell # This should already be running kubectl get pod -l app=nginx --watch ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 6m web-1 0/1 Terminating 0 6m web-2 1/1 Running 0 2m web-1 0/1 Terminating 0 6m web-1 0/1 Terminating 0 6m web-1 0/1 Terminating 0 6m web-1 0/1 Pending 0 0s web-1 0/1 Pending 0 0s web-1 0/1 ContainerCreating 0 0s web-1 1/1 Running 0 18s ``` Get the `web-1` Pod's container image: ```shell kubectl get pod web-1 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ``` ``` registry.k8s.io/nginx-slim:0.24 ``` `web-1` was restored to its original configuration because the Pod's ordinal was less than the partition. When a partition is specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's `.spec.template` is updated. If a Pod that has an ordinal less than the partition is deleted or otherwise terminated, it will be restored to its original configuration. #### Phased roll outs You can perform a phased roll out (e.g. a linear, geometric, or exponential roll out) using a partitioned rolling update in a similar manner to how you rolled out a [canary](#rolling-out-a-canary). To perform a phased roll out, set the `partition` to the ordinal at which you want the controller to pause the update. The partition is currently set to `2`. Set the partition to `0`: ```shell kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"RollingUpdate","rollingUpdate":{"partition":0}}}}' ``` ``` statefulset.apps/web patched ``` Wait for all of the Pods in the StatefulSet to become Running and Ready. ```shell # This should already be running kubectl get pod -l app=nginx --watch ``` The output is similar to: ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 3m web-1 0/1 ContainerCreating 0 11s web-2 1/1 Running 0 2m web-1 1/1 Running 0 18s web-0 1/1 Terminating 0 3m web-0 1/1 Terminating 0 3m web-0 0/1 Terminating 0 3m web-0 0/1 Terminating 0 3m
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.005562731996178627,
0.07987263798713684,
0.11521486937999725,
-0.0012282496318221092,
0.017632780596613884,
-0.05185623839497566,
-0.05379950627684593,
-0.013506830669939518,
-0.005059399176388979,
0.05921326205134392,
0.008528183214366436,
-0.028130244463682175,
-0.027084289118647575,
-0.03147227689623833,
0.04239364340901375,
-0.02096720039844513,
-0.016200318932533264,
0.0403340645134449,
-0.041270747780799866,
0.02269255928695202,
-0.060729458928108215,
-0.02353881113231182,
0.0437399186193943,
-0.004669216927140951,
0.0017401647055521607,
0.06638988852500916,
-0.0751037746667862,
-0.01769285276532173,
0.06165316328406334,
-0.0652880072593689,
-0.022769324481487274,
0.06509939581155777,
-0.04460163041949272,
-0.028907418251037598,
0.0670417845249176,
0.10139581561088562,
0.03823789581656456,
-0.034896668046712875,
-0.04594738036394119,
0.00953459832817316,
0.10371261090040207,
-0.010542308911681175,
-0.08560054004192352,
-0.05024007335305214,
-0.027603646740317345,
-0.017910679802298546,
-0.055281415581703186,
-0.01130601204931736,
-0.02131832018494606,
-0.08615855872631073,
-0.029673878103494644,
-0.11779484897851944,
0.0191634651273489,
0.03542027994990349,
0.03671788424253464,
0.04384751245379448,
-0.005750061944127083,
0.12384403496980667,
0.10509525239467621,
0.0013089112471789122,
0.06526835262775421,
-0.046739641577005386,
0.06013867259025574,
-0.007428305223584175,
0.06091999262571335,
-0.038530975580215454,
0.050536155700683594,
-0.06702841073274612,
-0.012099916115403175,
0.011171683669090271,
0.03743904083967209,
0.016277655959129333,
0.030893942341208458,
-0.059484295547008514,
-0.024800488725304604,
-0.0026232951786369085,
0.02811299078166485,
0.050667598843574524,
-0.0022712352219969034,
0.017335591837763786,
0.023298043757677078,
-0.008083895780146122,
0.02609119564294815,
-0.03484630957245827,
-0.07166726887226105,
-0.0586794912815094,
0.005439020227640867,
-0.04490916058421135,
-0.0069535356014966965,
-0.040489561855793,
0.0213317908346653,
-0.03175141289830208,
0.0890374556183815,
-0.0728793814778328,
0.04640733823180199,
0.0454014390707016,
0.032913435250520706,
0.045677606016397476,
0.04008408263325691,
0.08014222979545593,
0.021405421197414398,
-0.011555131524801254,
-0.009704438038170338,
0.014542357064783573,
0.05342009291052818,
-0.044202934950590134,
-0.05773188918828964,
0.014307680539786816,
0.026245567947626114,
0.04537864401936531,
0.011931181885302067,
0.025384467095136642,
0.014871353283524513,
0.03677036613225937,
-0.07524342834949493,
-0.04117998853325844,
-0.0341283343732357,
0.03141597658395767,
0.0009930722881108522,
0.08555524051189423,
0.08779945224523544,
-0.0443711020052433,
0.020620286464691162,
0.0737963393330574,
-0.036258213222026825,
0.010333455167710781,
0.03310316056013107,
1.4542521832022387e-33,
0.056008316576480865,
-0.050816573202610016,
0.00710498820990324,
-0.0011159033747389913,
0.1054263785481453,
-0.09619200974702835,
0.011694945394992828,
-0.03865734487771988,
-0.0782538652420044,
0.001100056222639978,
-0.0185924731194973,
0.05280585214495659,
-0.09836063534021378,
0.044817227870225906,
0.03218621388077736,
-0.07389109581708908,
-0.041178714483976364,
0.058041974902153015,
0.10526511073112488,
0.006280652247369289,
0.06274036318063736,
-0.07443884760141373,
-0.06582044810056686,
-0.04634318873286247,
0.010067205876111984,
-0.01712917350232601,
0.01951758749783039,
-0.03637092560529709,
-0.018087442964315414,
-0.000784787000156939,
0.024366609752178192,
0.013252384960651398,
0.008194088004529476,
0.02154640294611454,
-0.12191642075777054,
-0.11279420554637909,
-0.022176234051585197,
-0.00830919574946165,
-0.14765824377536774,
-0.0562676377594471,
0.0702478364109993,
0.014531026594340801,
-0.041093144565820694,
-0.017969941720366478,
0.022971749305725098,
-0.05383411422371864,
-0.0009283530525863171,
-0.05957895144820213,
0.05038759484887123,
-0.0019667544402182102,
-0.0008267476805485785,
-0.006519511807709932,
-0.04974944889545441,
-0.06536392122507095,
-0.04130963608622551,
0.011872954666614532,
0.08691268414258957,
-0.06297026574611664,
-0.018950825557112694,
-0.02635587565600872,
0.05024367570877075,
0.04270454868674278,
0.029360197484493256,
0.0009595313458703458,
0.020175224170088768,
0.03765668720006943,
0.0197024904191494,
0.03315826877951622,
-0.038973141461610794,
0.015651078894734383,
-0.0541461817920208,
0.09683039784431458,
-0.05711181089282036,
0.012796583585441113,
0.00888051837682724,
-0.11033069342374802,
0.04357748106122017,
0.026822734624147415,
-0.09170886874198914,
-0.013567463494837284,
0.07169348001480103,
0.0075858780182898045,
-0.044455043971538544,
0.042296506464481354,
0.017888210713863373,
-0.01948394812643528,
-0.015421188436448574,
0.07681809365749359,
-0.050115786492824554,
0.008766711689531803,
0.0014100001426413655,
-0.04157455638051033,
-0.04506703093647957,
-0.05884283781051636,
-0.06066568195819855,
-2.1159504429075818e-33,
0.08096902072429657,
-0.002428818726912141,
-0.014335813000798225,
0.05540304630994797,
-0.031895533204078674,
0.0007637548842467368,
0.01298531424254179,
0.12491445243358612,
-0.0012517699506133795,
-0.04177844896912575,
-0.010689978487789631,
0.027373766526579857,
0.011586761102080345,
0.014007477089762688,
-0.1169164776802063,
0.03464699536561966,
-0.08969826996326447,
-0.14428412914276123,
-0.00637333607301116,
0.0025033189449459314,
-0.011556037701666355,
-0.0030185149516910315,
0.01671219803392887,
0.1473223716020584,
-0.02350926585495472,
0.015438511967658997,
0.07714435458183289,
0.059032514691352844,
-0.039549123495817184,
-0.0378338061273098,
0.01077002752572298,
-0.1171698197722435,
-0.07751207053661346,
0.02908194810152054,
0.02496946230530739,
-0.027543969452381134,
-0.0621616430580616,
0.012737908400595188,
-0.05970986932516098,
0.011894338764250278,
-0.01290002278983593,
0.007256560958921909,
-0.07306116819381714,
0.014807425439357758,
-0.04588509351015091,
-0.040733590722084045,
0.08366729319095612,
-0.002072117058560252,
0.07317350804805756,
-0.08404272049665451,
0.03143656253814697,
0.028180241584777832,
-0.030072906985878944,
0.10939182341098785,
0.00726670864969492,
0.005978867877274752,
-0.0035668795462697744,
0.027255048975348473,
-0.03141959756612778,
-0.0010030114790424705,
0.020265307277441025,
-0.02110341563820839,
0.029420118778944016,
-0.01878802850842476,
-0.006551303435117006,
0.02459869161248207,
-0.13843411207199097,
-0.026887619867920876,
-0.043732911348342896,
0.050853461027145386,
0.047821495682001114,
-0.015383495017886162,
0.03686309978365898,
0.012173082679510117,
0.026058213785290718,
-0.04897191375494003,
0.037276703864336014,
-0.022377435117959976,
0.13048245012760162,
-0.02092973329126835,
-0.08855421841144562,
0.06481830030679703,
-0.04241054505109787,
-0.04198218882083893,
0.05878366529941559,
0.08702744543552399,
0.0498032346367836,
0.052815940231084824,
0.0470392219722271,
0.046241093426942825,
0.020717870444059372,
-0.024319220334291458,
-0.03128570690751076,
0.06322341412305832,
0.0155111663043499,
-5.0116330641003515e-8,
0.07142791897058487,
0.05508403107523918,
-0.0629357174038887,
0.10872181504964828,
0.07968262583017349,
-0.08883915841579437,
0.06693841516971588,
-0.008979955688118935,
-0.03348367288708687,
-0.10868705064058304,
-0.07498251646757126,
0.047544725239276886,
-0.020550470799207687,
0.06820602715015411,
0.028398005291819572,
-0.013424609787762165,
-0.04084717854857445,
0.05057425796985626,
0.011321958154439926,
-0.04874366149306297,
-0.08991177380084991,
-0.0736669972538948,
0.030113432556390762,
-0.024758674204349518,
0.0407768189907074,
0.04079529270529747,
0.052648406475782394,
0.052554335445165634,
0.033440787345170975,
-0.013851986266672611,
-0.03201070800423622,
-0.04063812643289566,
-0.050906892865896225,
0.07259994000196457,
-0.026686687022447586,
-0.006069363094866276,
-0.09909570217132568,
0.04946161061525345,
0.01885162852704525,
0.006064332090318203,
-0.009507197886705399,
-0.043252214789390564,
-0.019461557269096375,
-0.01735287345945835,
-0.050722885876894,
0.02257947064936161,
0.0014562482247129083,
0.05823853239417076,
-0.011869596317410469,
-0.007007325068116188,
0.05801112577319145,
-0.06736070662736893,
-0.04410633444786072,
0.06678291410207748,
0.03661729767918587,
-0.028762921690940857,
0.04887416586279869,
-0.02558719925582409,
0.007658574730157852,
0.05846351012587547,
0.008286410011351109,
-0.0675656795501709,
0.003070465289056301,
-0.02095334231853485
] | 0.054481
|
output is similar to: ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 3m web-1 0/1 ContainerCreating 0 11s web-2 1/1 Running 0 2m web-1 1/1 Running 0 18s web-0 1/1 Terminating 0 3m web-0 1/1 Terminating 0 3m web-0 0/1 Terminating 0 3m web-0 0/1 Terminating 0 3m web-0 0/1 Terminating 0 3m web-0 0/1 Terminating 0 3m web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating 0 0s web-0 1/1 Running 0 3s ``` Get the container image details for the Pods in the StatefulSet: ```shell for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done ``` ``` registry.k8s.io/nginx-slim:0.21 registry.k8s.io/nginx-slim:0.21 registry.k8s.io/nginx-slim:0.21 ``` By moving the `partition` to `0`, you allowed the StatefulSet to continue the update process. ### OnDelete {#on-delete} You select this update strategy for a StatefulSet by setting the `.spec.template.updateStrategy.type` to `OnDelete`. Patch the `web` StatefulSet to use the `OnDelete` update strategy: ```shell kubectl patch statefulset web -p '{"spec":{"updateStrategy":{"type":"OnDelete", "rollingUpdate": null}}}' ``` ``` statefulset.apps/web patched ``` When you select this update strategy, the StatefulSet controller does not automatically update Pods when a modification is made to the StatefulSet's `.spec.template` field. You need to manage the rollout yourself - either manually, or using separate automation. ## Deleting StatefulSets StatefulSet supports both \_non-cascading\_ and \_cascading\_ deletion. In a non-cascading \*\*delete\*\*, the StatefulSet's Pods are not deleted when the StatefulSet is deleted. In a cascading \*\*delete\*\*, both the StatefulSet and its Pods are deleted. Read [Use Cascading Deletion in a Cluster](/docs/tasks/administer-cluster/use-cascading-deletion/) to learn about cascading deletion generally. ### Non-cascading delete In one terminal window, watch the Pods in the StatefulSet. ``` # End this watch when there are no Pods for the StatefulSet kubectl get pods --watch -l app=nginx ``` Use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete) to delete the StatefulSet. Make sure to supply the `--cascade=orphan` parameter to the command. This parameter tells Kubernetes to only delete the StatefulSet, and to \*\*not\*\* delete any of its Pods. ```shell kubectl delete statefulset web --cascade=orphan ``` ``` statefulset.apps "web" deleted ``` Get the Pods, to examine their status: ```shell kubectl get pods -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 6m web-1 1/1 Running 0 7m web-2 1/1 Running 0 5m ``` Even though `web` has been deleted, all of the Pods are still Running and Ready. Delete `web-0`: ```shell kubectl delete pod web-0 ``` ``` pod "web-0" deleted ``` Get the StatefulSet's Pods: ```shell kubectl get pods -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-1 1/1 Running 0 10m web-2 1/1 Running 0 7m ``` As the `web` StatefulSet has been deleted, `web-0` has not been relaunched. In one terminal, watch the StatefulSet's Pods. ```shell # Leave this watch running until the next time you start a watch kubectl get pods --watch -l app=nginx ``` In a second terminal, recreate the StatefulSet. Note that, unless you deleted the `nginx` Service (which you should not have), you will see an error indicating that the Service already exists. ```shell kubectl apply -f https://k8s.io/examples/application/web/web.yaml ``` ``` statefulset.apps/web created service/nginx unchanged ``` Ignore the error. It only indicates that an attempt was made to create the \_nginx\_ headless Service even though that Service already exists. Examine the output of the `kubectl get` command running in the first terminal. ```shell # This should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-1 1/1 Running 0 16m web-2 1/1 Running 0 2m NAME READY STATUS RESTARTS AGE web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
0.033650197088718414,
0.09287063032388687,
-0.022773511707782745,
-0.0036180869210511446,
0.0006881649605929852,
-0.042758211493492126,
0.0013862688792869449,
-0.021117541939020157,
0.03772740438580513,
0.006901421584188938,
0.03180062770843506,
-0.11003997921943665,
-0.04242017865180969,
-0.05572935566306114,
0.014191930182278156,
0.004625334404408932,
-0.0319114550948143,
0.02215914987027645,
-0.02592173032462597,
-0.12497028708457947,
0.06852786242961884,
0.0620267391204834,
0.020607497543096542,
-0.05680941790342331,
-0.06244971975684166,
0.10775350034236908,
-0.06782826036214828,
-0.021311834454536438,
0.04889623448252678,
-0.07871577888727188,
0.002833018312230706,
0.03714370355010033,
0.025594159960746765,
0.02510983869433403,
0.08092719316482544,
0.12027058005332947,
0.011049645952880383,
-0.06826823204755783,
-0.04380235821008682,
0.007248660549521446,
0.06557223200798035,
-0.06319673359394073,
-0.08949267864227295,
-0.0629102885723114,
-0.025352202355861664,
-0.02138449065387249,
-0.14442892372608185,
-0.040328435599803925,
-0.01740361750125885,
-0.04543936625123024,
-0.027615534141659737,
-0.12532663345336914,
-0.006261718925088644,
0.0581388957798481,
0.07155586034059525,
0.02703123912215233,
-0.031280744820833206,
0.02038615383207798,
0.06656341999769211,
-0.031009482219815254,
-0.007417580112814903,
-0.00814956147223711,
0.02833111211657524,
-0.025158559903502464,
0.06287270784378052,
-0.02714526280760765,
0.0058593726716935635,
0.02554064802825451,
0.027016641572117805,
0.01905016601085663,
-0.06446760147809982,
-0.016111962497234344,
-0.023281333968043327,
-0.05870053917169571,
-0.06958362460136414,
-0.015587642788887024,
-0.014868870377540588,
0.044439803808927536,
-0.06630539894104004,
-0.037412919104099274,
-0.01740095019340515,
0.010523100383579731,
0.03834134712815285,
-0.0476783812046051,
-0.05250900611281395,
0.013142385520040989,
-0.015965862199664116,
-0.0003315889334771782,
0.034644413739442825,
-0.040498360991477966,
-0.07790717482566833,
-0.059826627373695374,
0.01930878683924675,
-0.057484082877635956,
0.02156498096883297,
0.0554230734705925,
0.022306425496935844,
0.04766354709863663,
0.05807513743638992,
0.04345439001917839,
0.037287045270204544,
-0.015182333067059517,
0.015008039772510529,
-0.0024441007990390062,
0.0389024019241333,
-0.03921419754624367,
-0.10320823639631271,
0.06636335700750351,
0.015548053197562695,
0.011175747960805893,
-0.034193094819784164,
0.04140573367476463,
-0.026050886139273643,
0.0014661839231848717,
-0.02279975637793541,
-0.06002064794301987,
0.008187912404537201,
0.014402233064174652,
0.11879247426986694,
0.10379661619663239,
0.15594884753227234,
-0.04144014045596123,
-0.0072059715166687965,
0.05627167597413063,
-0.048089154064655304,
-0.02416127733886242,
0.047591038048267365,
8.439668872607946e-33,
0.09854386001825333,
-0.09343072026968002,
0.019445694983005524,
-0.039038851857185364,
0.09546177089214325,
-0.04289869964122772,
-0.03829098120331764,
-0.025882575660943985,
-0.019376445561647415,
0.05294044688344002,
-0.08171243220567703,
0.0707528367638588,
-0.056318361312150955,
-0.0063376459293067455,
-0.014562370255589485,
-0.05527699366211891,
-0.02364221028983593,
0.017992055043578148,
0.057897940278053284,
-0.016489479690790176,
0.030209828168153763,
-0.018608467653393745,
-0.08034931868314743,
0.014184349216520786,
0.08913423120975494,
-0.05093366652727127,
-0.020685823634266853,
-0.042208507657051086,
-0.07506106793880463,
-0.005810123402625322,
0.09226015955209732,
-0.051223721355199814,
-0.012227495200932026,
-0.0031947495881468058,
-0.07342927157878876,
0.003777644596993923,
0.04591156169772148,
0.031131712719798088,
-0.11678159236907959,
-0.07647217810153961,
-0.02732563018798828,
-0.06088489666581154,
-0.01986878179013729,
0.009879270568490028,
-0.015224766917526722,
-0.07398200035095215,
-0.03946547582745552,
-0.04287341237068176,
0.005372029263526201,
0.017705285921692848,
-0.022907817736268044,
0.0025453276466578245,
0.02757667563855648,
-0.011591489426791668,
0.028815796598792076,
-0.026571525260806084,
0.030966157093644142,
-0.01597888022661209,
-0.06673067063093185,
0.004174307454377413,
-0.05891817435622215,
0.05005577951669693,
-0.006223863456398249,
-0.00965900905430317,
0.013920710422098637,
-0.003841809928417206,
0.0413762629032135,
0.08174952119588852,
0.017115283757448196,
0.07010713219642639,
-0.09405773133039474,
0.04431048408150673,
0.027654236182570457,
0.02671591378748417,
0.010599779896438122,
-0.0443512462079525,
0.016965514048933983,
-0.05815054103732109,
-0.1346149444580078,
0.026396658271551132,
0.10333780199289322,
0.018396662548184395,
-0.046918775886297226,
0.020024878904223442,
0.03213370963931084,
0.023497125133872032,
-0.013314418494701385,
-0.009433802217245102,
-0.06793469935655594,
0.007134824525564909,
-0.05980154499411583,
0.02758585289120674,
-0.015374449081718922,
-0.06566774845123291,
-0.10020330548286438,
-9.09442951159153e-33,
0.11673899739980698,
0.052961643785238266,
-0.013591866008937359,
0.029332567006349564,
-0.01077147014439106,
-0.025619998574256897,
0.0779048427939415,
0.06595135480165482,
-0.027366379275918007,
0.014596599154174328,
0.01149398647248745,
-0.005228275433182716,
-0.038878537714481354,
0.05121447518467903,
-0.03090561181306839,
0.03065766766667366,
-0.09234078973531723,
-0.08004476875066757,
0.03902760520577431,
0.020390644669532776,
-0.04543716087937355,
0.04144887626171112,
-0.007254326716065407,
0.07787547260522842,
-0.04085269942879677,
0.04281924292445183,
0.09928334504365921,
-0.013601314276456833,
-0.0727299228310585,
-0.011626874096691608,
0.044438138604164124,
-0.1277584582567215,
-0.0075070420280098915,
0.1177963986992836,
0.006493488326668739,
-0.0674365684390068,
-0.06599131971597672,
0.08391735702753067,
0.006810706574469805,
0.03823871538043022,
0.0494019016623497,
0.0343051515519619,
-0.04714055731892586,
0.03841124475002289,
-0.12693306803703308,
-0.02111005410552025,
0.06716816872358322,
0.030919434502720833,
-0.0009996447479352355,
-0.10239821672439575,
-0.01650235801935196,
0.02470093034207821,
-0.06609644740819931,
0.07944970577955246,
-0.008800690062344074,
-0.0353490449488163,
-0.03891659528017044,
-0.03235733509063721,
-0.08900456130504608,
0.018427781760692596,
0.025510111823678017,
-0.06848214566707611,
0.07523223012685776,
0.024270065128803253,
0.035095520317554474,
-0.061572860926389694,
-0.08569886535406113,
-0.04066634550690651,
-0.042131319642066956,
0.03408489376306534,
0.0890035629272461,
0.010388975031673908,
-0.018390284851193428,
0.02032637409865856,
-0.010266602970659733,
-0.04183315858244896,
0.01363686565309763,
0.021564830094575882,
0.05251671373844147,
0.052532780915498734,
-0.06274979561567307,
0.04081789031624794,
-0.041530415415763855,
-0.015896711498498917,
-0.0024676555767655373,
0.005066480953246355,
0.021732090041041374,
0.08907412737607956,
0.070159912109375,
0.04735898971557617,
0.017673952504992485,
0.07954161614179611,
-0.05853941664099693,
0.08354876190423965,
0.0013750623911619186,
-5.1407837986516824e-8,
0.030224725604057312,
-0.06028648093342781,
-0.023032255470752716,
0.04488394781947136,
0.04485629126429558,
-0.013290352188050747,
0.04850909486413002,
-0.023858265951275826,
-0.07598074525594711,
-0.07824226468801498,
0.01562300231307745,
0.04171425476670265,
-0.07969442009925842,
0.00994018092751503,
0.07214000076055527,
0.015357047319412231,
0.013235650956630707,
0.05850566178560257,
0.02482703886926174,
-0.04615236818790436,
-0.0074333250522613525,
-0.010421736165881157,
0.001800107304006815,
-0.023228241130709648,
0.00904840137809515,
0.07310973107814789,
0.047822631895542145,
0.08402476459741592,
0.006310399621725082,
-0.0009772812481969595,
0.023814311251044273,
0.005282217636704445,
-0.03339887782931328,
0.043258149176836014,
0.021660299971699715,
-0.03583512827754021,
-0.12932683527469635,
0.005340456031262875,
-0.02026205137372017,
-0.0039682537317276,
-0.016645243391394615,
-0.00875322800129652,
-0.01757054403424263,
0.039681993424892426,
0.015641266480088234,
-0.004711455665528774,
0.0387432724237442,
0.07024481147527695,
0.009218872524797916,
-0.0467379167675972,
0.009610035456717014,
-0.09635008871555328,
0.006854488514363766,
0.07214128226041794,
-0.013848419301211834,
-0.011338632553815842,
0.08453236520290375,
-0.019863711670041084,
0.0043351720087230206,
0.07284584641456604,
0.030211620032787323,
-0.024145537987351418,
0.013280830346047878,
0.001846829429268837
] | 0.162557
|
first terminal. ```shell # This should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-1 1/1 Running 0 16m web-2 1/1 Running 0 2m NAME READY STATUS RESTARTS AGE web-0 0/1 Pending 0 0s web-0 0/1 Pending 0 0s web-0 0/1 ContainerCreating 0 0s web-0 1/1 Running 0 18s web-2 1/1 Terminating 0 3m web-2 0/1 Terminating 0 3m web-2 0/1 Terminating 0 3m web-2 0/1 Terminating 0 3m ``` When the `web` StatefulSet was recreated, it first relaunched `web-0`. Since `web-1` was already Running and Ready, when `web-0` transitioned to Running and Ready, it adopted this Pod. Since you recreated the StatefulSet with `replicas` equal to 2, once `web-0` had been recreated, and once `web-1` had been determined to already be Running and Ready, `web-2` was terminated. Now take another look at the contents of the `index.html` file served by the Pods' webservers: ```shell for i in 0 1; do kubectl exec -i -t "web-$i" -- curl http://localhost/; done ``` ``` web-0 web-1 ``` Even though you deleted both the StatefulSet and the `web-0` Pod, it still serves the hostname originally entered into its `index.html` file. This is because the StatefulSet never deletes the PersistentVolumes associated with a Pod. When you recreated the StatefulSet and it relaunched `web-0`, its original PersistentVolume was remounted. ### Cascading delete In one terminal window, watch the Pods in the StatefulSet. ```shell # Leave this running until the next page section kubectl get pods --watch -l app=nginx ``` In another terminal, delete the StatefulSet again. This time, omit the `--cascade=orphan` parameter. ```shell kubectl delete statefulset web ``` ``` statefulset.apps "web" deleted ``` Examine the output of the `kubectl get` command running in the first terminal, and wait for all of the Pods to transition to Terminating. ```shell # This should already be running kubectl get pods --watch -l app=nginx ``` ``` NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 11m web-1 1/1 Running 0 27m NAME READY STATUS RESTARTS AGE web-0 1/1 Terminating 0 12m web-1 1/1 Terminating 0 29m web-0 0/1 Terminating 0 12m web-0 0/1 Terminating 0 12m web-0 0/1 Terminating 0 12m web-1 0/1 Terminating 0 29m web-1 0/1 Terminating 0 29m web-1 0/1 Terminating 0 29m ``` As you saw in the [Scaling Down](#scaling-down) section, the Pods are terminated one at a time, with respect to the reverse order of their ordinal indices. Before terminating a Pod, the StatefulSet controller waits for the Pod's successor to be completely terminated. {{< note >}} Although a cascading delete removes a StatefulSet together with its Pods, the cascade does \*\*not\*\* delete the headless Service associated with the StatefulSet. You must delete the `nginx` Service manually. {{< /note >}} ```shell kubectl delete service nginx ``` ``` service "nginx" deleted ``` Recreate the StatefulSet and headless Service one more time: ```shell kubectl apply -f https://k8s.io/examples/application/web/web.yaml ``` ``` service/nginx created statefulset.apps/web created ``` When all of the StatefulSet's Pods transition to Running and Ready, retrieve the contents of their `index.html` files: ```shell for i in 0 1; do kubectl exec -i -t "web-$i" -- curl http://localhost/; done ``` ``` web-0 web-1 ``` Even though you completely deleted the StatefulSet, and all of its Pods, the Pods are recreated with their PersistentVolumes mounted, and `web-0` and `web-1` continue to serve their hostnames. Finally, delete the `nginx` Service... ```shell kubectl delete service nginx ``` ``` service "nginx" deleted ``` ...and the `web` StatefulSet: ```shell kubectl delete statefulset web ``` ``` statefulset "web" deleted ``` ## Pod management policy For some distributed systems, the StatefulSet ordering guarantees are unnecessary and/or
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.011958260089159012,
-0.009526137262582779,
0.03663869947195053,
-0.019865665584802628,
0.004522115923464298,
-0.06185004115104675,
-0.027841657400131226,
-0.04279864951968193,
0.039089079946279526,
0.05670737102627754,
0.03950505331158638,
-0.06964630633592606,
-0.04868714138865471,
-0.02115357108414173,
0.047956570982933044,
-0.002088765846565366,
0.02815217897295952,
-0.07276485115289688,
-0.044290121644735336,
0.003666136646643281,
0.008568338118493557,
0.02070659026503563,
0.012695583514869213,
-0.05107545480132103,
-0.008774724788963795,
0.06066564470529556,
-0.09618654102087021,
-0.030478954315185547,
0.053090013563632965,
-0.09254512190818787,
0.004709691274911165,
0.04057147353887558,
-0.02183910273015499,
-0.02988487482070923,
0.0755486935377121,
0.10862574726343155,
0.017991963773965836,
-0.10208691656589508,
-0.09204235672950745,
-0.00936160795390606,
0.07383540272712708,
-0.041583478450775146,
-0.09103835374116898,
-0.009634519927203655,
-0.04445961117744446,
-0.040790338069200516,
-0.0480131059885025,
-0.05821661278605461,
0.018467837944626808,
-0.039583589881658554,
-0.08405088633298874,
-0.08321839570999146,
0.02313370071351528,
0.031380247324705124,
0.07124180346727371,
0.02426612749695778,
-0.030880600214004517,
0.07052990049123764,
0.09464101493358612,
0.016103841364383698,
0.021166617050766945,
-0.01788741908967495,
0.045589592307806015,
-0.019852308556437492,
0.05395148694515228,
-0.03925802931189537,
0.005789998918771744,
-0.07202965021133423,
0.04306422919034958,
0.027582120150327682,
-0.010488766245543957,
0.03762592375278473,
-0.04420868679881096,
-0.028443967923521996,
-0.04133632034063339,
-0.03432461991906166,
0.018628884106874466,
0.05362771824002266,
-0.028175702318549156,
-0.011976240202784538,
-0.030643103644251823,
-0.04932904988527298,
0.0533708855509758,
0.003963142167776823,
-0.10204652696847916,
-0.025955436751246452,
0.003630677005276084,
-0.04327477514743805,
0.04641992598772049,
-0.023733926936984062,
-0.03311259672045708,
-0.057801343500614166,
0.07599704712629318,
-0.017642121762037277,
0.04582812264561653,
-0.017022395506501198,
0.010756357572972775,
0.12204159796237946,
0.03647986426949501,
0.030498387292027473,
0.01527464296668768,
-0.01079325471073389,
0.04299422353506088,
0.015256565995514393,
0.024548454210162163,
-0.09996213763952255,
-0.10093347728252411,
0.06466300040483475,
0.05711802467703819,
-0.00881184358149767,
-0.0038783641066402197,
-0.029819421470165253,
0.03158203884959221,
0.08193198591470718,
-0.03275961056351662,
0.032745037227869034,
-0.047791969031095505,
0.04458778351545334,
0.03102789632976055,
0.10660994797945023,
0.11053702235221863,
-0.022260300815105438,
0.012838725931942463,
0.025210846215486526,
-0.06126546114683151,
0.008526821620762348,
0.11125052720308304,
6.658861787353383e-33,
0.07314427196979523,
-0.12151557207107544,
-0.020775804296135902,
0.026864349842071533,
0.11276398599147797,
-0.052872661501169205,
-0.03058689646422863,
0.02035163715481758,
-0.055250391364097595,
-0.010126117616891861,
-0.05111676827073097,
0.04008461907505989,
-0.07282853871583939,
0.0070341904647648335,
0.025954077020287514,
-0.045720454305410385,
-0.013391880318522453,
-0.03987027704715729,
0.08882497251033783,
-0.02646528370678425,
0.08122215420007706,
-0.029782285913825035,
-0.06263306736946106,
-0.024552281945943832,
0.02263360098004341,
-0.0019857322331517935,
-0.0028136197943240404,
-0.012388844043016434,
-0.055404022336006165,
0.009053600952029228,
0.03987404704093933,
-0.042004164308309555,
-0.03569146618247032,
0.06248120218515396,
-0.07878786325454712,
-0.03987622261047363,
0.03672930225729942,
0.01688992790877819,
-0.14739330112934113,
-0.09239019453525543,
0.0010746538173407316,
0.04543018341064453,
-0.05619596317410469,
-0.04011813923716545,
0.021060815081000328,
-0.14536042511463165,
-0.00826734397560358,
-0.07042581588029861,
0.02485853061079979,
0.059470225125551224,
-0.05502529442310333,
0.011507191695272923,
0.024370836094021797,
-0.022449929267168045,
-0.04711617901921272,
0.046351108700037,
0.05466004088521004,
-0.005762764718383551,
-0.06504292041063309,
-0.01010600570589304,
0.004745736252516508,
0.03795793652534485,
-0.0011222013272345066,
0.016972146928310394,
0.010861060582101345,
0.05207531526684761,
0.05470304936170578,
0.019734863191843033,
0.015073570422828197,
0.038971155881881714,
-0.08493739366531372,
-0.007723112124949694,
0.02364404685795307,
0.040582939982414246,
0.0056425114162266254,
-0.04942697659134865,
0.01733052171766758,
-0.047834496945142746,
-0.1223292425274849,
0.028605492785573006,
0.10892543196678162,
-0.004008362535387278,
-0.06535239517688751,
0.03197941929101944,
-0.020304858684539795,
-0.0009638844639994204,
-0.024669544771313667,
-0.045765090733766556,
-0.045774344354867935,
0.062393009662628174,
-0.011043282225728035,
0.015260602347552776,
-0.024326041340827942,
-0.020742716267704964,
-0.0735236257314682,
-9.735703556951335e-33,
0.024422021582722664,
-0.0015546552604064345,
-0.02229829505085945,
0.018336279317736626,
-0.019126808270812035,
-0.009080645628273487,
0.00938564445823431,
0.04854503273963928,
-0.03384510055184364,
-0.032791439443826675,
0.05472765862941742,
0.0027512547094374895,
0.008342113345861435,
0.07776394486427307,
-0.09807492792606354,
0.05273115262389183,
-0.033286191523075104,
-0.1101844310760498,
-0.02840884029865265,
0.006801420822739601,
0.0077672721818089485,
0.07261379063129425,
0.001791458111256361,
0.05962120369076729,
0.005553139373660088,
0.017767637968063354,
0.0933959111571312,
0.008880022913217545,
-0.04566078633069992,
-0.024600977078080177,
0.07180872559547424,
-0.08886827528476715,
-0.027086904272437096,
0.0955725908279419,
0.011250913143157959,
-0.049481622874736786,
-0.05038028955459595,
0.059912972152233124,
0.0005931491614319384,
-0.06414981186389923,
0.07724403589963913,
0.023462265729904175,
0.001079921843484044,
0.03532868251204491,
-0.06218545138835907,
-0.02042202465236187,
0.03790215402841568,
0.00670376792550087,
0.03682052716612816,
-0.09359316527843475,
-0.023914789780974388,
0.05546851083636284,
0.0003900571900885552,
0.034753523766994476,
-0.021509602665901184,
-0.012483317404985428,
-0.006510159000754356,
0.028348861262202263,
-0.059825312346220016,
-0.014101067557930946,
0.03262577950954437,
-0.06091855466365814,
0.023718809708952904,
0.03085990995168686,
0.03167979046702385,
-0.03812042623758316,
-0.09302719682455063,
0.0388307049870491,
-0.013849368318915367,
0.014603680931031704,
0.06286636739969254,
0.04533715546131134,
0.005820343736559153,
0.004961672239005566,
-0.019751884043216705,
-0.035910192877054214,
-0.03921729326248169,
-0.004608245100826025,
0.03303646296262741,
0.01983710005879402,
-0.09055989980697632,
0.11245893687009811,
-0.07874146103858948,
-0.08697547763586044,
0.04015463963150978,
0.03518099710345268,
0.024460410699248314,
0.07508806139230728,
0.047268256545066833,
0.05374855920672417,
0.018379585817456245,
-0.0029717511497437954,
-0.11310262978076935,
0.06778399646282196,
-0.01776936650276184,
-5.20488541155828e-8,
0.05313849449157715,
-0.008600745350122452,
-0.06769895553588867,
0.13324430584907532,
0.09829294681549072,
-0.05736581236124039,
0.02191995456814766,
-0.01827269420027733,
-0.038915034383535385,
-0.05767151340842247,
-0.06070418283343315,
0.10642922669649124,
-0.1156754419207573,
0.06305365264415741,
0.03686156123876572,
-0.04927091673016548,
-0.00357168260961771,
0.03592842444777489,
0.03879934921860695,
-0.06786872446537018,
-0.02389177866280079,
-0.10551480203866959,
-0.017866043373942375,
-0.004977372474968433,
0.028456678614020348,
0.04706914722919464,
0.07480619102716446,
0.046950362622737885,
-0.0055771395564079285,
0.019780490547418594,
-0.024892065674066544,
-0.005012044683098793,
-0.07490331679582596,
0.011818215250968933,
-0.02972080186009407,
-0.06117774173617363,
-0.13782694935798645,
0.027182433754205704,
-0.01506519690155983,
-0.051196757704019547,
0.008527582511305809,
0.06077871099114418,
0.015806114301085472,
0.01903589256107807,
-0.0024026210885494947,
0.032392166554927826,
0.01761629991233349,
0.06638839095830917,
0.033277884125709534,
-0.06709248572587967,
-0.012228917330503464,
-0.06952733546495438,
-0.0003088055527769029,
0.05964590236544609,
0.03401234373450279,
0.029810898005962372,
0.036149684339761734,
-0.023215893656015396,
-0.053274452686309814,
0.02498946338891983,
0.058234803378582,
-0.06324386596679688,
-0.03375723585486412,
-0.017580242827534676
] | 0.118871
|
to serve their hostnames. Finally, delete the `nginx` Service... ```shell kubectl delete service nginx ``` ``` service "nginx" deleted ``` ...and the `web` StatefulSet: ```shell kubectl delete statefulset web ``` ``` statefulset "web" deleted ``` ## Pod management policy For some distributed systems, the StatefulSet ordering guarantees are unnecessary and/or undesirable. These systems require only uniqueness and identity. You can specify a [Pod management policy](/docs/concepts/workloads/controllers/statefulset/#pod-management-policies) to avoid this strict ordering; either `OrderedReady` (the default), or `Parallel`. ### OrderedReady Pod management `OrderedReady` pod management is the default for StatefulSets. It tells the StatefulSet controller to respect the ordering guarantees demonstrated above. Use this when your application requires or expects that changes, such as rolling out a new version of your application, happen in the strict order of the ordinal (pod number) that the StatefulSet provides. In other words, if you have Pods `app-0`, `app-1` and `app-2`, Kubernetes will update `app-0` first and check it. Once the checks are good, Kubernetes updates `app-1` and finally `app-2`. If you added two more Pods, Kubernetes would set up `app-3` and wait for that to become healthy before deploying `app-4`. Because this is the default setting, you've already practised using it. ### Parallel Pod management The alternative, `Parallel` pod management, tells the StatefulSet controller to launch or terminate all Pods in parallel, and not to wait for Pods to become `Running` and `Ready` or completely terminated prior to launching or terminating another Pod. The `Parallel` pod management option only affects the behavior for scaling operations. Updates are not affected; Kubernetes still rolls out changes in order. For this tutorial, the application is very simple: a webserver that tells you its hostname (because this is a StatefulSet, the hostname for each Pod is different and predictable). {{% code\_sample file="application/web/web-parallel.yaml" %}} This manifest is identical to the one you downloaded above except that the `.spec.podManagementPolicy` of the `web` StatefulSet is set to `Parallel`. In one terminal, watch the Pods in the StatefulSet. ```shell # Leave this watch running until the end of the section kubectl get pod -l app=nginx --watch ``` In another terminal, reconfigure the StatefulSet for `Parallel` Pod management: ```shell kubectl apply -f https://k8s.io/examples/application/web/web-parallel.yaml ``` ``` service/nginx updated statefulset.apps/web updated ``` Keep the terminal open where you're running the watch. In another terminal window, scale the StatefulSet: ```shell kubectl scale statefulset/web --replicas=5 ``` ``` statefulset.apps/web scaled ``` Examine the output of the terminal where the `kubectl get` command is running. It may look something like ``` web-3 0/1 Pending 0 0s web-3 0/1 Pending 0 0s web-3 0/1 Pending 0 7s web-3 0/1 ContainerCreating 0 7s web-2 0/1 Pending 0 0s web-4 0/1 Pending 0 0s web-2 1/1 Running 0 8s web-4 0/1 ContainerCreating 0 4s web-3 1/1 Running 0 26s web-4 1/1 Running 0 2s ``` The StatefulSet launched three new Pods, and it did not wait for the first to become Running and Ready prior to launching the second and third Pods. This approach is useful if your workload has a stateful element, or needs Pods to be able to identify each other with predictable naming, and especially if you sometimes need to provide a lot more capacity quickly. If this simple web service for the tutorial suddenly got an extra 1,000,000 requests per minute then you would want to run some more Pods - but you also would not want to wait for each new Pod to launch. Starting the extra Pods in parallel cuts the time between requesting the extra capacity and having it available for use. ## {{% heading "cleanup" %}} You should have two terminals open, ready for you
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
-0.01936247944831848,
0.022803055122494698,
0.05855598300695419,
-0.045204561203718185,
-0.05481477826833725,
-0.0564836747944355,
-0.04881439357995987,
-0.10452475398778915,
0.10196288675069809,
0.06537733227014542,
-0.030963562428951263,
0.012698245234787464,
0.003631116123870015,
-0.04097188636660576,
0.03876466304063797,
-0.06726271659135818,
-0.017737820744514465,
0.045752182602882385,
-0.054780807346105576,
-0.018626099452376366,
0.0012085764901712537,
0.008675928227603436,
-0.0006319658714346588,
0.04380073770880699,
-0.035416118800640106,
0.01989280991256237,
-0.029667196795344353,
-0.0072000096552073956,
0.025174062699079514,
-0.058898065239191055,
-0.016313958913087845,
0.012177436612546444,
-0.044508036226034164,
-0.008624833077192307,
0.019196778535842896,
0.09187562763690948,
-0.04562349244952202,
-0.1083432286977768,
-0.08348032087087631,
-0.021295227110385895,
0.12009244412183762,
-0.015690384432673454,
-0.0794065073132515,
-0.07175028324127197,
-0.06177594140172005,
-0.013451868668198586,
-0.04332330450415611,
-0.03099137172102928,
0.012861382216215134,
-0.0509272962808609,
-0.00450713699683547,
-0.08755085617303848,
0.013879417441785336,
0.10567150264978409,
0.08075140416622162,
0.008165496401488781,
0.018735235556960106,
0.026577364653348923,
0.0617806501686573,
0.03535599634051323,
-0.01434818934649229,
-0.022935114800930023,
0.051731277257204056,
-0.009482065215706825,
0.05420853570103645,
-0.01850540190935135,
0.024403009563684464,
-0.01302438136190176,
-0.010748923756182194,
0.058683961629867554,
0.07045506685972214,
0.01825103908777237,
-0.026661571115255356,
-0.03353027626872063,
-0.052936945110559464,
0.012394720688462257,
-0.02784057706594467,
0.021363290026783943,
-0.07002133876085281,
-0.008009204640984535,
0.016849912703037262,
0.004223578609526157,
0.03674349933862686,
0.004418332129716873,
-0.07634688913822174,
-0.046450551599264145,
0.011225615628063679,
-0.09407596290111542,
0.04262765124440193,
-0.001166080473922193,
0.016296619549393654,
-0.03771587088704109,
0.12082962691783905,
-0.11206390708684921,
0.08390544354915619,
0.0016751260263845325,
0.06030238792300224,
0.0760999545454979,
-0.020254995673894882,
0.03900915011763573,
0.07559755444526672,
-0.04428238049149513,
0.058506276458501816,
0.04119180515408516,
0.07519348710775375,
-0.05225145444273949,
-0.05094717815518379,
-0.0185603778809309,
0.026851842179894447,
0.017129024490714073,
-0.015254221856594086,
0.027403663843870163,
0.02660919725894928,
0.04876028373837471,
-0.049167778342962265,
0.0006142497877590358,
-0.010875767096877098,
0.040533218532800674,
0.014968513511121273,
0.07908325642347336,
0.04724900424480438,
-0.08771078288555145,
0.024745268747210503,
0.008980152197182178,
-0.0434175580739975,
0.04897218570113182,
0.0483243353664875,
2.1079120819288728e-33,
0.020143937319517136,
-0.07116241753101349,
0.0031654571648687124,
-0.037989530712366104,
0.0694420114159584,
-0.04924808442592621,
-0.044665880501270294,
-0.0021273710299283266,
-0.015156177803874016,
-0.013041914440691471,
-0.0017444592667743564,
0.06257709860801697,
0.003237638156861067,
-0.009397939778864384,
-0.013803849928081036,
-0.04859243333339691,
0.0018611190607771277,
0.0659780278801918,
0.1541684865951538,
0.059604328125715256,
0.09238587319850922,
-0.02581097185611725,
-0.05751616135239601,
0.054659079760313034,
0.050237417221069336,
-0.01900157332420349,
0.0039588590152561665,
-0.07665900886058807,
-0.099248968064785,
0.0007589818560518324,
0.07373601198196411,
-0.009816485457122326,
-0.007193622179329395,
0.05499357357621193,
-0.12207471579313278,
-0.030446693301200867,
-0.0005748088588006794,
0.01591513864696026,
-0.13273924589157104,
-0.08141899108886719,
0.0678374245762825,
-0.002785081509500742,
-0.08982621133327484,
0.04222932085394859,
0.02057846449315548,
-0.04328542575240135,
0.03813215345144272,
-0.06972777843475342,
0.06145940721035004,
0.019626228138804436,
-0.01379647571593523,
-0.0386931411921978,
0.03411007672548294,
-0.042462076991796494,
0.021229032427072525,
0.013246243819594383,
0.05430953577160835,
-0.056399427354335785,
-0.06400539726018906,
-0.06182041019201279,
-0.014506055042147636,
-0.06411395221948624,
-0.029902702197432518,
0.06834787130355835,
0.042528629302978516,
0.0264703668653965,
0.029936490580439568,
0.010551577433943748,
0.0032142626587301493,
-0.016680385917425156,
-0.08066100627183914,
0.03794814273715019,
-0.013673017732799053,
0.039800047874450684,
-0.01775495335459709,
-0.06080396845936775,
0.031258631497621536,
0.016850998625159264,
-0.07711657881736755,
-0.006684730760753155,
0.07269269973039627,
0.014067476615309715,
-0.0772116631269455,
0.09614162147045135,
-0.021582959219813347,
0.0036462030839174986,
-0.0014148523332551122,
0.01728224754333496,
-0.08487673848867416,
0.026088319718837738,
0.0001735561090754345,
0.0358271449804306,
-0.02947806753218174,
0.0539558045566082,
-0.06586114317178726,
-3.5555082120405726e-33,
0.07673141360282898,
-0.05167780816555023,
-0.007887445390224457,
0.01235321443527937,
0.016923461109399796,
-0.005891276523470879,
-0.015352743677794933,
0.10534660518169403,
-0.05721316486597061,
-0.08618172258138657,
0.0008192483219318092,
-0.036851126700639725,
0.03667739778757095,
0.033267296850681305,
-0.07614708691835403,
0.043932896107435226,
-0.04255117475986481,
-0.08169762045145035,
-0.08444350957870483,
0.003875605994835496,
-0.03469214588403702,
0.04590032622218132,
0.03381400927901268,
0.06798191368579865,
-0.015558268874883652,
0.01757247932255268,
0.02827037312090397,
-0.00993403885513544,
-0.07971394062042236,
-0.03129540756344795,
0.032052181661129,
-0.1076098084449768,
-0.060550082474946976,
0.03039238043129444,
-0.013885614462196827,
-0.03886483237147331,
-0.0574544332921505,
0.11859165132045746,
-0.019897762686014175,
0.027515757828950882,
0.07077673077583313,
0.04244599491357803,
-0.04796502739191055,
-0.0010643115965649486,
-0.07811623066663742,
-0.012642508372664452,
0.0003047122445423156,
-0.003444623202085495,
0.01374786626547575,
-0.06518163532018661,
-0.04451371729373932,
0.005862598307430744,
-0.03134141117334366,
0.04380127415060997,
0.02674831636250019,
0.010842498391866684,
0.009490778669714928,
0.03965330868959427,
-0.020520707592368126,
0.02725972980260849,
0.04827146604657173,
-0.03589244186878204,
0.05728503689169884,
0.10395269840955734,
-0.017030470073223114,
-0.010538417845964432,
-0.052938707172870636,
0.003577643074095249,
0.09838352352380753,
0.03336426243185997,
-0.0003061978204641491,
-0.007400596980005503,
0.004946437198668718,
0.029058802872896194,
0.03670162335038185,
-0.020625527948141098,
0.028530940413475037,
-0.03324711322784424,
0.03331771120429039,
0.006128835026174784,
-0.01734323613345623,
0.10659962147474289,
-0.11682107299566269,
0.00851343758404255,
-0.01210478600114584,
0.07567153126001358,
0.06521852314472198,
0.061028484255075455,
0.05873836576938629,
0.08473964780569077,
0.024060411378741264,
0.008954323828220367,
-0.08747805655002594,
0.018099673092365265,
-0.09787250310182571,
-4.570117440039212e-8,
0.06019745394587517,
-0.006908805575221777,
0.0007945019169710577,
0.10960358381271362,
0.05308104306459427,
-0.07705019414424896,
0.025430595502257347,
0.01765102706849575,
-0.010528508573770523,
-0.010021699592471123,
-0.0327606201171875,
0.0718875378370285,
-0.07487884908914566,
0.023261744529008865,
0.05370498076081276,
-0.07385258376598358,
0.030103487893939018,
0.06160901486873627,
-0.004690906498581171,
-0.06641872227191925,
-0.11555307358503342,
-0.04087890684604645,
0.0446707159280777,
-0.0006069932715035975,
0.0223995391279459,
0.0440421998500824,
0.12543317675590515,
0.0029221626464277506,
0.03964388743042946,
0.08804745972156525,
-0.04889807850122452,
-0.014343640767037868,
-0.06488631665706635,
0.008577330969274044,
-0.059274379163980484,
-0.005787219852209091,
-0.19225099682807922,
0.00983918085694313,
0.020121237263083458,
0.014015360735356808,
-0.0410708524286747,
0.04053309187293053,
0.012603579089045525,
-0.011273354291915894,
-0.017171191051602364,
0.002827893942594528,
0.00516842445358634,
0.05464264005422592,
0.04914964362978935,
-0.013929215259850025,
-0.07000504434108734,
-0.032508742064237595,
-0.010846965946257114,
0.07794132083654404,
-0.01174565963447094,
0.015348833054304123,
0.05684828758239746,
-0.025600915774703026,
0.0038220430724322796,
-0.00950352568179369,
0.017112668603658676,
-0.05472380667924881,
-0.024932915344834328,
-0.02316470816731453
] | 0.131502
|
Pods - but you also would not want to wait for each new Pod to launch. Starting the extra Pods in parallel cuts the time between requesting the extra capacity and having it available for use. ## {{% heading "cleanup" %}} You should have two terminals open, ready for you to run `kubectl` commands as part of cleanup. ```shell kubectl delete sts web # sts is an abbreviation for statefulset ``` You can watch `kubectl get` to see those Pods being deleted. ```shell # end the watch when you've seen what you need to kubectl get pod -l app=nginx --watch ``` ``` web-3 1/1 Terminating 0 9m web-2 1/1 Terminating 0 9m web-3 1/1 Terminating 0 9m web-2 1/1 Terminating 0 9m web-1 1/1 Terminating 0 44m web-0 1/1 Terminating 0 44m web-0 0/1 Terminating 0 44m web-3 0/1 Terminating 0 9m web-2 0/1 Terminating 0 9m web-1 0/1 Terminating 0 44m web-0 0/1 Terminating 0 44m web-2 0/1 Terminating 0 9m web-2 0/1 Terminating 0 9m web-2 0/1 Terminating 0 9m web-1 0/1 Terminating 0 44m web-1 0/1 Terminating 0 44m web-1 0/1 Terminating 0 44m web-0 0/1 Terminating 0 44m web-0 0/1 Terminating 0 44m web-0 0/1 Terminating 0 44m web-3 0/1 Terminating 0 9m web-3 0/1 Terminating 0 9m web-3 0/1 Terminating 0 9m ``` During deletion, a StatefulSet removes all Pods concurrently; it does not wait for a Pod's ordinal successor to terminate prior to deleting that Pod. Close the terminal where the `kubectl get` command is running and delete the `nginx` Service: ```shell kubectl delete svc nginx ``` Delete the persistent storage media for the PersistentVolumes used in this tutorial. ```shell kubectl get pvc ``` ``` NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE www-web-0 Bound pvc-2bf00408-d366-4a12-bad0-1869c65d0bee 1Gi RWO standard 25m www-web-1 Bound pvc-ba3bfe9c-413e-4b95-a2c0-3ea8a54dbab4 1Gi RWO standard 24m www-web-2 Bound pvc-cba6cfa6-3a47-486b-a138-db5930207eaf 1Gi RWO standard 15m www-web-3 Bound pvc-0c04d7f0-787a-4977-8da3-d9d3a6d8d752 1Gi RWO standard 15m www-web-4 Bound pvc-b2c73489-e70b-4a4e-9ec1-9eab439aa43e 1Gi RWO standard 14m ``` ```shell kubectl get pv ``` ``` NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-0c04d7f0-787a-4977-8da3-d9d3a6d8d752 1Gi RWO Delete Bound default/www-web-3 standard 15m pvc-2bf00408-d366-4a12-bad0-1869c65d0bee 1Gi RWO Delete Bound default/www-web-0 standard 25m pvc-b2c73489-e70b-4a4e-9ec1-9eab439aa43e 1Gi RWO Delete Bound default/www-web-4 standard 14m pvc-ba3bfe9c-413e-4b95-a2c0-3ea8a54dbab4 1Gi RWO Delete Bound default/www-web-1 standard 24m pvc-cba6cfa6-3a47-486b-a138-db5930207eaf 1Gi RWO Delete Bound default/www-web-2 standard 15m ``` ```shell kubectl delete pvc www-web-0 www-web-1 www-web-2 www-web-3 www-web-4 ``` ``` persistentvolumeclaim "www-web-0" deleted persistentvolumeclaim "www-web-1" deleted persistentvolumeclaim "www-web-2" deleted persistentvolumeclaim "www-web-3" deleted persistentvolumeclaim "www-web-4" deleted ``` ```shell kubectl get pvc ``` ``` No resources found in default namespace. ``` {{< note >}} You also need to delete the persistent storage media for the PersistentVolumes used in this tutorial. Follow the necessary steps, based on your environment, storage configuration, and provisioning method, to ensure that all storage is reclaimed. {{< /note >}}
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/basic-stateful-set.md
|
[
0.006351403426378965,
-0.054739512503147125,
0.021313292905688286,
0.0014628333738073707,
-0.03141501918435097,
-0.04044480621814728,
-0.027969470247626305,
-0.03162654861807823,
0.061532992869615555,
0.04055775701999664,
-0.027392277494072914,
-0.01965644769370556,
-0.02724650874733925,
-0.026265695691108704,
0.06002829968929291,
-0.07128709554672241,
0.018879693001508713,
0.03282318264245987,
-0.02175229601562023,
-0.05199674516916275,
0.026578843593597412,
0.01865176297724247,
0.01484470535069704,
-0.01845647394657135,
-0.04861663281917572,
0.061696652323007584,
-0.03614035248756409,
-0.06413319706916809,
0.046611689031124115,
-0.04687395691871643,
-0.013643402606248856,
-0.005393459927290678,
0.008066179230809212,
-0.0023297294974327087,
0.044841468334198,
0.10523262619972229,
-0.024013780057430267,
-0.06703528761863708,
-0.05131779983639717,
0.028204021975398064,
0.08725357800722122,
-0.0024197057355195284,
-0.12944945693016052,
-0.04118571802973747,
-0.06314943730831146,
-0.05410723760724068,
-0.1330946385860443,
-0.04436158761382103,
0.06153525039553642,
-0.06072787940502167,
0.0014692784752696753,
-0.12227155268192291,
-0.002057101344689727,
0.060353510081768036,
0.05519132688641548,
-0.04715238884091377,
-0.016547348350286484,
-0.008127490058541298,
0.06973010301589966,
0.021245665848255157,
0.023244371637701988,
-0.026325790211558342,
0.056180767714977264,
-0.053422559052705765,
0.05048610270023346,
-0.003254986135289073,
-0.045097172260284424,
0.014046547003090382,
0.016142303124070168,
0.036439333111047745,
0.011048171669244766,
0.020904188975691795,
-0.022095264866948128,
-0.04803651571273804,
-0.12017440050840378,
-0.011206375434994698,
0.054590556770563126,
0.032599449157714844,
-0.11276275664567947,
0.02769068442285061,
-0.0061837187968194485,
-0.00008035432983888313,
0.027519073337316513,
0.028770186007022858,
-0.09128443151712418,
-0.02324281446635723,
0.025017675012350082,
-0.02453199215233326,
0.03720984607934952,
-0.04394104704260826,
-0.010595452040433884,
0.05955421179533005,
0.05799725651741028,
-0.08717185258865356,
0.03608010336756706,
0.020117899402976036,
-0.007516713347285986,
0.06941195577383041,
0.032189007848501205,
0.02531638741493225,
0.04551416635513306,
-0.027176208794116974,
0.02203531190752983,
-0.024363568052649498,
0.0191110298037529,
-0.04379020258784294,
-0.10763905197381973,
0.017307907342910767,
0.030738193541765213,
0.008516812697052956,
-0.025239011272788048,
0.0063827671110630035,
-0.0029812029097229242,
0.09289513528347015,
-0.04495014622807503,
0.055310484021902084,
-0.02008422277867794,
0.001648600329644978,
0.0715349093079567,
0.14560024440288544,
0.08991456031799316,
-0.06289836019277573,
0.030564332380890846,
0.029793674126267433,
0.03141584247350693,
0.0006414533709175885,
0.0812510997056961,
4.6690940508508504e-33,
0.009912824258208275,
-0.07998469471931458,
-0.03424583375453949,
-0.03900105506181717,
0.06635870784521103,
-0.01942312717437744,
-0.029547207057476044,
0.020898770540952682,
-0.027447979897260666,
0.006580864544957876,
-0.05538395419716835,
0.09018346667289734,
-0.08973574638366699,
0.023287519812583923,
0.03763310983777046,
-0.07502621412277222,
0.010406461544334888,
0.03042375110089779,
0.10223988443613052,
-0.04187129810452461,
0.07665485888719559,
-0.04636524245142937,
-0.08151388168334961,
0.06885737180709839,
0.07620234042406082,
-0.09484892338514328,
0.010087870992720127,
-0.03041984885931015,
-0.07433721423149109,
0.0007229532347992063,
0.03739626705646515,
0.019522175192832947,
-0.06545550376176834,
0.05284546688199043,
-0.1184401735663414,
-0.03397372364997864,
-0.036492299288511276,
0.06436417996883392,
-0.08663283288478851,
-0.05865674093365669,
0.01592080295085907,
0.023559901863336563,
-0.05205180495977402,
-0.04040903598070145,
-0.01776672527194023,
-0.06867887079715729,
-0.009217571467161179,
-0.0898750051856041,
0.033910155296325684,
0.014824668876826763,
0.02223353274166584,
0.0024875509552657604,
0.031824350357055664,
-0.03252026438713074,
0.019945967942476273,
0.010268093086779118,
0.03481496125459671,
0.004590807482600212,
0.0033899603877216578,
-0.004849476274102926,
-0.03894902020692825,
0.024355627596378326,
0.012709856033325195,
0.04990440979599953,
0.03713877871632576,
0.04464840516448021,
0.0547499805688858,
0.06763868033885956,
0.041325487196445465,
0.036064449697732925,
-0.09828836470842361,
0.028616761788725853,
0.02656686119735241,
0.01818815991282463,
0.002831280929967761,
-0.041872914880514145,
0.049217093735933304,
-0.009695063345134258,
-0.10220874100923538,
0.01622299663722515,
0.09481532871723175,
-0.02871525101363659,
-0.04049360752105713,
0.0708405151963234,
0.03470940515398979,
0.008876754902303219,
-0.011645226739346981,
-0.01851925440132618,
-0.0840187594294548,
0.02203112654387951,
-0.06760505586862564,
0.020488785579800606,
-0.07250640541315079,
-0.03958006203174591,
-0.09941685199737549,
-6.1070215562560446e-33,
0.08819440007209778,
-0.012622227892279625,
0.022475456818938255,
0.012281537055969238,
-0.02170144021511078,
0.0014821250224485993,
-0.031055355444550514,
0.03570636361837387,
-0.07256496697664261,
0.005554012022912502,
-0.06374949216842651,
-0.009464874863624573,
0.023594357073307037,
0.10380193591117859,
-0.11737670749425888,
0.014177445322275162,
-0.014745369553565979,
-0.12160364538431168,
-0.017309533432126045,
-0.0057959710247814655,
-0.022558724507689476,
0.009390532039105892,
0.0752357766032219,
0.005888005718588829,
-0.011613335460424423,
0.019654402509331703,
0.06027296185493469,
-0.000689225154928863,
-0.06596945971250534,
-0.017898382619023323,
-0.008882185444235802,
-0.10619393736124039,
0.04001075401902199,
0.01616070605814457,
0.014622004702687263,
-0.05293872952461243,
-0.023218711838126183,
0.1201004758477211,
0.03639679402112961,
-0.05184295028448105,
0.07289902120828629,
-0.009166005998849869,
-0.023803913965821266,
-0.03532722592353821,
-0.07159122079610825,
-0.023006856441497803,
0.015256100334227085,
0.02898002415895462,
-0.04822195693850517,
-0.03494122251868248,
-0.07531794160604477,
0.041281070560216904,
-0.08902984112501144,
0.04384728893637657,
-0.014137216843664646,
-0.05660722404718399,
0.04319638013839722,
-0.005104060750454664,
-0.021993005648255348,
-0.00654709804803133,
0.047267839312553406,
-0.04173906520009041,
0.07288791984319687,
0.029321426525712013,
-0.0014503271086141467,
-0.05160876736044884,
-0.05414140969514847,
-0.009962201118469238,
-0.038036879152059555,
0.040046051144599915,
0.06207887828350067,
0.07338827848434448,
-0.0004649670736398548,
0.04249246045947075,
-0.014781844802200794,
0.009210544638335705,
-0.026381609961390495,
-0.04944450408220291,
0.06920931488275528,
0.036236122250556946,
-0.02865741401910782,
0.10787739604711533,
-0.040633540600538254,
-0.048080671578645706,
0.0008618366555310786,
0.11465249210596085,
0.01526620052754879,
0.06311064213514328,
0.09253060072660446,
0.061645857989788055,
0.028691070154309273,
0.03470166027545929,
0.01206042617559433,
0.0331154502928257,
-0.03518490865826607,
-4.9929941070558925e-8,
0.08022938668727875,
0.010492470115423203,
-0.008726061321794987,
0.13643696904182434,
0.041888318955898285,
-0.11745940893888474,
-0.007799002807587385,
0.03335646167397499,
0.004581615328788757,
-0.015797557309269905,
0.0032000411301851273,
0.04037122800946236,
-0.10315434634685516,
0.09156876057386398,
0.023580914363265038,
-0.00033712954609654844,
0.043326396495103836,
-0.004298849031329155,
0.059187132865190506,
-0.02571026049554348,
-0.04973392188549042,
-0.022801728919148445,
0.054321691393852234,
0.05687372758984566,
0.06665694713592529,
0.04229523241519928,
0.06804253906011581,
0.015858443453907967,
0.02189740724861622,
-0.032886069267988205,
0.010633515194058418,
-0.021141434088349342,
-0.0654270201921463,
0.04806876927614212,
-0.021666748449206352,
-0.06378054618835449,
-0.21145965158939362,
0.029521338641643524,
-0.0009361360571347177,
-0.00007158076914492995,
-0.02536550723016262,
0.009204626083374023,
0.013182736933231354,
-0.006393464747816324,
-0.018202081322669983,
0.004176569636911154,
0.0007762985769659281,
0.01650497131049633,
0.026568252593278885,
-0.023586800321936607,
-0.033415935933589935,
-0.06795389950275421,
-0.013001702725887299,
0.0821647047996521,
0.014669191092252731,
0.028796052560210228,
0.03831180930137634,
-0.03694808483123779,
0.00816405937075615,
0.013855704106390476,
0.01136524323374033,
-0.07232805341482162,
-0.032098375260829926,
-0.043117787688970566
] | 0.135913
|
This tutorial shows you how to deploy a WordPress site and a MySQL database using Minikube. Both applications use PersistentVolumes and PersistentVolumeClaims to store data. A [PersistentVolume](/docs/concepts/storage/persistent-volumes/) (PV) is a piece of storage in the cluster that has been manually provisioned by an administrator, or dynamically provisioned by Kubernetes using a [StorageClass](/docs/concepts/storage/storage-classes). A [PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) (PVC) is a request for storage by a user that can be fulfilled by a PV. PersistentVolumes and PersistentVolumeClaims are independent from Pod lifecycles and preserve data through restarting, rescheduling, and even deleting Pods. {{< warning >}} This deployment is not suitable for production use cases, as it uses single instance WordPress and MySQL Pods. Consider using [WordPress Helm Chart](https://github.com/bitnami/charts/tree/master/bitnami/wordpress) to deploy WordPress in production. {{< /warning >}} {{< note >}} The files provided in this tutorial are using GA Deployment APIs and are specific to kubernetes version 1.9 and later. If you wish to use this tutorial with an earlier version of Kubernetes, please update the API version appropriately, or reference earlier versions of this tutorial. {{< /note >}} ## {{% heading "objectives" %}} \* Create PersistentVolumeClaims and PersistentVolumes \* Create a `kustomization.yaml` with \* a Secret generator \* MySQL resource configs \* WordPress resource configs \* Apply the kustomization directory by `kubectl apply -k ./` \* Clean up ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} The example shown on this page works with `kubectl` 1.27 and above. Download the following configuration files: 1. [mysql-deployment.yaml](/examples/application/wordpress/mysql-deployment.yaml) 1. [wordpress-deployment.yaml](/examples/application/wordpress/wordpress-deployment.yaml) ## Create PersistentVolumeClaims and PersistentVolumes MySQL and Wordpress each require a PersistentVolume to store data. Their PersistentVolumeClaims will be created at the deployment step. Many cluster environments have a default StorageClass installed. When a StorageClass is not specified in the PersistentVolumeClaim, the cluster's default StorageClass is used instead. When a PersistentVolumeClaim is created, a PersistentVolume is dynamically provisioned based on the StorageClass configuration. {{< warning >}} In local clusters, the default StorageClass uses the `hostPath` provisioner. `hostPath` volumes are only suitable for development and testing. With `hostPath` volumes, your data lives in `/tmp` on the node the Pod is scheduled onto and does not move between nodes. If a Pod dies and gets scheduled to another node in the cluster, or the node is rebooted, the data is lost. {{< /warning >}} {{< note >}} If you are bringing up a cluster that needs to use the `hostPath` provisioner, the `--enable-hostpath-provisioner` flag must be set in the `controller-manager` component. {{< /note >}} {{< note >}} If you have a Kubernetes cluster running on Google Kubernetes Engine, please follow [this guide](https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk). {{< /note >}} ## Create a kustomization.yaml ### Add a Secret generator A [Secret](/docs/concepts/configuration/secret/) is an object that stores a piece of sensitive data like a password or key. Since 1.14, `kubectl` supports the management of Kubernetes objects using a kustomization file. You can create a Secret by generators in `kustomization.yaml`. Add a Secret generator in `kustomization.yaml` from the following command. You will need to replace `YOUR\_PASSWORD` with the password you want to use. ```shell cat <./kustomization.yaml secretGenerator: - name: mysql-pass literals: - password=YOUR\_PASSWORD EOF ``` ## Add resource configs for MySQL and WordPress The following manifest describes a single-instance MySQL Deployment. The MySQL container mounts the PersistentVolume at /var/lib/mysql. The `MYSQL\_ROOT\_PASSWORD` environment variable sets the database password from the Secret. {{% code\_sample file="application/wordpress/mysql-deployment.yaml" %}} The following manifest describes a single-instance WordPress Deployment. The WordPress container mounts the PersistentVolume at `/var/www/html` for website data files. The `WORDPRESS\_DB\_HOST` environment variable sets the name of the MySQL Service defined above, and WordPress will access the database by Service. The `WORDPRESS\_DB\_PASSWORD` environment variable sets the database
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume.md
|
[
0.02535308711230755,
0.0049901544116437435,
-0.030260099098086357,
-0.0007225314620882273,
-0.011406667530536652,
-0.01600535959005356,
-0.0322994589805603,
0.06567329168319702,
0.05965132266283035,
0.049257542937994,
0.02329135127365589,
-0.0024670367129147053,
0.09973306953907013,
-0.00815188605338335,
-0.016348576173186302,
0.019828978925943375,
0.05311363562941551,
-0.046472374349832535,
-0.016923852264881134,
0.047513581812381744,
-0.00885884277522564,
-0.004758394788950682,
-0.015561030246317387,
-0.013671819120645523,
0.018093356862664223,
0.014155731536448002,
-0.07090994715690613,
0.08069544285535812,
0.06112174689769745,
-0.05553504452109337,
-0.0021644604858011007,
0.024663832038640976,
-0.0304518174380064,
0.02191808447241783,
0.041597265750169754,
0.15775267779827118,
0.04985599219799042,
-0.053834330290555954,
-0.08082789927721024,
-0.018446965143084526,
-0.011645976454019547,
-0.10810936987400055,
-0.10556164383888245,
-0.00015545880887657404,
-0.034917667508125305,
0.009785791859030724,
-0.09566652029752731,
-0.05894545838236809,
-0.022131502628326416,
-0.012746607884764671,
0.02011791616678238,
-0.05746898427605629,
0.047300998121500015,
0.13439936935901642,
0.001450070645660162,
0.05501105263829231,
-0.0033099749125540257,
0.026868127286434174,
0.09971749037504196,
0.018426228314638138,
0.03709804266691208,
0.06404963880777359,
0.10699925571680069,
0.04083768278360367,
-0.014238990843296051,
-0.061959557235240936,
0.02408212050795555,
0.015029003843665123,
0.10399029403924942,
-0.03352666273713112,
0.053141020238399506,
0.07480902224779129,
-0.12174180150032043,
-0.00689009390771389,
-0.052148427814245224,
-0.013875101692974567,
0.01374848186969757,
0.0022408049553632736,
-0.0260382741689682,
0.02910672314465046,
-0.00869973935186863,
0.002744031837210059,
-0.03076387569308281,
-0.026584776118397713,
-0.08836017549037933,
-0.04491104185581207,
-0.01611028052866459,
-0.037764161825180054,
0.028155509382486343,
-0.05670730397105217,
0.01306918915361166,
-0.03555256500840187,
0.051719069480895996,
-0.022805990651249886,
0.03410940244793892,
-0.0477435328066349,
0.03421300649642944,
0.024820107966661453,
0.07456392794847488,
0.0033437865786254406,
0.07873133569955826,
-0.0845051258802414,
-0.04471873119473457,
-0.03992348164319992,
0.04299294203519821,
-0.09318213909864426,
-0.01884499005973339,
0.01873929426074028,
-0.002169538289308548,
0.07739535719156265,
-0.0680740475654602,
0.04388665407896042,
-0.08302394300699234,
-0.0106315603479743,
0.019838090986013412,
0.08163031190633774,
-0.04993447661399841,
0.004780713468790054,
-0.03547322005033493,
0.01817142963409424,
0.050825148820877075,
-0.05321469157934189,
0.023662827908992767,
-0.030426980927586555,
0.035753048956394196,
0.033673789352178574,
-0.012951187789440155,
3.413187437566672e-33,
0.05192475765943527,
-0.1256701499223709,
0.009637068957090378,
-0.013260884210467339,
0.003973047249019146,
0.001094031147658825,
-0.020879996940493584,
0.004202564712613821,
-0.029783686622977257,
-0.08367416262626648,
-0.016219446435570717,
0.09174325317144394,
-0.05283086374402046,
0.01586396060883999,
0.04268213361501694,
-0.030071688815951347,
-0.03469793498516083,
0.0478193499147892,
0.10254652798175812,
-0.04405701160430908,
-0.0004471440042834729,
0.00818151980638504,
-0.030455224215984344,
0.05986223369836807,
0.08799688518047333,
0.021945595741271973,
0.0972810760140419,
-0.03088533878326416,
-0.04617427662014961,
0.05439737066626549,
-0.040715888142585754,
-0.015372847206890583,
-0.011742137372493744,
-0.020077724009752274,
-0.04313718527555466,
0.04114868491888046,
-0.04611138254404068,
-0.013045485131442547,
-0.1356266289949417,
-0.045402783900499344,
0.003510322654619813,
-0.05405767634510994,
-0.023625623434782028,
-0.06698353588581085,
0.025211581960320473,
0.0005810820730403066,
0.06445924937725067,
0.012773124501109123,
0.0033255666494369507,
-0.018952470272779465,
-0.030399635434150696,
-0.021977579221129417,
-0.02143878862261772,
-0.010050530545413494,
0.04740782082080841,
0.028423307463526726,
0.0615076944231987,
-0.14638568460941315,
-0.055992525070905685,
-0.04109418764710426,
-0.05550812929868698,
0.013613080605864525,
-0.015961753204464912,
0.03601393848657608,
-0.0008548061596229672,
-0.022276857867836952,
0.007484388537704945,
0.017983809113502502,
0.028578881174325943,
-0.022025100886821747,
-0.00914085004478693,
-0.025759492069482803,
-0.011899099685251713,
-0.02305070497095585,
0.033815667033195496,
-0.06905780732631683,
-0.02886258438229561,
-0.0116241704672575,
-0.04637885466217995,
-0.00643018027767539,
0.01589925028383732,
-0.04068926349282265,
-0.12245004624128342,
0.08544448763132095,
-0.006202795542776585,
-0.036126844584941864,
0.03689753636717796,
0.01569892093539238,
-0.09140948206186295,
0.018103865906596184,
0.035295113921165466,
0.006487553473562002,
0.008745602332055569,
-0.026826275512576103,
-0.0872369036078453,
-5.3954764586040824e-33,
0.008663143031299114,
0.015283523127436638,
-0.009975442662835121,
0.06787288188934326,
0.04123026877641678,
0.0193314328789711,
0.018075816333293915,
0.11279036849737167,
-0.052702873945236206,
-0.04903237521648407,
-0.1201605573296547,
-0.034936681389808655,
-0.09294822812080383,
-0.012239346280694008,
-0.13258099555969238,
0.021527893841266632,
-0.04641055688261986,
-0.08227179199457169,
0.019337795674800873,
0.062242548912763596,
-0.044495414942502975,
0.03171762451529503,
-0.0006317784427665174,
0.03565859794616699,
0.007652056869119406,
-0.00395186385139823,
-0.03370901197195053,
-0.010844193398952484,
-0.08652223646640778,
-0.012157642282545567,
0.0027800407260656357,
-0.09090029448270798,
-0.053815316408872604,
-0.07318347692489624,
0.010323219932615757,
-0.07099878787994385,
-0.03429370000958443,
-0.03129616752266884,
-0.014131063595414162,
-0.04449058324098587,
0.005854126065969467,
0.012504617683589458,
-0.03944707661867142,
-0.07925894111394882,
-0.09328652173280716,
0.010528607293963432,
-0.002640511142089963,
-0.018573280423879623,
0.059140753000974655,
-0.04372713342308998,
-0.038520392030477524,
0.007557395379990339,
-0.02005459927022457,
0.045079197734594345,
-0.006686006672680378,
0.004783486481755972,
-0.042034558951854706,
0.09712463617324829,
-0.03347577899694443,
0.04862164333462715,
0.08067159354686737,
-0.05185903236269951,
0.05622481927275658,
0.025906482711434364,
-0.05484390631318092,
0.009862887673079967,
0.10524268448352814,
0.08535601943731308,
-0.1157909706234932,
0.021396366879343987,
0.04062886908650398,
0.0015756685752421618,
0.05264522135257721,
0.045774832367897034,
0.03221869468688965,
-0.1101488396525383,
-0.020560182631015778,
-0.05386355146765709,
0.05416516959667206,
-0.007415349595248699,
-0.010118400678038597,
0.03967021778225899,
-0.03724409267306328,
-0.029328517615795135,
0.05046504735946655,
-0.06989184021949768,
0.008442050777375698,
0.06500418484210968,
0.031438861042261124,
0.09925271570682526,
-0.03553994372487068,
0.0727337971329689,
-0.11457688361406326,
0.06767015904188156,
-0.02020338550209999,
-5.3361663532314196e-8,
0.028023168444633484,
0.023999039083719254,
0.005739566404372454,
0.026585446670651436,
-0.014657662250101566,
-0.07597100734710693,
0.04751500487327576,
0.05272170528769493,
0.026329968124628067,
0.06723441928625107,
0.05001738667488098,
0.03073001280426979,
-0.06018166244029999,
-0.0027427601162344217,
-0.04054495319724083,
0.02878611907362938,
0.08181730657815933,
-0.029192665591835976,
0.0007654943037778139,
-0.0613865926861763,
-0.046681396663188934,
0.010219554416835308,
0.019831493496894836,
0.006093719974160194,
0.07698144763708115,
0.06460157781839371,
0.07637427002191544,
0.06794563680887222,
0.041034236550331116,
-0.04630791395902634,
-0.036587122827768326,
0.06478998064994812,
-0.02476648986339569,
0.07286203652620316,
-0.048973582684993744,
0.0540580153465271,
-0.11364562809467316,
0.05764516815543175,
-0.007511130068451166,
0.029883310198783875,
-0.037614189088344574,
0.006577413994818926,
0.0010254124645143747,
-0.0025558131746947765,
0.05037964880466461,
0.06882842630147934,
-0.043030038475990295,
0.04218905791640282,
-0.05622801184654236,
0.04210478439927101,
-0.05874023586511612,
-0.09774279594421387,
0.05134085565805435,
0.09331338852643967,
0.05028888210654259,
0.047137338668107986,
0.0014094238867983222,
0.042208481580019,
0.02025417983531952,
0.04186940938234329,
-0.004033341538161039,
0.051016226410865784,
0.02914823777973652,
0.02377437613904476
] | 0.086031
|
file="application/wordpress/mysql-deployment.yaml" %}} The following manifest describes a single-instance WordPress Deployment. The WordPress container mounts the PersistentVolume at `/var/www/html` for website data files. The `WORDPRESS\_DB\_HOST` environment variable sets the name of the MySQL Service defined above, and WordPress will access the database by Service. The `WORDPRESS\_DB\_PASSWORD` environment variable sets the database password from the Secret kustomize generated. {{% code\_sample file="application/wordpress/wordpress-deployment.yaml" %}} 1. Download the MySQL deployment configuration file. ```shell curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yaml ``` 2. Download the WordPress configuration file. ```shell curl -LO https://k8s.io/examples/application/wordpress/wordpress-deployment.yaml ``` 3. Add them to `kustomization.yaml` file. ```shell cat <>./kustomization.yaml resources: - mysql-deployment.yaml - wordpress-deployment.yaml EOF ``` ## Apply and Verify The `kustomization.yaml` contains all the resources for deploying a WordPress site and a MySQL database. You can apply the directory by ```shell kubectl apply -k ./ ``` Now you can verify that all objects exist. 1. Verify that the Secret exists by running the following command: ```shell kubectl get secrets ``` The response should be like this: ``` NAME TYPE DATA AGE mysql-pass-c57bb4t7mf Opaque 1 9s ``` 2. Verify that a PersistentVolume got dynamically provisioned. ```shell kubectl get pvc ``` {{< note >}} It can take up to a few minutes for the PVs to be provisioned and bound. {{< /note >}} The response should be like this: ``` NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mysql-pv-claim Bound pvc-8cbd7b2e-4044-11e9-b2bb-42010a800002 20Gi RWO standard 77s wp-pv-claim Bound pvc-8cd0df54-4044-11e9-b2bb-42010a800002 20Gi RWO standard 77s ``` 3. Verify that the Pod is running by running the following command: ```shell kubectl get pods ``` {{< note >}} It can take up to a few minutes for the Pod's Status to be `RUNNING`. {{< /note >}} The response should be like this: ``` NAME READY STATUS RESTARTS AGE wordpress-mysql-1894417608-x5dzt 1/1 Running 0 40s ``` 4. Verify that the Service is running by running the following command: ```shell kubectl get services wordpress ``` The response should be like this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE wordpress LoadBalancer 10.0.0.89 80:32406/TCP 4m ``` {{< note >}} Minikube can only expose Services through `NodePort`. The EXTERNAL-IP is always pending. {{< /note >}} 5. Run the following command to get the IP Address for the WordPress Service: ```shell minikube service wordpress --url ``` The response should be like this: ``` http://1.2.3.4:32406 ``` 6. Copy the IP address, and load the page in your browser to view your site. You should see the WordPress set up page similar to the following screenshot.  {{< warning >}} Do not leave your WordPress installation on this page. If another user finds it, they can set up a website on your instance and use it to serve malicious content. Either install WordPress by creating a username and password or delete your instance. {{< /warning >}} ## {{% heading "cleanup" %}} 1. Run the following command to delete your Secret, Deployments, Services and PersistentVolumeClaims: ```shell kubectl delete -k ./ ``` ## {{% heading "whatsnext" %}} \* Learn more about [Introspection and Debugging](/docs/tasks/debug/debug-application/debug-running-pod/) \* Learn more about [Jobs](/docs/concepts/workloads/controllers/job/) \* Learn more about [Port Forwarding](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) \* Learn how to [Get a Shell to a Container](/docs/tasks/debug/debug-application/get-shell-running-container/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume.md
|
[
0.05701562389731407,
-0.049878571182489395,
-0.06349195539951324,
-0.05547424033284187,
-0.09675556421279907,
-0.053632624447345734,
0.01677056774497032,
0.029980184510350227,
0.03674089163541794,
0.05799287557601929,
0.00796106830239296,
-0.04404579475522041,
0.11105205118656158,
-0.02345171757042408,
0.028862986713647842,
0.06480956077575684,
-0.0008005822892300785,
-0.02091476134955883,
-0.003017553361132741,
0.026343101635575294,
-0.01544952392578125,
0.0014651379315182567,
0.0110099408775568,
0.05936913937330246,
0.015449483878910542,
0.005206822883337736,
-0.049802571535110474,
0.07705216854810715,
0.015654314309358597,
-0.027566470205783844,
-0.042026154696941376,
-0.05849335715174675,
-0.010786007158458233,
0.03963744640350342,
0.10620170086622238,
0.10769921541213989,
0.08429029583930969,
-0.07785560935735703,
-0.05175812542438507,
0.0075109065510332584,
0.007479543797671795,
-0.09123465418815613,
-0.07544061541557312,
0.04749317467212677,
0.008956343866884708,
-0.03109905868768692,
-0.06509138643741608,
0.018818337470293045,
-0.026293771341443062,
-0.004973639268428087,
-0.04964644834399223,
-0.0925355926156044,
0.050697870552539825,
0.03860980644822121,
-0.01976184733211994,
0.054738618433475494,
0.025637635961174965,
0.13306914269924164,
0.03160689398646355,
0.04584890231490135,
0.04701526090502739,
0.05636962875723839,
0.07777739316225052,
0.05446061119437218,
-0.08346838504076004,
-0.021057985723018646,
-0.07125271111726761,
-0.0036862120032310486,
0.11213845759630203,
-0.05646824836730957,
-0.015718277543783188,
0.010875626467168331,
-0.11176535487174988,
-0.03789977356791496,
0.0011431463062763214,
0.00016985418915282935,
-0.0004915203317068517,
0.016089707612991333,
-0.04801615700125694,
0.010411088354885578,
0.019100086763501167,
-0.005530948285013437,
0.027833618223667145,
0.021351227536797523,
-0.044429704546928406,
-0.051006171852350235,
0.039796262979507446,
-0.06314127892255783,
0.04690272733569145,
-0.005937743466347456,
-0.033006902784109116,
-0.14000548422336578,
-0.06888830661773682,
-0.08323575556278229,
0.03061898797750473,
-0.0006875716499052942,
0.002555426675826311,
0.05207217112183571,
0.04327601194381714,
-0.03958895057439804,
0.058311253786087036,
-0.07197267562150955,
-0.04758639261126518,
0.04952501133084297,
0.041612159460783005,
-0.02294122986495495,
-0.00015261778025887907,
-0.025123322382569313,
0.008830668404698372,
0.02528260089457035,
-0.04305178299546242,
0.050539299845695496,
-0.03682054951786995,
-0.006420224439352751,
0.029550768435001373,
0.0638040229678154,
-0.03579796478152275,
0.009539377875626087,
-0.02744300849735737,
0.04724356532096863,
0.059932854026556015,
-0.017409829422831535,
-0.0005262752529233694,
-0.032118551433086395,
-0.056208569556474686,
0.06687001138925552,
-0.017970498651266098,
-2.1433885932721856e-34,
0.019985780119895935,
-0.11411232501268387,
0.03562212362885475,
0.03208080306649208,
0.031264159828424454,
-0.08718441426753998,
-0.021703554317355156,
-0.039448678493499756,
-0.01838158443570137,
0.011411127634346485,
-0.007866411469876766,
0.010557979345321655,
-0.04296823590993881,
0.012516174465417862,
-0.013239118270576,
0.01572282798588276,
-0.027438074350357056,
-0.0044968221336603165,
0.13173852860927582,
-0.01164289377629757,
0.017762834206223488,
-0.0012392204953357577,
-0.024278614670038223,
0.05882818251848221,
0.038804925978183746,
0.014290145598351955,
0.025587139651179314,
0.013433453626930714,
-0.014247782528400421,
0.022625518962740898,
0.05722665414214134,
-0.061206888407468796,
0.0005751676508225501,
-0.02605326659977436,
-0.07053729146718979,
-0.05484626814723015,
0.007833968847990036,
0.042357005178928375,
-0.0906805619597435,
0.04342854768037796,
0.04998473450541496,
-0.02509026788175106,
0.0152312396094203,
-0.0426541306078434,
0.05445623770356178,
-0.009007944725453854,
-0.01696740835905075,
-0.0016034274594858289,
0.10281205922365189,
-0.033254195004701614,
-0.04812163487076759,
-0.10786371678113937,
-0.03615675866603851,
0.013669870793819427,
0.06962007284164429,
0.04656527563929558,
0.015282746404409409,
-0.08890525251626968,
-0.06077578291296959,
-0.09497302025556564,
-0.12399696558713913,
0.014070077799260616,
-0.013527884148061275,
0.02953498251736164,
0.06982440501451492,
-0.06763850897550583,
0.012878837063908577,
0.013201277703046799,
0.013750542886555195,
0.07312259078025818,
-0.057552702724933624,
-0.0031457894947379827,
-0.05442173779010773,
-0.016427550464868546,
-0.006969803478568792,
-0.0869571790099144,
-0.020800264552235603,
0.0025164589751511812,
-0.05113184079527855,
0.059957075864076614,
0.05228632315993309,
-0.026744693517684937,
-0.13741911947727203,
0.030915645882487297,
-0.0334806963801384,
0.016001617535948753,
0.01775236986577511,
0.005007992498576641,
-0.013427621684968472,
-0.0010973522439599037,
0.005772270727902651,
-0.00833858735859394,
0.02222396805882454,
-0.08852366358041763,
-0.12344346195459366,
-3.621876623087999e-33,
0.05356548726558685,
-0.0573977530002594,
0.03794746473431587,
0.02457386627793312,
0.046975649893283844,
0.008487416431307793,
0.009276757948100567,
0.07570667564868927,
-0.07117214798927307,
-0.023906826972961426,
-0.03946954384446144,
0.09416517615318298,
-0.03167387470602989,
0.056301653385162354,
-0.0895293653011322,
0.03248715400695801,
-0.06086694076657295,
-0.018886785954236984,
-0.019933214411139488,
0.07567031681537628,
-0.06780492514371872,
0.01893632486462593,
0.059149812906980515,
0.017961347475647926,
0.0018840498523786664,
-0.05042794346809387,
-0.006111182272434235,
0.020762290805578232,
-0.0494396835565567,
-0.020095020532608032,
0.008608344942331314,
0.006442338228225708,
-0.06406612694263458,
-0.017366789281368256,
-0.04417066648602486,
-0.06820864230394363,
-0.048612043261528015,
-0.013601365499198437,
-0.023184098303318024,
-0.037474412471055984,
-0.004358530975878239,
0.009473131038248539,
-0.023247629404067993,
-0.12680211663246155,
-0.09325771033763885,
0.08303432166576385,
-0.013035071082413197,
-0.027429845184087753,
-0.04046986252069473,
-0.009052095003426075,
-0.03167273849248886,
0.020342577248811722,
-0.004927625879645348,
0.03869301825761795,
0.017686966806650162,
-0.007293418049812317,
-0.05587690696120262,
0.06315974146127701,
-0.06351541727781296,
0.04541158303618431,
0.07948431372642517,
-0.002239918103441596,
0.022821376100182533,
-0.010531696490943432,
-0.05340936407446861,
0.010629934258759022,
-0.025996586307883263,
0.10898559540510178,
-0.09415938705205917,
0.033375050872564316,
-0.07311879098415375,
0.03624168783426285,
0.06545921415090561,
0.06775368750095367,
0.05826565623283386,
-0.057123880833387375,
-0.09731010347604752,
-0.023921199142932892,
0.04839491844177246,
0.0049158306792378426,
0.07200335711240768,
0.03130272403359413,
-0.07038095593452454,
-0.10628553479909897,
0.028464116156101227,
-0.11201030761003494,
0.008402490057051182,
0.09924792498350143,
0.03098164312541485,
0.08334218710660934,
0.007931412197649479,
-0.025577791035175323,
-0.10210473835468292,
-0.0189279206097126,
0.01970674656331539,
-4.757044536063404e-8,
0.02797592431306839,
0.009493266232311726,
-0.003871555905789137,
-0.01166317705065012,
0.020164741203188896,
-0.012891801074147224,
0.02341104857623577,
0.039586275815963745,
0.006972056347876787,
0.010291158221662045,
0.042148660868406296,
0.06188773736357689,
-0.006855889689177275,
0.057572655379772186,
-0.10258030891418457,
-0.04252355545759201,
0.032247863709926605,
-0.008574412204325199,
0.05937984958291054,
-0.04997069016098976,
-0.0879502221941948,
0.006633615121245384,
-0.0017809750279411674,
-0.034111663699150085,
0.11859516054391861,
0.11691807210445404,
-0.017978264018893242,
-0.013115723617374897,
-0.013026924803853035,
0.006464792415499687,
0.03581994026899338,
-0.012333285063505173,
0.019048549234867096,
-0.020393038168549538,
-0.04507455229759216,
0.04068763181567192,
-0.08497454226016998,
0.030887780711054802,
-0.004673149902373552,
-0.05896450951695442,
-0.0277035403996706,
0.029678337275981903,
0.051651086658239365,
-0.026027420535683632,
-0.023634986951947212,
0.0110523272305727,
0.03762347251176834,
0.103160560131073,
-0.020559871569275856,
0.0499972328543663,
-0.010799613781273365,
-0.08094456046819687,
0.0744611918926239,
0.10493394732475281,
0.04408286139369011,
0.06506478786468506,
0.0260063074529171,
0.01011800765991211,
-0.006482683587819338,
0.04080710560083389,
-0.03936941921710968,
0.050064533948898315,
0.05300802364945412,
-0.05758633837103844
] | 0.024756
|
This tutorial shows you how to run [Apache Cassandra](https://cassandra.apache.org/) on Kubernetes. Cassandra, a database, needs persistent storage to provide data durability (application \_state\_). In this example, a custom Cassandra seed provider lets the database discover new Cassandra instances as they join the Cassandra cluster. \*StatefulSets\* make it easier to deploy stateful applications into your Kubernetes cluster. For more information on the features used in this tutorial, see [StatefulSet](/docs/concepts/workloads/controllers/statefulset/). {{< note >}} Cassandra and Kubernetes both use the term \_node\_ to mean a member of a cluster. In this tutorial, the Pods that belong to the StatefulSet are Cassandra nodes and are members of the Cassandra cluster (called a \_ring\_). When those Pods run in your Kubernetes cluster, the Kubernetes control plane schedules those Pods onto Kubernetes {{< glossary\_tooltip text="Nodes" term\_id="node" >}}. When a Cassandra node starts, it uses a \_seed list\_ to bootstrap discovery of other nodes in the ring. This tutorial deploys a custom Cassandra seed provider that lets the database discover new Cassandra Pods as they appear inside your Kubernetes cluster. {{< /note >}} ## {{% heading "objectives" %}} \* Create and validate a Cassandra headless {{< glossary\_tooltip text="Service" term\_id="service" >}}. \* Use a {{< glossary\_tooltip term\_id="StatefulSet" >}} to create a Cassandra ring. \* Validate the StatefulSet. \* Modify the StatefulSet. \* Delete the StatefulSet and its {{< glossary\_tooltip text="Pods" term\_id="pod" >}}. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} To complete this tutorial, you should already have a basic familiarity with {{< glossary\_tooltip text="Pods" term\_id="pod" >}}, {{< glossary\_tooltip text="Services" term\_id="service" >}}, and {{< glossary\_tooltip text="StatefulSets" term\_id="StatefulSet" >}}. ### Additional Minikube setup instructions {{< caution >}} [Minikube](https://minikube.sigs.k8s.io/docs/) defaults to 2048MB of memory and 2 CPU. Running Minikube with the default resource configuration results in insufficient resource errors during this tutorial. To avoid these errors, start Minikube with the following settings: ```shell minikube start --memory 5120 --cpus=4 ``` {{< /caution >}} ## Creating a headless Service for Cassandra {#creating-a-cassandra-headless-service} In Kubernetes, a {{< glossary\_tooltip text="Service" term\_id="service" >}} describes a set of {{< glossary\_tooltip text="Pods" term\_id="pod" >}} that perform the same task. The following Service is used for DNS lookups between Cassandra Pods and clients within your cluster: {{% code\_sample file="application/cassandra/cassandra-service.yaml" %}} Create a Service to track all Cassandra StatefulSet members from the `cassandra-service.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/cassandra/cassandra-service.yaml ``` ### Validating (optional) {#validating} Get the Cassandra Service. ```shell kubectl get svc cassandra ``` The response is ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE cassandra ClusterIP None 9042/TCP 45s ``` If you don't see a Service named `cassandra`, that means creation failed. Read [Debug Services](/docs/tasks/debug/debug-application/debug-service/) for help troubleshooting common issues. ## Using a StatefulSet to create a Cassandra ring The StatefulSet manifest, included below, creates a Cassandra ring that consists of three Pods. {{< note >}} This example uses the default provisioner for Minikube. Please update the following StatefulSet for the cloud you are working with. {{< /note >}} {{% code\_sample file="application/cassandra/cassandra-statefulset.yaml" %}} Create the Cassandra StatefulSet from the `cassandra-statefulset.yaml` file: ```shell # Use this if you are able to apply cassandra-statefulset.yaml unmodified kubectl apply -f https://k8s.io/examples/application/cassandra/cassandra-statefulset.yaml ``` If you need to modify `cassandra-statefulset.yaml` to suit your cluster, download https://k8s.io/examples/application/cassandra/cassandra-statefulset.yaml and then apply that manifest, from the folder you saved the modified version into: ```shell # Use this if you needed to modify cassandra-statefulset.yaml locally kubectl apply -f cassandra-statefulset.yaml ``` ## Validating the Cassandra StatefulSet 1. Get the Cassandra StatefulSet: ```shell kubectl get statefulset cassandra ``` The response should be similar to: ``` NAME DESIRED CURRENT AGE cassandra 3 0 13s ``` The `StatefulSet` resource deploys Pods sequentially. 1. Get the Pods to see the ordered creation status:
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/cassandra.md
|
[
-0.01052505150437355,
-0.0041941991075873375,
-0.024015501141548157,
0.03855187073349953,
-0.06854656338691711,
0.009141640737652779,
-0.04029712826013565,
-0.028117766603827477,
0.060337528586387634,
0.04464118927717209,
-0.011929050087928772,
-0.03375202417373657,
0.0717274472117424,
-0.08075300604104996,
-0.024845795705914497,
0.019617091864347458,
0.056701336055994034,
-0.02278028428554535,
-0.007109858561307192,
-0.00063600845169276,
-0.005745034199208021,
-0.014371290802955627,
-0.01708916947245598,
0.06027355045080185,
-0.04606121778488159,
0.04684600234031677,
-0.07404350489377975,
-0.008726676926016808,
0.048562705516815186,
0.018568795174360275,
-0.05966174602508545,
0.01784086599946022,
-0.013388557359576225,
0.047132328152656555,
-0.012972175143659115,
0.09865924715995789,
0.021905018016695976,
0.001370587502606213,
-0.13498017191886902,
-0.04107370972633362,
0.11288623511791229,
-0.1093885526061058,
-0.09353738278150558,
0.025286125019192696,
-0.030044229701161385,
-0.016759974882006645,
-0.08000028133392334,
0.014829889871180058,
-0.02755260467529297,
-0.052382443100214005,
-0.005661420989781618,
-0.04849265143275261,
0.04608526825904846,
0.0527440644800663,
0.037943609058856964,
0.06087365746498108,
-0.016682395711541176,
0.08315444737672806,
0.09032800793647766,
-0.012515333481132984,
0.08978860825300217,
-0.03761831298470497,
0.02054504305124283,
0.017570195719599724,
-0.025117233395576477,
-0.05218231678009033,
0.0689268484711647,
0.019123822450637817,
0.07654765993356705,
-0.08208112418651581,
0.032829128205776215,
0.02384871430695057,
0.006437072064727545,
-0.006355383899062872,
-0.0016857086447998881,
0.02793237380683422,
0.01801818236708641,
0.02900426648557186,
-0.041606854647397995,
-0.005874156020581722,
-0.0022174580954015255,
0.0483938604593277,
0.021512946113944054,
0.021417202427983284,
-0.12077025324106216,
-0.0031312708742916584,
-0.08480770140886307,
-0.11388712376356125,
0.02152365818619728,
-0.05263395234942436,
-0.007434888277202845,
-0.06941555440425873,
0.03362036868929863,
-0.13852962851524353,
0.003215633099898696,
0.03099166229367256,
0.030129941180348396,
-0.0027662869542837143,
0.06572802364826202,
-0.006804558914154768,
0.011923112906515598,
-0.021914564073085785,
-0.02243027091026306,
0.030605684965848923,
-0.025317583233118057,
-0.07285682111978531,
-0.09926844388246536,
-0.03972490504384041,
0.009795266203582287,
0.007999081164598465,
0.01607332192361355,
0.055964939296245575,
-0.05774766951799393,
0.01577311009168625,
-0.024665208533406258,
0.0038846665993332863,
-0.022088725119829178,
-0.03777427598834038,
0.07450615614652634,
0.08635950088500977,
-0.026505783200263977,
-0.10493184626102448,
-0.012506281957030296,
-0.015273836441338062,
0.021419843658804893,
0.018297985196113586,
-0.017897319048643112,
2.8001772355174264e-33,
0.04954805225133896,
-0.05917372554540634,
0.05966603755950928,
-0.029833223670721054,
0.005951074417680502,
-0.07349614053964615,
-0.0347972996532917,
-0.038898441940546036,
-0.06357850879430771,
-0.08978930115699768,
-0.025313859805464745,
0.07355906814336777,
0.02665869891643524,
0.02085476741194725,
0.033763475716114044,
0.007427413947880268,
-0.06652472913265228,
0.0032537684310227633,
0.10278501361608505,
-0.046596307307481766,
0.0307560283690691,
0.013292954303324223,
0.0036559838335961103,
0.0321122482419014,
0.035443518310785294,
-0.024654660373926163,
0.04613707959651947,
-0.06434184312820435,
-0.010372709482908249,
0.02130172587931156,
-0.03238542377948761,
0.014945379458367825,
0.03656846284866333,
0.038159165531396866,
-0.06419329345226288,
0.04376424103975296,
-0.03369440510869026,
-0.006579906214028597,
-0.06505031883716583,
-0.0868387296795845,
-0.0299326553940773,
0.02588711306452751,
0.015411052852869034,
-0.0401872843503952,
0.04248296841979027,
-0.01667882315814495,
0.024538766592741013,
-0.029961327090859413,
0.03141384199261665,
0.017371002584695816,
0.0028784789610654116,
-0.028628194704651833,
0.07373994588851929,
0.010378005914390087,
0.03378935530781746,
0.08379972726106644,
0.11874794214963913,
-0.09405997395515442,
-0.06087486445903778,
-0.0023765244986861944,
-0.06402219831943512,
-0.06598907709121704,
-0.041745442897081375,
0.01751358062028885,
0.04134121909737587,
0.03696444258093834,
-0.019293980672955513,
0.07403985410928726,
0.018006352707743645,
-0.0072965556755661964,
-0.01806320808827877,
0.05370328947901726,
0.006747887935489416,
0.04367896169424057,
-0.02009723149240017,
-0.036959778517484665,
-0.03326435387134552,
-0.025038156658411026,
-0.14768299460411072,
0.04869351536035538,
0.04040663689374924,
-0.09943033009767532,
-0.11804941296577454,
0.08544298261404037,
0.0048811486922204494,
-0.008142943494021893,
-0.018162192776799202,
-0.022312326356768608,
0.008806826546788216,
-0.0011022950056940317,
0.0890333354473114,
0.008062854409217834,
0.03729069605469704,
0.01831466518342495,
-0.08382344990968704,
-4.140013961779324e-33,
0.08206570893526077,
0.04056032747030258,
-0.01083926111459732,
0.07961816340684891,
0.0739125981926918,
-0.01033889502286911,
-0.08111374080181122,
0.024904511868953705,
-0.0583331398665905,
-0.07715284824371338,
-0.061077091842889786,
-0.033488981425762177,
0.03094378300011158,
0.0026088932063430548,
-0.10638899356126785,
0.0012153625721111894,
-0.006673600524663925,
-0.05992080271244049,
-0.03304098919034004,
0.042666733264923096,
-0.048607125878334045,
-0.041587334126234055,
-0.041903767734766006,
-0.015387943014502525,
0.028341058641672134,
-0.06230487301945686,
-0.017942123115062714,
0.04981791600584984,
-0.07614748179912567,
-0.02000703290104866,
-0.018812445923686028,
-0.07987447082996368,
-0.03520730882883072,
-0.0003365414740983397,
-0.00670934421941638,
-0.00836417730897665,
0.0035003458615392447,
-0.007005372550338507,
0.025246459990739822,
-0.03175579011440277,
0.001802034443244338,
0.008406964130699635,
-0.04012110084295273,
-0.04313765838742256,
-0.01209346391260624,
0.09655771404504776,
0.010021641850471497,
0.06773348152637482,
-0.021522872149944305,
-0.09136735647916794,
0.005800760351121426,
-0.010224426165223122,
-0.020398417487740517,
0.1311328113079071,
0.003755392739549279,
0.024449845775961876,
0.0024132393300533295,
0.18769487738609314,
0.009499263018369675,
-0.001571477740071714,
0.04953079670667648,
-0.12483985722064972,
-0.023785633966326714,
0.0678928792476654,
-0.06459574401378632,
-0.057807087898254395,
0.033256374299526215,
0.023429526016116142,
-0.07823285460472107,
0.04388253018260002,
-0.06721321493387222,
0.01044077705591917,
0.039711497724056244,
0.06301824003458023,
0.003016768954694271,
-0.07089962810277939,
0.007241570856422186,
-0.03547047823667526,
0.002339426428079605,
0.023675628006458282,
-0.05173094570636749,
0.03843073174357414,
-0.06261017918586731,
-0.01498439535498619,
0.11394009739160538,
0.06536853313446045,
0.059861861169338226,
0.0803811252117157,
-0.019961781799793243,
0.07815024256706238,
-0.009448236785829067,
0.06777765601873398,
-0.10695330798625946,
0.06603534519672394,
-0.0024537548888474703,
-5.2678966966368534e-8,
0.06153246387839317,
0.009884750470519066,
-0.08316843211650848,
-0.0113125154748559,
0.06408757716417313,
-0.016871213912963867,
0.09414433687925339,
0.036245834082365036,
-0.020347291603684425,
0.015970230102539062,
0.005503899417817593,
0.040310218930244446,
-0.03794761002063751,
-0.06951319426298141,
0.02425975911319256,
0.017409605905413628,
0.05719713121652603,
0.001125834765844047,
-0.003297495888546109,
-0.00849768053740263,
-0.008040453307330608,
-0.054591450840234756,
-0.02150321751832962,
0.05469836667180061,
0.024477658793330193,
0.08098822087049484,
0.07510437071323395,
0.03636017069220543,
0.029059287160634995,
0.014895668253302574,
-0.033372845500707626,
0.015607243403792381,
0.014258835464715958,
0.00636871624737978,
-0.03717803955078125,
0.08756531774997711,
-0.10130871087312698,
0.06499628722667694,
0.08736684173345566,
0.055022045969963074,
-0.0054837181232869625,
0.06143050268292427,
-0.06001972779631615,
0.0131336385384202,
0.028817256912589073,
0.09661022573709488,
-0.01244040671736002,
0.05857863277196884,
-0.03155788779258728,
-0.02785021811723709,
-0.0024378441739827394,
-0.0804969072341919,
0.01722828298807144,
0.024129509925842285,
-0.018756063655018806,
0.03678002581000328,
-0.0013406147481873631,
-0.02921481430530548,
0.09602613002061844,
0.0398683026432991,
-0.020978683605790138,
0.037445276975631714,
0.00597808975726366,
-0.03098197653889656
] | 0.18959
|
cassandra-statefulset.yaml ``` ## Validating the Cassandra StatefulSet 1. Get the Cassandra StatefulSet: ```shell kubectl get statefulset cassandra ``` The response should be similar to: ``` NAME DESIRED CURRENT AGE cassandra 3 0 13s ``` The `StatefulSet` resource deploys Pods sequentially. 1. Get the Pods to see the ordered creation status: ```shell kubectl get pods -l="app=cassandra" ``` The response should be similar to: ```shell NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 0 1m cassandra-1 0/1 ContainerCreating 0 8s ``` It can take several minutes for all three Pods to deploy. Once they are deployed, the same command returns output similar to: ``` NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 0 10m cassandra-1 1/1 Running 0 9m cassandra-2 1/1 Running 0 8m ``` 3. Run the Cassandra [nodetool](https://cwiki.apache.org/confluence/display/CASSANDRA2/NodeTool) inside the first Pod, to display the status of the ring. ```shell kubectl exec -it cassandra-0 -- nodetool status ``` The response should look something like: ``` Datacenter: DC1-K8Demo ====================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN 172.17.0.5 83.57 KiB 32 74.0% e2dd09e6-d9d3-477e-96c5-45094c08db0f Rack1-K8Demo UN 172.17.0.4 101.04 KiB 32 58.8% f89d6835-3a42-4419-92b3-0e62cae1479c Rack1-K8Demo UN 172.17.0.6 84.74 KiB 32 67.1% a6a1e8c2-3dc5-4417-b1a0-26507af2aaad Rack1-K8Demo ``` ## Modifying the Cassandra StatefulSet Use `kubectl edit` to modify the size of a Cassandra StatefulSet. 1. Run the following command: ```shell kubectl edit statefulset cassandra ``` This command opens an editor in your terminal. The line you need to change is the `replicas` field. The following sample is an excerpt of the StatefulSet file: ```yaml # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # apiVersion: apps/v1 kind: StatefulSet metadata: creationTimestamp: 2016-08-13T18:40:58Z generation: 1 labels: app: cassandra name: cassandra namespace: default resourceVersion: "323" uid: 7a219483-6185-11e6-a910-42010a8a0fc0 spec: replicas: 3 ``` 1. Change the number of replicas to 4, and then save the manifest. The StatefulSet now scales to run with 4 Pods. 1. Get the Cassandra StatefulSet to verify your change: ```shell kubectl get statefulset cassandra ``` The response should be similar to: ``` NAME DESIRED CURRENT AGE cassandra 4 4 36m ``` ## {{% heading "cleanup" %}} Deleting or scaling a StatefulSet down does not delete the volumes associated with the StatefulSet. This setting is for your safety because your data is more valuable than automatically purging all related StatefulSet resources. {{< warning >}} Depending on the storage class and reclaim policy, deleting the \*PersistentVolumeClaims\* may cause the associated volumes to also be deleted. Never assume you'll be able to access data if its volume claims are deleted. {{< /warning >}} 1. Run the following commands (chained together into a single command) to delete everything in the Cassandra StatefulSet: ```shell grace=$(kubectl get pod cassandra-0 -o=jsonpath='{.spec.terminationGracePeriodSeconds}') \ && kubectl delete statefulset -l app=cassandra \ && echo "Sleeping ${grace} seconds" 1>&2 \ && sleep $grace \ && kubectl delete persistentvolumeclaim -l app=cassandra ``` 1. Run the following command to delete the Service you set up for Cassandra: ```shell kubectl delete service -l app=cassandra ``` ## Cassandra container environment variables The Pods in this tutorial use the [`gcr.io/google-samples/cassandra:v13`](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile) image from Google's [container registry](https://cloud.google.com/container-registry/docs/). The Docker image above is based on [debian-base](https://github.com/kubernetes/release/tree/master/images/build/debian-base) and includes OpenJDK 8. This image includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`. | Environment variable | Default value | | ------------------------ |:---------------: | | `CASSANDRA\_CLUSTER\_NAME` | `'Test Cluster'` | | `CASSANDRA\_NUM\_TOKENS` | `32` | | `CASSANDRA\_RPC\_ADDRESS` | `0.0.0.0` |
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/cassandra.md
|
[
0.03460577875375748,
0.0018642634386196733,
-0.008676312863826752,
0.026532400399446487,
-0.07166526466608047,
-0.05309454724192619,
-0.07054851949214935,
-0.02591901458799839,
0.03791723772883415,
0.05970434099435806,
0.005455076694488525,
-0.10106460005044937,
0.0332014374434948,
-0.05678720772266388,
-0.007632674649357796,
-0.02809590846300125,
0.053506653755903244,
-0.012446444481611252,
-0.028439996764063835,
-0.0546153262257576,
0.010398449376225471,
0.038865070790052414,
0.013422664254903793,
0.001680621295236051,
-0.005861276760697365,
0.006565687712281942,
-0.12642636895179749,
-0.03297210857272148,
0.005388384219259024,
-0.07030639797449112,
-0.05598413571715355,
0.04953281581401825,
0.006468213628977537,
0.05294455960392952,
0.08266405761241913,
0.11749479919672012,
0.04560371860861778,
-0.01769189164042473,
-0.06287779659032822,
-0.04618758335709572,
0.052368663251399994,
-0.10158334672451019,
-0.08135966956615448,
0.015550159849226475,
-0.015598506666719913,
-0.02556142583489418,
-0.10157134383916855,
-0.018479416146874428,
-0.00028986699180677533,
-0.04050065949559212,
-0.04194117709994316,
-0.03811589628458023,
0.03658880293369293,
0.022635113447904587,
0.05173390731215477,
0.08157955855131149,
-0.03916727378964424,
0.07194336503744125,
0.10142617672681808,
0.012525729835033417,
-0.01341533474624157,
-0.031416114419698715,
-0.008464707061648369,
0.0014710025861859322,
0.01969395950436592,
-0.04971276596188545,
0.03347771614789963,
-0.06279918551445007,
0.02207598090171814,
0.0004962823586538434,
0.03889404609799385,
-0.008764947764575481,
0.022550459951162338,
-0.03765091300010681,
-0.07620927691459656,
0.03674778342247009,
0.0321103110909462,
0.031657785177230835,
-0.06538984924554825,
-0.02827046997845173,
-0.028443295508623123,
0.029673999175429344,
-0.020357174798846245,
0.022344695404171944,
-0.10229723900556564,
0.02041439525783062,
-0.04247833415865898,
-0.07238872349262238,
-0.007709193043410778,
0.02499442920088768,
-0.011094373650848866,
-0.015050878748297691,
0.06457250565290451,
-0.07256915420293808,
-0.00807986594736576,
0.07673490047454834,
0.03018292784690857,
0.044861070811748505,
0.025389522314071655,
-0.00344062689691782,
-0.0026994349900633097,
-0.005798621568828821,
0.010807214304804802,
0.037081487476825714,
0.03352553769946098,
-0.04096660763025284,
-0.08844542503356934,
-0.03604545071721077,
-0.053110383450984955,
0.016936849802732468,
0.03815527260303497,
0.02352137863636017,
-0.041632600128650665,
0.0351145975291729,
-0.04603402689099312,
0.054551851004362106,
-0.012842406518757343,
0.0007768617942929268,
0.046462640166282654,
0.06626182049512863,
0.08163867145776749,
-0.06995321065187454,
0.03236033767461777,
-0.018501797690987587,
-0.023403435945510864,
0.019076773896813393,
0.09444914758205414,
6.368936391298636e-33,
0.038422923535108566,
-0.09334765374660492,
0.049473654478788376,
-0.006100392434746027,
-0.0006954220589250326,
-0.03882213309407234,
-0.020480338484048843,
-0.020349325612187386,
-0.0755208432674408,
-0.07617279887199402,
-0.03641652315855026,
0.07153680175542831,
-0.06347984075546265,
-0.01901039481163025,
-0.02726011537015438,
-0.00759017514064908,
-0.046931732445955276,
0.04645920917391777,
0.006188137456774712,
-0.01605069637298584,
0.08463337272405624,
-0.07405764609575272,
-0.05267752707004547,
0.016453290358185768,
0.06359433382749557,
-0.057788554579019547,
0.08110232651233673,
-0.09480295330286026,
-0.022167399525642395,
0.016272053122520447,
-0.038485605269670486,
0.011307738721370697,
0.03527787700295448,
0.05535946041345596,
-0.04966188222169876,
-0.003238328266888857,
0.028750168159604073,
0.03872377797961235,
-0.06823298335075378,
-0.0816648080945015,
-0.036761678755283356,
0.04626468941569328,
-0.0014528004685416818,
-0.022762730717658997,
0.044611550867557526,
-0.057277873158454895,
0.01542945671826601,
-0.05529339611530304,
0.011948725208640099,
0.03657127171754837,
0.014072371646761894,
-0.012449068948626518,
0.02547048032283783,
0.0006647390546277165,
0.02143588662147522,
0.018334632739424706,
0.0903199091553688,
0.0028305957093834877,
-0.07536391168832779,
0.020216450095176697,
-0.04859452694654465,
-0.01064084842801094,
-0.01725178398191929,
-0.015439579263329506,
0.07132052630186081,
0.049174390733242035,
-0.033277396112680435,
0.05280095338821411,
0.005090867634862661,
0.06789099425077438,
-0.009604080580174923,
0.0324421226978302,
0.049432121217250824,
0.008853337727487087,
0.026020271703600883,
-0.04274076968431473,
0.016558147966861725,
-0.00010604240378597751,
-0.17962828278541565,
0.024521466344594955,
0.10154088586568832,
-0.030137034133076668,
-0.15878838300704956,
0.09453476220369339,
0.06276755779981613,
0.011716118082404137,
-0.014299257658421993,
-0.010425365529954433,
-0.07337769120931625,
0.0486784465610981,
0.06586042791604996,
0.02384963259100914,
0.012687907554209232,
-0.019968345761299133,
-0.13529060781002045,
-6.169253696556515e-33,
0.0937131717801094,
0.012593096122145653,
0.04749155789613724,
0.07049579173326492,
0.06482306867837906,
-0.09273967146873474,
-0.05343497171998024,
0.07842287421226501,
0.002976746065542102,
-0.021013688296079636,
-0.03856132924556732,
-0.035707101225852966,
0.0046771434135735035,
0.012462767772376537,
-0.09952370077371597,
0.06333991140127182,
0.004570070654153824,
-0.06467940658330917,
-0.03072170540690422,
0.021912328898906708,
-0.05991750583052635,
0.0628027617931366,
-0.02336723729968071,
0.05293678492307663,
0.03506605327129364,
-0.028557848185300827,
0.020313067361712456,
0.030273612588644028,
-0.05696991831064224,
-0.004755904898047447,
0.03393533453345299,
-0.06845537573099136,
-0.06766434758901596,
0.0407925583422184,
-0.0019926331005990505,
-0.042008861899375916,
-0.026162324473261833,
0.05900857597589493,
0.03461037948727608,
0.023397400975227356,
0.015312977135181427,
-0.0021849547047168016,
-0.0855073630809784,
-0.03321800008416176,
-0.05828531086444855,
0.016431143507361412,
0.06666860729455948,
0.0081523722037673,
-0.022151118144392967,
-0.06217914819717407,
0.042541321367025375,
0.0012774938950315118,
-0.05520749092102051,
0.1504630744457245,
0.022474950179457664,
-0.04310952126979828,
-0.020151877775788307,
0.0677357017993927,
-0.008414657786488533,
-0.011265547946095467,
0.05206906795501709,
-0.048009082674980164,
0.008550941944122314,
0.057637106627225876,
0.0027193056885153055,
-0.04490203410387039,
0.017879437655210495,
-0.03304249048233032,
-0.045668214559555054,
0.030509550124406815,
0.07924133539199829,
-0.03660713508725166,
-0.028573911637067795,
0.024663714691996574,
0.019333049654960632,
-0.0597255676984787,
-0.05004217475652695,
-0.056778956204652786,
-0.0020038560032844543,
0.07138309627771378,
-0.0991884246468544,
0.12155120074748993,
-0.06758885085582733,
0.04013727605342865,
0.05564552918076515,
0.03849298879504204,
0.06195193529129028,
0.12199162691831589,
0.0240915697067976,
0.15794336795806885,
0.029400764033198357,
0.0194561667740345,
-0.11682239174842834,
0.04586507007479668,
-0.02683042734861374,
-4.7941014713615004e-8,
0.0661335363984108,
-0.07563138008117676,
-0.0696789026260376,
0.05990716442465782,
0.09074096381664276,
0.018240755423903465,
0.06385376304388046,
0.027503380551934242,
-0.026249544695019722,
-0.023460306227207184,
0.012358446605503559,
0.07178601622581482,
-0.0642927959561348,
-0.04506630823016167,
0.061877500265836716,
-0.035005729645490646,
0.03314345329999924,
0.04587196558713913,
-0.028309905901551247,
-0.0740237832069397,
-0.011852024123072624,
-0.011717155575752258,
0.0004045764508191496,
0.002458948874846101,
-0.025447389110922813,
0.06174315884709358,
0.0482666976749897,
0.014623305760324001,
-0.0026461801026016474,
-0.028372881934046745,
-0.012089654803276062,
0.005146815441548824,
0.010947395116090775,
-0.03947317972779274,
-0.018186993896961212,
0.021169519051909447,
-0.09174017608165741,
0.04848329722881317,
0.046776335686445236,
0.023455310612916946,
-0.03778287023305893,
0.05939597263932228,
-0.044719766825437546,
0.058393750339746475,
-0.05003627762198448,
0.035530366003513336,
-0.030108049511909485,
0.03354574739933014,
0.008382697589695454,
-0.06375952064990997,
-0.03590492159128189,
-0.1314256340265274,
0.020554687827825546,
0.02786155976355076,
-0.01651843637228012,
0.05389818921685219,
0.03635617718100548,
-0.013792376965284348,
0.09107460081577301,
0.05215691030025482,
0.03920913487672806,
-0.034648384898900986,
0.015020896680653095,
0.018645623698830605
] | 0.12459
|
includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`. | Environment variable | Default value | | ------------------------ |:---------------: | | `CASSANDRA\_CLUSTER\_NAME` | `'Test Cluster'` | | `CASSANDRA\_NUM\_TOKENS` | `32` | | `CASSANDRA\_RPC\_ADDRESS` | `0.0.0.0` | ## {{% heading "whatsnext" %}} \* Learn how to [Scale a StatefulSet](/docs/tasks/run-application/scale-stateful-set/). \* Learn more about the [\*KubernetesSeedProvider\*](https://github.com/kubernetes/examples/blob/master/cassandra/java/src/main/java/io/k8s/cassandra/KubernetesSeedProvider.java) \* See more custom [Seed Provider Configurations](https://git.k8s.io/examples/cassandra/java/README.md)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/cassandra.md
|
[
0.04131477698683739,
0.011882834136486053,
-0.03474976494908333,
0.019887857139110565,
-0.11197005212306976,
-0.013767163269221783,
-0.08100288361310959,
0.02346988022327423,
-0.011776577681303024,
0.04283778369426727,
0.012500547803938389,
-0.11543312668800354,
0.08135639131069183,
-0.04827074334025383,
-0.004005340859293938,
-0.0608576200902462,
0.05386172607541084,
0.05669669806957245,
-0.0115393390879035,
-0.0544634684920311,
0.00004389618698041886,
0.03498397022485733,
0.008691998198628426,
0.06799092888832092,
-0.014657067134976387,
-0.01785614714026451,
-0.03288723900914192,
0.017138533294200897,
-0.012252554297447205,
-0.01870425045490265,
-0.055937182158231735,
-0.000510340032633394,
0.0158244501799345,
0.05455587059259415,
0.02750418521463871,
0.08013314753770828,
0.07639235258102417,
0.017765486612915993,
-0.03736988082528114,
-0.05573046952486038,
0.07703732699155807,
-0.08761255443096161,
-0.11302750557661057,
0.005551693495362997,
-0.017313437536358833,
-0.040943365544080734,
-0.11149224638938904,
0.02966100536286831,
-0.07520235329866409,
-0.05240250751376152,
0.0012218508636578918,
0.014239693060517311,
0.037743423134088516,
-0.005539997946470976,
0.034394457936286926,
0.050243910402059555,
-0.003996613435447216,
0.0785422995686531,
0.0826464369893074,
-0.03422204777598381,
0.013906355947256088,
-0.030457191169261932,
0.027539802715182304,
0.02814640663564205,
-0.035695988684892654,
-0.06487420946359634,
0.06301840394735336,
0.02598922699689865,
0.042568206787109375,
-0.013047702610492706,
-0.009663061238825321,
0.01025424338877201,
0.047474708408117294,
-0.05652536824345589,
0.0030167479999363422,
0.05822097510099411,
-0.039277367293834686,
0.0152279669418931,
-0.06879620254039764,
0.018169520422816277,
-0.014874521642923355,
0.02282016910612583,
-0.003791197668761015,
0.05931563675403595,
-0.08053530752658844,
0.008160725235939026,
-0.05606384947896004,
-0.07606180757284164,
0.01592670939862728,
-0.05173233151435852,
0.0026294479612261057,
-0.08433575183153152,
0.025093307718634605,
-0.11881262063980103,
-0.005396912805736065,
0.10252439230680466,
-0.02228347770869732,
-0.015540986321866512,
0.09518933296203613,
0.004511259961873293,
0.001562951016239822,
-0.05283425375819206,
0.016080467030405998,
0.06442735344171524,
0.004908447153866291,
-0.036139506846666336,
-0.04031972214579582,
-0.0162349883466959,
-0.03205827996134758,
-0.0031511967536062002,
0.04951608180999756,
0.07030750066041946,
-0.06241961941123009,
-0.038915108889341354,
0.0053776041604578495,
0.012992161326110363,
0.05178285390138626,
-0.04299985617399216,
0.00750843808054924,
0.026059530675411224,
0.02893986739218235,
-0.06916055083274841,
-0.01603100448846817,
-0.015669897198677063,
0.04770904406905174,
0.05965237691998482,
0.048163507133722305,
-2.8556578138113536e-33,
0.047444216907024384,
-0.02046116441488266,
0.09016741812229156,
-0.04018821567296982,
0.003028659615665674,
-0.013369820080697536,
-0.02293478325009346,
0.0046341922134160995,
-0.034827712923288345,
-0.07368174195289612,
0.0508771650493145,
0.07935672253370285,
0.014848921447992325,
-0.027458377182483673,
-0.014102380722761154,
0.005047264508903027,
-0.06893957406282425,
0.023005317896604538,
0.05788012221455574,
-0.0636579617857933,
0.05367942899465561,
-0.0409880094230175,
-0.040137164294719696,
0.04433869570493698,
0.03142392262816429,
-0.027349965646862984,
0.0725783109664917,
-0.07693389058113098,
-0.053047213703393936,
-0.011791307479143143,
-0.002220036694779992,
-0.004200087860226631,
0.011405537836253643,
0.05828347057104111,
-0.005836486350744963,
0.021875670179724693,
-0.0020700888708233833,
0.027087433263659477,
-0.045041512697935104,
-0.07014352083206177,
-0.018142497166991234,
0.0581134632229805,
0.025945859029889107,
-0.034776706248521805,
0.012706402689218521,
0.02231430634856224,
0.07251288741827011,
-0.03883110359311104,
0.02324328012764454,
-0.062239404767751694,
0.03723657503724098,
-0.01842626743018627,
0.040819376707077026,
-0.028032861649990082,
0.05776018276810646,
0.021879807114601135,
0.10299349576234818,
-0.05184606835246086,
-0.02796546369791031,
-0.009119480848312378,
-0.09702733159065247,
-0.06327737122774124,
-0.00027376419166103005,
0.01786603406071663,
0.07605940103530884,
0.027763400226831436,
-0.017763635143637657,
0.02763441763818264,
-0.015469309873878956,
-0.007873970083892345,
-0.013993275351822376,
0.040107570588588715,
0.02087174914777279,
0.06581151485443115,
-0.059678416699171066,
-0.02738874964416027,
-0.0022083690855652094,
-0.03735900670289993,
-0.15114420652389526,
0.006645143497735262,
0.057782307267189026,
-0.05276496335864067,
-0.11072547733783722,
0.07324082404375076,
0.10149214416742325,
-0.031033091247081757,
-0.019681239500641823,
0.00469399057328701,
-0.017040275037288666,
-0.030628956854343414,
0.09310196340084076,
0.016330083832144737,
0.04885086044669151,
-0.024945741519331932,
-0.08456451445817947,
4.997553621093491e-34,
0.04252876341342926,
0.03808571398258209,
0.04350590705871582,
0.07959869503974915,
0.07847092300653458,
-0.051998768001794815,
-0.020054489374160767,
0.09401926398277283,
0.0020653381943702698,
-0.04696771875023842,
-0.05991165712475777,
-0.030451178550720215,
0.03866451978683472,
-0.03585591912269592,
-0.10857239365577698,
0.09019619226455688,
-0.0074610100127756596,
-0.018673760816454887,
-0.04346786066889763,
-0.015314665623009205,
-0.07610752433538437,
0.01855515129864216,
-0.0006077747093513608,
0.030348768457770348,
0.08449551463127136,
-0.04143141582608223,
0.04822054132819176,
0.06611686944961548,
-0.11472238600254059,
-0.01293563935905695,
-0.016978703439235687,
-0.06628940999507904,
-0.03874024376273155,
0.05575457587838173,
-0.00845510046929121,
-0.05610157921910286,
-0.02127540111541748,
0.03839196637272835,
-0.009133970364928246,
0.07138381153345108,
-0.0009377290843985975,
-0.01974950172007084,
-0.052277691662311554,
0.0005797037738375366,
-0.00515079777687788,
0.08853612840175629,
0.051974475383758545,
-0.01093531958758831,
-0.07371798157691956,
-0.05856509506702423,
0.018425194546580315,
-0.026612183079123497,
-0.005665871314704418,
0.141099214553833,
0.017935285344719887,
0.030604571104049683,
0.020281527191400528,
0.12963320314884186,
-0.008371510542929173,
-0.04322494938969612,
0.03797172009944916,
-0.08473619818687439,
-0.026093613356351852,
0.0923035517334938,
-0.033008139580488205,
-0.08372952044010162,
0.014621059410274029,
-0.039983488619327545,
-0.10850085318088531,
-0.006810846272855997,
-0.008460509590804577,
-0.04772026464343071,
-0.025601932778954506,
0.032839491963386536,
0.026062456890940666,
-0.06170433387160301,
-0.043141718953847885,
-0.029819244518876076,
-0.010412675328552723,
0.03987707570195198,
-0.06541775166988373,
0.0277557335793972,
-0.04325317591428757,
-0.015516372397542,
0.09607252478599548,
0.03814961761236191,
0.020404350012540817,
0.11943066865205765,
-0.0006232762825675309,
0.11510463804006577,
-0.07060185819864273,
0.05584518983960152,
-0.0914301797747612,
0.004643972497433424,
-0.0018622674979269505,
-5.454520390912876e-8,
0.010856172069907188,
-0.08643297851085663,
-0.08495709300041199,
0.0696818009018898,
0.08296296000480652,
0.035079069435596466,
0.07519999146461487,
0.018174080178141594,
-0.022136222571134567,
0.047662634402513504,
0.03831879794597626,
0.0622904896736145,
-0.02038261480629444,
-0.037762682884931564,
-0.011939422227442265,
-0.06561671197414398,
0.0739922821521759,
0.058584000915288925,
-0.04816523194313049,
-0.0330505333840847,
0.01223039161413908,
0.005542105529457331,
-0.04477015137672424,
0.010227113962173462,
0.03654349595308304,
0.03155944496393204,
0.026249587535858154,
0.021679896861314774,
0.05926201120018959,
-0.04710865765810013,
-0.002395619871094823,
-0.02071022056043148,
0.009529848583042622,
-0.04615960270166397,
-0.056559398770332336,
0.05247507244348526,
-0.10709383338689804,
0.10719259828329086,
0.0539037361741066,
0.08186937868595123,
-0.04234961047768593,
0.07839607447385788,
-0.09435860812664032,
0.04561517387628555,
-0.03804894909262657,
0.026288209483027458,
-0.08002671599388123,
0.050549693405628204,
0.050851598381996155,
-0.0380285419523716,
-0.008700740523636341,
-0.09626954048871994,
0.061100587248802185,
-0.007707125041633844,
-0.036023400723934174,
0.036605823785066605,
0.029139917343854904,
-0.0027485995087772608,
0.060394447296857834,
0.027737444266676903,
-0.024185312911868095,
-0.02477855049073696,
-0.023909062147140503,
-0.03248174488544464
] | 0.08063
|
This tutorial demonstrates running [Apache Zookeeper](https://zookeeper.apache.org) on Kubernetes using [StatefulSets](/docs/concepts/workloads/controllers/statefulset/), [PodDisruptionBudgets](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budget), and [PodAntiAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). ## {{% heading "prerequisites" %}} Before starting this tutorial, you should be familiar with the following Kubernetes concepts: - [Pods](/docs/concepts/workloads/pods/) - [Cluster DNS](/docs/concepts/services-networking/dns-pod-service/) - [Headless Services](/docs/concepts/services-networking/service/#headless-services) - [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) - [StatefulSets](/docs/concepts/workloads/controllers/statefulset/) - [PodDisruptionBudgets](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budget) - [PodAntiAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) - [kubectl CLI](/docs/reference/kubectl/kubectl/) You must have a cluster with at least four nodes, and each node requires at least 2 CPUs and 4 GiB of memory. In this tutorial you will cordon and drain the cluster's nodes. \*\*This means that the cluster will terminate and evict all Pods on its nodes, and the nodes will temporarily become unschedulable.\*\* You should use a dedicated cluster for this tutorial, or you should ensure that the disruption you cause will not interfere with other tenants. This tutorial assumes that you have configured your cluster to dynamically provision PersistentVolumes. If your cluster is not configured to do so, you will have to manually provision three 20 GiB volumes before starting this tutorial. ## {{% heading "objectives" %}} After this tutorial, you will know the following. - How to deploy a ZooKeeper ensemble using StatefulSet. - How to consistently configure the ensemble. - How to spread the deployment of ZooKeeper servers in the ensemble. - How to use PodDisruptionBudgets to ensure service availability during planned maintenance. ### ZooKeeper [Apache ZooKeeper](https://zookeeper.apache.org/doc/current/) is a distributed, open-source coordination service for distributed applications. ZooKeeper allows you to read, write, and observe updates to data. Data are organized in a file system like hierarchy and replicated to all ZooKeeper servers in the ensemble (a set of ZooKeeper servers). All operations on data are atomic and sequentially consistent. ZooKeeper ensures this by using the [Zab](https://pdfs.semanticscholar.org/b02c/6b00bd5dbdbd951fddb00b906c82fa80f0b3.pdf) consensus protocol to replicate a state machine across all servers in the ensemble. The ensemble uses the Zab protocol to elect a leader, and the ensemble cannot write data until that election is complete. Once complete, the ensemble uses Zab to ensure that it replicates all writes to a quorum before it acknowledges and makes them visible to clients. Without respect to weighted quorums, a quorum is a majority component of the ensemble containing the current leader. For instance, if the ensemble has three servers, a component that contains the leader and one other server constitutes a quorum. If the ensemble can not achieve a quorum, the ensemble cannot write data. ZooKeeper servers keep their entire state machine in memory, and write every mutation to a durable WAL (Write Ahead Log) on storage media. When a server crashes, it can recover its previous state by replaying the WAL. To prevent the WAL from growing without bound, ZooKeeper servers will periodically snapshot them in memory state to storage media. These snapshots can be loaded directly into memory, and all WAL entries that preceded the snapshot may be discarded. ## Creating a ZooKeeper ensemble The manifest below contains a [Headless Service](/docs/concepts/services-networking/service/#headless-services), a [Service](/docs/concepts/services-networking/service/), a [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets), and a [StatefulSet](/docs/concepts/workloads/controllers/statefulset/). {{% code\_sample file="application/zookeeper/zookeeper.yaml" %}} Open a terminal, and use the [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands/#apply) command to create the manifest. ```shell kubectl apply -f https://k8s.io/examples/application/zookeeper/zookeeper.yaml ``` This creates the `zk-hs` Headless Service, the `zk-cs` Service, the `zk-pdb` PodDisruptionBudget, and the `zk` StatefulSet. ``` service/zk-hs created service/zk-cs created poddisruptionbudget.policy/zk-pdb created statefulset.apps/zk created ``` Use [`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to watch the StatefulSet controller create the StatefulSet's Pods. ```shell kubectl get pods -w -l app=zk ``` Once the `zk-2` Pod is Running and Ready, use `CTRL-C` to terminate kubectl. ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.00473915645852685,
-0.004599029663950205,
0.05477314442396164,
0.008736453019082546,
-0.01354917697608471,
-0.04108714684844017,
-0.026392268016934395,
-0.023747947067022324,
0.01486386638134718,
0.047745231539011,
-0.012163670733571053,
-0.01198815368115902,
-0.015883030369877815,
0.007631413172930479,
-0.01070492435246706,
-0.02642989158630371,
0.09614385664463043,
-0.04158751294016838,
-0.023066524416208267,
-0.04072955623269081,
-0.00745305884629488,
-0.014723459258675575,
0.011192657053470612,
0.005620767828077078,
-0.08664018660783768,
0.012919285334646702,
-0.11785808950662613,
-0.05239128693938255,
0.029192034155130386,
0.020384790375828743,
-0.03582945466041565,
-0.013005445711314678,
0.023543771356344223,
0.005091468803584576,
0.028502900153398514,
0.10215979069471359,
0.059091996401548386,
-0.085384301841259,
-0.09055790305137634,
0.055265966802835464,
0.031822700053453445,
-0.024275271221995354,
-0.0965641513466835,
-0.009261214174330235,
-0.03923609107732773,
-0.012785227037966251,
-0.021624132990837097,
-0.02328507974743843,
-0.010150700807571411,
-0.05673220381140709,
-0.018793364986777306,
-0.08491652458906174,
0.06350408494472504,
0.047920700162649155,
0.012684701941907406,
0.07983015477657318,
0.0041576470248401165,
0.03359811007976532,
0.0423600897192955,
-0.020170772448182106,
0.044173624366521835,
-0.019849279895424843,
0.01262564118951559,
-0.02688722126185894,
0.05018632486462593,
-0.07551173865795135,
0.0395498089492321,
0.04866929352283478,
0.12316583096981049,
-0.01121195312589407,
0.04906436428427696,
0.01106303557753563,
-0.04436739906668663,
-0.028699101880192757,
-0.02255207858979702,
0.04443778842687607,
0.027196073904633522,
0.07993955910205841,
0.04996725171804428,
-0.08392331004142761,
-0.029763374477624893,
0.008228627033531666,
0.01966538466513157,
0.005113781429827213,
-0.06817858666181564,
-0.026317959651350975,
-0.015534977428615093,
-0.014766358770430088,
0.04256124049425125,
-0.018260598182678223,
0.046148572117090225,
-0.027282001450657845,
0.018031597137451172,
-0.13505755364894867,
0.029207821935415268,
0.014658008702099323,
-0.0003985453222412616,
0.030648337677121162,
-0.00015015227836556733,
0.02610785700380802,
-0.005827517248690128,
-0.05363551154732704,
0.01904868893325329,
-0.0003471638192422688,
0.04976299777626991,
-0.054757989943027496,
-0.10008834302425385,
0.013358177617192268,
0.03051671013236046,
0.0546366348862648,
0.016149001196026802,
0.062256768345832825,
0.022852417081594467,
0.09063547849655151,
0.0052354224026203156,
0.07910080999135971,
0.026325779035687447,
-0.07156636565923691,
0.02321341447532177,
0.09075784683227539,
0.03294028714299202,
-0.09516624361276627,
0.021994048729538918,
-0.008004759438335896,
-0.028955264016985893,
0.02365691587328911,
-0.02134322002530098,
8.0897851831376e-34,
0.09067190438508987,
-0.08987917006015778,
-0.002258616266772151,
-0.024886617437005043,
0.07014819234609604,
-0.08684641122817993,
-0.0011568893678486347,
-0.020037880167365074,
-0.04765520244836807,
-0.03343338519334793,
-0.03568527102470398,
0.08313876390457153,
0.024673573672771454,
-0.024655012413859367,
-0.0022217368241399527,
-0.05990348756313324,
-0.07227737456560135,
0.027804283425211906,
0.14753414690494537,
-0.005735349375754595,
0.03859343007206917,
-0.03983386233448982,
-0.07212737202644348,
0.01286050584167242,
0.0634225532412529,
0.006341984029859304,
0.007500057108700275,
-0.10302215814590454,
0.03254515677690506,
0.04666060581803322,
-0.010457792319357395,
-0.022063802927732468,
-0.02115830034017563,
-0.019368907436728477,
-0.11949160695075989,
-0.036015234887599945,
-0.027560822665691376,
-0.027241669595241547,
-0.08641226589679718,
-0.10959986597299576,
0.008231625892221928,
0.020886361598968506,
0.01640395261347294,
-0.048398859798908234,
0.040620870888233185,
-0.024657923728227615,
0.05077224597334862,
0.009584288112819195,
0.035450004041194916,
0.05976550653576851,
0.005769756622612476,
-0.1102621853351593,
0.06089409068226814,
-0.07568378001451492,
-0.028830448165535927,
0.0595514178276062,
0.06715598702430725,
-0.02902233973145485,
-0.06261693686246872,
0.027061911299824715,
-0.01639929600059986,
-0.05134095624089241,
-0.06108003109693527,
0.009024595841765404,
0.06688409298658371,
0.015966281294822693,
-0.041151005774736404,
0.06664790213108063,
0.05052407458424568,
0.024312926456332207,
-0.044944290071725845,
0.041729655116796494,
-0.03594747558236122,
0.05688697472214699,
-0.0146721750497818,
-0.06208249554038048,
0.01971389353275299,
-0.003317916300147772,
-0.15068604052066803,
0.02780252695083618,
0.003639211878180504,
0.06513458490371704,
-0.037862006574869156,
0.09274359792470932,
-0.01972641609609127,
-0.005845834035426378,
0.06702705472707748,
0.023620251566171646,
-0.05583396181464195,
0.028761815279722214,
0.09653428196907043,
0.013663186691701412,
-0.005952169187366962,
-0.00188866734970361,
-0.0638573169708252,
-1.4900931896298025e-33,
0.041432756930589676,
-0.048658616840839386,
-0.050892140716314316,
0.039767224341630936,
0.04274691268801689,
0.015070341527462006,
-0.03207825496792793,
0.06300798058509827,
0.015247510746121407,
-0.028856495395302773,
-0.07153292745351791,
-0.050166793167591095,
0.008502050302922726,
0.04678148031234741,
-0.1240013837814331,
-0.03524033725261688,
-0.07698339223861694,
-0.0942424014210701,
0.012314006686210632,
0.008785075508058071,
-0.0272433590143919,
-0.004944951739162207,
0.020745323970913887,
0.011200062930583954,
0.01558296475559473,
0.0027532216627150774,
-0.01978052593767643,
0.057548411190509796,
-0.0832638218998909,
-0.04715131223201752,
0.015408945269882679,
-0.10778902471065521,
-0.018392665311694145,
-0.008643530309200287,
0.002294885227456689,
-0.044204775243997574,
-0.04921283572912216,
0.08538186550140381,
-0.0021978854201734066,
-0.028473548591136932,
0.05432863533496857,
-0.017632577568292618,
-0.08098657429218292,
-0.0600382499396801,
-0.056518156081438065,
0.02109200693666935,
0.036634184420108795,
0.05280059948563576,
-0.04338112473487854,
-0.059103891253471375,
-0.01731438934803009,
-0.034921687096357346,
-0.03605467081069946,
0.0932842269539833,
-0.03385217487812042,
0.03538879007101059,
0.07265277206897736,
0.05017354339361191,
0.0012870095670223236,
0.06004568189382553,
0.041431739926338196,
-0.08184387534856796,
0.020044803619384766,
0.08884865045547485,
-0.02931217849254608,
-0.10828928649425507,
0.00906137004494667,
0.034303270280361176,
-0.03814934194087982,
0.0013111061416566372,
0.002731541870161891,
0.03238411247730255,
0.07073549926280975,
0.0510631762444973,
0.013466817326843739,
-0.03382202610373497,
0.010802249424159527,
-0.040242016315460205,
0.03802580386400223,
-0.0022094829473644495,
-0.11199590563774109,
0.08430955559015274,
-0.046412304043769836,
0.004264916758984327,
0.07280037552118301,
0.07061894983053207,
0.08951803296804428,
0.09969042241573334,
0.025993885472416878,
0.07882905006408691,
-0.02570953592658043,
-0.010399413295090199,
-0.02208680287003517,
0.09774895757436752,
-0.02332131192088127,
-4.9101931409722965e-8,
0.09577395766973495,
0.0390300378203392,
-0.06311220675706863,
0.07856817543506622,
0.035260673612356186,
-0.0034274114295840263,
0.04681060463190079,
0.020030822604894638,
-0.04052507504820824,
0.07638860493898392,
0.05077684298157692,
0.017188383266329765,
-0.07870836555957794,
0.007315637543797493,
0.0008169267093762755,
-0.028177347034215927,
0.09127132594585419,
0.010222471319139004,
-0.06649018824100494,
-0.061770159751176834,
-0.09968798607587814,
-0.045190345495939255,
-0.035941001027822495,
-0.01227578055113554,
0.03829096630215645,
0.07433229684829712,
0.09526171535253525,
0.014223265461623669,
0.05304199084639549,
-0.005478603765368462,
-0.10458079725503922,
0.01613045111298561,
-0.04991568997502327,
0.015086282044649124,
-0.05510791018605232,
0.06126227602362633,
-0.13787636160850525,
0.021509142592549324,
0.026467209681868553,
0.022284802049398422,
-0.0010775196133181453,
0.013249792158603668,
-0.05469198897480965,
-0.0024875339586287737,
0.07418086379766464,
0.07236705720424652,
-0.01799587719142437,
0.06695675104856491,
-0.016256771981716156,
-0.004714596550911665,
-0.02440439537167549,
-0.06390780210494995,
0.03208917751908302,
0.04547669738531113,
0.00885180663317442,
-0.0016024246579036117,
-0.0057043153792619705,
-0.09247485548257828,
0.04700625315308571,
0.009505470283329487,
0.041798852384090424,
0.020753400400280952,
-0.007001612335443497,
0.009194215759634972
] | 0.172034
|
get pods -w -l app=zk ``` Once the `zk-2` Pod is Running and Ready, use `CTRL-C` to terminate kubectl. ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` The StatefulSet controller creates three Pods, and each Pod has a container with a [ZooKeeper](https://archive.apache.org/dist/zookeeper/stable/) server. ### Facilitating leader election Because there is no terminating algorithm for electing a leader in an anonymous network, Zab requires explicit membership configuration to perform leader election. Each server in the ensemble needs to have a unique identifier, all servers need to know the global set of identifiers, and each identifier needs to be associated with a network address. Use [`kubectl exec`](/docs/reference/generated/kubectl/kubectl-commands/#exec) to get the hostnames of the Pods in the `zk` StatefulSet. ```shell for i in 0 1 2; do kubectl exec zk-$i -- hostname; done ``` The StatefulSet controller provides each Pod with a unique hostname based on its ordinal index. The hostnames take the form of `-`. Because the `replicas` field of the `zk` StatefulSet is set to `3`, the Set's controller creates three Pods with their hostnames set to `zk-0`, `zk-1`, and `zk-2`. ``` zk-0 zk-1 zk-2 ``` The servers in a ZooKeeper ensemble use natural numbers as unique identifiers, and store each server's identifier in a file called `myid` in the server's data directory. To examine the contents of the `myid` file for each server use the following command. ```shell for i in 0 1 2; do echo "myid zk-$i";kubectl exec zk-$i -- cat /var/lib/zookeeper/data/myid; done ``` Because the identifiers are natural numbers and the ordinal indices are non-negative integers, you can generate an identifier by adding 1 to the ordinal. ``` myid zk-0 1 myid zk-1 2 myid zk-2 3 ``` To get the Fully Qualified Domain Name (FQDN) of each Pod in the `zk` StatefulSet use the following command. ```shell for i in 0 1 2; do kubectl exec zk-$i -- hostname -f; done ``` The `zk-hs` Service creates a domain for all of the Pods, `zk-hs.default.svc.cluster.local`. ``` zk-0.zk-hs.default.svc.cluster.local zk-1.zk-hs.default.svc.cluster.local zk-2.zk-hs.default.svc.cluster.local ``` The A records in [Kubernetes DNS](/docs/concepts/services-networking/dns-pod-service/) resolve the FQDNs to the Pods' IP addresses. If Kubernetes reschedules the Pods, it will update the A records with the Pods' new IP addresses, but the A records names will not change. ZooKeeper stores its application configuration in a file named `zoo.cfg`. Use `kubectl exec` to view the contents of the `zoo.cfg` file in the `zk-0` Pod. ```shell kubectl exec zk-0 -- cat /opt/zookeeper/conf/zoo.cfg ``` In the `server.1`, `server.2`, and `server.3` properties at the bottom of the file, the `1`, `2`, and `3` correspond to the identifiers in the ZooKeeper servers' `myid` files. They are set to the FQDNs for the Pods in the `zk` StatefulSet. ``` clientPort=2181 dataDir=/var/lib/zookeeper/data dataLogDir=/var/lib/zookeeper/log tickTime=2000 initLimit=10 syncLimit=2000 maxClientCnxns=60 minSessionTimeout= 4000 maxSessionTimeout= 40000 autopurge.snapRetainCount=3 autopurge.purgeInterval=0 server.1=zk-0.zk-hs.default.svc.cluster.local:2888:3888 server.2=zk-1.zk-hs.default.svc.cluster.local:2888:3888 server.3=zk-2.zk-hs.default.svc.cluster.local:2888:3888 ``` ### Achieving consensus Consensus protocols require that the identifiers of each participant be unique. No two participants in the Zab protocol should claim the same unique identifier. This is necessary to allow the processes in the system to agree on which processes have committed which data. If two Pods are launched with the same ordinal, two ZooKeeper servers would both identify themselves as
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.00003439588181208819,
0.0565863698720932,
-0.062373630702495575,
-0.013325691223144531,
-0.0004236198146827519,
-0.04309484735131264,
0.048260483890771866,
-0.02605343423783779,
0.009332136251032352,
0.046458739787340164,
0.0016929538687691092,
-0.0904664471745491,
-0.001773830153979361,
0.01070044282823801,
-0.03588767349720001,
-0.010305789299309254,
0.011664455756545067,
0.020411239936947823,
-0.030566541478037834,
-0.05400526896119118,
0.010312959551811218,
0.04364810138940811,
0.02809906005859375,
-0.035809438675642014,
-0.05419110879302025,
0.04426322504878044,
-0.10906780511140823,
-0.058024294674396515,
0.0420420877635479,
-0.010491088032722473,
-0.007283455692231655,
0.02047066204249859,
0.013246949762105942,
0.006182681303471327,
0.08569072186946869,
0.07818607985973358,
0.004755036905407906,
-0.08578068017959595,
-0.04767908900976181,
-0.02645360864698887,
0.08315761387348175,
0.016829796135425568,
-0.0876765102148056,
0.018206331878900528,
-0.060274504125118256,
0.019665678963065147,
-0.10395488888025284,
-0.05927204713225365,
0.013494890183210373,
-0.038895104080438614,
-0.0569588877260685,
-0.05912254378199577,
0.0389300137758255,
0.103108249604702,
0.04944612458348274,
0.04285461828112602,
-0.05488945171236992,
0.041584379971027374,
0.04017353430390358,
0.020379824563860893,
0.015001068823039532,
-0.019388452172279358,
0.00224100798368454,
-0.040410444140434265,
0.027339518070220947,
-0.02817615494132042,
-0.004775053821504116,
0.011439399793744087,
0.038101136684417725,
-0.03604632988572121,
-0.010948477312922478,
-0.008602435700595379,
0.026317549869418144,
-0.0766802728176117,
-0.10969888418912888,
0.008309321478009224,
0.06306928396224976,
-0.0021480857394635677,
-0.06694088876247406,
-0.08725041896104813,
-0.05721268430352211,
-0.024328842759132385,
0.007523059844970703,
-0.012438648380339146,
-0.05604128539562225,
0.012975779362022877,
-0.026378029957413673,
-0.017670223489403725,
0.06784668564796448,
0.017916597425937653,
-0.029436426237225533,
0.05339004471898079,
0.0645722970366478,
-0.10790490359067917,
0.014171361923217773,
-0.005695244763046503,
0.06672228127717972,
0.053959596902132034,
-0.02476312592625618,
0.08867722004652023,
0.034934546798467636,
-0.013802607543766499,
0.03487672656774521,
-0.014373703859746456,
0.09143465012311935,
-0.061732470989227295,
-0.0930248498916626,
0.021169591695070267,
-0.0629340261220932,
0.04735887795686722,
-0.06128271296620369,
0.0433361679315567,
0.04168016463518143,
0.08898509293794632,
0.003094127168878913,
0.04522703215479851,
0.013283143751323223,
0.004093427211046219,
0.002495604334399104,
0.07329288125038147,
0.09649775922298431,
-0.1027350053191185,
0.06492244452238083,
-0.0015114016132429242,
-0.03963451832532883,
0.05487861484289169,
0.06816193461418152,
8.975708255578325e-33,
0.05763443931937218,
-0.13213765621185303,
-0.01708211563527584,
-0.008067233487963676,
0.05127669498324394,
0.0018739165971055627,
0.011852414347231388,
0.006667279172688723,
-0.013040665537118912,
-0.006655152887105942,
-0.08249352872371674,
0.05399119853973389,
-0.07224196195602417,
-0.058651238679885864,
-0.014883657917380333,
-0.10154949128627777,
-0.07925496250391006,
0.021344289183616638,
0.07691671699285507,
-0.021050330251455307,
0.06644736230373383,
-0.024522222578525543,
-0.07945916056632996,
-0.057647641748189926,
0.11146074533462524,
-0.03440100699663162,
-0.006954479031264782,
-0.11272892355918884,
-0.043672505766153336,
0.034004002809524536,
0.03629098832607269,
-0.002076003234833479,
-0.10567161440849304,
-0.0020310033578425646,
-0.06551562994718552,
-0.01906859688460827,
0.019414816051721573,
0.0247707050293684,
-0.06832116842269897,
-0.16082653403282166,
-0.026257384568452835,
-0.03822990506887436,
-0.017410069704055786,
0.017684534192085266,
-0.011755777522921562,
-0.04184575378894806,
0.006780225783586502,
0.005815149284899235,
-0.031196173280477524,
0.03710286319255829,
0.007321451790630817,
-0.01540332194417715,
-0.04506237804889679,
-0.05593764781951904,
-0.0994233563542366,
-0.03123096190392971,
0.012508961372077465,
0.024635443463921547,
-0.009256871417164803,
0.027403756976127625,
-0.053793929517269135,
0.024363026022911072,
-0.04831812530755997,
0.0474172942340374,
0.07980786263942719,
0.06620938330888748,
-0.03078600764274597,
0.05002351105213165,
0.07454439997673035,
0.057415734976530075,
-0.04030337184667587,
0.03785925731062889,
0.06513713300228119,
-0.005261112004518509,
-0.014649766497313976,
-0.07687008380889893,
0.022075137123465538,
-0.015703218057751656,
-0.14899271726608276,
-0.02213398553431034,
0.05520709231495857,
0.026381991803646088,
-0.08283473551273346,
0.06699568033218384,
0.016897855326533318,
0.006640871986746788,
-0.001464648637920618,
0.00826652254909277,
-0.04004984721541405,
0.03885572403669357,
0.0041054324246943,
-0.014626652002334595,
0.07261073589324951,
-0.08748611807823181,
-0.08884547650814056,
-7.552086883764622e-33,
0.05685383453965187,
-0.00799541175365448,
0.010764564387500286,
0.01656307652592659,
0.08236657828092575,
-0.03408362716436386,
0.0030993579421192408,
0.06307845562696457,
-0.020798664540052414,
-0.01480844710022211,
-0.024410923942923546,
-0.0073755341582000256,
0.0317380353808403,
0.09518487751483917,
-0.04237477481365204,
0.0020726649090647697,
-0.04823187738656998,
-0.062004346400499344,
0.04620085284113884,
0.031998977065086365,
-0.03853461891412735,
0.04010496288537979,
-0.03302694857120514,
0.0960715040564537,
0.00031294955988414586,
0.05504913255572319,
0.006179402582347393,
0.04087405651807785,
-0.013852108269929886,
-0.0200749933719635,
0.06474226713180542,
-0.11779990792274475,
-0.017311913892626762,
0.016176806762814522,
-0.00010581534297671169,
-0.06248844414949417,
-0.07102343440055847,
0.12228690832853317,
-0.07673352211713791,
0.015130523592233658,
0.059065137058496475,
-0.05510902404785156,
-0.10186213254928589,
0.026204658672213554,
-0.06644659489393234,
0.03221200779080391,
0.06147688999772072,
0.027832521125674248,
-0.04288370907306671,
-0.03282010555267334,
0.031144538894295692,
-0.0065015871077775955,
-0.07700507342815399,
0.06747406721115112,
0.027397746220231056,
0.011173078790307045,
0.011824745684862137,
-0.0028839532751590014,
-0.04461454972624779,
-0.007655738852918148,
0.0677884891629219,
-0.08319265395402908,
0.05270856246352196,
0.07044801861047745,
0.05726330727338791,
-0.10333400964736938,
0.010513316839933395,
0.009323349222540855,
-0.032990895211696625,
0.013416522182524204,
0.11877599358558655,
0.040403276681900024,
0.02592303603887558,
-0.014167211949825287,
0.046534180641174316,
-0.0026640475261956453,
-0.02526542730629444,
-0.03365928307175636,
0.07103002071380615,
0.008142140693962574,
-0.11986865848302841,
0.08281204104423523,
0.028744356706738472,
0.049334920942783356,
0.002982347970828414,
0.028590166941285133,
0.04751916229724884,
0.11053206026554108,
0.05503769963979721,
0.05664041265845299,
0.0039966655895113945,
0.030463416129350662,
-0.03452987223863602,
0.09255679696798325,
-0.02900967001914978,
-5.3854780190931706e-8,
0.06561906635761261,
-0.037942685186862946,
-0.01910543069243431,
0.11907978355884552,
0.04736842215061188,
-0.012051759287714958,
0.02493399567902088,
0.030625535175204277,
-0.09734293073415756,
-0.032254740595817566,
0.05836263671517372,
0.0583852156996727,
-0.04753611236810684,
0.009303312748670578,
0.04482701048254967,
-0.014520357362926006,
0.027830442413687706,
0.039870958775281906,
-0.02278793416917324,
-0.01154381688684225,
-0.059140197932720184,
-0.03733525052666664,
0.017006564885377884,
0.006669959053397179,
0.011494812555611134,
0.056198056787252426,
0.01928711123764515,
0.02287817746400833,
0.032973989844322205,
0.04473162069916725,
-0.018124062567949295,
-0.00921391136944294,
0.03252391889691353,
0.026323026046156883,
0.000048067460738820955,
0.02561338059604168,
-0.14954659342765808,
0.0037077057640999556,
0.0016627408331260085,
-0.03368489816784859,
-0.01648961752653122,
-0.003550451248884201,
-0.024059725925326347,
0.03191177546977997,
0.007090269587934017,
0.01926092989742756,
0.0202131737023592,
-0.024045992642641068,
0.0740295872092247,
-0.011794816702604294,
-0.023729458451271057,
-0.0878804549574852,
0.028587738052010536,
0.03369549661874771,
0.022270599380135536,
0.012229327112436295,
0.0007691426435485482,
-0.042674124240875244,
0.048901986330747604,
0.05077660456299782,
0.04464688524603844,
0.009414268657565117,
-0.0036221349146217108,
0.043004997074604034
] | 0.116972
|
unique. No two participants in the Zab protocol should claim the same unique identifier. This is necessary to allow the processes in the system to agree on which processes have committed which data. If two Pods are launched with the same ordinal, two ZooKeeper servers would both identify themselves as the same server. ```shell kubectl get pods -w -l app=zk ``` ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` The A records for each Pod are entered when the Pod becomes Ready. Therefore, the FQDNs of the ZooKeeper servers will resolve to a single endpoint, and that endpoint will be the unique ZooKeeper server claiming the identity configured in its `myid` file. ``` zk-0.zk-hs.default.svc.cluster.local zk-1.zk-hs.default.svc.cluster.local zk-2.zk-hs.default.svc.cluster.local ``` This ensures that the `servers` properties in the ZooKeepers' `zoo.cfg` files represents a correctly configured ensemble. ``` server.1=zk-0.zk-hs.default.svc.cluster.local:2888:3888 server.2=zk-1.zk-hs.default.svc.cluster.local:2888:3888 server.3=zk-2.zk-hs.default.svc.cluster.local:2888:3888 ``` When the servers use the Zab protocol to attempt to commit a value, they will either achieve consensus and commit the value (if leader election has succeeded and at least two of the Pods are Running and Ready), or they will fail to do so (if either of the conditions are not met). No state will arise where one server acknowledges a write on behalf of another. ### Sanity testing the ensemble The most basic sanity test is to write data to one ZooKeeper server and to read the data from another. The command below executes the `zkCli.sh` script to write `world` to the path `/hello` on the `zk-0` Pod in the ensemble. ```shell kubectl exec zk-0 -- zkCli.sh create /hello world ``` ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null Created /hello ``` To get the data from the `zk-1` Pod use the following command. ```shell kubectl exec zk-1 -- zkCli.sh get /hello ``` The data that you created on `zk-0` is available on all the servers in the ensemble. ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x100000002 ctime = Thu Dec 08 15:13:30 UTC 2016 mZxid = 0x100000002 mtime = Thu Dec 08 15:13:30 UTC 2016 pZxid = 0x100000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` ### Providing durable storage As mentioned in the [ZooKeeper Basics](#zookeeper) section, ZooKeeper commits all entries to a durable WAL, and periodically writes snapshots in memory state, to storage media. Using WALs to provide durability is a common technique for applications that use consensus protocols to achieve a replicated state machine. Use the [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands/#delete) command to delete the `zk` StatefulSet. ```shell kubectl delete statefulset zk ``` ``` statefulset.apps "zk" deleted ``` Watch the termination of the Pods in the StatefulSet. ```shell kubectl get pods -w -l app=zk ``` When `zk-0` if fully terminated, use `CTRL-C` to terminate kubectl. ``` zk-2 1/1 Terminating 0 9m zk-0 1/1 Terminating 0 11m zk-1 1/1 Terminating 0 10m zk-2 0/1 Terminating 0 9m zk-2 0/1 Terminating 0 9m zk-2 0/1 Terminating 0 9m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m ``` Reapply the manifest in `zookeeper.yaml`. ```shell kubectl apply
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
-0.016475358977913857,
0.010937824845314026,
-0.047610778361558914,
-0.022309526801109314,
-0.036547496914863586,
-0.043518565595149994,
0.07610074430704117,
-0.06852958351373672,
0.06261156499385834,
0.0006279069930315018,
-0.030813513323664665,
-0.06971821933984756,
0.09210193902254105,
0.037127554416656494,
-0.027393242344260216,
-0.05698026716709137,
0.03979295864701271,
-0.03883915767073631,
0.01843886636197567,
-0.03254332393407822,
-0.03378999978303909,
-0.007796623278409243,
0.030911607667803764,
0.001987699419260025,
-0.08981254696846008,
-0.025603078305721283,
-0.03913412615656853,
0.04693158343434334,
0.027640383690595627,
-0.05055277794599533,
0.03209219500422478,
0.015605123713612556,
-0.02653154358267784,
0.037327032536268234,
0.03836769983172417,
-0.004173377528786659,
0.03545490652322769,
-0.03790026158094406,
-0.049888551235198975,
-0.005073222331702709,
0.08739759027957916,
-0.05352184921503067,
-0.10541509091854095,
0.05244022235274315,
-0.08668443560600281,
0.05677317455410957,
-0.0859275832772255,
0.008723181672394276,
-0.052087098360061646,
0.00620170496404171,
-0.05112607404589653,
-0.09654618054628372,
-0.03096511960029602,
0.10639230906963348,
0.08440861850976944,
0.06517425179481506,
-0.1126285269856453,
-0.007543256040662527,
0.05493054911494255,
0.029281865805387497,
-0.05102433264255524,
-0.006329826079308987,
0.023068619892001152,
0.036702945828437805,
0.03282042220234871,
-0.014474667608737946,
-0.04265410080552101,
-0.024789070710539818,
0.02179117687046528,
-0.009686685167253017,
0.08915197104215622,
-0.05461198464035988,
0.009508414193987846,
-0.05639715865254402,
-0.07203584164381027,
0.046104613691568375,
0.019155308604240417,
0.04263877868652344,
-0.03674771264195442,
-0.09507715702056885,
-0.06826365739107132,
-0.039273761212825775,
-0.010274219326674938,
-0.037291817367076874,
0.0023638561833649874,
-0.0743558257818222,
0.0053247627802193165,
-0.04579576849937439,
-0.02549876645207405,
0.015459961257874966,
0.019407974556088448,
0.03960806131362915,
0.0806531086564064,
-0.1229441836476326,
0.022940751165151596,
-0.034554678946733475,
0.042520225048065186,
0.06792309880256653,
0.05084674805402756,
0.0549742765724659,
-0.019192494451999664,
-0.028438815847039223,
0.008431890048086643,
0.02382132224738598,
0.06633995473384857,
-0.051166996359825134,
-0.08396565914154053,
-0.06311145424842834,
0.004473698791116476,
0.08840470761060715,
-0.03383432328701019,
0.0490005761384964,
0.03510691598057747,
0.08288491517305374,
0.010131324641406536,
0.055320315062999725,
0.003326194826513529,
0.027647728100419044,
-0.02758336067199707,
0.018655264750123024,
0.028677383437752724,
-0.08641740679740906,
0.06567759811878204,
0.016237303614616394,
-0.05220289155840874,
0.05948696285486221,
0.007820752449333668,
9.091528244596906e-33,
0.016569163650274277,
-0.0796448290348053,
-0.039613619446754456,
-0.05134877189993858,
0.04058937728404999,
0.04171241074800491,
-0.05115280672907829,
0.008349868468940258,
-0.056433431804180145,
0.002389684086665511,
-0.07038582861423492,
0.06861763447523117,
0.037636589258909225,
-0.030794985592365265,
-0.05007607117295265,
0.031906649470329285,
-0.05852871760725975,
0.05000308156013489,
0.04562165588140488,
0.0022706519812345505,
0.08956064283847809,
0.03075675293803215,
-0.08309554308652878,
0.009149930439889431,
0.10344289988279343,
0.003028462640941143,
-0.0428474023938179,
-0.13071319460868835,
-0.013709458522498608,
0.014523087069392204,
0.011137976311147213,
-0.08771277219057083,
-0.04935825243592262,
0.04240081459283829,
-0.09867313504219055,
0.011449473910033703,
0.04798635095357895,
-0.0314100906252861,
-0.054160550236701965,
-0.13479070365428925,
0.017320072278380394,
-0.016379591077566147,
-0.05578434467315674,
0.008007358759641647,
0.018728116527199745,
0.005711585748940706,
-0.010378492996096611,
0.04793413355946541,
0.03887425363063812,
-0.010787510313093662,
-0.02454402483999729,
-0.05236344784498215,
0.02148508094251156,
-0.03329521045088768,
-0.07694687694311142,
-0.018188759684562683,
0.014704747125506401,
0.009142115712165833,
0.014322545379400253,
0.03303152322769165,
0.027767522260546684,
0.03271937742829323,
-0.05238083750009537,
0.050866808742284775,
0.11926928907632828,
0.03784151375293732,
-0.0011852486059069633,
-0.005562216509133577,
0.06538516283035278,
0.06031128019094467,
-0.03857045993208885,
0.039441533386707306,
0.0077642532996833324,
-0.039153482764959335,
-0.017375914379954338,
-0.12794563174247742,
0.014617963694036007,
0.019156046211719513,
-0.04131319746375084,
0.008969087153673172,
-0.06889551132917404,
0.04731703922152519,
-0.04562091827392578,
0.04710054025053978,
-0.07777130603790283,
0.04678382724523544,
0.002549612196162343,
0.03138570860028267,
-0.10142458975315094,
0.0569811575114727,
0.08828861266374588,
0.029706142842769623,
0.022167565301060677,
-0.03556852042675018,
-0.020668480545282364,
-8.129876887340332e-33,
-0.02717246115207672,
0.0022339869756251574,
0.027934981510043144,
0.021921169012784958,
0.060112565755844116,
-0.018948517739772797,
0.02462887577712536,
-0.0029093341436237097,
-0.04246150702238083,
-0.007922155782580376,
0.01757119968533516,
-0.024648306891322136,
0.024254480376839638,
0.02948150597512722,
-0.006646493449807167,
0.002066774293780327,
-0.044689029455184937,
0.0019509093835949898,
0.011292333714663982,
0.009174661710858345,
-0.01431741751730442,
0.014736490324139595,
-0.02273484691977501,
0.05516483262181282,
0.07048413902521133,
0.040923260152339935,
0.040660664439201355,
0.01029074564576149,
0.0018205932574346662,
-0.051893819123506546,
0.04056854173541069,
-0.06863410770893097,
-0.03862070292234421,
-0.053065381944179535,
0.007476828061044216,
-0.07800351828336716,
-0.05486113205552101,
0.052667830139398575,
-0.05706198513507843,
0.02672361023724079,
-0.0015171243576332927,
-0.002825177973136306,
-0.1725550889968872,
0.05007299408316612,
-0.037076618522405624,
0.06320235133171082,
0.06184284761548042,
0.0020993915386497974,
-0.02177482284605503,
-0.11567064374685287,
0.03275736793875694,
0.03144820034503937,
-0.07604386657476425,
0.03313032537698746,
0.008854174986481667,
0.06342727690935135,
0.020908130332827568,
0.01785535365343094,
-0.009046130813658237,
-0.05845847725868225,
0.1572963446378708,
-0.03526753932237625,
0.05888386815786362,
0.08138954639434814,
0.012852288782596588,
-0.0703546553850174,
0.027780596166849136,
0.03386552259325981,
-0.01618576981127262,
0.03665213659405708,
0.06892868876457214,
0.03782936558127403,
-0.06245366111397743,
-0.046814337372779846,
0.0171000175178051,
0.07204701751470566,
-0.021257201209664345,
-0.01912725158035755,
-0.011691180989146233,
0.04161489009857178,
-0.11522247642278671,
0.11613412946462631,
0.01515417080372572,
0.07344711571931839,
-0.023905998095870018,
0.04213355854153633,
0.11147423833608627,
0.1362806111574173,
0.05894681066274643,
0.0918816477060318,
-0.023515138775110245,
0.0029814934823662043,
-0.06577233970165253,
0.04637937247753143,
-0.10552150756120682,
-5.6219803923340805e-8,
0.008167566731572151,
-0.032361626625061035,
-0.05223759636282921,
0.10673030465841293,
0.009960182011127472,
0.016546232625842094,
-0.018247371539473534,
-0.08454715460538864,
-0.08223297446966171,
0.027397220954298973,
0.033318210393190384,
0.014756638556718826,
-0.030698588117957115,
0.03837967664003372,
0.10260935127735138,
0.012754697352647781,
0.04781647399067879,
-0.0015809634933248162,
-0.02679104171693325,
0.020127199590206146,
-0.04761440306901932,
0.015943599864840508,
0.011872818693518639,
-0.017826691269874573,
-0.05805204063653946,
0.05717497318983078,
0.0031475303694605827,
-0.002761759329587221,
0.04233450070023537,
0.017467977479100227,
-0.06768050044775009,
-0.054710399359464645,
-0.013440994545817375,
0.012304537929594517,
0.0095553332939744,
0.027623003348708153,
-0.086296446621418,
0.0011709756217896938,
-0.002479239134117961,
-0.020581191405653954,
-0.05763287469744682,
-0.046668048948049545,
-0.020543301478028297,
0.056579072028398514,
0.004113564733415842,
0.0468832291662693,
0.0026482325047254562,
-0.08037217706441879,
0.030756112188100815,
0.015681561082601547,
-0.03939010202884674,
-0.0512022003531456,
0.03153671324253082,
0.03648132085800171,
0.023247016593813896,
0.028507495298981667,
-0.0654979795217514,
-0.08853016793727875,
0.07392190396785736,
-0.011006844229996204,
0.05111302062869072,
0.005628274288028479,
0.028997987508773804,
0.0030996508430689573
] | 0.109933
|
9m zk-2 0/1 Terminating 0 9m zk-2 0/1 Terminating 0 9m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-1 0/1 Terminating 0 10m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m zk-0 0/1 Terminating 0 11m ``` Reapply the manifest in `zookeeper.yaml`. ```shell kubectl apply -f https://k8s.io/examples/application/zookeeper/zookeeper.yaml ``` This creates the `zk` StatefulSet object, but the other API objects in the manifest are not modified because they already exist. Watch the StatefulSet controller recreate the StatefulSet's Pods. ```shell kubectl get pods -w -l app=zk ``` Once the `zk-2` Pod is Running and Ready, use `CTRL-C` to terminate kubectl. ``` NAME READY STATUS RESTARTS AGE zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 19s zk-0 1/1 Running 0 40s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 ContainerCreating 0 0s zk-1 0/1 Running 0 18s zk-1 1/1 Running 0 40s zk-2 0/1 Pending 0 0s zk-2 0/1 Pending 0 0s zk-2 0/1 ContainerCreating 0 0s zk-2 0/1 Running 0 19s zk-2 1/1 Running 0 40s ``` Use the command below to get the value you entered during the [sanity test](#sanity-testing-the-ensemble), from the `zk-2` Pod. ```shell kubectl exec zk-2 zkCli.sh get /hello ``` Even though you terminated and recreated all of the Pods in the `zk` StatefulSet, the ensemble still serves the original value. ``` WATCHER:: WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x100000002 ctime = Thu Dec 08 15:13:30 UTC 2016 mZxid = 0x100000002 mtime = Thu Dec 08 15:13:30 UTC 2016 pZxid = 0x100000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` The `volumeClaimTemplates` field of the `zk` StatefulSet's `spec` specifies a PersistentVolume provisioned for each Pod. ```yaml volumeClaimTemplates: - metadata: name: datadir annotations: volume.alpha.kubernetes.io/storage-class: anything spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 20Gi ``` The `StatefulSet` controller generates a `PersistentVolumeClaim` for each Pod in the `StatefulSet`. Use the following command to get the `StatefulSet`'s `PersistentVolumeClaims`. ```shell kubectl get pvc -l app=zk ``` When the `StatefulSet` recreated its Pods, it remounts the Pods' PersistentVolumes. ``` NAME STATUS VOLUME CAPACITY ACCESSMODES AGE datadir-zk-0 Bound pvc-bed742cd-bcb1-11e6-994f-42010a800002 20Gi RWO 1h datadir-zk-1 Bound pvc-bedd27d2-bcb1-11e6-994f-42010a800002 20Gi RWO 1h datadir-zk-2 Bound pvc-bee0817e-bcb1-11e6-994f-42010a800002 20Gi RWO 1h ``` The `volumeMounts` section of the `StatefulSet`'s container `template` mounts the PersistentVolumes in the ZooKeeper servers' data directories. ```yaml volumeMounts: - name: datadir mountPath: /var/lib/zookeeper ``` When a Pod in the `zk` `StatefulSet` is (re)scheduled, it will always have the same `PersistentVolume` mounted to the ZooKeeper server's data directory. Even when the Pods are rescheduled, all the writes made to the ZooKeeper servers' WALs, and all their snapshots, remain durable. ## Ensuring consistent configuration As noted in the [Facilitating Leader Election](#facilitating-leader-election) and [Achieving Consensus](#achieving-consensus) sections, the servers in a ZooKeeper ensemble require consistent configuration to elect a leader and form a quorum. They also require consistent configuration of the Zab protocol in order for the protocol to work correctly over a network. In our example we achieve consistent configuration by embedding the configuration directly into the manifest. Get the `zk` StatefulSet. ```shell kubectl get sts zk -o yaml ``` ``` … command: - sh - -c - "start-zookeeper \ --servers=3 \ --data\_dir=/var/lib/zookeeper/data \ --data\_log\_dir=/var/lib/zookeeper/data/log \ --conf\_dir=/opt/zookeeper/conf \ --client\_port=2181 \ --election\_port=3888 \ --server\_port=2888 \ --tick\_time=2000 \ --init\_limit=10 \ --sync\_limit=5 \ --heap=512M \ --max\_client\_cnxns=60 \ --snap\_retain\_count=3 \ --purge\_interval=12 \ --max\_session\_timeout=40000 \ --min\_session\_timeout=4000 \ --log\_level=INFO" … ``` The command used to start the ZooKeeper servers passed the configuration as command line parameter. You can also use environment variables to pass configuration to
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
-0.010054451413452625,
0.062146712094545364,
0.026523195207118988,
-0.0014736265875399113,
0.023962099105119705,
-0.07982361316680908,
0.007726144045591354,
0.010992055758833885,
0.03500695899128914,
0.04225216805934906,
-0.031007006764411926,
-0.08651509881019592,
0.011221344582736492,
0.04822572320699692,
-0.005095086060464382,
0.01775653101503849,
0.04499069228768349,
-0.021715039387345314,
-0.031448107212781906,
0.005613961722701788,
-0.0025111958384513855,
0.04229455813765526,
0.039385899901390076,
0.008195414207875729,
-0.09504104405641556,
-0.013029404915869236,
-0.08674903959035873,
-0.029799656942486763,
0.03450809046626091,
0.001997687853872776,
-0.05305583029985428,
0.02382698655128479,
-0.017853805795311928,
0.02612369880080223,
0.07757522165775299,
0.09174022823572159,
0.015166141092777252,
-0.08852846920490265,
-0.08735379576683044,
-0.018626512959599495,
0.11932650208473206,
0.05181972309947014,
-0.07277838885784149,
-0.0017517301021143794,
-0.03497805446386337,
0.04346290975809097,
-0.01692458614706993,
-0.06010308116674423,
-0.02728140912950039,
-0.052411507815122604,
-0.06688795238733292,
-0.05694268271327019,
-0.02798123098909855,
0.06074599176645279,
0.09718027710914612,
0.06621132791042328,
-0.053788334131240845,
0.053615752607584,
0.045648712664842606,
0.012095545418560505,
0.03262636810541153,
0.015273908153176308,
0.009968726895749569,
-0.021852592006325722,
0.03270582854747772,
-0.03025677427649498,
-0.0329996682703495,
-0.009038685820996761,
0.052179303020238876,
0.02336670272052288,
0.025274153798818588,
-0.030053921043872833,
0.032465558499097824,
-0.05403219163417816,
-0.08668898046016693,
0.022737275809049606,
0.024325091391801834,
0.0437338687479496,
0.020637808367609978,
-0.11493808031082153,
-0.07201635837554932,
-0.08085187524557114,
0.017521463334560394,
0.018855813890695572,
-0.03152104839682579,
-0.015853412449359894,
-0.02211795374751091,
-0.05571427568793297,
0.05481946840882301,
0.04708421230316162,
0.039266008883714676,
-0.039552610367536545,
0.05005277693271637,
-0.11667077243328094,
-0.012425541877746582,
-0.04310314357280731,
0.0633297935128212,
0.09013238549232483,
-0.025184961035847664,
0.06852829456329346,
0.004046300426125526,
-0.030539264902472496,
0.06182628124952316,
0.023458488285541534,
0.05031290650367737,
-0.04115908965468407,
-0.09691906720399857,
-0.008641366846859455,
-0.055090826004743576,
0.07183922827243805,
-0.038671333342790604,
0.03580671548843384,
0.03792497515678406,
0.028470441699028015,
0.03339238464832306,
0.08226092904806137,
-0.027837980538606644,
-0.005272918380796909,
-0.06917747110128403,
0.105808787047863,
0.0711042732000351,
-0.10848963260650635,
0.017336931079626083,
-0.012147611007094383,
-0.06259255856275558,
0.10829684138298035,
0.04021313413977623,
5.329277024869587e-33,
0.03994694724678993,
-0.14192892611026764,
-0.009613987989723682,
-0.020264893770217896,
0.05931385979056358,
0.011596466414630413,
0.007694137282669544,
0.03683805838227272,
-0.02945522591471672,
-0.00866241566836834,
-0.03374664485454559,
0.03828468546271324,
-0.048984840512275696,
-0.05566452816128731,
-0.021703582257032394,
-0.05691836029291153,
-0.08409448713064194,
0.01924283243715763,
0.040711358189582825,
0.039942774921655655,
0.10352412611246109,
-0.011890413239598274,
-0.07761406153440475,
-0.04585716128349304,
0.09146890789270401,
0.03256620466709137,
-0.018825851380825043,
-0.08909540623426437,
-0.052048273384571075,
0.036886896938085556,
-0.0016661909176036716,
-0.033619195222854614,
-0.05131326988339424,
0.01156580075621605,
-0.07008600234985352,
-0.08068789541721344,
-0.01641932502388954,
-0.016601217910647392,
-0.05905802175402641,
-0.17785997688770294,
-0.023091405630111694,
-0.01318657211959362,
-0.07175814360380173,
0.029941221699118614,
0.0621655248105526,
-0.023303039371967316,
0.033698197454214096,
0.017489057034254074,
0.020365994423627853,
0.006219661794602871,
0.025032274425029755,
-0.030676884576678276,
-0.022001344710588455,
-0.06509260088205338,
-0.10303910076618195,
0.01227524969726801,
0.08730883151292801,
-0.021854862570762634,
-0.04973280429840088,
-0.052522946149110794,
0.010884365998208523,
0.03495810553431511,
-0.0367271788418293,
0.0797230526804924,
0.0891646295785904,
0.04832208529114723,
-0.023461006581783295,
0.05684288591146469,
0.03413661941885948,
0.013208807446062565,
-0.05367255583405495,
0.04575026035308838,
0.006987328175455332,
0.03380481153726578,
-0.006461906246840954,
-0.13129064440727234,
0.03723790869116783,
-0.028653249144554138,
-0.1222166121006012,
-0.007939108647406101,
0.07528998702764511,
0.016249651089310646,
-0.07525099813938141,
0.029001643881201744,
0.0067174406722188,
0.008623006753623486,
0.02994382381439209,
-0.011084829457104206,
-0.04105523228645325,
0.050593052059412,
0.06001068279147148,
-0.037167616188526154,
0.0101214200258255,
-0.043824970722198486,
-0.08834671229124069,
-5.1350625829106976e-33,
0.043109551072120667,
-0.04350454732775688,
-0.012827468104660511,
0.0036756466142833233,
-0.021068565547466278,
-0.010845371522009373,
-0.021128522232174873,
0.0712689533829689,
0.003450071904808283,
-0.05822497233748436,
0.005558800883591175,
-0.01719866320490837,
0.06134869158267975,
0.07140158861875534,
-0.07591922581195831,
0.012873147614300251,
-0.08188872784376144,
-0.045948389917612076,
-0.005591042339801788,
-0.048727769404649734,
0.009693549945950508,
-0.01399113517254591,
0.029271725565195084,
0.050916969776153564,
-0.020356429740786552,
0.02032788097858429,
-0.02691688947379589,
0.07151810079813004,
0.015501195564866066,
-0.03293057903647423,
0.06890352070331573,
-0.06474670022726059,
-0.02379530481994152,
0.0009562874329276383,
-0.014083079062402248,
-0.08365710079669952,
-0.041411347687244415,
0.015552225522696972,
-0.0574130080640316,
-0.06850355118513107,
0.03233293071389198,
-0.021663717925548553,
-0.06389005482196808,
0.046708233654499054,
-0.02388950251042843,
0.05034029483795166,
0.07135262340307236,
0.027115780860185623,
-0.013828081078827381,
-0.1199134811758995,
0.01468164287507534,
-0.02580071985721588,
-0.0724356397986412,
0.09355775266885757,
-0.02196451649069786,
0.08621286600828171,
0.032603681087493896,
0.03771011903882027,
-0.006677707657217979,
-0.030104290693998337,
0.05368367210030556,
-0.03906505927443504,
0.05561109259724617,
0.048674844205379486,
0.016153400763869286,
-0.05143000930547714,
0.05289127677679062,
0.07349889725446701,
0.014147416688501835,
-0.006490309722721577,
0.11414215713739395,
0.08373944461345673,
-0.049990929663181305,
-0.04443001747131348,
0.008285295218229294,
0.06636308133602142,
-0.04290442168712616,
-0.06182827800512314,
0.024936242029070854,
-0.017668724060058594,
-0.1000896468758583,
0.05426691472530365,
0.011713612824678421,
0.016094520688056946,
0.03139631822705269,
-0.004915732890367508,
0.03429868444800377,
0.14554908871650696,
0.05963505059480667,
0.0835631787776947,
-0.011624704115092754,
0.009278060868382454,
-0.02299274317920208,
0.1069883182644844,
-0.08410609513521194,
-4.7749534104468694e-8,
0.0309984739869833,
-0.03730688989162445,
-0.08110181242227554,
0.10022296011447906,
0.0905379205942154,
-0.050854772329330444,
0.0007205897709354758,
0.03279901668429375,
-0.07116200029850006,
-0.012508479878306389,
0.0558297336101532,
0.08023633062839508,
-0.09439118951559067,
0.027473995462059975,
0.05155261978507042,
-0.05711543560028076,
0.024364110082387924,
0.023130787536501884,
-0.009051530621945858,
0.0020352022256702185,
-0.0418558232486248,
-0.043399710208177567,
-0.01748943328857422,
-0.02893560566008091,
0.031561918556690216,
0.054819658398628235,
-0.004908634815365076,
0.041587479412555695,
0.032753538340330124,
0.026220664381980896,
-0.026723191142082214,
0.008193534798920155,
0.04141266271471977,
0.04509242996573448,
-0.022937612608075142,
0.04522455856204033,
-0.06319265067577362,
0.027766432613134384,
0.044252265244722366,
-0.0462041012942791,
0.018015721812844276,
0.002430317457765341,
-0.02089049480855465,
0.0563025027513504,
-0.01976614259183407,
0.015022705309092999,
0.028755921870470047,
0.00232021976262331,
0.08012322336435318,
-0.013895660638809204,
-0.0387452207505703,
-0.02133730612695217,
-0.04109538346529007,
0.016267262399196625,
-0.022153709083795547,
0.011420872993767262,
-0.00984481442719698,
-0.054354291409254074,
-0.00417887419462204,
0.020992396399378777,
0.03846548870205879,
-0.028058405965566635,
0.003963208757340908,
0.018772806972265244
] | 0.118343
|
--election\_port=3888 \ --server\_port=2888 \ --tick\_time=2000 \ --init\_limit=10 \ --sync\_limit=5 \ --heap=512M \ --max\_client\_cnxns=60 \ --snap\_retain\_count=3 \ --purge\_interval=12 \ --max\_session\_timeout=40000 \ --min\_session\_timeout=4000 \ --log\_level=INFO" … ``` The command used to start the ZooKeeper servers passed the configuration as command line parameter. You can also use environment variables to pass configuration to the ensemble. ### Configuring logging One of the files generated by the `zkGenConfig.sh` script controls ZooKeeper's logging. ZooKeeper uses [Log4j](https://logging.apache.org/log4j/2.x/), and, by default, it uses a time and size based rolling file appender for its logging configuration. Use the command below to get the logging configuration from one of Pods in the `zk` `StatefulSet`. ```shell kubectl exec zk-0 cat /usr/etc/zookeeper/log4j.properties ``` The logging configuration below will cause the ZooKeeper process to write all of its logs to the standard output file stream. ``` zookeeper.root.logger=CONSOLE zookeeper.console.threshold=INFO log4j.rootLogger=${zookeeper.root.logger} log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold} log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n ``` This is the simplest possible way to safely log inside the container. Because the applications write logs to standard out, Kubernetes will handle log rotation for you. Kubernetes also implements a sane retention policy that ensures application logs written to standard out and standard error do not exhaust local storage media. Use [`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands/#logs) to retrieve the last 20 log lines from one of the Pods. ```shell kubectl logs zk-0 --tail 20 ``` You can view application logs written to standard out or standard error using `kubectl logs` and from the Kubernetes Dashboard. ``` 2016-12-06 19:34:16,236 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52740 2016-12-06 19:34:16,237 [myid:1] - INFO [Thread-1136:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52740 (no session established for client) 2016-12-06 19:34:26,155 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52749 2016-12-06 19:34:26,155 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52749 2016-12-06 19:34:26,156 [myid:1] - INFO [Thread-1137:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52749 (no session established for client) 2016-12-06 19:34:26,222 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52750 2016-12-06 19:34:26,222 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52750 2016-12-06 19:34:26,226 [myid:1] - INFO [Thread-1138:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52750 (no session established for client) 2016-12-06 19:34:36,151 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52760 2016-12-06 19:34:36,152 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52760 2016-12-06 19:34:36,152 [myid:1] - INFO [Thread-1139:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52760 (no session established for client) 2016-12-06 19:34:36,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52761 2016-12-06 19:34:36,231 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52761 2016-12-06 19:34:36,231 [myid:1] - INFO [Thread-1140:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52761 (no session established for client) 2016-12-06 19:34:46,149 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52767 2016-12-06 19:34:46,149 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52767 2016-12-06 19:34:46,149 [myid:1] - INFO [Thread-1141:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52767 (no session established for client) 2016-12-06 19:34:46,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:52768 2016-12-06 19:34:46,230 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@827] - Processing ruok command from /127.0.0.1:52768 2016-12-06 19:34:46,230 [myid:1] - INFO [Thread-1142:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:52768 (no session established for client) ``` Kubernetes integrates with many logging solutions. You can choose a logging solution that best fits your cluster and applications. For cluster-level logging and aggregation, consider deploying a [sidecar container](/docs/concepts/cluster-administration/logging#sidecar-container-with-logging-agent) to rotate and ship your logs. ### Configuring a non-privileged user The best practices to allow an application to run as a privileged user inside of a container are a matter of debate. If your organization requires that applications run as a non-privileged user you can use
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
-0.026452505961060524,
0.07140534371137619,
-0.001165685709565878,
0.023810256272554398,
0.04212426394224167,
-0.0729064792394638,
-0.01918848045170307,
0.03295917809009552,
-0.033856507390737534,
0.054875537753105164,
-0.06832235306501389,
-0.06033295765519142,
0.05102910101413727,
0.0431770421564579,
-0.054060209542512894,
-0.013907002285122871,
-0.03994973003864288,
0.0015175387961789966,
-0.00585649348795414,
0.05632738769054413,
-0.017813535407185555,
-0.018740270286798477,
0.04284152016043663,
0.029384365305304527,
-0.045915111899375916,
-0.05962993949651718,
-0.10497260838747025,
-0.012346383184194565,
-0.04412747174501419,
0.046509020030498505,
-0.03213657811284065,
-0.011571311391890049,
-0.0425809770822525,
0.05371943861246109,
0.0917130559682846,
0.03197106346487999,
0.01605994440615177,
-0.02134910225868225,
-0.020235253497958183,
0.010628453455865383,
0.12571094930171967,
0.022470073774456978,
-0.027786390855908394,
-0.005997232627123594,
-0.0728016048669815,
0.03705829009413719,
-0.03609735891222954,
-0.01102070789784193,
-0.02415309101343155,
-0.028460077941417694,
-0.08892415463924408,
0.004810219630599022,
-0.053147729486227036,
-0.004655494820326567,
0.00865938514471054,
0.06796697527170181,
-0.06765632331371307,
-0.03390160948038101,
0.006530230864882469,
-0.03692351654171944,
0.058086272329092026,
-0.010908771306276321,
-0.0414055660367012,
-0.024205569177865982,
-0.017333824187517166,
-0.03425218537449837,
0.06447272002696991,
0.07700963318347931,
0.08710051327943802,
0.0757155492901802,
-0.03971642255783081,
0.020617691799998283,
-0.04200992360711098,
-0.11096017807722092,
-0.027395056560635567,
0.058299239724874496,
0.011114494875073433,
0.06282160431146622,
0.003927282523363829,
-0.15186190605163574,
-0.07651744037866592,
-0.06635874509811401,
0.022195788100361824,
0.03231289982795715,
-0.0050783781334757805,
-0.034973107278347015,
0.017408151179552078,
0.039570875465869904,
0.04563618078827858,
-0.007652136962860823,
0.0017207086784765124,
0.0265682153403759,
-0.00873385276645422,
-0.03840178996324539,
-0.03693148493766785,
0.01401189062744379,
0.10060629993677139,
0.12526026368141174,
0.06295555830001831,
0.032169707119464874,
0.006766695529222488,
-0.05484209954738617,
0.04553474485874176,
-0.040914151817560196,
0.017255954444408417,
-0.09215612709522247,
-0.030112605541944504,
0.004963792394846678,
-0.037609897553920746,
0.0728825107216835,
0.011375228874385357,
0.06647153943777084,
0.08542380481958389,
0.023144008591771126,
0.12542152404785156,
0.17241151630878448,
-0.03527195379137993,
-0.010356678627431393,
-0.0685477927327156,
0.15504319965839386,
0.05099476873874664,
-0.07097681611776352,
-0.026761116459965706,
-0.026344118639826775,
0.02133902907371521,
0.13787813484668732,
0.059993546456098557,
-1.6016790112625236e-33,
0.08176084607839584,
-0.0827854722738266,
-0.008664769120514393,
0.01078487653285265,
0.09114224463701248,
0.10294807702302933,
-0.00538778817281127,
-0.010860960930585861,
-0.056621648371219635,
0.052981939166784286,
-0.06489456444978714,
0.02724560722708702,
-0.013144941069185734,
-0.04488125443458557,
-0.055602140724658966,
-0.03633357584476471,
-0.036513641476631165,
0.028512466698884964,
0.015132409520447254,
0.008949672803282738,
0.039804261177778244,
-0.03321811184287071,
-0.06341498345136642,
0.035553306341171265,
0.09350846707820892,
-0.028387991711497307,
-0.014856182038784027,
-0.05862513929605484,
-0.04021319001913071,
0.04422728344798088,
0.04075843095779419,
-0.062399838119745255,
-0.06592907011508942,
-0.025384441018104553,
0.01720794290304184,
-0.11327272653579712,
-0.02346619963645935,
-0.018297992646694183,
-0.05773105099797249,
-0.07485758513212204,
-0.039537712931632996,
0.017052175477147102,
-0.10685842484235764,
0.005691280588507652,
-0.04393894225358963,
0.018749527633190155,
0.01674114353954792,
0.07115940004587173,
0.06646890938282013,
-0.027281105518341064,
0.0223686546087265,
-0.025553544983267784,
0.03226065635681152,
-0.06388261169195175,
-0.060647569596767426,
0.04565798118710518,
0.07464443892240524,
-0.030839184299111366,
-0.0179687961935997,
-0.00462913466617465,
0.029734592884778976,
0.02979188971221447,
-0.028675638139247894,
-0.025729646906256676,
0.1319909393787384,
0.010144456289708614,
0.0327080599963665,
0.04085783287882805,
0.04941563308238983,
-0.026060614734888077,
0.013234737329185009,
-0.02788560278713703,
0.006950703915208578,
0.0006631358992308378,
0.019286319613456726,
-0.09361713379621506,
0.050880204886198044,
0.015151780098676682,
-0.06981677561998367,
-0.02524525672197342,
-0.03951335325837135,
0.009644695557653904,
-0.05197838321328163,
-0.028054142370820045,
0.015733445063233376,
-0.039160095155239105,
0.0716334730386734,
0.06488484144210815,
-0.04820647090673447,
-0.002631932497024536,
0.023376401513814926,
-0.060286492109298706,
0.06691008061170578,
-0.11310429126024246,
-0.08944450318813324,
9.546200643287336e-34,
0.000923979445360601,
-0.027362346649169922,
0.005105097312480211,
0.00836492981761694,
0.02215844765305519,
0.025821693241596222,
-0.004106668755412102,
0.08514222502708435,
0.01930238865315914,
-0.045027393847703934,
-0.008374136872589588,
-0.039199985563755035,
0.05160018429160118,
0.01273965835571289,
-0.0541103295981884,
-0.0014715896686539054,
-0.016699325293302536,
-0.05834097042679787,
0.001427199924364686,
-0.059869423508644104,
0.08939189463853836,
-0.07529908418655396,
0.06803842633962631,
0.08978200703859329,
0.0011454160558059812,
-0.023567836731672287,
-0.00034539625630714,
0.07229654490947723,
-0.0026218967977911234,
-0.09563710540533066,
0.032870665192604065,
0.012356975115835667,
-0.04365452751517296,
-0.02701854519546032,
0.014182399958372116,
-0.10355981439352036,
0.00836239568889141,
0.03245135769248009,
-0.01896393485367298,
-0.011198168620467186,
0.02041970007121563,
-0.027672335505485535,
-0.08743077516555786,
0.02625090815126896,
0.005224499385803938,
0.08044251799583435,
-0.02953430637717247,
0.0016588190337643027,
-0.022460592910647392,
0.0037556833121925592,
-0.01513743121176958,
-0.07540687173604965,
0.011140475049614906,
0.053427863866090775,
0.022367434576153755,
0.05794175714254379,
0.03246277570724487,
-0.031339630484580994,
-0.016491303220391273,
0.05210544168949127,
0.06159473955631256,
-0.022601841017603874,
0.008481166325509548,
-0.000669056607875973,
-0.016597731038928032,
-0.014671013690531254,
0.018184978514909744,
0.022188223898410797,
-0.04401173070073128,
0.03892882168292999,
0.040976300835609436,
0.01051165908575058,
-0.03505552187561989,
0.05706114321947098,
-0.03243599086999893,
0.05200505256652832,
-0.026041753590106964,
-0.07027135789394379,
0.03551024943590164,
-0.00791537668555975,
-0.11296969652175903,
0.07328473776578903,
-0.02083204686641693,
-0.04021044075489044,
-0.015428547747433186,
-0.027878332883119583,
0.06212187930941582,
0.1451011747121811,
0.07066216319799423,
0.023282360285520554,
-0.004392500501126051,
-0.05479928478598595,
0.007580385077744722,
0.026838013902306557,
-0.0356329120695591,
-4.8453049572572127e-8,
0.02772197313606739,
-0.023378847166895866,
-0.02071266621351242,
0.10699502378702164,
0.07135181874036789,
0.04914025589823723,
0.01013163197785616,
0.042116086930036545,
0.007875168696045876,
0.0492965392768383,
0.20374958217144012,
-0.004245446994900703,
-0.0002952690701931715,
0.011312732473015785,
0.00541001046076417,
-0.08136436343193054,
0.020985664799809456,
-0.048624686896800995,
-0.05978982150554657,
-0.019646234810352325,
0.003528136294335127,
-0.0325322188436985,
-0.029360603541135788,
0.00041490703006275,
0.043873731046915054,
-0.003588244318962097,
0.03530803322792053,
0.044560473412275314,
-0.0534089170396328,
-0.03786288946866989,
-0.08600703626871109,
-0.023639172315597534,
0.03243061527609825,
0.0023851855657994747,
-0.1025342270731926,
0.06632909923791885,
-0.048808805644512177,
-0.027165057137608528,
0.03882640227675438,
-0.006213140208274126,
0.005412240978330374,
-0.02056875452399254,
-0.006962620187550783,
-0.019743720069527626,
-0.01394848432391882,
-0.05308559536933899,
-0.031068047508597374,
0.019304979592561722,
0.06560558825731277,
-0.013800010085105896,
-0.036734286695718765,
-0.02684074640274048,
-0.011517009697854519,
0.03996517136693001,
0.0035301754251122475,
0.010116666555404663,
-0.027522968128323555,
-0.07193049043416977,
0.05661793053150177,
0.00035526847932487726,
0.011215916834771633,
-0.034315161406993866,
-0.04134635254740715,
0.004215672612190247
] | 0.017431
|
a [sidecar container](/docs/concepts/cluster-administration/logging#sidecar-container-with-logging-agent) to rotate and ship your logs. ### Configuring a non-privileged user The best practices to allow an application to run as a privileged user inside of a container are a matter of debate. If your organization requires that applications run as a non-privileged user you can use a [SecurityContext](/docs/tasks/configure-pod-container/security-context/) to control the user that the entry point runs as. The `zk` `StatefulSet`'s Pod `template` contains a `SecurityContext`. ```yaml securityContext: runAsUser: 1000 fsGroup: 1000 ``` In the Pods' containers, UID 1000 corresponds to the zookeeper user and GID 1000 corresponds to the zookeeper group. Get the ZooKeeper process information from the `zk-0` Pod. ```shell kubectl exec zk-0 -- ps -elf ``` As the `runAsUser` field of the `securityContext` object is set to 1000, instead of running as root, the ZooKeeper process runs as the zookeeper user. ``` F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S zookeep+ 1 0 0 80 0 - 1127 - 20:46 ? 00:00:00 sh -c zkGenConfig.sh && zkServer.sh start-foreground 0 S zookeep+ 27 1 0 80 0 - 1155556 - 20:46 ? 00:00:19 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE -cp /usr/bin/../build/classes:/usr/bin/../build/lib/\*.jar:/usr/bin/../share/zookeeper/zookeeper-3.4.9.jar:/usr/bin/../share/zookeeper/slf4j-log4j12-1.6.1.jar:/usr/bin/../share/zookeeper/slf4j-api-1.6.1.jar:/usr/bin/../share/zookeeper/netty-3.10.5.Final.jar:/usr/bin/../share/zookeeper/log4j-1.2.16.jar:/usr/bin/../share/zookeeper/jline-0.9.94.jar:/usr/bin/../src/java/lib/\*.jar:/usr/bin/../etc/zookeeper: -Xmx2G -Xms2G -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /usr/bin/../etc/zookeeper/zoo.cfg ``` By default, when the Pod's PersistentVolumes is mounted to the ZooKeeper server's data directory, it is only accessible by the root user. This configuration prevents the ZooKeeper process from writing to its WAL and storing its snapshots. Use the command below to get the file permissions of the ZooKeeper data directory on the `zk-0` Pod. ```shell kubectl exec -ti zk-0 -- ls -ld /var/lib/zookeeper/data ``` Because the `fsGroup` field of the `securityContext` object is set to 1000, the ownership of the Pods' PersistentVolumes is set to the zookeeper group, and the ZooKeeper process is able to read and write its data. ``` drwxr-sr-x 3 zookeeper zookeeper 4096 Dec 5 20:45 /var/lib/zookeeper/data ``` ## Managing the ZooKeeper process The [ZooKeeper documentation](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc\_supervision) mentions that "You will want to have a supervisory process that manages each of your ZooKeeper server processes (JVM)." Utilizing a watchdog (supervisory process) to restart failed processes in a distributed system is a common pattern. When deploying an application in Kubernetes, rather than using an external utility as a supervisory process, you should use Kubernetes as the watchdog for your application. ### Updating the ensemble The `zk` `StatefulSet` is configured to use the `RollingUpdate` update strategy. You can use `kubectl patch` to update the number of `cpus` allocated to the servers. ```shell kubectl patch sts zk --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/resources/requests/cpu", "value":"0.3"}]' ``` ``` statefulset.apps/zk patched ``` Use `kubectl rollout status` to watch the status of the update. ```shell kubectl rollout status sts/zk ``` ``` waiting for statefulset rolling update to complete 0 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... waiting for statefulset rolling update to complete 1 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... waiting for statefulset rolling update to complete 2 pods at revision zk-5db4499664... Waiting for 1 pods to be ready... Waiting for 1 pods to be ready... statefulset rolling update complete 3 pods at revision zk-5db4499664... ``` This terminates the Pods, one at a time, in reverse ordinal order, and recreates them with the new configuration. This ensures that quorum is maintained during a rolling update. Use the `kubectl rollout history` command to view a history or previous configurations. ```shell kubectl rollout history sts/zk ``` The output is similar to this: ``` statefulsets "zk" REVISION 1 2 ``` Use the `kubectl rollout undo`
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.07553110271692276,
0.05054519698023796,
-0.0531432144343853,
-0.011422852985560894,
0.007317689247429371,
-0.05414639413356781,
0.03814534470438957,
0.05178798735141754,
-0.04706653580069542,
0.048268549144268036,
-0.012780207209289074,
-0.051637742668390274,
0.003999398089945316,
0.04590941593050957,
0.012445388361811638,
-0.041198648512363434,
0.11041475087404251,
0.06716799736022949,
-0.02477007918059826,
0.012518076226115227,
-0.046377792954444885,
-0.02183276042342186,
0.03402203321456909,
0.06589820235967636,
-0.14558696746826172,
-0.016103286296129227,
-0.010561740957200527,
-0.050917766988277435,
0.010899599641561508,
0.04633884131908417,
-0.05855100601911545,
-0.019588163122534752,
0.025916852056980133,
0.06774956732988358,
0.03786430135369301,
0.09639200568199158,
0.0811169445514679,
-0.09893127530813217,
-0.08117393404245377,
-0.030699793249368668,
0.026974497362971306,
-0.004679521545767784,
-0.11153784394264221,
0.01638149470090866,
-0.05988892912864685,
-0.05161520838737488,
-0.0407952256500721,
-0.04185894504189491,
-0.014978637918829918,
-0.00033316254848614335,
0.00869997963309288,
-0.006029814016073942,
0.06809376925230026,
0.035998906940221786,
-0.03630070760846138,
0.07072987407445908,
0.012910392135381699,
0.018576396629214287,
0.1310785561800003,
-0.012911664322018623,
0.0012978686718270183,
0.009400508366525173,
0.025321343913674355,
0.0017821750370785594,
0.0023749927058815956,
-0.07578051090240479,
-0.00034377421252429485,
0.030091742053627968,
0.004322481341660023,
0.0005660715978592634,
0.024641629308462143,
-0.032867420464754105,
-0.0059500145725905895,
-0.097406305372715,
-0.02565671317279339,
-0.01397370919585228,
-0.008278761990368366,
-0.017932938411831856,
-0.06476837396621704,
-0.08047409355640411,
0.02309160679578781,
0.036867622286081314,
0.050956953316926956,
0.02277449704706669,
-0.06946788728237152,
0.04479464516043663,
0.0002885652065742761,
-0.006833023391664028,
0.112557552754879,
0.0523078553378582,
0.041337136179208755,
-0.010553242638707161,
0.05681828781962395,
-0.142323836684227,
0.05211185663938522,
-0.040030330419540405,
-0.001029901672154665,
0.06365858763456345,
-0.023774584755301476,
0.01834004744887352,
0.03964932635426521,
-0.009812389500439167,
0.010307582095265388,
-0.008873038925230503,
0.08575963973999023,
0.003300870070233941,
-0.052335500717163086,
-0.06834457069635391,
-0.010643045417964458,
0.08372282236814499,
-0.03969734162092209,
0.058769941329956055,
-0.042455483227968216,
0.05521253123879433,
0.026821445673704147,
0.013628426007926464,
-0.051876943558454514,
-0.020383918657898903,
-0.07065139710903168,
0.07210348546504974,
0.07486031949520111,
-0.07777059823274612,
0.052951712161302567,
0.04849780723452568,
0.03549832105636597,
0.04900318756699562,
-0.033583011478185654,
-1.5461160106107946e-34,
0.03110383450984955,
-0.06758727878332138,
0.03675158694386482,
0.026962867006659508,
0.07373049110174179,
0.036690499633550644,
-0.03354891017079353,
-0.005144743714481592,
-0.07764008641242981,
0.026650384068489075,
-0.05903242155909538,
0.08692250400781631,
0.0057946159504354,
-0.049000829458236694,
0.029070837423205376,
0.021902287378907204,
-0.12867094576358795,
-0.0056464169174432755,
0.08267273753881454,
0.005971378181129694,
0.030485857278108597,
-0.05182258039712906,
-0.08687255531549454,
0.01893788017332554,
0.0541183203458786,
-0.03303760662674904,
-0.01143408939242363,
-0.13926935195922852,
0.039202142506837845,
0.058020710945129395,
0.012932091020047665,
-0.03334422782063484,
-0.0004180564428679645,
0.024413645267486572,
-0.07961495965719223,
-0.04509130120277405,
-0.017861133441329002,
0.013299904763698578,
-0.09705023467540741,
-0.1309148669242859,
0.005271091591566801,
-0.03603212162852287,
0.011686829850077629,
-0.08266688883304596,
0.0383448489010334,
-0.023764101788401604,
0.02864246256649494,
0.04605504870414734,
0.02520846389234066,
0.024079391732811928,
-0.017928794026374817,
-0.00917988270521164,
0.012674895115196705,
-0.08295793831348419,
0.0010954161407426,
-0.046984631568193436,
0.08185339719057083,
-0.044081684201955795,
-0.013839229941368103,
-0.03748839348554611,
-0.060053348541259766,
0.03676149994134903,
-0.02000395581126213,
0.059774573892354965,
-0.0208523441106081,
-0.031978022307157516,
-0.0025510909035801888,
0.01686272583901882,
0.03293789550662041,
0.032639745622873306,
-0.08948175609111786,
0.019480250775814056,
-0.003452084958553314,
0.10985101759433746,
-0.09839075058698654,
-0.040400948375463486,
0.04267960414290428,
0.07032514363527298,
-0.09314561635255814,
0.016204340383410454,
-0.014696733094751835,
-0.045191675424575806,
-0.04590853303670883,
0.06985148042440414,
-0.024312159046530724,
-0.0482332780957222,
-0.05737711489200592,
0.01943163014948368,
-0.039697758853435516,
0.08734060823917389,
0.04129553213715553,
-0.013917164877057076,
0.046297620981931686,
0.01866581290960312,
-0.13697293400764465,
-2.0627652010046274e-33,
-0.006185698788613081,
-0.04772870987653732,
-0.024243809282779694,
-0.029164308682084084,
0.0072258575819432735,
0.006863235961645842,
0.03172619268298149,
-0.0068172262981534,
-0.00838166382163763,
-0.06684005260467529,
-0.08655425161123276,
-0.012193270958960056,
0.06212857365608215,
0.061654895544052124,
-0.05310133472084999,
0.028819646686315536,
-0.06081446260213852,
-0.010109784081578255,
-0.00899672694504261,
-0.03025362826883793,
-0.033318307250738144,
0.004709383938461542,
0.08266939967870712,
0.11338212341070175,
0.03421887382864952,
0.005762720014899969,
0.05382693186402321,
0.011652707122266293,
-0.06385957449674606,
-0.047562386840581894,
0.011767949908971786,
-0.09726213663816452,
-0.014597412198781967,
-0.0385286770761013,
-0.05604138970375061,
-0.08940694481134415,
-0.08529778569936752,
0.05662548169493675,
-0.04383733496069908,
-0.016346272081136703,
0.02662637084722519,
0.028222540393471718,
-0.06602930277585983,
0.005575575865805149,
-0.09460152685642242,
0.060726333409547806,
0.025763124227523804,
-0.030293747782707214,
-0.005894817877560854,
-0.014024595730006695,
-0.04831869900226593,
-0.009069397114217281,
0.060926470905542374,
0.061751995235681534,
-0.014697566628456116,
0.028711671009659767,
0.04730154946446419,
0.014027776196599007,
0.00042550035868771374,
0.05061677470803261,
0.11464231461286545,
-0.025017932057380676,
0.05826530605554581,
0.07029218226671219,
-0.06436850875616074,
-0.09102186560630798,
0.020961031317710876,
0.04927355423569679,
-0.02990979328751564,
0.0225354190915823,
0.09842149913311005,
-0.020366912707686424,
-0.0008970971102826297,
0.057925060391426086,
0.005444137845188379,
0.000056609351304359734,
0.023886092007160187,
-0.14459004998207092,
0.01143859326839447,
-0.01892741583287716,
-0.03417208790779114,
0.0424705445766449,
-0.04068990424275398,
0.042006876319646835,
0.01805034652352333,
-0.03334343805909157,
0.048514705151319504,
0.0832163542509079,
0.07888361811637878,
0.04398633912205696,
-0.030941186472773552,
0.011832894757390022,
-0.0598236545920372,
0.047928087413311005,
-0.0055516911670565605,
-4.524193997212933e-8,
0.007876342162489891,
-0.06850595772266388,
0.01781681925058365,
0.06670928746461868,
0.037193235009908676,
0.019776225090026855,
0.018013570457696915,
0.02679303288459778,
-0.09338577836751938,
0.0028010522946715355,
0.004484513308852911,
0.019388459622859955,
-0.0717436745762825,
-0.004213417414575815,
0.077841617166996,
-0.022815944626927376,
0.027160050347447395,
0.031364623457193375,
-0.03372301533818245,
-0.05697787180542946,
-0.030239613726735115,
-0.045087333768606186,
0.0049715773202478886,
0.025816770270466805,
-0.0260368213057518,
0.032423198223114014,
0.034777913242578506,
-0.017968935891985893,
0.04172559455037117,
-0.012573893181979656,
-0.03235672041773796,
-0.024046210572123528,
-0.02341511845588684,
0.06126004457473755,
-0.06074052304029465,
0.06077907234430313,
-0.09938900917768478,
0.025457212701439857,
-0.0016794580733403563,
-0.038102902472019196,
-0.051236171275377274,
0.02335626818239689,
0.02056856080889702,
-0.018696483224630356,
-0.05143009126186371,
0.034107986837625504,
0.021886564791202545,
0.02406245656311512,
0.08256925642490387,
0.02542000450193882,
-0.015351018868386745,
-0.047959309071302414,
0.02512001246213913,
0.11501425504684448,
0.08108798414468765,
0.054361265152692795,
0.011320065706968307,
-0.0793958306312561,
0.10219424217939377,
-0.0044725798070430756,
-0.009670168161392212,
0.0339084193110466,
-0.009527395479381084,
0.045787181705236435
] | 0.164289
|
the new configuration. This ensures that quorum is maintained during a rolling update. Use the `kubectl rollout history` command to view a history or previous configurations. ```shell kubectl rollout history sts/zk ``` The output is similar to this: ``` statefulsets "zk" REVISION 1 2 ``` Use the `kubectl rollout undo` command to roll back the modification. ```shell kubectl rollout undo sts/zk ``` The output is similar to this: ``` statefulset.apps/zk rolled back ``` ### Handling process failure [Restart Policies](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy) control how Kubernetes handles process failures for the entry point of the container in a Pod. For Pods in a `StatefulSet`, the only appropriate `RestartPolicy` is Always, and this is the default value. For stateful applications you should \*\*never\*\* override the default policy. Use the following command to examine the process tree for the ZooKeeper server running in the `zk-0` Pod. ```shell kubectl exec zk-0 -- ps -ef ``` The command used as the container's entry point has PID 1, and the ZooKeeper process, a child of the entry point, has PID 27. ``` UID PID PPID C STIME TTY TIME CMD zookeep+ 1 0 0 15:03 ? 00:00:00 sh -c zkGenConfig.sh && zkServer.sh start-foreground zookeep+ 27 1 0 15:03 ? 00:00:03 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE -cp /usr/bin/../build/classes:/usr/bin/../build/lib/\*.jar:/usr/bin/../share/zookeeper/zookeeper-3.4.9.jar:/usr/bin/../share/zookeeper/slf4j-log4j12-1.6.1.jar:/usr/bin/../share/zookeeper/slf4j-api-1.6.1.jar:/usr/bin/../share/zookeeper/netty-3.10.5.Final.jar:/usr/bin/../share/zookeeper/log4j-1.2.16.jar:/usr/bin/../share/zookeeper/jline-0.9.94.jar:/usr/bin/../src/java/lib/\*.jar:/usr/bin/../etc/zookeeper: -Xmx2G -Xms2G -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /usr/bin/../etc/zookeeper/zoo.cfg ``` In another terminal watch the Pods in the `zk` `StatefulSet` with the following command. ```shell kubectl get pod -w -l app=zk ``` In another terminal, terminate the ZooKeeper process in Pod `zk-0` with the following command. ```shell kubectl exec zk-0 -- pkill java ``` The termination of the ZooKeeper process caused its parent process to terminate. Because the `RestartPolicy` of the container is Always, it restarted the parent process. ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 21m zk-1 1/1 Running 0 20m zk-2 1/1 Running 0 19m NAME READY STATUS RESTARTS AGE zk-0 0/1 Error 0 29m zk-0 0/1 Running 1 29m zk-0 1/1 Running 1 29m ``` If your application uses a script (such as `zkServer.sh`) to launch the process that implements the application's business logic, the script must terminate with the child process. This ensures that Kubernetes will restart the application's container when the process implementing the application's business logic fails. ### Testing for liveness Configuring your application to restart failed processes is not enough to keep a distributed system healthy. There are scenarios where a system's processes can be both alive and unresponsive, or otherwise unhealthy. You should use liveness probes to notify Kubernetes that your application's processes are unhealthy and it should restart them. The Pod `template` for the `zk` `StatefulSet` specifies a liveness probe. ```yaml livenessProbe: exec: command: - sh - -c - "zookeeper-ready 2181" initialDelaySeconds: 15 timeoutSeconds: 5 ``` The probe calls a bash script that uses the ZooKeeper `ruok` four letter word to test the server's health. ``` OK=$(echo ruok | nc 127.0.0.1 $1) if [ "$OK" == "imok" ]; then exit 0 else exit 1 fi ``` In one terminal window, use the following command to watch the Pods in the `zk` StatefulSet. ```shell kubectl get pod -w -l app=zk ``` In another window, using the following command to delete the `zookeeper-ready` script from the file system of Pod `zk-0`. ```shell kubectl exec zk-0 -- rm /opt/zookeeper/bin/zookeeper-ready ``` When the liveness probe for the ZooKeeper process fails, Kubernetes will automatically restart the process for you, ensuring that unhealthy processes in the ensemble are restarted. ```shell kubectl get pod -w -l app=zk ``` ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.009592501446604729,
0.03651797026395798,
0.03742542490363121,
0.0004634750075638294,
-0.06504105776548386,
-0.02652217261493206,
-0.06752434372901917,
0.0023574591614305973,
0.04217599704861641,
0.08738066256046295,
-0.03478212654590607,
0.02255253493785858,
-0.020250437781214714,
-0.0004074040334671736,
-0.008448970504105091,
-0.006971164606511593,
0.0165707990527153,
0.029621213674545288,
-0.056906651705503464,
-0.009235034696757793,
-0.02496553212404251,
0.016979066655039787,
0.017774205654859543,
0.006906034424901009,
-0.08645708113908768,
0.02113206498324871,
-0.07374812662601471,
0.00026578843244351447,
0.0022533407900482416,
-0.0023150132037699223,
-0.08317270129919052,
0.05677177384495735,
0.018088147044181824,
-0.02017100527882576,
0.08742579817771912,
0.06377672404050827,
0.018622325733304024,
-0.08437086641788483,
-0.010708516463637352,
0.0026022556703537703,
0.04343290999531746,
0.008974890224635601,
-0.08393432199954987,
0.01616404950618744,
-0.012523050419986248,
-0.005702105350792408,
-0.035620082169771194,
-0.08993629366159439,
0.027747826650738716,
-0.0021780149545520544,
-0.004953803028911352,
-0.037225279957056046,
0.007072194945067167,
0.07919573783874512,
0.08559919893741608,
0.12642477452754974,
0.0013290205970406532,
0.05230405926704407,
0.12107522040605545,
-0.009245024994015694,
0.022339437156915665,
0.006065500900149345,
-0.023764243349432945,
-0.004488125443458557,
-0.021183587610721588,
-0.02644059993326664,
0.03194038197398186,
-0.02689218707382679,
0.03672201558947563,
0.03214314952492714,
0.007394846063107252,
-0.044329095631837845,
-0.015145287849009037,
-0.13743934035301208,
-0.08812488615512848,
0.00502048060297966,
0.04826603829860687,
-0.004012629855424166,
-0.05590306967496872,
-0.08426079899072647,
0.03582928702235222,
-0.04778778925538063,
0.018533524125814438,
0.003963892348110676,
-0.07649959623813629,
-0.05478469654917717,
0.008005643263459206,
-0.09472473710775375,
0.05705453082919121,
0.04435352981090546,
0.019705021753907204,
-0.051843367516994476,
0.07942623645067215,
-0.14629250764846802,
-0.01217075064778328,
-0.035073693841695786,
0.029207782819867134,
0.07423637062311172,
0.016003839671611786,
0.020412897691130638,
0.060097407549619675,
-0.03839276731014252,
0.01591300219297409,
-0.01728709042072296,
0.09004273265600204,
-0.048982031643390656,
-0.005335620604455471,
0.01642654649913311,
0.021183954551815987,
0.09476196765899658,
-0.04881623014807701,
0.05607380345463753,
0.006338963285088539,
0.03868774697184563,
0.04009927436709404,
0.08756131678819656,
-0.02285849303007126,
0.048795562237501144,
-0.08376598358154297,
0.08666924387216568,
0.09499593079090118,
-0.07326610386371613,
0.08250725269317627,
-0.03628331422805786,
-0.07869436591863632,
0.048404186964035034,
0.032479386776685715,
2.2329121308143994e-33,
0.06405185163021088,
-0.08538443595170975,
0.0016462820349261165,
-0.028892122209072113,
0.04054414480924606,
-0.027488913387060165,
-0.06834089756011963,
-0.02761133760213852,
0.027139410376548767,
-0.06925923377275467,
0.02029387652873993,
0.08915300667285919,
-0.07915909588336945,
-0.06907638162374496,
-0.04077198728919029,
-0.0506482757627964,
-0.0986807718873024,
0.04019976034760475,
0.054898954927921295,
0.04722157493233681,
0.08777745813131332,
-0.02447071485221386,
-0.0443846620619297,
0.05168014392256737,
0.06771931052207947,
-0.0052865841425955296,
0.04175490513443947,
-0.058981847018003464,
-0.07860639691352844,
0.019314514473080635,
0.023920362815260887,
0.0007236480596475303,
-0.03614966571331024,
-0.011829511262476444,
-0.07385019212961197,
-0.009290341287851334,
-0.006687527522444725,
-0.008895969949662685,
-0.09876403957605362,
-0.1063971295952797,
-0.0369768887758255,
-0.00498790992423892,
-0.0747966468334198,
0.006890419404953718,
0.08738481998443604,
-0.06220301240682602,
0.017123674973845482,
-0.013073781505227089,
0.09604573994874954,
0.002815136918798089,
-0.014685128815472126,
-0.020493827760219574,
0.0314168743789196,
-0.0234450064599514,
-0.04377998039126396,
0.016304990276694298,
0.10624315589666367,
-0.08663097023963928,
-0.048569101840257645,
-0.01904950477182865,
0.0049219257198274136,
-0.027236178517341614,
-0.01652434840798378,
0.0019514637533575296,
0.05037936195731163,
0.08313711732625961,
-0.07029779255390167,
0.06796803325414658,
0.01341438852250576,
-0.012925252318382263,
-0.08304756879806519,
0.05860242247581482,
-0.02281523495912552,
0.03424607217311859,
-0.02688572183251381,
-0.07251226156949997,
-0.013185776770114899,
0.00023242381575983018,
-0.12915347516536713,
-0.013087503612041473,
0.05451678857207298,
-0.008001251146197319,
-0.07892775535583496,
0.008822481147944927,
0.05116216465830803,
-0.01688036136329174,
0.05949356406927109,
0.04706563800573349,
-0.04754754155874252,
0.006896234583109617,
0.04211930185556412,
-0.019782625138759613,
0.0009603690123185515,
0.006805486045777798,
-0.05576934665441513,
-3.771240445433248e-33,
0.03050045110285282,
-0.024641482159495354,
-0.04176666587591171,
0.03810830041766167,
-0.014305595308542252,
-0.03533875569701195,
-0.032153356820344925,
0.11758050322532654,
0.02228175476193428,
-0.08517389744520187,
-0.04880913719534874,
0.0036904721055179834,
0.032358359545469284,
0.029226956889033318,
-0.137515589594841,
-0.007089521270245314,
-0.0691593661904335,
-0.07805757969617844,
-0.0762961134314537,
0.0030731740407645702,
-0.010695946402847767,
-0.06487523019313812,
0.022618403658270836,
0.10858757793903351,
-0.02592894248664379,
0.03463878110051155,
-0.03981691598892212,
0.009845500811934471,
0.0044795069843530655,
-0.0678790956735611,
0.05589837208390236,
-0.05931698903441429,
-0.02093975432217121,
0.06338746100664139,
0.041835661977529526,
-0.06917862594127655,
-0.04197070002555847,
0.0203777514398098,
-0.06042981147766113,
-0.01145672332495451,
0.04179101437330246,
0.08309508115053177,
-0.07986317574977875,
0.03620724752545357,
-0.023506393656134605,
0.0703149065375328,
0.026139482855796814,
0.031078169122338295,
-0.01167283859103918,
-0.07786902785301208,
0.005271433386951685,
-0.04001380130648613,
-0.061359964311122894,
0.08247482776641846,
0.00564868887886405,
0.06745010614395142,
0.028289183974266052,
0.04351460188627243,
-0.05438420549035072,
0.028338974341750145,
0.03615666180849075,
-0.0004809476376976818,
0.03920745104551315,
0.051841069012880325,
-0.00415731780230999,
-0.025450069457292557,
0.04323820024728775,
0.04547109082341194,
-0.006796032655984163,
0.02280315011739731,
0.021141931414604187,
0.031209122389554977,
-0.03219445422291756,
-0.03330889716744423,
0.047226570546627045,
0.010933654382824898,
-0.049497395753860474,
-0.1307496577501297,
0.0003538761520758271,
0.00394156901165843,
-0.0852370485663414,
0.03330216929316521,
-0.04126004874706268,
0.03802662715315819,
-0.0035841353237628937,
0.007555180694907904,
0.03128786385059357,
0.10332848876714706,
0.06737829744815826,
0.072035051882267,
-0.06816643476486206,
-0.006006922572851181,
-0.052762020379304886,
0.09494799375534058,
-0.06378109008073807,
-5.0716607802314684e-8,
0.0004829871468245983,
-0.010113527998328209,
-0.012397968210279942,
0.11694001406431198,
0.1471935361623764,
-0.015448628924787045,
-0.004969768691807985,
0.017327426001429558,
-0.02377118170261383,
-0.04978283867239952,
-0.025210833176970482,
0.10806126147508621,
-0.0900040939450264,
0.005158950109034777,
0.008342537097632885,
0.0007369275554083288,
0.056807518005371094,
0.03268810361623764,
0.018548479303717613,
-0.008217237889766693,
-0.0628177598118782,
-0.07103882730007172,
-0.010811038315296173,
0.05381270870566368,
0.008934993296861649,
0.04864851012825966,
0.006792011670768261,
0.033067189157009125,
-0.010832138359546661,
-0.006767334882169962,
0.026368243619799614,
0.0005779113271273673,
0.04410014674067497,
0.04022401198744774,
-0.07842082530260086,
0.0411163829267025,
-0.026385296136140823,
0.009500563144683838,
0.07507900148630142,
0.016777023673057556,
-0.017646549269557,
-0.004394161980599165,
-0.027391718700528145,
0.02770150825381279,
-0.06584557145833969,
-0.006025134585797787,
-0.011603087186813354,
0.046237677335739136,
-0.025136595591902733,
-0.06084447354078293,
-0.07521849125623703,
-0.046600788831710815,
-0.017803004011511803,
0.05063284933567047,
0.023417750373482704,
0.0646345466375351,
0.03836947679519653,
0.003205344080924988,
0.04195583239197731,
0.028698286041617393,
-0.020118677988648415,
-0.04216216877102852,
0.018666623160243034,
0.0022300994023680687
] | 0.136432
|
fails, Kubernetes will automatically restart the process for you, ensuring that unhealthy processes in the ensemble are restarted. ```shell kubectl get pod -w -l app=zk ``` ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 0/1 Running 0 1h zk-0 0/1 Running 1 1h zk-0 1/1 Running 1 1h ``` ### Testing for readiness Readiness is not the same as liveness. If a process is alive, it is scheduled and healthy. If a process is ready, it is able to process input. Liveness is a necessary, but not sufficient, condition for readiness. There are cases, particularly during initialization and termination, when a process can be alive but not ready. If you specify a readiness probe, Kubernetes will ensure that your application's processes will not receive network traffic until their readiness checks pass. For a ZooKeeper server, liveness implies readiness. Therefore, the readiness probe from the `zookeeper.yaml` manifest is identical to the liveness probe. ```yaml readinessProbe: exec: command: - sh - -c - "zookeeper-ready 2181" initialDelaySeconds: 15 timeoutSeconds: 5 ``` Even though the liveness and readiness probes are identical, it is important to specify both. This ensures that only healthy servers in the ZooKeeper ensemble receive network traffic. ## Tolerating Node failure ZooKeeper needs a quorum of servers to successfully commit mutations to data. For a three server ensemble, two servers must be healthy for writes to succeed. In quorum based systems, members are deployed across failure domains to ensure availability. To avoid an outage, due to the loss of an individual machine, best practices preclude co-locating multiple instances of the application on the same machine. By default, Kubernetes may co-locate Pods in a `StatefulSet` on the same node. For the three server ensemble you created, if two servers are on the same node, and that node fails, the clients of your ZooKeeper service will experience an outage until at least one of the Pods can be rescheduled. You should always provision additional capacity to allow the processes of critical systems to be rescheduled in the event of node failures. If you do so, then the outage will only last until the Kubernetes scheduler reschedules one of the ZooKeeper servers. However, if you want your service to tolerate node failures with no downtime, you should set `podAntiAffinity`. Use the command below to get the nodes for Pods in the `zk` `StatefulSet`. ```shell for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo ""; done ``` All of the Pods in the `zk` `StatefulSet` are deployed on different nodes. ``` kubernetes-node-cxpk kubernetes-node-a5aq kubernetes-node-2g2d ``` This is because the Pods in the `zk` `StatefulSet` have a `PodAntiAffinity` specified. ```yaml affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: "app" operator: In values: - zk topologyKey: "kubernetes.io/hostname" ``` The `requiredDuringSchedulingIgnoredDuringExecution` field tells the Kubernetes Scheduler that it should never co-locate two Pods which have `app` label as `zk` in the domain defined by the `topologyKey`. The `topologyKey` `kubernetes.io/hostname` indicates that the domain is an individual node. Using different rules, labels, and selectors, you can extend this technique to spread your ensemble across physical, network, and power failure domains. ## Surviving maintenance In this section you will cordon and drain nodes. If you are using this tutorial on a shared cluster, be sure that this will not adversely affect other tenants. The previous section showed you how to spread your Pods across nodes to survive unplanned node failures, but you also need to plan for temporary node failures that occur due to planned maintenance.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.013891023583710194,
-0.013928364031016827,
0.005988355726003647,
0.016133662313222885,
0.047600239515304565,
-0.044756557792425156,
-0.0175468809902668,
-0.017969632521271706,
0.05400196090340614,
0.09050146490335464,
-0.0756433829665184,
-0.025625336915254593,
0.010523475706577301,
0.018248727545142174,
-0.014214562252163887,
-0.02104020304977894,
0.09756246954202652,
-0.06677424907684326,
-0.06089779734611511,
0.03959343209862709,
-0.05531636252999306,
-0.01121104322373867,
0.03319014608860016,
-0.026429124176502228,
-0.14439691603183746,
-0.027212781831622124,
-0.10438446700572968,
-0.05611309036612511,
0.01385626569390297,
0.03090997226536274,
-0.0860547348856926,
0.006156742572784424,
-0.01930866576731205,
-0.0038664788007736206,
0.06149696558713913,
0.11064386367797852,
0.051659781485795975,
-0.04762661084532738,
-0.08547212928533554,
0.07149703055620193,
0.06028617545962334,
-0.08554207533597946,
-0.08565700799226761,
0.004354796838015318,
-0.006446414161473513,
0.0009201020584441721,
-0.04834611713886261,
-0.08578893542289734,
0.0036716179456561804,
-0.05174834281206131,
-0.05641778185963631,
-0.0632731020450592,
0.03463173285126686,
0.07721193134784698,
0.07925338298082352,
0.07398410141468048,
-0.03544345125555992,
-0.01684539020061493,
0.07132333517074585,
-0.008746172301471233,
0.022775404155254364,
-0.006670698057860136,
0.025240721181035042,
-0.02575753442943096,
0.0641416385769844,
-0.01099823322147131,
0.05470186471939087,
-0.018818814307451248,
0.05498601496219635,
-0.009818951599299908,
0.012924058362841606,
-0.009303415194153786,
-0.029383184388279915,
-0.043454401195049286,
-0.060268763452768326,
0.03535757586359978,
0.03582819551229477,
-0.010923415422439575,
0.0013732881052419543,
-0.09445006400346756,
-0.008682524785399437,
0.01808657869696617,
-0.015084254555404186,
-0.03511651232838631,
-0.08715829998254776,
0.008531957864761353,
-0.010121989995241165,
-0.008271589875221252,
0.04100778326392174,
0.01822802796959877,
0.024758685380220413,
0.04908085614442825,
-0.027060264721512794,
-0.0719001442193985,
0.05520591139793396,
-0.0031651698518544436,
0.05615893751382828,
0.03764614835381508,
0.03384751081466675,
-0.013369652442634106,
0.04598415642976761,
-0.03597012534737587,
0.03656540811061859,
-0.023955628275871277,
0.05860333889722824,
-0.052730172872543335,
-0.023732535541057587,
-0.0053987461142241955,
0.017257438972592354,
0.06695351749658585,
-0.04461599886417389,
-0.037823427468538284,
0.08537193387746811,
0.06352890282869339,
0.03254498913884163,
0.05539955943822861,
-0.058788590133190155,
-0.0009883292950689793,
-0.008368386887013912,
0.10515861213207245,
0.08863932639360428,
-0.07771465927362442,
0.06039892137050629,
-0.038552504032850266,
0.00281337508931756,
0.0559125617146492,
0.04681006073951721,
4.5147351121985756e-33,
0.045248694717884064,
-0.10912181437015533,
0.010288285091519356,
0.02955431304872036,
0.0033159106969833374,
-0.09196817874908447,
-0.024078093469142914,
0.0015963321784511209,
-0.006553319748491049,
-0.018632035702466965,
-0.06612163037061691,
0.04283209890127182,
-0.04212869331240654,
-0.09196528047323227,
0.012397721409797668,
0.0321364551782608,
-0.05204734578728676,
-0.03631248697638512,
0.04772484302520752,
0.039298128336668015,
0.08792579919099808,
-0.12267491966485977,
-0.05039585754275322,
0.02319488674402237,
0.08052796870470047,
-0.09438920766115189,
0.004224428907036781,
-0.024989305064082146,
-0.07271138578653336,
0.025640549138188362,
0.01437473762780428,
-0.07416757196187973,
-0.05138834938406944,
-0.04559946432709694,
-0.13921968638896942,
-0.0667535662651062,
-0.0867723599076271,
0.03551950305700302,
-0.06250344961881638,
-0.13402685523033142,
-0.050970450043678284,
-0.03808403015136719,
-0.043619878590106964,
0.0350063294172287,
0.09614507853984833,
-0.027423173189163208,
0.01832425594329834,
-0.009860002435743809,
0.007462230045348406,
0.015808546915650368,
0.03037392720580101,
-0.025374172255396843,
0.008653040044009686,
-0.041972193866968155,
-0.07639344781637192,
0.12223738431930542,
0.10565080493688583,
-0.04750024154782295,
-0.1072545051574707,
-0.021230898797512054,
-0.06000438332557678,
-0.02980734035372734,
-0.06426388770341873,
0.00981698464602232,
0.08653184771537781,
0.031219113618135452,
-0.003612564178183675,
-0.009832620620727539,
-0.026188936084508896,
-0.0034751498606055975,
-0.049455687403678894,
-0.0204592477530241,
-0.04086652770638466,
-0.01988409273326397,
0.010122900828719139,
-0.07032748311758041,
0.023693252354860306,
-0.027696480974555016,
-0.07825125753879547,
0.02026018314063549,
0.10231438279151917,
-0.008027659729123116,
-0.07163339108228683,
0.04407883062958717,
-0.021761519834399223,
-0.019594531506299973,
0.013855873607099056,
0.01134401373565197,
-0.06778451800346375,
0.04075968638062477,
0.04620326682925224,
-0.0003286084393039346,
0.02583991177380085,
0.01519288495182991,
-0.05595126003026962,
-5.036002204598965e-33,
0.05956566333770752,
-0.032600872218608856,
-0.004078699741512537,
0.05380358546972275,
0.01806926541030407,
0.015571970492601395,
-0.036883264780044556,
0.013589038513600826,
-0.0011396718909963965,
-0.08008434623479843,
0.03543317690491676,
-0.04600801318883896,
-0.022926131263375282,
0.05517854914069176,
-0.09726607799530029,
-0.04643639177083969,
-0.05775489658117294,
-0.01631210930645466,
0.030316345393657684,
0.05099181458353996,
0.018257848918437958,
-0.021463224664330482,
-0.011398916132748127,
0.022103741765022278,
-0.05171671509742737,
0.060385797172784805,
-0.027029212564229965,
0.04269300401210785,
-0.027113374322652817,
0.006646315101534128,
0.09836851805448532,
-0.07110945880413055,
0.01310651283711195,
0.11767645925283432,
0.05388997867703438,
-0.049681406468153,
0.0056969644501805305,
-0.056261155754327774,
-0.0071296170353889465,
0.00889513362199068,
0.07855391502380371,
0.08840744942426682,
-0.03121127188205719,
-0.007157337851822376,
-0.05819659307599068,
0.044679298996925354,
0.046512238681316376,
-0.017636047676205635,
-0.021582165732979774,
-0.09784102439880371,
0.037342619150877,
0.03551751375198364,
-0.04734894260764122,
0.10712353140115738,
0.000894509139470756,
0.09762051701545715,
-0.03311319649219513,
0.03794179484248161,
-0.05515916645526886,
-0.0045307050459086895,
0.05598527565598488,
-0.05385700985789299,
0.0822654440999031,
0.07773000746965408,
-0.03922796994447708,
-0.03481205925345421,
0.05567710101604462,
0.08523514121770859,
0.054952461272478104,
0.019368015229701996,
0.1303451955318451,
0.04301421344280243,
-0.02945413440465927,
-0.006900099106132984,
0.004811502527445555,
0.0023158867843449116,
-0.0237588994204998,
-0.0680527538061142,
-0.005717002786695957,
-0.006156709045171738,
-0.09216146916151047,
0.0864381417632103,
-0.09228333085775375,
0.051947928965091705,
0.03261231631040573,
0.03226363658905029,
0.06857430189847946,
0.07020223885774612,
0.08274585008621216,
0.021318942308425903,
0.022426549345254898,
0.008488072082400322,
-0.034663353115320206,
0.0622548907995224,
-0.0644836574792862,
-4.9812619806743896e-8,
0.0482439361512661,
-0.01053645834326744,
-0.02314354106783867,
0.06876955181360245,
0.06166013330221176,
-0.010926584713160992,
0.03128938004374504,
-0.11520636081695557,
-0.027323635295033455,
0.0891970545053482,
-0.005683852359652519,
0.07490644603967667,
-0.054822102189064026,
0.012759757228195667,
0.05984792485833168,
-0.00830869097262621,
-0.0013498610351234674,
0.0038410464767366648,
-0.000757747155148536,
-0.025486571714282036,
-0.01663868874311447,
-0.05067022144794464,
0.009276961907744408,
0.0215223990380764,
0.013950983993709087,
0.030657557770609856,
0.08725608140230179,
0.020215043798089027,
-0.025767739862203598,
0.031082287430763245,
-0.040953755378723145,
-0.01898680068552494,
-0.009212078526616096,
0.056649934500455856,
-0.0005209908122196794,
0.08377760648727417,
-0.04984729364514351,
0.0014402156230062246,
0.05192731320858002,
0.016487089917063713,
-0.017759082838892937,
0.0527268648147583,
-0.027945179492235184,
-0.010116085410118103,
0.0048290123231709,
-0.0016706353053450584,
-0.021097203716635704,
0.030667619779706,
-0.00962511170655489,
-0.08265607059001923,
-0.03462723270058632,
-0.04910697788000107,
-0.059737976640462875,
0.023090429604053497,
-0.014894338324666023,
0.026643866673111916,
-0.00016995215264614671,
-0.00719275651499629,
0.023432796820998192,
0.023066429421305656,
0.045940227806568146,
0.04088820144534111,
-0.006739348638802767,
-0.03394335135817528
] | 0.101481
|
using this tutorial on a shared cluster, be sure that this will not adversely affect other tenants. The previous section showed you how to spread your Pods across nodes to survive unplanned node failures, but you also need to plan for temporary node failures that occur due to planned maintenance. Use this command to get the nodes in your cluster. ```shell kubectl get nodes ``` This tutorial assumes a cluster with at least four nodes. If the cluster has more than four, use [`kubectl cordon`](/docs/reference/generated/kubectl/kubectl-commands/#cordon) to cordon all but four nodes. Constraining to four nodes will ensure Kubernetes encounters affinity and PodDisruptionBudget constraints when scheduling zookeeper Pods in the following maintenance simulation. ```shell kubectl cordon ``` Use this command to get the `zk-pdb` `PodDisruptionBudget`. ```shell kubectl get pdb zk-pdb ``` The `max-unavailable` field indicates to Kubernetes that at most one Pod from `zk` `StatefulSet` can be unavailable at any time. ``` NAME MIN-AVAILABLE MAX-UNAVAILABLE ALLOWED-DISRUPTIONS AGE zk-pdb N/A 1 1 ``` In one terminal, use this command to watch the Pods in the `zk` `StatefulSet`. ```shell kubectl get pods -w -l app=zk ``` In another terminal, use this command to get the nodes that the Pods are currently scheduled on. ```shell for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo ""; done ``` The output is similar to this: ``` kubernetes-node-pb41 kubernetes-node-ixsl kubernetes-node-i4c4 ``` Use [`kubectl drain`](/docs/reference/generated/kubectl/kubectl-commands/#drain) to cordon and drain the node on which the `zk-0` Pod is scheduled. ```shell kubectl drain $(kubectl get pod zk-0 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` The output is similar to this: ``` node "kubernetes-node-pb41" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-pb41, kube-proxy-kubernetes-node-pb41; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-o5elz pod "zk-0" deleted node "kubernetes-node-pb41" drained ``` As there are four nodes in your cluster, `kubectl drain`, succeeds and the `zk-0` is rescheduled to another node. ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m ``` Keep watching the `StatefulSet`'s Pods in the first terminal and drain the node on which `zk-1` is scheduled. ```shell kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` The output is similar to this: ``` "kubernetes-node-ixsl" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-ixsl, kube-proxy-kubernetes-node-ixsl; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-voc74 pod "zk-1" deleted node "kubernetes-node-ixsl" drained ``` The `zk-1` Pod cannot be scheduled because the `zk` `StatefulSet` contains a `PodAntiAffinity` rule preventing co-location of the Pods, and as only two nodes are schedulable, the Pod will remain in a Pending state. ```shell kubectl get pods -w -l app=zk ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m zk-1 1/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s ``` Continue to watch
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.023040421307086945,
-0.007929760962724686,
0.0011138624977320433,
-0.014024477452039719,
-0.025768663734197617,
-0.04109446331858635,
-0.06054485961794853,
0.007852420210838318,
-0.046021465212106705,
0.044041648507118225,
0.018353089690208435,
-0.04599503427743912,
0.007539759855717421,
-0.0021991461981087923,
-0.002311654621735215,
0.041322629898786545,
0.0036941098514944315,
0.04108439385890961,
-0.061975717544555664,
-0.05193702131509781,
-0.048178769648075104,
-0.021691439673304558,
0.009157144464552402,
-0.016044868156313896,
-0.09578708559274673,
-0.024980593472719193,
-0.04707467928528786,
-0.06530479341745377,
0.03967182710766792,
0.02098233252763748,
0.02124868892133236,
0.00885114073753357,
0.01658669114112854,
0.05944889411330223,
0.08030436187982559,
0.08428062498569489,
0.0045784711837768555,
-0.09310770034790039,
-0.04703199490904808,
0.06756459176540375,
0.10637162625789642,
0.00242284731939435,
-0.05957049876451492,
-0.04694284871220589,
-0.03851250931620598,
-0.04964470490813255,
-0.10355087369680405,
-0.011638940311968327,
0.04908725246787071,
-0.05294875055551529,
0.043886225670576096,
-0.04485885053873062,
0.032912079244852066,
0.11288846284151077,
0.014162504114210606,
0.07274628430604935,
-0.04802127182483673,
0.031133420765399933,
0.10068964958190918,
-0.006622557993978262,
0.12099449336528778,
0.009125692769885063,
0.02840440906584263,
-0.020800063386559486,
0.006886620074510574,
0.011495393700897694,
0.03738021478056908,
0.04648284241557121,
-0.012728224508464336,
0.05221809446811676,
0.05580363795161247,
-0.05128315091133118,
-0.0433507040143013,
-0.023722581565380096,
-0.027434678748250008,
0.09068460017442703,
0.07087107747793198,
-0.0015600925544276834,
-0.023905562236905098,
-0.025765519589185715,
-0.05343108996748924,
0.0186475720256567,
0.04083353653550148,
-0.026912979781627655,
-0.11996380239725113,
-0.01460085529834032,
-0.05910664424300194,
-0.04162975400686264,
-0.0037941790651530027,
-0.0015746976714581251,
0.07076125591993332,
0.025029772892594337,
-0.008030992932617664,
-0.09146881103515625,
-0.009064754471182823,
-0.0010053416481241584,
-0.01766463927924633,
-0.042902927845716476,
0.014201616868376732,
-0.012281788513064384,
0.04370535910129547,
-0.03834864869713783,
0.023260246962308884,
-0.03543809428811073,
0.038901373744010925,
-0.02334381453692913,
-0.05365873873233795,
-0.07630978524684906,
-0.0033233389258384705,
0.08285617083311081,
-0.03521149605512619,
0.10190469026565552,
-0.008473983965814114,
0.01196097768843174,
-0.010522343218326569,
0.07871881872415543,
-0.003830281551927328,
-0.025438707321882248,
0.03849908709526062,
0.08669872581958771,
0.005310805048793554,
-0.05789889767765999,
0.06852755695581436,
-0.024984829127788544,
0.005036425311118364,
0.025268597528338432,
0.010663921944797039,
5.129876081429679e-33,
0.03342711180448532,
-0.09769909828901291,
0.04646466299891472,
-0.03394966199994087,
0.02266787551343441,
-0.0239258985966444,
-0.06346242874860764,
-0.0013343472965061665,
-0.06684805452823639,
-0.0999189242720604,
-0.045527368783950806,
-0.008277134969830513,
-0.016168998554348946,
-0.0781664177775383,
-0.031037375330924988,
-0.06831549853086472,
-0.0024503504391759634,
-0.00789177417755127,
0.0655946359038353,
0.015093335881829262,
0.05914772301912308,
-0.08036230504512787,
-0.04536634311079979,
0.04980768263339996,
0.02934287115931511,
-0.0651976615190506,
0.039723191410303116,
-0.11172936111688614,
0.0008560553542338312,
0.044210292398929596,
-0.06468591839075089,
0.004699768964201212,
0.01555913221091032,
0.04240237921476364,
-0.17192499339580536,
0.05137910321354866,
-0.0544845312833786,
0.02787473425269127,
-0.09148234128952026,
-0.08982054144144058,
-0.01778111606836319,
-0.051136646419763565,
0.027052439749240875,
-0.0633709579706192,
0.13356877863407135,
0.00687639182433486,
0.08406265825033188,
-0.06784701347351074,
-0.02485809475183487,
0.027911415323615074,
-0.05799584090709686,
-0.026280317455530167,
0.041327234357595444,
0.007593528833240271,
0.05872835963964462,
0.0021161010954529047,
0.0739724189043045,
-0.07244043052196503,
0.03839151933789253,
-0.0038871411234140396,
-0.02446237951517105,
-0.04234853759407997,
-0.04820097237825394,
0.04383017122745514,
0.0461694672703743,
0.06295397132635117,
-0.0521930530667305,
0.07248838245868683,
0.0063799223862588406,
0.05389765650033951,
-0.07244694977998734,
0.06415850669145584,
-0.013933118432760239,
-0.02513185143470764,
-0.05932723730802536,
-0.037478089332580566,
0.012538888491690159,
0.015909317880868912,
-0.07478027790784836,
0.022090371698141098,
-0.05768450349569321,
0.024283522740006447,
-0.027315638959407806,
0.07894833385944366,
0.05798611789941788,
-0.005477466620504856,
0.08114583045244217,
0.05255194380879402,
-0.08488515764474869,
0.05055844038724899,
0.08466506004333496,
0.0012515009148046374,
0.004697284195572138,
-0.04006962105631828,
-0.03234148398041725,
-4.83331428508057e-33,
0.020402496680617332,
0.052870914340019226,
0.0163333248347044,
0.0002510781050659716,
0.03545020520687103,
0.00405168579891324,
-0.042953476309776306,
0.019461914896965027,
-0.02398277260363102,
-0.06092964485287666,
-0.08434751629829407,
-0.04227496311068535,
0.019680719822645187,
-0.02078251913189888,
-0.10234426707029343,
0.05251583456993103,
-0.07394402474164963,
-0.10194525122642517,
0.025027304887771606,
0.03097926639020443,
0.005509435664862394,
-0.04046010971069336,
0.00169741315767169,
0.022685067728161812,
0.0231203380972147,
0.025947775691747665,
0.014007258228957653,
0.01853203773498535,
-0.01662338338792324,
-0.022932138293981552,
0.010924316942691803,
-0.08576876670122147,
-0.025912554934620857,
0.091611847281456,
0.06663430482149124,
-0.04969256743788719,
-0.07207316160202026,
0.0836503803730011,
0.03505755215883255,
-0.04630761221051216,
0.002080388367176056,
0.00006027438212186098,
-0.11916462332010269,
-0.013504181057214737,
-0.018619440495967865,
0.05244841426610947,
0.01560442429035902,
-0.03717954456806183,
-0.08700129389762878,
-0.027561459690332413,
-0.035683758556842804,
0.006182442419230938,
-0.050594624131917953,
0.1276240199804306,
-0.008768614381551743,
0.03770053759217262,
0.005429140292108059,
0.08909063786268234,
-0.060148585587739944,
-0.0030515682883560658,
0.007824060507118702,
-0.08926217257976532,
0.048439398407936096,
0.06275542825460434,
-0.019639046862721443,
-0.080529123544693,
0.03079625591635704,
0.056751418858766556,
-0.05036818981170654,
0.03641578555107117,
0.0491669625043869,
0.11931335180997849,
0.04813158139586449,
-0.01799730584025383,
0.0009554763091728091,
0.04156827926635742,
-0.0203004851937294,
-0.04915918409824371,
0.014493467286229134,
0.020164374262094498,
-0.13585568964481354,
0.10342111438512802,
-0.029165277257561684,
0.003217747202143073,
0.002192082814872265,
0.0006797269452363253,
0.13603118062019348,
0.12207968533039093,
0.07569290697574615,
0.06545624136924744,
-0.029903622344136238,
0.03302571922540665,
-0.000985645456239581,
0.06353580951690674,
-0.015426605939865112,
-4.916245188724133e-8,
-0.0019792283419519663,
0.01294746808707714,
-0.07386348396539688,
0.031120961531996727,
0.09624235332012177,
-0.05919966474175453,
0.055189795792102814,
0.04900004714727402,
-0.05347630754113197,
0.06952666491270065,
0.0677492618560791,
0.04017031192779541,
-0.06088146194815636,
0.041485127061605453,
0.03131769597530365,
-0.009416391141712666,
0.022968566045165062,
-0.03254031017422676,
0.009637346491217613,
-0.0031428495422005653,
-0.05029167979955673,
-0.039524778723716736,
0.00873052328824997,
0.0315588004887104,
-0.010855978354811668,
0.06315381079912186,
0.030608011409640312,
-0.005080461036413908,
0.016605518758296967,
0.005496911704540253,
-0.05323639139533043,
-0.0397464856505394,
-0.06038779020309448,
0.02935808151960373,
-0.04887724667787552,
0.03099234588444233,
-0.09190540015697479,
0.011378911323845387,
0.03416092321276665,
0.0897560864686966,
0.036580272018909454,
-0.04522053897380829,
-0.029930533841252327,
0.01703679747879505,
0.0147679029032588,
0.021232575178146362,
-0.005412235390394926,
0.0508376769721508,
0.02346702106297016,
0.010378989391028881,
-0.06409918516874313,
-0.02957763336598873,
-0.017433825880289078,
0.0420350506901741,
0.02075943723320961,
0.0011582712177187204,
-0.03951010853052139,
0.002002306282520294,
0.05932207033038139,
-0.0106535404920578,
-0.06561192870140076,
0.016338631510734558,
-0.039727404713630676,
0.017808454111218452
] | 0.062258
|
0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m zk-1 1/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s ``` Continue to watch the Pods of the StatefulSet, and drain the node on which `zk-2` is scheduled. ```shell kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` The output is similar to this: ``` node "kubernetes-node-i4c4" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog WARNING: Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog; Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4 There are pending pods when an error occurred: Cannot evict pod as it would violate the pod's disruption budget. pod/zk-2 ``` Use `CTRL-C` to terminate kubectl. You cannot drain the third node because evicting `zk-2` would violate `zk-budget`. However, the node will remain cordoned. Use `zkCli.sh` to retrieve the value you entered during the sanity test from `zk-0`. ```shell kubectl exec zk-0 zkCli.sh get /hello ``` The service is still available because its `PodDisruptionBudget` is respected. ``` WatchedEvent state:SyncConnected type:None path:null world cZxid = 0x200000002 ctime = Wed Dec 07 00:08:59 UTC 2016 mZxid = 0x200000002 mtime = Wed Dec 07 00:08:59 UTC 2016 pZxid = 0x200000002 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 5 numChildren = 0 ``` Use [`kubectl uncordon`](/docs/reference/generated/kubectl/kubectl-commands/#uncordon) to uncordon the first node. ```shell kubectl uncordon kubernetes-node-pb41 ``` The output is similar to this: ``` node "kubernetes-node-pb41" uncordoned ``` `zk-1` is rescheduled on this node. Wait until `zk-1` is Running and Ready. ```shell kubectl get pods -w -l app=zk ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h zk-1 1/1 Running 0 1h zk-2 1/1 Running 0 1h NAME READY STATUS RESTARTS AGE zk-0 1/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Terminating 2 2h zk-0 0/1 Pending 0 0s zk-0 0/1 Pending 0 0s zk-0 0/1 ContainerCreating 0 0s zk-0 0/1 Running 0 51s zk-0 1/1 Running 0 1m zk-1 1/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Terminating 0 2h zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 12m zk-1 0/1 ContainerCreating 0 12m zk-1 0/1 Running 0 13m zk-1 1/1 Running 0 13m ``` Attempt to drain the node on which `zk-2` is scheduled. ```shell kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` The output is similar to this: ``` node "kubernetes-node-i4c4" already cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-i4c4, kube-proxy-kubernetes-node-i4c4; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-dyrog pod "heapster-v1.2.0-2604621511-wht1r" deleted pod "zk-2" deleted node "kubernetes-node-i4c4" drained ``` This time `kubectl drain` succeeds. Uncordon the second node to allow `zk-2` to be rescheduled. ```shell kubectl uncordon kubernetes-node-ixsl ``` The output is similar to this: ``` node "kubernetes-node-ixsl" uncordoned ``` You can use `kubectl drain` in conjunction with `PodDisruptionBudgets` to ensure that your services remain available during maintenance. If drain is used to cordon nodes and evict pods prior to taking the node offline for maintenance, services that express a disruption budget will have that budget respected. You should always allocate additional capacity for critical services so that their Pods can be immediately rescheduled. ## {{% heading "cleanup" %}} - Use `kubectl uncordon` to uncordon all the nodes in your cluster. - You must delete the persistent storage
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.016380546614527702,
0.09397157281637192,
0.011197400279343128,
0.04428362101316452,
0.04008648917078972,
-0.058478713035583496,
0.016860952600836754,
-0.04217299073934555,
0.1143215075135231,
0.05154277756810188,
-0.03444384038448334,
-0.04596902057528496,
-0.0003749796887859702,
-0.019655074924230576,
-0.0697760209441185,
-0.002898175036534667,
0.006632847245782614,
-0.024714384227991104,
-0.03664664924144745,
-0.019970925524830818,
0.0192729439586401,
0.04395819082856178,
0.026635147631168365,
0.02204071916639805,
-0.017846599221229553,
0.011144937947392464,
-0.044021859765052795,
-0.021618805825710297,
0.016994748264551163,
-0.003509453497827053,
-0.033830348402261734,
0.031206918880343437,
0.017434583976864815,
-0.026056328788399696,
0.10094700008630753,
0.08578226715326309,
-0.009409172460436821,
-0.09580157697200775,
-0.06288213282823563,
-0.02698511630296707,
0.1507338136434555,
-0.012617303989827633,
-0.0977276936173439,
-0.013179514557123184,
-0.012590411119163036,
0.08308428525924683,
-0.1404450535774231,
-0.10171885788440704,
-0.043794725090265274,
-0.04589350149035454,
-0.006957122124731541,
-0.056653667241334915,
0.0357685424387455,
0.10022543370723724,
0.07571879774332047,
0.07136084884405136,
-0.014951851218938828,
0.031039534136652946,
0.08404135704040527,
0.054887060075998306,
0.032243695110082626,
-0.0033309615682810545,
-0.003432893194258213,
-0.029301615431904793,
0.05649133399128914,
-0.01014425978064537,
-0.0318930558860302,
-0.010223601013422012,
0.01604527235031128,
0.023001566529273987,
-0.01663139835000038,
-0.013327539898455143,
0.0269390307366848,
-0.03148072585463524,
-0.06707886606454849,
-0.0063888803124427795,
0.05105099454522133,
-0.0003374090592842549,
-0.0753115713596344,
-0.04031265899538994,
-0.06609571725130081,
-0.03397181257605553,
0.037184808403253555,
-0.021931616589426994,
-0.11287682503461838,
0.05336109921336174,
-0.04660103842616081,
-0.06390172243118286,
0.04826511815190315,
0.03342672809958458,
-0.00895514152944088,
0.04471278190612793,
0.029517291113734245,
-0.08422787487506866,
0.021382341161370277,
-0.02223251201212406,
0.021059948951005936,
0.06482255458831787,
-0.009677684865891933,
0.06443285942077637,
0.04063013568520546,
0.020018989220261574,
0.018184559419751167,
-0.02735198102891445,
0.05313088744878769,
-0.03083435818552971,
-0.06336952745914459,
-0.0018829406471922994,
-0.04861597716808319,
0.04952272027730942,
-0.036652810871601105,
-0.004120685625821352,
0.006940542720258236,
0.07860944420099258,
0.024977291002869606,
0.07891977578401566,
0.017021074891090393,
0.05089806020259857,
-0.006721872370690107,
0.07472415268421173,
0.062395691871643066,
-0.10298919677734375,
-0.00761265167966485,
0.01187840849161148,
-0.061244502663612366,
0.08907059580087662,
0.06650372594594955,
7.427196486461508e-33,
0.031255386769771576,
-0.1100308746099472,
0.008190428838133812,
-0.04984848201274872,
0.058461859822273254,
-0.0019545971881598234,
-0.023840907961130142,
0.020129097625613213,
-0.007870852015912533,
-0.008745075203478336,
-0.08176026493310928,
0.010130360722541809,
-0.052652496844530106,
-0.04351543262600899,
-0.05562376230955124,
-0.09508202970027924,
0.012148493900895119,
0.02825053222477436,
0.03727588802576065,
-0.029686614871025085,
0.12677563726902008,
-0.02188039943575859,
-0.08251719176769257,
-0.026813024654984474,
0.04967063292860985,
-0.031971223652362823,
0.0013267225585877895,
-0.1476932018995285,
-0.05043444782495499,
0.013497071340680122,
-0.039947494864463806,
0.06478139758110046,
-0.027763020247220993,
0.017974067479372025,
-0.09932304918766022,
-0.043032702058553696,
-0.024982137605547905,
0.023514414206147194,
-0.1043395921587944,
-0.10011792927980423,
-0.010747279040515423,
-0.029381798580288887,
-0.055546484887599945,
-0.0038026936817914248,
0.052798837423324585,
-0.05513644590973854,
0.06836768239736557,
-0.066951684653759,
0.018736939877271652,
0.03212791308760643,
0.02537381462752819,
-0.020675742998719215,
-0.033963847905397415,
-0.05850040167570114,
-0.026976216584444046,
-0.016943730413913727,
0.08952195197343826,
-0.03362983092665672,
-0.020007509738206863,
-0.022461680695414543,
-0.019681423902511597,
0.06918658316135406,
-0.04617614299058914,
0.01850145496428013,
0.042417000979185104,
0.05656664818525314,
-0.05181998014450073,
0.04231686890125275,
-0.018852610141038895,
0.003074697917327285,
-0.06613174825906754,
0.04190843179821968,
0.04772186279296875,
0.019084785133600235,
-0.010471122339367867,
-0.06781797856092453,
0.001426218543201685,
-0.028227316215634346,
-0.11324372887611389,
0.028799274936318398,
0.08687012642621994,
-0.05381850525736809,
-0.044160936027765274,
0.013263522647321224,
0.02082231268286705,
-0.0033090058714151382,
0.020899280905723572,
-0.03035307303071022,
-0.04267042502760887,
0.08246276527643204,
-0.014779050834476948,
-0.02972998656332493,
-0.044598329812288284,
-0.03462587669491768,
-0.10797290503978729,
-7.484803056491493e-33,
0.07639158517122269,
0.049418866634368896,
-0.014363689348101616,
0.019646918401122093,
0.03423516824841499,
-0.012150160036981106,
-0.01988525316119194,
0.06186339631676674,
-0.014929692260921001,
-0.039286959916353226,
-0.01840299926698208,
0.011977601796388626,
0.03333383798599243,
0.07109449058771133,
-0.055244311690330505,
0.023562828078866005,
-0.04178520292043686,
-0.08646990358829498,
-0.06466717272996902,
0.010207483544945717,
-0.02936335653066635,
0.051748644560575485,
0.015103854238986969,
0.03867778182029724,
-0.05029578134417534,
-0.002393035450950265,
0.05111517012119293,
0.07754507660865784,
-0.02246110700070858,
0.0009122917545028031,
-0.0042771450243890285,
-0.09788546711206436,
-0.016026625409722328,
0.04069681465625763,
0.022424105554819107,
-0.07490471005439758,
-0.06598399579524994,
0.08331945538520813,
-0.04080595821142197,
-0.040694039314985275,
0.01730777695775032,
-0.009830957278609276,
-0.0893082320690155,
0.005162128712981939,
-0.026921464130282402,
0.009949675761163235,
0.05078114941716194,
0.031204979866743088,
0.01383720152080059,
-0.0825471356511116,
-0.022005748003721237,
0.009673342108726501,
-0.06567037850618362,
0.14599458873271942,
-0.024696392938494682,
0.033314481377601624,
0.01193903386592865,
0.016986224800348282,
-0.04847922921180725,
-0.031757235527038574,
0.07443982362747192,
-0.04812018200755119,
0.05227309837937355,
0.028754835948348045,
0.08958003669977188,
-0.08194083720445633,
0.04480256885290146,
0.07506970316171646,
0.012073682621121407,
0.021071510389447212,
0.11912805587053299,
0.09071149677038193,
0.0007129618315957487,
-0.000732610875274986,
0.002293958328664303,
-0.004524114541709423,
-0.05876316502690315,
-0.05159808322787285,
-0.00010888139513554052,
0.02754185162484646,
-0.060661621391773224,
0.08308593928813934,
-0.020418891683220863,
0.021701447665691376,
0.00007054814341245219,
-0.0015244927490130067,
0.03577730059623718,
0.07712563127279282,
0.043302591890096664,
0.07087565958499908,
0.03197099640965462,
0.011116890236735344,
-0.06381823867559433,
0.11437314748764038,
-0.04850363731384277,
-5.005640701938319e-8,
0.047057218849658966,
-0.04430254176259041,
0.0013000317849218845,
0.08956237882375717,
0.09255070239305496,
-0.09000451117753983,
0.043109096586704254,
0.06517376750707626,
-0.0784793496131897,
-0.021785229444503784,
0.0099765844643116,
0.03523256257176399,
-0.07319289445877075,
-0.00494394963607192,
0.11078113317489624,
-0.044656045734882355,
0.0045789447613060474,
0.004182855598628521,
0.016842544078826904,
-0.0405171699821949,
-0.048828721046447754,
-0.08741803467273712,
-0.04603160172700882,
-0.01692487671971321,
-0.0205432940274477,
0.03071681782603264,
0.05735991150140762,
0.06619464606046677,
0.030590418726205826,
0.019884515553712845,
-0.01708664372563362,
-0.0059296549297869205,
0.02965530939400196,
0.03537330403923988,
-0.013083389028906822,
0.0749887004494667,
-0.10459961742162704,
-0.012491879053413868,
-0.0033692456781864166,
0.049156349152326584,
-0.03820383921265602,
0.047708798199892044,
-0.0015045824693515897,
0.04283176362514496,
-0.03565720096230507,
0.0012921547750011086,
0.012008831836283207,
0.025155628100037575,
0.05155022814869881,
0.010081830434501171,
-0.028920557349920273,
-0.06501015275716782,
-0.05238085240125656,
0.08633982390165329,
0.016810351982712746,
-0.006311681587249041,
0.027142969891428947,
-0.03777698799967766,
-0.05352317914366722,
0.04912556707859039,
0.041553936898708344,
-0.021350422874093056,
0.018014205619692802,
-0.025403805077075958
] | 0.163966
|
express a disruption budget will have that budget respected. You should always allocate additional capacity for critical services so that their Pods can be immediately rescheduled. ## {{% heading "cleanup" %}} - Use `kubectl uncordon` to uncordon all the nodes in your cluster. - You must delete the persistent storage media for the PersistentVolumes used in this tutorial. Follow the necessary steps, based on your environment, storage configuration, and provisioning method, to ensure that all storage is reclaimed.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateful-application/zookeeper.md
|
[
0.04174556955695152,
0.004008140880614519,
0.055162426084280014,
0.03415665403008461,
0.005170242860913277,
-0.032715752720832825,
-0.0637483298778534,
-0.034194834530353546,
0.02227141335606575,
0.09028058499097824,
-0.02286042831838131,
-0.029954208061099052,
-0.022725507616996765,
-0.06143013760447502,
0.000054600128351012245,
-0.01399395614862442,
0.008825557306408882,
-0.025708919391036034,
-0.022825444117188454,
-0.03672413527965546,
-0.025550274178385735,
0.013861333020031452,
0.007096874061971903,
0.015810605138540268,
-0.015323164872825146,
0.04291777312755585,
-0.012579514645040035,
-0.04675674065947533,
0.016744427382946014,
-0.06306041777133942,
-0.011704232543706894,
0.011226016096770763,
0.03233892470598221,
-0.011604871600866318,
0.11478319764137268,
0.10096734017133713,
-0.016851358115673065,
-0.05063759535551071,
-0.03743487969040871,
-0.010465460829436779,
0.04584910348057747,
-0.045762091875076294,
-0.12561151385307312,
0.016299813985824585,
-0.02946069836616516,
0.010139749385416508,
-0.07940306514501572,
-0.03526850789785385,
0.04492642357945442,
-0.023298198357224464,
0.035940222442150116,
-0.07247872650623322,
0.05200373753905296,
0.08796902000904083,
0.01729150116443634,
0.03401469439268112,
0.015961749479174614,
0.014024531468749046,
0.1019749566912651,
0.02635359577834606,
0.04946586489677429,
-0.016999501734972,
0.04361579567193985,
-0.03548354655504227,
-0.00872560404241085,
0.010362507775425911,
0.003958469722419977,
0.061490196734666824,
0.039845727384090424,
0.07706064730882645,
0.0828336700797081,
0.06669806689023972,
-0.004324424080550671,
-0.04504207894206047,
0.008649283088743687,
0.05156613513827324,
0.015301628038287163,
0.0025951487477868795,
0.03493271768093109,
0.03839892894029617,
0.008671645075082779,
-0.02064850553870201,
0.005420205183327198,
-0.04947748780250549,
-0.0999683067202568,
-0.035615019500255585,
-0.033093348145484924,
-0.07891210913658142,
0.016116555780172348,
-0.018473757430911064,
0.024787796661257744,
0.03219406679272652,
0.08423231542110443,
-0.09418036043643951,
-0.03520089387893677,
-0.020608196035027504,
-0.007999217137694359,
0.01989256590604782,
0.03952663019299507,
-0.013421604409813881,
0.032643768936395645,
0.030449025332927704,
0.026023194193840027,
0.006766987033188343,
-0.005876349285244942,
-0.07695122808218002,
-0.041419681161642075,
0.0059618172235786915,
0.02881697751581669,
0.04927363246679306,
-0.033955685794353485,
0.058713655918836594,
-0.05827911198139191,
0.0529332309961319,
0.015332599170506,
0.072292760014534,
0.01378684677183628,
-0.008670005947351456,
0.026811623945832253,
0.025644535198807716,
0.07399334758520126,
-0.08882703632116318,
-0.047561824321746826,
-0.02310294657945633,
-0.0576777420938015,
0.02130690962076187,
0.028137018904089928,
2.6650519558384966e-33,
0.014184382744133472,
-0.04875050485134125,
-0.02622019685804844,
-0.04424528032541275,
0.03092317469418049,
-0.08181963115930557,
-0.06979972124099731,
-0.0023849369026720524,
-0.04498378559947014,
-0.08445874601602554,
-0.04805970937013626,
0.05840480327606201,
-0.02645779959857464,
-0.031532853841781616,
0.019501466304063797,
-0.0901460349559784,
-0.002649553120136261,
0.09479551762342453,
0.06878554821014404,
-0.09297361224889755,
0.05583146959543228,
-0.03148281201720238,
-0.06269633024930954,
0.02870761975646019,
0.009182211942970753,
0.011065335012972355,
0.10527576506137848,
-0.09321630001068115,
0.00303622311912477,
0.021700439974665642,
-0.02593756653368473,
0.015751227736473083,
0.016254402697086334,
0.07203067094087601,
-0.17083777487277985,
0.03371342271566391,
-0.08913514763116837,
0.02613610215485096,
-0.09580844640731812,
-0.056598398834466934,
0.00668061850592494,
0.02414923906326294,
-0.017276950180530548,
-0.08233261853456497,
0.08330927789211273,
-0.02408221922814846,
0.14300717413425446,
-0.04549383744597435,
0.014055933803319931,
0.046645019203424454,
-0.0025803071912378073,
-0.01344334613531828,
-0.03061182051897049,
0.008011555299162865,
0.006329226773232222,
0.01809740997850895,
0.12080683559179306,
-0.0783587321639061,
0.0037112331483513117,
-0.06346125155687332,
-0.007574176881462336,
-0.0247239600867033,
0.023218246176838875,
0.012323210947215557,
0.05383790656924248,
0.055646225810050964,
-0.014772514812648296,
0.06297820806503296,
0.011191855184733868,
0.023813508450984955,
-0.04291611164808273,
0.048781558871269226,
-0.016494207084178925,
-0.013735153712332249,
-0.05951378121972084,
-0.06284486502408981,
0.017469754442572594,
-0.004784890916198492,
-0.13396739959716797,
0.06701483577489853,
0.057853806763887405,
-0.05596120283007622,
-0.06528975814580917,
0.06426570564508438,
0.06890447437763214,
-0.03494979068636894,
0.04302563890814781,
0.04613250866532326,
-0.09607817977666855,
0.09009019285440445,
0.01899677701294422,
0.004009436350315809,
-0.035455264151096344,
0.010288435965776443,
-0.06919710338115692,
-2.3365170804890064e-33,
0.13293275237083435,
0.016264453530311584,
0.011234015226364136,
0.04590612277388573,
0.002101331716403365,
0.024879341945052147,
-0.05446796864271164,
0.12181048840284348,
-0.03215939924120903,
-0.04553120583295822,
-0.11642377078533173,
-0.07351324707269669,
0.0012708255089819431,
0.006531824357807636,
-0.10158177465200424,
-0.008401107974350452,
0.020365167409181595,
-0.04881295934319496,
-0.045186303555965424,
0.037356212735176086,
-0.03413145989179611,
-0.0015461551956832409,
0.014740951359272003,
0.01027514785528183,
-0.018034081906080246,
0.032847318798303604,
0.014294740743935108,
0.026740554720163345,
-0.07218058407306671,
-0.025814183056354523,
-0.03195380046963692,
-0.11039724946022034,
-0.008323846384882927,
0.0047165630385279655,
0.05319279804825783,
-0.027634691447019577,
-0.02108054794371128,
0.04321680963039398,
0.004876685794442892,
-0.004618762992322445,
0.03924032300710678,
0.043260134756565094,
-0.09257332235574722,
-0.03040551394224167,
-0.02127908542752266,
0.02463230863213539,
-0.023925073444843292,
-0.024376703426241875,
-0.021277200430631638,
-0.0476488433778286,
-0.007833627983927727,
-0.029710039496421814,
-0.08130934089422226,
0.04497944936156273,
-0.018351059406995773,
0.03946615010499954,
0.01995081640779972,
0.04451031982898712,
-0.054974235594272614,
-0.03434976935386658,
0.0434316024184227,
-0.058582425117492676,
0.030732449144124985,
0.008421747013926506,
0.02044603042304516,
-0.06470635533332825,
0.08418478071689606,
0.022031700238585472,
-0.06812499463558197,
-0.0012233351590111852,
0.020746275782585144,
0.08705893158912659,
0.0001497738267062232,
0.051764652132987976,
-0.021564416587352753,
-0.04428328573703766,
-0.023367198184132576,
-0.01706724986433983,
0.08224790543317795,
0.022028949111700058,
-0.03145230561494827,
0.05674246698617935,
-0.06960776448249817,
-0.004137717187404633,
0.04713193699717522,
0.03827245905995369,
0.048925746232271194,
0.04314049705862999,
0.017514660954475403,
0.12686435878276825,
-0.02327752485871315,
0.014766200445592403,
-0.030992325395345688,
0.1189734935760498,
-0.008794182911515236,
-4.077709903071991e-8,
0.05243200808763504,
0.047580618411302567,
-0.011160378344357014,
0.08896912634372711,
0.09095094352960587,
-0.10878431797027588,
0.025695594027638435,
0.10429348796606064,
-0.0012390600750222802,
0.04682282358407974,
0.06059640273451805,
0.018765440210700035,
-0.05155979469418526,
0.03295654058456421,
-0.008869054727256298,
-0.013305592350661755,
0.005800911691039801,
0.022015836089849472,
-0.020148463547229767,
-0.03449689596891403,
-0.06330915540456772,
-0.03963731974363327,
0.026355495676398277,
0.007899590767920017,
0.05115896090865135,
0.06580591946840286,
0.11852410435676575,
0.041166357696056366,
0.0676216185092926,
-0.03111981600522995,
-0.08731698244810104,
-0.02872965671122074,
-0.049178652465343475,
0.01724129356443882,
-0.06752052903175354,
0.016723884269595146,
-0.1117878332734108,
0.03504319116473198,
-0.010166398249566555,
0.0953657329082489,
-0.018445312976837158,
0.009180472232401371,
-0.07042262703180313,
0.013597850687801838,
-0.029412919655442238,
0.0264825951308012,
-0.06989745795726776,
0.08736179023981094,
-0.051119036972522736,
0.013195964507758617,
-0.06748282164335251,
-0.09083348512649536,
-0.016749287024140358,
0.11407599598169327,
-0.006177346222102642,
-0.015524351969361305,
0.0085116196423769,
0.0012692719465121627,
-0.005763710010796785,
0.053307827562093735,
0.017792588099837303,
-0.01749865524470806,
-0.06621835380792618,
-0.00974421389400959
] | 0.162197
|
Once you connected your Application with Service following steps like those outlined in [Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/), you have a continuously running, replicated application, that is exposed on a network. This tutorial helps you look at the termination flow for Pods and to explore ways to implement graceful connection draining. ## Termination process for Pods and their endpoints There are often cases when you need to terminate a Pod - be it to upgrade or scale down. In order to improve application availability, it may be important to implement a proper active connections draining. This tutorial explains the flow of Pod termination in connection with the corresponding endpoint state and removal by using a simple nginx web server to demonstrate the concept. ## Example flow with endpoint termination The following is the example flow described in the [Termination of Pods](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) document. Let's say you have a Deployment containing a single `nginx` replica (say just for the sake of demonstration purposes) and a Service: {{% code\_sample file="service/pod-with-graceful-termination.yaml" %}} {{% code\_sample file="service/explore-graceful-termination-nginx.yaml" %}} Now create the Deployment Pod and Service using the above files: ```shell kubectl apply -f pod-with-graceful-termination.yaml kubectl apply -f explore-graceful-termination-nginx.yaml ``` Once the Pod and Service are running, you can get the name of any associated EndpointSlices: ```shell kubectl get endpointslice ``` The output is similar to this: ```none NAME ADDRESSTYPE PORTS ENDPOINTS AGE nginx-service-6tjbr IPv4 80 10.12.1.199,10.12.1.201 22m ``` You can see its status, and validate that there is one endpoint registered: ```shell kubectl get endpointslices -o json -l kubernetes.io/service-name=nginx-service ``` The output is similar to this: ```none { "addressType": "IPv4", "apiVersion": "discovery.k8s.io/v1", "endpoints": [ { "addresses": [ "10.12.1.201" ], "conditions": { "ready": true, "serving": true, "terminating": false ``` Now let's terminate the Pod and validate that the Pod is being terminated respecting the graceful termination period configuration: ```shell kubectl delete pod nginx-deployment-7768647bf9-b4b9s ``` All pods: ```shell kubectl get pods ``` The output is similar to this: ```none NAME READY STATUS RESTARTS AGE nginx-deployment-7768647bf9-b4b9s 1/1 Terminating 0 4m1s nginx-deployment-7768647bf9-rkxlw 1/1 Running 0 8s ``` You can see that the new pod got scheduled. While the new endpoint is being created for the new Pod, the old endpoint is still around in the terminating state: ```shell kubectl get endpointslice -o json nginx-service-6tjbr ``` The output is similar to this: ```none { "addressType": "IPv4", "apiVersion": "discovery.k8s.io/v1", "endpoints": [ { "addresses": [ "10.12.1.201" ], "conditions": { "ready": false, "serving": true, "terminating": true }, "nodeName": "gke-main-default-pool-dca1511c-d17b", "targetRef": { "kind": "Pod", "name": "nginx-deployment-7768647bf9-b4b9s", "namespace": "default", "uid": "66fa831c-7eb2-407f-bd2c-f96dfe841478" }, "zone": "us-central1-c" }, { "addresses": [ "10.12.1.202" ], "conditions": { "ready": true, "serving": true, "terminating": false }, "nodeName": "gke-main-default-pool-dca1511c-d17b", "targetRef": { "kind": "Pod", "name": "nginx-deployment-7768647bf9-rkxlw", "namespace": "default", "uid": "722b1cbe-dcd7-4ed4-8928-4a4d0e2bbe35" }, "zone": "us-central1-c" ``` This allows applications to communicate their state during termination and clients (such as load balancers) to implement connection draining functionality. These clients may detect terminating endpoints and implement a special logic for them. In Kubernetes, endpoints that are terminating always have their `ready` status set as `false`. This needs to happen for backward compatibility, so existing load balancers will not use it for regular traffic. If traffic draining on terminating pod is needed, the actual readiness can be checked as a condition `serving`. When Pod is deleted, the old endpoint will also be deleted. ## {{% heading "whatsnext" %}} \* Learn how to [Connect Applications with Services](/docs/tutorials/services/connect-applications-service/) \* Learn more about [Using a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) \* Learn more about [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/) \* Learn more about [Creating an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/pods-and-endpoint-termination-flow.md
|
[
0.0014836592599749565,
0.030329320579767227,
0.08734430372714996,
0.010733259841799736,
-0.04534244164824486,
-0.08194298297166824,
-0.05112394690513611,
-0.010197636671364307,
0.05205327644944191,
0.042600736021995544,
-0.06771985441446304,
0.07866395264863968,
-0.023665685206651688,
-0.045070063322782516,
0.06198480352759361,
-0.023366689682006836,
0.05450811982154846,
0.030882244929671288,
-0.029172834008932114,
-0.001887194230221212,
0.012658762745559216,
-0.007840270176529884,
-0.04275967553257942,
0.05846019461750984,
-0.053796008229255676,
0.03884299099445343,
-0.025117477402091026,
-0.07196778059005737,
0.03827659785747528,
0.01149735227227211,
-0.036438241600990295,
-0.011509784497320652,
-0.05869385600090027,
-0.006571607664227486,
0.014116612263023853,
0.0723172128200531,
0.020042523741722107,
-0.046948567032814026,
-0.03740770369768143,
-0.003595287213101983,
0.0928073301911354,
-0.06299151480197906,
-0.10077600926160812,
0.009683314710855484,
-0.013569440692663193,
-0.03242874518036842,
-0.04716389253735542,
-0.03949080780148506,
0.004185771569609642,
-0.017899807542562485,
0.0053423489443957806,
-0.049891866743564606,
0.044371943920850754,
0.1126628965139389,
0.03647115081548691,
-0.031013356521725655,
0.03796748071908951,
0.03486791253089905,
0.022334858775138855,
0.10204379260540009,
0.052713390439748764,
-0.01716444455087185,
-0.009726619347929955,
-0.04414336010813713,
0.06173938885331154,
-0.04048462212085724,
0.026946069672703743,
-0.004476951435208321,
0.061901677399873734,
0.0285708699375391,
0.05557966232299805,
-0.00936941895633936,
-0.03806908428668976,
-0.06626664102077484,
-0.04806949198246002,
0.01497679203748703,
-0.02337387576699257,
-0.010010018944740295,
-0.016901766881346703,
0.028414087370038033,
0.06873837113380432,
0.0100117651745677,
0.061772752553224564,
0.01619996689260006,
-0.0675947368144989,
-0.011969619430601597,
0.07444189488887787,
-0.04915143549442291,
0.04507145658135414,
-0.005675272550433874,
-0.0003257534117437899,
0.05565181002020836,
0.045751433819532394,
-0.09820165485143661,
0.06858067959547043,
-0.015853311866521835,
-0.03233466297388077,
-0.010114268399775028,
0.0030036959797143936,
0.013551972806453705,
0.05594116821885109,
-0.024197431281208992,
0.0024653668515384197,
-0.05339042842388153,
0.09814941138029099,
-0.04539866745471954,
-0.06904923915863037,
-0.012927200645208359,
0.07819460332393646,
0.05848488584160805,
-0.022198375314474106,
-0.05029947683215141,
-0.0047753010876476765,
0.09863172471523285,
-0.015117967501282692,
0.07267388701438904,
-0.019667480140924454,
0.048343725502491,
-0.009960994124412537,
0.09494713693857193,
0.049513544887304306,
-0.07534002512693405,
0.01809605024755001,
0.008932281285524368,
-0.025819964706897736,
0.00912535097450018,
0.04805967956781387,
1.3180634484777994e-33,
-0.03267616033554077,
-0.10990351438522339,
-0.021545469760894775,
-0.016278211027383804,
0.07774131000041962,
-0.0753769502043724,
-0.043178074061870575,
0.008553910069167614,
-0.020953195169568062,
0.004506712779402733,
-0.05036385357379913,
0.05536426976323128,
-0.03377030789852142,
-0.008722431026399136,
0.013241910375654697,
-0.05826123431324959,
-0.011460525915026665,
0.015346311032772064,
0.14075526595115662,
0.02197699248790741,
0.0692354366183281,
-0.12067002803087234,
-0.039668839424848557,
0.03217628225684166,
0.06661611795425415,
-0.01246956642717123,
-0.04283419996500015,
-0.10216644406318665,
-0.028553836047649384,
0.008192639797925949,
0.023970715701580048,
0.02206704020500183,
-0.005069502163678408,
0.0030983928591012955,
-0.13984845578670502,
-0.08452095091342926,
0.0037176923360675573,
-0.005047814454883337,
-0.08383150398731232,
-0.02994421310722828,
0.01373954489827156,
-0.00946850422769785,
-0.08685895055532455,
0.014580361545085907,
0.012297658249735832,
-0.058647025376558304,
0.05927271768450737,
-0.09857866913080215,
0.01042130682617426,
-0.0038567257579416037,
0.009462067857384682,
-0.04133055359125137,
-0.012213350273668766,
-0.027123311534523964,
0.0016767410561442375,
0.018182111904025078,
0.049374066293239594,
-0.02913510799407959,
-0.05511493608355522,
-0.03184918314218521,
-0.014394097961485386,
-0.08004231005907059,
-0.031291261315345764,
-0.0054742153733968735,
0.05069395899772644,
0.05016293004155159,
-0.010683566331863403,
0.0034686594735831022,
0.008859467692673206,
0.04178054630756378,
-0.06599737703800201,
0.04240397363901138,
-0.018657337874174118,
-0.039128176867961884,
-0.07224611192941666,
-0.06201259791851044,
0.017516961321234703,
0.05444326996803284,
-0.03074590116739273,
0.04463353380560875,
0.04968639835715294,
-0.010327467694878578,
-0.08326185494661331,
0.09093751013278961,
0.01813107542693615,
0.007127309683710337,
0.02503957971930504,
-0.07069700956344604,
-0.12700052559375763,
0.04205998778343201,
0.005254689138382673,
0.04340063035488129,
-0.05581091344356537,
-0.0032982868142426014,
-0.023723693564534187,
-3.254871123713957e-33,
0.06273609399795532,
-0.040183812379837036,
-0.008446008898317814,
0.04403068870306015,
-0.014671117067337036,
-0.0009324900456704199,
-0.03986388072371483,
0.09916500747203827,
-0.02560238726437092,
-0.008048119954764843,
-0.02170725166797638,
-0.028354283422231674,
0.048215001821517944,
0.09553913027048111,
-0.14247286319732666,
-0.02775467000901699,
-0.04370030015707016,
-0.07837679982185364,
0.002332554664462805,
0.02927803248167038,
-0.0284721739590168,
0.018759269267320633,
0.09230861067771912,
-0.04294995218515396,
-0.02163620851933956,
-0.03868340700864792,
0.0017752506537362933,
-0.04658481106162071,
-0.032742660492658615,
-0.07817249745130539,
0.030283333733677864,
-0.06550691276788712,
0.024759111925959587,
-0.03624791279435158,
0.002466005040332675,
0.03468234837055206,
-0.026644686236977577,
0.12768538296222687,
0.053562916815280914,
-0.09042574465274811,
0.10731030255556107,
-0.016668815165758133,
-0.031965091824531555,
-0.053038593381643295,
-0.023768825456500053,
-0.05959149822592735,
-0.04343988373875618,
0.017396431416273117,
-0.04148038476705551,
-0.044737279415130615,
0.028582151979207993,
0.03069116175174713,
-0.06674376875162125,
0.09558746963739395,
-0.03510903939604759,
0.009239879436790943,
0.03082709014415741,
0.03432712331414223,
-0.06469447910785675,
0.02869361639022827,
0.07919955253601074,
-0.061140693724155426,
0.04632779210805893,
0.028539469465613365,
0.01015282142907381,
-0.03393467143177986,
-0.025147348642349243,
0.037999872118234634,
0.04475705698132515,
0.043646592646837234,
0.052319325506687164,
0.06334419548511505,
0.007239485625177622,
0.08500722050666809,
-0.007361121941357851,
-0.005862010642886162,
-0.0044861179776489735,
-0.10827939212322235,
0.06393173336982727,
-0.01361901219934225,
-0.10482830554246902,
0.1485552340745926,
-0.07951530814170837,
-0.008856352418661118,
0.024192843586206436,
0.037422385066747665,
0.040005624294281006,
0.033286020159721375,
0.11709406971931458,
0.09791204333305359,
-0.006902020890265703,
-0.005576297175139189,
-0.09326111525297165,
0.022386109456419945,
-0.08721452951431274,
-4.848372725518857e-8,
0.027340352535247803,
0.011977124959230423,
0.014896087348461151,
0.06572797149419785,
0.06107262521982193,
-0.005723464768379927,
0.05913503095507622,
0.03004118613898754,
0.012402372434735298,
0.04335158318281174,
-0.06534036993980408,
0.02435627020895481,
-0.08794625103473663,
0.0896616280078888,
0.03890609368681908,
0.03121899627149105,
0.08542284369468689,
0.01637352630496025,
-0.0005626626661978662,
-0.045552145689725876,
-0.13846786320209503,
-0.043826960027217865,
-0.012763342820107937,
0.0405280627310276,
-0.009992365725338459,
0.05152095854282379,
0.08301947265863419,
0.016382120549678802,
-0.011187233962118626,
-0.05006059631705284,
-0.023245569318532944,
-0.020642584189772606,
-0.03345417231321335,
0.04633248969912529,
-0.042771898210048676,
0.04014350846409798,
-0.1421201229095459,
-0.016947580501437187,
-0.03037942759692669,
0.022394152358174324,
-0.014281774871051311,
0.012144768610596657,
0.005650253966450691,
-0.01251465268433094,
0.052228715270757675,
0.055411167442798615,
0.03895273432135582,
0.08666834980249405,
-0.005684071220457554,
0.09909117221832275,
0.015875186771154404,
-0.07628238201141357,
-0.03138826787471771,
0.01184983178973198,
-0.00004864535731030628,
-0.03272266685962677,
0.029900627210736275,
0.00455666147172451,
-0.0008082641870714724,
0.01608230732381344,
0.01881052926182747,
-0.0015044290339574218,
-0.0005740281194448471,
-0.042975541204214096
] | 0.184638
|
to [Connect Applications with Services](/docs/tutorials/services/connect-applications-service/) \* Learn more about [Using a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) \* Learn more about [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/) \* Learn more about [Creating an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/pods-and-endpoint-termination-flow.md
|
[
-0.056642260402441025,
-0.0668867900967598,
-0.13401974737644196,
-0.014403067529201508,
-0.03668398782610893,
-0.013070878572762012,
0.028093509376049042,
0.08084326982498169,
-0.03677768632769585,
0.012743153609335423,
-0.047600630670785904,
0.06501692533493042,
0.04402486979961395,
-0.048648521304130554,
0.065999336540699,
0.0500982366502285,
0.07767944782972336,
-0.05896531417965889,
0.01934892125427723,
-0.013649344444274902,
-0.016952726989984512,
-0.016358869150280952,
-0.06337574869394302,
0.03974228724837303,
-0.05920138582587242,
-0.015822943300008774,
-0.04790738224983215,
-0.030226917937397957,
-0.01035973709076643,
0.018030904233455658,
-0.027515385299921036,
0.02687816508114338,
0.010650129988789558,
-0.038488466292619705,
-0.045768290758132935,
0.10922985523939133,
0.13427335023880005,
-0.03850574418902397,
-0.07301081717014313,
-0.04969528689980507,
0.05365041643381119,
-0.013368572108447552,
-0.026863427832722664,
-0.010495306923985481,
-0.011690542101860046,
-0.08008605241775513,
-0.06259854882955551,
-0.02940743789076805,
-0.012580365873873234,
-0.013676774688065052,
-0.0016646550502628088,
-0.06454213708639145,
-0.02842053398489952,
0.06674462556838989,
-0.1083330288529396,
0.06583009660243988,
-0.012715437449514866,
0.015785513445734978,
-0.04564599692821503,
0.005262014456093311,
0.06840348988771439,
-0.023768188431859016,
0.015210909768939018,
0.02943236008286476,
0.00456686457619071,
-0.0643281415104866,
0.0063100033439695835,
0.03747452795505524,
0.017641114071011543,
-0.09802091121673584,
-0.047512397170066833,
0.07917068153619766,
-0.10746117681264877,
-0.05364687368273735,
-0.04623854160308838,
-0.0038437230978161097,
0.02054961398243904,
0.0008872728794813156,
0.033902041614055634,
-0.08983909338712692,
0.038242414593696594,
0.09258917719125748,
0.005825506057590246,
0.09543488919734955,
-0.05192478746175766,
0.05576220527291298,
-0.012004705145955086,
-0.09754762798547745,
0.01107305008918047,
0.005829695146530867,
-0.023363571614027023,
-0.004888517316430807,
-0.026175228878855705,
-0.04397378861904144,
0.004299881402403116,
0.03681370988488197,
-0.06425175070762634,
-0.05786549299955368,
0.021334556862711906,
0.01397179439663887,
0.0017940576653927565,
-0.033519309014081955,
0.06008442863821983,
0.03617669269442558,
-0.03350713849067688,
-0.008807654492557049,
-0.008558672852814198,
0.047253284603357315,
0.05921625345945358,
0.01906716823577881,
-0.00856923870742321,
0.017042869701981544,
0.018015118315815926,
-0.020204070955514908,
-0.025521859526634216,
0.032123155891895294,
0.09334143251180649,
-0.07447294145822525,
0.01887134648859501,
0.05408349260687828,
-0.0203641876578331,
-0.008385974913835526,
-0.04536214470863342,
-0.062115829437971115,
0.07689403742551804,
-0.046509262174367905,
-0.03467060625553131,
-1.5810099634842292e-33,
0.023285483941435814,
-0.04049608111381531,
0.09834810346364975,
0.03688618540763855,
0.06519419699907303,
-0.04501990228891373,
-0.021640894934535027,
-0.0044317361898720264,
-0.012965070083737373,
0.008639663457870483,
-0.025854041799902916,
0.1308412402868271,
0.07123257964849472,
-0.02875785157084465,
0.006198739632964134,
-0.05758924037218094,
0.042387790977954865,
0.044040050357580185,
0.13205786049365997,
-0.07845769077539444,
-0.006754907313734293,
-0.025347603484988213,
-0.053774747997522354,
0.04523489624261856,
0.03934391960501671,
0.07809846848249435,
0.04100048542022705,
-0.021617043763399124,
0.08222125470638275,
0.004659500438719988,
0.13517552614212036,
-0.0033052086364477873,
-0.010354914702475071,
0.020443204790353775,
-0.06185927242040634,
0.03192935883998871,
-0.0398314893245697,
-0.010135147720575333,
-0.055797334760427475,
-0.027059778571128845,
-0.04306503012776375,
0.009059599600732327,
-0.05566816404461861,
-0.009382066316902637,
0.04035276919603348,
-0.06123257055878639,
-0.002321835607290268,
-0.02915145270526409,
0.075182244181633,
0.020094729959964752,
-0.059692684561014175,
-0.05938831344246864,
0.0207985769957304,
0.06480336934328079,
0.027769148349761963,
0.07768407464027405,
-0.04968525841832161,
0.023127663880586624,
-0.054729536175727844,
0.02286677248775959,
-0.0006631800788454711,
-0.08018804341554642,
-0.05894700065255165,
0.022939667105674744,
-0.009442484006285667,
0.03656678646802902,
0.01324176974594593,
-0.027943899855017662,
0.02997450716793537,
0.012917082756757736,
-0.05474017187952995,
0.019016416743397713,
0.039156943559646606,
0.09447599202394485,
-0.052493344992399216,
-0.0027539285365492105,
-0.004858522675931454,
-0.015933889895677567,
-0.05326269567012787,
0.0034314231015741825,
-0.02629733271896839,
-0.07929497212171555,
-0.06083245575428009,
0.0840698704123497,
-0.011610031127929688,
0.03040524199604988,
0.01471027173101902,
-0.07339734584093094,
0.04281739145517349,
0.06483955681324005,
0.01187440101057291,
0.027094736695289612,
0.044186536222696304,
0.042757850140333176,
-0.05501062795519829,
-1.182237923140665e-33,
0.02626429684460163,
0.028555775061249733,
-0.03708028420805931,
-0.005276198964565992,
0.05565517023205757,
0.021762629970908165,
0.017370589077472687,
0.06278734654188156,
-0.027514155954122543,
0.07106945663690567,
-0.0024335801135748625,
0.04848027229309082,
0.03624458983540535,
-0.000870044284965843,
-0.056236691772937775,
-0.013024719431996346,
0.01614086702466011,
-0.05984794348478317,
-0.02065359614789486,
0.060220155864953995,
-0.1256447732448578,
0.03638341650366783,
0.08956711739301682,
-0.03861328214406967,
-0.00906640850007534,
-0.03798067942261696,
0.01670270971953869,
-0.0635577142238617,
-0.07448497414588928,
-0.030712489038705826,
-0.0184060987085104,
-0.05861029773950577,
0.026517624035477638,
-0.014335869811475277,
-0.023782411590218544,
0.014132492244243622,
0.023118719458580017,
0.029478412121534348,
0.021282926201820374,
-0.12293939292430878,
0.07482907921075821,
-0.09831880033016205,
-0.023867234587669373,
-0.07041444629430771,
0.01076674647629261,
-0.05028180778026581,
-0.07029657065868378,
-0.030635319650173187,
-0.12015724182128906,
0.009610547684133053,
-0.027892664074897766,
-0.07043805718421936,
-0.025072146207094193,
0.037138886749744415,
0.00106949417386204,
0.079012431204319,
0.10586345195770264,
0.06308919191360474,
-0.03385734558105469,
0.039097193628549576,
0.050957292318344116,
-0.10268555581569672,
-0.06411667913198471,
0.06180649250745773,
-0.008158756420016289,
-0.08508984744548798,
-0.007348853163421154,
-0.0011108540929853916,
-0.02841244451701641,
0.011488405987620354,
-0.09144171327352524,
0.07870291918516159,
0.10900884866714478,
0.12193723022937775,
-0.010519647970795631,
-0.06264463067054749,
0.03750356659293175,
-0.1372464895248413,
-0.031032508239150047,
0.011446059681475163,
-0.05515027046203613,
0.027606651186943054,
-0.019316844642162323,
-0.024528129026293755,
-0.022064419463276863,
-0.03167281299829483,
0.07920630276203156,
0.014879575930535793,
0.010291257873177528,
0.008348830044269562,
-0.14297369122505188,
0.005154975689947605,
0.003411631565541029,
0.005185612943023443,
-0.03603138402104378,
-4.406300746495617e-8,
0.01877322606742382,
0.0021959382575005293,
-0.03533877059817314,
0.00867125391960144,
-0.0655294731259346,
0.06370597332715988,
-0.007472795434296131,
0.06024123355746269,
-0.023174826055765152,
0.08642374724149704,
-0.007072729524224997,
0.017216278240084648,
-0.053694743663072586,
0.007577522192150354,
0.01870676875114441,
0.04640898481011391,
0.07747737318277359,
0.009457206353545189,
-0.0041887275874614716,
-0.07659479230642319,
-0.050997938960790634,
-0.002171494299545884,
0.009150511585175991,
0.06981392204761505,
0.06636079400777817,
0.03787463158369064,
0.004652600735425949,
0.003205777844414115,
-0.04446057602763176,
-0.045683782547712326,
-0.01692540943622589,
0.0310637429356575,
0.0032106887083500624,
0.022153321653604507,
-0.06425885111093521,
0.0611700564622879,
-0.08750374615192413,
0.03662216290831566,
0.015982646495103836,
0.046318504959344864,
0.059422608464956284,
0.08006783574819565,
0.04097941517829895,
-0.010716374963521957,
0.07342823594808578,
0.08276459574699402,
-0.056162066757678986,
0.06468045711517334,
0.008793278597295284,
-0.0008893071790225804,
-0.022572465240955353,
-0.03169941529631615,
0.03855633735656738,
-0.016372082754969597,
0.01828901842236519,
0.05201994627714157,
-0.014487408101558685,
-0.06472379714250565,
0.036302290856838226,
0.07941358536481857,
0.008774968795478344,
0.11486479640007019,
-0.005063542164862156,
-0.021838374435901642
] | 0.227518
|
Applications running in a Kubernetes cluster find and communicate with each other, and the outside world, through the Service abstraction. This document explains what happens to the source IP of packets sent to different types of Services, and how you can toggle this behavior according to your needs. ## {{% heading "prerequisites" %}} ### Terminology This document makes use of the following terms: {{< comment >}} If localizing this section, link to the equivalent Wikipedia pages for the target localization. {{< /comment >}} [NAT](https://en.wikipedia.org/wiki/Network\_address\_translation) : Network address translation [Source NAT](https://en.wikipedia.org/wiki/Network\_address\_translation#SNAT) : Replacing the source IP on a packet; in this page, that usually means replacing with the IP address of a node. [Destination NAT](https://en.wikipedia.org/wiki/Network\_address\_translation#DNAT) : Replacing the destination IP on a packet; in this page, that usually means replacing with the IP address of a {{< glossary\_tooltip term\_id="pod" >}} [VIP](/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) : A virtual IP address, such as the one assigned to every {{< glossary\_tooltip text="Service" term\_id="service" >}} in Kubernetes [kube-proxy](/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies) : A network daemon that orchestrates Service VIP management on every node ### Prerequisites {{< include "task-tutorial-prereqs.md" >}} The examples use a small nginx webserver that echoes back the source IP of requests it receives through an HTTP header. You can create it as follows: {{< note >}} The image in the following command only runs on AMD64 architectures. {{< /note >}} ```shell kubectl create deployment source-ip-app --image=registry.k8s.io/echoserver:1.10 ``` The output is: ``` deployment.apps/source-ip-app created ``` ## {{% heading "objectives" %}} \* Expose a simple application through various types of Services \* Understand how each Service type handles source IP NAT \* Understand the tradeoffs involved in preserving source IP ## Source IP for Services with `Type=ClusterIP` Packets sent to ClusterIP from within the cluster are never source NAT'd if you're running kube-proxy in [iptables mode](/docs/reference/networking/virtual-ips/#proxy-mode-iptables), (the default). You can query the kube-proxy mode by fetching `http://localhost:10249/proxyMode` on the node where kube-proxy is running. ```console kubectl get nodes ``` The output is similar to this: ``` NAME STATUS ROLES AGE VERSION kubernetes-node-6jst Ready 2h v1.13.0 kubernetes-node-cx31 Ready 2h v1.13.0 kubernetes-node-jj1t Ready 2h v1.13.0 ``` Get the proxy mode on one of the nodes (kube-proxy listens on port 10249): ```shell # Run this in a shell on the node you want to query. curl http://localhost:10249/proxyMode ``` The output is: ``` iptables ``` You can test source IP preservation by creating a Service over the source IP app: ```shell kubectl expose deployment source-ip-app --name=clusterip --port=80 --target-port=8080 ``` The output is: ``` service/clusterip exposed ``` ```shell kubectl get svc clusterip ``` The output is similar to: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE clusterip ClusterIP 10.0.170.92 80/TCP 51s ``` And hitting the `ClusterIP` from a pod in the same cluster: ```shell kubectl run busybox -it --image=busybox:1.28 --restart=Never --rm ``` The output is similar to this: ``` Waiting for pod default/busybox to be running, status is Pending, pod ready: false If you don't see a command prompt, try pressing enter. ``` You can then run a command inside that Pod: ```shell # Run this inside the terminal from "kubectl run" ip addr ``` ``` 1: lo: mtu 65536 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid\_lft forever preferred\_lft forever inet6 ::1/128 scope host valid\_lft forever preferred\_lft forever 3: eth0: mtu 1460 qdisc noqueue link/ether 0a:58:0a:f4:03:08 brd ff:ff:ff:ff:ff:ff inet 10.244.3.8/24 scope global eth0 valid\_lft forever preferred\_lft forever inet6 fe80::188a:84ff:feb0:26a5/64 scope link valid\_lft forever preferred\_lft forever ``` …then use `wget` to query the local webserver ```shell # Replace "10.0.170.92" with the IPv4 address of the Service named "clusterip" wget -qO - 10.0.170.92 ``` ``` CLIENT VALUES: client\_address=10.244.3.8 command=GET ... ``` The `client\_address`
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/source-ip.md
|
[
-0.02907264046370983,
0.026460519060492516,
0.07020263373851776,
-0.039252541959285736,
0.02603183686733246,
-0.0037879180163145065,
0.05496703460812569,
-0.05453038215637207,
0.04829665273427963,
-0.00040623886161483824,
-0.04123266786336899,
-0.04162124544382095,
-0.006640559993684292,
-0.023027820512652397,
0.02799512818455696,
0.008259412832558155,
0.07553131878376007,
-0.00945198629051447,
0.017909979447722435,
-0.10681981593370438,
0.04113611951470375,
0.031557418406009674,
0.05899251997470856,
0.01043624710291624,
-0.037586767226457596,
-0.0004947208799421787,
0.0004618586681317538,
-0.014064948074519634,
0.05336478352546692,
-0.013317415490746498,
-0.0681830644607544,
0.06261979043483734,
-0.04952216148376465,
0.049589063972234726,
-0.030261671170592308,
0.04572924226522446,
-0.013629015535116196,
-0.03406994417309761,
-0.06704791635274887,
0.09214197844266891,
0.0955485925078392,
-0.03202805668115616,
-0.039355017244815826,
-0.04686178267002106,
0.016347277909517288,
0.049875080585479736,
-0.02612813003361225,
-0.0007816822035238147,
-0.05134613439440727,
-0.03727453947067261,
-0.006497992668300867,
-0.05365950986742973,
-0.015603982843458652,
0.017746105790138245,
0.08056890219449997,
0.022592978551983833,
-0.01005557831376791,
0.06889871507883072,
0.02633010782301426,
0.037469327449798584,
0.0012012450024485588,
-0.025492075830698013,
0.013369067572057247,
0.03239903971552849,
0.03662068024277687,
0.019698068499565125,
-0.025633005425333977,
0.07155271619558334,
0.0070951213128864765,
-0.04547383636236191,
0.022663086652755737,
0.05025488883256912,
-0.04481872543692589,
0.05026227980852127,
0.015568563714623451,
-0.03685324266552925,
-0.021410830318927765,
0.058909349143505096,
-0.05690336599946022,
-0.05712057277560234,
0.0475238673388958,
0.047047313302755356,
0.04501770809292793,
-0.013997536152601242,
-0.046045053750276566,
-0.07745332270860672,
-0.019246943295001984,
-0.07520654052495956,
0.14547470211982727,
0.03974365070462227,
-0.052052099257707596,
-0.11607223749160767,
0.041912056505680084,
-0.06546787172555923,
0.0819164365530014,
0.06580805033445358,
0.029184196144342422,
-0.0554654486477375,
0.009420976974070072,
0.014309998601675034,
0.05473079904913902,
-0.0015176242450252175,
-0.0006478200666606426,
0.004834584426134825,
0.050714388489723206,
-0.03985827788710594,
-0.07329802215099335,
0.01330556720495224,
0.03119468316435814,
0.06204793602228165,
-0.049056656658649445,
0.008853765204548836,
-0.032459937036037445,
-0.029846882447600365,
-0.04086517170071602,
-0.032076943665742874,
0.1068066954612732,
-0.012736290693283081,
0.05500105395913124,
-0.013046404346823692,
-0.027268990874290466,
-0.07958691567182541,
-0.009846104308962822,
-0.005420805886387825,
-0.0470874086022377,
-0.0052914745174348354,
-0.06208215653896332,
4.0597567176349476e-33,
0.09640619903802872,
-0.023653937503695488,
-0.02271380089223385,
0.021632516756653786,
-0.0015901463339105248,
-0.0842766985297203,
0.04732825979590416,
-0.028284283354878426,
-0.06299609690904617,
-0.051192156970500946,
-0.03454344719648361,
0.0831778421998024,
0.08384119719266891,
-0.008053691126406193,
-0.055071547627449036,
0.06031385064125061,
-0.013448267243802547,
0.056858159601688385,
0.13898803293704987,
0.05663538724184036,
0.0436999574303627,
0.002082065911963582,
0.002604434732347727,
0.05580202862620354,
0.059175729751586914,
-0.000640734622720629,
-0.049387719482183456,
-0.09172000735998154,
-0.037462711334228516,
-0.0016679343534633517,
0.004314508754760027,
0.02977294661104679,
-0.0373341403901577,
0.023678310215473175,
-0.019040092825889587,
-0.023867584764957428,
-0.003954346291720867,
-0.09284456819295883,
-0.04130740463733673,
-0.00821345392614603,
0.01457385066896677,
-0.014726459048688412,
-0.05125502496957779,
-0.07632187008857727,
0.01253996416926384,
0.023087797686457634,
-0.030346769839525223,
-0.07590190321207047,
0.059525735676288605,
-0.008921481668949127,
-0.0376848541200161,
-0.0004512077139224857,
0.045407913625240326,
-0.004448557738214731,
0.06318189203739166,
0.0360310934484005,
0.09415147453546524,
0.0007675221422687173,
-0.044584427028894424,
0.05321551859378815,
-0.031548552215099335,
-0.012158669531345367,
-0.040827810764312744,
0.04689255356788635,
0.05671859160065651,
0.017754200845956802,
-0.050819508731365204,
0.03562454879283905,
0.0171149130910635,
-0.06264526396989822,
-0.03860177472233772,
0.05960686132311821,
-0.042780183255672455,
0.1028975322842598,
-0.04677901417016983,
-0.00043276409269310534,
-0.10282911360263824,
-0.021837301552295685,
-0.06213055178523064,
0.009370340965688229,
-0.04307016730308533,
0.021120628342032433,
-0.0776759535074234,
0.0603284016251564,
-0.057807695120573044,
-0.05676647648215294,
0.01767578348517418,
-0.05735957249999046,
0.014017117209732533,
0.018472086638212204,
0.07197412103414536,
-0.003059034002944827,
-0.056977175176143646,
0.02674183063209057,
-0.040529295802116394,
-5.2302849721669956e-33,
0.08765547722578049,
0.031996358186006546,
-0.05692397803068161,
-0.009966468438506126,
-0.06756552308797836,
-0.03033597208559513,
0.09530819952487946,
0.07948241382837296,
0.060525305569171906,
-0.002538226544857025,
-0.021629147231578827,
-0.03753358870744705,
0.06486452370882034,
0.015593230724334717,
-0.06725309044122696,
0.0031064399518072605,
-0.02808360382914543,
0.030679753050208092,
-0.07522048056125641,
0.05811076983809471,
-0.0887027308344841,
-0.016237929463386536,
-0.04622713103890419,
-0.040551282465457916,
-0.007029801141470671,
0.01855827495455742,
0.05066623538732529,
0.0509682334959507,
-0.12365607172250748,
-0.08195943385362625,
-0.006871473044157028,
-0.013941150158643723,
-0.034275833517313004,
-0.03139370679855347,
-0.031338900327682495,
0.07148962467908859,
-0.021878987550735474,
0.050951533019542694,
0.04626626893877983,
-0.008064351975917816,
0.02605551853775978,
0.028790095821022987,
-0.05775715038180351,
-0.051591161638498306,
-0.08892492949962616,
0.03732718154788017,
-0.03520519658923149,
0.04235310107469559,
-0.049357522279024124,
-0.10576439648866653,
0.02297733537852764,
0.0006257208297029138,
-0.013050018809735775,
0.024881478399038315,
-0.07490537315607071,
0.07861378788948059,
0.03197583183646202,
0.0661238506436348,
0.05763916298747063,
0.02445870265364647,
0.09970482438802719,
-0.1877167522907257,
-0.009736388921737671,
0.10832996666431427,
0.0019365374464541674,
-0.06178070604801178,
0.011862581595778465,
0.025067349895834923,
0.04645296931266785,
-0.02181936614215374,
0.033877771347761154,
-0.02343660034239292,
0.08212810009717941,
0.04221345856785774,
-0.0025911438278853893,
-0.06119130179286003,
0.10771779716014862,
0.028020163998007774,
-0.006144528742879629,
-0.01632608100771904,
-0.06233852729201317,
0.008335406892001629,
-0.08373413234949112,
-0.039116960018873215,
0.07459915429353714,
0.06320857256650925,
0.03571510314941406,
0.0718943253159523,
0.0037510383408516645,
-0.015082514844834805,
-0.05255047604441643,
0.01651863008737564,
-0.08368372172117233,
0.08543650060892105,
-0.0628088116645813,
-6.640995309226128e-8,
-0.026493962854146957,
-0.0024955628905445337,
-0.05406602844595909,
0.05430356785655022,
0.0013282985892146826,
0.08276094496250153,
0.028424952179193497,
-0.0151840690523386,
-0.027127424255013466,
0.0034645386040210724,
-0.09039410203695297,
0.12284567952156067,
-0.037194836884737015,
-0.040370214730501175,
-0.001975390361621976,
0.02632107026875019,
0.0015045583713799715,
0.010101824067533016,
-0.014585733413696289,
-0.040415119379758835,
-0.05915743112564087,
-0.0510617159307003,
-0.06434385478496552,
0.06014130637049675,
0.0049673342145979404,
0.07839806377887726,
0.07131935656070709,
0.049118489027023315,
0.09436307102441788,
-0.0025770235806703568,
-0.05472229793667793,
-0.001618958660401404,
-0.03788311779499054,
0.06691282987594604,
-0.015498478896915913,
0.07938504964113235,
-0.09587425738573074,
0.008683214895427227,
0.032905951142311096,
0.06611598283052444,
-0.019975921139121056,
-0.024312743917107582,
-0.14420965313911438,
0.0009735777275636792,
0.006254888605326414,
0.06851788610219955,
-0.047763578593730927,
0.020576292648911476,
-0.024595314636826515,
-0.052256058901548386,
0.004010036587715149,
-0.030219176784157753,
-0.04604151472449303,
0.04404495656490326,
0.02800930291414261,
0.0070606404915452,
-0.05369940400123596,
-0.08349733054637909,
0.008608054369688034,
0.08121836930513382,
-0.007913286797702312,
0.040607474744319916,
0.03907293453812599,
-0.021369822323322296
] | 0.206169
|
global eth0 valid\_lft forever preferred\_lft forever inet6 fe80::188a:84ff:feb0:26a5/64 scope link valid\_lft forever preferred\_lft forever ``` …then use `wget` to query the local webserver ```shell # Replace "10.0.170.92" with the IPv4 address of the Service named "clusterip" wget -qO - 10.0.170.92 ``` ``` CLIENT VALUES: client\_address=10.244.3.8 command=GET ... ``` The `client\_address` is always the client pod's IP address, whether the client pod and server pod are in the same node or in different nodes. ## Source IP for Services with `Type=NodePort` Packets sent to Services with [`Type=NodePort`](/docs/concepts/services-networking/service/#type-nodeport) are source NAT'd by default. You can test this by creating a `NodePort` Service: ```shell kubectl expose deployment source-ip-app --name=nodeport --port=80 --target-port=8080 --type=NodePort ``` The output is: ``` service/nodeport exposed ``` ```shell NODEPORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services nodeport) NODES=$(kubectl get nodes -o jsonpath='{ $.items[\*].status.addresses[?(@.type=="InternalIP")].address }') ``` If you're running on a cloud provider, you may need to open up a firewall-rule for the `nodes:nodeport` reported above. Now you can try reaching the Service from outside the cluster through the node port allocated above. ```shell for node in $NODES; do curl -s $node:$NODEPORT | grep -i client\_address; done ``` The output is similar to: ``` client\_address=10.180.1.1 client\_address=10.240.0.5 client\_address=10.240.0.3 ``` Note that these are not the correct client IPs, they're cluster internal IPs. This is what happens: \* Client sends packet to `node2:nodePort` \* `node2` replaces the source IP address (SNAT) in the packet with its own IP address \* `node2` replaces the destination IP on the packet with the pod IP \* packet is routed to node 1, and then to the endpoint \* the pod's reply is routed back to node2 \* the pod's reply is sent back to the client Visually: {{< figure src="/docs/images/tutor-service-nodePort-fig01.svg" alt="source IP nodeport figure 01" class="diagram-large" caption="Figure. Source IP Type=NodePort using SNAT" link="https://mermaid.live/edit#pako:eNqNkV9rwyAUxb-K3LysYEqS\_WFYKAzat9GHdW9zDxKvi9RoMIZtlH732ZjSbE970cu5v3s86hFqJxEYfHjRNeT5ZcUtIbXRaMNN2hZ5vrYRqt52cSXV-4iMSuwkZiYtyX739EqWaahMQ-V1qPxDVLNOvkYrO6fj2dupWMR2iiT6foOKdEZoS5Q2hmVSStoH7w7IMqXUVOefWoaG3XVftHbGeZYVRbH6ZXJ47CeL2-qhxvt\_ucTe1SUlpuMN6CX12XeGpLdJiaMMFFr0rdAyvvfxjHEIDbbIgcVSohKDCRy4PUV06KQIuJU6OA9MCdMjBTEEt\_-2NbDgB7xAGy3i97VJPP0ABRmcqg" >}} To avoid this, Kubernetes has a feature to [preserve the client source IP](/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip). If you set `service.spec.externalTrafficPolicy` to the value `Local`, kube-proxy only proxies proxy requests to local endpoints, and does not forward traffic to other nodes. This approach preserves the original source IP address. If there are no local endpoints, packets sent to the node are dropped, so you can rely on the correct source-ip in any packet processing rules you might apply a packet that make it through to the endpoint. Set the `service.spec.externalTrafficPolicy` field as follows: ```shell kubectl patch svc nodeport -p '{"spec":{"externalTrafficPolicy":"Local"}}' ``` The output is: ``` service/nodeport patched ``` Now, re-run the test: ```shell for node in $NODES; do curl --connect-timeout 1 -s $node:$NODEPORT | grep -i client\_address; done ``` The output is similar to: ``` client\_address=198.51.100.79 ``` Note that you only got one reply, with the \*right\* client IP, from the one node on which the endpoint pod is running. This is what happens: \* client sends packet to `node2:nodePort`, which doesn't have any endpoints \* packet is dropped \* client sends packet to `node1:nodePort`, which \*does\* have endpoints \* node1 routes packet to endpoint with the correct source IP Visually: {{< figure src="/docs/images/tutor-service-nodePort-fig02.svg" alt="source IP nodeport figure 02" class="diagram-large" caption="Figure. Source IP Type=NodePort preserves client source IP address" link="" >}} ## Source IP for Services with `Type=LoadBalancer` Packets sent to Services with [`Type=LoadBalancer`](/docs/concepts/services-networking/service/#loadbalancer) are source NAT'd by default, because all schedulable Kubernetes nodes in the `Ready` state are eligible for load-balanced traffic. So if packets arrive at a node without an endpoint, the system proxies it to a node \*with\* an endpoint, replacing the source IP on the packet with the IP of the node (as described in the previous section). You can test this by exposing the source-ip-app through a load balancer: ```shell kubectl expose deployment source-ip-app
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/source-ip.md
|
[
0.02479659952223301,
0.03804154321551323,
-0.0015743938274681568,
-0.016199937090277672,
0.06520216912031174,
0.002493880456313491,
-0.012373587116599083,
-0.025548825040459633,
0.002664904110133648,
0.010290676727890968,
0.018343470990657806,
-0.05045870319008827,
-0.014994327910244465,
-0.020951567217707634,
0.03354758024215698,
-0.0025429511442780495,
0.0577063225209713,
-0.008040978573262691,
0.06683523207902908,
-0.04205819591879845,
-0.016339000314474106,
0.05258439853787422,
0.0012946922797709703,
-0.030143093317747116,
-0.057000551372766495,
-0.05127425119280815,
-0.023717092350125313,
-0.012389409355819225,
0.07105907797813416,
-0.020761357620358467,
-0.04083944484591484,
0.08780990540981293,
-0.03597979620099068,
0.020473919808864594,
0.03880314156413078,
0.05996098741889,
0.02975378930568695,
-0.024081101641058922,
-0.04625814035534859,
0.045563071966171265,
0.11280402541160583,
-0.06857077777385712,
0.02006930112838745,
-0.09835343807935715,
0.03444135934114456,
-0.04213760048151016,
-0.03035677969455719,
0.062292248010635376,
0.0033799405209720135,
-0.04372594878077507,
-0.010937781073153019,
-0.044503480195999146,
0.059025172144174576,
0.026016442105174065,
0.03689472749829292,
-0.013817897066473961,
-0.048396036028862,
0.08522117882966995,
0.09901472181081772,
0.0017685055499896407,
-0.02723894640803337,
-0.02682788483798504,
0.07368291169404984,
0.01060995738953352,
-0.04162523150444031,
-0.014679236337542534,
-0.020441705361008644,
-0.0008177749114111066,
-0.018626630306243896,
-0.0354841873049736,
-0.023799829185009003,
0.019389446824789047,
-0.07837418466806412,
-0.021771056577563286,
0.006098390091210604,
0.09796944260597229,
0.03420986980199814,
0.07339195162057877,
-0.05194418504834175,
0.023996248841285706,
0.0038835788145661354,
-0.00983112957328558,
0.026912815868854523,
-0.005484782159328461,
-0.0987192764878273,
-0.04290372505784035,
-0.03852897137403488,
-0.03553517907857895,
-0.013459478504955769,
0.009267320856451988,
-0.04059947654604912,
0.026596764102578163,
-0.08720088005065918,
-0.06217017024755478,
0.06730109453201294,
0.06443428248167038,
0.03128654137253761,
-0.022709272801876068,
-0.03057008609175682,
-0.024664968252182007,
0.039317358285188675,
0.011187558993697166,
-0.03548285365104675,
0.01846008002758026,
-0.000650218513328582,
-0.07365002483129501,
-0.03673477843403816,
0.029283877462148666,
0.07426676154136658,
0.03843852877616882,
-0.018864315003156662,
-0.020334845408797264,
-0.006599898915737867,
0.008244652301073074,
-0.020225506275892258,
-0.024020018056035042,
0.030036253854632378,
-0.0014523259596899152,
-0.038377758115530014,
0.005545772146433592,
0.01100358460098505,
-0.035490360110998154,
0.01723676174879074,
0.05459662526845932,
-0.07550764083862305,
0.037740711122751236,
0.10057168453931808,
6.150934351782919e-33,
0.07321682572364807,
-0.048008695244789124,
0.04486667364835739,
-0.035564057528972626,
0.03497946634888649,
-0.0838962122797966,
0.022976387292146683,
-0.003539187600836158,
-0.06215817108750343,
-0.058683957904577255,
-0.07024242728948593,
0.04792512208223343,
0.046243924647569656,
-0.05291571095585823,
-0.045849502086639404,
0.06150892749428749,
0.004110520705580711,
0.048558302223682404,
0.12497782707214355,
0.05061637982726097,
0.004671869333833456,
-0.09428331255912781,
0.005108310841023922,
0.030350541695952415,
0.002633216790854931,
0.009325656108558178,
-0.03557097166776657,
-0.0754164382815361,
0.003630315884947777,
0.005169325042515993,
0.01693558134138584,
0.043203674256801605,
0.011078204959630966,
-0.01677735336124897,
-0.0652569830417633,
-0.03848151117563248,
0.0006424692692235112,
0.0038317893631756306,
-0.11265932768583298,
-0.05121273174881935,
0.022947996854782104,
0.006272805854678154,
0.008456137962639332,
-0.062289752066135406,
0.04791771620512009,
-0.03335312381386757,
-0.011208852753043175,
-0.10555756092071533,
0.04951038584113121,
0.04402817413210869,
-0.11221744865179062,
-0.05369475111365318,
-0.01643839105963707,
-0.04136757180094719,
0.08157983422279358,
0.05266392230987549,
0.03702806681394577,
0.06964673846960068,
-0.08653634041547775,
0.017688913270831108,
-0.01645849086344242,
0.03115236759185791,
-0.05442848429083824,
-0.026732303202152252,
0.06911236047744751,
0.04230842366814613,
-0.050584763288497925,
0.0338577926158905,
-0.041120726615190506,
0.08640080690383911,
0.010864044539630413,
0.059813786298036575,
0.08376788347959518,
0.11485046148300171,
0.03630494326353073,
-0.06745647639036179,
-0.051152702420949936,
-0.010628803633153439,
-0.047058895230293274,
0.028485897928476334,
0.02134600467979908,
0.013226444832980633,
-0.03154456242918968,
0.06326703727245331,
-0.0035860994830727577,
-0.05868138372898102,
0.023584650829434395,
0.0206814743578434,
0.03877316415309906,
0.05400121212005615,
-0.009917905554175377,
0.002989077242091298,
0.014429569244384766,
-0.020299460738897324,
-0.13217724859714508,
-6.896297687224069e-33,
0.062068212777376175,
0.01793663762509823,
-0.03287486732006073,
-0.030542396008968353,
-0.012276415713131428,
-0.033146120607852936,
0.014755805023014545,
0.04727005213499069,
-0.03804956004023552,
-0.0015050078509375453,
0.06623830646276474,
0.000939133286010474,
0.031656552106142044,
-0.04260014742612839,
-0.07772300392389297,
0.018747050315141678,
-0.03574100881814957,
-0.06232301890850067,
-0.013552791438996792,
0.020187240093946457,
-0.03634331375360489,
-0.03796852007508278,
0.03290152549743652,
0.00020473722543101758,
-0.0018004736630246043,
0.012019560672342777,
0.06288527697324753,
0.014418493956327438,
-0.19879655539989471,
-0.047101158648729324,
0.03417329862713814,
-0.0028016730211675167,
-0.0658872053027153,
0.0439576730132103,
-0.005878373980522156,
-0.003470082301646471,
-0.07266444712877274,
0.07122433930635452,
0.12362096458673477,
-0.02315140888094902,
0.013177763670682907,
-0.033909425139427185,
-0.10844702273607254,
-0.07391492277383804,
-0.03527887538075447,
-0.06520681083202362,
0.0155278155580163,
-0.0008557317196391523,
-0.010820697993040085,
-0.030598649755120277,
0.007896085269749165,
0.04545116424560547,
-0.032632116228342056,
0.10063096880912781,
-0.026348143815994263,
0.1134478747844696,
-0.02516709640622139,
0.08581066131591797,
-0.02128269150853157,
0.014679414220154285,
0.0748315155506134,
-0.11487648636102676,
-0.05948377400636673,
0.11770475655794144,
0.009295770898461342,
-0.034087035804986954,
-0.015389468520879745,
0.04858497902750969,
-0.004440790973603725,
-0.006148902699351311,
0.028830567374825478,
0.01680571958422661,
0.08737275004386902,
0.11893390864133835,
-0.006643704138696194,
0.022422006353735924,
0.06749903410673141,
0.02135385014116764,
0.026919087395071983,
0.016488416120409966,
-0.051164135336875916,
0.0688263401389122,
-0.0725521370768547,
-0.01804022304713726,
0.03840896859765053,
0.006059959996491671,
0.00773991085588932,
0.08724543452262878,
0.05627356097102165,
0.010300645604729652,
-0.06175147742033005,
-0.013392803259193897,
-0.08495579659938812,
0.01384784933179617,
0.03823167085647583,
-5.7158558774972335e-8,
-0.004443757236003876,
-0.0009928301442414522,
-0.06887035071849823,
0.05541129410266876,
0.010048194788396358,
0.09581196308135986,
0.017919177189469337,
-0.07758662849664688,
-0.08656777441501617,
0.018926644697785378,
-0.04373108595609665,
0.044628456234931946,
-0.07532450556755066,
0.020136289298534393,
0.03908868134021759,
-0.05163806304335594,
0.029199637472629547,
-0.023600058630108833,
0.050008952617645264,
-0.026426183059811592,
-0.061863139271736145,
-0.1126042827963829,
-0.007739370223134756,
-0.01754770427942276,
-0.0278132613748312,
0.03058730810880661,
0.0628853440284729,
-0.03278077393770218,
0.01861817203462124,
0.01223692111670971,
-0.048319973051548004,
-0.03642696142196655,
-0.088150255382061,
0.04945656657218933,
-0.046875592321157455,
0.04989059641957283,
-0.18904532492160797,
0.06176822632551193,
-0.027304185554385185,
0.09922804683446884,
-0.0001234317314811051,
0.09037982672452927,
-0.04424577206373215,
-0.07030237466096878,
0.006064324174076319,
0.06448107957839966,
-0.014486382715404034,
0.0968308225274086,
0.01344374567270279,
0.017715545371174812,
-0.041623957455158234,
-0.10136879235506058,
-0.007704591378569603,
0.0252827275544405,
0.045212164521217346,
-0.00904133077710867,
-0.05727130174636841,
-0.07716933637857437,
-0.03687822073698044,
0.019204260781407356,
-0.03151524439454079,
0.07399334013462067,
0.04389766976237297,
0.010864402167499065
] | 0.055091
|
node without an endpoint, the system proxies it to a node \*with\* an endpoint, replacing the source IP on the packet with the IP of the node (as described in the previous section). You can test this by exposing the source-ip-app through a load balancer: ```shell kubectl expose deployment source-ip-app --name=loadbalancer --port=80 --target-port=8080 --type=LoadBalancer ``` The output is: ``` service/loadbalancer exposed ``` Print out the IP addresses of the Service: ```console kubectl get svc loadbalancer ``` The output is similar to this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE loadbalancer LoadBalancer 10.0.65.118 203.0.113.140 80/TCP 5m ``` Next, send a request to this Service's external-ip: ```shell curl 203.0.113.140 ``` The output is similar to this: ``` CLIENT VALUES: client\_address=10.240.0.5 ... ``` However, if you're running on Google Kubernetes Engine/GCE, setting the same `service.spec.externalTrafficPolicy` field to `Local` forces nodes \*without\* Service endpoints to remove themselves from the list of nodes eligible for loadbalanced traffic by deliberately failing health checks. Visually:  You can test this by setting the annotation: ```shell kubectl patch svc loadbalancer -p '{"spec":{"externalTrafficPolicy":"Local"}}' ``` You should immediately see the `service.spec.healthCheckNodePort` field allocated by Kubernetes: ```shell kubectl get svc loadbalancer -o yaml | grep -i healthCheckNodePort ``` The output is similar to this: ```yaml healthCheckNodePort: 32122 ``` The `service.spec.healthCheckNodePort` field points to a port on every node serving the health check at `/healthz`. You can test this: ```shell kubectl get pod -o wide -l app=source-ip-app ``` The output is similar to this: ``` NAME READY STATUS RESTARTS AGE IP NODE source-ip-app-826191075-qehz4 1/1 Running 0 20h 10.180.1.136 kubernetes-node-6jst ``` Use `curl` to fetch the `/healthz` endpoint on various nodes: ```shell # Run this locally on a node you choose curl localhost:32122/healthz ``` ``` 1 Service Endpoints found ``` On a different node you might get a different result: ```shell # Run this locally on a node you choose curl localhost:32122/healthz ``` ``` No Service Endpoints Found ``` A controller running on the {{< glossary\_tooltip text="control plane" term\_id="control-plane" >}} is responsible for allocating the cloud load balancer. The same controller also allocates HTTP health checks pointing to this port/path on each node. Wait about 10 seconds for the 2 nodes without endpoints to fail health checks, then use `curl` to query the IPv4 address of the load balancer: ```shell curl 203.0.113.140 ``` The output is similar to this: ``` CLIENT VALUES: client\_address=198.51.100.79 ... ``` ## Cross-platform support Only some cloud providers offer support for source IP preservation through Services with `Type=LoadBalancer`. The cloud provider you're running on might fulfill the request for a loadbalancer in a few different ways: 1. With a proxy that terminates the client connection and opens a new connection to your nodes/endpoints. In such cases the source IP will always be that of the cloud LB, not that of the client. 2. With a packet forwarder, such that requests from the client sent to the loadbalancer VIP end up at the node with the source IP of the client, not an intermediate proxy. Load balancers in the first category must use an agreed upon protocol between the loadbalancer and backend to communicate the true client IP such as the HTTP [Forwarded](https://tools.ietf.org/html/rfc7239#section-5.2) or [X-FORWARDED-FOR](https://en.wikipedia.org/wiki/X-Forwarded-For) headers, or the [proxy protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). Load balancers in the second category can leverage the feature described above by creating an HTTP health check pointing at the port stored in the `service.spec.healthCheckNodePort` field on the Service. ## {{% heading "cleanup" %}} Delete the Services: ```shell kubectl delete svc -l app=source-ip-app ``` Delete the Deployment, ReplicaSet and Pod: ```shell kubectl delete deployment source-ip-app ``` ## {{% heading "whatsnext" %}} \* Learn more about [connecting
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/source-ip.md
|
[
-0.051021426916122437,
0.04859853535890579,
-0.016036177054047585,
-0.03766324371099472,
-0.012361717410385609,
-0.03805699944496155,
-0.012796614319086075,
-0.022879984229803085,
0.12019457668066025,
0.03554893285036087,
-0.04659462720155716,
-0.05231946334242821,
-0.006189484614878893,
-0.078090138733387,
0.08973104506731033,
-0.014034631662070751,
0.09069781750440598,
-0.011543625965714455,
0.06215671822428703,
-0.0648331418633461,
-0.07116450369358063,
0.030377089977264404,
-0.028906190767884254,
-0.020964693278074265,
-0.0649157166481018,
-0.02679656632244587,
-0.06572677195072174,
-0.006995655596256256,
0.036128174513578415,
-0.047245632857084274,
-0.024942023679614067,
0.017635351046919823,
-0.060224954038858414,
0.030689788982272148,
-0.03104545921087265,
0.06047043204307556,
0.06697861850261688,
-0.015228311531245708,
-0.12938927114009857,
0.0446261391043663,
0.08511483669281006,
-0.014920920133590698,
-0.062360819429159164,
-0.03177715465426445,
-0.01717674918472767,
0.0222316961735487,
-0.056271765381097794,
-0.012647447176277637,
-0.0014646415365859866,
-0.06126158684492111,
-0.007080871611833572,
-0.09465901553630829,
0.015689972788095474,
0.052294161170721054,
-0.014029229059815407,
-0.02442496456205845,
0.0281213391572237,
0.046539463102817535,
0.10078932344913483,
0.055836088955402374,
-0.0223105326294899,
-0.056846022605895996,
0.048885446041822433,
0.0022475076839327812,
-0.023447535932064056,
-0.06820942461490631,
-0.011459330096840858,
0.04733700305223465,
0.009560542181134224,
-0.056344520300626755,
0.047612741589546204,
-0.0017009892035275698,
-0.1051681786775589,
-0.032224055379629135,
0.005664611700922251,
0.06220991536974907,
-0.006275553721934557,
0.011683872900903225,
0.02443934977054596,
-0.04137903079390526,
0.0242787953466177,
0.017517175525426865,
-0.013182329945266247,
0.06772510707378387,
-0.11957176774740219,
0.0005677624139934778,
-0.01216665469110012,
-0.10346326231956482,
0.07226598262786865,
0.08587294816970825,
-0.017250560224056244,
-0.023522187024354935,
-0.040781211107969284,
-0.07423878461122513,
0.051605481654405594,
0.04892310872673988,
0.009682437404990196,
0.04780317470431328,
-0.03419656679034233,
-0.02208414487540722,
0.08257623016834259,
-0.017947476357221603,
0.02506752870976925,
-0.005503371357917786,
-0.00005189343573874794,
-0.043411485850811005,
-0.06457009166479111,
0.015077435411512852,
0.08736149221658707,
0.07041377574205399,
-0.04159992188215256,
-0.01052792090922594,
-0.027998318895697594,
-0.059879641979932785,
-0.016991887241601944,
-0.014789802953600883,
0.11463375389575958,
-0.038384586572647095,
-0.0364338681101799,
0.034609049558639526,
0.017735783010721207,
-0.053792644292116165,
-0.02653919719159603,
0.048551566898822784,
-0.03455006703734398,
0.013743158429861069,
0.04138806834816933,
1.1832480648107955e-35,
0.036661744117736816,
-0.09592946618795395,
0.07261274009943008,
0.0010909709380939603,
0.0033768792636692524,
-0.02913309819996357,
-0.007164284586906433,
0.005481839645653963,
-0.05887208506464958,
-0.013749449513852596,
-0.08558622747659683,
0.039688076823949814,
0.049027446657419205,
0.009429327212274075,
-0.0022405527997761965,
0.05348045006394386,
-0.023639025166630745,
0.027446409687399864,
0.10232876986265182,
0.016688864678144455,
0.05623151361942291,
-0.10686582326889038,
-0.039015572518110275,
-0.02734135091304779,
0.010210946202278137,
-0.042636893689632416,
-0.02031804621219635,
-0.06380216032266617,
-0.030379552394151688,
0.0010602478869259357,
0.03748593479394913,
0.039017967879772186,
0.03720840439200401,
0.009888770058751106,
-0.05476178228855133,
-0.04725830629467964,
0.05773390829563141,
0.033847626298666,
-0.10814578086137772,
0.007094486616551876,
0.03373749181628227,
-0.020913831889629364,
-0.03210822120308876,
-0.026695135980844498,
0.05720708891749382,
-0.062003329396247864,
-0.038789354264736176,
-0.08835291862487793,
0.06648357212543488,
0.030489102005958557,
-0.02367759309709072,
-0.010013945400714874,
0.049977097660303116,
-0.008277133107185364,
0.09874672442674637,
0.08446497470140457,
0.08669374883174896,
-0.027716470882296562,
-0.12152212858200073,
0.03906134516000748,
-0.004515230655670166,
0.028110170736908913,
-0.045186787843704224,
0.03112342394888401,
0.07660388201475143,
0.031470559537410736,
-0.0061029051430523396,
0.03947064280509949,
-0.06129651516675949,
0.08174705505371094,
-0.035854410380125046,
0.02810485288500786,
0.02046593464910984,
0.07872475683689117,
-0.03209056705236435,
-0.04784761741757393,
-0.05836350470781326,
0.019063860177993774,
-0.02525070495903492,
0.05582549422979355,
-0.005140334367752075,
-0.016686400398612022,
-0.024862999096512794,
0.06769928336143494,
-0.024050526320934296,
-0.0037599445786327124,
0.007642404641956091,
-0.05442426726222038,
0.010614498518407345,
0.032400429248809814,
0.010427533648908138,
-0.03993338719010353,
-0.07205000519752502,
0.039118293672800064,
-0.12165986746549606,
-3.067633057056206e-33,
0.007857004180550575,
0.024373888969421387,
-0.04603879153728485,
-0.019084352999925613,
0.024478083476424217,
0.019665103405714035,
0.020444348454475403,
0.09528547525405884,
-0.0032658560667186975,
0.08435977250337601,
-0.0001970544981304556,
-0.026515934616327286,
0.02083871327340603,
0.034545812755823135,
-0.025428928434848785,
0.0026145917363464832,
-0.09081663936376572,
-0.0045005097053945065,
-0.10842937976121902,
0.02015729434788227,
-0.06128109619021416,
-0.00503350468352437,
0.11975868046283722,
-0.021632002666592598,
-0.014134182594716549,
-0.04752102494239807,
0.043878234922885895,
0.011662067845463753,
-0.12903788685798645,
-0.04395349696278572,
0.014327547512948513,
-0.03849828243255615,
-0.003564199199900031,
0.04197458177804947,
-0.018501274287700653,
-0.0034319062251597643,
-0.022025391459465027,
0.07284481078386307,
0.08369319140911102,
-0.10719705373048782,
-0.05550958961248398,
0.024375909939408302,
-0.07078571617603302,
0.0007738038548268378,
-0.05385914444923401,
-0.018965808674693108,
-0.0029541696421802044,
0.01972845382988453,
0.0039645531214773655,
-0.07531265914440155,
-0.007912327535450459,
0.020286444574594498,
-0.060926374047994614,
0.21199257671833038,
-0.03657666966319084,
0.04693472385406494,
0.0073966942727565765,
0.1202298253774643,
-0.026655403897166252,
0.0006488341023214161,
0.0756874680519104,
-0.11934598535299301,
-0.044910091906785965,
0.014307583682239056,
0.04456451162695885,
-0.03923998773097992,
0.04569675773382187,
0.035653602331876755,
-0.02636527642607689,
-0.04313012212514877,
0.010766432620584965,
0.009525992907583714,
0.028838463127613068,
0.05897364020347595,
0.005726332310587168,
-0.02742878720164299,
0.06707322597503662,
-0.024589715525507927,
0.013023157604038715,
0.03024054877460003,
-0.062349360436201096,
0.030703436583280563,
-0.08479224145412445,
-0.03281475603580475,
0.06883791089057922,
-0.009311700239777565,
0.001770279137417674,
0.06328865140676498,
0.06674887239933014,
0.05001680925488472,
-0.03871665522456169,
0.04093456268310547,
-0.08599808812141418,
0.060588911175727844,
0.03397656977176666,
-4.836136113794964e-8,
0.045495759695768356,
0.009602080099284649,
-0.04552861303091049,
0.028867939487099648,
-0.043847110122442245,
0.030808981508016586,
0.014114174991846085,
-0.03519955649971962,
-0.06798075884580612,
0.07179827243089676,
-0.05037450045347214,
0.05371645465493202,
-0.04145093634724617,
-0.0029517223592847586,
0.07612895220518112,
-0.02977476269006729,
0.027506845071911812,
0.0004126103303860873,
0.04049878939986229,
-0.06982336193323135,
-0.07528071850538254,
-0.033886976540088654,
-0.010507442988455296,
0.007563112303614616,
-0.019215205684304237,
0.03437402844429016,
0.038476161658763885,
-0.00030314575997181237,
0.016531936824321747,
-0.012987520545721054,
-0.04669833555817604,
0.004298804793506861,
-0.062133125960826874,
-0.00462339585646987,
-0.03824566677212715,
0.0878392681479454,
-0.12846414744853973,
0.04025411978363991,
-0.0023100334219634533,
0.11876966059207916,
-0.023131800815463066,
0.02152881771326065,
-0.04160861298441887,
-0.0008301999187096953,
0.037211060523986816,
0.09772619605064392,
-0.016314003616571426,
0.08995093405246735,
-0.00817924551665783,
-0.013529093004763126,
0.013370562344789505,
-0.06180642172694206,
0.013011693954467773,
0.007163365837186575,
-0.02544051595032215,
0.025439029559493065,
-0.06911775469779968,
-0.0708998292684555,
-0.026261378079652786,
0.09720257669687271,
0.02781546488404274,
0.0421646349132061,
0.017290621995925903,
0.012968402355909348
] | 0.163917
|
check pointing at the port stored in the `service.spec.healthCheckNodePort` field on the Service. ## {{% heading "cleanup" %}} Delete the Services: ```shell kubectl delete svc -l app=source-ip-app ``` Delete the Deployment, ReplicaSet and Pod: ```shell kubectl delete deployment source-ip-app ``` ## {{% heading "whatsnext" %}} \* Learn more about [connecting applications via services](/docs/tutorials/services/connect-applications-service/) \* Read how to [Create an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/source-ip.md
|
[
0.003954125102609396,
0.010725006461143494,
-0.04142233729362488,
-0.06544628739356995,
-0.0249344389885664,
-0.07237736880779266,
-0.0019798728171736,
-0.014900295995175838,
0.06401023268699646,
0.06798064708709717,
-0.026827247813344002,
0.0016273428918793797,
-0.007027623243629932,
-0.04607163369655609,
0.040247462689876556,
-0.017895281314849854,
0.08128146082162857,
-0.05076729133725166,
0.01617284305393696,
0.005147155839949846,
-0.05869560316205025,
-0.011183052323758602,
0.02733057551085949,
0.03000577539205551,
-0.05783723667263985,
-0.024143915623426437,
-0.034979499876499176,
-0.020248563960194588,
-0.008523979224264622,
-0.03368200361728668,
-0.014732524752616882,
0.04077387973666191,
-0.019166383892297745,
-0.02032928727567196,
0.05142636224627495,
0.09438659995794296,
0.053845737129449844,
-0.014144960790872574,
-0.13360802829265594,
0.0022762813605368137,
0.0750875174999237,
-0.055864617228507996,
-0.08252885192632675,
0.007620282005518675,
0.0017104424769058824,
-0.0029729227535426617,
-0.09542150050401688,
-0.01729235053062439,
0.053685251623392105,
-0.016019346192479134,
0.002128681866452098,
-0.07967416942119598,
0.028023922815918922,
0.07785878330469131,
0.013950425200164318,
-0.0014750217087566853,
0.016287412494421005,
0.06533097475767136,
0.02260473556816578,
0.029682934284210205,
0.08514798432588577,
-0.02992311492562294,
0.04270286113023758,
-0.008888322860002518,
-0.03541067615151405,
-0.02201298251748085,
0.024062147364020348,
0.033028390258550644,
0.01459532417356968,
-0.04084528610110283,
-0.02059725485742092,
0.045664429664611816,
-0.032087292522192,
-0.057571522891521454,
-0.033587537705898285,
0.09834380447864532,
-0.006421403493732214,
-0.04977668821811676,
0.04542079567909241,
-0.06839265674352646,
-0.020451689139008522,
0.02999739721417427,
0.008651183918118477,
0.05713904649019241,
-0.11846664547920227,
0.02872079238295555,
-0.010066542774438858,
-0.0981750339269638,
0.04208553582429886,
0.019409267231822014,
0.007212502416223288,
-0.002029528608545661,
-0.0035617442335933447,
-0.1430426388978958,
0.0024898098781704903,
0.006939780432730913,
-0.04136551544070244,
0.053650785237550735,
-0.01022813469171524,
-0.008901577442884445,
0.049597494304180145,
-0.014542968943715096,
0.024217456579208374,
0.03491586446762085,
0.026285357773303986,
-0.04986678063869476,
-0.04339814558625221,
0.0013566702837124467,
0.07392234355211258,
0.07330886274576187,
-0.0002704646030906588,
0.03410336747765541,
-0.0016079982742667198,
0.02652333676815033,
-0.012210305780172348,
0.07771982997655869,
0.057553693652153015,
-0.033584609627723694,
-0.027899760752916336,
0.07347480207681656,
0.019802594557404518,
-0.08424010127782822,
-0.03256821632385254,
0.010370912961661816,
-0.03699493780732155,
0.05165360867977142,
0.040501050651073456,
6.375125437932337e-36,
0.02019449882209301,
-0.07608349621295929,
0.09051593393087387,
0.016991252079606056,
0.057349804788827896,
-0.07925603538751602,
-0.05189809203147888,
-0.03551647439599037,
-0.023414745926856995,
-0.026401255279779434,
-0.07781482487916946,
0.06554562598466873,
0.025819862261414528,
-0.04024817794561386,
-0.03633856773376465,
-0.039314668625593185,
-0.059258971363306046,
0.06885409355163574,
0.12696687877178192,
-0.037053368985652924,
0.06574737280607224,
-0.1524607092142105,
-0.07078378647565842,
-0.04135018214583397,
0.004122474696487188,
0.03685383126139641,
0.020836248993873596,
-0.05128214880824089,
0.010001846589148045,
0.0068712783977389336,
0.022287622094154358,
0.02556893602013588,
0.010592902079224586,
0.006436171010136604,
-0.10929527878761292,
-0.041539404541254044,
0.015991194173693657,
0.0428432933986187,
-0.11818590760231018,
0.025256840512156487,
0.038821738213300705,
-0.021912336349487305,
-0.025701921433210373,
-0.016992537304759026,
0.06697797775268555,
-0.02917591854929924,
0.04784146696329117,
-0.05210897698998451,
0.09567315876483917,
0.027236470952630043,
-0.017382442951202393,
-0.09180303663015366,
0.022305157035589218,
-0.01890818402171135,
0.04654465615749359,
0.0625607818365097,
0.07592692971229553,
-0.03726029768586159,
-0.08074989169836044,
-0.028435729444026947,
-0.015301007777452469,
0.015906857326626778,
-0.04804353043437004,
0.027941744774580002,
0.08319824934005737,
0.04536478966474533,
-0.02051185816526413,
0.007891640067100525,
-0.04278846085071564,
0.011185466311872005,
-0.06428982317447662,
0.03483472764492035,
-0.008978147059679031,
0.033653125166893005,
-0.03921138867735863,
-0.040105924010276794,
-0.026670558378100395,
0.04310920834541321,
-0.12425680458545685,
0.07323674112558365,
0.028363095596432686,
-0.013763726688921452,
-0.05769498273730278,
0.05984586849808693,
-0.0031896689906716347,
-0.029169507324695587,
0.014681020751595497,
-0.04335012286901474,
-0.048092663288116455,
0.02753607928752899,
-0.023855013772845268,
0.00135223928373307,
0.0018064472824335098,
0.0199957937002182,
-0.10345962643623352,
-2.59994132374645e-33,
0.05212654545903206,
0.007324165664613247,
0.02960611693561077,
-0.013206948526203632,
0.04019782692193985,
0.024129685014486313,
0.036747708916664124,
0.12848016619682312,
-0.01204380951821804,
0.019091585651040077,
0.00717061385512352,
-0.03266239911317825,
0.0489785261452198,
0.0100453682243824,
-0.0715121477842331,
0.05138862505555153,
-0.03724380210042,
-0.007548581808805466,
-0.055021949112415314,
0.07347871363162994,
-0.05353955551981926,
0.020249774679541588,
0.11346805095672607,
0.04060358181595802,
-0.04628396034240723,
-0.023360973224043846,
0.044765688478946686,
-0.016582511365413666,
-0.08378969132900238,
-0.06751243025064468,
0.01979953609406948,
-0.03208824619650841,
0.00965774804353714,
0.009449971839785576,
-0.01495704147964716,
-0.01576751098036766,
-0.02890665829181671,
0.06802704930305481,
0.038911864161491394,
-0.05801878869533539,
0.04437171295285225,
-0.024847203865647316,
-0.10688938200473785,
-0.014650851488113403,
-0.05539701133966446,
-0.0457666777074337,
-0.0064835757948458195,
-0.04060586541891098,
-0.040358640253543854,
-0.05061252787709236,
0.0008983610314317048,
-0.04557330161333084,
-0.07943374663591385,
0.15949657559394836,
-0.015880240127444267,
0.14251278340816498,
0.05902714282274246,
0.07881423085927963,
-0.08705046772956848,
-0.012833035551011562,
0.10078587383031845,
-0.11290089040994644,
-0.03313102945685387,
0.01653791218996048,
0.046168532222509384,
-0.01712946966290474,
0.03913841396570206,
0.06738212704658508,
0.009993191808462143,
0.019295785576105118,
-0.05908501520752907,
0.04041609913110733,
0.03371236473321915,
0.049102962017059326,
-0.00134190428070724,
-0.0515969842672348,
0.02178909070789814,
-0.0631202682852745,
-0.026982057839632034,
0.021933741867542267,
-0.04399688541889191,
0.03036942332983017,
-0.06417831778526306,
-0.055373676121234894,
0.049246590584516525,
0.011852740310132504,
0.03150288760662079,
0.05648372694849968,
0.06993091851472855,
0.07790134847164154,
-0.09286308288574219,
0.010675259865820408,
-0.027754101902246475,
0.05620477721095085,
-0.053492117673158646,
-4.1128508598831104e-8,
0.06943944841623306,
0.011591539718210697,
-0.010845836251974106,
0.10131677240133286,
-0.024068009108304977,
-0.037374574691057205,
0.007008539978414774,
0.020726744085550308,
-0.02988830767571926,
0.0371859148144722,
-0.09420693665742874,
0.11342617124319077,
-0.09506025165319443,
0.03830234333872795,
0.06923999637365341,
-0.05930906906723976,
0.007938981056213379,
0.026780422776937485,
0.015663428232073784,
-0.07870457321405411,
-0.058526597917079926,
-0.07771072536706924,
0.03182731568813324,
0.01721326634287834,
0.024576932191848755,
0.06555025279521942,
0.03853011876344681,
-0.07236076146364212,
0.06337986886501312,
0.01607569120824337,
-0.04329850524663925,
-0.016135243698954582,
-0.06737466901540756,
0.020407460629940033,
-0.052021197974681854,
0.05979451164603233,
-0.10951259732246399,
0.0536755733191967,
0.012213997542858124,
0.09515342861413956,
-0.008987235836684704,
0.06492340564727783,
-0.07319041341543198,
-0.01864060014486313,
0.027293846011161804,
0.04674805700778961,
-0.05512361228466034,
0.0811334177851677,
-0.0037922027986496687,
0.012321952730417252,
-0.011203295551240444,
-0.041725628077983856,
0.035040099173784256,
-0.016235223039984703,
-0.018430037423968315,
0.015851160511374474,
-0.007683183997869492,
-0.033548351377248764,
-0.026953157037496567,
0.05853959545493126,
0.019249755889177322,
0.008289823308587074,
0.015930624678730965,
-0.041983045637607574
] | 0.176454
|
## The Kubernetes model for connecting containers Now that you have a continuously running, replicated application you can expose it on a network. Kubernetes assumes that pods can communicate with other pods, regardless of which host they land on. Kubernetes gives every pod its own cluster-private IP address, so you do not need to explicitly create links between pods or map container ports to host ports. This means that containers within a Pod can all reach each other's ports on localhost, and all pods in a cluster can see each other without NAT. The rest of this document elaborates on how you can run reliable services on such a networking model. This tutorial uses a simple nginx web server to demonstrate the concept. ## Exposing pods to the cluster We did this in a previous example, but let's do it once again and focus on the networking perspective. Create an nginx Pod, and note that it has a container port specification: {{% code\_sample file="service/networking/run-my-nginx.yaml" %}} This makes it accessible from any node in your cluster. Check the nodes the Pod is running on: ```shell kubectl apply -f ./run-my-nginx.yaml kubectl get pods -l run=my-nginx -o wide ``` ``` NAME READY STATUS RESTARTS AGE IP NODE my-nginx-3800858182-jr4a2 1/1 Running 0 13s 10.244.3.4 kubernetes-minion-905m my-nginx-3800858182-kna2y 1/1 Running 0 13s 10.244.2.5 kubernetes-minion-ljyd ``` Check your pods' IPs: ```shell kubectl get pods -l run=my-nginx -o custom-columns=POD\_IP:.status.podIPs POD\_IP [map[ip:10.244.3.4]] [map[ip:10.244.2.5]] ``` You should be able to ssh into any node in your cluster and use a tool such as `curl` to make queries against both IPs. Note that the containers are \*not\* using port 80 on the node, nor are there any special NAT rules to route traffic to the pod. This means you can run multiple nginx pods on the same node all using the same `containerPort`, and access them from any other pod or node in your cluster using the assigned IP address for the pod. If you want to arrange for a specific port on the host Node to be forwarded to backing Pods, you can - but the networking model should mean that you do not need to do so. You can read more about the [Kubernetes Networking Model](/docs/concepts/cluster-administration/networking/#the-kubernetes-network-model) if you're curious. ## Creating a Service So we have pods running nginx in a flat, cluster wide, address space. In theory, you could talk to these pods directly, but what happens when a node dies? The pods die with it, and the ReplicaSet inside the Deployment will create new ones, with different IPs. This is the problem a Service solves. A Kubernetes Service is an abstraction which defines a logical set of Pods running somewhere in your cluster, that all provide the same functionality. When created, each Service is assigned a unique IP address (also called clusterIP). This address is tied to the lifespan of the Service, and will not change while the Service is alive. Pods can be configured to talk to the Service, and know that communication to the Service will be automatically load-balanced out to some pod that is a member of the Service. You can create a Service for your 2 nginx replicas with `kubectl expose`: ```shell kubectl expose deployment/my-nginx ``` ``` service/my-nginx exposed ``` This is equivalent to `kubectl apply -f` in the following yaml: {{% code\_sample file="service/networking/nginx-svc.yaml" %}} This specification will create a Service which targets TCP port 80 on any Pod with the `run: my-nginx` label, and expose it on an abstracted Service port (`targetPort`: is the port the container accepts traffic on, `port`: is the abstracted Service port, which can be any port other
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/connect-applications-service.md
|
[
0.009668848477303982,
-0.001831347937695682,
0.013656988739967346,
0.03194480761885643,
-0.03865789249539375,
0.011065407656133175,
-0.021431520581245422,
-0.024876896291971207,
-0.010507768020033836,
0.029949644580483437,
-0.08853691816329956,
-0.006436885800212622,
-0.004854952450841665,
-0.03802889212965965,
0.04599322751164436,
-0.043956857174634933,
0.10549177974462509,
0.04980653151869774,
0.0015097340801730752,
-0.0713694840669632,
-0.07261079549789429,
0.024019978940486908,
0.015157455578446388,
0.0063434564508497715,
-0.047126248478889465,
0.04465511068701744,
0.015054171904921532,
-0.04600485786795616,
0.034144848585128784,
-0.0028705447912216187,
-0.040523894131183624,
-0.038565121591091156,
-0.042140450328588486,
0.028515849262475967,
-0.01376713439822197,
0.05192216485738754,
0.04461359605193138,
-0.04193337634205818,
-0.08489494025707245,
0.03377118706703186,
0.08246567100286484,
-0.06150919198989868,
-0.0695762187242508,
-0.06274467706680298,
-0.0214234571903944,
-0.06127596274018288,
-0.04836459830403328,
-0.0035258636344224215,
0.02880742959678173,
-0.025083884596824646,
-0.022133616730570793,
-0.13486778736114502,
0.03772203251719475,
0.08741660416126251,
0.009001847356557846,
-0.00981529988348484,
-0.029557205736637115,
-0.017915477976202965,
0.03958956524729729,
0.061037663370370865,
0.09624801576137543,
-0.013688654638826847,
0.06597471237182617,
-0.009993822313845158,
0.03914419934153557,
0.012851282954216003,
0.004693902563303709,
0.06311964243650436,
0.03222447633743286,
-0.034093186259269714,
0.07559991627931595,
0.026462076231837273,
-0.00785026140511036,
-0.005966191180050373,
-0.05364835262298584,
-0.01891433820128441,
-0.003473387798294425,
-0.004804437048733234,
-0.03142822906374931,
0.07761763036251068,
0.032407842576503754,
0.06448064744472504,
0.05392593517899513,
0.02640353888273239,
-0.11288373917341232,
-0.05662376061081886,
0.05175410583615303,
-0.04078295826911926,
0.030461283400654793,
-0.06333773583173752,
-0.04672176390886307,
0.02787918597459793,
-0.000878343649674207,
-0.11199835687875748,
0.08912045508623123,
0.0009154231520369649,
-0.013509822078049183,
-0.04876035451889038,
0.027081560343503952,
0.009861077181994915,
0.057012494653463364,
-0.013883128762245178,
0.02533002756536007,
-0.07387211173772812,
0.04587774723768234,
-0.007601902354508638,
-0.03865492343902588,
-0.0573904775083065,
0.0917876735329628,
0.08461643010377884,
-0.03835555911064148,
-0.019467437639832497,
-0.03787413239479065,
0.0905429944396019,
-0.05373819172382355,
-0.03375011309981346,
0.025058884173631668,
-0.03394746780395508,
0.05345385894179344,
0.0703742504119873,
0.04646121710538864,
-0.07458394020795822,
0.030837194994091988,
0.024084776639938354,
0.018382340669631958,
0.032194290310144424,
0.006535332649946213,
5.051693584814504e-33,
0.00020258034055586904,
-0.05249117314815521,
0.02256828360259533,
-0.02757236734032631,
0.09292834252119064,
-0.10929390043020248,
-0.020168287679553032,
-0.04977983608841896,
-0.040320735424757004,
-0.036007653921842575,
-0.04858545958995819,
0.13094867765903473,
0.04158669337630272,
-0.007796160876750946,
0.044025495648384094,
0.005751788150519133,
-0.04630707576870918,
-0.03251194953918457,
0.15457047522068024,
0.024838056415319443,
0.037701308727264404,
-0.09625236690044403,
-0.009128779172897339,
0.047231998294591904,
0.06391427665948868,
-0.04283388704061508,
0.017339404672384262,
-0.10015235096216202,
0.0008007977157831192,
-0.002929710317403078,
0.03554617986083031,
0.02916765958070755,
0.006235473323613405,
0.01637561246752739,
-0.09390590339899063,
-0.01067430805414915,
-0.047908272594213486,
-0.012785088270902634,
-0.059656038880348206,
-0.007938138209283352,
-0.025038588792085648,
-0.02656821347773075,
-0.0047577484510838985,
-0.044942595064640045,
0.019041847437620163,
0.013344348408281803,
0.025635268539190292,
-0.07321228086948395,
0.0057568675838410854,
-0.00556894950568676,
0.0014518568059429526,
-0.057802047580480576,
-0.05454830825328827,
0.015462495386600494,
0.034708939492702484,
0.05848634988069534,
0.05037601292133331,
0.0094915134832263,
-0.05824624001979828,
0.007612199988216162,
-0.02491173706948757,
-0.07944025099277496,
-0.013854457065463066,
0.004656337667256594,
0.0075762635096907616,
0.052651748061180115,
-0.003497677156701684,
0.05774625763297081,
0.02655044011771679,
0.010441716760396957,
-0.04558112472295761,
0.037163227796554565,
-0.04531616345047951,
0.029715031385421753,
-0.01076920609921217,
-0.006314826663583517,
-0.0030063933227211237,
-0.0006734731723554432,
-0.0460403710603714,
0.0440998300909996,
-0.003184460336342454,
-0.02723235823214054,
-0.1011335551738739,
0.13884243369102478,
-0.0120095144957304,
-0.05143363028764725,
-0.005449180491268635,
0.02712302841246128,
-0.0690937414765358,
0.06135105341672897,
0.003750391071662307,
0.039950139820575714,
0.002702383790165186,
-0.029541121795773506,
-0.07142529636621475,
-5.455871888981393e-33,
0.07171916216611862,
0.018651103600859642,
-0.04581243172287941,
0.036846160888671875,
0.028350818902254105,
-0.02832871675491333,
-0.020784450694918633,
0.07723574340343475,
-0.02275768853724003,
-0.038847703486680984,
-0.07821668684482574,
-0.05058782920241356,
0.0822528824210167,
0.09411849826574326,
-0.14143149554729462,
-0.022905997931957245,
-0.006170487962663174,
-0.06858743727207184,
-0.0131065733730793,
0.011589792557060719,
-0.031117722392082214,
0.015672003850340843,
0.04603707417845726,
-0.02428985945880413,
-0.029577627778053284,
0.05043531954288483,
0.030579982325434685,
-0.05367309972643852,
-0.12861935794353485,
-0.031583379954099655,
0.0018062440212816,
-0.0753297433257103,
0.0625123605132103,
-0.03096715360879898,
0.015088994987308979,
0.031072817742824554,
0.013259517960250378,
0.02400618977844715,
0.03776181489229202,
-0.11406949162483215,
0.04793049395084381,
-0.0363570936024189,
-0.0768360123038292,
-0.10528583079576492,
-0.08376764506101608,
0.013922621496021748,
-0.04749016463756561,
0.03389493748545647,
-0.1005643680691719,
-0.041724853217601776,
-0.027846217155456543,
0.024308769032359123,
-0.10340546071529388,
0.05154439061880112,
-0.05402433127164841,
0.03495199605822563,
-0.005389702972024679,
0.08245308697223663,
-0.022073060274124146,
0.10982025414705276,
0.06982690840959549,
-0.11203820258378983,
0.025208210572600365,
0.09089667350053787,
-0.009513256140053272,
-0.02190246805548668,
-0.024493051692843437,
0.02863507904112339,
0.016066115349531174,
0.07815707474946976,
0.018223583698272705,
0.0413300059735775,
0.04202406853437424,
0.13177822530269623,
-0.06742870062589645,
-0.0030285019893199205,
0.0674440786242485,
-0.021941322833299637,
0.06819279491901398,
-0.028248600661754608,
-0.04142148047685623,
0.06214548274874687,
-0.06305108964443207,
-0.028787165880203247,
0.09057322144508362,
0.08893387019634247,
0.10711771994829178,
-0.009257243946194649,
0.0837937518954277,
0.034291017800569534,
-0.009285497479140759,
-0.006254088133573532,
-0.06972909718751907,
0.03261994197964668,
-0.04650439694523811,
-4.9229083032287235e-8,
0.04544610530138016,
0.04580466449260712,
-0.039449237287044525,
0.05483987554907799,
-0.058984555304050446,
0.012505479156970978,
0.06956068426370621,
-0.07391419261693954,
-0.012415110133588314,
0.043276894837617874,
-0.07367260754108429,
0.021465513855218887,
-0.09009087830781937,
0.029253743588924408,
0.008061564527451992,
0.05349086970090866,
0.03560662642121315,
0.009276404045522213,
0.015538745559751987,
-0.032661132514476776,
-0.055719658732414246,
-0.025499504059553146,
-0.00315072201192379,
0.08493323624134064,
-0.026140058413147926,
0.1164240837097168,
0.07982951402664185,
-0.013099445961415768,
0.013402508571743965,
0.0037838981952518225,
-0.010000868700444698,
-0.005590065848082304,
-0.03244420513510704,
0.06509511172771454,
-0.06285133212804794,
0.025786982849240303,
-0.15233580768108368,
0.03261123597621918,
0.002112713409587741,
0.00573136517778039,
-0.030856413766741753,
-0.014805220998823643,
-0.04089581221342087,
-0.0529109463095665,
0.014985918998718262,
0.050250403583049774,
0.02534274011850357,
0.04990921542048454,
-0.021448593586683273,
0.035566456615924835,
0.030949708074331284,
-0.04400312155485153,
0.010702873580157757,
0.043838709592819214,
0.04378214105963707,
0.019991431385278702,
-0.02166377194225788,
-0.011197113431990147,
0.022090384736657143,
0.029620341956615448,
-0.028633011505007744,
0.05380024388432503,
0.01732533425092697,
0.01037916261702776
] | 0.210115
|
file="service/networking/nginx-svc.yaml" %}} This specification will create a Service which targets TCP port 80 on any Pod with the `run: my-nginx` label, and expose it on an abstracted Service port (`targetPort`: is the port the container accepts traffic on, `port`: is the abstracted Service port, which can be any port other pods use to access the Service). View [Service](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core) API object to see the list of supported fields in service definition. Check your Service: ```shell kubectl get svc my-nginx ``` ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-nginx ClusterIP 10.0.162.149 80/TCP 21s ``` As mentioned previously, a Service is backed by a group of Pods. These Pods are exposed through {{}}. The Service's selector will be evaluated continuously and the results will be POSTed to an EndpointSlice that is connected to the Service using {{< glossary\_tooltip text="labels" term\_id="label" >}}. When a Pod dies, it is automatically removed from the EndpointSlices that contain it as an endpoint. New Pods that match the Service's selector will automatically get added to an EndpointSlice for that Service. Check the endpoints, and note that the IPs are the same as the Pods created in the first step: ```shell kubectl describe svc my-nginx ``` ``` Name: my-nginx Namespace: default Labels: run=my-nginx Annotations: Selector: run=my-nginx Type: ClusterIP IP Family Policy: SingleStack IP Families: IPv4 IP: 10.0.162.149 IPs: 10.0.162.149 Port: 80/TCP TargetPort: 80/TCP Endpoints: 10.244.2.5:80,10.244.3.4:80 Session Affinity: None Events: ``` ```shell kubectl get endpointslices -l kubernetes.io/service-name=my-nginx ``` ``` NAME ADDRESSTYPE PORTS ENDPOINTS AGE my-nginx-7vzhx IPv4 80 10.244.2.5,10.244.3.4 21s ``` You should now be able to curl the nginx Service on `:` from any node in your cluster. Note that the Service IP is completely virtual, it never hits the wire. If you're curious about how this works you can read more about the [service proxy](/docs/reference/networking/virtual-ips/). ## Accessing the Service Kubernetes supports 2 primary modes of finding a Service - environment variables and DNS. The former works out of the box while the latter requires the [CoreDNS cluster addon](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/cluster/addons/dns/coredns). {{< note >}} If the service environment variables are not desired (because possible clashing with expected program ones, too many variables to process, only using DNS, etc) you can disable this mode by setting the `enableServiceLinks` flag to `false` on the [pod spec](/docs/reference/generated/kubernetes-api/v{{< skew latestVersion >}}/#pod-v1-core). {{< /note >}} ### Environment Variables When a Pod runs on a Node, the kubelet adds a set of environment variables for each active Service. This introduces an ordering problem. To see why, inspect the environment of your running nginx Pods (your Pod name will be different): ```shell kubectl exec my-nginx-3800858182-jr4a2 -- printenv | grep SERVICE ``` ``` KUBERNETES\_SERVICE\_HOST=10.0.0.1 KUBERNETES\_SERVICE\_PORT=443 KUBERNETES\_SERVICE\_PORT\_HTTPS=443 ``` Note there's no mention of your Service. This is because you created the replicas before the Service. Another disadvantage of doing this is that the scheduler might put both Pods on the same machine, which will take your entire Service down if it dies. We can do this the right way by killing the 2 Pods and waiting for the Deployment to recreate them. This time the Service exists \*before\* the replicas. This will give you scheduler-level Service spreading of your Pods (provided all your nodes have equal capacity), as well as the right environment variables: ```shell kubectl scale deployment my-nginx --replicas=0; kubectl scale deployment my-nginx --replicas=2; kubectl get pods -l run=my-nginx -o wide ``` ``` NAME READY STATUS RESTARTS AGE IP NODE my-nginx-3800858182-e9ihh 1/1 Running 0 5s 10.244.2.7 kubernetes-minion-ljyd my-nginx-3800858182-j4rm4 1/1 Running 0 5s 10.244.3.8 kubernetes-minion-905m ``` You may notice that the pods have different names, since they are killed and recreated. ```shell kubectl exec my-nginx-3800858182-e9ihh
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/connect-applications-service.md
|
[
-0.012107881717383862,
0.01409340649843216,
-0.024203643202781677,
-0.033969271928071976,
0.0033586896024644375,
0.01512590330094099,
0.015977982431650162,
-0.022483045235276222,
0.0749780461192131,
0.02625458687543869,
-0.0495288260281086,
-0.020171131938695908,
-0.0631987676024437,
0.014646739698946476,
0.07569093257188797,
-0.04980095848441124,
0.08692286908626556,
-0.009903986938297749,
-0.004317372106015682,
-0.04371689632534981,
-0.02837626449763775,
0.05303165316581726,
0.006537859793752432,
-0.016357850283384323,
-0.08405212312936783,
0.02509966306388378,
-0.07459376752376556,
-0.011871179565787315,
0.049297723919153214,
0.0012707080459222198,
-0.04772021248936653,
0.016954783350229263,
0.011555052362382412,
0.04768040403723717,
0.017342064529657364,
0.0821114107966423,
0.07079018652439117,
-0.04396744444966316,
-0.0747830793261528,
0.07754237949848175,
0.058002032339572906,
-0.030989306047558784,
-0.05596216022968292,
-0.10836488753557205,
-0.005785019602626562,
-0.07058428227901459,
-0.06384783238172531,
-0.05094446986913681,
-0.01026688888669014,
-0.01944381184875965,
-0.05022453889250755,
-0.09376431256532669,
0.03697558864951134,
0.060459986329078674,
0.027474870905280113,
-0.05685465410351753,
-0.04675017669796944,
0.044340427964925766,
0.05516920983791351,
0.008063072338700294,
-0.0032904839608818293,
-0.07272620499134064,
0.07599480450153351,
-0.03657837584614754,
-0.023918306455016136,
-0.06950358301401138,
-0.03799571469426155,
0.0036703329533338547,
0.015385404229164124,
-0.04946129396557808,
0.04608124867081642,
0.028607597574591637,
-0.051182299852371216,
-0.007086963392794132,
-0.028190238401293755,
0.05261378362774849,
0.023174645379185677,
0.019730515778064728,
-0.017296379432082176,
-0.05017497390508652,
0.02945951372385025,
0.002554879058152437,
0.0574486069381237,
0.07362669706344604,
-0.10265088826417923,
0.0031973684672266245,
0.017537176609039307,
-0.05915389582514763,
0.027349697425961494,
-0.02775958925485611,
-0.031099852174520493,
0.006685997825115919,
-0.04428301751613617,
-0.1438240110874176,
0.10272440314292908,
0.02180769294500351,
-0.06911370903253555,
-0.002322970889508724,
0.024418532848358154,
-0.00426271790638566,
0.03719833120703697,
-0.006411996204406023,
0.01488245464861393,
-0.006042074877768755,
0.02939547412097454,
-0.050757888704538345,
-0.0894622653722763,
0.019457707181572914,
0.021726522594690323,
0.05550582706928253,
-0.011265275999903679,
0.008199249394237995,
-0.03646436333656311,
0.030901284888386726,
-0.04329901561141014,
-0.0263070035725832,
0.055211346596479416,
-0.028522435575723648,
0.0045481277629733086,
0.0918542668223381,
0.042902667075395584,
-0.0555722750723362,
-0.001599566312506795,
0.07921207696199417,
-0.032340701669454575,
0.012649505399167538,
0.04696975648403168,
8.220636989838313e-34,
0.0015102156903594732,
-0.08529888838529587,
-0.002369664842262864,
-0.006486056372523308,
0.028720825910568237,
-0.09764787554740906,
-0.05069119855761528,
-0.013966855593025684,
-0.0058259242214262486,
0.025721581652760506,
-0.06730476021766663,
0.07044225186109543,
0.026450589299201965,
0.00518385274335742,
0.01926012896001339,
0.03722624108195305,
-0.0362933874130249,
-0.021694131195545197,
0.07880880683660507,
-0.005261632613837719,
0.08130577206611633,
-0.05567178130149841,
-0.02737065590918064,
-0.0018737255595624447,
0.031700409948825836,
-0.05487615615129471,
-0.016226399689912796,
-0.10612679272890091,
-0.023663707077503204,
-0.01735527440905571,
0.09167163074016571,
-0.006194612942636013,
0.03189162537455559,
0.006385470274835825,
-0.07310161739587784,
-0.002550567267462611,
0.024234553799033165,
0.048272550106048584,
-0.10513236373662949,
-0.02584073133766651,
0.011036506853997707,
-0.018132276833057404,
-0.07329805195331573,
-0.03301801532506943,
0.04737270250916481,
-0.01111571304500103,
-0.025252951309084892,
-0.11024238914251328,
0.08273817598819733,
-0.009813121519982815,
-0.0195040050894022,
-0.06029931455850601,
0.005966316442936659,
-0.02602553367614746,
0.0927233025431633,
0.07145166397094727,
0.036660391837358475,
0.01851046457886696,
-0.11071143299341202,
-0.014617787674069405,
-0.020914293825626373,
-0.08491690456867218,
-0.01276667881757021,
-0.011802054941654205,
0.04299449920654297,
0.01922493986785412,
0.043304286897182465,
0.04229571670293808,
0.015734586864709854,
0.05885112285614014,
-0.05633743479847908,
0.03345106914639473,
-0.01214376650750637,
0.0681353360414505,
-0.006290602032095194,
-0.06478796899318695,
0.04347272589802742,
0.020573265850543976,
-0.04276903346180916,
0.04200047254562378,
-0.001098389271646738,
-0.023706162348389626,
-0.024983618408441544,
0.10884571075439453,
0.028668515384197235,
-0.0358036644756794,
0.031282778829336166,
0.026149846613407135,
-0.006448846310377121,
-0.016754478216171265,
-0.03969679772853851,
0.01524543296545744,
-0.06232718750834465,
-0.02196795493364334,
-0.13670670986175537,
-3.544278934912358e-33,
0.057574253529310226,
0.0038030401337891817,
-0.03268670663237572,
0.010338295251131058,
-0.029318716377019882,
0.009398736990988255,
0.009379643015563488,
0.08104857802391052,
-0.028483979403972626,
0.007631424814462662,
0.0017065497813746333,
-0.00562490988522768,
0.06568238884210587,
0.08245746791362762,
-0.13937531411647797,
0.0064340922981500626,
-0.1376093178987503,
-0.039828166365623474,
-0.0280236154794693,
0.03931485116481781,
-0.10387032479047775,
0.023840686306357384,
0.1695704162120819,
0.038178686052560806,
-0.03004717081785202,
-0.0032545761205255985,
0.09627843648195267,
-0.03476058319211006,
-0.13480445742607117,
-0.06499253213405609,
-0.003913331311196089,
-0.07289637625217438,
0.0029522620607167482,
0.055924054235219955,
-0.0009234931203536689,
-0.021780308336019516,
-0.0043735201470553875,
0.014336313121020794,
0.04443414881825447,
-0.06656897813081741,
0.009021726436913013,
0.012693102471530437,
-0.09017933160066605,
-0.057032570242881775,
-0.10109023749828339,
-0.06394647806882858,
0.05743778124451637,
0.023818736895918846,
-0.002778763649985194,
-0.08146641403436661,
-0.02756475657224655,
0.008655576966702938,
-0.035860612988471985,
0.15764981508255005,
-0.027141069993376732,
0.06832653284072876,
0.04637764394283295,
0.04945812374353409,
-0.04523717984557152,
0.04825056716799736,
0.06307536363601685,
-0.09947741031646729,
0.01623981073498726,
0.06638916581869125,
0.06227485463023186,
-0.050880949944257736,
-0.048766691237688065,
0.018246250227093697,
0.013091572560369968,
0.020715398713946342,
-0.0034142490476369858,
0.011727370321750641,
0.020237332209944725,
0.12187559902667999,
0.000287658505840227,
-0.01978270895779133,
0.03570482134819031,
-0.00005731262353947386,
0.07557499408721924,
-0.0069802021607756615,
-0.04031090438365936,
0.06756527721881866,
-0.1130165085196495,
-0.02740473486483097,
0.10921000689268112,
0.05500610172748566,
0.06229723244905472,
0.05214567109942436,
0.057867832481861115,
0.017465893179178238,
-0.023069730028510094,
0.005763309076428413,
-0.06797564774751663,
0.06033427268266678,
-0.02352914772927761,
-4.85044360232223e-8,
0.05397145822644234,
0.028883730992674828,
-0.04263587296009064,
0.06182844564318657,
0.0022256437223404646,
0.01190305408090353,
0.013922891579568386,
-0.06423946470022202,
-0.06146024912595749,
0.019425900653004646,
-0.04421843960881233,
0.08330301940441132,
-0.08533499389886856,
0.01930297538638115,
0.058291904628276825,
-0.036658599972724915,
0.0043774740770459175,
0.015005179680883884,
0.05056171119213104,
-0.04015959054231644,
-0.03024705871939659,
-0.026887211948633194,
0.020635267719626427,
0.013528464362025261,
0.018779810518026352,
0.06012159585952759,
0.016682911664247513,
0.003741845488548279,
0.02079670876264572,
-0.01075012143701315,
-0.015549485571682453,
-0.023176584392786026,
-0.029057517647743225,
-0.01563030295073986,
-0.012299186550080776,
0.040642522275447845,
-0.1606474667787552,
0.041737426072359085,
0.036666110157966614,
0.07694640010595322,
0.0233602412045002,
0.0036352493334561586,
-0.05354685336351395,
-0.045521315187215805,
0.007066558115184307,
0.08795889467000961,
0.03471595048904419,
0.06337113678455353,
-0.012884522788226604,
0.05560298264026642,
0.005977467633783817,
-0.04611678794026375,
0.05053630843758583,
0.01775393821299076,
-0.04855332151055336,
0.02141718380153179,
-0.012833138927817345,
-0.06053335964679718,
0.016409218311309814,
0.014686512760818005,
-0.007068060804158449,
0.060170866549015045,
0.04033675789833069,
-0.004411335568875074
] | 0.160117
|
kubectl get pods -l run=my-nginx -o wide ``` ``` NAME READY STATUS RESTARTS AGE IP NODE my-nginx-3800858182-e9ihh 1/1 Running 0 5s 10.244.2.7 kubernetes-minion-ljyd my-nginx-3800858182-j4rm4 1/1 Running 0 5s 10.244.3.8 kubernetes-minion-905m ``` You may notice that the pods have different names, since they are killed and recreated. ```shell kubectl exec my-nginx-3800858182-e9ihh -- printenv | grep SERVICE ``` ``` KUBERNETES\_SERVICE\_PORT=443 MY\_NGINX\_SERVICE\_HOST=10.0.162.149 KUBERNETES\_SERVICE\_HOST=10.0.0.1 MY\_NGINX\_SERVICE\_PORT=80 KUBERNETES\_SERVICE\_PORT\_HTTPS=443 ``` ### DNS Kubernetes offers a DNS cluster addon Service that automatically assigns dns names to other Services. You can check if it's running on your cluster: ```shell kubectl get services kube-dns --namespace=kube-system ``` ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kube-dns ClusterIP 10.0.0.10 53/UDP,53/TCP 8m ``` The rest of this section will assume you have a Service with a long lived IP (my-nginx), and a DNS server that has assigned a name to that IP. Here we use the CoreDNS cluster addon (application name `kube-dns`), so you can talk to the Service from any pod in your cluster using standard methods (e.g. `gethostbyname()`). If CoreDNS isn't running, you can enable it referring to the [CoreDNS README](https://github.com/coredns/deployment/tree/master/kubernetes) or [Installing CoreDNS](/docs/tasks/administer-cluster/coredns/#installing-coredns). Let's run another curl application to test this: ```shell kubectl run curl --image=radial/busyboxplus:curl -i --tty --rm ``` ``` Waiting for pod default/curl-131556218-9fnch to be running, status is Pending, pod ready: false Hit enter for command prompt ``` Then, hit enter and run `nslookup my-nginx`: ```shell [ root@curl-131556218-9fnch:/ ]$ nslookup my-nginx Server: 10.0.0.10 Address 1: 10.0.0.10 Name: my-nginx Address 1: 10.0.162.149 ``` ## Securing the Service Till now we have only accessed the nginx server from within the cluster. Before exposing the Service to the internet, you want to make sure the communication channel is secure. For this, you will need: \* Self signed certificates for https (unless you already have an identity certificate) \* An nginx server configured to use the certificates \* A [secret](/docs/concepts/configuration/secret/) that makes the certificates accessible to pods You can acquire all these from the [nginx https example](https://github.com/kubernetes/examples/tree/master/\_archived/https-nginx/). This requires having go and make tools installed. If you don't want to install those, then follow the manual steps later. In short: ```shell make keys KEY=/tmp/nginx.key CERT=/tmp/nginx.crt kubectl create secret tls nginxsecret --key /tmp/nginx.key --cert /tmp/nginx.crt ``` ``` secret/nginxsecret created ``` ```shell kubectl get secrets ``` ``` NAME TYPE DATA AGE nginxsecret kubernetes.io/tls 2 1m ``` And also the configmap: ```shell kubectl create configmap nginxconfigmap --from-file=default.conf ``` You can find an example for `default.conf` in [the Kubernetes examples project repo](https://github.com/kubernetes/examples/tree/bc9ca4ca32bb28762ef216386934bef20f1f9930/staging/https-nginx/). ``` configmap/nginxconfigmap created ``` ```shell kubectl get configmaps ``` ``` NAME DATA AGE nginxconfigmap 1 114s ``` You can view the details of the `nginxconfigmap` ConfigMap using the following command: ```shell kubectl describe configmap nginxconfigmap ``` The output is similar to: ```console Name: nginxconfigmap Namespace: default Labels: Annotations: Data ==== default.conf: ---- server { listen 80 default\_server; listen [::]:80 default\_server ipv6only=on; listen 443 ssl; root /usr/share/nginx/html; index index.html; server\_name localhost; ssl\_certificate /etc/nginx/ssl/tls.crt; ssl\_certificate\_key /etc/nginx/ssl/tls.key; location / { try\_files $uri $uri/ =404; } } BinaryData ==== Events: ``` Following are the manual steps to follow in case you run into problems running make (on windows for example): ```shell # Create a public private key pair openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /d/tmp/nginx.key -out /d/tmp/nginx.crt -subj "/CN=my-nginx/O=my-nginx" # Convert the keys to base64 encoding cat /d/tmp/nginx.crt | base64 cat /d/tmp/nginx.key | base64 ``` Use the output from the previous commands to create a yaml file as follows. The base64 encoded value should all be on a single line. ```yaml apiVersion: "v1" kind: "Secret" metadata: name: "nginxsecret" namespace: "default" type: kubernetes.io/tls data: # NOTE: Replace the following values with your own base64-encoded certificate and key.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/connect-applications-service.md
|
[
0.02796289324760437,
0.008056050166487694,
0.04526781290769577,
-0.05628681555390358,
0.007956517860293388,
-0.034767575562000275,
-0.04899030178785324,
-0.012483571656048298,
0.10058683156967163,
0.022941632196307182,
-0.004287400282919407,
-0.04975712671875954,
-0.020959312096238136,
-0.008808651007711887,
0.029522186145186424,
-0.037814684212207794,
-0.014083556830883026,
0.01285451091825962,
-0.05532883480191231,
-0.02053053490817547,
-0.04516414925456047,
0.06965342164039612,
-0.012009483762085438,
-0.05784887820482254,
-0.005579513031989336,
0.017652299255132675,
-0.09535475075244904,
-0.009880567900836468,
0.024296829476952553,
-0.0391855388879776,
-0.005287480540573597,
0.05786978080868721,
0.003343588672578335,
-0.017462439835071564,
0.06814394146203995,
0.11300560086965561,
0.006977473385632038,
-0.02523277886211872,
-0.019789747893810272,
0.015387285500764847,
0.09151197224855423,
-0.02014857530593872,
-0.053534455597400665,
-0.0845656543970108,
-0.04509063810110092,
-0.015475024469196796,
-0.06191268935799599,
-0.052729733288288116,
0.03369425609707832,
-0.03913326933979988,
-0.025670113041996956,
-0.11417720466852188,
0.01022333838045597,
0.028024114668369293,
0.0675877034664154,
-0.05638734996318817,
-0.045815687626600266,
0.09395037591457367,
0.10285782814025879,
0.05187971144914627,
-0.021705543622374535,
0.0005882501718588173,
0.03272341191768646,
-0.02301729843020439,
-0.03793633356690407,
-0.03423763066530228,
-0.026157086715102196,
-0.07897737622261047,
0.0018141522305086255,
0.03864551708102226,
0.0882415622472763,
0.04347164183855057,
-0.01013169065117836,
-0.009124420583248138,
-0.05132651329040527,
0.0809648409485817,
0.03694253787398338,
0.03377186506986618,
-0.0854150727391243,
-0.03999733179807663,
-0.01595958136022091,
-0.015165857039391994,
-0.0021646125242114067,
-0.005144420545548201,
-0.08453702181577682,
0.007217015139758587,
-0.0012416323879733682,
-0.09109210222959518,
0.061352506279945374,
-0.021245304495096207,
-0.01349025871604681,
-0.016414867714047432,
0.01913711242377758,
-0.08617684990167618,
0.0715385377407074,
0.003964635077863932,
0.017996853217482567,
0.10982423275709152,
-0.010690299794077873,
0.0037335576489567757,
0.018728164955973625,
-0.030354542657732964,
0.012409676797688007,
0.041027385741472244,
0.06010390818119049,
-0.02877340465784073,
-0.08653265237808228,
-0.022566121071577072,
0.000795119849499315,
-0.07284669578075409,
0.0044814208522439,
-0.024467211216688156,
-0.00026700459420681,
0.06586751341819763,
-0.02294253185391426,
-0.012881213799118996,
-0.02179805375635624,
-0.008974352851510048,
0.007598354481160641,
0.10472313314676285,
0.05137994885444641,
-0.0896185040473938,
0.008775039575994015,
0.0492694228887558,
-0.0654267892241478,
0.07840591669082642,
0.05511321499943733,
4.336918449091673e-33,
0.019913820549845695,
-0.08488909155130386,
0.03977150097489357,
-0.004471007734537125,
0.07413796335458755,
-0.08497423678636551,
-0.08713352680206299,
0.016424931585788727,
0.02838350087404251,
0.026137717068195343,
-0.06431230902671814,
0.05696296691894531,
-0.03235097602009773,
-0.03931698575615883,
0.00124754523858428,
0.002244336763396859,
-0.012710120528936386,
0.017862988635897636,
0.061578478664159775,
0.03647231683135033,
0.08713473379611969,
-0.01470213197171688,
-0.06158953160047531,
0.03481517359614372,
0.06212460249662399,
-0.0320347398519516,
0.05028844252228737,
-0.08459430187940598,
-0.047931768000125885,
-0.02562563866376877,
0.047136664390563965,
-0.017516789957880974,
0.03517191484570503,
0.023516466841101646,
-0.13678087294101715,
0.004033772274851799,
0.056188032031059265,
0.045420076698064804,
-0.12319374829530716,
-0.07785099744796753,
0.04206814616918564,
0.023681530728936195,
-0.0968068316578865,
-0.031964097172021866,
0.05042356625199318,
-0.07546447962522507,
-0.04810445383191109,
-0.12341701984405518,
0.0674215778708458,
0.011440470814704895,
-0.05011947080492973,
-0.007527116686105728,
-0.012652087956666946,
-0.01968378759920597,
0.0011980690760537982,
0.029080428183078766,
0.0414244644343853,
0.028363963589072227,
-0.08483313769102097,
-0.04872400313615799,
0.015897763893008232,
0.03955576568841934,
-0.00001122074627346592,
-0.000603172171395272,
0.07530656456947327,
0.04601423814892769,
0.0906175747513771,
0.051232922822237015,
-0.001296619651839137,
0.07800579816102982,
-0.07709801942110062,
0.009533559903502464,
0.0662066712975502,
-0.012922659516334534,
0.08919484168291092,
-0.07427097111940384,
0.013788329437375069,
-0.015090401284396648,
-0.054853007197380066,
0.02371966652572155,
0.06850552558898926,
0.020108770579099655,
-0.09049464762210846,
0.07405425608158112,
-0.010729854926466942,
0.005060228519141674,
0.0006760754622519016,
0.027517464011907578,
-0.042366042733192444,
0.04480323567986488,
-0.02528410218656063,
0.03926091268658638,
-0.08388213813304901,
0.01285883691161871,
-0.147720605134964,
-6.699063694151505e-33,
0.06530269235372543,
0.0226326622068882,
0.0255595576018095,
-0.02348937839269638,
-0.020798295736312866,
-0.026300901547074318,
-0.023180415853857994,
0.09408701211214066,
-0.047994427382946014,
-0.0028180780354887247,
0.044452350586652756,
-0.027007311582565308,
0.02767007425427437,
0.0547785647213459,
-0.08100774139165878,
0.020070746541023254,
-0.09469237178564072,
-0.037437885999679565,
-0.032933901995420456,
-0.0093894824385643,
-0.05220269411802292,
0.10283265262842178,
0.030148793011903763,
0.04009242728352547,
0.005043634679168463,
0.019496124237775803,
0.08951472491025925,
0.0011007646098732948,
-0.06778791546821594,
-0.0393352247774601,
0.013785558752715588,
-0.047380704432725906,
-0.03510252386331558,
0.11378265917301178,
-0.026947543025016785,
-0.04311747848987579,
-0.08282186836004257,
0.029494768008589745,
0.048098161816596985,
-0.0823359414935112,
-0.0027531159576028585,
0.041875071823596954,
-0.0055844746530056,
-0.020798439159989357,
-0.09071363508701324,
-0.02721933089196682,
0.05172527953982353,
-0.01591944694519043,
0.019489912316203117,
-0.08055080473423004,
0.00009077014692593366,
0.0051635438576340675,
-0.11593645811080933,
0.0849362462759018,
0.0010611267061904073,
0.0007479453342966735,
0.014277865178883076,
0.042147185653448105,
-0.02671516314148903,
0.002260345034301281,
0.05917564779520035,
-0.10071872919797897,
0.013489406555891037,
0.06387903541326523,
-0.010704230517148972,
0.0016105237882584333,
-0.09430786222219467,
-0.0028964176308363676,
0.01734861359000206,
-0.04391954839229584,
0.0744137167930603,
0.01946711167693138,
-0.04243903607130051,
0.06833640486001968,
-0.04615665599703789,
0.010486447252333164,
-0.013799786567687988,
-0.02271750383079052,
0.010537110269069672,
0.020248353481292725,
-0.061109159141778946,
0.07480335980653763,
-0.1221042349934578,
0.022884966805577278,
0.021955659613013268,
0.0675034448504448,
0.00845389999449253,
0.10510781407356262,
0.08965567499399185,
0.05726879835128784,
0.02763805352151394,
0.0019842938054353,
-0.04312095791101456,
0.038890525698661804,
-0.03585048019886017,
-5.0276803165161255e-8,
0.0978245660662651,
0.0021797018125653267,
-0.009197905659675598,
0.100229412317276,
0.046174291521310806,
-0.0920221358537674,
0.010197781957685947,
0.021729514002799988,
-0.023300200700759888,
-0.006105417851358652,
0.0015185174997895956,
0.05130983144044876,
-0.082730732858181,
-0.00231061689555645,
0.08132118731737137,
-0.08153358846902847,
-0.044423192739486694,
0.022960254922509193,
0.07655267417430878,
-0.03968537598848343,
-0.10148843377828598,
-0.033368416130542755,
0.0198193471878767,
-0.018720220774412155,
-0.034196749329566956,
0.04922087863087654,
0.07850204408168793,
0.029681509360671043,
-0.02906436286866665,
0.024996761232614517,
-0.01874997466802597,
-0.010414713062345982,
-0.03538563847541809,
0.014885959215462208,
-0.03878297284245491,
-0.015436583198606968,
-0.1586599200963974,
0.03398778662085533,
0.006212933920323849,
0.026690393686294556,
-0.04140397161245346,
-0.009718669578433037,
-0.00838383287191391,
0.001994664315134287,
-0.0010559012880548835,
0.04675263538956642,
0.07128790766000748,
0.05325557664036751,
0.03427066281437874,
-0.04347841441631317,
-0.02562708593904972,
-0.050327278673648834,
0.012605566531419754,
0.0014279680326581001,
-0.046637728810310364,
-0.009686904959380627,
-0.004259608220309019,
-0.01658758334815502,
0.008405499160289764,
0.02543042227625847,
0.01167298387736082,
-0.02660376951098442,
-0.01783236488699913,
-0.011720544658601284
] | 0.059838
|
the output from the previous commands to create a yaml file as follows. The base64 encoded value should all be on a single line. ```yaml apiVersion: "v1" kind: "Secret" metadata: name: "nginxsecret" namespace: "default" type: kubernetes.io/tls data: # NOTE: Replace the following values with your own base64-encoded certificate and key. tls.crt: "REPLACE\_WITH\_BASE64\_CERT" tls.key: "REPLACE\_WITH\_BASE64\_KEY" ``` Now create the secrets using the file: ```shell kubectl apply -f nginxsecrets.yaml kubectl get secrets ``` ``` NAME TYPE DATA AGE nginxsecret kubernetes.io/tls 2 1m ``` Now modify your nginx replicas to start an https server using the certificate in the secret, and the Service, to expose both ports (80 and 443): {{% code\_sample file="service/networking/nginx-secure-app.yaml" %}} Noteworthy points about the nginx-secure-app manifest: - It contains both Deployment and Service specification in the same file. - The [nginx server](https://github.com/kubernetes/examples/blob/master/\_archived/https-nginx/default.conf) serves HTTP traffic on port 80 and HTTPS traffic on 443, and nginx Service exposes both ports. - Each container has access to the keys through a volume mounted at `/etc/nginx/ssl`. This is set up \*before\* the nginx server is started. ```shell kubectl delete deployments,svc my-nginx; kubectl create -f ./nginx-secure-app.yaml ``` At this point you can reach the nginx server from any node. ```shell kubectl get pods -l run=my-nginx -o custom-columns=POD\_IP:.status.podIPs POD\_IP [map[ip:10.244.3.5]] ``` ```shell node $ curl -k https://10.244.3.5 ... # Welcome to nginx! ``` Note how we supplied the `-k` parameter to curl in the last step, this is because we don't know anything about the pods running nginx at certificate generation time, so we have to tell curl to ignore the CName mismatch. By creating a Service we linked the CName used in the certificate with the actual DNS name used by pods during Service lookup. Let's test this from a pod (the same secret is being reused for simplicity, the pod only needs nginx.crt to access the Service): {{% code\_sample file="service/networking/curlpod.yaml" %}} ```shell kubectl apply -f ./curlpod.yaml kubectl get pods -l app=curlpod ``` ``` NAME READY STATUS RESTARTS AGE curl-deployment-1515033274-1410r 1/1 Running 0 1m ``` ```shell kubectl exec curl-deployment-1515033274-1410r -- curl https://my-nginx --cacert /etc/nginx/ssl/tls.crt ... Welcome to nginx! ... ``` ## Exposing the Service For some parts of your applications you may want to expose a Service onto an external IP address. Kubernetes supports two ways of doing this: NodePorts and LoadBalancers. The Service created in the last section already used `NodePort`, so your nginx HTTPS replica is ready to serve traffic on the internet if your node has a public IP. ```shell kubectl get svc my-nginx -o yaml | grep nodePort -C 5 uid: 07191fb3-f61a-11e5-8ae5-42010af00002 spec: clusterIP: 10.0.162.149 ports: - name: http nodePort: 31704 port: 8080 protocol: TCP targetPort: 80 - name: https nodePort: 32453 port: 443 protocol: TCP targetPort: 443 selector: run: my-nginx ``` ```shell kubectl get nodes -o yaml | grep ExternalIP -C 1 - address: 104.197.41.11 type: ExternalIP allocatable: -- - address: 23.251.152.56 type: ExternalIP allocatable: ... $ curl https://: -k ... # Welcome to nginx! ``` Let's now recreate the Service to use a cloud load balancer. Change the `Type` of `my-nginx` Service from `NodePort` to `LoadBalancer`: ```shell kubectl edit svc my-nginx kubectl get svc my-nginx ``` ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-nginx LoadBalancer 10.0.162.149 xx.xxx.xxx.xxx 8080:30163/TCP 21s ``` ``` curl https:// -k ... Welcome to nginx! ``` The IP address in the `EXTERNAL-IP` column is the one that is available on the public internet. The `CLUSTER-IP` is only available inside your cluster/private cloud network. Note that on AWS, type `LoadBalancer` creates an ELB, which uses a (long) hostname, not an IP. It's too long to fit in the standard `kubectl get svc` output, in fact,
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/connect-applications-service.md
|
[
-0.040543634444475174,
0.06017432361841202,
-0.01330573670566082,
-0.03956117480993271,
-0.068379707634449,
-0.013861759565770626,
-0.05154060199856758,
0.013697171583771706,
0.09036925435066223,
0.03997337445616722,
-0.017995504662394524,
-0.07407344877719879,
0.02990267239511013,
-0.01985410414636135,
0.10930656641721725,
0.0002614980621729046,
-0.032237231731414795,
0.05145531892776489,
-0.0005936733214184642,
-0.08287785202264786,
0.05586985871195793,
0.011886702850461006,
0.033962421119213104,
-0.03820923715829849,
-0.0638381689786911,
-0.02847820147871971,
-0.013138498179614544,
0.05893462151288986,
0.042048029601573944,
0.014058251865208149,
0.025720369070768356,
-0.0456153005361557,
-0.002531246514990926,
0.004356910474598408,
-0.04180402308702469,
0.09684811532497406,
0.07709918171167374,
-0.030645811930298805,
-0.037026189267635345,
0.050259318202733994,
0.07393111288547516,
-0.005156048573553562,
-0.1068822368979454,
-0.0628814846277237,
-0.07695649564266205,
-0.04127200320363045,
-0.007439364213496447,
-0.044574860483407974,
-0.02863169275224209,
-0.03630594536662102,
-0.03150342032313347,
-0.11679564416408539,
-0.005016384646296501,
0.03763921558856964,
-0.03927729278802872,
-0.023265140131115913,
-0.09041057527065277,
0.06351035088300705,
0.03323525935411453,
0.04632452130317688,
0.04188268631696701,
0.000022441116016125306,
0.08403866738080978,
-0.06590750068426132,
-0.040896035730838776,
0.009352517314255238,
-0.03970734030008316,
-0.01802174746990204,
0.014886496588587761,
0.0013148583238944411,
0.023743990808725357,
-0.01087386254221201,
-0.06100307032465935,
-0.04101766273379326,
-0.019438063725829124,
-0.010508469305932522,
-0.09699113667011261,
0.0007105307886376977,
-0.06710270047187805,
-0.06151730194687843,
0.03611734136939049,
-0.04416537657380104,
0.05042034760117531,
0.050583820790052414,
-0.12027470022439957,
-0.06094440072774887,
0.0396113321185112,
-0.022795867174863815,
0.004505574703216553,
-0.005483373533934355,
-0.004376797936856747,
-0.024385131895542145,
-0.007752943318337202,
-0.07369967550039291,
0.16666457056999207,
0.032086823135614395,
-0.05415912717580795,
0.052571672946214676,
-0.002563370391726494,
-0.08372081816196442,
-0.005041474476456642,
-0.013675984926521778,
0.010006802156567574,
-0.016334334388375282,
0.044064249843358994,
0.04190702363848686,
-0.06897518038749695,
-0.038480017334222794,
0.0004015769518446177,
0.018098993226885796,
0.025181980803608894,
0.05287063121795654,
-0.046141352504491806,
-0.023994414135813713,
0.001355737796984613,
0.08262883126735687,
-0.06855762004852295,
0.03616485372185707,
0.021053496748209,
0.10039662569761276,
0.0606343150138855,
-0.013153281062841415,
-0.022039957344532013,
0.11352300643920898,
-0.04228554293513298,
-0.007567527238279581,
0.024810951203107834,
3.726134523140289e-33,
0.019601400941610336,
0.01115889847278595,
-0.010015703737735748,
0.054211679846048355,
0.02273046225309372,
-0.07161770015954971,
0.019977238029241562,
-0.03340866416692734,
-0.052241433411836624,
0.052225105464458466,
-0.07392839342355728,
0.019539574161171913,
-0.08700402081012726,
-0.008941611275076866,
0.00237951404415071,
0.020801685750484467,
-0.05052585527300835,
-0.03051924891769886,
0.11509354412555695,
0.0022867610678076744,
0.10941952466964722,
-0.01936494931578636,
0.0013019370380789042,
-0.03405078873038292,
0.03898698836565018,
-0.05262367054820061,
0.03688569366931915,
-0.04521563649177551,
-0.04127863049507141,
-0.04832695797085762,
0.04280856251716614,
-0.044736750423908234,
0.08259336650371552,
-0.031750041991472244,
-0.05365581810474396,
-0.028825668618083,
0.09014148265123367,
0.09087725728750229,
-0.09125953912734985,
-0.043465811759233475,
0.0676739439368248,
-0.012435034848749638,
-0.010812939144670963,
-0.03562571853399277,
0.043539728969335556,
-0.001231699832715094,
-0.03639783337712288,
-0.06997364014387131,
0.18284820020198822,
0.030996622517704964,
-0.036892227828502655,
-0.028782889246940613,
-0.03180384635925293,
-0.06857083737850189,
0.05506254732608795,
0.011946099810302258,
0.032452065497636795,
0.01960238441824913,
-0.10164393484592438,
-0.07617039233446121,
-0.04602185636758804,
-0.03996410593390465,
0.023848310112953186,
-0.004645667504519224,
0.050267159938812256,
0.036341384053230286,
0.03422579541802406,
0.023829476907849312,
-0.07315021008253098,
0.049500688910484314,
-0.09710400551557541,
0.07478327304124832,
-0.010313634760677814,
-0.034866511821746826,
0.004960455000400543,
-0.021065805107355118,
0.04984842613339424,
0.03364362195134163,
0.01878533884882927,
0.007743606809526682,
0.06643527001142502,
0.006981795188039541,
-0.04715719819068909,
0.09621990472078323,
-0.022828124463558197,
0.0007367555517703295,
0.017050161957740784,
0.06383673846721649,
-0.0102327149361372,
0.057826556265354156,
-0.01622825302183628,
-0.016078423708677292,
-0.009526855312287807,
-0.032267987728118896,
-0.09849721938371658,
-6.0417228450678665e-33,
0.05597726255655289,
-0.0006213139276951551,
0.014301235787570477,
0.03456512838602066,
0.03947514668107033,
0.007327538449317217,
0.021563896909356117,
0.07548333704471588,
-0.036901555955410004,
0.029381297528743744,
-0.01813596673309803,
-0.01994054950773716,
0.06635437160730362,
0.012114944867789745,
-0.05663876608014107,
-0.07147087156772614,
-0.05626104772090912,
0.037873003631830215,
-0.0467064306139946,
-0.035629305988550186,
-0.035712115466594696,
0.02649161033332348,
0.05393163114786148,
0.08168055862188339,
0.04035264253616333,
0.012962235137820244,
0.06687084585428238,
0.023210784420371056,
-0.07693957537412643,
-0.011883498169481754,
-0.01041108276695013,
-0.010643869638442993,
0.03549864515662193,
0.008087548427283764,
-0.06792747229337692,
-0.11620230972766876,
-0.003242545761168003,
0.0015442773001268506,
0.04866591468453407,
-0.05555444210767746,
0.01613176427781582,
-0.03528225049376488,
-0.03560249134898186,
-0.0573718287050724,
-0.08840911090373993,
-0.0008236689027398825,
0.08060601353645325,
-0.04685206711292267,
0.01228539738804102,
-0.0577532984316349,
0.010236463509500027,
0.04344450309872627,
-0.12103153020143509,
0.04740328714251518,
0.005094241350889206,
0.010961784981191158,
-0.04653637483716011,
0.10173303633928299,
-0.01216899324208498,
0.025466712191700935,
0.01765325851738453,
-0.03831666707992554,
0.05019887909293175,
0.0012551785912364721,
0.018130280077457428,
-0.004296609200537205,
-0.139687642455101,
0.007508720271289349,
0.034731462597846985,
0.05161561444401741,
-0.04890890419483185,
-0.040868792682886124,
-0.00704582966864109,
0.006616966798901558,
0.04711846634745598,
-0.0299249105155468,
-0.037441834807395935,
-0.014299003407359123,
0.06810229271650314,
0.05397728830575943,
0.001591179403476417,
0.051474981009960175,
-0.12434165924787521,
0.0018796510994434357,
0.11241504549980164,
0.037019986659288406,
0.03576114401221275,
0.07188482582569122,
0.02560458518564701,
0.05946441367268562,
-0.012699267826974392,
0.03286995738744736,
-0.01966826431453228,
0.06229323521256447,
0.06570907682180405,
-4.979114365255555e-8,
0.044914375990629196,
0.0405682697892189,
-0.05817337706685066,
0.06094716489315033,
-0.031799640506505966,
-0.012679396197199821,
0.01411350816488266,
-0.057726968079805374,
-0.061595894396305084,
-0.050117384642362595,
-0.05722353979945183,
0.030787313356995583,
-0.0668603703379631,
0.04418891295790672,
-0.004977021366357803,
-0.03321041911840439,
-0.0664825364947319,
-0.026413975283503532,
0.10031241923570633,
-0.09933700412511826,
0.016418902203440666,
-0.04301610216498375,
0.019460398703813553,
0.05264909192919731,
0.011307930573821068,
0.09553959220647812,
0.03658505156636238,
0.029124805703759193,
0.023358140140771866,
0.05825761333107948,
0.011860125698149204,
-0.09093474596738815,
-0.026173487305641174,
0.025469642132520676,
-0.03678550198674202,
-0.02557307668030262,
-0.1204497292637825,
0.04097849875688553,
0.03486906737089157,
-0.012999827042222023,
0.005050979554653168,
-0.018684538081288338,
-0.07719104737043381,
0.005062699783593416,
-0.06550228595733643,
0.03110172040760517,
0.054983265697956085,
0.07871316373348236,
-0.019072258844971657,
0.06611943989992142,
0.013780808076262474,
-0.06452593952417374,
0.034744348376989365,
0.030753081664443016,
-0.06105086952447891,
0.022725587710738182,
0.002834128448739648,
-0.014536573551595211,
0.002933403942734003,
-0.05950399860739708,
0.00304033444263041,
-0.003308323211967945,
0.055399756878614426,
-0.04935798421502113
] | -0.012933
|
the one that is available on the public internet. The `CLUSTER-IP` is only available inside your cluster/private cloud network. Note that on AWS, type `LoadBalancer` creates an ELB, which uses a (long) hostname, not an IP. It's too long to fit in the standard `kubectl get svc` output, in fact, so you'll need to do `kubectl describe service my-nginx` to see it. You'll see something like this: ```shell kubectl describe service my-nginx ... LoadBalancer Ingress: a320587ffd19711e5a37606cf4a74574-1142138393.us-east-1.elb.amazonaws.com ... ``` ## {{% heading "whatsnext" %}} \* Learn more about [Using a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) \* Learn more about [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/) \* Learn more about [Creating an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/services/connect-applications-service.md
|
[
-0.043852660804986954,
-0.010556825436651707,
-0.056384794414043427,
-0.0062509216368198395,
0.007302383426576853,
0.02400856465101242,
-0.027362873777747154,
-0.03733561560511589,
0.08039183914661407,
0.03877807781100273,
-0.07618774473667145,
-0.0647224560379982,
-0.020301196724176407,
-0.09005681425333023,
0.07260473072528839,
-0.055379610508680344,
0.04622797295451164,
-0.051432665437459946,
0.004455565940588713,
-0.05477769300341606,
-0.04891736060380936,
0.06995764374732971,
-0.05471197888255119,
0.020008264109492302,
-0.0653391107916832,
0.006236344110220671,
-0.05657424032688141,
0.023342140018939972,
0.037057939916849136,
-0.08459906280040741,
-0.0021516340784728527,
0.02819381095468998,
0.024807510897517204,
0.05753845348954201,
-0.01861295849084854,
0.07845398783683777,
0.05455460026860237,
-0.0622057281434536,
-0.08086929470300674,
0.015186140313744545,
0.12593284249305725,
0.0006719625671394169,
-0.010577254928648472,
-0.07135329395532608,
-0.060752999037504196,
-0.016925785690546036,
-0.06114150956273079,
0.017156461253762245,
0.03486108034849167,
-0.0364546962082386,
-0.0008926291484385729,
-0.10551914572715759,
0.005813474766910076,
0.06946634501218796,
-0.056816015392541885,
-0.01657070219516754,
0.019065046682953835,
-0.009137410670518875,
0.08363203704357147,
-0.001661301706917584,
0.03309275582432747,
-0.07243500649929047,
0.11196145415306091,
-0.002779833972454071,
-0.05261653661727905,
-0.04378758743405342,
-0.009495181031525135,
0.015872059389948845,
-0.009457038715481758,
-0.08131511509418488,
0.05553509294986725,
-0.010995372198522091,
-0.06270235776901245,
0.03242676332592964,
0.029411237686872482,
0.061722856014966965,
0.055168502032756805,
-0.030511781573295593,
0.017075644806027412,
0.009846153669059277,
-0.023587333038449287,
0.043886784464120865,
0.020091988146305084,
0.07496270537376404,
-0.06926855444908142,
-0.051303278654813766,
0.027295095846056938,
-0.08912516385316849,
0.04137289896607399,
-0.03313982114195824,
-0.021560000255703926,
-0.007866961881518364,
0.009618974290788174,
-0.07639804482460022,
0.05463838577270508,
0.05952806770801544,
-0.03765910491347313,
0.02581915818154812,
-0.027534855529665947,
0.007120816502720118,
0.06184422969818115,
-0.006017641630023718,
0.025540245696902275,
0.00159474927932024,
-0.03442096337676048,
-0.024927278980612755,
-0.0644572377204895,
0.045088499784469604,
0.07173632085323334,
0.0258383397012949,
-0.02481502667069435,
0.003030425403267145,
-0.011570913717150688,
-0.03494374454021454,
-0.02416897565126419,
-0.04598390683531761,
0.060451440513134,
-0.06317025423049927,
0.02449430339038372,
0.051160186529159546,
0.05285502225160599,
-0.07869256287813187,
-0.0029834641609340906,
-0.00008639999578008428,
0.010190597735345364,
0.002030168892815709,
-0.025710923597216606,
4.147497452690246e-33,
0.007235174998641014,
-0.049989938735961914,
0.05676287040114403,
-0.04715342819690704,
0.022886697202920914,
-0.012644798494875431,
-0.0644136369228363,
0.020109841600060463,
-0.05272873118519783,
-0.010982782579958439,
-0.07128851115703583,
0.0907963216304779,
0.037453148514032364,
0.002088099019601941,
0.0028477185405790806,
0.050741977989673615,
0.003021067474037409,
-0.010826514102518559,
0.08834513276815414,
0.010654733516275883,
0.0674300417304039,
-0.0775376707315445,
-0.041268426924943924,
0.042563725262880325,
0.016564300283789635,
-0.02608681283891201,
0.01750769466161728,
-0.08289595693349838,
0.012981023639440536,
0.009687894955277443,
0.08881159126758575,
0.026455814018845558,
-0.011898953467607498,
-0.025161225348711014,
-0.07391864061355591,
-0.033879946917295456,
0.015121623873710632,
0.04900171607732773,
-0.09847448766231537,
-0.024213574826717377,
0.04783175140619278,
0.019518431276082993,
-0.05652850121259689,
-0.02755746617913246,
0.016969993710517883,
-0.010148225352168083,
-0.012601305730640888,
-0.04771304503083229,
0.0931253582239151,
0.020092731341719627,
-0.04954731836915016,
-0.09679488837718964,
0.034506481140851974,
0.00714833801612258,
0.09415046870708466,
0.11646244674921036,
0.032589592039585114,
0.019125385209918022,
-0.04410002380609512,
-0.005612233188003302,
-0.019509486854076385,
-0.012683484703302383,
-0.015809400007128716,
0.06933008879423141,
0.018442993983626366,
-0.02199452556669712,
0.059319525957107544,
0.028810832649469376,
-0.05429007112979889,
0.02643151767551899,
-0.03994103893637657,
0.04712824895977974,
0.052392199635505676,
0.10199183970689774,
-0.033413439989089966,
-0.08398808538913727,
-0.0058284117840230465,
0.012716041877865791,
-0.05860143527388573,
0.06486556679010391,
-0.022795328870415688,
-0.010320530273020267,
-0.044073447585105896,
0.12708395719528198,
-0.047366347163915634,
-0.04128718376159668,
0.05462874844670296,
0.0055494364351034164,
0.013533937744796276,
0.02522476762533188,
-0.049629658460617065,
-0.03583865240216255,
-0.03705569729208946,
-0.012136376462876797,
-0.13783884048461914,
-5.307775029141139e-33,
0.03497043251991272,
-0.010245169512927532,
-0.045068174600601196,
-0.015702880918979645,
0.030772147700190544,
0.003046899102628231,
0.08633727580308914,
0.11592674255371094,
-0.05373091623187065,
0.036065638065338135,
0.06382247805595398,
0.010356681421399117,
0.014319771900773048,
0.0021304432302713394,
-0.02444389835000038,
0.013419867493212223,
-0.05853087082505226,
-0.05611615628004074,
-0.06271013617515564,
0.04364539310336113,
-0.07536803930997849,
-0.049561452120542526,
0.11020345240831375,
-0.024979140609502792,
0.009710674174129963,
-0.02055361494421959,
0.05299641564488411,
0.006615510210394859,
-0.1391649842262268,
-0.032855674624443054,
-0.06463488191366196,
-0.010868321172893047,
-0.020747287198901176,
0.06695346534252167,
-0.09986378252506256,
-0.04539358243346214,
-0.029636723920702934,
0.006053643301129341,
0.05546005442738533,
-0.14004720747470856,
-0.0198921300470829,
0.0674280896782875,
-0.07908675819635391,
-0.030826810747385025,
-0.06562554836273193,
-0.014183305203914642,
0.023088106885552406,
0.007701350841671228,
-0.020005328580737114,
-0.02929174154996872,
-0.06954046338796616,
-0.028011493384838104,
-0.029558802023530006,
0.16577060520648956,
-0.007699041161686182,
0.05339108407497406,
0.021047132089734077,
0.10921887308359146,
-0.03763559088110924,
0.04754967987537384,
0.03426094353199005,
-0.0675026923418045,
-0.006052669603377581,
0.03772059828042984,
0.03028336726129055,
-0.03924788162112236,
-0.026363255456089973,
-0.019826073199510574,
0.009877331554889679,
0.04601292684674263,
-0.03383396938443184,
0.05735519155859947,
0.07363341003656387,
0.08665893971920013,
-0.020717954263091087,
0.03787603974342346,
0.05574801191687584,
-0.017478741705417633,
0.008797568269073963,
-0.04694489762187004,
-0.02955883927643299,
0.03304966539144516,
-0.0969158411026001,
-0.03451969102025032,
0.12231823801994324,
0.07420847564935684,
0.021787768229842186,
0.10247786343097687,
0.07959390431642532,
0.09125742316246033,
-0.1093435287475586,
-0.01585485227406025,
-0.05117937549948692,
0.02294176258146763,
-0.02364383265376091,
-5.399573055342444e-8,
0.005547496490180492,
0.018406957387924194,
-0.013280593790113926,
0.02395947277545929,
0.011007037945091724,
0.040065571665763855,
0.00044973561307415366,
-0.04892633110284805,
-0.027331659570336342,
0.05092334747314453,
-0.011732179671525955,
0.03091079741716385,
-0.06557703018188477,
-0.0041709705255925655,
0.015375982969999313,
-0.017476724460721016,
0.029489906504750252,
0.006575014442205429,
0.042837955057621,
-0.042146727442741394,
-0.07613690942525864,
-0.029282037168741226,
0.005767237860709429,
0.004794493783265352,
0.03538327291607857,
0.03464372456073761,
-0.02200462855398655,
-0.01556413248181343,
-0.023930592462420464,
-0.0241355299949646,
-0.023011464625597,
0.008305317722260952,
-0.012526828795671463,
-0.020578207448124886,
-0.03693117946386337,
0.03559229150414467,
-0.1813064068555832,
0.07065436989068985,
0.018714547157287598,
0.08228170871734619,
0.06455369293689728,
0.07216174155473709,
-0.018652506172657013,
-0.053637824952602386,
0.03966401889920235,
0.06737823784351349,
-0.026574699208140373,
0.0658346638083458,
0.024017613381147385,
0.004958811216056347,
-0.027955317869782448,
-0.06717178970575333,
0.0007531513110734522,
0.07428479939699173,
-0.021835563704371452,
0.03694530576467514,
-0.025322573259472847,
-0.08601617813110352,
0.02603720687329769,
0.08310406655073166,
0.032408248633146286,
0.02487080544233322,
-0.031973909586668015,
0.023999076336622238
] | 0.156736
|
This tutorial shows you how to build and deploy a simple \_(not production ready)\_, multi-tier web application using Kubernetes and [Docker](https://www.docker.com/). This example consists of the following components: \* A single-instance [Redis](https://www.redis.io/) to store guestbook entries \* Multiple web frontend instances ## {{% heading "objectives" %}} \* Start up a Redis leader. \* Start up two Redis followers. \* Start up the guestbook frontend. \* Expose and view the Frontend Service. \* Clean up. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} ## Start up the Redis Database The guestbook application uses Redis to store its data. ### Creating the Redis Deployment The manifest file, included below, specifies a Deployment controller that runs a single replica Redis Pod. {{% code\_sample file="application/guestbook/redis-leader-deployment.yaml" %}} 1. Launch a terminal window in the directory you downloaded the manifest files. 1. Apply the Redis Deployment from the `redis-leader-deployment.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/redis-leader-deployment.yaml ``` 1. Query the list of Pods to verify that the Redis Pod is running: ```shell kubectl get pods ``` The response should be similar to this: ``` NAME READY STATUS RESTARTS AGE redis-leader-fb76b4755-xjr2n 1/1 Running 0 13s ``` 1. Run the following command to view the logs from the Redis leader Pod: ```shell kubectl logs -f deployment/redis-leader ``` ### Creating the Redis leader Service The guestbook application needs to communicate to the Redis to write its data. You need to apply a [Service](/docs/concepts/services-networking/service/) to proxy the traffic to the Redis Pod. A Service defines a policy to access the Pods. {{% code\_sample file="application/guestbook/redis-leader-service.yaml" %}} 1. Apply the Redis Service from the following `redis-leader-service.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/redis-leader-service.yaml ``` 1. Query the list of Services to verify that the Redis Service is running: ```shell kubectl get service ``` The response should be similar to this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.0.0.1 443/TCP 1m redis-leader ClusterIP 10.103.78.24 6379/TCP 16s ``` {{< note >}} This manifest file creates a Service named `redis-leader` with a set of labels that match the labels previously defined, so the Service routes network traffic to the Redis Pod. {{< /note >}} ### Set up Redis followers Although the Redis leader is a single Pod, you can make it highly available and meet traffic demands by adding a few Redis followers, or replicas. {{% code\_sample file="application/guestbook/redis-follower-deployment.yaml" %}} 1. Apply the Redis Deployment from the following `redis-follower-deployment.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/redis-follower-deployment.yaml ``` 1. Verify that the two Redis follower replicas are running by querying the list of Pods: ```shell kubectl get pods ``` The response should be similar to this: ``` NAME READY STATUS RESTARTS AGE redis-follower-dddfbdcc9-82sfr 1/1 Running 0 37s redis-follower-dddfbdcc9-qrt5k 1/1 Running 0 38s redis-leader-fb76b4755-xjr2n 1/1 Running 0 11m ``` ### Creating the Redis follower service The guestbook application needs to communicate with the Redis followers to read data. To make the Redis followers discoverable, you must set up another [Service](/docs/concepts/services-networking/service/). {{% code\_sample file="application/guestbook/redis-follower-service.yaml" %}} 1. Apply the Redis Service from the following `redis-follower-service.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/redis-follower-service.yaml ``` 1. Query the list of Services to verify that the Redis Service is running: ```shell kubectl get service ``` The response should be similar to this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 443/TCP 3d19h redis-follower ClusterIP 10.110.162.42 6379/TCP 9s redis-leader ClusterIP 10.103.78.24 6379/TCP 6m10s ``` {{< note >}} This manifest file creates a Service named `redis-follower` with a set of labels that match the labels previously defined, so the Service routes network traffic to the Redis Pod. {{< /note >}} ## Set up and Expose the Guestbook Frontend Now that you
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateless-application/guestbook.md
|
[
0.015155616216361523,
-0.017134644091129303,
-0.06220390275120735,
-0.047768719494342804,
-0.0274816807359457,
-0.02337450347840786,
-0.04999693110585213,
0.0013956093462184072,
0.004116383846849203,
0.07782702147960663,
-0.02053247205913067,
-0.06132957711815834,
0.051453571766614914,
-0.10709178447723389,
0.10970747470855713,
-0.0003331901680212468,
0.06723722815513611,
-0.015211516059935093,
-0.022501004859805107,
-0.0035810961853712797,
-0.005188578739762306,
-0.0011427555000409484,
-0.008819864131510258,
-0.0010064555099233985,
-0.059778522700071335,
-0.0022087658289819956,
-0.016490351408720016,
0.022735221311450005,
-0.07394752651453018,
-0.05595680698752403,
0.03986523300409317,
-0.02389448881149292,
0.0017422788077965379,
0.016782570630311966,
0.07651818543672562,
0.1453476995229721,
0.005987889599055052,
-0.0844988226890564,
-0.08100734651088715,
0.04004363715648651,
-0.005538902245461941,
-0.029293106868863106,
-0.0940273106098175,
-0.004290030803531408,
0.007511490024626255,
-0.05072623863816261,
-0.04860006645321846,
0.03682916611433029,
0.10148166120052338,
-0.04640885442495346,
0.01507568359375,
-0.09820348024368286,
0.03693031519651413,
0.03129244223237038,
-0.036738548427820206,
0.014161091297864914,
0.0051701869815588,
0.008604387752711773,
0.03473597392439842,
-0.054550185799598694,
0.088425412774086,
-0.023686347529292107,
0.02136807143688202,
-0.06072382256388664,
-0.07548500597476959,
-0.02536954917013645,
-0.01957729272544384,
-0.022213377058506012,
0.027980394661426544,
-0.05147133022546768,
0.027468468993902206,
0.037322066724300385,
-0.040519438683986664,
-0.0812004804611206,
-0.027699092403054237,
-0.050917550921440125,
0.007916171103715897,
0.09647953510284424,
0.012212795205414295,
-0.023381829261779785,
-0.006141518708318472,
0.025909990072250366,
0.03901461139321327,
-0.008470132015645504,
-0.06797312945127487,
-0.05184821039438248,
0.032179199159145355,
-0.06043417006731033,
0.0190410315990448,
-0.012826938182115555,
0.0004939510836265981,
-0.029476314783096313,
0.08204331248998642,
-0.0655144602060318,
0.022517679259181023,
-0.003567403182387352,
-0.06510776281356812,
-0.03475087508559227,
0.07886426150798798,
0.017098573967814445,
-0.007754934020340443,
-0.05231565237045288,
0.09510820358991623,
0.005077727604657412,
0.017150897532701492,
-0.0157747995108366,
-0.025397885590791702,
0.029350142925977707,
0.010176456533372402,
-0.06203683093190193,
-0.03465380519628525,
0.06518151611089706,
0.005563004408031702,
0.022629233077168465,
0.0021586287766695023,
0.026965653523802757,
0.030110623687505722,
-0.040267035365104675,
-0.00826568529009819,
0.04030792415142059,
0.13627305626869202,
-0.03950691223144531,
0.07597389817237854,
-0.02033982239663601,
0.013410240411758423,
-0.07910165935754776,
-0.04720359668135643,
3.731975628037922e-33,
0.02931554988026619,
-0.0030837447848170996,
0.01598680019378662,
0.069416843354702,
0.1452357918024063,
-0.0436234176158905,
-0.0073263514786958694,
-0.026250209659337997,
-0.03798431158065796,
-0.03928711637854576,
-0.03586452454328537,
0.06993009150028229,
-0.016995741054415703,
0.025606641545891762,
-0.00971656572073698,
-0.011900431476533413,
-0.027385294437408447,
0.039358753710985184,
0.10742174088954926,
-0.01885331980884075,
0.05859684944152832,
-0.09365946799516678,
-0.03328845277428627,
-0.03915262222290039,
0.05568422004580498,
-0.0018443596782162786,
0.05041823163628578,
-0.035624321550130844,
-0.005785033572465181,
0.001081292051821947,
0.04541061818599701,
-0.04908005893230438,
0.049160946160554886,
0.032559584826231,
-0.13478153944015503,
-0.03300432115793228,
-0.0019117797492071986,
0.017338259145617485,
-0.052990179508924484,
0.011246698908507824,
-0.03456903621554375,
0.009811888448894024,
0.003684642259031534,
-0.008020326495170593,
0.015090313740074635,
-0.019241854548454285,
0.026497308164834976,
-0.0012173989089205861,
0.11690498143434525,
0.04864850640296936,
-0.05101773142814636,
-0.07317131757736206,
0.096385158598423,
-0.016444586217403412,
0.0010220154654234648,
-0.01593799702823162,
0.07124324887990952,
-0.02891111560165882,
-0.031088583171367645,
-0.016353923827409744,
-0.06425502151250839,
0.028060078620910645,
-0.06623883545398712,
0.0504208579659462,
0.0008860485977493227,
0.014095129445195198,
0.00453311437740922,
0.01927279122173786,
0.019631849601864815,
0.00699193449690938,
-0.07708432525396347,
0.06442137807607651,
0.06142350658774376,
-0.09411411732435226,
-0.006935998797416687,
-0.06232764571905136,
0.0452660396695137,
-0.004255979787558317,
-0.06047523766756058,
0.026114437729120255,
-0.00021820222900714725,
0.005032726563513279,
-0.07698528468608856,
0.06960774213075638,
-0.03872492536902428,
-0.0706460252404213,
-0.015163512900471687,
0.009238895028829575,
-0.03181719034910202,
0.02026309445500374,
0.05199173465371132,
-0.04950498417019844,
-0.08549591153860092,
-0.05237991735339165,
-0.02261262759566307,
-4.477081089405861e-33,
0.057265955954790115,
-0.01825983077287674,
-0.03978797048330307,
0.0023257299326360226,
0.15790942311286926,
0.02488064207136631,
0.0891311913728714,
0.049984630197286606,
-0.09757397323846817,
-0.1036762222647667,
-0.0444999523460865,
-0.008892864920198917,
-0.043438173830509186,
0.08222170174121857,
-0.11338289827108383,
0.047824710607528687,
0.017473384737968445,
-0.0019853084813803434,
0.04185182601213455,
0.005510816816240549,
-0.048926446586847305,
0.03546598181128502,
0.02761603333055973,
0.011508399620652199,
0.011189121752977371,
-0.039317552000284195,
0.006562746595591307,
-0.005614080466330051,
-0.05426905304193497,
0.001642838353291154,
0.011380440555512905,
-0.06064804643392563,
0.04396122321486473,
-0.030179856345057487,
0.0019695244263857603,
0.02052755281329155,
-0.056860826909542084,
0.09091740101575851,
-0.022174211218953133,
-0.06962347775697708,
0.08397186547517776,
-0.10610643029212952,
-0.05078631266951561,
-0.09321645647287369,
-0.018564576283097267,
-0.025132179260253906,
-0.021694134920835495,
0.05139254778623581,
-0.047763630747795105,
-0.06279930472373962,
-0.04831847921013832,
-0.010907321237027645,
-0.054653070867061615,
0.026512885466217995,
-0.023037483915686607,
-0.012741860002279282,
-0.004482153337448835,
0.06952257454395294,
-0.03948857635259628,
0.07020285725593567,
0.029067227616906166,
-0.06018931418657303,
0.1109691634774208,
0.05473288893699646,
-0.013507556170225143,
-0.08734390139579773,
0.011667431332170963,
0.08762788772583008,
-0.015497737564146519,
0.07412175089120865,
-0.07811193913221359,
0.014631872996687889,
0.053944312036037445,
0.03688570111989975,
-0.010027915239334106,
-0.06275676190853119,
-0.004668228793889284,
-0.017336798831820488,
0.03459262102842331,
0.05996303632855415,
-0.03813217952847481,
0.012326338328421116,
-0.03998389095067978,
-0.0030349234584718943,
0.05439308285713196,
0.007418542169034481,
0.10410583764314651,
0.03427179530262947,
0.045682840049266815,
0.03448205068707466,
0.0009584970539435744,
-0.01899896189570427,
-0.01348579116165638,
0.08447510004043579,
-0.04592146351933479,
-5.135925107424555e-8,
0.06323860585689545,
0.0792187824845314,
-0.02551552839577198,
0.0027217164169996977,
-0.013385649770498276,
-0.015271387062966824,
0.07893391698598862,
-0.02385769970715046,
-0.04015231132507324,
0.012518774718046188,
-0.056268204003572464,
0.08049808442592621,
-0.030064772814512253,
-0.009113840758800507,
0.0015293315518647432,
0.046119678765535355,
-0.03189133480191231,
0.059288956224918365,
0.019228724762797356,
-0.07994277030229568,
0.007085162214934826,
-0.0009807625319808722,
0.02154901809990406,
-0.031090429052710533,
0.08784446120262146,
0.11240791529417038,
0.004669981077313423,
-0.07526401430368423,
0.06511133909225464,
-0.019071942195296288,
0.07473371177911758,
-0.0005680592730641365,
-0.09433749318122864,
0.07632236927747726,
0.0039436365477740765,
-0.05510692670941353,
-0.10757151991128922,
0.12636512517929077,
0.0412297248840332,
-0.04285234212875366,
-0.06313158571720123,
0.03367170691490173,
-0.014278974384069443,
-0.036058396100997925,
0.058068275451660156,
0.053802620619535446,
-0.0998341292142868,
-0.016593914479017258,
0.038389354944229126,
-0.014448937028646469,
-0.03167901933193207,
-0.03175158426165581,
0.0049398853443562984,
0.07505854964256287,
-0.008478943258523941,
0.06860732287168503,
0.0741569772362709,
0.004097175784409046,
0.09560713917016983,
0.011881375685334206,
0.03315918892621994,
0.005106291733682156,
-0.03333059325814247,
0.07087409496307373
] | 0.067177
|
10.103.78.24 6379/TCP 6m10s ``` {{< note >}} This manifest file creates a Service named `redis-follower` with a set of labels that match the labels previously defined, so the Service routes network traffic to the Redis Pod. {{< /note >}} ## Set up and Expose the Guestbook Frontend Now that you have the Redis storage of your guestbook up and running, start the guestbook web servers. Like the Redis followers, the frontend is deployed using a Kubernetes Deployment. The guestbook app uses a PHP frontend. It is configured to communicate with either the Redis follower or leader Services, depending on whether the request is a read or a write. The frontend exposes a JSON interface, and serves a jQuery-Ajax-based UX. ### Creating the Guestbook Frontend Deployment {{% code\_sample file="application/guestbook/frontend-deployment.yaml" %}} 1. Apply the frontend Deployment from the `frontend-deployment.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/frontend-deployment.yaml ``` 1. Query the list of Pods to verify that the three frontend replicas are running: ```shell kubectl get pods -l app=guestbook -l tier=frontend ``` The response should be similar to this: ``` NAME READY STATUS RESTARTS AGE frontend-85595f5bf9-5tqhb 1/1 Running 0 47s frontend-85595f5bf9-qbzwm 1/1 Running 0 47s frontend-85595f5bf9-zchwc 1/1 Running 0 47s ``` ### Creating the Frontend Service The `Redis` Services you applied is only accessible within the Kubernetes cluster because the default type for a Service is [ClusterIP](/docs/concepts/services-networking/service/#publishing-services-service-types). `ClusterIP` provides a single IP address for the set of Pods the Service is pointing to. This IP address is accessible only within the cluster. If you want guests to be able to access your guestbook, you must configure the frontend Service to be externally visible, so a client can request the Service from outside the Kubernetes cluster. However a Kubernetes user can use `kubectl port-forward` to access the service even though it uses a `ClusterIP`. {{< note >}} Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, support external load balancers. If your cloud provider supports load balancers and you want to use it, uncomment `type: LoadBalancer`. {{< /note >}} {{% code\_sample file="application/guestbook/frontend-service.yaml" %}} 1. Apply the frontend Service from the `frontend-service.yaml` file: ```shell kubectl apply -f https://k8s.io/examples/application/guestbook/frontend-service.yaml ``` 1. Query the list of Services to verify that the frontend Service is running: ```shell kubectl get services ``` The response should be similar to this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE frontend ClusterIP 10.97.28.230 80/TCP 19s kubernetes ClusterIP 10.96.0.1 443/TCP 3d19h redis-follower ClusterIP 10.110.162.42 6379/TCP 5m48s redis-leader ClusterIP 10.103.78.24 6379/TCP 11m ``` ### Viewing the Frontend Service via `kubectl port-forward` 1. Run the following command to forward port `8080` on your local machine to port `80` on the service. ```shell kubectl port-forward svc/frontend 8080:80 ``` The response should be similar to this: ``` Forwarding from 127.0.0.1:8080 -> 80 Forwarding from [::1]:8080 -> 80 ``` 1. load the page [http://localhost:8080](http://localhost:8080) in your browser to view your guestbook. ### Viewing the Frontend Service via `LoadBalancer` If you deployed the `frontend-service.yaml` manifest with type: `LoadBalancer` you need to find the IP address to view your Guestbook. 1. Run the following command to get the IP address for the frontend Service. ```shell kubectl get service frontend ``` The response should be similar to this: ``` NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE frontend LoadBalancer 10.51.242.136 109.197.92.229 80:32372/TCP 1m ``` 1. Copy the external IP address, and load the page in your browser to view your guestbook. {{< note >}} Try adding some guestbook entries by typing in a message, and clicking Submit. The message you typed appears in the frontend. This message indicates that data is successfully added to Redis through the Services you created earlier. {{< /note
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateless-application/guestbook.md
|
[
0.014149497263133526,
-0.012800505384802818,
-0.09618953615427017,
-0.03132818639278412,
-0.01535602007061243,
0.020936409011483192,
-0.05243896320462227,
-0.020026251673698425,
0.07196707278490067,
0.018313512206077576,
0.004923155065625906,
0.038858477026224136,
0.013090853579342365,
-0.13133792579174042,
0.08640067279338837,
-0.02083800733089447,
0.12117085605859756,
-0.027305621653795242,
-0.007385770324617624,
-0.017183180898427963,
-0.03351573273539543,
-0.007831349037587643,
-0.03637947142124176,
-0.03236134350299835,
-0.03927699103951454,
-0.05392289161682129,
0.02304476499557495,
0.01884372904896736,
-0.07524005323648453,
-0.05764160677790642,
0.02374269813299179,
-0.0008767358376644552,
-0.027597732841968536,
0.015072913840413094,
-0.0458066426217556,
0.08793161809444427,
-0.0029246152844280005,
-0.11347200721502304,
-0.07858691364526749,
0.05912941321730614,
0.059708282351493835,
-0.06187557429075241,
-0.0602155402302742,
0.019918764010071754,
0.004598928615450859,
-0.024047017097473145,
-0.029069295153021812,
0.07176142185926437,
0.028579697012901306,
-0.042340829968452454,
0.04249534755945206,
-0.052203468978405,
0.04638433828949928,
0.09523405879735947,
-0.05152076482772827,
0.009943359531462193,
-0.04656412824988365,
0.03755584731698036,
0.07074160873889923,
-0.018111709505319595,
0.0704737976193428,
-0.0021185954101383686,
0.030454011633992195,
-0.015634866431355476,
-0.10220084339380264,
-0.044468093663454056,
-0.03617526963353157,
0.004419084172695875,
-0.024416284635663033,
-0.06848324090242386,
0.04088085517287254,
0.04325881972908974,
-0.025396045297384262,
-0.09267829358577728,
-0.009173178113996983,
-0.04923723265528679,
-0.04134248197078705,
0.044611163437366486,
0.029659900814294815,
-0.04380175471305847,
-0.017495395615696907,
0.0021120146848261356,
0.056049492210149765,
0.05811922252178192,
-0.03377046063542366,
-0.004643755964934826,
0.047228019684553146,
-0.034721311181783676,
-0.015768177807331085,
0.033090390264987946,
-0.02899063006043434,
0.00969591923058033,
0.02951192483305931,
-0.027178864926099777,
-0.04757431522011757,
0.02262590266764164,
-0.062058184295892715,
-0.032362207770347595,
0.03824769705533981,
0.044945333153009415,
-0.016505060717463493,
0.069211944937706,
0.08270525932312012,
0.03427724167704582,
0.025334009900689125,
-0.033885400742292404,
0.026628918945789337,
0.04771292209625244,
0.062067773193120956,
-0.03227222338318825,
-0.030780550092458725,
0.04938153922557831,
0.0062675983645021915,
-0.004262021742761135,
-0.023809682577848434,
0.015298695303499699,
0.05055421218276024,
-0.013050323352217674,
-0.008834737353026867,
0.008407491259276867,
0.14631345868110657,
-0.03658644109964371,
-0.022886749356985092,
-0.013640678487718105,
0.010517645627260208,
-0.0737202987074852,
0.0006945549976080656,
3.719163106955944e-33,
0.005701088812202215,
0.024638857692480087,
0.046502161771059036,
0.00749785453081131,
0.09536708891391754,
-0.0672869011759758,
-0.03463339805603027,
-0.0505177304148674,
-0.05304505303502083,
-0.036622054874897,
-0.051682811230421066,
0.07056371867656708,
0.04846344515681267,
0.03984224423766136,
-0.010488892905414104,
0.02478535659611225,
-0.014015489257872105,
0.04497608542442322,
0.09252763539552689,
0.014603785239160061,
0.07719209045171738,
-0.05451919510960579,
0.028822636231780052,
-0.04660552367568016,
0.07442434877157211,
0.03738657012581825,
-0.02631225623190403,
-0.021330159157514572,
0.011261102743446827,
0.004681377671658993,
0.05487949028611183,
-0.03031659871339798,
0.015125388279557228,
0.012568578124046326,
-0.14711636304855347,
-0.000025857107175397687,
-0.03934547305107117,
-0.05977495759725571,
-0.0555092915892601,
-0.02578883059322834,
-0.005050449166446924,
0.003927926532924175,
-0.08860994875431061,
0.00537020293995738,
-0.0828571543097496,
-0.002874546917155385,
-0.011847610585391521,
-0.0014635981060564518,
0.10556143522262573,
0.07678709179162979,
-0.1196383461356163,
-0.047777965664863586,
0.07720679044723511,
0.009053093381226063,
0.05770770087838173,
-0.021659046411514282,
0.058608122169971466,
0.04657403752207756,
-0.041201185435056686,
0.02295239269733429,
0.030513646081089973,
0.0423920601606369,
-0.006135176867246628,
0.04898812994360924,
0.008529432117938995,
0.02686702460050583,
-0.0485646016895771,
-0.01340001355856657,
0.0020157494582235813,
-0.045029107481241226,
-0.09540797024965286,
0.14420190453529358,
0.04880697652697563,
-0.05234605073928833,
-0.003827963024377823,
-0.054075613617897034,
0.0067122397013008595,
-0.05029856413602829,
0.004325577989220619,
-0.011915681883692741,
0.050543803721666336,
-0.07699254900217056,
-0.03170689940452576,
0.10533615201711655,
-0.03226802125573158,
-0.05690857023000717,
-0.05704281106591225,
0.01520319189876318,
-0.02191871590912342,
0.027330361306667328,
0.04899720847606659,
-0.0019748585764318705,
-0.01748228631913662,
-0.006357854697853327,
-0.058756355196237564,
-4.106085154052762e-33,
0.000005226675511948997,
-0.0014497751835733652,
-0.060077156871557236,
0.06575427949428558,
0.08964046090841293,
0.03249714523553848,
0.049172382801771164,
0.09596119076013565,
-0.09385760128498077,
-0.07303552329540253,
-0.043634165078401566,
0.022354302927851677,
-0.04523395001888275,
0.056534990668296814,
-0.06844183802604675,
0.04502620920538902,
0.015292235650122166,
-0.04418841004371643,
0.013795800507068634,
-0.04764672368764877,
-0.09290173649787903,
0.05853942409157753,
0.07381385564804077,
-0.0271653663367033,
0.004333173390477896,
-0.017482932657003403,
0.04300298914313316,
0.00570401456207037,
-0.17162349820137024,
-0.01943991705775261,
0.015136471949517727,
-0.051417458802461624,
-0.020782653242349625,
-0.06093916296958923,
0.046300314366817474,
0.04296179860830307,
-0.029104385524988174,
0.11377813667058945,
-0.030625944957137108,
-0.0725756362080574,
0.10409672558307648,
-0.07430120557546616,
-0.07081324607133865,
-0.0894322395324707,
-0.010648051276803017,
-0.0070796809159219265,
-0.06905722618103027,
0.058930061757564545,
-0.028255585581064224,
-0.0613502599298954,
0.01171074341982603,
0.01575287990272045,
-0.02526460960507393,
0.06241428852081299,
-0.05179479718208313,
0.06079388037323952,
0.018415329977869987,
0.04400056228041649,
0.008139630779623985,
0.04703031852841377,
-0.02688773348927498,
-0.0769745334982872,
0.0891391783952713,
0.06203193962574005,
-0.025385119020938873,
-0.08666320145130157,
0.05000505596399307,
0.11637987196445465,
0.07124850153923035,
0.07255500555038452,
-0.006635854486376047,
0.00878872349858284,
0.06408857554197311,
0.0875747948884964,
0.039300352334976196,
-0.05260515958070755,
0.04110631346702576,
-0.060241855680942535,
-0.030255179852247238,
0.06824471801519394,
-0.03202885016798973,
0.001453205943107605,
-0.016262566670775414,
0.007752246223390102,
0.09018154442310333,
0.023243077099323273,
0.040311213582754135,
-0.006947757676243782,
0.030125238001346588,
0.0002210533566540107,
0.02080073207616806,
-0.030984045937657356,
-0.04755285009741783,
0.052881401032209396,
-0.09589796513319016,
-4.9148429326351106e-8,
0.0038469659630209208,
0.028091462329030037,
-0.04665091633796692,
-0.02102099172770977,
-0.014182467944920063,
0.023861287161707878,
0.06446965038776398,
-0.032985374331474304,
-0.056891512125730515,
0.04761769622564316,
0.005221235100179911,
0.05331146717071533,
0.01236091647297144,
-0.027227899059653282,
0.06319605559110641,
0.04668072238564491,
0.016515331342816353,
0.027508292347192764,
-0.008899199776351452,
-0.07519324123859406,
-0.02787109836935997,
0.005612846929579973,
-0.005207011476159096,
-0.022799894213676453,
0.1238655298948288,
0.05615047365427017,
0.005400718189775944,
-0.038677360862493515,
0.000834894017316401,
-0.03230041638016701,
0.014946923591196537,
0.04441407695412636,
-0.10557141155004501,
0.06619024276733398,
-0.046212729066610336,
0.01551364827901125,
-0.16007807850837708,
0.08289872109889984,
0.004935567732900381,
0.010298687033355236,
-0.018996329978108406,
0.0021946581546217203,
-0.02140691876411438,
-0.030944116413593292,
0.031476590782403946,
0.05173523351550102,
-0.02044142223894596,
-0.0032998048700392246,
0.0552876852452755,
-0.06497122347354889,
-0.049428824335336685,
-0.04565930366516113,
0.009634220041334629,
0.051789190620183945,
-0.0379304513335228,
0.013189460150897503,
0.030797263607382774,
-0.015211093239486217,
0.06137685477733612,
-0.02791578322649002,
0.016846558079123497,
0.031380366533994675,
-0.03336891531944275,
0.052559301257133484
] | 0.145234
|
page in your browser to view your guestbook. {{< note >}} Try adding some guestbook entries by typing in a message, and clicking Submit. The message you typed appears in the frontend. This message indicates that data is successfully added to Redis through the Services you created earlier. {{< /note >}} ## Scale the Web Frontend You can scale up or down as needed because your servers are defined as a Service that uses a Deployment controller. 1. Run the following command to scale up the number of frontend Pods: ```shell kubectl scale deployment frontend --replicas=5 ``` 1. Query the list of Pods to verify the number of frontend Pods running: ```shell kubectl get pods ``` The response should look similar to this: ``` NAME READY STATUS RESTARTS AGE frontend-85595f5bf9-5df5m 1/1 Running 0 83s frontend-85595f5bf9-7zmg5 1/1 Running 0 83s frontend-85595f5bf9-cpskg 1/1 Running 0 15m frontend-85595f5bf9-l2l54 1/1 Running 0 14m frontend-85595f5bf9-l9c8z 1/1 Running 0 14m redis-follower-dddfbdcc9-82sfr 1/1 Running 0 97m redis-follower-dddfbdcc9-qrt5k 1/1 Running 0 97m redis-leader-fb76b4755-xjr2n 1/1 Running 0 108m ``` 1. Run the following command to scale down the number of frontend Pods: ```shell kubectl scale deployment frontend --replicas=2 ``` 1. Query the list of Pods to verify the number of frontend Pods running: ```shell kubectl get pods ``` The response should look similar to this: ``` NAME READY STATUS RESTARTS AGE frontend-85595f5bf9-cpskg 1/1 Running 0 16m frontend-85595f5bf9-l9c8z 1/1 Running 0 15m redis-follower-dddfbdcc9-82sfr 1/1 Running 0 98m redis-follower-dddfbdcc9-qrt5k 1/1 Running 0 98m redis-leader-fb76b4755-xjr2n 1/1 Running 0 109m ``` ## {{% heading "cleanup" %}} Deleting the Deployments and Services also deletes any running Pods. Use labels to delete multiple resources with one command. 1. Run the following commands to delete all Pods, Deployments, and Services. ```shell kubectl delete deployment -l app=redis kubectl delete service -l app=redis kubectl delete deployment frontend kubectl delete service frontend ``` The response should look similar to this: ``` deployment.apps "redis-follower" deleted deployment.apps "redis-leader" deleted deployment.apps "frontend" deleted service "frontend" deleted ``` 1. Query the list of Pods to verify that no Pods are running: ```shell kubectl get pods ``` The response should look similar to this: ``` No resources found in default namespace. ``` ## {{% heading "whatsnext" %}} \* Complete the [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) Interactive Tutorials \* Use Kubernetes to create a blog using [Persistent Volumes for MySQL and Wordpress](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/#visit-your-new-wordpress-blog) \* Read more about [connecting applications with services](/docs/tutorials/services/connect-applications-service/) \* Read more about [using labels effectively](/docs/concepts/overview/working-with-objects/labels/#using-labels-effectively)
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateless-application/guestbook.md
|
[
0.07960235327482224,
-0.03991129621863365,
-0.057971976697444916,
0.02900252677500248,
-0.014588715508580208,
-0.04737049341201782,
-0.07468722015619278,
0.0007153642363846302,
0.03293396905064583,
0.07935407012701035,
0.01588769443333149,
-0.04338838905096054,
0.008282970637083054,
-0.08714374154806137,
0.07306349277496338,
-0.05538994446396828,
0.05468447506427765,
-0.039308592677116394,
-0.03863261267542839,
-0.03588680177927017,
-0.01755674183368683,
-0.010950078256428242,
-0.033503562211990356,
-0.013197692111134529,
-0.0029813903383910656,
-0.014215461909770966,
-0.06452229619026184,
-0.004581980872899294,
-0.08454747498035431,
-0.09391030669212341,
0.003320770338177681,
0.007267361972481012,
0.05047692358493805,
0.02756006456911564,
0.04433603957295418,
0.08616197854280472,
-0.021153870970010757,
-0.1083560362458229,
-0.05665541812777519,
0.04512482509016991,
0.01829341985285282,
-0.04454691708087921,
-0.04202945902943611,
0.048728156834840775,
0.02100335620343685,
-0.03139330819249153,
-0.06271637231111526,
0.04463934898376465,
0.10948532819747925,
-0.03756234422326088,
0.01209168415516615,
-0.038933124393224716,
0.020837703719735146,
0.0363752506673336,
-0.051574595272541046,
-0.010300401598215103,
-0.03095955029129982,
-0.010531114414334297,
0.08066852390766144,
-0.013464301824569702,
0.08184026181697845,
-0.011948310770094395,
0.01903379335999489,
-0.0594724677503109,
-0.09225467592477798,
-0.03079105168581009,
-0.020322754979133606,
-0.05083576217293739,
-0.03561155125498772,
-0.02455957978963852,
0.07081272453069687,
0.06224692240357399,
0.028480397537350655,
-0.08340852707624435,
-0.009242693893611431,
-0.0706031545996666,
-0.014382393099367619,
0.08165973424911499,
0.047571808099746704,
0.0010192530462518334,
-0.03488808497786522,
-0.0025591265875846148,
0.02697776071727276,
0.08364420384168625,
-0.04203534498810768,
-0.002074947115033865,
0.02459322288632393,
-0.07863537222146988,
-0.05233260989189148,
-0.005523962434381247,
0.0325188972055912,
0.02557353861629963,
0.015180833637714386,
-0.035603832453489304,
-0.027096258476376534,
-0.04310769587755203,
-0.07086732238531113,
-0.034486543387174606,
0.03979957103729248,
0.03675806522369385,
-0.0015532160177826881,
0.019538912922143936,
0.11361967772245407,
0.0565616674721241,
0.029315033927559853,
-0.029084235429763794,
-0.015181341208517551,
0.035716090351343155,
0.04485199972987175,
-0.030258765444159508,
0.040530286729335785,
0.05895629897713661,
0.04129866138100624,
0.01886136829853058,
-0.00044420265476219356,
0.010976212099194527,
-0.018204495310783386,
-0.03723888099193573,
-0.04197213426232338,
-0.006982302758842707,
0.161575049161911,
-0.009274451062083244,
-0.009863580577075481,
-0.08325657993555069,
0.004616776015609503,
-0.048713959753513336,
0.02043154276907444,
6.934596027857828e-33,
0.015181801281869411,
0.004235403146594763,
0.04105443134903908,
0.058130186051130295,
0.06648790836334229,
-0.012069664895534515,
-0.07091618329286575,
-0.02263917587697506,
-0.030233262106776237,
-0.03827442601323128,
-0.036525800824165344,
0.12391231954097748,
-0.003553339745849371,
0.024935927242040634,
0.010233082808554173,
0.016820544376969337,
0.035453058779239655,
0.06460118293762207,
0.063812255859375,
-0.019370798021554947,
0.0723978653550148,
-0.11928714066743851,
-0.004594182129949331,
-0.01827438734471798,
0.08329467475414276,
0.024951070547103882,
0.011469149962067604,
-0.036629073321819305,
-0.07582889497280121,
-0.016361379995942116,
0.048492491245269775,
-0.059575021266937256,
0.04231279715895653,
0.02755322866141796,
-0.15562587976455688,
-0.039898280054330826,
0.014258545823395252,
-0.008440806530416012,
-0.08111557364463806,
-0.02651885896921158,
0.038308050483465195,
0.0264461450278759,
-0.08544722944498062,
0.00773326400667429,
-0.021986644715070724,
0.017473602667450905,
0.02742122858762741,
-0.05264066159725189,
0.08546417951583862,
0.05919579416513443,
-0.07881025224924088,
-0.03641893342137337,
0.0673912763595581,
0.01897626742720604,
0.006915118079632521,
0.021958375349640846,
0.057457782328128815,
0.03307997062802315,
-0.03650554642081261,
0.035768985748291016,
-0.010562807321548462,
-0.0060087814927101135,
-0.007679494097828865,
-0.0046624476090073586,
0.026175864040851593,
0.028361381962895393,
-0.0018209069967269897,
0.017168588936328888,
0.03932628035545349,
0.02152879163622856,
-0.0511348731815815,
0.09221818298101425,
0.06556159257888794,
-0.04124549776315689,
-0.005560216028243303,
-0.10323847085237503,
0.04537605866789818,
-0.03536498174071312,
-0.08585933595895767,
0.010211840271949768,
0.031715020537376404,
-0.06795097887516022,
-0.04281959682703018,
0.07033721357584,
0.021612366661429405,
-0.030882304534316063,
-0.017377564683556557,
0.04623823240399361,
-0.05755320563912392,
0.0280990619212389,
-0.000699736294336617,
-0.04443405941128731,
-0.05465463548898697,
-0.04286728426814079,
-0.061631981283426285,
-6.501076650010446e-33,
0.015371126122772694,
0.0006277356878854334,
-0.050401199609041214,
0.0012623275397345424,
0.07680144160985947,
0.022699369117617607,
0.04568879306316376,
0.13954012095928192,
-0.10110627859830856,
-0.06893936544656754,
0.009347119368612766,
0.007456570398062468,
-0.02724171057343483,
0.0636468455195427,
-0.1127709150314331,
0.09708470851182938,
-0.020932529121637344,
-0.0421205535531044,
0.011892192997038364,
-0.02159261889755726,
-0.09826721996068954,
0.052537620067596436,
0.08957476913928986,
0.03313909098505974,
0.012695442885160446,
-0.022380275651812553,
0.025372005999088287,
-0.017406169325113297,
-0.08848172426223755,
-0.07087893038988113,
0.04781290143728256,
-0.07382900267839432,
0.003552883630618453,
0.03776777163147926,
0.07053973525762558,
-0.018939975649118423,
-0.025783265009522438,
0.09062603861093521,
0.006547180935740471,
0.0016585513949394226,
0.062480367720127106,
-0.08368515968322754,
-0.10850425064563751,
-0.09460091590881348,
-0.025606323033571243,
-0.048964690417051315,
-0.03082001954317093,
0.045228105038404465,
-0.004614109639078379,
-0.06249093636870384,
0.038264382630586624,
-0.0008402624516747892,
-0.05118265375494957,
0.03676604852080345,
-0.050231631845235825,
0.0022133677266538143,
0.01355396956205368,
0.04965027794241905,
-0.008754129521548748,
0.013850752264261246,
-0.039553217589855194,
-0.0822892040014267,
0.05507951229810715,
0.07898624241352081,
-0.0059615448117256165,
-0.0614059679210186,
0.010425005108118057,
0.08493515104055405,
0.02803751267492771,
0.06931807845830917,
-0.007937486283481121,
0.043118514120578766,
0.036463234573602676,
0.04909529909491539,
-0.0018871971406042576,
-0.03738091513514519,
-0.016965709626674652,
-0.04637167230248451,
0.05178358405828476,
0.08455433696508408,
-0.007503443397581577,
0.02072162553668022,
0.015474006533622742,
0.03600432351231575,
0.04002342000603676,
0.03248340263962746,
0.0758228525519371,
0.0262775719165802,
0.0218290314078331,
0.08964217454195023,
-0.052619386464357376,
-0.03843390569090843,
-0.07671641558408737,
0.07291761785745621,
-0.06054464355111122,
-5.473614805850957e-8,
0.030502675101161003,
0.04534963518381119,
-0.01970703899860382,
0.056906819343566895,
0.049020230770111084,
-0.006424590013921261,
0.027506811544299126,
-0.012615719810128212,
-0.12034616619348526,
0.019359901547431946,
-0.023449761793017387,
0.048108652234077454,
-0.04641454666852951,
0.0009352402412332594,
0.08683589100837708,
0.0013344816397875547,
-0.007676202338188887,
0.05586418882012367,
0.014692475087940693,
-0.0910886898636818,
-0.007799592800438404,
0.023899773135781288,
0.02271108329296112,
-0.022426288574934006,
0.0940038412809372,
0.03946489468216896,
0.0053971800953149796,
-0.043747495859861374,
-0.005385176278650761,
-0.06929733604192734,
0.04801443591713905,
0.004446717910468578,
-0.06306331604719162,
0.038611866533756256,
0.010369478724896908,
-0.04802342504262924,
-0.13316279649734497,
0.10449453443288803,
0.0009873108938336372,
-0.031979113817214966,
-0.04581663757562637,
0.006280902773141861,
-0.009664789773523808,
-0.03584614768624306,
-0.028096919879317284,
0.06697443127632141,
-0.0742085725069046,
0.025418618693947792,
0.08560571819543839,
-0.08001554012298584,
-0.0390135832130909,
-0.07168561965227127,
0.008289123885333538,
0.06242655962705612,
-0.10323335975408554,
0.019521646201610565,
0.030276769772171974,
0.04465813934803009,
0.04477324336767197,
0.037926360964775085,
0.04596733674407005,
-0.002966053318232298,
-0.06787999719381332,
0.03722735866904259
] | 0.096146
|
This page shows how to create a Kubernetes Service object that exposes an external IP address. ## {{% heading "prerequisites" %}} \* Install [kubectl](/docs/tasks/tools/). \* Use a cloud provider like Google Kubernetes Engine or Amazon Web Services to create a Kubernetes cluster. This tutorial creates an [external load balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/), which requires a cloud provider. \* Configure `kubectl` to communicate with your Kubernetes API server. For instructions, see the documentation for your cloud provider. ## {{% heading "objectives" %}} \* Run five instances of a Hello World application. \* Create a Service object that exposes an external IP address. \* Use the Service object to access the running application. ## Creating a service for an application running in five pods 1. Run a Hello World application in your cluster: {{% code\_sample file="service/load-balancer-example.yaml" %}} ```shell kubectl apply -f https://k8s.io/examples/service/load-balancer-example.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 five {{< 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=LoadBalancer --name=my-service ``` 1. Display information about the Service: ```shell kubectl get services my-service ``` The output is similar to: ```console NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service LoadBalancer 10.3.245.137 104.198.205.71 8080/TCP 54s ``` {{< note >}} The `type=LoadBalancer` service is backed by external cloud providers, which is not covered in this example. Please refer to [setting `type: LoadBalancer` for your Service](/docs/concepts/services-networking/service/#loadbalancer) for the details. {{< /note >}} {{< note >}} If the external IP address is shown as \, wait for a minute and enter the same command again. {{< /note >}} 1. Display detailed information about the Service: ```shell kubectl describe services my-service ``` The output is similar to: ```console Name: my-service Namespace: default Labels: app.kubernetes.io/name=load-balancer-example Annotations: Selector: app.kubernetes.io/name=load-balancer-example Type: LoadBalancer IP: 10.3.245.137 LoadBalancer Ingress: 104.198.205.71 Port: 8080/TCP NodePort: 32377/TCP Endpoints: 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more... Session Affinity: None Events: ``` Make a note of the external IP address (`LoadBalancer Ingress`) exposed by your service. In this example, the external IP address is 104.198.205.71. Also note the value of `Port` and `NodePort`. In this example, the `Port` is 8080 and the `NodePort` is 32377. 1. In the preceding output, you can see that the service has several endpoints: 10.0.0.6:8080,10.0.1.6:8080,10.0.1.7:8080 + 2 more. These are internal addresses of the pods that are running the Hello World application. To verify these are pod addresses, enter this command: ```shell kubectl get pods --output=wide ``` The output is similar to: ```console NAME ... IP NODE hello-world-2895499144-1jaz9 ... 10.0.1.6 gke-cluster-1-default-pool-e0b8d269-1afc hello-world-2895499144-2e5uh ... 10.0.1.8 gke-cluster-1-default-pool-e0b8d269-1afc hello-world-2895499144-9m4h1 ... 10.0.0.6 gke-cluster-1-default-pool-e0b8d269-5v7a hello-world-2895499144-o4z13 ... 10.0.1.7 gke-cluster-1-default-pool-e0b8d269-1afc hello-world-2895499144-segjf ... 10.0.2.5 gke-cluster-1-default-pool-e0b8d269-cpuc ``` 1. Use the external IP address (`LoadBalancer Ingress`) to access the Hello World application: ```shell curl http://: ``` where `` is the external IP address (`LoadBalancer Ingress`) of your Service, and `` is the value of `Port` in your Service description. If you are using minikube, typing `minikube service my-service` will automatically open the Hello World application in a browser. The response to a successful request is a hello message: ```console Hello, world! Version: 2.0.0 Hostname: 0bd46b45f32f ``` ## {{% heading "cleanup" %}} To delete the Service, enter this command: ```shell kubectl delete services my-service ``` To delete the Deployment, the ReplicaSet, and the Pods that are running the Hello World application, enter this command: ```shell kubectl delete deployment
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateless-application/expose-external-ip-address.md
|
[
-0.023750070482492447,
-0.03806907311081886,
0.025024186819791794,
-0.025412455201148987,
-0.08521217107772827,
-0.009686595760285854,
-0.031574051827192307,
-0.0037739984691143036,
0.07057153433561325,
0.06346309930086136,
-0.06211066618561745,
-0.0714012160897255,
0.009776684455573559,
-0.06188390776515007,
0.08626595884561539,
0.012399904429912567,
0.07636485248804092,
-0.04306513071060181,
-0.03607960417866707,
-0.060029175132513046,
0.0027507205959409475,
0.03548666089773178,
-0.006388045847415924,
0.026011725887656212,
-0.10602821409702301,
-0.00519389845430851,
0.0014272243715822697,
-0.007135935593396425,
0.005094379186630249,
0.014815307222306728,
-0.029368819668889046,
-0.06434746831655502,
0.011016745120286942,
0.050732240080833435,
-0.02332707867026329,
0.028932780027389526,
0.024356979876756668,
-0.008973107673227787,
-0.09193487465381622,
0.01937745325267315,
0.06673349440097809,
-0.04882672801613808,
-0.0930839329957962,
-0.06606464833021164,
0.0326150618493557,
-0.026791954413056374,
-0.044341444969177246,
0.03660903126001358,
0.0502568855881691,
-0.030682502314448357,
0.023146601393818855,
-0.1295807957649231,
0.026730690151453018,
0.014078425243496895,
-0.034803248941898346,
-0.01903088204562664,
0.02848832681775093,
0.01722647063434124,
0.06403417885303497,
0.014667339622974396,
0.0606665201485157,
-0.05202566459774971,
0.09490244835615158,
-0.027689799666404724,
-0.036263830959796906,
-0.016112426295876503,
0.014692435972392559,
0.08107288926839828,
-0.0117057329043746,
-0.030847230926156044,
0.03315085917711258,
0.0354234054684639,
-0.07409876585006714,
-0.014558942057192326,
-0.05606008693575859,
0.018126362934708595,
0.005214572884142399,
0.02283623442053795,
-0.00697390316054225,
0.02333977445960045,
0.04079347848892212,
0.10331364721059799,
0.049483772367239,
0.05826558917760849,
-0.11442411690950394,
-0.08223440498113632,
0.003310822881758213,
-0.03859000653028488,
0.031146138906478882,
-0.02618555538356304,
-0.009196585044264793,
-0.03281820937991142,
-0.028891542926430702,
-0.09036704897880554,
0.07200458645820618,
0.05107160285115242,
-0.02177342027425766,
-0.042913276702165604,
-0.007488900795578957,
-0.04157448932528496,
0.04330400750041008,
-0.026857266202569008,
-0.01770074851810932,
0.022469958290457726,
0.054498884826898575,
-0.006157665979117155,
-0.040144264698028564,
-0.0008209165534935892,
0.0486513152718544,
0.03904188051819801,
-0.034712452441453934,
-0.021431008353829384,
-0.007820635102689266,
-0.016269106417894363,
-0.016180697828531265,
0.014538931660354137,
0.03896712884306908,
-0.027393190190196037,
0.05495268478989601,
0.047715701162815094,
-0.008982202969491482,
-0.09588126838207245,
0.005309222731739283,
-0.02156384475529194,
0.004363616928458214,
0.04753076285123825,
-0.01933508738875389,
3.099546442984085e-33,
0.040545426309108734,
-0.0581524632871151,
0.07895126193761826,
-0.02945680357515812,
0.028883781284093857,
-0.05241112783551216,
-0.006885941606014967,
0.002993638627231121,
-0.049238916486501694,
-0.02897915057837963,
-0.04038461297750473,
0.08043228089809418,
0.10085429251194,
-0.01586369052529335,
-0.017302658408880234,
0.02126593515276909,
-0.03814247250556946,
0.027949299663305283,
0.19472487270832062,
0.037220925092697144,
-0.024929143488407135,
-0.08945059031248093,
0.013156088069081306,
-0.004281495697796345,
0.017058853060007095,
0.02419319562613964,
0.030925577506422997,
-0.08462411165237427,
0.01084931381046772,
0.0013242213753983378,
0.063169464468956,
-0.03857451304793358,
-0.024907898157835007,
-0.019428148865699768,
-0.09310267120599747,
-0.038379915058612823,
-0.037297990173101425,
0.049949780106544495,
-0.07125168293714523,
0.04394124075770378,
0.04443615674972534,
-0.0022785861510783434,
-0.051381535828113556,
-0.06281446665525436,
0.027509480714797974,
0.025126835331320763,
0.026055103167891502,
-0.035897497087717056,
0.094660684466362,
0.05302691459655762,
-0.05146429315209389,
-0.058700695633888245,
-0.006134830415248871,
-0.026376504451036453,
0.0845969170331955,
0.08015649765729904,
0.050595276057720184,
-0.03256602585315704,
-0.01831275410950184,
-0.03162604570388794,
-0.09009022265672684,
-0.030698319897055626,
-0.03272697702050209,
0.057907044887542725,
0.038675084710121155,
-0.020078198984265327,
-0.026009095832705498,
0.07468855381011963,
-0.02882865071296692,
0.002371071372181177,
-0.009797908365726471,
0.05872713774442673,
0.020205466076731682,
0.04853834584355354,
-0.008683589287102222,
-0.004909491632133722,
0.013377559371292591,
0.010547001846134663,
-0.1192835122346878,
0.0471256822347641,
0.015612573362886906,
-0.025240672752261162,
-0.006941166706383228,
0.08623603731393814,
-0.041360560804605484,
-0.017544126138091087,
0.021141868084669113,
0.029739638790488243,
0.0033588879741728306,
0.0884239450097084,
0.012813713401556015,
-0.07255485653877258,
-0.04567374661564827,
0.024792972952127457,
-0.08646729588508606,
-4.178269323400881e-33,
0.07449926435947418,
0.007745427079498768,
-0.025499261915683746,
-0.01620873622596264,
0.06359608471393585,
0.0036618125159293413,
0.02711387164890766,
0.09439028799533844,
-0.034631211310625076,
0.019680753350257874,
-0.05347162112593651,
0.02233111672103405,
0.044054191559553146,
0.061148010194301605,
-0.08330411463975906,
-0.003636315232142806,
-0.0792594775557518,
-0.0504956915974617,
-0.03471183776855469,
0.018392251804471016,
-0.06637028604745865,
-0.058527156710624695,
0.06939181685447693,
-0.05138290673494339,
-0.009771481156349182,
0.03528480604290962,
0.027275796979665756,
-0.014797188341617584,
-0.10191679745912552,
0.0016828952357172966,
-0.04156171903014183,
-0.027098355814814568,
0.04011361673474312,
0.024874651804566383,
-0.025001756846904755,
-0.03298736736178398,
-0.03050282783806324,
0.035944614559412,
0.043720442801713943,
-0.044067177921533585,
-0.013737681321799755,
-0.02364198863506317,
-0.054075948894023895,
-0.10924968868494034,
-0.06828571856021881,
0.006021486595273018,
-0.024779239669442177,
0.03156127780675888,
-0.07691436260938644,
-0.0675073117017746,
-0.04592335224151611,
-0.005966891068965197,
-0.13866877555847168,
0.14184562861919403,
-0.04721107706427574,
0.0445491187274456,
0.05273670703172684,
0.099423348903656,
-0.02946704626083374,
0.041703931987285614,
0.034785278141498566,
-0.16004495322704315,
0.07353223860263824,
0.0484146885573864,
0.0011451005702838302,
-0.04196102172136307,
0.04317062720656395,
0.011331658810377121,
-0.023058976978063583,
0.03078368306159973,
-0.09665479511022568,
-0.009833998046815395,
0.0918588787317276,
0.08133694529533386,
-0.0014122623251751065,
0.022166121751070023,
0.05164162442088127,
-0.04888695105910301,
0.00024383357958868146,
0.010754994116723537,
-0.014603075571358204,
0.021062150597572327,
-0.04774857684969902,
-0.054354432970285416,
0.07045245170593262,
0.024274930357933044,
0.07862520962953568,
0.08276934921741486,
0.029518332332372665,
0.08469811826944351,
-0.04847780987620354,
0.033578936010599136,
-0.017550228163599968,
0.06436816602945328,
-0.026753727346658707,
-5.1990781457789126e-8,
0.03334984928369522,
0.0310465469956398,
-0.004402520600706339,
0.08317247033119202,
-0.1031331866979599,
0.043531227856874466,
0.025839516893029213,
-0.041042253375053406,
-0.012313560582697392,
0.0556114986538887,
-0.048581674695014954,
0.042803872376680374,
-0.05400301516056061,
0.043945539742708206,
0.0008306019008159637,
-0.03333820775151253,
0.05007439851760864,
-0.02037273906171322,
0.05613299831748009,
-0.07056991755962372,
-0.07637602090835571,
-0.03990115970373154,
0.030687307938933372,
-0.006829892285168171,
0.05161290988326073,
0.09625054150819778,
0.034131862223148346,
-0.07557696849107742,
0.008700786158442497,
-0.01945134438574314,
-0.04573334753513336,
-0.004223307594656944,
-0.05793771520256996,
0.017676105722784996,
0.004030650015920401,
0.04156675934791565,
-0.1689101904630661,
0.03054603934288025,
0.0050422982312738895,
0.05943797156214714,
0.01447256002575159,
0.0491536408662796,
-0.05349889397621155,
-0.06731808930635452,
0.12068672478199005,
0.03573846444487572,
-0.05715179443359375,
0.0321967788040638,
0.0054978905245661736,
0.03489680215716362,
-0.021324263885617256,
-0.027955660596489906,
0.035345543175935745,
0.07162634283304214,
0.029538728296756744,
0.05243929848074913,
-0.05730752274394035,
-0.06679347157478333,
0.00008891348988981918,
0.0749889612197876,
-0.0005155917606316507,
0.05799102783203125,
-0.00003252561145927757,
-0.01939529739320278
] | 0.137405
|
message: ```console Hello, world! Version: 2.0.0 Hostname: 0bd46b45f32f ``` ## {{% heading "cleanup" %}} To delete the Service, enter this command: ```shell kubectl delete services my-service ``` To delete the Deployment, the ReplicaSet, and the Pods that are running the Hello World application, enter this command: ```shell kubectl delete deployment hello-world ``` ## {{% heading "whatsnext" %}} Learn more about [connecting applications with services](/docs/tutorials/services/connect-applications-service/).
|
https://github.com/kubernetes/website/blob/main//content/en/docs/tutorials/stateless-application/expose-external-ip-address.md
|
[
0.03371654078364372,
0.02705053985118866,
0.04345491901040077,
-0.09753874689340591,
-0.017000675201416016,
-0.07596287876367569,
0.02868189662694931,
-0.03784551844000816,
0.09600566327571869,
0.07112106680870056,
-0.02572745271027088,
-0.015012930147349834,
0.017435776069760323,
0.041138142347335815,
0.0767441987991333,
-0.00048375927144661546,
0.04354619234800339,
-0.08338829129934311,
-0.02350088581442833,
0.027508409693837166,
-0.041970379650592804,
0.02667611837387085,
-0.01388782262802124,
0.05828811973333359,
-0.040354449301958084,
-0.04022654518485069,
-0.02744307368993759,
-0.020196130499243736,
-0.031244643032550812,
-0.008797883056104183,
-0.027908291667699814,
0.042022984474897385,
0.0438837930560112,
-0.055048391222953796,
0.09767939150333405,
0.11227235198020935,
0.048600271344184875,
-0.04751532897353172,
-0.07125550508499146,
0.010086863301694393,
0.07747913151979446,
-0.06954770535230637,
-0.11889751255512238,
-0.006746994331479073,
0.014875645749270916,
-0.004433234687894583,
-0.11859478801488876,
-0.07454615086317062,
0.03417382016777992,
0.0010944997193291783,
-0.02884601801633835,
-0.03046003170311451,
0.028688091784715652,
0.0349545031785965,
0.056834492832422256,
0.03487308323383331,
-0.0318983718752861,
0.10386691242456436,
0.06280072778463364,
0.05862942710518837,
0.025828788056969643,
-0.008525869809091091,
0.02656114101409912,
-0.01899935118854046,
0.03356185182929039,
-0.033671122044324875,
-0.020411280915141106,
0.02750077284872532,
0.0014677980216220021,
-0.03606518357992172,
-0.025934964418411255,
0.05668770894408226,
-0.036104731261730194,
-0.06072666868567467,
-0.06539822369813919,
0.046869609504938126,
-0.009664444252848625,
0.00418431730940938,
-0.018223296850919724,
-0.0442536436021328,
0.007522743195295334,
0.00014302962517831475,
-0.01401359774172306,
0.042826097458601,
-0.09644828736782074,
0.0414239726960659,
-0.06966147571802139,
-0.14983077347278595,
0.06021248549222946,
0.03234371542930603,
-0.031288739293813705,
-0.07337521016597748,
0.04224012419581413,
-0.08797010779380798,
-0.015581322833895683,
-0.025258593261241913,
0.004893857054412365,
0.061266813427209854,
-0.08064810931682587,
0.016932889819145203,
0.04700018838047981,
-0.006951587740331888,
0.06204669177532196,
0.02764708176255226,
0.03113093040883541,
-0.010962851345539093,
-0.08991348743438721,
0.021954622119665146,
0.03084276057779789,
0.004388622473925352,
-0.050149980932474136,
-0.05402088910341263,
-0.02905491553246975,
0.06507863104343414,
-0.010405164211988449,
0.04693448171019554,
0.022897768765687943,
0.04182693734765053,
-0.011239342391490936,
0.08143418282270432,
0.048854466527700424,
-0.10488817095756531,
-0.056251462548971176,
0.012153640389442444,
-0.07718059420585632,
0.035809874534606934,
0.10127142816781998,
1.2813166685516293e-33,
0.052960630506277084,
-0.05853075534105301,
0.05120093747973442,
0.0931241437792778,
0.07739122211933136,
-0.07341048866510391,
-0.07423065602779388,
0.008129333145916462,
-0.021039888262748718,
0.01170289609581232,
-0.028741657733917236,
0.07121365517377853,
0.03493170812726021,
-0.004549440927803516,
-0.015985772013664246,
-0.013821769505739212,
-0.02409927174448967,
0.03931092098355293,
0.05088095739483833,
-0.026303021237254143,
0.040982428938150406,
-0.007982313632965088,
-0.026888351887464523,
0.00011819104838650674,
0.04479817673563957,
0.013540034182369709,
0.0281375665217638,
-0.10110154002904892,
0.04400114342570305,
0.007616208866238594,
0.03340741991996765,
-0.0044063786044716835,
-0.028714735060930252,
0.044599175453186035,
-0.11122934520244598,
-0.03156904876232147,
0.022034985944628716,
-0.01466808095574379,
-0.15443582832813263,
-0.015487409196794033,
0.023606587201356888,
0.00875623244792223,
-0.07493355870246887,
-0.014516264200210571,
0.0744861364364624,
-0.04304174333810806,
0.0791546106338501,
-0.04915435612201691,
0.06618358194828033,
0.06417213380336761,
-0.033074039965867996,
-0.05885083228349686,
-0.0031812984962016344,
-0.015106954611837864,
0.04178427904844284,
0.021689523011446,
0.11928637325763702,
-0.025235150009393692,
-0.08087624609470367,
-0.10073055326938629,
-0.02116169035434723,
-0.0015290820738300681,
-0.01495206356048584,
0.046445805579423904,
0.05801650881767273,
0.0023974687792360783,
-0.01790625788271427,
0.02298407256603241,
-0.024239670485258102,
0.01712311990559101,
-0.09473628550767899,
0.02641202136874199,
-0.006766980979591608,
0.07107188552618027,
-0.024865692481398582,
-0.051926542073488235,
0.03354784473776817,
0.019945038482546806,
-0.0580291785299778,
0.023214276880025864,
0.06867396086454391,
-0.046938493847846985,
-0.08483071625232697,
0.05704664811491966,
0.00664512999355793,
0.017577828839421272,
0.027136139571666718,
-0.026467325165867805,
-0.011468164622783661,
0.0550580695271492,
-0.0261134821921587,
0.037714991718530655,
-0.05121210590004921,
0.058106161653995514,
-0.126076340675354,
-4.4137469231514944e-33,
0.09810430556535721,
0.005785373970866203,
-0.0039636678993701935,
-0.05087117478251457,
-0.012601327151060104,
0.020180415362119675,
0.0016228202730417252,
0.12906843423843384,
-0.06157601624727249,
-0.01722240261733532,
0.036698371171951294,
0.02214924246072769,
0.0814158171415329,
0.012480567209422588,
-0.0785607174038887,
0.04763134568929672,
0.0010031078709289432,
-0.02176654152572155,
-0.08640049397945404,
0.014114980585873127,
-0.060691166669130325,
0.017635904252529144,
0.08993473649024963,
0.009452514350414276,
-0.05416504293680191,
-0.070805624127388,
0.06482582539319992,
-0.016552051529288292,
-0.03792358189821243,
-0.04973587766289711,
0.02274952456355095,
0.0007356477435678244,
0.008260474540293217,
0.0026625213213264942,
0.0014447950525209308,
-0.0008713471470400691,
0.00474031176418066,
0.02872508391737938,
0.01916169375181198,
-0.15220986306667328,
-0.01668482832610607,
-0.028879735618829727,
-0.07114602625370026,
-0.015329227782785892,
-0.049967262893915176,
0.015691403299570084,
0.003912908490747213,
-0.05220983922481537,
0.012905225157737732,
-0.021287137642502785,
0.015626588836312294,
-0.04563027247786522,
-0.01308548916131258,
0.03234563767910004,
-0.060573138296604156,
0.0548788420855999,
0.007137548644095659,
0.05871431156992912,
-0.06304565817117691,
-0.027844751253724098,
0.10471320897340775,
-0.028623992577195168,
-0.004244375973939896,
0.027067162096500397,
0.02469996176660061,
-0.06668213754892349,
0.0029320362955331802,
0.1169043481349945,
0.03666849806904793,
-0.04375830292701721,
0.005587514489889145,
0.029492441564798355,
-0.009682510048151016,
0.04537573829293251,
-0.023907918483018875,
-0.04228917881846428,
-0.0021836794912815094,
-0.11085634678602219,
0.0024013116490095854,
0.05301468074321747,
0.014062213711440563,
0.07503768056631088,
-0.053155556321144104,
-0.0231491569429636,
-0.011400196701288223,
-0.04838768392801285,
0.057179681956768036,
0.08562161773443222,
0.0017459018854424357,
0.08449732512235641,
-0.013778948225080967,
0.003052798565477133,
-0.04160880669951439,
0.09941878914833069,
-0.06365387886762619,
-4.396304476017576e-8,
0.04726092517375946,
-0.03193315491080284,
-0.04573790356516838,
0.04860468581318855,
0.01821112632751465,
-0.027779310941696167,
-0.013661721721291542,
0.0637798085808754,
-0.029463263228535652,
0.006500795017927885,
-0.10103026777505875,
0.0892007127404213,
-0.18856190145015717,
0.04793138802051544,
0.05968455970287323,
-0.07879145443439484,
-0.05184720829129219,
0.03311213478446007,
0.043898727744817734,
-0.035304393619298935,
-0.0013348401989787817,
-0.04763399437069893,
0.01573195867240429,
-0.034827813506126404,
0.021070649847388268,
0.033626001328229904,
0.0581178180873394,
-0.006000177469104528,
0.006026550196111202,
-0.03046712838113308,
-0.0247053150087595,
-0.0025655340868979692,
-0.011373606510460377,
0.01872687228024006,
-0.05376806482672691,
0.05942182615399361,
-0.08296501636505127,
0.03345673903822899,
0.004958973731845617,
-0.010620123706758022,
-0.004644686821848154,
0.08385046571493149,
-0.05277901142835617,
-0.03412047028541565,
-0.0025205521378666162,
0.06009332090616226,
0.042551834136247635,
0.060790207237005234,
0.0008093577343970537,
-0.026963023468852043,
-0.028258688747882843,
-0.005166299641132355,
-0.008609872311353683,
-0.005657752975821495,
-0.05909903347492218,
0.05380857735872269,
0.05456364527344704,
-0.065225750207901,
-0.0012772380141541362,
0.012903300113976002,
0.0316426083445549,
0.002091012429445982,
0.019444627687335014,
-0.05194511264562607
] | 0.178282
|
This section of the Kubernetes documentation contains references. ## API Reference \* [Glossary](/docs/reference/glossary/) - a comprehensive, standardized list of Kubernetes terminology \* [Kubernetes API Reference](/docs/reference/kubernetes-api/) \* [One-page API Reference for Kubernetes {{< param "version" >}}](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/) \* [Using The Kubernetes API](/docs/reference/using-api/) - overview of the API for Kubernetes. \* [API access control](/docs/reference/access-authn-authz/) - details on how Kubernetes controls API access \* [Well-Known Labels, Annotations and Taints](/docs/reference/labels-annotations-taints/) ## Officially supported client libraries To call the Kubernetes API from a programming language, you can use [client libraries](/docs/reference/using-api/client-libraries/). Officially supported client libraries: - [Kubernetes Go client library](https://github.com/kubernetes/client-go/) - [Kubernetes Python client library](https://github.com/kubernetes-client/python) - [Kubernetes Java client library](https://github.com/kubernetes-client/java) - [Kubernetes JavaScript client library](https://github.com/kubernetes-client/javascript) - [Kubernetes C# client library](https://github.com/kubernetes-client/csharp) - [Kubernetes Haskell client library](https://github.com/kubernetes-client/haskell) ## CLI \* [kubectl](/docs/reference/kubectl/) - Main CLI tool for running commands and managing Kubernetes clusters. \* [JSONPath](/docs/reference/kubectl/jsonpath/) - Syntax guide for using [JSONPath expressions](https://goessner.net/articles/JsonPath/) with kubectl. \* [kubeadm](/docs/reference/setup-tools/kubeadm/) - CLI tool to easily provision a secure Kubernetes cluster. ## Components \* [kubelet](/docs/reference/command-line-tools-reference/kubelet/) - The primary agent that runs on each node. The kubelet takes a set of PodSpecs and ensures that the described containers are running and healthy. \* [kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/) - REST API that validates and configures data for API objects such as pods, services, replication controllers. \* [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) - Daemon that embeds the core control loops shipped with Kubernetes. \* [kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/) - Can do simple TCP/UDP stream forwarding or round-robin TCP/UDP forwarding across a set of back-ends. \* [kube-scheduler](/docs/reference/command-line-tools-reference/kube-scheduler/) - Scheduler that manages availability, performance, and capacity. \* [Scheduler Policies](/docs/reference/scheduling/policies) \* [Scheduler Profiles](/docs/reference/scheduling/config#profiles) \* List of [ports and protocols](/docs/reference/networking/ports-and-protocols/) that should be open on control plane and worker nodes ## Config APIs This section hosts the documentation for "unpublished" APIs which are used to configure kubernetes components or tools. Most of these APIs are not exposed by the API server in a RESTful way though they are essential for a user or an operator to use or manage a cluster. \* [kubeconfig (v1)](/docs/reference/config-api/kubeconfig.v1/) \* [kuberc (v1alpha1)](/docs/reference/config-api/kuberc.v1alpha1/) and [kuberc (v1beta1)](/docs/reference/config-api/kuberc.v1beta1/) \* [kube-apiserver admission (v1)](/docs/reference/config-api/apiserver-admission.v1/) \* [kube-apiserver configuration (v1alpha1)](/docs/reference/config-api/apiserver-config.v1alpha1/) and [kube-apiserver configuration (v1beta1)](/docs/reference/config-api/apiserver-config.v1beta1/) and [kube-apiserver configuration (v1)](/docs/reference/config-api/apiserver-config.v1/) \* [kube-apiserver event rate limit (v1alpha1)](/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/) \* [kubelet configuration (v1alpha1)](/docs/reference/config-api/kubelet-config.v1alpha1/) and [kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/) and [kubelet configuration (v1)](/docs/reference/config-api/kubelet-config.v1/) \* [kubelet credential providers (v1)](/docs/reference/config-api/kubelet-credentialprovider.v1/) \* [kube-scheduler configuration (v1)](/docs/reference/config-api/kube-scheduler-config.v1/) \* [kube-controller-manager configuration (v1alpha1)](/docs/reference/config-api/kube-controller-manager-config.v1alpha1/) \* [kube-proxy configuration (v1alpha1)](/docs/reference/config-api/kube-proxy-config.v1alpha1/) \* [`audit.k8s.io/v1` API](/docs/reference/config-api/apiserver-audit.v1/) \* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) and [Client authentication API (v1)](/docs/reference/config-api/client-authentication.v1/) \* [WebhookAdmission configuration (v1)](/docs/reference/config-api/apiserver-webhookadmission.v1/) \* [ImagePolicy API (v1alpha1)](/docs/reference/config-api/imagepolicy.v1alpha1/) ## Config API for kubeadm \* [v1beta3](/docs/reference/config-api/kubeadm-config.v1beta3/) \* [v1beta4](/docs/reference/config-api/kubeadm-config.v1beta4/) ## External APIs These are the APIs defined by the Kubernetes project, but are not implemented by the core project: \* [Metrics API (v1beta1)](/docs/reference/external-api/metrics.v1beta1/) \* [Custom Metrics API (v1beta2)](/docs/reference/external-api/custom-metrics.v1beta2) \* [External Metrics API (v1beta1)](/docs/reference/external-api/external-metrics.v1beta1) ## Design Docs An archive of the design docs for Kubernetes functionality. Good starting points are [Kubernetes Architecture](https://git.k8s.io/design-proposals-archive/architecture/architecture.md) and [Kubernetes Design Overview](https://git.k8s.io/design-proposals-archive). ## Encodings Tools such as {{< glossary\_tooltip text="kubectl" term\_id="kubectl" >}} can work with different formats / encodings. These include: \* [CBOR](https://cbor.io/), used on the network but \*\*not\*\* available as a kubectl output format \* See [CBOR resource encoding](https://kubernetes.io/docs/reference/using-api/api-concepts/#cbor-encoding) \* [JSON](https://www.json.org/), available as a `kubectl` output format and also used at the HTTP layer \* [KYAML](/docs/reference/encodings/kyaml), a Kubernetes dialect of YAML \* KYAML is essentially an \_output format\_; any place where you can provide KYAML to Kubernetes, you can also provide any other valid YAML input \* [YAML](https://yaml.org/), available as a `kubectl` output format and also used at the HTTP layer Kubernetes also has a custom [protobuf encoding](/docs/reference/using-api/api-concepts/#protobuf-encoding) that is only used within HTTP messages. The `kubectl` tool supports some other output formats, such as \_custom columns\_; see [output formats](/docs/reference/kubectl/#output-options) in the kubectl
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/_index.md
|
[
-0.07485323399305344,
0.00011677129805320874,
0.029931260272860527,
-0.055566832423210144,
-0.028121473267674446,
0.02507379837334156,
0.028663072735071182,
-0.01633146032691002,
0.048064399510622025,
-0.004361649975180626,
-0.042653732001781464,
-0.04119807481765747,
-0.027707865461707115,
-0.02382345125079155,
0.057678405195474625,
0.01991100236773491,
0.07410195469856262,
0.05044306442141533,
-0.018099160864949226,
-0.05980250984430313,
0.049096956849098206,
0.048374198377132416,
-0.03249458223581314,
0.025702496990561485,
-0.01052070688456297,
-0.06018262729048729,
-0.046648722141981125,
-0.056709397584199905,
0.05094008520245552,
0.09236036241054535,
-0.09291995316743851,
0.030499961227178574,
-0.041739728301763535,
0.06390571594238281,
0.0014956699451431632,
0.05488329380750656,
0.024058612063527107,
-0.017459960654377937,
-0.05860374867916107,
0.05718984827399254,
0.015312500298023224,
-0.018558617681264877,
-0.10737673193216324,
0.002315132413059473,
-0.00614131847396493,
0.019999170675873756,
-0.02572217397391796,
-0.058027829974889755,
-0.07276411354541779,
0.040316756814718246,
-0.015734529122710228,
-0.0919109582901001,
0.009904894977807999,
0.00989268347620964,
0.06476996839046478,
-0.037346336990594864,
-0.08127791434526443,
0.05285850167274475,
0.06045440211892128,
0.04552856832742691,
0.0018567595398053527,
0.006250476930290461,
-0.007826619781553745,
0.03345862776041031,
-0.0524265356361866,
0.014539998956024647,
0.008662691339850426,
-0.017482133582234383,
0.03526628017425537,
-0.08702243864536285,
-0.0443425253033638,
-0.03160741180181503,
-0.0292361993342638,
-0.011633533053100109,
-0.0402483269572258,
0.009426486678421497,
-0.018810074776411057,
0.08932646363973618,
-0.011036572977900505,
-0.15755636990070343,
0.0294247604906559,
0.08589963614940643,
0.0677870437502861,
0.04618062451481819,
-0.07684940099716187,
0.04308877885341644,
0.015902668237686157,
0.023065555840730667,
0.07542066276073456,
0.06906478852033615,
0.030542436987161636,
-0.09972590208053589,
0.054230306297540665,
-0.13836628198623657,
0.08812218904495239,
0.02879166789352894,
-0.05029614642262459,
-0.028550049290060997,
0.030101167038083076,
0.010707380250096321,
-0.04117198288440704,
-0.004273219034075737,
0.006844750139862299,
-0.01979248598217964,
0.05942883715033531,
-0.015422405675053596,
-0.062306687235832214,
-0.02086218073964119,
0.04335595667362213,
0.05129731819033623,
-0.0773942843079567,
0.05679580196738243,
-0.04069695994257927,
-0.026549765840172768,
0.023626333102583885,
-0.04636064171791077,
0.006093157920986414,
-0.06517408788204193,
0.12521213293075562,
0.06847658008337021,
-0.017979959025979042,
-0.08707381039857864,
0.02462846040725708,
0.03952408954501152,
-0.07431364059448242,
0.06381578743457794,
-0.03933210298418999,
3.6979215566946005e-33,
0.05613724887371063,
-0.025481633841991425,
0.027661457657814026,
0.011726788245141506,
0.017530588433146477,
-0.12508252263069153,
0.04239162802696228,
-0.04389043152332306,
-0.06000716611742973,
-0.05702805891633034,
-0.054272573441267014,
0.13882650434970856,
0.01747763343155384,
-0.06371387839317322,
0.009111239574849606,
0.03307826817035675,
-0.057511311024427414,
0.019749842584133148,
0.0940307080745697,
0.01696263812482357,
0.023359080776572227,
-0.02207357995212078,
0.04923306033015251,
0.06306964159011841,
0.04743558540940285,
-0.03982655704021454,
-0.01834341511130333,
-0.036137551069259644,
-0.0067422944121062756,
0.023135241121053696,
-0.00015333796909544617,
-0.06151917949318886,
0.06332079321146011,
-0.03244027867913246,
-0.09761549532413483,
-0.013289166614413261,
-0.0645742192864418,
-0.004778231959789991,
-0.0526687391102314,
-0.022619105875492096,
-0.018735481426119804,
-0.004649510141462088,
-0.04270429164171219,
-0.050807129591703415,
0.057753823697566986,
-0.030077021569013596,
-0.05930662900209427,
-0.06335907429456711,
0.109556645154953,
-0.00897763017565012,
-0.02591957151889801,
0.002231406047940254,
0.044735562056303024,
-0.04092486947774887,
0.06834306567907333,
0.018897265195846558,
0.0920972153544426,
-0.041956327855587006,
-0.08808977901935577,
-0.0009428321500308812,
-0.029109163209795952,
-0.010690144263207912,
0.015015113167464733,
-0.03539317846298218,
0.045937664806842804,
-0.0033739807549864054,
-0.09325852245092392,
0.08128779381513596,
-0.02739649824798107,
-0.07256057113409042,
-0.030982257798314095,
0.021261751651763916,
-0.038115594536066055,
0.04146377742290497,
0.0015599040780216455,
-0.06231455132365227,
-0.01944458857178688,
-0.010004449635744095,
-0.06653250753879547,
0.030677834525704384,
-0.017054807394742966,
-0.027791664004325867,
-0.041600413620471954,
0.10369158536195755,
-0.04027034714818001,
-0.020564792677760124,
0.029725372791290283,
0.0045158034190535545,
0.03399170562624931,
0.001873705885373056,
0.01972423680126667,
-0.05613679811358452,
-0.10355374962091446,
0.02422129176557064,
-0.0661611258983612,
-6.207691627144435e-33,
0.08900829404592514,
-0.008532209321856499,
-0.01753508485853672,
0.013678041286766529,
-0.04392686113715172,
0.007593362592160702,
0.02457457408308983,
0.11829353123903275,
-0.0012248953571543097,
-0.05303528904914856,
-0.004533762112259865,
-0.014767237938940525,
0.05583865940570831,
0.05176454037427902,
-0.023708507418632507,
-0.037687428295612335,
-0.10463327914476395,
-0.0006379832047969103,
-0.021294549107551575,
0.05097687616944313,
-0.04701778665184975,
-0.00877170916646719,
0.0199257954955101,
-0.020503675565123558,
0.014569556340575218,
-0.024313736706972122,
0.017051206901669502,
0.02799234911799431,
-0.00884447991847992,
-0.04765072464942932,
-0.004472617991268635,
-0.04044768586754799,
-0.021692631766200066,
0.011305068619549274,
0.021052654832601547,
-0.06509464979171753,
0.06120890751481056,
-0.003801249898970127,
-0.017802195623517036,
-0.05334244295954704,
0.09192471206188202,
-0.0023520751856267452,
0.0028485991060733795,
-0.05822324380278587,
-0.02241968736052513,
0.05977708473801613,
-0.011727132834494114,
0.01957482472062111,
-0.05240538716316223,
-0.1721024215221405,
0.05107938498258591,
-0.04516496881842613,
-0.03556053340435028,
0.03788158297538757,
-0.07221820205450058,
0.07938724011182785,
0.07767640799283981,
0.03387760743498802,
0.0209286380559206,
-0.011069382540881634,
-0.011651603505015373,
-0.08947718888521194,
0.057611867785453796,
0.0670313835144043,
-0.02825275808572769,
-0.033405184745788574,
-0.0368785634636879,
0.043493881821632385,
-0.03223913908004761,
-0.004395642783492804,
-0.04208097234368324,
-0.06680446863174438,
0.005035921931266785,
0.03817286714911461,
-0.00978452991694212,
-0.03064465895295143,
0.06981618702411652,
-0.026391126215457916,
0.01959216594696045,
-0.026483630761504173,
0.007728785276412964,
0.06731860339641571,
-0.011887559667229652,
0.0698213055729866,
0.057993851602077484,
0.01266985759139061,
0.059909239411354065,
0.06411406397819519,
0.03674999251961708,
0.022865649312734604,
-0.031475190073251724,
0.05338533967733383,
-0.049791064113378525,
0.14320534467697144,
-0.028564665466547012,
-5.506464972881986e-8,
0.013988889753818512,
0.05630236119031906,
-0.05375603213906288,
0.049736011773347855,
0.00017081711848732084,
0.06423455476760864,
0.011565801687538624,
0.014522716403007507,
-0.03913072869181633,
0.02664181776344776,
-0.039340876042842865,
0.0703006163239479,
-0.06086855009198189,
-0.015283421613276005,
-0.012074675410985947,
0.020075514912605286,
-0.01352226547896862,
0.01666964963078499,
0.05554889887571335,
-0.0239215437322855,
-0.07845768332481384,
-0.03272370249032974,
0.027945786714553833,
-0.04703999683260918,
0.01596696302294731,
0.036314696073532104,
0.03080645389854908,
0.06981157511472702,
0.00474163144826889,
-0.048631660640239716,
-0.025849657133221626,
0.041542526334524155,
-0.07923397421836853,
0.01527873333543539,
0.015136327594518661,
0.04460049420595169,
-0.14447352290153503,
-0.012298163957893848,
0.08045290410518646,
0.04989582300186157,
-0.009293480776250362,
-0.006742233410477638,
-0.0698002353310585,
0.012150042690336704,
0.10072395205497742,
0.08941733837127686,
0.0005004903068765998,
0.033861272037029266,
-0.031434349715709686,
-0.02960958518087864,
-0.035153426229953766,
-0.03556019067764282,
-0.017719782888889313,
0.07009875774383545,
-0.08687453716993332,
0.018349407240748405,
-0.061545487493276596,
-0.10010410100221634,
0.059349387884140015,
-0.03839928284287453,
-0.00898235384374857,
0.10751085728406906,
0.07788003981113434,
0.05605148896574974
] | 0.175815
|
valid YAML input \* [YAML](https://yaml.org/), available as a `kubectl` output format and also used at the HTTP layer Kubernetes also has a custom [protobuf encoding](/docs/reference/using-api/api-concepts/#protobuf-encoding) that is only used within HTTP messages. The `kubectl` tool supports some other output formats, such as \_custom columns\_; see [output formats](/docs/reference/kubectl/#output-options) in the kubectl reference.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/_index.md
|
[
0.0092238774523139,
0.02185295894742012,
-0.016689158976078033,
-0.07179127633571625,
-0.023360928520560265,
0.008886289782822132,
-0.04261142760515213,
-0.07906478643417358,
0.11768017709255219,
0.0039208452217280865,
-0.01904047466814518,
-0.08590329438447952,
0.004635588265955448,
-0.00950716808438301,
0.0719393864274025,
0.029191507026553154,
0.01890244521200657,
0.05882028117775917,
-0.003429859410971403,
-0.10967374593019485,
0.03749282285571098,
0.09599250555038452,
-0.006085650995373726,
-0.01735658571124077,
-0.02660723775625229,
0.014321113005280495,
-0.0022033355198800564,
0.0746501088142395,
0.03764152154326439,
-0.07592872530221939,
-0.028169849887490273,
-0.021372556686401367,
-0.0028044607024639845,
0.07467707246541977,
0.05884915962815285,
0.0780930370092392,
0.061473265290260315,
-0.1178022027015686,
-0.00968186091631651,
0.03705789893865585,
0.04168492555618286,
-0.08609672635793686,
-0.09118401259183884,
-0.004792959429323673,
-0.05818963050842285,
0.0028341871220618486,
-0.08250997215509415,
-0.06803329288959503,
-0.025441467761993408,
-0.017895078286528587,
0.01349496841430664,
-0.06013008952140808,
0.028624633327126503,
0.08548226952552795,
0.06668823957443237,
-0.0323520302772522,
-0.10605982691049576,
0.025735868141055107,
0.03707151859998703,
0.0358634851872921,
-0.049496784806251526,
0.014941561035811901,
0.03969026356935501,
-0.004683349747210741,
-0.03948095068335533,
-0.0035684267058968544,
-0.06335171312093735,
0.018859555944800377,
-0.006105816923081875,
-0.025191549211740494,
-0.023152852430939674,
-0.055801112204790115,
-0.04269488900899887,
0.015763407573103905,
-0.031506381928920746,
0.09455505758523941,
-0.034478381276130676,
0.040768593549728394,
0.01834937185049057,
-0.008261309005320072,
0.028345130383968353,
0.07431387156248093,
0.06602714210748672,
0.05676226317882538,
-0.017326483502984047,
0.01741543598473072,
-0.04398580268025398,
0.02645532600581646,
0.023650888353586197,
0.0279855914413929,
-0.025762438774108887,
-0.07458954304456711,
0.03200208768248558,
-0.023652328178286552,
-0.0027394413482397795,
0.041873712092638016,
0.034928396344184875,
-0.027706511318683624,
0.024776775389909744,
-0.015947220847010612,
0.021357716992497444,
-0.03286534920334816,
0.02528487704694271,
-0.052437786012887955,
0.04815705493092537,
-0.04715452715754509,
-0.021122360602021217,
0.03802316263318062,
0.047562126070261,
-0.01942487433552742,
-0.008153985254466534,
0.01144697330892086,
-0.04376070201396942,
-0.04372167959809303,
-0.05120426416397095,
-0.033662229776382446,
-0.022772260010242462,
-0.04053764417767525,
0.023900477215647697,
-0.006282484624534845,
-0.008310090750455856,
-0.09107254445552826,
-0.05795753002166748,
0.04492401331663132,
-0.054909005761146545,
-0.005122783128172159,
0.0002640242164488882,
1.3804788924286012e-33,
0.04238898307085037,
0.043753527104854584,
0.05362362414598465,
-0.0691821277141571,
-0.05446309968829155,
-0.07522108405828476,
-0.06041478365659714,
-0.06733711063861847,
0.002469983883202076,
-0.08024424314498901,
-0.026292653754353523,
-0.015249090269207954,
-0.00787312164902687,
0.003294539637863636,
0.03010576404631138,
0.04399573430418968,
-0.07105127722024918,
0.004828396253287792,
0.05956074222922325,
0.026357581838965416,
0.036562275141477585,
0.011275989934802055,
-0.03203593194484711,
0.010813991539180279,
-0.01789371483027935,
0.016617508605122566,
0.0424250103533268,
-0.10247212648391724,
-0.05698227882385254,
0.026689613237977028,
-0.007076086010783911,
-0.08348441869020462,
0.06944918632507324,
0.01902478188276291,
-0.012024455703794956,
-0.011204427108168602,
0.016461923718452454,
0.0696810856461525,
-0.11978772282600403,
0.04636111855506897,
0.04281741380691528,
-0.0038547685835510492,
-0.026875831186771393,
0.018259424716234207,
0.022118691354990005,
-0.026131995022296906,
0.002268165349960327,
-0.07055399566888809,
0.04165093973278999,
-0.06290576606988907,
-0.027895916253328323,
0.03890889137983322,
0.08025601506233215,
-0.0485801175236702,
0.07596705108880997,
0.0028950031846761703,
0.1419643610715866,
-0.028914934024214745,
-0.0680423155426979,
-0.020249024033546448,
-0.09383468329906464,
0.0023034445475786924,
0.05169301480054855,
-0.03260486572980881,
-0.027247771620750427,
-0.04129961133003235,
0.00188791798427701,
0.018277542665600777,
-0.06323978304862976,
0.014993606135249138,
-0.033553048968315125,
0.06248118728399277,
-0.005790253169834614,
0.018785305321216583,
-0.05327796936035156,
-0.07798188924789429,
0.03225718066096306,
0.001371130347251892,
-0.011919159442186356,
0.050152648240327835,
0.051458507776260376,
0.011164095252752304,
-0.04086986184120178,
0.08931513130664825,
0.004177485592663288,
0.0005058673559688032,
0.012303754687309265,
0.020679403096437454,
-0.014784351922571659,
0.0647975504398346,
0.0066807153634727,
-0.014409217052161694,
-0.06721509248018265,
-0.03166024014353752,
-0.09245844930410385,
-2.5174036205614786e-33,
0.09073246270418167,
0.05199788138270378,
-0.013190265744924545,
0.03329743817448616,
-0.028443515300750732,
-0.03103436529636383,
0.13899871706962585,
0.09424304962158203,
-0.004742844961583614,
0.02201676368713379,
0.028223665431141853,
0.003728679148480296,
0.019713837653398514,
0.00008387358684558421,
-0.0018027182668447495,
-0.03264307230710983,
-0.16586285829544067,
0.02178548462688923,
-0.00818641297519207,
0.00892647635191679,
-0.009842581115663052,
-0.03039301373064518,
0.04969934746623039,
0.057840246707201004,
0.07774653285741806,
0.018838053569197655,
0.06263957917690277,
0.05781753733754158,
-0.09997298568487167,
-0.04148326441645622,
0.03595472872257233,
-0.04523377865552902,
-0.003561820136383176,
0.023016000166535378,
-0.028321919962763786,
-0.07361289113759995,
0.005039646290242672,
0.03221949189901352,
0.038156118243932724,
0.012791527435183525,
-0.0012648473493754864,
0.058215659111738205,
-0.06252846866846085,
0.07187417894601822,
-0.05195939540863037,
-0.022557687014341354,
0.016214916482567787,
-0.034007709473371506,
0.03846805542707443,
-0.07985579967498779,
0.006600734777748585,
0.02788514457643032,
-0.09872481226921082,
0.07489512860774994,
-0.05122501030564308,
0.025316601619124413,
-0.03946344926953316,
0.09637457877397537,
-0.04492878541350365,
0.006463482975959778,
-0.06891009956598282,
-0.05086930841207504,
0.1001666709780693,
0.008909783326089382,
0.06841858476400375,
-0.06154875084757805,
0.012654613703489304,
-0.015220705419778824,
0.012388519011437893,
-0.046336714178323746,
0.03764547407627106,
-0.018261441960930824,
-0.05410318076610565,
0.07057404518127441,
0.08375874161720276,
-0.05736101046204567,
0.007378151174634695,
0.00859629362821579,
0.011721096001565456,
0.07978209108114243,
-0.0772208571434021,
0.03521427884697914,
-0.024735892191529274,
0.08461533486843109,
0.12081371247768402,
0.012012491934001446,
0.01034735981374979,
0.09461982548236847,
-0.04688271880149841,
0.0457245372235775,
0.05256199091672897,
0.1135319247841835,
-0.05923403427004814,
0.14840060472488403,
-0.023487092927098274,
-4.347543836047407e-8,
-0.045708924531936646,
-0.05278351902961731,
-0.04769085720181465,
-0.0003184012894053012,
0.004246163181960583,
0.02140212617814541,
0.024441836401820183,
-0.072533018887043,
0.028788983821868896,
-0.008829928003251553,
-0.037231992930173874,
0.051368970423936844,
-0.11785828322172165,
-0.04940221831202507,
0.021941399201750755,
-0.02149955928325653,
-0.03347519785165787,
0.05662662163376808,
0.03481116518378258,
-0.06830669939517975,
0.018197625875473022,
0.05419866368174553,
-0.0812072604894638,
-0.016246188431978226,
0.03145205229520798,
0.09040175378322601,
0.013346762396395206,
0.07831132411956787,
0.000044419270125217736,
-0.011148065328598022,
0.033143967390060425,
0.0030029730405658484,
-0.059381864964962006,
-0.05418173223733902,
0.004809183068573475,
0.022650806233286858,
-0.02557395026087761,
0.031139597296714783,
0.000871554424520582,
0.06540960818529129,
0.06044228747487068,
-0.05099150910973549,
-0.1480986773967743,
-0.017788296565413475,
-0.01424056850373745,
0.06764225661754608,
0.017047660425305367,
0.05538545921444893,
-0.026642892509698868,
-0.002034541452303529,
0.04391538351774216,
-0.1338905394077301,
-0.011985835619270802,
0.03508582338690758,
-0.0830809473991394,
-0.026343608275055885,
0.03056083619594574,
-0.06332075595855713,
0.035355404019355774,
0.005075257271528244,
0.05744029954075813,
0.04589860513806343,
0.08391217142343521,
0.004317004233598709
] | 0.087037
|
\*\*KYAML\*\* is a safer and less ambiguous subset of YAML, initially introduced in Kubernetes v1.34 (alpha) and enabled by default in v1.35 (beta). Designed specifically for Kubernetes, KYAML addresses common YAML pitfalls such as whitespace sensitivity and implicit type coercion while maintaining full compatibility with existing YAML parsers and tooling. This reference describes KYAML syntax. ## Getting started with KYAML YAML’s reliance on indentation and implicit type coercion often leads to configuration errors, especially in CI/CD pipelines and templating systems like Helm. KYAML eliminates these issues by enforcing explicit syntax and structure, making configurations more reliable and easier to debug. ### Basic Structure KYAML uses \*flow style\* syntax with `{}` for objects and `[]` for arrays. All string values must be \*\*double-quoted\*\*. ```yaml --- { apiVersion: "v1", kind: "Pod", metadata: { name: "my-pod", labels: { app: "demo" }, }, spec: { containers: [{ name: "nginx", image: "nginx:1.20" }] } } ```
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/encodings/kyaml.md
|
[
-0.05236392468214035,
-0.008796712383627892,
0.1198108121752739,
-0.025797851383686066,
-0.05087669938802719,
0.0017142380820587277,
-0.005489435512572527,
-0.061025410890579224,
0.09307368844747543,
0.038075435906648636,
0.03669533133506775,
-0.07854696363210678,
-0.018642915412783623,
-0.04601221904158592,
0.09143196791410446,
0.0927116647362709,
-0.04540596902370453,
-0.0008030616445466876,
-0.0534822903573513,
-0.06370629370212555,
0.031872618943452835,
0.07087984681129456,
-0.039454199373722076,
0.0028752763755619526,
-0.039949677884578705,
0.08255557715892792,
0.008211971260607243,
0.05457298830151558,
0.079032301902771,
-0.02517518401145935,
0.0007375757559202611,
0.023060744628310204,
-0.017953157424926758,
0.09815829247236252,
0.09313279390335083,
0.09790554642677307,
0.042573198676109314,
-0.05398295819759369,
-0.1126224547624588,
-0.023798011243343353,
0.04786386340856552,
-0.015735577791929245,
-0.04621899873018265,
0.0021567007061094046,
-0.03039442002773285,
-0.007806016597896814,
-0.07077377289533615,
-0.1322447806596756,
-0.04021184891462326,
-0.004314525052905083,
0.008546318858861923,
-0.07777026295661926,
0.04683785140514374,
0.032159458845853806,
0.0357830747961998,
0.0054327454417943954,
-0.06683439016342163,
0.07664187252521515,
0.09066664427518845,
0.009536448866128922,
-0.009863362647593021,
0.03236855939030647,
-0.01752210594713688,
0.018010877072811127,
-0.01903001219034195,
-0.00020199177379254252,
-0.040161773562431335,
0.026324132457375526,
0.040364820510149,
0.04393177479505539,
0.0033551303204149008,
-0.052898209542036057,
-0.00641867658123374,
0.031942207366228104,
-0.044295988976955414,
0.02034793794155121,
0.03359242156147957,
0.010033928789198399,
-0.0038222167640924454,
-0.07023058831691742,
0.01382153294980526,
0.04340876266360283,
0.03439544513821602,
0.0011110279010608792,
-0.04090747609734535,
0.0008982723229564726,
-0.049642059952020645,
-0.04327498748898506,
0.041527487337589264,
0.011059863492846489,
0.03215961903333664,
-0.07233744859695435,
0.023871228098869324,
-0.046006593853235245,
0.12665955722332,
0.037189193069934845,
-0.0070992643013596535,
-0.030098509043455124,
-0.0072405277751386166,
0.026432324200868607,
0.0375787578523159,
0.08380009979009628,
0.005820486228913069,
-0.034231036901474,
0.058361902832984924,
-0.03313012793660164,
-0.03599527105689049,
-0.06609699130058289,
-0.0059545752592384815,
0.004583902657032013,
-0.020233891904354095,
0.0291802566498518,
-0.0009890766814351082,
-0.0021592883858829737,
-0.018094388768076897,
-0.07555028796195984,
-0.00691593112424016,
-0.009076216258108616,
0.025730658322572708,
0.09378296136856079,
0.021155867725610733,
-0.12287598103284836,
-0.03917457535862923,
0.037442322820425034,
-0.021219145506620407,
0.02119835466146469,
-0.06622175872325897,
7.498092754811508e-33,
0.03714998811483383,
-0.05868767946958542,
0.009360915049910545,
-0.011203746311366558,
-0.0032976160291582346,
-0.12145376205444336,
0.011011915281414986,
-0.05426798388361931,
-0.044811975210905075,
0.024625735357403755,
-0.020256828516721725,
-0.006542719900608063,
-0.07740268111228943,
-0.006707185413688421,
0.0067837852984666824,
0.016170116141438484,
-0.057703495025634766,
0.05065883696079254,
0.008953575044870377,
0.025240181013941765,
0.034625034779310226,
-0.010824090801179409,
-0.01749979518353939,
-0.07048701494932175,
-0.04060612991452217,
0.03195221722126007,
0.07802708446979523,
-0.08094492554664612,
0.03110513649880886,
0.035834457725286484,
-0.022105587646365166,
-0.1272505223751068,
0.08922818303108215,
0.032663460820913315,
-0.09669137746095657,
0.041947439312934875,
-0.03519183397293091,
0.001364140771329403,
-0.08719050884246826,
-0.04059292748570442,
-0.061758436262607574,
0.004299225751310587,
-0.020238524302840233,
-0.015661388635635376,
0.009993622079491615,
-0.04223432391881943,
-0.0360240638256073,
-0.039800118654966354,
0.02490595169365406,
-0.022776566445827484,
-0.011917040683329105,
0.04630531743168831,
0.014569714665412903,
0.002083768369629979,
0.08407658338546753,
-0.023919573053717613,
0.09472538530826569,
-0.029488136991858482,
-0.05070112273097038,
0.0402517206966877,
-0.04979681968688965,
0.03150320053100586,
0.01321316510438919,
-0.01355195976793766,
0.05620679259300232,
-0.015032256953418255,
0.0015803497517481446,
0.04679686948657036,
-0.06146111339330673,
0.05641389638185501,
-0.07057645171880722,
0.08486562222242355,
-0.07214020937681198,
0.03822343423962593,
0.012418951839208603,
-0.11743785440921783,
0.04881834238767624,
-0.002611353527754545,
-0.07691846787929535,
0.05520417541265488,
-0.03304378315806389,
0.013999087736010551,
-0.020544057711958885,
0.10486258566379547,
-0.03762371838092804,
-0.057268112897872925,
0.00044216439709998667,
-0.01184098981320858,
-0.022971440106630325,
0.03777133300900459,
0.08118116855621338,
-0.050246864557266235,
-0.07723738998174667,
-0.0027696415781974792,
-0.12101668864488602,
-8.397727234170606e-33,
0.031171847134828568,
0.03569982200860977,
-0.03707175701856613,
0.009256843477487564,
-0.03534616902470589,
-0.0687539204955101,
0.11898373067378998,
0.07541347295045853,
0.03978987783193588,
-0.026697587221860886,
0.0018492515664547682,
0.03591440990567207,
0.010287608951330185,
0.025280548259615898,
0.046614136546850204,
-0.00003121754343737848,
-0.10107029229402542,
-0.060141462832689285,
0.013367346487939358,
0.03142037242650986,
0.028049152344465256,
0.015683839097619057,
0.035431213676929474,
0.05207449942827225,
-0.008839324116706848,
0.02324819751083851,
-0.0004953685565851629,
0.05431567132472992,
-0.09265787899494171,
0.022112179547548294,
0.08259215205907822,
-0.028317788615822792,
-0.04946453496813774,
0.03263779357075691,
-0.03319641947746277,
-0.09016073495149612,
-0.05194477364420891,
0.06800203770399094,
0.015507003292441368,
-0.04686481133103371,
0.04447668418288231,
0.07285559177398682,
-0.02359619177877903,
-0.026164988055825233,
-0.07759087532758713,
0.021816125139594078,
0.042232923209667206,
-0.0038174407090991735,
0.02565966546535492,
-0.09013468772172928,
-0.029441865161061287,
0.007770523428916931,
-0.07190784066915512,
0.0441073402762413,
-0.07196044921875,
0.030909337103366852,
-0.024110231548547745,
-0.012955594807863235,
-0.0992448627948761,
0.017727991566061974,
-0.05409524217247963,
-0.0833292081952095,
0.07222972065210342,
-0.02453480288386345,
0.00861482322216034,
-0.032503701746463776,
0.07312126457691193,
0.01915861666202545,
-0.007308527361601591,
-0.08069644868373871,
0.007183766458183527,
0.011636439710855484,
-0.050157055258750916,
0.03776334971189499,
0.019712304696440697,
-0.013336808420717716,
0.024707969278097153,
0.005662370938807726,
0.08175022155046463,
0.050650354474782944,
-0.038436856120824814,
0.08453404158353806,
-0.08228478580713272,
0.06674149632453918,
0.07062077522277832,
0.019193971529603004,
0.031058864668011665,
0.15115338563919067,
-0.0051329960115253925,
0.013684120029211044,
0.040238991379737854,
0.018625568598508835,
-0.05844923481345177,
0.1381557583808899,
-0.05153803527355194,
-5.031931848975546e-8,
-0.09564799070358276,
-0.04191099852323532,
-0.06710659712553024,
-0.011600513942539692,
-0.04835907742381096,
-0.025014912709593773,
-0.001405782182700932,
0.01547247264534235,
-0.0022475363221019506,
-0.007914208807051182,
0.010388562455773354,
0.0933535173535347,
-0.12654998898506165,
-0.02012472227215767,
-0.04374043270945549,
-0.018467416986823082,
-0.08807633072137833,
0.09658326208591461,
0.009509840048849583,
-0.10058953613042831,
-0.029104851186275482,
0.001493730815127492,
-0.02084076777100563,
-0.011319623328745365,
0.029316972941160202,
0.08984078466892242,
-0.0058026439510285854,
0.0991569384932518,
0.03675098344683647,
0.0038968741428107023,
0.02167438715696335,
0.03289487212896347,
-0.09060768038034439,
0.060249824076890945,
-0.01955416426062584,
0.030510714277625084,
-0.029833532869815826,
0.05696568265557289,
-0.0008578484994359314,
0.056979432702064514,
0.008238157257437706,
-0.035990431904792786,
-0.06522466987371445,
-0.008878284133970737,
-0.030724728479981422,
0.06333763897418976,
0.03937515616416931,
0.07307201623916626,
-0.0031527637038379908,
-0.004960464779287577,
-0.026929562911391258,
-0.060674622654914856,
0.002757465234026313,
0.03808412328362465,
-0.027560243383049965,
0.004354636184871197,
-0.0024397235829383135,
-0.0857442170381546,
0.04205477610230446,
0.005820746533572674,
0.038483627140522,
-0.022432243451476097,
0.030726851895451546,
0.008640539832413197
] | 0.127745
|
`apiVersion: authorization.k8s.io/v1` `import "k8s.io/api/authorization/v1"` ## SubjectAccessReview {#SubjectAccessReview} SubjectAccessReview checks whether or not a user or group can perform an action. --- - \*\*apiVersion\*\*: authorization.k8s.io/v1 - \*\*kind\*\*: SubjectAccessReview - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - \*\*spec\*\* ([}}">SubjectAccessReviewSpec]({{< ref )), required Spec holds information about the request being evaluated - \*\*status\*\* ([}}">SubjectAccessReviewStatus]({{< ref )) Status is filled in by the server and indicates whether the request is allowed or not ## SubjectAccessReviewSpec {#SubjectAccessReviewSpec} SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set --- - \*\*extra\*\* (map[string][]string) Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - \*\*groups\*\* ([]string) \*Atomic: will be replaced during a merge\* Groups is the groups you're testing for. - \*\*nonResourceAttributes\*\* (NonResourceAttributes) NonResourceAttributes describes information for a non-resource access request \*NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\* - \*\*nonResourceAttributes.path\*\* (string) Path is the URL path of the request - \*\*nonResourceAttributes.verb\*\* (string) Verb is the standard HTTP verb - \*\*resourceAttributes\*\* (ResourceAttributes) ResourceAuthorizationAttributes describes information for a resource access request \*ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\* - \*\*resourceAttributes.fieldSelector\*\* (FieldSelectorAttributes) fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it. \*FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to \* ensure rawSelector and requirements are not both set \* consider the requirements field if set \* not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the \*SubjectAccessReview endpoints of the kube-apiserver: \* If rawSelector is empty and requirements are empty, the request is not limited. \* If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. \* If rawSelector is empty and requirements are present, the requirements should be honored \* If rawSelector is present and requirements are present, the request is invalid.\* - \*\*resourceAttributes.fieldSelector.rawSelector\*\* (string) rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's \*SubjectAccessReview will parse the rawSelector as long as the requirements are not present. - \*\*resourceAttributes.fieldSelector.requirements\*\* ([]FieldSelectorRequirement) \*Atomic: will be replaced during a merge\* requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. \*FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.\* - \*\*resourceAttributes.fieldSelector.requirements.key\*\* (string), required key is the field selector key that the requirement applies to. - \*\*resourceAttributes.fieldSelector.requirements.operator\*\* (string), required operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future. - \*\*resourceAttributes.fieldSelector.requirements.values\*\* ([]string) \*Atomic: will be replaced during a merge\* values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - \*\*resourceAttributes.group\*\* (string) Group is the API Group of the Resource. "\*" means all. - \*\*resourceAttributes.labelSelector\*\* (LabelSelectorAttributes) labelSelector describes the limitation on access based on labels.
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md
|
[
-0.04897325485944748,
0.11725369095802307,
-0.016207046806812286,
-0.0036168594378978014,
0.026370039209723473,
-0.04834728688001633,
0.027754178270697594,
-0.013051487505435944,
0.03285995125770569,
0.04751216247677803,
-0.03423217684030533,
-0.10596325993537903,
-0.001051826635375619,
0.03987981006503105,
0.05214494466781616,
0.02661440148949623,
0.04316886141896248,
-0.08877918124198914,
-0.08614345639944077,
-0.004151307977735996,
0.09252054244279861,
0.02116605080664158,
-0.013945352286100388,
0.008313052356243134,
-0.05533928796648979,
-0.039938587695360184,
-0.032817769795656204,
-0.04039189592003822,
0.026406416669487953,
0.03181164711713791,
0.008695264346897602,
-0.005725114606320858,
-0.04773975536227226,
0.04860100895166397,
0.05800066143274307,
0.10160396993160248,
0.007448630407452583,
-0.09201347082853317,
-0.04397209733724594,
0.016131004318594933,
-0.014570323750376701,
0.024956004694104195,
-0.12313111871480942,
-0.032277293503284454,
-0.0010057312902063131,
-0.0006168129621073604,
0.02699199877679348,
-0.08156418800354004,
-0.09750141203403473,
0.02263476699590683,
0.03664068132638931,
-0.048277124762535095,
0.03853754326701164,
0.057168252766132355,
0.0043134731240570545,
-0.03154522180557251,
-0.07863607257604599,
0.0001788312802091241,
0.023406660184264183,
-0.014398735947906971,
-0.005013467278331518,
-0.1033884659409523,
0.038037367165088654,
-0.00270076678134501,
-0.04484960436820984,
0.039484184235334396,
0.006488771177828312,
-0.05903051048517227,
0.05161839723587036,
-0.046118542551994324,
0.0016339193098247051,
-0.06109922379255295,
-0.0929763987660408,
0.026410497725009918,
0.10590439289808273,
0.025302113965153694,
-0.014803559519350529,
-0.009682494215667248,
0.03540727496147156,
-0.1796405017375946,
-0.007870824076235294,
-0.00802839919924736,
-0.06300284713506699,
0.042190250009298325,
0.008498827926814556,
0.008331561461091042,
-0.06707248836755753,
0.008292943239212036,
0.029194725677371025,
0.04512430354952812,
0.030269620940089226,
-0.01216963492333889,
0.06476707011461258,
-0.09300725162029266,
0.09808363020420074,
0.03454197198152542,
-0.08619450032711029,
-0.029730241745710373,
-0.04789936915040016,
0.08097167313098907,
0.01901494711637497,
0.018277959898114204,
-0.07551547884941101,
0.03539417311549187,
0.09311507642269135,
-0.047257184982299805,
0.001409228309057653,
-0.05465115234255791,
-0.086796835064888,
0.06859669089317322,
-0.020870208740234375,
0.08045652508735657,
-0.010664267465472221,
-0.03480728343129158,
0.036132365465164185,
0.027029504999518394,
0.06323222070932388,
0.017436185851693153,
0.04096958786249161,
0.01571292243897915,
0.0699261873960495,
-0.09748192131519318,
0.026033475995063782,
0.024892657995224,
0.04501431807875633,
-0.0022446797229349613,
-0.03857382759451866,
4.390886129421893e-33,
0.04225137457251549,
0.03558662533760071,
0.016944557428359985,
-0.04004475101828575,
-0.0284748375415802,
-0.10382553935050964,
0.029465699568390846,
-0.044641315937042236,
-0.025961441919207573,
-0.033958159387111664,
-0.07526157796382904,
0.09282300621271133,
0.04490832984447479,
-0.07863517850637436,
0.03302007541060448,
0.03193375840783119,
-0.02728496678173542,
0.04656752571463585,
0.021271048113703728,
0.02413187175989151,
0.0523197241127491,
-0.024776434525847435,
-0.020703056827187538,
0.03435077145695686,
-0.0232430137693882,
0.011267258785665035,
-0.039716027677059174,
-0.021068641915917397,
-0.039031170308589935,
0.013650183565914631,
-0.005871002562344074,
-0.043754447251558304,
0.013892755843698978,
0.0037435840349644423,
-0.07338683307170868,
-0.0002553312515374273,
-0.0516335591673851,
0.008542884141206741,
-0.0033697879407554865,
-0.07103757560253143,
0.07492507994174957,
0.04377764090895653,
-0.03093852289021015,
-0.054795172065496445,
-0.010899669490754604,
-0.07982581108808517,
-0.0648992508649826,
-0.02190672606229782,
0.13912834227085114,
0.04485397785902023,
0.006272544153034687,
0.002202808391302824,
0.05146487057209015,
-0.07306013256311417,
0.04124866798520088,
-0.016646025702357292,
0.05967835709452629,
0.015692414715886116,
-0.01028638705611229,
-0.05186827480792999,
0.05559153109788895,
0.011094032786786556,
-0.0041227494366467,
0.034482017159461975,
0.014665847644209862,
0.01059865765273571,
-0.07396476715803146,
0.0273120179772377,
-0.03757049888372421,
-0.06666973233222961,
-0.07805147767066956,
0.08457179367542267,
-0.04552558809518814,
0.004009581170976162,
-0.08913431316614151,
-0.11434908956289291,
0.0034871650859713554,
0.011449671350419521,
-0.03959977254271507,
0.03859144076704979,
0.034814637154340744,
-0.06573185324668884,
-0.04213232547044754,
0.07746760547161102,
-0.06521358340978622,
-0.057768892496824265,
0.005337514914572239,
-0.04617083817720413,
-0.038520168513059616,
-0.048407379537820816,
-0.025673849508166313,
-0.03878515586256981,
-0.08813370764255524,
0.007017632946372032,
-0.08029703795909882,
-7.266421920047636e-33,
0.08262027055025101,
-0.019511235877871513,
0.021699966862797737,
-0.014625787734985352,
-0.008356629870831966,
0.01607329212129116,
0.012314880266785622,
0.008438875898718834,
0.005036665126681328,
0.01650053635239601,
0.04469858482480049,
-0.043218087404966354,
0.03456642106175423,
-0.00612786877900362,
0.04795505851507187,
-0.02073701098561287,
-0.14629106223583221,
0.016287226229906082,
0.06736057251691818,
0.03854701295495033,
-0.006647071801126003,
0.06644106656312943,
0.039311185479164124,
0.07200536876916885,
-0.02515965700149536,
-0.05266822129487991,
0.013451842591166496,
0.01783105731010437,
0.0003754536446649581,
-0.018985701724886894,
0.017136111855506897,
-0.03856571763753891,
-0.0558939054608345,
0.004410566296428442,
0.039903007447719574,
-0.0918731540441513,
0.009273923933506012,
0.09713819622993469,
-0.057491105049848557,
0.05286923795938492,
0.06863942742347717,
0.06671803444623947,
0.008017385378479958,
0.06564689427614212,
-0.0564776286482811,
-0.0009428312769159675,
0.05197693407535553,
0.00515367928892374,
-0.024874284863471985,
-0.09453285485506058,
0.08012911677360535,
0.002141437027603388,
0.034281373023986816,
0.051761966198682785,
-0.010241118259727955,
0.0689251720905304,
0.05381367728114128,
-0.023005610331892967,
0.00006049276635167189,
-0.03171432018280029,
0.004221344366669655,
-0.06640299409627914,
0.017832381650805473,
0.0013438144233077765,
0.00710096163675189,
-0.0201587975025177,
-0.01860518753528595,
-0.018220724537968636,
-0.010749433189630508,
0.03178727626800537,
0.08583780378103256,
-0.07872121036052704,
-0.05469357967376709,
-0.06389418244361877,
0.09423079341650009,
-0.023418253287672997,
-0.029468292370438576,
-0.04982449859380722,
0.024012982845306396,
0.017403043806552887,
-0.06983311474323273,
0.008187131024897099,
0.017033550888299942,
0.04123400151729584,
0.028047794476151466,
-0.053569089621305466,
-0.004157612100243568,
0.093907929956913,
-0.0351535826921463,
0.04462533816695213,
-0.009790034033358097,
-0.0052237664349377155,
-0.03670688718557358,
0.03455957770347595,
-0.06298287957906723,
-5.459659746520629e-8,
-0.020946301519870758,
-0.014139635488390923,
-0.044306736439466476,
0.051593441516160965,
0.002161618322134018,
0.01935740001499653,
-0.018598588183522224,
-0.10515773296356201,
0.015378511510789394,
-0.045771047472953796,
0.03292102739214897,
0.03737752139568329,
-0.04024674370884895,
-0.059837616980075836,
0.034506507217884064,
-0.016904544085264206,
-0.06790946424007416,
0.07501136511564255,
-0.023543689399957657,
0.02989504486322403,
-0.011053773574531078,
-0.03764621913433075,
-0.0008326160022988915,
-0.12352138012647629,
0.07381463795900345,
0.11305594444274902,
-0.015286815352737904,
0.060314327478408813,
-0.02056306228041649,
0.03539421036839485,
-0.0009373147622682154,
0.004112023860216141,
-0.020237164571881294,
0.025445736944675446,
-0.04426787793636322,
0.04142306372523308,
-0.06061640381813049,
0.028338706120848656,
0.015689164400100708,
0.01946205645799637,
0.022161776199936867,
0.02024102210998535,
-0.10121338069438934,
0.07316950708627701,
0.05225275084376335,
0.07790165394544601,
0.006065846886485815,
0.001260163844563067,
0.029636923223733902,
-0.007572481874376535,
-0.024608908221125603,
-0.08006922900676727,
-0.037798281759023666,
0.08010546118021011,
-0.09708023071289062,
0.024653246626257896,
0.0030028182081878185,
-0.02444138564169407,
0.05975063517689705,
-0.0539422407746315,
0.19094234704971313,
0.06636921316385269,
0.03557456284761429,
0.019399650394916534
] | 0.182329
|
operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - \*\*resourceAttributes.group\*\* (string) Group is the API Group of the Resource. "\*" means all. - \*\*resourceAttributes.labelSelector\*\* (LabelSelectorAttributes) labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. \*LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to \* ensure rawSelector and requirements are not both set \* consider the requirements field if set \* not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the \*SubjectAccessReview endpoints of the kube-apiserver: \* If rawSelector is empty and requirements are empty, the request is not limited. \* If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. \* If rawSelector is empty and requirements are present, the requirements should be honored \* If rawSelector is present and requirements are present, the request is invalid.\* - \*\*resourceAttributes.labelSelector.rawSelector\*\* (string) rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's \*SubjectAccessReview will parse the rawSelector as long as the requirements are not present. - \*\*resourceAttributes.labelSelector.requirements\*\* ([]LabelSelectorRequirement) \*Atomic: will be replaced during a merge\* requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. \*A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\* - \*\*resourceAttributes.labelSelector.requirements.key\*\* (string), required key is the label key that the selector applies to. - \*\*resourceAttributes.labelSelector.requirements.operator\*\* (string), required operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - \*\*resourceAttributes.labelSelector.requirements.values\*\* ([]string) \*Atomic: will be replaced during a merge\* values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - \*\*resourceAttributes.name\*\* (string) Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - \*\*resourceAttributes.namespace\*\* (string) Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview - \*\*resourceAttributes.resource\*\* (string) Resource is one of the existing resource types. "\*" means all. - \*\*resourceAttributes.subresource\*\* (string) Subresource is one of the existing resource types. "" means none. - \*\*resourceAttributes.verb\*\* (string) Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "\*" means all. - \*\*resourceAttributes.version\*\* (string) Version is the API Version of the Resource. "\*" means all. - \*\*uid\*\* (string) UID information about the requesting user. - \*\*user\*\* (string) User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups ## SubjectAccessReviewStatus {#SubjectAccessReviewStatus} SubjectAccessReviewStatus --- - \*\*allowed\*\* (boolean), required Allowed is
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md
|
[
-0.07519150525331497,
0.12823604047298431,
-0.09684376418590546,
0.04034429043531418,
-0.015321970917284489,
-0.033702220767736435,
0.11182540655136108,
-0.028280140832066536,
-0.037135977298021317,
-0.08182463049888611,
0.01259419322013855,
-0.19360677897930145,
0.06758374720811844,
-0.05882154405117035,
0.05350393429398537,
0.02376743219792843,
0.016905128955841064,
-0.07374177128076553,
-0.11859333515167236,
0.013295555487275124,
0.03947490453720093,
0.07782381027936935,
-0.056595344096422195,
-0.048065416514873505,
-0.026566985994577408,
0.03747189790010452,
-0.04624195024371147,
-0.030542222782969475,
0.07410106062889099,
0.022193385288119316,
-0.010619337670505047,
-0.05906703695654869,
-0.05332144349813461,
0.08284389972686768,
0.06668683141469955,
0.07803141325712204,
0.02382614091038704,
-0.011238371953368187,
0.006471366621553898,
0.07419977337121964,
0.039483509957790375,
0.0018648935947567225,
-0.07558058947324753,
-0.0110853910446167,
-0.06293172389268875,
0.015754126012325287,
0.0053623816929757595,
-0.11565734446048737,
-0.08989986777305603,
0.03263386711478233,
-0.09874426573514938,
-0.023992404341697693,
-0.01964610256254673,
0.00799686461687088,
0.023654459044337273,
-0.012670649215579033,
-0.05544744431972504,
0.027448181062936783,
-0.01924162544310093,
-0.02718891203403473,
-0.030186569318175316,
-0.07570371776819229,
0.048046477138996124,
0.022851068526506424,
0.002028659451752901,
-0.04983074590563774,
0.0050605544820427895,
-0.027275502681732178,
-0.018293967470526695,
-0.06729640811681747,
-0.08235213160514832,
0.002208366058766842,
-0.01968543231487274,
0.09266909211874008,
0.024011140689253807,
0.09401056915521622,
0.0019120859215036035,
0.011313282884657383,
0.1310526579618454,
-0.13443882763385773,
0.012946533970534801,
0.010279190726578236,
-0.028387457132339478,
0.06577152758836746,
0.05796307697892189,
0.07714048027992249,
-0.0713229849934578,
-0.03060944378376007,
0.020053911954164505,
0.01334807462990284,
0.05807429924607277,
-0.10720144957304001,
-0.025675678625702858,
0.021519344300031662,
0.0837147906422615,
0.02827698551118374,
0.003801903687417507,
-0.03099723346531391,
-0.03763005882501602,
0.06186032295227051,
-0.014007377438247204,
-0.0585690438747406,
0.007333576679229736,
-0.05253984034061432,
-0.038042958825826645,
-0.10206257551908493,
0.03945104405283928,
0.005511091090738773,
0.02370861917734146,
-0.00979425385594368,
-0.024746788665652275,
0.06748460233211517,
-0.02644422836601734,
-0.045195646584033966,
-0.01403767243027687,
0.06143578886985779,
0.023967651650309563,
-0.06885267794132233,
0.017508158460259438,
-0.018982771784067154,
-0.034168656915426254,
0.004957612603902817,
0.012905108742415905,
0.03670895844697952,
0.015602635219693184,
-0.0030138567090034485,
-0.008207451552152634,
7.484492285172495e-33,
0.049113158136606216,
-0.01777642033994198,
-0.004507684148848057,
-0.05747104063630104,
-0.0642324909567833,
0.015829958021640778,
-0.022296318784356117,
0.038356680423021317,
0.012990128248929977,
0.026331625878810883,
0.03732296824455261,
0.04188668727874756,
-0.006221914663910866,
-0.021422129124403,
0.06304316222667694,
0.0618370920419693,
0.02451138384640217,
0.05697387456893921,
-0.01690838113427162,
-0.05893794074654579,
0.0038453759625554085,
-0.04802484065294266,
-0.02639625407755375,
0.04094946011900902,
-0.02951918914914131,
-0.043175823986530304,
-0.09941611438989639,
-0.007963761687278748,
-0.009132182225584984,
0.038262560963630676,
-0.030192896723747253,
-0.037366077303886414,
0.07702590525150299,
0.017034444957971573,
0.017380189150571823,
0.04817593842744827,
-0.05159493908286095,
-0.026794862002134323,
-0.024382101371884346,
-0.02353687398135662,
-0.07879965007305145,
0.0010578344808891416,
0.023516084998846054,
-0.010380757972598076,
-0.012107676826417446,
-0.08361849188804626,
-0.07015089690685272,
-0.0005221381434239447,
-0.022680211812257767,
-0.021129166707396507,
-0.09975917637348175,
-0.007580737117677927,
0.07999491691589355,
-0.02664780803024769,
0.01357940398156643,
-0.01543085090816021,
0.0360143780708313,
0.07846813648939133,
0.00046878308057785034,
0.016738297417759895,
-0.03272083029150963,
0.06472493708133698,
0.03226771950721741,
-0.006617608945816755,
0.0530160628259182,
0.03702981024980545,
0.018836423754692078,
0.04630325362086296,
-0.018565062433481216,
-0.036310698837041855,
0.032393909990787506,
0.02850901335477829,
0.004266547504812479,
-0.007772290147840977,
-0.019428499042987823,
-0.05315317586064339,
0.054755862802267075,
0.01723637618124485,
-0.025870082899928093,
-0.014200563542544842,
-0.019970444962382317,
-0.0009099234594032168,
0.03506174683570862,
0.013147300109267235,
-0.04798034578561783,
0.02736782841384411,
0.034404948353767395,
-0.04187686741352081,
-0.02165120281279087,
0.036154668778181076,
0.08602016419172287,
0.0016741640865802765,
-0.15200378000736237,
-0.07988697290420532,
-0.03556079417467117,
-8.242473817785753e-33,
0.052152011543512344,
0.044213663786649704,
-0.03568590059876442,
-0.07703692466020584,
0.022554529830813408,
-0.06493674963712692,
0.09639450907707214,
-0.020784681662917137,
0.03995883837342262,
-0.06158486753702164,
0.03987719491124153,
-0.01704046130180359,
-0.007310694549232721,
-0.03621624410152435,
0.06388380378484726,
0.026563646271824837,
-0.11951741576194763,
-0.04899591952562332,
0.10749374330043793,
0.052708160132169724,
0.04340657219290733,
0.0762530043721199,
-0.01625337451696396,
0.060739923268556595,
-0.005631213542073965,
-0.04385117441415787,
-0.020051157101988792,
0.036406438797712326,
0.018823454156517982,
0.011088656261563301,
0.01656491681933403,
-0.08580449223518372,
-0.022269291803240776,
0.053449712693691254,
-0.049670033156871796,
-0.10619039833545685,
0.0039575835689902306,
0.06590494513511658,
0.008428927510976791,
-0.004771594889461994,
0.025951994583010674,
-0.03648197278380394,
-0.05640823021531105,
0.04375854879617691,
-0.03627686947584152,
-0.001478187507018447,
-0.0065582855604588985,
-0.030121391639113426,
-0.04114072024822235,
-0.033199045807123184,
0.056355055421590805,
-0.006818419322371483,
-0.029002271592617035,
0.08176785707473755,
-0.04387678951025009,
0.06775262951850891,
0.0007920605130493641,
-0.005657579749822617,
-0.019054822623729706,
-0.05325942859053612,
-0.07157564908266068,
0.09188750386238098,
0.0007827724912203848,
0.05769607052206993,
0.03975778818130493,
-0.038040269166231155,
-0.06172393634915352,
-0.021515244618058205,
-0.03583475574851036,
-0.04921293258666992,
0.053226690739393234,
-0.05249551683664322,
-0.008543835021555424,
-0.018188711255788803,
-0.041910748928785324,
-0.011729925870895386,
-0.009530680254101753,
0.001138383406214416,
0.01141284592449665,
0.05494270846247673,
-0.058606069535017014,
0.07743272930383682,
0.030994858592748642,
0.11158497631549835,
0.015867190435528755,
0.023681804537773132,
-0.004815475083887577,
0.056284885853528976,
-0.04519980028271675,
-0.000537933548912406,
0.017667429521679878,
-0.051507268100976944,
-0.07194024324417114,
0.10047996044158936,
-0.031202981248497963,
-5.922913715039613e-8,
-0.08075561374425888,
0.03377041593194008,
-0.031785160303115845,
0.02843957208096981,
0.08873851597309113,
-0.00769470538944006,
0.006092853844165802,
-0.01805531233549118,
-0.0489971749484539,
0.10526528209447861,
0.07665321230888367,
0.0038195359520614147,
-0.010887804441154003,
-0.05728347972035408,
-0.01743032969534397,
-0.04618322476744652,
-0.02160007879137993,
0.0027977980207651854,
-0.012269358150660992,
0.004357925150543451,
0.026287024840712547,
-0.10604026168584824,
0.0137577373534441,
-0.0378461554646492,
0.12663336098194122,
0.054266516119241714,
-0.03557172045111656,
0.02931768260896206,
0.0324033685028553,
0.04266814887523651,
0.003489541355520487,
-0.00022767952759750187,
-0.0052343979477882385,
0.08194495737552643,
-0.02985481172800064,
0.041218116879463196,
-0.12649479508399963,
-0.03765329718589783,
-0.03558940440416336,
0.07286649942398071,
0.00738478684797883,
0.01766902580857277,
0.01615344174206257,
0.052304692566394806,
0.0763225182890892,
0.05102928727865219,
0.0070245456881821156,
-0.01148704532533884,
0.1218344196677208,
-0.011500703170895576,
-0.0349753312766552,
-0.05539754778146744,
0.038861844688653946,
0.11108320206403732,
-0.049480635672807693,
-0.0643724650144577,
0.0429358184337616,
0.013191193342208862,
0.002183766569942236,
0.07767589390277863,
0.05837371572852135,
0.01548993680626154,
0.036503810435533524,
0.024642717093229294
] | 0.130238
|
(string) UID information about the requesting user. - \*\*user\*\* (string) User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups ## SubjectAccessReviewStatus {#SubjectAccessReviewStatus} SubjectAccessReviewStatus --- - \*\*allowed\*\* (boolean), required Allowed is required. True if the action would be allowed, false otherwise. - \*\*denied\*\* (boolean) Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. - \*\*evaluationError\*\* (string) EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - \*\*reason\*\* (string) Reason is optional. It indicates why a request was allowed or denied. ## Operations {#Operations} --- ### `create` create a SubjectAccessReview #### HTTP Request POST /apis/authorization.k8s.io/v1/subjectaccessreviews #### Parameters - \*\*body\*\*: [}}">SubjectAccessReview]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">SubjectAccessReview]({{< ref )): OK 201 ([}}">SubjectAccessReview]({{< ref )): Created 202 ([}}">SubjectAccessReview]({{< ref )): Accepted 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md
|
[
-0.04976312443614006,
0.05572596937417984,
-0.07129622995853424,
0.06504077464342117,
-0.03390776738524437,
-0.0070236013270914555,
0.09780394285917282,
-0.041971441358327866,
-0.042358942329883575,
0.0014851548476144671,
0.0017064536223188043,
-0.04966228827834129,
0.07721122354269028,
0.059865813702344894,
-0.014572282321751118,
0.019613176584243774,
0.06912530958652496,
-0.04032512754201889,
-0.1244804710149765,
0.014871794730424881,
-0.01731211319565773,
0.024077188223600388,
-0.057979099452495575,
0.017562787979841232,
-0.021133333444595337,
-0.07657469063997269,
-0.045528147369623184,
-0.07597386837005615,
0.03486258536577225,
0.022852208465337753,
0.006157430354505777,
-0.06268288195133209,
0.025016214698553085,
0.050356507301330566,
0.07751251757144928,
-0.003432141151279211,
0.08052831888198853,
-0.06738660484552383,
-0.02824629284441471,
-0.020427202805876732,
-0.04177344962954521,
0.032051824033260345,
-0.0612848661839962,
0.034903742372989655,
-0.040341705083847046,
-0.010526532307267189,
-0.00968682300299406,
-0.02746010571718216,
-0.0625663548707962,
0.004143132362514734,
0.0483844093978405,
0.011543015949428082,
0.02995380572974682,
0.019284386187791824,
-0.041236501187086105,
-0.04122895374894142,
0.00009493366815149784,
-0.04572568088769913,
0.026530152186751366,
-0.02462075650691986,
0.01940871961414814,
-0.07591121643781662,
-0.014712870121002197,
0.009423171170055866,
-0.06245707347989082,
-0.025633713230490685,
-0.011739617213606834,
-0.093457892537117,
-0.005462109111249447,
-0.040457967668771744,
0.03529487922787666,
-0.035744018852710724,
-0.10658660531044006,
0.0762387290596962,
0.09448714554309845,
0.018862435594201088,
0.012140113860368729,
-0.03957158699631691,
0.043486934155225754,
-0.11875919997692108,
0.018478913232684135,
-0.04089505225419998,
-0.018312590196728706,
0.057521041482686996,
-0.012901003472507,
0.04816823825240135,
-0.011461575515568256,
0.02245776727795601,
-0.07383710145950317,
0.08143935352563858,
0.08223885297775269,
0.03377852216362953,
0.03758786618709564,
-0.06076657772064209,
0.08437736332416534,
-0.013590914197266102,
-0.06982313841581345,
-0.0697920024394989,
-0.06528672575950623,
0.06128687784075737,
-0.029584063217043877,
-0.04600517824292183,
-0.02357497066259384,
-0.07872698456048965,
-0.0033266511745750904,
-0.0552423819899559,
0.03224548324942589,
-0.12014592438936234,
0.05492589250206947,
0.017681043595075607,
-0.02884455770254135,
0.017552567645907402,
-0.03025193326175213,
0.024669751524925232,
-0.01907242275774479,
0.011259950697422028,
0.06602326035499573,
0.021171536296606064,
0.01707116886973381,
-0.047053012996912,
0.027680719271302223,
-0.0034042673651129007,
0.09054864197969437,
0.06311333179473877,
0.09942121803760529,
-0.02309354767203331,
-0.07030272483825684,
6.342740499690561e-33,
-0.019959012046456337,
0.029115216806530952,
-0.060217928141355515,
0.02806025557219982,
-0.03898808732628822,
0.01090508047491312,
-0.020386511459946632,
0.013895507901906967,
0.047112975269556046,
-0.0111140301451087,
-0.04674648866057396,
0.06005449965596199,
0.06750879436731339,
-0.014947890304028988,
0.02309977449476719,
0.018603123724460602,
0.06120816990733147,
-0.01194754522293806,
-0.02731909602880478,
0.021982625126838684,
0.025461606681346893,
0.06140335276722908,
-0.008981275372207165,
0.0641356036067009,
-0.06599950790405273,
-0.11167944222688675,
-0.06886142492294312,
-0.027139149606227875,
0.0526626780629158,
0.02300458401441574,
-0.02035711705684662,
-0.06758496165275574,
-0.01654817722737789,
0.06479226052761078,
0.01906379498541355,
0.04606081545352936,
0.04867019131779671,
-0.0033249130938202143,
0.015725336968898773,
-0.07597669214010239,
-0.07945162057876587,
0.013926062732934952,
-0.015647023916244507,
-0.0014707158552482724,
-0.00989935826510191,
-0.07103104889392853,
-0.039932794868946075,
-0.006352494470775127,
0.07077452540397644,
0.06398337334394455,
-0.01971864327788353,
0.054607391357421875,
0.12435826659202576,
-0.05170850828289986,
0.01771465688943863,
-0.06370721012353897,
-0.053866270929574966,
0.06013580411672592,
0.05646882578730583,
0.0007333524408750236,
0.053846269845962524,
0.06602656096220016,
-0.025789033621549606,
0.02270467020571232,
-0.04521050304174423,
-0.0182541161775589,
-0.04450013488531113,
-0.04601551592350006,
-0.0075008985586464405,
-0.04067398980259895,
-0.05221280828118324,
0.006224478129297495,
0.03378025442361832,
0.028179222717881203,
-0.08397125452756882,
-0.10402969270944595,
0.04951705038547516,
0.10499265789985657,
0.010741475969552994,
-0.023315545171499252,
-0.01142409909516573,
-0.06991545855998993,
0.00402198638767004,
0.021232645958662033,
-0.096236951649189,
0.0010240437695756555,
-0.0008122294675558805,
-0.056044045835733414,
-0.0018284128746017814,
-0.0576513297855854,
0.04187319800257683,
-0.008331462740898132,
-0.06213060021400452,
0.0755714699625969,
-0.010012292303144932,
-8.716045961585497e-33,
0.023753657937049866,
-0.019656118005514145,
0.017018048092722893,
-0.0687064453959465,
0.02148416079580784,
-0.03568144142627716,
0.02326902560889721,
-0.03959498181939125,
0.022457601502537727,
-0.07717177271842957,
0.05232611671090126,
0.003782260464504361,
-0.008229662664234638,
0.03714374825358391,
-0.019267573952674866,
-0.0513097420334816,
-0.08993332087993622,
-0.0331776961684227,
0.012669617310166359,
0.07580360025167465,
-0.02183522842824459,
0.09878810495138168,
0.002438573632389307,
0.021429618820548058,
-0.010749345645308495,
-0.0033028714824467897,
-0.008102850057184696,
-0.012994745746254921,
0.055133428424596786,
0.05834425613284111,
0.05895199999213219,
0.021392250433564186,
-0.06645805388689041,
-0.024334317073225975,
-0.04108733683824539,
-0.08492444455623627,
0.026896260678768158,
0.12026169151067734,
-0.07275659590959549,
0.03650788217782974,
0.06051303818821907,
0.05983991548418999,
0.02965458668768406,
0.03387239947915077,
0.043638862669467926,
0.054212071001529694,
0.05966262146830559,
-0.04368036240339279,
-0.07302305102348328,
0.03655058518052101,
0.050894491374492645,
-0.022208569571375847,
0.13788525760173798,
0.09623777121305466,
0.022215377539396286,
-0.0014887246070429683,
0.06558501720428467,
-0.06164215877652168,
-0.017825409770011902,
0.004537450149655342,
-0.026997672393918037,
0.028446270152926445,
0.0554727204144001,
0.000365511019481346,
-0.034868355840444565,
-0.007093304768204689,
-0.003206520574167371,
-0.00039734868914820254,
0.03403184935450554,
-0.03598681092262268,
0.027610057964920998,
-0.1468982994556427,
-0.055780865252017975,
-0.014112967997789383,
0.06356442719697952,
0.023281747475266457,
-0.0326022207736969,
-0.0902295932173729,
-0.03574419766664505,
0.05385533720254898,
-0.05814462900161743,
-0.00957883708178997,
-0.03762659803032875,
0.11070059984922409,
0.0124839311465621,
-0.04138384014368057,
-0.05490351468324661,
0.02570255473256111,
-0.0020087508019059896,
0.07110694795846939,
0.016344815492630005,
-0.00039489218033850193,
0.05251745879650116,
0.015167036093771458,
0.0004983830731362104,
-5.8017192827719555e-8,
-0.022965000942349434,
-0.030779488384723663,
-0.007863488048315048,
0.004964866675436497,
0.028987016528844833,
-0.01451977901160717,
-0.06701082736253738,
-0.18342801928520203,
0.01051078550517559,
-0.028466999530792236,
0.007182431872934103,
0.04148487001657486,
-0.03720931336283684,
-0.18243347108364105,
-0.009501565247774124,
0.023694463074207306,
-0.07422947138547897,
-0.0300914254039526,
0.01339511014521122,
0.06792502105236053,
-0.026497893035411835,
-0.05812655761837959,
-0.060976509004831314,
-0.019749023020267487,
-0.01627192087471485,
0.07431746274232864,
-0.034924186766147614,
0.02778729610145092,
-0.06011095643043518,
0.03180130198597908,
0.03385911136865616,
0.04428381472826004,
-0.02152215875685215,
-0.011314601637423038,
-0.10672129690647125,
0.05873887613415718,
-0.05333194509148598,
0.030159804970026016,
0.005794824566692114,
-0.011132093146443367,
0.02477204240858555,
0.06571289896965027,
0.029380997642874718,
0.04673207178711891,
-0.00038983914419077337,
-0.01808103732764721,
0.0058648306876420975,
-0.06799774616956711,
0.04355321452021599,
-0.03419163078069687,
-0.006551004480570555,
-0.026818320155143738,
-0.03818117454648018,
0.1594216376543045,
-0.03645526245236397,
0.028563400730490685,
0.003450117539614439,
0.027452651411294937,
0.014298731461167336,
0.007198925130069256,
0.1107504814863205,
0.06397953629493713,
0.015876760706305504,
-0.02237691543996334
] | 0.113429
|
`apiVersion: rbac.authorization.k8s.io/v1` `import "k8s.io/api/rbac/v1"` ## ClusterRoleBinding {#ClusterRoleBinding} ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: ClusterRoleBinding - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object's metadata. - \*\*roleRef\*\* (RoleRef), required RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable. \*RoleRef contains information that points to the role being used\* - \*\*roleRef.apiGroup\*\* (string), required APIGroup is the group for the resource being referenced - \*\*roleRef.kind\*\* (string), required Kind is the type of resource being referenced - \*\*roleRef.name\*\* (string), required Name is the name of resource being referenced - \*\*subjects\*\* ([]Subject) \*Atomic: will be replaced during a merge\* Subjects holds references to the objects the role applies to. \*Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\* - \*\*subjects.kind\*\* (string), required Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. - \*\*subjects.name\*\* (string), required Name of the object being referenced. - \*\*subjects.apiGroup\*\* (string) APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. - \*\*subjects.namespace\*\* (string) Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. ## ClusterRoleBindingList {#ClusterRoleBindingList} ClusterRoleBindingList is a collection of ClusterRoleBindings --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: ClusterRoleBindingList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard object's metadata. - \*\*items\*\* ([][}}">ClusterRoleBinding]({{< ref )), required Items is a list of ClusterRoleBindings ## Operations {#Operations} --- ### `get` read the specified ClusterRoleBinding #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRoleBinding - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRoleBinding]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind ClusterRoleBinding #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">ClusterRoleBindingList]({{< ref )): OK 401: Unauthorized ### `create` create a ClusterRoleBinding #### HTTP Request POST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings #### Parameters - \*\*body\*\*: [}}">ClusterRoleBinding]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRoleBinding]({{< ref )): OK 201 ([}}">ClusterRoleBinding]({{< ref )): Created 202 ([}}">ClusterRoleBinding]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified ClusterRoleBinding #### HTTP Request PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRoleBinding - \*\*body\*\*: [}}">ClusterRoleBinding]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{<
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1.md
|
[
-0.05072842165827751,
0.012498008087277412,
-0.060770463198423386,
0.04478980228304863,
0.002563206246122718,
0.018474435433745384,
0.04705489054322243,
-0.03218497708439827,
-0.01576143503189087,
0.008717549964785576,
-0.05390509217977524,
-0.0639314129948616,
0.05624569207429886,
0.06050962954759598,
-0.008203367702662945,
0.015342043712735176,
0.012770834378898144,
-0.03064742684364319,
-0.0950571671128273,
-0.0001528383290860802,
-0.012064487673342228,
-0.047161489725112915,
-0.013721161521971226,
0.044313255697488785,
-0.06235397234559059,
-0.06403389573097229,
-0.06386537104845047,
-0.0330640971660614,
0.0028516764286905527,
-0.020967183634638786,
-0.047923315316438675,
0.033808641135692596,
0.014697760343551636,
0.031203750520944595,
0.07583498954772949,
0.10739850997924805,
0.03096669167280197,
-0.0313313864171505,
-0.03468015789985657,
-0.011162257753312588,
0.04947606101632118,
0.09786544740200043,
-0.041603777557611465,
-0.0871717631816864,
0.0107705844566226,
-0.008050668053328991,
0.08749520778656006,
-0.03343643993139267,
-0.05447793006896973,
-0.005663065705448389,
-0.007321679033339024,
0.02408542111515999,
0.006953495554625988,
0.04514110088348389,
0.020907601341605186,
0.023683946579694748,
-0.012869113124907017,
0.02584153600037098,
0.042488884180784225,
-0.050413135439157486,
0.028460022062063217,
-0.049786727875471115,
0.08032368868589401,
-0.07023204863071442,
-0.13395361602306366,
-0.022616015747189522,
-0.02022319659590721,
-0.04978082701563835,
-0.010226360522210598,
-0.06059802323579788,
0.03784158453345299,
-0.030717985704541206,
-0.08219712972640991,
0.013318760320544243,
0.07432764768600464,
0.07747844606637955,
0.007809807080775499,
0.04086108133196831,
0.060699332505464554,
-0.1531413048505783,
0.000938965764362365,
-0.017744790762662888,
-0.020799467340111732,
0.07643193751573563,
-0.054375059902668,
0.016900500282645226,
-0.028195098042488098,
-0.07238510251045227,
-0.010212705470621586,
0.042154405266046524,
0.028866542503237724,
-0.026483863592147827,
0.11440778523683548,
-0.1012258306145668,
0.06440506875514984,
-0.011296934448182583,
-0.03194219991564751,
0.0193914994597435,
-0.014338319189846516,
0.06006589159369469,
-0.07598431408405304,
-0.01940767653286457,
-0.012294542044401169,
0.05268307402729988,
-0.052283015102148056,
-0.028132271021604538,
-0.04366784542798996,
-0.03934888169169426,
-0.04219331964850426,
0.07068276405334473,
0.00345306727103889,
0.09759018570184708,
-0.05077368766069412,
-0.018479101359844208,
0.01713823713362217,
0.05125490203499794,
0.03999124839901924,
-0.07332409173250198,
0.060892123728990555,
0.032977379858493805,
0.08259448409080505,
-0.04393971338868141,
0.07094711810350418,
0.06284556537866592,
0.04174777492880821,
0.01835387758910656,
-0.030764207243919373,
5.1262173552627445e-33,
-0.012070572935044765,
0.0037267778534442186,
0.02709953673183918,
0.03311911225318909,
-0.003446396440267563,
-0.042980458587408066,
-0.03173139691352844,
-0.03597750514745712,
-0.046952541917562485,
-0.09420732408761978,
-0.07574976235628128,
0.10856575518846512,
0.04129017889499664,
-0.1248452290892601,
-0.006212273612618446,
0.09276805818080902,
0.005581291392445564,
0.06646369397640228,
0.01830296218395233,
0.00954250805079937,
0.06844821572303772,
0.01216823048889637,
-0.05076255276799202,
-0.004236352629959583,
-0.029493160545825958,
-0.048051584511995316,
-0.022283609956502914,
-0.11017020791769028,
0.04692265763878822,
0.010128957219421864,
0.005135098937898874,
-0.010048845782876015,
-0.00966558512300253,
0.01723487116396427,
-0.036354608833789825,
-0.004534376319497824,
-0.03008749894797802,
0.007915032096207142,
-0.08639610558748245,
-0.0502166748046875,
0.008373724296689034,
0.04478980973362923,
-0.011491047218441963,
-0.047822415828704834,
0.03651437908411026,
-0.09856042265892029,
-0.02331453189253807,
0.041005928069353104,
0.08712277561426163,
0.10658981651067734,
-0.05834051966667175,
-0.004626886919140816,
0.11030343174934387,
-0.05541606619954109,
0.06903421878814697,
0.0014413627795875072,
0.0721801146864891,
0.03797581046819687,
0.02261575497686863,
-0.06709402799606323,
0.07642858475446701,
0.012489269487559795,
-0.016596924513578415,
0.0545712374150753,
0.05827530100941658,
0.028018832206726074,
-0.06292898952960968,
0.01730433478951454,
0.05210409685969353,
-0.04003819078207016,
-0.0639086440205574,
0.07103417068719864,
-0.017908036708831787,
0.07668767869472504,
-0.09687712043523788,
-0.14756491780281067,
-0.009998691268265247,
0.004026753827929497,
-0.10674328356981277,
0.06637833267450333,
-0.03189286217093468,
-0.032158687710762024,
-0.012442175298929214,
0.05582652613520622,
-0.09925664216279984,
-0.08430930227041245,
0.02310267835855484,
-0.039812732487916946,
-0.015743199735879898,
-0.09354019165039062,
0.042876243591308594,
-0.0893264040350914,
-0.04357226938009262,
0.020103810355067253,
-0.09708830714225769,
-6.318171933074406e-33,
0.07861439138650894,
-0.08035407960414886,
0.06606371700763702,
-0.08585401624441147,
0.016929909586906433,
-0.038226108998060226,
-0.015135730616748333,
0.008895170874893665,
-0.004553942941129208,
0.012483956292271614,
0.030826954171061516,
-0.051539916545152664,
0.06326452642679214,
0.0465182289481163,
0.059370867908000946,
-0.008872552774846554,
-0.08098780363798141,
-0.012719172984361649,
0.03630349040031433,
0.039627254009246826,
-0.06414594501256943,
0.012003540061414242,
0.06186480447649956,
0.10951914638280869,
-0.0038784819189459085,
-0.023655639961361885,
-0.04911384359002113,
0.05964129790663719,
0.01342738326638937,
-0.030460786074399948,
-0.0033613566774874926,
0.020509889349341393,
-0.09007434546947479,
-0.005917515605688095,
-0.04654981940984726,
-0.08707360923290253,
-0.03715827316045761,
0.010983051732182503,
-0.044379811733961105,
-0.047352515161037445,
0.08009225875139236,
0.05274691432714462,
-0.0524347759783268,
0.00235360162332654,
0.02475808560848236,
0.006232069339603186,
0.06770716607570648,
0.06172981113195419,
0.017210522666573524,
-0.04657824710011482,
0.02548356167972088,
-0.04897167906165123,
0.034263622015714645,
0.051479313522577286,
0.017535123974084854,
0.06857810169458389,
0.11451439559459686,
0.0758817121386528,
0.04589233547449112,
0.0020785394590348005,
0.06682734936475754,
-0.09005823731422424,
-0.00929639395326376,
0.04917590692639351,
-0.028056319802999496,
-0.020762121304869652,
-0.02662121132016182,
0.008984839543700218,
-0.04268529266119003,
0.0070323217660188675,
0.018292687833309174,
-0.0734328106045723,
0.017157699912786484,
0.0011008845176547766,
0.04686478152871132,
0.013930444605648518,
-0.018424000591039658,
0.0055396417155861855,
-0.00020385559764690697,
-0.011164759285748005,
-0.08324166387319565,
-0.055708616971969604,
-0.010026955977082253,
0.0883069708943367,
0.050216659903526306,
-0.032180119305849075,
0.02287653274834156,
0.051021263003349304,
0.03453279286623001,
0.0009690487640909851,
-0.04301845282316208,
-0.04841290041804314,
-0.06251617521047592,
0.016076980158686638,
-0.04510883986949921,
-5.3852414083621625e-8,
0.0019826716743409634,
0.0013928139815106988,
-0.0778108537197113,
0.03707243874669075,
0.03571275249123573,
0.02294035628437996,
-0.027712251991033554,
-0.057312965393066406,
-0.019004372879862785,
0.05389254912734032,
0.011783400550484657,
-0.003776048542931676,
-0.020341189578175545,
-0.09783914685249329,
0.011276694014668465,
0.044250741600990295,
-0.03623431921005249,
0.03692669793963432,
0.018867263570427895,
0.04477027431130409,
-0.016529105603694916,
-0.0677410289645195,
-0.0345766581594944,
-0.07543476670980453,
0.0223324466496706,
0.03703884780406952,
-0.02947579137980938,
-0.009852792136371136,
0.019433308392763138,
0.012303932569921017,
0.01569192484021187,
0.0054183416068553925,
0.05703959986567497,
0.03862689062952995,
-0.05864065885543823,
-0.000045162632886786014,
-0.02479512244462967,
0.09652315080165863,
-0.03873058035969734,
0.007071366999298334,
0.02614678628742695,
0.07562504708766937,
-0.11271084100008011,
-0.013461572118103504,
0.07558561861515045,
0.03449422866106033,
0.02311551384627819,
0.04295644536614418,
0.06874436140060425,
0.021634401753544807,
-0.06410094350576401,
-0.032817497849464417,
-0.016199447214603424,
0.021182453259825706,
-0.07087282836437225,
-0.011926177889108658,
-0.004725690931081772,
0.0016572698950767517,
0.0893004909157753,
-0.0010586618445813656,
0.06570322066545486,
0.04672576114535332,
0.01754603534936905,
0.012269594706594944
] | 0.142781
|
PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRoleBinding - \*\*body\*\*: [}}">ClusterRoleBinding]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRoleBinding]({{< ref )): OK 201 ([}}">ClusterRoleBinding]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified ClusterRoleBinding #### HTTP Request PATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRoleBinding - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRoleBinding]({{< ref )): OK 201 ([}}">ClusterRoleBinding]({{< ref )): Created 401: Unauthorized ### `delete` delete a ClusterRoleBinding #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRoleBinding - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 202 ([}}">Status]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of ClusterRoleBinding #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings #### Parameters - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1.md
|
[
-0.004102563951164484,
0.05758402869105339,
-0.05002390220761299,
0.09061355143785477,
-0.04184521734714508,
0.045573364943265915,
0.04459739103913307,
0.0005778966587968171,
-0.034370873123407364,
0.004091708920896053,
-0.030383864417672157,
-0.09529184550046921,
0.0751088559627533,
0.005514062941074371,
0.008425419218838215,
0.04566393420100212,
-0.0034568062983453274,
-0.03225504606962204,
-0.0871979221701622,
-0.03039519302546978,
0.042451828718185425,
0.019195320084691048,
-0.007494139485061169,
0.03136992081999779,
-0.07563241571187973,
-0.013112794607877731,
-0.06598686426877975,
0.0033258050680160522,
-0.0032724381890147924,
0.03476640582084656,
-0.04383334890007973,
0.04033380374312401,
-0.02330760844051838,
0.04919213801622391,
0.09814882278442383,
0.08196782320737839,
0.05764467641711235,
-0.016933033242821693,
-0.041524387896060944,
-0.005186120513826609,
0.04555784910917282,
0.025926882401108742,
-0.030596397817134857,
-0.031241344287991524,
0.03802105784416199,
-0.05356263741850853,
0.033227767795324326,
-0.013349867425858974,
-0.06815919280052185,
-0.028502780944108963,
-0.06240883097052574,
-0.0032525428105145693,
0.00636119581758976,
0.02342294156551361,
0.011309834197163582,
0.07597826421260834,
-0.07280406355857849,
0.03275642916560173,
0.03014456480741501,
-0.08249077200889587,
0.05549721419811249,
-0.12648369371891022,
0.08196085691452026,
-0.0386640727519989,
-0.10145407170057297,
-0.044533926993608475,
-0.02383212372660637,
-0.001727844588458538,
0.061689067631959915,
-0.11130808293819427,
0.04306141287088394,
0.0007478230400010943,
-0.14329557120800018,
0.02073771134018898,
0.0040887510403990746,
0.1819746494293213,
-0.07879392802715302,
0.02303226850926876,
0.019509268924593925,
-0.09158489108085632,
-0.007795862853527069,
-0.030571527779102325,
-0.024297652766108513,
0.04995345324277878,
-0.03375232592225075,
0.011333788745105267,
-0.03168788552284241,
-0.11530698090791702,
0.026996547356247902,
0.026027342304587364,
0.017845729365944862,
-0.04141679033637047,
0.037196993827819824,
-0.07579819113016129,
-0.010566765442490578,
0.02494024485349655,
-0.08358417451381683,
-0.07871802151203156,
0.04217188060283661,
0.04872451350092888,
-0.007452783640474081,
-0.020522426813840866,
-0.024560093879699707,
-0.00876877922564745,
-0.04802730306982994,
-0.045563917607069016,
-0.002406737534329295,
0.03940518945455551,
-0.0374562107026577,
0.08882877975702286,
0.028037874028086662,
0.13458718359470367,
-0.0052295345813035965,
-0.00443618418648839,
-0.011357237584888935,
0.07060588151216507,
0.05815056338906288,
-0.10333830118179321,
0.014929557219147682,
0.029611945152282715,
0.08686015754938126,
-0.050771649926900864,
-0.0019511569989845157,
0.039958927780389786,
0.03661069646477699,
-0.030293459072709084,
-0.036113541573286057,
5.1616394081568357e-33,
0.06424686312675476,
0.035632986575365067,
0.04065512865781784,
0.001669121440500021,
-0.004993302281945944,
-0.012883707880973816,
0.006751745939254761,
0.024301989004015923,
-0.003001399803906679,
-0.06890678405761719,
-0.04080749675631523,
0.048440493643283844,
0.07457283139228821,
-0.15245161950588226,
-0.013776726089417934,
-0.0004986670683138072,
-0.04391667991876602,
0.06159098446369171,
0.03184519335627556,
0.0114744883030653,
0.0520312525331974,
0.02180396020412445,
-0.03026958741247654,
0.006947111804038286,
-0.019607730209827423,
0.0014691277174279094,
0.0010328093776479363,
-0.07097963243722916,
0.02842036820948124,
0.020754432305693626,
0.04221116378903389,
-0.06754491478204727,
0.005821244791150093,
-0.002690155990421772,
0.004819995723664761,
0.033977754414081573,
0.03113926574587822,
-0.02015325427055359,
-0.06845450401306152,
-0.0276729017496109,
-0.045655544847249985,
-0.016140641644597054,
0.03300278261303902,
-0.020399803295731544,
0.055040646344423294,
-0.07844869047403336,
-0.011951607652008533,
0.007758622989058495,
0.09399358928203583,
-0.006029773037880659,
-0.05886257812380791,
-0.0351683534681797,
0.11738276481628418,
-0.023384518921375275,
0.05719197914004326,
0.031891778111457825,
0.002396706724539399,
0.05002967640757561,
-0.02496851235628128,
-0.02075006626546383,
0.011735061183571815,
0.02747887745499611,
-0.057836294174194336,
-0.013942470774054527,
0.06474248319864273,
0.013083158992230892,
0.03050837852060795,
0.026549911126494408,
0.019963420927524567,
-0.045679278671741486,
-0.005855985917150974,
0.07628139853477478,
-0.04175445809960365,
0.02376573719084263,
-0.07117634266614914,
-0.1090557724237442,
0.0006691274465993047,
0.03470539674162865,
-0.10393358767032623,
0.021062040701508522,
-0.032450202852487564,
-0.047774724662303925,
-0.08293865621089935,
0.1457652449607849,
-0.0239249300211668,
-0.036507971584796906,
0.027531834319233894,
-0.01243272889405489,
-0.03176514431834221,
-0.08626855909824371,
0.046760693192481995,
-0.03488859906792641,
-0.008335858583450317,
-0.031112603843212128,
-0.02541322074830532,
-4.392287539093264e-33,
0.1052311584353447,
-0.11472871154546738,
0.052919261157512665,
-0.015833625569939613,
0.06979146599769592,
-0.05912313610315323,
-0.00183128472417593,
0.03985264152288437,
0.02803339622914791,
-0.012169701978564262,
-0.007819856517016888,
-0.046842750161886215,
0.044001687318086624,
-0.0007833184208720922,
0.04061804339289665,
0.054990436881780624,
-0.05346813425421715,
-0.07107049971818924,
-0.005031399428844452,
0.04924432933330536,
-0.03698750212788582,
0.039447132498025894,
0.035864461213350296,
0.07151869684457779,
-0.03991304710507393,
-0.0039140889421105385,
0.0023539350368082523,
0.006193952634930611,
-0.06962515413761139,
0.0085612703114748,
0.03181452676653862,
-0.03926914557814598,
-0.06830254197120667,
0.020156122744083405,
-0.026720866560935974,
-0.08299513906240463,
0.003938637673854828,
0.021045969799160957,
-0.013798647560179234,
0.03852400183677673,
0.06025746464729309,
0.0349794365465641,
-0.06591631472110748,
-0.00033570616506040096,
0.02752014994621277,
-0.0325440913438797,
0.023800794035196304,
0.03309061750769615,
-0.026314809918403625,
-0.015433850698173046,
-0.0054138340055942535,
-0.0892162024974823,
-0.0360175259411335,
0.09593068808317184,
0.010503826662898064,
-0.006276400294154882,
0.1006566509604454,
0.05012613534927368,
0.017735471948981285,
-0.024027293547987938,
0.02066890522837639,
-0.05064333602786064,
0.02357381209731102,
0.04436175525188446,
0.03199116513133049,
-0.06633429229259491,
0.027162618935108185,
-0.021399058401584625,
-0.10019560158252716,
-0.04167301580309868,
-0.01690976694226265,
-0.07407045364379883,
0.02868662402033806,
0.06586594879627228,
0.09059710800647736,
0.029205238446593285,
0.02563335932791233,
0.005400470923632383,
0.018816664814949036,
0.04541107267141342,
-0.033501703292131424,
-0.03154172748327255,
0.012662284076213837,
0.0703529492020607,
0.04103316366672516,
-0.0548846609890461,
-0.03353947028517723,
0.08943455666303635,
-0.046799030154943466,
0.05090199410915375,
-0.049066342413425446,
-0.0691208690404892,
0.007232086732983589,
-0.008776787668466568,
-0.06888002902269363,
-5.041401252015021e-8,
-0.0654340460896492,
0.012780779041349888,
-0.05248448625206947,
0.0866871178150177,
0.05594128370285034,
-0.01797785796225071,
-0.0028932117857038975,
0.03447381779551506,
-0.012285109609365463,
0.01356456521898508,
0.030681248754262924,
0.01386142149567604,
-0.005932091735303402,
-0.09651586413383484,
0.003735722741112113,
-0.010883485898375511,
-0.015490056946873665,
0.018891332671046257,
-0.031198924407362938,
0.0119704008102417,
0.019094163551926613,
-0.04036613553762436,
-0.016249485313892365,
-0.04817334935069084,
0.1042184978723526,
0.04448654502630234,
-0.03155260160565376,
-0.03688281774520874,
0.03016345202922821,
0.026962149888277054,
0.013274791650474072,
-0.024065878242254257,
0.06409778445959091,
0.0265565924346447,
-0.07789196074008942,
0.0016009417595341802,
0.00935263093560934,
0.04364686831831932,
-0.05178970471024513,
0.05361111834645271,
0.04759717732667923,
0.08146350830793381,
-0.0794568732380867,
-0.009403354488313198,
0.11684717983007431,
-0.052371617406606674,
0.07951218634843826,
0.06662681698799133,
0.11569567769765854,
0.020808937028050423,
-0.09679561108350754,
-0.07733161002397537,
0.041298139840364456,
0.0010268057230859995,
-0.11400527507066727,
-0.027839498594403267,
0.010997234843671322,
0.007384807337075472,
0.07600914686918259,
0.03645903244614601,
0.07568500936031342,
0.019777720794081688,
-0.006884059403091669,
0.043749865144491196
] | 0.090113
|
`apiVersion: authorization.k8s.io/v1` `import "k8s.io/api/authorization/v1"` ## SelfSubjectAccessReview {#SelfSubjectAccessReview} SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action --- - \*\*apiVersion\*\*: authorization.k8s.io/v1 - \*\*kind\*\*: SelfSubjectAccessReview - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - \*\*spec\*\* ([}}">SelfSubjectAccessReviewSpec]({{< ref )), required Spec holds information about the request being evaluated. user and groups must be empty - \*\*status\*\* ([}}">SubjectAccessReviewStatus]({{< ref )) Status is filled in by the server and indicates whether the request is allowed or not ## SelfSubjectAccessReviewSpec {#SelfSubjectAccessReviewSpec} SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set --- - \*\*nonResourceAttributes\*\* (NonResourceAttributes) NonResourceAttributes describes information for a non-resource access request \*NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\* - \*\*nonResourceAttributes.path\*\* (string) Path is the URL path of the request - \*\*nonResourceAttributes.verb\*\* (string) Verb is the standard HTTP verb - \*\*resourceAttributes\*\* (ResourceAttributes) ResourceAuthorizationAttributes describes information for a resource access request \*ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\* - \*\*resourceAttributes.fieldSelector\*\* (FieldSelectorAttributes) fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it. \*FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to \* ensure rawSelector and requirements are not both set \* consider the requirements field if set \* not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the \*SubjectAccessReview endpoints of the kube-apiserver: \* If rawSelector is empty and requirements are empty, the request is not limited. \* If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. \* If rawSelector is empty and requirements are present, the requirements should be honored \* If rawSelector is present and requirements are present, the request is invalid.\* - \*\*resourceAttributes.fieldSelector.rawSelector\*\* (string) rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's \*SubjectAccessReview will parse the rawSelector as long as the requirements are not present. - \*\*resourceAttributes.fieldSelector.requirements\*\* ([]FieldSelectorRequirement) \*Atomic: will be replaced during a merge\* requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. \*FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.\* - \*\*resourceAttributes.fieldSelector.requirements.key\*\* (string), required key is the field selector key that the requirement applies to. - \*\*resourceAttributes.fieldSelector.requirements.operator\*\* (string), required operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future. - \*\*resourceAttributes.fieldSelector.requirements.values\*\* ([]string) \*Atomic: will be replaced during a merge\* values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - \*\*resourceAttributes.group\*\* (string) Group is the API Group of the Resource. "\*" means all. - \*\*resourceAttributes.labelSelector\*\* (LabelSelectorAttributes) labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. \*LabelSelectorAttributes
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md
|
[
-0.05155688151717186,
0.03770986571907997,
-0.020833320915699005,
0.005625834222882986,
-0.03186182677745819,
-0.04270288720726967,
0.046886373311281204,
0.007603076286613941,
-0.0014044423587620258,
0.007659927476197481,
-0.02645815536379814,
-0.11714164167642593,
0.0007202047272585332,
0.04616706073284149,
0.02834797464311123,
0.007668777834624052,
0.036880940198898315,
-0.10418171435594559,
-0.04949389398097992,
-0.006523647345602512,
0.10299177467823029,
0.014633598737418652,
-0.015023529529571533,
0.022194689139723778,
-0.04325655847787857,
-0.01619187369942665,
-0.05930469557642937,
-0.0070057641714811325,
0.01960621401667595,
-0.026173003017902374,
0.06936667114496231,
-0.021999811753630638,
-0.010548578575253487,
0.032112967222929,
0.11267528682947159,
0.05331163853406906,
-0.011766576208174229,
-0.05340709537267685,
-0.05027656629681587,
-0.020840441808104515,
0.016710836440324783,
-0.009451477788388729,
-0.07008909434080124,
-0.005645197816193104,
-0.02714444510638714,
0.05048660561442375,
0.025508303195238113,
-0.08461841940879822,
-0.03695926070213318,
-0.010549467988312244,
0.009112541563808918,
-0.05718500167131424,
0.01901496760547161,
0.02195395529270172,
0.03502903878688812,
0.018845079466700554,
-0.0332176573574543,
0.03954402357339859,
0.03390415385365486,
0.02781158685684204,
0.07674159109592438,
-0.045722488313913345,
0.0620436854660511,
-0.003115869825705886,
-0.028054023161530495,
0.09179382771253586,
-0.020775355398654938,
-0.004502903204411268,
0.03850676119327545,
-0.05835651606321335,
-0.0000475088891107589,
-0.047333113849163055,
-0.04952339828014374,
0.056738998740911484,
0.13019758462905884,
0.012228654697537422,
-0.048889972269535065,
0.0080900052562356,
0.03114878199994564,
-0.19611437618732452,
0.009849531576037407,
0.030009698122739792,
-0.04918301850557327,
0.05310165509581566,
-0.03125089779496193,
0.05522220954298973,
-0.04265867918729782,
-0.03782559558749199,
0.02854071743786335,
0.01089672651141882,
0.0312240868806839,
-0.13544999063014984,
0.03285373002290726,
-0.07672504335641861,
0.056314341723918915,
-0.0008936276426538825,
-0.09360785782337189,
-0.009479866363108158,
-0.07062926888465881,
0.04906274005770683,
-0.03486310690641403,
0.011839150451123714,
-0.07630375027656555,
0.08198381960391998,
0.07737120240926743,
0.011962153017520905,
0.001789337838999927,
-0.037828266620635986,
-0.05896041542291641,
0.06329144537448883,
-0.018199602141976357,
0.04981283098459244,
-0.0627746731042862,
-0.024417297914624214,
0.08013962209224701,
0.03684390336275101,
0.02873559668660164,
0.019107168540358543,
0.05013156309723854,
-0.023199744522571564,
0.040764570236206055,
-0.09663110226392746,
0.06649104505777359,
0.008608282543718815,
0.020549168810248375,
-0.007781573571264744,
-0.06577268987894058,
5.156289439492656e-33,
0.0214077141135931,
0.05521831288933754,
0.02501715160906315,
-0.03221500664949417,
-0.032977115362882614,
-0.13561704754829407,
0.0415203794836998,
0.02314833365380764,
-0.021164199337363243,
-0.010620634071528912,
-0.014844909310340881,
0.09111692011356354,
0.025784684345126152,
-0.09593135118484497,
0.06414171308279037,
0.0918976441025734,
-0.05290137976408005,
0.05216190591454506,
0.010585671290755272,
0.00254670693539083,
0.07332490384578705,
0.01653553545475006,
-0.039359379559755325,
-0.010367192327976227,
-0.011159896850585938,
0.007046000566333532,
-0.04040662199258804,
-0.02699466049671173,
-0.04251529648900032,
0.020833492279052734,
-0.024223387241363525,
0.007284494582563639,
0.016039270907640457,
0.007817127741873264,
-0.037690840661525726,
-0.05637814477086067,
-0.03440645709633827,
0.02372661605477333,
-0.04678596556186676,
-0.06880771368741989,
0.006904590409249067,
0.03381877765059471,
-0.018705066293478012,
-0.03309008106589317,
-0.025731032714247704,
-0.10935578495264053,
-0.07831510156393051,
0.020991820842027664,
0.08476323634386063,
0.03302439674735069,
0.01840781420469284,
0.015657728537917137,
0.010865259915590286,
-0.06602208316326141,
0.015756914392113686,
-0.002008123090490699,
0.059056539088487625,
0.046524424105882645,
0.0370272733271122,
-0.06713669747114182,
0.04621841758489609,
-0.009502645581960678,
-0.013926802203059196,
0.0943482294678688,
0.0065225353464484215,
-0.0075476644560694695,
-0.03874092921614647,
0.028379378840327263,
-0.019665835425257683,
-0.0008641764288768172,
-0.10232111066579819,
0.07424987852573395,
-0.1306837499141693,
-0.036537546664476395,
-0.02310466207563877,
-0.12677696347236633,
0.01954525336623192,
-0.011523060500621796,
-0.09263154864311218,
0.03724319860339165,
0.05119681730866432,
-0.04130714014172554,
-0.039822351187467575,
0.06455482542514801,
-0.08180343359708786,
-0.04031074419617653,
0.024397283792495728,
-0.05326560512185097,
0.01719687134027481,
-0.04595448449254036,
0.034368060529232025,
-0.05902593582868576,
-0.049666330218315125,
-0.016525495797395706,
-0.12537382543087006,
-6.648572538363842e-33,
0.14417821168899536,
0.01123688742518425,
-0.009112454950809479,
-0.025332162156701088,
0.013203741051256657,
-0.007352618500590324,
0.028183588758111,
0.07217729836702347,
-0.015280728228390217,
0.031704943627119064,
0.008960292674601078,
-0.005494898650795221,
0.08585990965366364,
0.005902931559830904,
0.03144308552145958,
-0.014329788275063038,
-0.11641118675470352,
-0.017082814127206802,
0.0077279480174183846,
0.002149708103388548,
-0.021214082837104797,
0.08014145493507385,
0.04522034525871277,
0.011417748406529427,
-0.017217984423041344,
-0.027161698788404465,
-0.03675070405006409,
0.114944688975811,
0.004210376646369696,
0.012035750783979893,
0.021440017968416214,
0.013876036740839481,
-0.053619418293237686,
-0.05053727328777313,
0.01221098005771637,
-0.05055283382534981,
-0.06687284260988235,
0.065180204808712,
-0.02135337144136429,
-0.005410847719758749,
0.012212340719997883,
0.04553801193833351,
-0.032751087099313736,
0.024416374042630196,
-0.06787238270044327,
-0.024526508525013924,
0.03077610209584236,
0.01695670373737812,
0.019867386668920517,
-0.06582669168710709,
0.0339786671102047,
-0.025333814322948456,
-0.004386496730148792,
0.040018100291490555,
-0.00025994633324444294,
0.08126208931207657,
0.11710648983716965,
-0.0032932742033153772,
-0.019743863493204117,
-0.022851986810564995,
0.022953743115067482,
-0.08374304324388504,
0.07614985853433609,
0.014208739623427391,
-0.022376224398612976,
-0.06209297478199005,
-0.08029552549123764,
0.001113736187107861,
-0.005810108035802841,
0.028541898354887962,
0.04346386715769768,
-0.06835994869470596,
-0.008302435278892517,
-0.053551044315099716,
0.018787836655974388,
-0.027882061898708344,
0.0314953587949276,
-0.0157570019364357,
0.030839107930660248,
0.01909278705716133,
-0.1192077249288559,
0.0003486543719191104,
0.027019169181585312,
0.03259632736444473,
0.002674005925655365,
-0.024515211582183838,
0.04099857062101364,
0.14200209081172943,
-0.02403288520872593,
0.06370936334133148,
0.016884058713912964,
0.01924465037882328,
-0.021010849624872208,
0.054364778101444244,
-0.02636362984776497,
-5.488622534244314e-8,
-0.04714547097682953,
-0.004861851222813129,
0.0012797339586541057,
0.11945783346891403,
0.017685256898403168,
0.025106266140937805,
-0.016986574977636337,
-0.07316979765892029,
0.023771194741129875,
-0.01602764241397381,
0.015564930625259876,
0.0499412938952446,
-0.03870956972241402,
-0.03584687039256096,
-0.027059460058808327,
-0.033703554421663284,
-0.02826424315571785,
0.09227681159973145,
-0.03918426111340523,
0.0365811325609684,
-0.06231999769806862,
-0.060598939657211304,
-0.00008755698218010366,
-0.16447417438030243,
-0.01752348244190216,
0.1140226200222969,
0.011850642040371895,
-0.01641702465713024,
-0.012566501274704933,
0.0448380671441555,
0.03442429006099701,
0.03272475302219391,
-0.010984053835272789,
0.01277604978531599,
-0.0585847869515419,
0.07650268077850342,
-0.05659880116581917,
0.08386864513158798,
0.015575475059449673,
-0.009636695496737957,
-0.01739962212741375,
0.030764609575271606,
-0.08719945698976517,
0.08662914484739304,
0.007354229222983122,
0.07192488759756088,
0.0009796692756935954,
0.03632061183452606,
0.016214225441217422,
0.01982703059911728,
-0.02734331786632538,
-0.07969126105308533,
-0.0641908124089241,
0.061547376215457916,
-0.04781181737780571,
0.04376398026943207,
-0.022747809067368507,
-0.015451583079993725,
0.03650491684675217,
-0.015676865354180336,
0.12244533747434616,
0.006847477983683348,
0.0646752119064331,
0.012226482853293419
] | 0.188276
|
be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - \*\*resourceAttributes.group\*\* (string) Group is the API Group of the Resource. "\*" means all. - \*\*resourceAttributes.labelSelector\*\* (LabelSelectorAttributes) labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. \*LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to \* ensure rawSelector and requirements are not both set \* consider the requirements field if set \* not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the \*SubjectAccessReview endpoints of the kube-apiserver: \* If rawSelector is empty and requirements are empty, the request is not limited. \* If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. \* If rawSelector is empty and requirements are present, the requirements should be honored \* If rawSelector is present and requirements are present, the request is invalid.\* - \*\*resourceAttributes.labelSelector.rawSelector\*\* (string) rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's \*SubjectAccessReview will parse the rawSelector as long as the requirements are not present. - \*\*resourceAttributes.labelSelector.requirements\*\* ([]LabelSelectorRequirement) \*Atomic: will be replaced during a merge\* requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. \*A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\* - \*\*resourceAttributes.labelSelector.requirements.key\*\* (string), required key is the label key that the selector applies to. - \*\*resourceAttributes.labelSelector.requirements.operator\*\* (string), required operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - \*\*resourceAttributes.labelSelector.requirements.values\*\* ([]string) \*Atomic: will be replaced during a merge\* values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - \*\*resourceAttributes.name\*\* (string) Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - \*\*resourceAttributes.namespace\*\* (string) Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview - \*\*resourceAttributes.resource\*\* (string) Resource is one of the existing resource types. "\*" means all. - \*\*resourceAttributes.subresource\*\* (string) Subresource is one of the existing resource types. "" means none. - \*\*resourceAttributes.verb\*\* (string) Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "\*" means all. - \*\*resourceAttributes.version\*\* (string) Version is the API Version of the Resource. "\*" means all. ## Operations {#Operations} --- ### `create` create a SelfSubjectAccessReview #### HTTP Request POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews #### Parameters - \*\*body\*\*: [}}">SelfSubjectAccessReview]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">SelfSubjectAccessReview]({{< ref )): OK
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md
|
[
-0.04976661503314972,
0.1402059942483902,
-0.07301504164934158,
0.02011493779718876,
-0.05416345223784447,
-0.004003043752163649,
0.09180755913257599,
-0.029005415737628937,
-0.0020602706354111433,
-0.08019735664129257,
0.01081493403762579,
-0.21849603950977325,
0.05124424770474434,
-0.0689181238412857,
0.05074843391776085,
0.038676656782627106,
0.028907062485814095,
-0.06468033045530319,
-0.11740129441022873,
-0.01689418964087963,
0.03269006684422493,
0.0781438946723938,
-0.048612482845783234,
-0.03714810684323311,
-0.04012642055749893,
0.04422565549612045,
-0.035053566098213196,
-0.05856072157621384,
0.06958221644163132,
0.013847221620380878,
-0.025103559717535973,
-0.06409716606140137,
-0.06176627054810524,
0.08383719623088837,
0.08680331707000732,
0.06731703877449036,
0.008829972706735134,
-0.024049168452620506,
-0.00900625716894865,
0.06389818340539932,
0.04686997830867767,
-0.0025567763950675726,
-0.09015369415283203,
0.005717024672776461,
-0.055350448936223984,
0.020636333152651787,
0.012238854542374611,
-0.1020011305809021,
-0.07164274901151657,
0.017949318513274193,
-0.06924637407064438,
-0.03690464049577713,
-0.02135472558438778,
0.009412107057869434,
0.05005794018507004,
-0.040556296706199646,
-0.07422637194395065,
0.02673359401524067,
0.013511257246136665,
0.0033039022237062454,
-0.023870524019002914,
-0.06393160670995712,
0.053576596081256866,
0.032005343586206436,
0.0030329206492751837,
-0.04690960794687271,
0.00031369514181278646,
-0.02439822070300579,
-0.014931121841073036,
-0.036764051765203476,
-0.06166481971740723,
-0.011427413672208786,
-0.0532304085791111,
0.07275564968585968,
0.012296793982386589,
0.0859106183052063,
-0.02228723280131817,
0.03452043607831001,
0.09935250133275986,
-0.13489100337028503,
0.021911926567554474,
0.01739453338086605,
-0.03490776568651199,
0.06245552748441696,
0.04049593582749367,
0.04009284824132919,
-0.06746615469455719,
-0.04810681194067001,
0.03033241629600525,
0.010902194306254387,
0.04499830678105354,
-0.1097838431596756,
-0.03574199974536896,
-0.029389578849077225,
0.09062815457582474,
0.047271087765693665,
-0.020691929385066032,
-0.046005021780729294,
-0.014033721759915352,
0.05456661060452461,
-0.021724198013544083,
-0.058138009160757065,
0.010087958537042141,
-0.029173975810408592,
-0.03667164966464043,
-0.08963404595851898,
0.028735315427184105,
-0.0034054219722747803,
0.014201221987605095,
0.01385062001645565,
-0.016586748883128166,
0.0627942606806755,
-0.03051920235157013,
-0.02828643098473549,
0.002700098557397723,
0.042954009026288986,
0.07329218089580536,
-0.07058688998222351,
0.03876790404319763,
-0.009748592041432858,
-0.019925963133573532,
-0.01725776121020317,
0.0010462714126333594,
0.0410565547645092,
-0.004066347144544125,
0.013699721544981003,
-0.008031370118260384,
7.400174075388012e-33,
0.06295296549797058,
-0.023196786642074585,
0.019315671175718307,
-0.06532517075538635,
-0.06732029467821121,
0.0007798864971846342,
-0.029542507603764534,
0.037357356399297714,
0.00514367176219821,
0.025288430973887444,
0.02410394512116909,
0.04620983824133873,
-0.007106286473572254,
-0.04276448115706444,
0.060804445296525955,
0.07392721623182297,
0.0002625156193971634,
0.059536781162023544,
0.0036577261053025723,
-0.05100470408797264,
0.006224951706826687,
-0.048645827919244766,
-0.04196510091423988,
0.06387051939964294,
-0.02385125868022442,
-0.05053409934043884,
-0.073140949010849,
-0.037625715136528015,
-0.04139348119497299,
0.028135016560554504,
-0.023776289075613022,
-0.06076209992170334,
0.0753297507762909,
0.014419050887227058,
-0.015264681540429592,
0.04742719233036041,
-0.04405868425965309,
0.008203336969017982,
-0.05443261191248894,
-0.019687719643115997,
-0.08561667799949646,
0.005075106862932444,
0.026163214817643166,
-0.030039193108677864,
0.003328086109831929,
-0.08480869978666306,
-0.03809354454278946,
-0.01682170294225216,
-0.00407452741637826,
-0.015785515308380127,
-0.09674982726573944,
-0.0031751757487654686,
0.08847412467002869,
-0.028110163286328316,
0.05736398324370384,
0.00022509988048113883,
0.08274228125810623,
0.054962169378995895,
-0.03243953362107277,
-0.005812446121126413,
-0.05349160358309746,
0.04408765211701393,
0.017602410167455673,
-0.0035642399452626705,
0.054643794894218445,
0.03390849381685257,
0.004816069267690182,
0.0594458281993866,
-0.009929853491485119,
-0.05966029316186905,
0.00732662295922637,
0.03618677705526352,
0.0077711972407996655,
-0.009557201527059078,
-0.01176817063242197,
-0.057766273617744446,
0.033003419637680054,
0.00738853495568037,
-0.05202161520719528,
0.005513319279998541,
-0.012605099938809872,
-0.02153097465634346,
0.031056104227900505,
0.04513246938586235,
-0.03094402141869068,
0.02546979859471321,
0.021835651248693466,
-0.03274988755583763,
-0.030024513602256775,
0.06096600368618965,
0.05327503755688667,
-0.0026490127202123404,
-0.1563684046268463,
-0.0401039682328701,
-0.05707601085305214,
-8.56768314614837e-33,
0.07553442567586899,
0.039619315415620804,
-0.01467386819422245,
-0.07589272409677505,
0.02556254155933857,
-0.04206923395395279,
0.08767572045326233,
-0.002484508091583848,
0.03619571402668953,
-0.05333120748400688,
0.024551626294851303,
-0.01747155748307705,
0.021418556571006775,
-0.018162686377763748,
0.047203343361616135,
0.049046192318201065,
-0.1354658156633377,
-0.03411485254764557,
0.08067391067743301,
0.08925056457519531,
0.027173714712262154,
0.08173295855522156,
-0.009863325394690037,
0.05593916401267052,
0.01192557904869318,
-0.023506417870521545,
-0.02009352296590805,
0.049630049616098404,
-0.012556166388094425,
0.0033185495994985104,
0.020898567512631416,
-0.10782323777675629,
-0.021275801584124565,
0.03709855675697327,
-0.057999059557914734,
-0.10392783582210541,
-0.0013700202107429504,
0.07492198795080185,
0.00013948818377684802,
0.018261615186929703,
0.0348518081009388,
-0.0017973282374441624,
-0.07035744935274124,
0.05835737660527229,
-0.04708355665206909,
-0.020008014515042305,
0.0075851306319236755,
-0.05236804485321045,
-0.05216187238693237,
-0.05186329782009125,
0.023148369044065475,
-0.009019903838634491,
-0.043298933655023575,
0.11697591096162796,
-0.053025878965854645,
0.077043317258358,
0.018348529934883118,
0.01743985339999199,
-0.030107172206044197,
-0.04131027311086655,
-0.06795281171798706,
0.0562860481441021,
0.04500197619199753,
0.041466061025857925,
0.03310259431600571,
-0.05045190453529358,
-0.032549381256103516,
0.0069279782474040985,
-0.034510329365730286,
-0.04388922452926636,
0.044203490018844604,
-0.049410730600357056,
-0.012025579810142517,
-0.0036448403261601925,
-0.024957692250609398,
0.014765200205147266,
0.0009139801259152591,
-0.0003574216680135578,
0.03652500733733177,
0.0837143287062645,
-0.07928045094013214,
0.07015378773212433,
0.006931617856025696,
0.10709226131439209,
0.02353905886411667,
0.012202499434351921,
0.0011747179087251425,
0.06075645983219147,
-0.020318545401096344,
0.01278755534440279,
0.03206459805369377,
-0.0270418468862772,
-0.06642774492502213,
0.10155310481786728,
-0.042073506861925125,
-5.9047078337925996e-8,
-0.07588981837034225,
0.018653512001037598,
-0.05047300457954407,
0.040316689759492874,
0.08569559454917908,
-0.01668984442949295,
-0.017538512125611305,
0.0009996339213103056,
-0.06526454538106918,
0.06913924962282181,
0.06867560744285583,
0.023240085691213608,
-0.039136677980422974,
-0.03711946681141853,
-0.008178647607564926,
-0.05365854501724243,
-0.02364421635866165,
0.0064598689787089825,
-0.007637550123035908,
-0.0011714809807017446,
-0.010521311312913895,
-0.09429049491882324,
0.002859166357666254,
-0.05863126367330551,
0.11056247353553772,
0.06316563487052917,
-0.0032184908632189035,
0.02013918198645115,
0.06225891783833504,
0.06166500970721245,
-0.0033728163689374924,
0.009397599846124649,
-0.053731951862573624,
0.08198998123407364,
-0.0416586697101593,
0.032504770904779434,
-0.11373906582593918,
-0.031699955463409424,
-0.02082439884543419,
0.11422427743673325,
0.022072676569223404,
0.0398845411837101,
-0.013252819888293743,
0.04726448282599449,
0.07828009873628616,
0.07408837974071503,
0.007035740185528994,
0.018269527703523636,
0.09979753196239471,
-0.027693089097738266,
-0.06609770655632019,
-0.08293987065553665,
0.015832675620913506,
0.11619509756565094,
-0.057869575917720795,
-0.05905024707317352,
0.04301823303103447,
0.010728620924055576,
0.006045293994247913,
0.04889945313334465,
0.055936235934495926,
0.019314583390951157,
0.015403595753014088,
0.023779582232236862
] | 0.137169
|
Request POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews #### Parameters - \*\*body\*\*: [}}">SelfSubjectAccessReview]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">SelfSubjectAccessReview]({{< ref )): OK 201 ([}}">SelfSubjectAccessReview]({{< ref )): Created 202 ([}}">SelfSubjectAccessReview]({{< ref )): Accepted 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md
|
[
-0.03929661214351654,
0.11231058090925217,
0.020792612805962563,
0.022679084911942482,
-0.05807118862867355,
-0.009448004886507988,
0.027574801817536354,
0.03646878898143768,
0.008871118538081646,
0.003604364348575473,
-0.06427793949842453,
-0.11424065381288528,
0.04213147610425949,
0.01852334663271904,
0.04787610471248627,
0.06667104363441467,
0.03395251929759979,
-0.04875383898615837,
-0.12924830615520477,
0.002786383731290698,
0.09637925028800964,
0.04880945757031441,
-0.024369869381189346,
0.019152220338582993,
-0.08171292394399643,
-0.034572847187519073,
-0.0829697921872139,
0.014834453351795673,
0.0032296031713485718,
0.026811499148607254,
-0.018505487591028214,
-0.01857307367026806,
-0.08451273292303085,
0.031567562371492386,
0.07620859146118164,
0.04997117444872856,
0.055736806243658066,
-0.013906793668866158,
-0.021346665918827057,
0.0020444346591830254,
-0.01428122166544199,
0.011793137528002262,
-0.057900529354810715,
0.0032787006348371506,
0.04561688378453255,
0.007935629226267338,
0.043121594935655594,
-0.0433109849691391,
-0.07060050219297409,
-0.020697901025414467,
-0.06914876401424408,
-0.004465984646230936,
0.0009435191168449819,
0.04525104910135269,
0.03698894754052162,
0.04213523864746094,
-0.10711514949798584,
0.008167216554284096,
0.018674436956644058,
0.00015127487131394446,
0.04754852131009102,
-0.1068359985947609,
0.07160033285617828,
0.0034496192820370197,
-0.054987065494060516,
-0.016422707587480545,
-0.013398207724094391,
0.0005436932551674545,
0.050261907279491425,
-0.12159834802150726,
0.01331932470202446,
-0.0201564934104681,
-0.10433779656887054,
0.07118117064237595,
0.06570431590080261,
0.15090037882328033,
-0.11398869007825851,
-0.0040454077534377575,
-0.0051805321127176285,
-0.0899372324347496,
0.03882969543337822,
-0.02171463705599308,
-0.04429003223776817,
0.04464682564139366,
-0.005837602540850639,
-0.013077332638204098,
-0.03489234298467636,
-0.040450338274240494,
0.04957244172692299,
0.07278526574373245,
0.03388342261314392,
-0.06121257692575455,
0.0011326209641993046,
-0.02083415910601616,
0.021843433380126953,
0.03296036645770073,
-0.0903753787279129,
-0.09098134934902191,
-0.009227322414517403,
0.048046477138996124,
0.021931901574134827,
0.005346931051462889,
-0.024797135964035988,
-0.00844465009868145,
0.03619770705699921,
-0.03319317474961281,
0.024107815697789192,
0.04299021139740944,
-0.045219551771879196,
0.055114466696977615,
-0.006582244765013456,
0.06836953014135361,
-0.05312567204236984,
-0.010998757556080818,
0.03166939690709114,
0.08953296393156052,
0.030037714168429375,
-0.059234801679849625,
-0.02092352695763111,
-0.019253918901085854,
0.021720902994275093,
-0.043655749410390854,
-0.024338072165846825,
0.025078678503632545,
0.04174995794892311,
-0.047150757163763046,
-0.010643096640706062,
7.479943122034812e-33,
0.1076304093003273,
0.12241701036691666,
0.04772796109318733,
-0.03881828486919403,
-0.026285259053111076,
-0.050252825021743774,
0.04607190936803818,
0.07708428055047989,
0.01204199530184269,
-0.02605452761054039,
-0.01684499904513359,
0.05410539358854294,
0.05554427206516266,
-0.12360844016075134,
0.020122390240430832,
-0.014755004085600376,
-0.0659402385354042,
0.006559946574270725,
0.02297462895512581,
0.03056940995156765,
0.04613799601793289,
0.015383925288915634,
-0.03808794915676117,
0.02291363850235939,
0.00022045579680707306,
0.01396623533219099,
-0.007124291267246008,
0.01924346759915352,
-0.018056700006127357,
0.022691775113344193,
0.02263474091887474,
-0.06100598722696304,
0.0036690474953502417,
-0.04047032445669174,
0.018879864364862442,
-0.036747097969055176,
0.010032618418335915,
0.0005502224084921181,
-0.03624408692121506,
-0.017849499359726906,
-0.03059982694685459,
-0.0025007021613419056,
0.003296282608062029,
-0.013363943435251713,
0.005784074775874615,
-0.12293691188097,
-0.052049413323402405,
-0.00188537803478539,
0.07291433960199356,
-0.02484985999763012,
-0.02462191879749298,
0.00454246299341321,
0.05161164700984955,
-0.05951070412993431,
0.05899416282773018,
0.011195831932127476,
-0.008373265154659748,
0.08472936600446701,
-0.04042132571339607,
-0.028753679245710373,
0.0028286112938076258,
0.02943326160311699,
-0.007565342355519533,
-0.026589257642626762,
0.05833001807332039,
-0.00011721211194526404,
0.01972394436597824,
-0.0040328227914869785,
-0.0010949491988867521,
-0.06287539005279541,
-0.03843394294381142,
0.04837122559547424,
-0.11413739621639252,
-0.03592364490032196,
-0.04966293275356293,
-0.08690544962882996,
0.020148903131484985,
0.014846970327198505,
-0.0516321174800396,
0.004285280127078295,
0.018646813929080963,
-0.020503628998994827,
-0.09236402064561844,
0.1433332860469818,
-0.038956720381975174,
-0.009990794584155083,
0.023923534899950027,
-0.023020125925540924,
-0.009986434131860733,
-0.027858391404151917,
0.05409784987568855,
-0.004958407022058964,
-0.017587924376130104,
-0.0630873590707779,
-0.031503885984420776,
-6.679310246269906e-33,
0.12067465484142303,
-0.07627193629741669,
-0.01975724846124649,
0.02221287041902542,
0.051793117076158524,
-0.023977434262633324,
0.02915549837052822,
0.08390600979328156,
0.05040614679455757,
-0.014654399827122688,
-0.03172485902905464,
-0.03129612281918526,
0.07055776566267014,
-0.0031509948894381523,
0.014138768427073956,
0.026849251240491867,
-0.09093644469976425,
-0.02284545637667179,
-0.011179647408425808,
0.030990850180387497,
-0.008864948526024818,
0.1151731088757515,
0.05932018905878067,
0.031729742884635925,
-0.06057017669081688,
0.016923481598496437,
-0.013256163336336613,
0.03355630487203598,
-0.03884591534733772,
0.0217275433242321,
0.05147381126880646,
-0.03998179733753204,
-0.02817150391638279,
-0.025252696126699448,
-0.013622446916997433,
-0.07075940072536469,
-0.017568424344062805,
0.05690544471144676,
0.020273316651582718,
0.06447269022464752,
0.058339256793260574,
0.01647115685045719,
-0.019676771014928818,
-0.015687251463532448,
-0.03944223001599312,
-0.07930900156497955,
-0.00924984086304903,
0.013438704423606396,
0.0158569123595953,
-0.0035602489951997995,
-0.010276374407112598,
-0.04326202720403671,
-0.04321791231632233,
0.06629452854394913,
-0.016720185056328773,
-0.04606405273079872,
0.08906804770231247,
-0.006922594737261534,
0.03456350788474083,
-0.02625233493745327,
-0.001580184092745185,
-0.03208368644118309,
0.06259455531835556,
0.018789423629641533,
0.07820107787847519,
-0.04111100360751152,
0.02000664919614792,
-0.05235239863395691,
-0.06286350637674332,
-0.06465023010969162,
0.03040783852338791,
-0.09618423134088516,
0.013428659178316593,
0.01589983142912388,
0.1276097148656845,
-0.013408711180090904,
0.013522012159228325,
0.00941261276602745,
0.027964599430561066,
0.0761532261967659,
-0.0412999726831913,
-0.026018427684903145,
0.030029235407710075,
0.04756294563412666,
-0.0049673221074044704,
-0.1260596513748169,
-0.046425770968198776,
0.08282975852489471,
-0.08036059886217117,
0.0486120879650116,
-0.00042542617302387953,
-0.02419263869524002,
0.017303599044680595,
0.04882615804672241,
-0.018215801566839218,
-5.329160757128193e-8,
-0.059287723153829575,
0.01605985313653946,
0.007285722531378269,
0.14996770024299622,
0.018250616267323494,
-0.00977321807295084,
-0.004802738316357136,
-0.002232311060652137,
0.020419618114829063,
-0.05681168660521507,
0.0172604788094759,
0.036543603986501694,
0.0036148622166365385,
-0.0769784227013588,
-0.008967353031039238,
-0.05492563918232918,
-0.04533132165670395,
0.0007037881878204644,
-0.03405872732400894,
-0.019958697259426117,
0.004922441206872463,
-0.07562203705310822,
-0.0006592452991753817,
-0.10463011264801025,
0.1149793341755867,
0.1309303343296051,
-0.003905083052814007,
-0.04034169018268585,
0.000896481447853148,
0.06031380966305733,
0.020632945001125336,
-0.018323330208659172,
0.039341360330581665,
-0.021516898646950722,
-0.07465095072984695,
0.026455802842974663,
-0.032676469534635544,
-0.004023897461593151,
-0.07570517063140869,
0.006147859152406454,
0.08004163205623627,
0.053234681487083435,
-0.09936653077602386,
0.044698525220155716,
0.09703761339187622,
-0.06675724685192108,
0.1063341572880745,
0.049328871071338654,
0.06163552403450012,
-0.0014184850733727217,
-0.05369814857840538,
-0.08631335943937302,
0.02862647920846939,
0.013073268346488476,
-0.12592428922653198,
-0.015641354024410248,
0.011998343281447887,
-0.0020787352696061134,
0.037803541868925095,
0.01579437218606472,
0.12668263912200928,
0.02250644750893116,
0.025313053280115128,
0.052451081573963165
] | 0.082687
|
`apiVersion: authorization.k8s.io/v1` `import "k8s.io/api/authorization/v1"` ## SelfSubjectRulesReview {#SelfSubjectRulesReview} SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. --- - \*\*apiVersion\*\*: authorization.k8s.io/v1 - \*\*kind\*\*: SelfSubjectRulesReview - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - \*\*spec\*\* ([}}">SelfSubjectRulesReviewSpec]({{< ref )), required Spec holds information about the request being evaluated. - \*\*status\*\* (SubjectRulesReviewStatus) Status is filled in by the server and indicates the set of actions a user can perform. \*SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.\* - \*\*status.incomplete\*\* (boolean), required Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - \*\*status.nonResourceRules\*\* ([]NonResourceRule), required \*Atomic: will be replaced during a merge\* NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. \*NonResourceRule holds information that describes a rule for the non-resource\* - \*\*status.nonResourceRules.verbs\*\* ([]string), required \*Atomic: will be replaced during a merge\* Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "\*" means all. - \*\*status.nonResourceRules.nonResourceURLs\*\* ([]string) \*Atomic: will be replaced during a merge\* NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path. "\*" means all. - \*\*status.resourceRules\*\* ([]ResourceRule), required \*Atomic: will be replaced during a merge\* ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. \*ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.\* - \*\*status.resourceRules.verbs\*\* ([]string), required \*Atomic: will be replaced during a merge\* Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "\*" means all. - \*\*status.resourceRules.apiGroups\*\* ([]string) \*Atomic: will be replaced during a merge\* APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "\*" means all. - \*\*status.resourceRules.resourceNames\*\* ([]string) \*Atomic: will be replaced during a merge\* ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "\*" means all. - \*\*status.resourceRules.resources\*\* ([]string) \*Atomic: will be replaced during a merge\* Resources is a list of resources this rule applies to. "\*" means all in the specified apiGroups. "\*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - \*\*status.evaluationError\*\* (string) EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1.md
|
[
-0.042376887053251266,
0.07055137306451797,
0.014735322445631027,
-0.025886064395308495,
-0.028458241373300552,
-0.03449054807424545,
0.043084051460027695,
-0.016447100788354874,
0.01591896452009678,
0.04008237645030022,
-0.012116078287363052,
-0.023983992636203766,
0.004223891533911228,
0.05993569269776344,
-0.022083479911088943,
-0.0077310893684625626,
0.06769055128097534,
-0.06967388093471527,
-0.07436953485012054,
0.003361024660989642,
0.03584778681397438,
0.013868400827050209,
-0.008770539425313473,
0.05763540789484978,
0.012246533297002316,
-0.019180430099368095,
-0.037091318517923355,
-0.05339450016617775,
0.0004091217997483909,
-0.020173445343971252,
0.01585676707327366,
-0.0833839550614357,
-0.029899971559643745,
-0.002364327199757099,
0.03245352581143379,
0.04630119353532791,
-0.0016859418246895075,
-0.06858673691749573,
-0.030917054042220116,
-0.0076622506603598595,
-0.024655314162373543,
0.05906836688518524,
-0.0847894698381424,
-0.006069764494895935,
-0.0445440411567688,
0.041251085698604584,
0.06897476315498352,
-0.09783464670181274,
-0.07985465973615646,
0.01908237114548683,
0.07788052409887314,
-0.007196907885372639,
-0.006783806253224611,
-0.001064368523657322,
0.02294759452342987,
-0.03014976531267166,
-0.07044325023889542,
0.06541011482477188,
0.022594325244426727,
0.0969439297914505,
0.03232419863343239,
-0.04970860108733177,
0.06549794226884842,
-0.012074828147888184,
-0.049658019095659256,
0.09199323505163193,
0.03876129537820816,
-0.07153789699077606,
0.004299976397305727,
-0.047452412545681,
0.008941097185015678,
0.001057623652741313,
-0.04103826358914375,
0.013387035578489304,
0.10239322483539581,
-0.006334936246275902,
-0.06450337916612625,
-0.008662564679980278,
-0.011135758832097054,
-0.20543652772903442,
0.008071999065577984,
0.03425120189785957,
-0.003886530641466379,
0.03754666447639465,
-0.0008816464687697589,
0.025907445698976517,
-0.030488938093185425,
-0.05076427757740021,
0.09457744657993317,
0.04348883405327797,
0.07808814197778702,
-0.05829598754644394,
0.08012161403894424,
-0.07509683817625046,
0.07008502632379532,
-0.014894352294504642,
-0.059060923755168915,
-0.004501744173467159,
-0.06526827812194824,
0.034301795065402985,
-0.021696394309401512,
-0.006658512633293867,
-0.0924038216471672,
0.05140211433172226,
0.09263977408409119,
-0.02556748501956463,
0.003356940345838666,
-0.010716761462390423,
-0.045075707137584686,
0.07912395149469376,
-0.022515058517456055,
0.016841109842061996,
-0.056138668209314346,
-0.0004550879239104688,
0.036473166197538376,
0.07151713222265244,
0.02349454164505005,
0.023754756897687912,
0.02364710532128811,
-0.04619627073407173,
0.021749544888734818,
-0.11344675719738007,
0.10066845268011093,
0.034440573304891586,
0.03355356305837631,
-0.0466645173728466,
-0.058808907866477966,
6.342760336157731e-33,
-0.03958882391452789,
0.04159458354115486,
-0.00990707240998745,
-0.026365483179688454,
0.030311809852719307,
-0.13388793170452118,
0.060336705297231674,
0.0006790750194340944,
-0.010749021545052528,
-0.036611806601285934,
0.012277184054255486,
0.1442481279373169,
0.07339000701904297,
-0.09027165919542313,
0.11214234679937363,
0.10063222795724869,
-0.015626829117536545,
0.040529727935791016,
0.05620112642645836,
0.0366215817630291,
0.06919657438993454,
-0.004322384018450975,
-0.005566130857914686,
0.0008353351731784642,
-0.020983994007110596,
-0.04062371701002121,
-0.014163564890623093,
-0.015105871483683586,
-0.027319131419062614,
0.0005115076201036572,
0.029447337612509727,
-0.007045436650514603,
-0.006695414427667856,
-0.007045469246804714,
-0.031422436237335205,
-0.06314920634031296,
-0.03132840618491173,
0.03114033304154873,
-0.010286029428243637,
-0.04489248991012573,
0.014749815687537193,
0.024225668981671333,
-0.10254894942045212,
-0.026787592098116875,
-0.013021077029407024,
-0.08351593464612961,
-0.07556714117527008,
0.020445212721824646,
0.04153260588645935,
0.0030704427044838667,
0.0018594649154692888,
0.027761809527873993,
0.07192274183034897,
-0.058264169842004776,
0.02314434014260769,
-0.020452022552490234,
0.05281341075897217,
0.00268166814930737,
0.009448034688830376,
-0.07380528748035431,
0.08332719653844833,
0.0038332815747708082,
0.04199583828449249,
0.05606584995985031,
-0.04058824107050896,
-0.02884245663881302,
-0.06863385438919067,
0.012212044559419155,
0.001023799879476428,
-0.05540115386247635,
-0.09792376309633255,
0.08093909174203873,
-0.06878822296857834,
-0.051626794040203094,
-0.0632183849811554,
-0.07618381083011627,
0.04445819556713104,
0.023338165134191513,
-0.022654280066490173,
0.017068946734070778,
0.08364729583263397,
-0.04169424623250961,
-0.004839729052037001,
0.06047610193490982,
-0.054128535091876984,
-0.08220086991786957,
-0.008890544064342976,
-0.049672383815050125,
0.026638491079211235,
0.013009889982640743,
0.03942010924220085,
-0.03748907148838043,
0.009270128794014454,
-0.009377802722156048,
-0.11729147285223007,
-6.756272065470149e-33,
0.10255856066942215,
-0.03431622311472893,
0.022183770313858986,
-0.050856705754995346,
0.0012647908879444003,
0.018988681957125664,
-0.039662204682826996,
0.08937232196331024,
0.014444621279835701,
-0.028407936915755272,
-0.015689345076680183,
0.016688484698534012,
0.044105179607868195,
0.048307955265045166,
0.009843004867434502,
-0.00273539568297565,
-0.07743965089321136,
-0.021250518038868904,
-0.02311331406235695,
-0.05138886719942093,
-0.07076786458492279,
0.12663684785366058,
0.07124965637922287,
0.04911145195364952,
-0.022544583305716515,
0.032169368118047714,
-0.06749891489744186,
0.10840529948472977,
0.039180804044008255,
-0.036141373217105865,
-0.019225452095270157,
-0.030734099447727203,
-0.0353594645857811,
-0.10445071011781693,
-0.007719065062701702,
-0.026946377009153366,
-0.03253582492470741,
0.07654814422130585,
-0.037586335092782974,
0.023249752819538116,
0.022400718182325363,
0.02070024609565735,
-0.0032879842910915613,
0.04897104203701019,
-0.03490666672587395,
-0.02290494740009308,
0.013663671910762787,
0.02596784569323063,
-0.04848174750804901,
-0.01622750423848629,
0.020658602938055992,
-0.019679758697748184,
0.028495104983448982,
0.06311407685279846,
-0.016022492200136185,
0.0599551759660244,
0.12732583284378052,
-0.016384437680244446,
0.0554753802716732,
-0.023131266236305237,
0.051745567470788956,
-0.09192756563425064,
0.03804349899291992,
0.05475427582859993,
-0.08412092924118042,
-0.0389665886759758,
-0.05386913940310478,
0.009547553025186062,
0.043686456978321075,
0.04268333688378334,
0.05878286436200142,
-0.11150205135345459,
-0.051873818039894104,
-0.04106415435671806,
0.053143300116062164,
-0.02613896131515503,
0.06625237315893173,
-0.044254641979932785,
-0.000145171390613541,
0.03777647018432617,
-0.08032796531915665,
-0.00051989930216223,
0.013723840937018394,
0.020042164251208305,
0.014492583461105824,
-0.07211818546056747,
0.01268670056015253,
0.09546923637390137,
0.012334614060819149,
0.08988406509160995,
-0.005418507847934961,
-0.021188225597143173,
-0.03480091691017151,
0.05422106385231018,
0.005856826901435852,
-5.3338478522846344e-8,
-0.012739643454551697,
-0.034398749470710754,
0.033946599811315536,
0.14189322292804718,
0.03271427005529404,
0.017497319728136063,
-0.039194948971271515,
0.001711428863927722,
0.0021337249781936407,
-0.07732980698347092,
0.053826168179512024,
0.03318209946155548,
-0.04736661538481712,
-0.07556930184364319,
-0.05886315181851387,
0.013287805952131748,
-0.024357158690690994,
0.03895590081810951,
-0.03079024702310562,
0.029740745201706886,
-0.07269614189863205,
-0.06131570786237717,
0.03343087062239647,
-0.11978575587272644,
-0.04162184149026871,
0.06116170436143875,
0.01891074888408184,
-0.006813495885580778,
-0.07073213160037994,
0.015124893747270107,
-0.028363097459077835,
0.02803649939596653,
0.051161181181669235,
0.02870408073067665,
-0.06397252529859543,
0.02027539350092411,
-0.07214944809675217,
0.03257400915026665,
-0.031700536608695984,
0.0018285918049514294,
-0.008399121463298798,
0.020603466778993607,
-0.03146402910351753,
0.09981411695480347,
-0.006177733652293682,
0.0369584821164608,
0.017047297209501266,
0.000739288458134979,
0.04415373504161835,
-0.018077652901411057,
-0.029550917446613312,
-0.05316624417901039,
-0.07089675217866898,
0.10916602611541748,
-0.016322597861289978,
0.010108903050422668,
-0.018559452146291733,
-0.022063633427023888,
0.04042516276240349,
0.05264243856072426,
0.08956428617238998,
0.03987252712249756,
0.030703265219926834,
-0.03495575860142708
] | 0.136534
|
rule applies to. "\*" means all in the specified apiGroups. "\*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - \*\*status.evaluationError\*\* (string) EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. ## SelfSubjectRulesReviewSpec {#SelfSubjectRulesReviewSpec} SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. --- - \*\*namespace\*\* (string) Namespace to evaluate rules for. Required. ## Operations {#Operations} --- ### `create` create a SelfSubjectRulesReview #### HTTP Request POST /apis/authorization.k8s.io/v1/selfsubjectrulesreviews #### Parameters - \*\*body\*\*: [}}">SelfSubjectRulesReview]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">SelfSubjectRulesReview]({{< ref )): OK 201 ([}}">SelfSubjectRulesReview]({{< ref )): Created 202 ([}}">SelfSubjectRulesReview]({{< ref )): Accepted 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1.md
|
[
-0.09538159519433975,
0.03574143722653389,
-0.010072296485304832,
0.000553666555788368,
-0.026877157390117645,
-0.0389610230922699,
0.04272188991308212,
0.0010672459611669183,
-0.03375901281833649,
-0.0002847611322067678,
-0.03843720257282257,
-0.11298403143882751,
0.06370769441127777,
0.0650588646531105,
0.030851220712065697,
0.03486711531877518,
-0.012806426733732224,
-0.0886758416891098,
-0.12907415628433228,
0.002284025540575385,
0.1168026477098465,
0.11910086870193481,
-0.043694380670785904,
-0.04538734257221222,
-0.010221592150628567,
0.011044078506529331,
-0.10248953104019165,
-0.07494105398654938,
0.04723195731639862,
-0.011803544126451015,
0.03201856091618538,
-0.06534922868013382,
-0.037375714629888535,
0.031224213540554047,
0.1281196027994156,
0.05960410088300705,
0.066670723259449,
-0.12698522210121155,
-0.009241746738553047,
0.04539192095398903,
0.01720074564218521,
0.04144379869103432,
-0.10911881178617477,
0.009155930951237679,
-0.0364467054605484,
0.03916105628013611,
0.00808022078126669,
-0.06013702601194382,
-0.08500302582979202,
-0.0038900948129594326,
-0.005772729404270649,
-0.054905131459236145,
0.011482760310173035,
0.03191681578755379,
0.07797115296125412,
0.022988751530647278,
-0.06016647070646286,
0.05374623462557793,
0.032388947904109955,
-0.015970000997185707,
0.0999194011092186,
-0.07907672971487045,
0.027940981090068817,
-0.0355338528752327,
-0.0382532961666584,
-0.006849481258541346,
-0.04597732797265053,
-0.052845846861600876,
-0.000413899018894881,
-0.05115072801709175,
-0.03787025064229965,
0.018312685191631317,
-0.032702356576919556,
0.11257826536893845,
0.07398659735918045,
0.03906358405947685,
0.01922788843512535,
0.015675170347094536,
0.034858930855989456,
-0.1879284679889679,
-0.009903890080749989,
-0.028861263766884804,
-0.005967968143522739,
0.053726259618997574,
0.04304128512740135,
0.028852973133325577,
-0.013584641739726067,
-0.03892245143651962,
0.025523027405142784,
0.0887986496090889,
0.03304053470492363,
-0.06261847168207169,
-0.006446859333664179,
-0.04129372537136078,
0.0015686778351664543,
-0.015284447930753231,
-0.10366152226924896,
-0.05703519657254219,
-0.04304893687367439,
0.07707063108682632,
-0.055852070450782776,
-0.02885817550122738,
-0.021532343700528145,
0.029305152595043182,
0.06488203257322311,
-0.031037557870149612,
-0.007900937460362911,
0.04466746374964714,
0.003082781098783016,
0.05988386645913124,
-0.027785655111074448,
0.04564031958580017,
-0.0379195511341095,
-0.04201576113700867,
0.02721068263053894,
0.016480309888720512,
0.052127763628959656,
0.01847049593925476,
0.039799127727746964,
-0.03776322305202484,
0.030741011723876,
-0.09724205732345581,
0.07675274461507797,
0.011836378835141659,
0.06237823888659477,
-0.04869919642806053,
-0.09851764142513275,
8.33105980674769e-33,
0.016605956479907036,
0.02682040072977543,
-0.01832202635705471,
-0.03293253108859062,
0.0014584334567189217,
-0.09190960228443146,
0.0033687232062220573,
0.05211128294467926,
-0.01485389657318592,
-0.04076048731803894,
0.008229312486946583,
0.013665087521076202,
0.021816829219460487,
-0.052578430622816086,
0.019300276413559914,
0.030965087935328484,
0.004870841279625893,
0.03373946622014046,
-0.016168363392353058,
0.015569773502647877,
0.029945271089673042,
-0.0017930855974555016,
-0.023266667500138283,
0.012973515316843987,
-0.07418228685855865,
-0.006783235352486372,
0.0367446169257164,
-0.07666482031345367,
0.005978960078209639,
0.021317649632692337,
0.020408092066645622,
-0.030722444877028465,
0.0454874262213707,
-0.028991803526878357,
-0.0025854443665593863,
0.006899935659021139,
0.01747230254113674,
0.012937142513692379,
-0.03493519127368927,
-0.028355583548545837,
-0.09431125223636627,
0.015023215673863888,
-0.0651610791683197,
-0.025736037641763687,
-0.015999961644411087,
-0.06449601799249649,
-0.026870544999837875,
0.015621774829924107,
0.05740482732653618,
-0.05141158401966095,
-0.017976634204387665,
0.033381521701812744,
0.11641500890254974,
-0.07655019313097,
0.014799349009990692,
-0.019233612343668938,
-0.04730428755283356,
0.08561450242996216,
0.03593889996409416,
-0.034268200397491455,
0.06439127027988434,
0.07170213013887405,
-0.017311424016952515,
0.0489300973713398,
-0.01837715320289135,
0.008746509440243244,
-0.00711443368345499,
0.024260254576802254,
0.007305957842618227,
-0.03766050934791565,
-0.05583607777953148,
0.07630470395088196,
-0.048981040716171265,
0.03376088663935661,
-0.03885532543063164,
-0.1100090816617012,
0.07668652385473251,
0.046447914093732834,
-0.03756014257669449,
-0.033306535333395004,
-0.0009945022175088525,
0.01940533146262169,
0.04217234626412392,
0.020086752250790596,
-0.06633902341127396,
-0.013669108040630817,
0.05091632530093193,
-0.05523335933685303,
-0.03922843188047409,
-0.04956664890050888,
0.04570508003234863,
-0.05237984284758568,
-0.09483646601438522,
-0.056153036653995514,
-0.08569025248289108,
-8.977971082203658e-33,
0.09390133619308472,
-0.0006016861880198121,
-0.06879175454378128,
-0.06753174215555191,
0.0053543089888989925,
-0.051306504756212234,
-0.001136411214247346,
0.054645102471113205,
0.07755065709352493,
-0.021900124847888947,
-0.015038318932056427,
0.023699229583144188,
0.0492544062435627,
0.020617779344320297,
-0.023267392069101334,
-0.05236457288265228,
-0.13328613340854645,
-0.09072577208280563,
0.010456551797688007,
0.030694717541337013,
-0.018015913665294647,
0.09869305789470673,
0.013422817923128605,
0.02378687635064125,
-0.045405853539705276,
0.02557774819433689,
-0.06414618343114853,
0.06035314127802849,
0.011630203574895859,
0.0010596512584015727,
0.04640134051442146,
-0.02606828883290291,
-0.017209354788064957,
-0.03587657958269119,
0.0003692427126225084,
-0.08830426633358002,
-0.08855865895748138,
0.01924753747880459,
-0.0009286767453886569,
-0.009599884040653706,
0.02196715772151947,
0.028973503038287163,
0.017324963584542274,
0.019649090245366096,
0.004587921779602766,
-0.04822074994444847,
0.06536215543746948,
0.007363299839198589,
-0.048195015639066696,
-0.014164673164486885,
0.028092632070183754,
-0.0333230160176754,
-0.02687346562743187,
0.06542780995368958,
-0.0486416257917881,
0.06680543720722198,
0.06083142012357712,
-0.01000437792390585,
-0.005722288973629475,
0.015230984427034855,
-0.008038459345698357,
-0.007239608559757471,
0.04996279254555702,
0.03542095050215721,
-0.016810841858386993,
-0.043993029743433,
-0.007941924035549164,
-0.027968885377049446,
0.07050315290689468,
-0.03696371987462044,
-0.0446038693189621,
-0.03843268007040024,
-0.018669772893190384,
-0.01786011829972267,
0.044220056384801865,
0.009285594336688519,
0.041809067130088806,
-0.016356363892555237,
0.03634589910507202,
0.08540643751621246,
-0.1690189242362976,
0.02799185737967491,
-0.0008096825331449509,
0.10310986638069153,
0.07750251144170761,
-0.02642284706234932,
0.018364114686846733,
0.10104407370090485,
-0.032569970935583115,
0.05159027501940727,
0.01858513429760933,
-0.013613741844892502,
0.062146008014678955,
0.05416559427976608,
-0.017090026289224625,
-5.592356799866138e-8,
-0.061971038579940796,
0.018668193370103836,
0.0029756708536297083,
0.0879029706120491,
0.02956903725862503,
0.014915178529918194,
0.025573275983333588,
-0.08152460306882858,
0.0016070532146841288,
-0.042639221996068954,
-0.03982825577259064,
0.04555715247988701,
-0.0695287436246872,
-0.0753929540514946,
-0.05670818313956261,
-0.02367890253663063,
-0.01168369222432375,
0.07512073963880539,
-0.046711526811122894,
0.014851873740553856,
-0.03937912359833717,
-0.09293083846569061,
0.018235187977552414,
-0.1183449923992157,
0.027357779443264008,
0.056605588644742966,
0.029489370062947273,
-0.02618199773132801,
-0.10988209396600723,
0.01800144836306572,
0.013362704776227474,
0.037541914731264114,
-0.001472349395044148,
-0.03165784105658531,
-0.0244542695581913,
0.06501748412847519,
-0.022912470623850822,
0.05775773525238037,
-0.00005002026955480687,
0.056787729263305664,
0.05852155759930611,
0.039341043680906296,
0.03107326477766037,
0.09043852239847183,
0.03197748586535454,
0.029783576726913452,
-0.04624798148870468,
0.021998796612024307,
0.03369486331939697,
-0.015888217836618423,
0.036948662251234055,
-0.05980093777179718,
-0.049763273447752,
0.05525501072406769,
-0.036965567618608475,
0.015726212412118912,
-0.006791331805288792,
-0.022818738594651222,
-0.0022036214359104633,
0.032353829592466354,
0.124585822224617,
0.06549659371376038,
0.0780884250998497,
0.006600731983780861
] | 0.125224
|
`apiVersion: authorization.k8s.io/v1` `import "k8s.io/api/authorization/v1"` ## LocalSubjectAccessReview {#LocalSubjectAccessReview} LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. --- - \*\*apiVersion\*\*: authorization.k8s.io/v1 - \*\*kind\*\*: LocalSubjectAccessReview - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - \*\*spec\*\* ([}}">SubjectAccessReviewSpec]({{< ref )), required Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted. - \*\*status\*\* ([}}">SubjectAccessReviewStatus]({{< ref )) Status is filled in by the server and indicates whether the request is allowed or not ## Operations {#Operations} --- ### `create` create a LocalSubjectAccessReview #### HTTP Request POST /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">LocalSubjectAccessReview]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">LocalSubjectAccessReview]({{< ref )): OK 201 ([}}">LocalSubjectAccessReview]({{< ref )): Created 202 ([}}">LocalSubjectAccessReview]({{< ref )): Accepted 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/local-subject-access-review-v1.md
|
[
-0.04669966548681259,
0.05537353456020355,
-0.023913519456982613,
0.017959123477339745,
0.009790915995836258,
-0.03145366907119751,
0.04081312566995621,
-0.039167098701000214,
0.019806021824479103,
0.03509435057640076,
-0.01806342415511608,
-0.09130677580833435,
0.014650914818048477,
0.055682212114334106,
0.03510626032948494,
0.03872518241405487,
0.029180405661463737,
-0.05196226015686989,
-0.06169712170958519,
0.014600399881601334,
0.10452774167060852,
0.008855256251990795,
0.0007950602448545396,
-0.012029316276311874,
0.006659036036580801,
-0.00898459181189537,
-0.06327415257692337,
0.003171023214235902,
0.06118675693869591,
-0.0033279084600508213,
0.005634336266666651,
0.009947516024112701,
-0.06596266478300095,
0.009134341031312943,
0.07100435346364975,
0.1324043571949005,
-0.0016054456355050206,
-0.05281204357743263,
-0.05687108635902405,
0.026248125359416008,
0.03141375258564949,
0.07521364092826843,
-0.07472243905067444,
-0.08033714443445206,
-0.059621069580316544,
-0.0032992458436638117,
0.050442904233932495,
-0.09613709896802902,
-0.08666007220745087,
-0.001430934527888894,
0.060305479913949966,
-0.08872974663972855,
0.022455401718616486,
0.014173934236168861,
0.0053003267385065556,
-0.06536392122507095,
-0.04370453581213951,
0.03426751866936684,
0.05899414047598839,
-0.010358959436416626,
0.02206655777990818,
-0.06707266718149185,
0.03648179769515991,
-0.026463299989700317,
-0.04999309405684471,
0.045307356864213943,
-0.046312116086483,
-0.03116494230926037,
0.028826164081692696,
-0.06046563386917114,
-0.027018213644623756,
-0.008414692245423794,
-0.04674101248383522,
0.06551773846149445,
0.08985811471939087,
0.0107352826744318,
-0.02704460360109806,
0.02742050774395466,
0.06040585786104202,
-0.20459802448749542,
0.03251386061310768,
0.045740511268377304,
-0.038649462163448334,
0.01471942849457264,
0.013508399948477745,
0.06710899621248245,
-0.07941199094057083,
-0.018895598128437996,
0.055920496582984924,
-0.0118243508040905,
0.031367432326078415,
-0.041515689343214035,
0.06737899780273438,
-0.07478989660739899,
0.12094750255346298,
-0.04892180114984512,
-0.06957320123910904,
0.0015062037855386734,
-0.046353135257959366,
0.04855334758758545,
-0.030042240396142006,
-0.006550536025315523,
-0.06633517146110535,
0.0470551997423172,
0.07958303391933441,
-0.04481954127550125,
0.004734104033559561,
-0.0441657230257988,
-0.07808873802423477,
0.080558642745018,
-0.038952313363552094,
0.09751377999782562,
-0.046170178800821304,
-0.039756890386343,
0.06208806857466698,
-0.0069688293151557446,
0.05266537144780159,
-0.06484059989452362,
0.06425737589597702,
-0.019138237461447716,
0.041776999831199646,
-0.129477858543396,
0.03383626416325569,
0.001429709722287953,
0.06391976028680801,
0.008020141161978245,
-0.06259212642908096,
4.407913532435539e-33,
0.030225826427340508,
0.02509705163538456,
-0.011961768381297588,
0.029982898384332657,
0.015379808843135834,
-0.10229220986366272,
0.021785961464047432,
0.0058168149553239346,
-0.03649526089429855,
-0.05387474223971367,
-0.026331642642617226,
0.11905398964881897,
0.01667233370244503,
-0.12027910351753235,
0.08754046261310577,
0.0981065034866333,
0.0014049358433112502,
0.0477321557700634,
0.06323598325252533,
0.05908198654651642,
0.02099565975368023,
-0.032782092690467834,
-0.024246186017990112,
0.04395075887441635,
0.004577277693897486,
-0.03580455854535103,
-0.03664618730545044,
-0.061415646225214005,
-0.02050865814089775,
-0.002303972840309143,
-0.003260088386014104,
-0.028773844242095947,
0.016312336549162865,
0.014806447550654411,
-0.03451887518167496,
-0.013376315124332905,
-0.040512874722480774,
0.03205561637878418,
-0.05440328270196915,
-0.0232022013515234,
0.040668100118637085,
0.026148861274123192,
-0.04147348925471306,
-0.013514231890439987,
-0.0027297288179397583,
-0.07593922317028046,
-0.06145496666431427,
-0.027498239651322365,
0.11725416034460068,
0.05034239962697029,
0.014332364313304424,
0.01414538361132145,
0.009602316655218601,
-0.05083170533180237,
0.050436537712812424,
0.0035770696122199297,
0.03359174728393555,
0.019855670630931854,
-0.006324689369648695,
-0.08656778931617737,
0.053250934928655624,
-0.010279901325702667,
0.023411259055137634,
0.10767150670289993,
0.020176436752080917,
-0.017504246905446053,
-0.02857760712504387,
0.031039664521813393,
-0.021639466285705566,
-0.05393349379301071,
-0.05673494189977646,
0.06915663182735443,
-0.050447095185518265,
0.024161512032151222,
-0.02830551005899906,
-0.12624861299991608,
0.013981914147734642,
0.014552584849298,
-0.04642471298575401,
0.014614354819059372,
0.07649987190961838,
-0.0936003252863884,
-0.07509157806634903,
0.05801500380039215,
-0.09821555018424988,
-0.07332964241504669,
0.011752631515264511,
-0.05936422571539879,
0.01549045741558075,
-0.08304178714752197,
0.00570698780938983,
-0.06311150640249252,
-0.053422581404447556,
-0.030521463602781296,
-0.11738045513629913,
-6.721151233003456e-33,
0.1562194526195526,
-0.040353141725063324,
0.042892299592494965,
0.010500796139240265,
-0.059636861085891724,
0.03706664964556694,
0.004411121364682913,
-0.008163253776729107,
0.003711443394422531,
0.04055454209446907,
0.0005818016361445189,
-0.014695417135953903,
0.07510527968406677,
0.004540897905826569,
0.0728364810347557,
0.024186599999666214,
-0.1061520203948021,
-0.0031246442813426256,
0.05654453486204147,
-0.008387229405343533,
0.02161986008286476,
0.044291622936725616,
0.03416559845209122,
0.06326809525489807,
-0.018968096002936363,
-0.02145221456885338,
-0.08593892306089401,
0.03740617260336876,
-0.01564926840364933,
0.006857851054519415,
-0.014101753942668438,
-0.03873128443956375,
-0.05897312983870506,
-0.056626737117767334,
-0.05127909407019615,
-0.09469851851463318,
-0.016749169677495956,
0.11380898952484131,
-0.04155990853905678,
-0.00391502445563674,
0.046114206314086914,
0.024896083399653435,
-0.005869004875421524,
0.034857798367738724,
-0.09192895144224167,
-0.021468501538038254,
0.0601455420255661,
-0.004738518502563238,
-0.014730374328792095,
-0.07248962670564651,
0.06528788805007935,
-0.030030714347958565,
-0.03190505504608154,
0.026714446023106575,
-0.009646995924413204,
0.10008333623409271,
0.10283398628234863,
-0.021942980587482452,
0.029308928176760674,
-0.04008173942565918,
0.03725823760032654,
-0.11162163317203522,
-0.01388987060636282,
0.036738526076078415,
-0.06482821702957153,
0.007293418515473604,
-0.03407728299498558,
0.0017337662866339087,
-0.003235801123082638,
0.03604386746883392,
0.019015081226825714,
-0.08323311060667038,
-0.013645804487168789,
-0.03602135553956032,
-0.007175043690949678,
0.03801572695374489,
0.09106145054101944,
-0.05338054522871971,
0.04162192717194557,
0.027214162051677704,
-0.07661861926317215,
-0.006559362635016441,
0.008648740127682686,
0.011272391304373741,
0.02986757457256317,
-0.0011564763262867928,
0.01919049397110939,
0.07753043621778488,
-0.030153635889291763,
0.00456708949059248,
0.01019212231040001,
-0.01908368244767189,
-0.014698326587677002,
-0.01103708054870367,
-0.003164340043440461,
-5.390484858480704e-8,
-0.029789891093969345,
0.02331162616610527,
-0.06611818820238113,
0.05655636638402939,
-0.030551694333553314,
-0.03470809385180473,
-0.001362245762720704,
-0.018819112330675125,
0.056468985974788666,
0.016751855611801147,
0.04716309532523155,
0.06789378076791763,
0.001987241441383958,
-0.06289525330066681,
0.0034380410797894,
-0.003130763303488493,
0.0010942750377580523,
0.06001868098974228,
-0.02184719778597355,
0.06594691425561905,
-0.04016778990626335,
-0.033768195658922195,
0.004144500475376844,
-0.13177891075611115,
0.009860171936452389,
0.07541416585445404,
0.0005022824043408036,
0.05424899980425835,
0.03675621747970581,
0.029577024281024933,
-0.009782209992408752,
0.0326724573969841,
-0.04041542857885361,
0.04773888364434242,
-0.0649770200252533,
0.0018602716736495495,
-0.08622057735919952,
0.037257835268974304,
0.025941701605916023,
-0.00554810743778944,
0.003938256297260523,
-0.017513034865260124,
-0.06375833600759506,
0.06505738198757172,
0.0017840852960944176,
0.09812621772289276,
0.006631525699049234,
0.015353702940046787,
0.03522708639502525,
0.027746930718421936,
-0.03506970778107643,
-0.023973938077688217,
-0.06351125985383987,
0.08211175352334976,
-0.05476894602179527,
0.03132826089859009,
-0.028725281357765198,
0.008282347582280636,
0.05056288465857506,
-0.027026858180761337,
0.04400024935603142,
0.03834519907832146,
0.027713285759091377,
-0.011788727715611458
] | 0.122302
|
`apiVersion: rbac.authorization.k8s.io/v1` `import "k8s.io/api/rbac/v1"` ## RoleBinding {#RoleBinding} RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: RoleBinding - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object's metadata. - \*\*roleRef\*\* (RoleRef), required RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable. \*RoleRef contains information that points to the role being used\* - \*\*roleRef.apiGroup\*\* (string), required APIGroup is the group for the resource being referenced - \*\*roleRef.kind\*\* (string), required Kind is the type of resource being referenced - \*\*roleRef.name\*\* (string), required Name is the name of resource being referenced - \*\*subjects\*\* ([]Subject) \*Atomic: will be replaced during a merge\* Subjects holds references to the objects the role applies to. \*Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\* - \*\*subjects.kind\*\* (string), required Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. - \*\*subjects.name\*\* (string), required Name of the object being referenced. - \*\*subjects.apiGroup\*\* (string) APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. - \*\*subjects.namespace\*\* (string) Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. ## RoleBindingList {#RoleBindingList} RoleBindingList is a collection of RoleBindings --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: RoleBindingList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard object's metadata. - \*\*items\*\* ([][}}">RoleBinding]({{< ref )), required Items is a list of RoleBindings ## Operations {#Operations} --- ### `get` read the specified RoleBinding #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the RoleBinding - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">RoleBinding]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind RoleBinding #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">RoleBindingList]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind RoleBinding #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/rolebindings #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*):
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md
|
[
-0.046701494604349136,
-0.005157409235835075,
-0.06456308811903,
0.044435832649469376,
-0.0107978330925107,
0.024726327508687973,
0.06678055971860886,
-0.0310222078114748,
-0.0033684431109577417,
0.008206906728446484,
-0.034868862479925156,
-0.06311888247728348,
0.060862571001052856,
0.0691118910908699,
0.017643798142671585,
0.033421047031879425,
0.020335327833890915,
-0.027491508051753044,
-0.15168984234333038,
0.01871042512357235,
0.003619676921516657,
-0.04745190218091011,
-0.010153979994356632,
0.02990124002099037,
-0.061098042875528336,
-0.06722100079059601,
-0.057412758469581604,
-0.0296022966504097,
0.004473760724067688,
-0.04265911877155304,
-0.03779970854520798,
-0.0020302149932831526,
0.013780614361166954,
0.03826955705881119,
0.03587106615304947,
0.09839826822280884,
0.05009380355477333,
-0.014065618626773357,
-0.0243737380951643,
0.017911002039909363,
0.010349491611123085,
0.11038848012685776,
-0.05334507301449776,
-0.04508402943611145,
0.02607591636478901,
0.0023206169717013836,
0.11804219335317612,
-0.06253450363874435,
-0.03820418938994408,
-0.0014512487687170506,
-0.0028934492729604244,
0.02845620922744274,
0.016068747267127037,
0.05868649482727051,
0.024637827649712563,
0.021527577191591263,
-0.03502553701400757,
0.023124272003769875,
0.025883855298161507,
0.0018692243611440063,
0.007034941576421261,
-0.041953571140766144,
0.04197048395872116,
-0.053652748465538025,
-0.09042499959468842,
-0.026517031714320183,
-0.01934005506336689,
-0.08530434221029282,
-0.01089346781373024,
-0.07460908591747284,
0.01265077292919159,
-0.04828141629695892,
-0.06754492223262787,
0.005364478565752506,
0.06471516191959381,
0.0385037437081337,
0.017875561490654945,
0.03500466048717499,
0.10212366282939911,
-0.17670774459838867,
0.04914689436554909,
0.03188258036971092,
-0.06263986229896545,
0.08741968870162964,
-0.023975159972906113,
0.03552671894431114,
-0.03952967748045921,
-0.05762259662151337,
-0.04011489823460579,
0.04082130640745163,
0.0434403233230114,
-0.06570370495319366,
0.10756824165582657,
-0.05849642679095268,
0.05733541026711464,
-0.04300371930003166,
-0.015623153187334538,
0.057051222771406174,
-0.012437825091183186,
0.049519576132297516,
-0.06760944426059723,
-0.03576624393463135,
-0.014250616542994976,
0.06941519677639008,
-0.015496407635509968,
-0.041397493332624435,
-0.04453369975090027,
-0.03768755495548248,
-0.047602444887161255,
0.07495354861021042,
0.014856861904263496,
0.04775936156511307,
-0.0684484913945198,
-0.02563123032450676,
0.03378113731741905,
0.06104378402233124,
0.011874176561832428,
-0.07870819419622421,
0.05641065910458565,
0.015946298837661743,
0.059211693704128265,
-0.04788512364029884,
0.05536387115716934,
0.05189639329910278,
0.03505105525255203,
0.008334949612617493,
-0.03043312206864357,
4.252479383794246e-33,
-0.036543797701597214,
0.00010838554590009153,
0.0035515420604497194,
0.06575365364551544,
0.009695902466773987,
-0.046198565512895584,
-0.055819157510995865,
-0.030308766290545464,
-0.04850488901138306,
-0.058336831629276276,
-0.04586229473352432,
0.08646940439939499,
0.02375159226357937,
-0.09237615764141083,
-0.004168058279901743,
0.11972252279520035,
0.0028282736893743277,
0.05949262157082558,
0.00797998532652855,
0.02086794376373291,
0.04085547477006912,
0.005869558081030846,
-0.0700496956706047,
-0.0011442139511927962,
0.0005072306958027184,
-0.0386938750743866,
-0.02973714843392372,
-0.0977446511387825,
0.039781831204891205,
-0.001148620736785233,
-0.0010856786975637078,
0.0020684918854385614,
0.011165599338710308,
0.009185022674500942,
-0.04285404458642006,
-0.03853040188550949,
0.0007049163687042892,
0.024682551622390747,
-0.09643732756376266,
-0.042525701224803925,
0.005085032433271408,
0.04708723723888397,
-0.05266151949763298,
-0.01184956356883049,
0.023598695173859596,
-0.15302182734012604,
-0.007988479919731617,
0.0654175654053688,
0.05994131788611412,
0.10864981263875961,
-0.04964711517095566,
-0.009200370870530605,
0.12998010218143463,
-0.04060095548629761,
0.056074678897857666,
-0.004683574195951223,
0.061940498650074005,
0.023753955960273743,
0.010342354886233807,
-0.09220254421234131,
0.06546939164400101,
0.009641287848353386,
-0.015379819087684155,
0.08849183470010757,
0.08621199429035187,
0.028871258720755577,
-0.05569588765501976,
-0.002641090890392661,
0.04077206924557686,
-0.047564879059791565,
-0.07707514613866806,
0.04739435389637947,
-0.020049255341291428,
0.039399098604917526,
-0.07310129702091217,
-0.150230273604393,
-0.030814772471785545,
0.007789046037942171,
-0.08315234631299973,
0.09390313923358917,
-0.023907609283924103,
-0.034072499722242355,
0.026306545361876488,
0.07310917973518372,
-0.12432930618524551,
-0.08881690353155136,
0.04519672691822052,
-0.04765554517507553,
0.014994051307439804,
-0.0953785851597786,
0.04207255691289902,
-0.10882578790187836,
-0.06330268085002899,
0.02434884011745453,
-0.08491197228431702,
-5.216884703909606e-33,
0.08077194541692734,
-0.06594034284353256,
0.038007210940122604,
-0.05226129665970802,
0.027738068252801895,
-0.03066679649055004,
-0.023809023201465607,
-0.0186544731259346,
-0.004054245539009571,
-0.0055020530708134174,
0.08075302839279175,
-0.05438842251896858,
0.060282085090875626,
0.07290463149547577,
0.09406862407922745,
-0.007191035430878401,
-0.1100676879286766,
-0.0015551961259916425,
0.01241726242005825,
0.04522727057337761,
-0.023797424510121346,
-0.017078697681427002,
0.06723970919847488,
0.07724053412675858,
-0.0032254448160529137,
-0.03390622138977051,
-0.054406289011240005,
0.0781978890299797,
0.017779827117919922,
-0.02768689952790737,
-0.0028328036423772573,
0.027551285922527313,
-0.08297015726566315,
-0.04127798601984978,
-0.05408858880400658,
-0.08446294069290161,
-0.02896958962082863,
0.02633172646164894,
-0.03654903918504715,
-0.032983046025037766,
0.07923416048288345,
0.07588326185941696,
-0.033205363899469376,
-0.0012808728497475386,
0.00971458200365305,
0.011800065636634827,
0.06924540549516678,
0.03974967822432518,
0.02910412847995758,
-0.05425361171364784,
0.048208799213171005,
-0.0470762699842453,
-0.009552404284477234,
0.0638839453458786,
0.01218518614768982,
0.08628759533166885,
0.07852012664079666,
0.07032834738492966,
0.05192602425813675,
-0.0009554564021527767,
0.06081496551632881,
-0.08289416134357452,
-0.010906887240707874,
0.03967217355966568,
-0.03394259139895439,
-0.017282892018556595,
-0.03332439064979553,
0.05182410404086113,
-0.0008038705564104021,
0.007731156889349222,
0.043167002499103546,
-0.08733933418989182,
0.03569401428103447,
0.0005382804665714502,
0.03798350319266319,
0.022358238697052002,
0.008227064274251461,
-0.007461110129952431,
0.023928780108690262,
0.015536423772573471,
-0.057080578058958054,
-0.06613478809595108,
0.006500274408608675,
0.0903036966919899,
0.04232989624142647,
0.030557814985513687,
-0.00028017553268000484,
0.03602767363190651,
0.01437339186668396,
-0.03699462115764618,
-0.008359689265489578,
-0.056639425456523895,
-0.07451445609331131,
0.02085583470761776,
-0.05140691623091698,
-5.296113059216623e-8,
-0.002968922955915332,
0.006075827404856682,
-0.07512152194976807,
-0.0011513364734128118,
0.0521833635866642,
0.01345230732113123,
-0.024721568450331688,
-0.07047265022993088,
0.00906872097402811,
0.06093009188771248,
0.02249600738286972,
-0.009477469138801098,
-0.02089628018438816,
-0.11464275419712067,
0.021099504083395004,
0.022317493334412575,
-0.03339704871177673,
0.03548331558704376,
0.016171477735042572,
0.029610995203256607,
-0.008301286958158016,
-0.07176700234413147,
-0.016736168414354324,
-0.0874708890914917,
0.010268510319292545,
0.029443955048918724,
-0.034414343535900116,
0.017378076910972595,
0.04001356661319733,
0.01577642932534218,
0.05067470669746399,
0.039518360048532486,
0.04738428816199303,
0.00462891161441803,
-0.041021957993507385,
-0.0038254978135228157,
-0.0028049296233803034,
0.07498146593570709,
-0.03801795095205307,
0.026326121762394905,
0.03585430607199669,
0.027751481160521507,
-0.09663524478673935,
-0.002985486062243581,
0.05319647118449211,
0.03592633828520775,
0.03477570042014122,
0.03733135387301445,
0.07153521478176117,
0.024795081466436386,
-0.04703512415289879,
-0.02274276688694954,
-0.01526077464222908,
0.017821088433265686,
-0.04427288472652435,
-0.03173384070396423,
0.009728129021823406,
0.012045761570334435,
0.08185970783233643,
-0.00994945503771305,
0.04653756693005562,
0.033373378217220306,
-0.00004096292468602769,
-0.0016360179288312793
] | 0.141368
|
(\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">RoleBindingList]({{< ref )): OK 401: Unauthorized ### `create` create a RoleBinding #### HTTP Request POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">RoleBinding]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">RoleBinding]({{< ref )): OK 201 ([}}">RoleBinding]({{< ref )): Created 202 ([}}">RoleBinding]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified RoleBinding #### HTTP Request PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the RoleBinding - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">RoleBinding]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">RoleBinding]({{< ref )): OK 201 ([}}">RoleBinding]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified RoleBinding #### HTTP Request PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the RoleBinding - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">RoleBinding]({{< ref )): OK 201 ([}}">RoleBinding]({{< ref )): Created 401: Unauthorized ### `delete` delete a RoleBinding #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the RoleBinding - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 202 ([}}">Status]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of RoleBinding #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md
|
[
0.02626524493098259,
0.11415311694145203,
-0.0030269715934991837,
0.04978807643055916,
-0.020773280411958694,
0.052979860454797745,
0.11335783451795578,
0.005720336455851793,
-0.04977068677544594,
-0.015541555359959602,
-0.050948865711688995,
-0.1061343103647232,
0.027720294892787933,
-0.03543929383158684,
0.030594589188694954,
0.06527861207723618,
0.009419962763786316,
-0.010694403201341629,
-0.06403379142284393,
0.017049873247742653,
0.0767040029168129,
0.04216635227203369,
-0.02742268703877926,
-0.019661065191030502,
-0.056241851300001144,
0.053907595574855804,
-0.021692762151360512,
-0.03771558031439781,
0.017258459702134132,
0.042635880410671234,
-0.0892796441912651,
0.032082125544548035,
-0.11460006982088089,
0.03556269779801369,
0.10250428318977356,
0.03824427351355553,
0.036129772663116455,
0.008478737436234951,
-0.0013834050623700023,
-0.025632331147789955,
0.06769997626543045,
0.0230603888630867,
0.009470732882618904,
-0.04373854398727417,
0.005274917930364609,
-0.021724380552768707,
0.04744869843125343,
-0.051161326467990875,
-0.08282425999641418,
-0.04254503175616264,
-0.10987444221973419,
-0.011060449294745922,
-0.01916348561644554,
0.012687310576438904,
0.10288533568382263,
0.02481066808104515,
-0.06558345258235931,
-0.029356839135289192,
-0.022401893511414528,
-0.03100108727812767,
0.016795417293906212,
-0.10570935904979706,
0.021200796589255333,
-0.05236874148249626,
-0.03831698000431061,
-0.07622796297073364,
0.015478232875466347,
0.006024837493896484,
0.06399333477020264,
-0.10206383466720581,
-0.11736087501049042,
0.040129613131284714,
-0.07911047339439392,
0.020404152572155,
0.04115305468440056,
0.1356457769870758,
-0.008811314590275288,
0.01126806065440178,
0.03430568426847458,
-0.093767449259758,
0.00443468801677227,
-0.07438663393259048,
-0.06778021901845932,
-0.003967412281781435,
0.025494065135717392,
-0.0008726376690901816,
-0.03139953687787056,
-0.08693954348564148,
0.10772121697664261,
0.05090630427002907,
-0.029013019055128098,
-0.022949760779738426,
0.03638564795255661,
-0.017985185608267784,
0.038558583706617355,
0.053719423711299896,
-0.09827663749456406,
-0.05815456435084343,
0.07977789640426636,
0.047944575548172,
0.06747327744960785,
0.03978019580245018,
0.008586224168539047,
-0.06892663240432739,
-0.07875043898820877,
-0.04562688618898392,
0.001469096401706338,
0.05165855213999748,
-0.03323020413517952,
0.0050258818082511425,
-0.01498156413435936,
0.057452552020549774,
0.0003225754771847278,
0.01077534630894661,
-0.0106227807700634,
0.014568101614713669,
0.09346165508031845,
-0.08338329195976257,
0.0005765080568380654,
0.00833029393106699,
0.04254459962248802,
0.012500356882810593,
-0.06313788890838623,
0.0228151623159647,
0.012016172520816326,
0.010924752801656723,
-0.07382550090551376,
2.9552229200099706e-33,
0.11575859040021896,
-0.008037649095058441,
-0.026468342170119286,
-0.023136984556913376,
-0.040521811693906784,
0.028799409046769142,
0.08904644846916199,
0.0707402229309082,
0.02584576979279518,
0.020786728709936142,
-0.012368189170956612,
0.006598104722797871,
-0.029072357341647148,
-0.06483550369739532,
0.018156105652451515,
-0.03565986081957817,
0.006943007931113243,
0.050440747290849686,
-0.04144477844238281,
-0.015328026376664639,
0.00867513008415699,
0.03710341826081276,
-0.04477269574999809,
-0.005852649919688702,
0.037043169140815735,
-0.026951083913445473,
-0.06292594969272614,
-0.015703091397881508,
-0.04399264603853226,
-0.015068486332893372,
0.05031243711709976,
-0.05816977843642235,
-0.031785763800144196,
0.05007191747426987,
0.048603057861328125,
0.05517464131116867,
0.04945989325642586,
-0.01786818727850914,
0.003050497965887189,
0.002965152496472001,
-0.16415506601333618,
-0.01894553378224373,
0.029498834162950516,
-0.022590721026062965,
0.0756092220544815,
-0.06789744645357132,
-0.09683987498283386,
-0.0310915969312191,
-0.0009406788740307093,
-0.0826629102230072,
0.030084405094385147,
0.012684939429163933,
0.043336499482393265,
-0.04393744841217995,
0.017213068902492523,
0.031192563474178314,
-0.02257264032959938,
0.14057202637195587,
-0.019841361790895462,
0.06337606906890869,
-0.1122858002781868,
0.03200821578502655,
-0.005710563622415066,
-0.0030683281365782022,
0.08758048713207245,
0.043411899358034134,
0.07028655707836151,
0.025354553014039993,
0.021862437948584557,
-0.0131834102794528,
0.015857383608818054,
0.01768427900969982,
-0.000020481073079281487,
-0.0323416031897068,
0.01883283257484436,
-0.056250281631946564,
-0.029550446197390556,
-0.021986057981848717,
-0.06974489241838455,
0.02975517511367798,
-0.04154234752058983,
-0.0022651664912700653,
0.0068245334550738335,
0.10024689882993698,
-0.048610247671604156,
0.0061303917318582535,
-0.021062107756733894,
-0.048839323222637177,
0.07431741058826447,
-0.0248582623898983,
0.04333481937646866,
0.009997297078371048,
-0.07977621257305145,
-0.09206444770097733,
0.017958879470825195,
-3.3033220621189746e-33,
0.05754128471016884,
-0.02897854894399643,
0.05186791345477104,
-0.07614212483167648,
-0.04542871564626694,
-0.06966358423233032,
0.006004083435982466,
0.01614079810678959,
0.00016695630620233715,
-0.06560706347227097,
0.01582413911819458,
-0.06431414932012558,
0.06710728257894516,
-0.02309083566069603,
-0.0018842910649254918,
0.035257093608379364,
-0.020878836512565613,
-0.02017221227288246,
0.03904573619365692,
0.10429883748292923,
0.03387904539704323,
0.07651418447494507,
0.018128396943211555,
0.0641903206706047,
-0.01731749251484871,
-0.047539569437503815,
0.000626400054898113,
-0.009594475850462914,
0.005895727314054966,
-0.015014750882983208,
0.03380339592695236,
-0.09035822004079819,
0.047429826110601425,
-0.04330359399318695,
-0.011436045169830322,
-0.06454230844974518,
-0.008540021255612373,
0.025996485725045204,
0.038377221673727036,
0.04549835994839668,
0.023408519104123116,
-0.024864930659532547,
-0.017280345782637596,
-0.008970174007117748,
-0.010763193480670452,
-0.07034868001937866,
-0.01030091941356659,
0.02758924476802349,
-0.06388798356056213,
0.018783394247293472,
0.0449400469660759,
-0.039330143481492996,
-0.09231255948543549,
0.03371535241603851,
0.024522529914975166,
-0.04984996095299721,
0.057430051267147064,
-0.025879735127091408,
-0.025927221402525902,
-0.025635315105319023,
-0.030338404700160027,
0.0438663475215435,
0.052983496338129044,
-0.012607606127858162,
0.09289993345737457,
-0.007922094315290451,
-0.034140828996896744,
-0.056091658771038055,
-0.0759282037615776,
-0.05954620614647865,
0.05758146941661835,
-0.01961793564260006,
-0.05023353546857834,
0.051065053790807724,
0.05174480378627777,
-0.03557483106851578,
0.040430422872304916,
0.03573014959692955,
0.06622586399316788,
0.10879291594028473,
-0.05000888556241989,
0.021738355979323387,
0.04748054966330528,
0.033691439777612686,
-0.026751790195703506,
-0.056085746735334396,
-0.06285853683948517,
0.027418527752161026,
-0.040591686964035034,
-0.016384150832891464,
-0.02476741559803486,
-0.046309057623147964,
-0.017021531239151955,
0.04320859536528587,
-0.03541260585188866,
-3.7669739327839125e-8,
-0.09657154232263565,
0.05247892066836357,
-0.05615369603037834,
0.09016387164592743,
0.020721834152936935,
0.022523781284689903,
-0.037352055311203,
0.09187309443950653,
-0.008450031280517578,
0.03736604005098343,
0.007279535289853811,
0.018088670447468758,
0.0460643470287323,
-0.10637940466403961,
0.017004679888486862,
-0.056019317358732224,
-0.013651479035615921,
-0.021305307745933533,
-0.028314191848039627,
0.05110194906592369,
0.02719181403517723,
-0.0167390126734972,
-0.012723594903945923,
0.024774746969342232,
0.13271059095859528,
0.013448148034512997,
0.02256152033805847,
0.0003543780476320535,
0.08600961416959763,
0.10950419306755066,
-0.0203224066644907,
-0.008344883099198341,
0.007881991565227509,
0.027285179123282433,
-0.049542441964149475,
0.014274172484874725,
0.015433724969625473,
-0.0316779688000679,
-0.025612501427531242,
0.04355840012431145,
0.04807352274656296,
-0.013359595090150833,
-0.06930955499410629,
0.057831771671772,
0.08843499422073364,
-0.1084044799208641,
0.010358922183513641,
0.012419653125107288,
0.09686210751533508,
-0.03656197711825371,
-0.10769474506378174,
-0.02041822299361229,
0.03955576941370964,
-0.021247684955596924,
-0.08032902330160141,
0.0017205995973199606,
0.038584332913160324,
-0.0004998658550903201,
-0.006496438756585121,
0.06017780303955078,
0.08527368307113647,
0.015421590767800808,
0.009734044782817364,
0.0618579164147377
] | 0.044203
|
query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md
|
[
-0.0014260833850130439,
0.15864621102809906,
-0.01413546223193407,
0.06838160753250122,
0.019903825595974922,
-0.010709797032177448,
0.08524779975414276,
-0.0018783763516694307,
0.07107092440128326,
0.0014243172481656075,
-0.05475133657455444,
-0.03794344514608383,
0.05069207027554512,
0.008009077981114388,
-0.00039519392885267735,
0.07413268089294434,
-0.020127296447753906,
-0.031557608395814896,
-0.03846972435712814,
-0.032657548785209656,
0.061145298182964325,
0.04216485098004341,
-0.1131361871957779,
0.027594096958637238,
-0.05424239858984947,
-0.019273899495601654,
-0.07994227856397629,
-0.07207951694726944,
0.08890616148710251,
0.050228070467710495,
-0.07275603711605072,
-0.00805787555873394,
-0.11320557445287704,
-0.038909662514925,
0.03656028211116791,
0.03726236894726753,
0.04380543902516365,
-0.028725966811180115,
-0.02667236328125,
-0.09725773334503174,
0.0773230791091919,
-0.011437997221946716,
-0.051885224878787994,
-0.04462246969342232,
0.04567737877368927,
-0.04826011508703232,
0.02785949409008026,
0.010741740465164185,
-0.0560176745057106,
0.008548921905457973,
-0.028516577556729317,
0.04215570539236069,
0.03860742226243019,
-0.0031062050256878138,
0.08216339349746704,
-0.0354410745203495,
-0.04778749868273735,
-0.06666804105043411,
0.005371434148401022,
-0.038938313722610474,
0.029951417818665504,
-0.15591101348400116,
0.004154978785663843,
-0.017911367118358612,
-0.08203791081905365,
-0.01188192330300808,
-0.0019171651219949126,
0.003563921432942152,
0.07524196058511734,
-0.004441320430487394,
-0.037531204521656036,
-0.024365685880184174,
-0.0895920991897583,
0.01478710025548935,
0.11680243164300919,
0.0780889019370079,
-0.07039446383714676,
-0.04066406935453415,
-0.01766274683177471,
-0.016479773446917534,
0.014346422627568245,
-0.16031697392463684,
-0.03869360312819481,
0.026599330827593803,
0.018196728080511093,
0.049064621329307556,
-0.0006600696942768991,
0.03596377372741699,
0.04392353817820549,
-0.008761011064052582,
-0.03334195166826248,
0.02136368863284588,
0.015282143838703632,
0.01356445625424385,
-0.03104369342327118,
0.01741810329258442,
-0.016660647466778755,
-0.11981571465730667,
-0.019565435126423836,
0.08052965998649597,
0.07258717715740204,
0.06495115160942078,
-0.012080860324203968,
-0.05293301120400429,
0.04835695028305054,
-0.046231672167778015,
0.08192314952611923,
-0.03840306028723717,
-0.024554237723350525,
0.027155522257089615,
-0.020857954397797585,
0.0074902866035699844,
0.10360384732484818,
-0.00016242862329818308,
-0.007090284023433924,
0.053214117884635925,
0.06328485161066055,
0.0067226467654109,
0.0328650064766407,
-0.007893680594861507,
0.11263405531644821,
0.062197476625442505,
-0.05550698935985565,
0.010222123004496098,
0.05506497994065285,
-0.044058721512556076,
0.03806622326374054,
2.5894654650287158e-33,
0.1136614978313446,
0.059162598103284836,
-0.08567735552787781,
-0.02521866373717785,
-0.006707982160151005,
0.0023168413899838924,
0.05056041106581688,
0.025712918490171432,
0.07357701659202576,
0.007626329082995653,
-0.014606161043047905,
-0.08460839837789536,
0.07826811075210571,
-0.059675183147192,
-0.01733146794140339,
0.035995520651340485,
0.06153371185064316,
0.04870828613638878,
0.07229122519493103,
-0.0006567083182744682,
-0.040159400552511215,
-0.0392574816942215,
-0.06031399965286255,
0.0764404684305191,
0.037574030458927155,
-0.013570431619882584,
-0.07786639779806137,
0.029643189162015915,
-0.07147324830293655,
0.008578246459364891,
0.048143502324819565,
-0.01858481764793396,
-0.04270099475979805,
0.0029112729243934155,
0.05800049751996994,
0.020275644958019257,
0.009973818436264992,
0.002493565436452627,
-0.02676551230251789,
-0.07495646178722382,
-0.12350892275571823,
-0.011977380141615868,
-0.09068025648593903,
-0.01067157369107008,
-0.005333037581294775,
-0.11452189087867737,
-0.051611825823783875,
-0.020380543544888496,
0.087798111140728,
-0.03538466989994049,
-0.04524235799908638,
0.0769241452217102,
0.021831762045621872,
-0.075631283223629,
-0.005220336373895407,
-0.015500779263675213,
-0.02049155905842781,
0.09145685285329819,
-0.04369772598147392,
0.02492780238389969,
-0.01720445603132248,
0.010103377513587475,
0.0022486408706754446,
-0.052311886101961136,
-0.002250456716865301,
-0.031025312840938568,
-0.044993046671152115,
0.022421373054385185,
0.013886257074773312,
0.036855511367321014,
-0.027758615091443062,
0.062372639775276184,
0.016735095530748367,
-0.01688024029135704,
-0.08509010076522827,
-0.0917719155550003,
0.03227758780121803,
0.044414352625608444,
0.04457003250718117,
0.049620162695646286,
0.02722053974866867,
-0.10030647367238998,
-0.06575440615415573,
0.0787641853094101,
-0.014328249730169773,
0.027405647560954094,
-0.01336106937378645,
-0.023712754249572754,
-0.026140695437788963,
-0.0007236676174215972,
0.018491782248020172,
0.029630564153194427,
-0.023459967225790024,
-0.08236270397901535,
-0.018690908327698708,
-3.736904622787714e-33,
0.06955701112747192,
0.021563662216067314,
0.017330588772892952,
-0.04281900078058243,
-0.11256837099790573,
-0.06104787066578865,
0.024135997518897057,
0.054528482258319855,
0.029809294268488884,
-0.007719590328633785,
0.07695081830024719,
-0.03938647359609604,
0.08174749463796616,
-0.030154310166835785,
0.010108517482876778,
0.010549754835665226,
-0.016810772940516472,
-0.025581054389476776,
0.033763207495212555,
0.0231398306787014,
0.06075713410973549,
0.01844714768230915,
-0.016384780406951904,
0.03983614966273308,
-0.07559137791395187,
0.005745947360992432,
0.010732622817158699,
-0.036231644451618195,
-0.024935565888881683,
0.00812485907226801,
0.023201139643788338,
0.02327687293291092,
-0.0025589782744646072,
0.030000122264027596,
0.03297274932265282,
-0.11403854191303253,
0.00019914741278626025,
0.07912200689315796,
0.03265409171581268,
-0.007217761594802141,
0.09874480217695236,
0.054729755967855453,
-0.020032165572047234,
0.009855796582996845,
-0.01817365735769272,
-0.07049790769815445,
0.035974666476249695,
-0.06317132711410522,
-0.01210991945117712,
-0.012493111193180084,
0.0165969580411911,
-0.07842879742383957,
0.07913412153720856,
0.028677916154265404,
0.007877099327743053,
-0.03478365018963814,
0.06543753296136856,
0.02454102411866188,
0.052912838757038116,
0.034331005066633224,
-0.04709570109844208,
-0.000489600992295891,
0.06875981390476227,
0.01602066308259964,
0.05254807323217392,
-0.03529275581240654,
-0.016349181532859802,
-0.01758466102182865,
-0.007098977454006672,
-0.037742964923381805,
0.11364072561264038,
0.06914721429347992,
-0.0559978224337101,
-0.003147524781525135,
0.06131517514586449,
-0.001993115060031414,
-0.035682957619428635,
-0.03625769540667534,
-0.0445915088057518,
0.06813480705022812,
-0.010178572498261929,
0.045597512274980545,
-0.013062107376754284,
0.026554573327302933,
-0.025974733754992485,
-0.022235741838812828,
-0.06969447433948517,
0.037468649446964264,
-0.01649433933198452,
-0.008106669411063194,
-0.012608224526047707,
-0.010867762379348278,
-0.05586913600564003,
0.05293166637420654,
-0.006056375335901976,
-4.085230287387276e-8,
-0.06977830827236176,
0.06912961602210999,
0.000051760045607807115,
0.007180351298302412,
0.0037144110538065434,
0.0471961610019207,
-0.06665483862161636,
-0.05208880081772804,
-0.09829981625080109,
-0.04827816039323807,
0.00962028931826353,
-0.013652623631060123,
0.06811176240444183,
-0.05996008589863777,
0.0705975815653801,
-0.0682356134057045,
-0.040951646864414215,
-0.06747928261756897,
-0.032561760395765305,
-0.03315689414739609,
-0.023829204961657524,
-0.031842224299907684,
-0.02435607835650444,
-0.043253932148218155,
0.05611730366945267,
0.052683211863040924,
0.023666931316256523,
0.04824434220790863,
0.024608531966805458,
-0.0014721332117915154,
-0.04869837686419487,
-0.0002671546535566449,
-0.023411860689520836,
0.0035361344926059246,
-0.07836458832025528,
0.02569495141506195,
0.007766010705381632,
-0.021938666701316833,
-0.08298253268003464,
0.002255258383229375,
0.03897882625460625,
-0.005773643963038921,
-0.09029535949230194,
0.046280503273010254,
-0.025465399026870728,
-0.03949767351150513,
0.014315885491669178,
0.036126043647527695,
0.05895847827196121,
-0.06377214938402176,
0.032130930572748184,
-0.04580032825469971,
0.047285351902246475,
0.04608111456036568,
-0.08845697343349457,
-0.00044885100214742124,
0.054817285388708115,
-0.04431913048028946,
0.003187327180057764,
0.009850776754319668,
0.19214752316474915,
0.04522489383816719,
-0.006693271454423666,
0.029973221942782402
] | 0.127153
|
`apiVersion: rbac.authorization.k8s.io/v1` `import "k8s.io/api/rbac/v1"` ## Role {#Role} Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: Role - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object's metadata. - \*\*rules\*\* ([]PolicyRule) \*Atomic: will be replaced during a merge\* Rules holds all the PolicyRules for this Role \*PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\* - \*\*rules.apiGroups\*\* ([]string) \*Atomic: will be replaced during a merge\* APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "" represents the core API group and "\*" represents all API groups. - \*\*rules.resources\*\* ([]string) \*Atomic: will be replaced during a merge\* Resources is a list of resources this rule applies to. '\*' represents all resources. - \*\*rules.verbs\*\* ([]string), required \*Atomic: will be replaced during a merge\* Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '\*' represents all verbs. - \*\*rules.resourceNames\*\* ([]string) \*Atomic: will be replaced during a merge\* ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - \*\*rules.nonResourceURLs\*\* ([]string) \*Atomic: will be replaced during a merge\* NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. ## RoleList {#RoleList} RoleList is a collection of Roles --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: RoleList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard object's metadata. - \*\*items\*\* ([][}}">Role]({{< ref )), required Items is a list of Roles ## Operations {#Operations} --- ### `get` read the specified Role #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Role - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Role]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind Role #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">RoleList]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind Role #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/roles #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref )
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-v1.md
|
[
-0.06283591687679291,
0.016856875270605087,
-0.0468888022005558,
0.0160830020904541,
0.0013415093999356031,
0.003049456048756838,
0.07528866082429886,
-0.0407823771238327,
-0.046522047370672226,
-0.004169033840298653,
-0.00027405295986682177,
-0.029838012531399727,
0.038487013429403305,
0.025068288668990135,
0.05267433449625969,
0.06398110836744308,
-0.028152860701084137,
-0.009565533138811588,
-0.1755921095609665,
0.005961715243756771,
0.02091599814593792,
0.006029847543686628,
-0.04716075584292412,
0.022000476717948914,
-0.04869510978460312,
-0.003731047036126256,
-0.03711313381791115,
-0.05532629042863846,
-0.011449815705418587,
-0.019888797774910927,
-0.03499869629740715,
-0.007099589332938194,
-0.006156429648399353,
0.02089105360209942,
0.07093103975057602,
0.06567451357841492,
0.02913726679980755,
-0.042658258229494095,
0.0009305254789069295,
0.0003176044556312263,
0.02135305106639862,
0.07562112808227539,
-0.09862588346004486,
-0.04871879145503044,
-0.03500095754861832,
0.04257624223828316,
0.060096897184848785,
-0.06957429647445679,
-0.07619000226259232,
0.008238670416176319,
0.03331455960869789,
-0.030388209968805313,
0.0034413342364132404,
0.03683991730213165,
0.08721554279327393,
0.0006116832955740392,
-0.047423046082258224,
0.02919275313615799,
0.006847165059298277,
-0.04030274599790573,
0.024186963215470314,
-0.048514530062675476,
-0.010532586835324764,
0.002191060921177268,
-0.09979890286922455,
-0.03804715350270271,
-0.029413960874080658,
-0.05059757083654404,
0.029993923380970955,
-0.05523651838302612,
-0.060512710362672806,
-0.017476113513112068,
-0.05980677902698517,
0.019520653411746025,
0.06034446880221367,
0.02991569973528385,
0.018749848008155823,
0.06856836378574371,
0.048085324466228485,
-0.21387280523777008,
0.014062415808439255,
-0.010080612264573574,
-0.041330549865961075,
0.09192389994859695,
-0.03551969677209854,
0.01312268152832985,
-0.03465442359447479,
-0.06131327152252197,
0.022652922198176384,
0.08276211470365524,
0.016672300174832344,
-0.04640059173107147,
0.16484904289245605,
-0.08242315798997879,
0.034788601100444794,
0.032106995582580566,
-0.031011207029223442,
-0.026142543181777,
-0.02960273064672947,
0.0831773653626442,
-0.054668646305799484,
-0.029367972165346146,
-0.019396793097257614,
0.047858092933893204,
-0.01858970709145069,
-0.04287649691104889,
-0.06268580257892609,
-0.02859189547598362,
-0.02130589447915554,
0.06347548961639404,
0.029864786192774773,
0.06640328466892242,
-0.041749030351638794,
-0.055888574570417404,
0.014774391427636147,
0.010818982496857643,
-0.014329396188259125,
-0.023702846840023994,
0.05171709135174751,
0.03193606436252594,
0.06210954859852791,
-0.052902985364198685,
0.07643088698387146,
0.03881330043077469,
0.0243811197578907,
0.0480818971991539,
-0.0648496076464653,
3.7204510079540636e-33,
-0.028777504339814186,
-0.014479664154350758,
-0.0509679801762104,
0.046766482293605804,
0.048528626561164856,
-0.0378367118537426,
-0.005941568873822689,
-0.025337327271699905,
-0.02373402751982212,
-0.02992803417146206,
-0.08496727049350739,
0.11014480143785477,
-0.018803615123033524,
-0.06825239211320877,
0.0006307660369202495,
0.06961554288864136,
-0.0035759469028562307,
0.10078109800815582,
0.05159217119216919,
0.06346172094345093,
0.04516090080142021,
0.07189951837062836,
-0.04445716738700867,
0.00010948232375085354,
0.012679037638008595,
-0.03325881436467171,
-0.048825379461050034,
-0.07887312769889832,
0.023294266313314438,
0.01852569356560707,
0.016174692660570145,
-0.021519381552934647,
0.0226187314838171,
0.036844756454229355,
-0.018271496519446373,
-0.00500880554318428,
-0.02602311782538891,
-0.02087877318263054,
-0.06664662808179855,
-0.076239213347435,
0.0038991395849734545,
0.002639452228322625,
-0.06202216073870659,
-0.016213372349739075,
0.01598513312637806,
-0.14000412821769714,
-0.09050391614437103,
0.044490259140729904,
0.07826253771781921,
0.03437031805515289,
-0.029636092483997345,
0.017622172832489014,
0.12089013308286667,
-0.06062121316790581,
0.008826111443340778,
-0.06549037992954254,
0.010023238137364388,
0.08426912128925323,
0.009421298280358315,
-0.06393343955278397,
0.07686819136142731,
0.055905915796756744,
-0.021224023774266243,
0.07787679880857468,
0.047909926623106,
0.03237804397940636,
-0.05832405015826225,
0.03097357042133808,
0.04821816831827164,
-0.06191681697964668,
-0.07681765407323837,
0.07632467150688171,
-0.04209814965724945,
0.05481977388262749,
-0.053719259798526764,
-0.1384933590888977,
0.029653359204530716,
0.020022770389914513,
-0.0467103086411953,
0.023289581760764122,
-0.043744608759880066,
0.013679195195436478,
0.025813616812229156,
0.04460609331727028,
-0.0967387929558754,
-0.09635316580533981,
0.014233102090656757,
-0.061766043305397034,
0.00986656453460455,
-0.08180220425128937,
-0.014489786699414253,
-0.12435648590326309,
-0.07446122169494629,
0.0295702014118433,
-0.03863079845905304,
-6.463269078268155e-33,
0.11538785696029663,
-0.03997712582349777,
0.07687551528215408,
-0.051476191729307175,
-0.044145628809928894,
-0.04568229243159294,
-0.01671057939529419,
-0.02822500839829445,
0.01804649643599987,
-0.019378527998924255,
0.0653061643242836,
-0.007067893631756306,
0.0403343141078949,
0.020901048555970192,
0.08972170203924179,
0.013784519396722317,
-0.11030439287424088,
-0.05300721898674965,
0.03034757263958454,
0.027834497392177582,
-0.04355929046869278,
0.021251164376735687,
0.03454209491610527,
0.1190793365240097,
-0.011814247816801071,
-0.07776938378810883,
-0.05703776702284813,
0.03489358350634575,
0.05180403217673302,
0.0029233302921056747,
0.004214374348521233,
-0.012079071253538132,
-0.0439341776072979,
-0.0050665754824876785,
-0.08505050837993622,
-0.08537331968545914,
-0.0016584021504968405,
0.02810240536928177,
-0.019251013174653053,
-0.023389995098114014,
0.05269087105989456,
0.02203911542892456,
-0.007626083213835955,
0.02888301946222782,
0.024364491924643517,
0.008951384574174881,
0.04637032002210617,
0.05256183072924614,
-0.038616567850112915,
-0.06014237925410271,
0.08399907499551773,
-0.07433464378118515,
-0.008061794564127922,
0.038711369037628174,
0.01718168891966343,
0.07090026140213013,
0.11468075960874557,
0.046783432364463806,
0.000284443172859028,
0.00048357274499721825,
0.03712902218103409,
-0.03244011104106903,
0.001461495878174901,
0.08400394022464752,
-0.050832539796829224,
-0.0040956963784992695,
-0.0456673689186573,
0.008459899574518204,
-0.007165693212300539,
-0.038130179047584534,
0.05536060407757759,
-0.09792709350585938,
-0.07303463667631149,
-0.004892495460808277,
0.0323120653629303,
-0.00517148757353425,
0.035511162132024765,
-0.04100807011127472,
-0.0026272146496921778,
0.0521518848836422,
-0.10180528461933136,
-0.020461279898881912,
-0.0005309210973791778,
0.10465921461582184,
0.03601115569472313,
-0.018564479425549507,
0.025927456095814705,
0.07976732403039932,
0.036737553775310516,
0.0367044098675251,
-0.03419690206646919,
-0.028179213404655457,
-0.024277696385979652,
0.03774653747677803,
-0.04408503323793411,
-5.1890051366854095e-8,
-0.032644469290971756,
0.014710326679050922,
-0.06739254295825958,
0.05184374004602432,
0.04713193699717522,
0.032128069549798965,
-0.03986690193414688,
-0.04784531891345978,
0.01886850781738758,
-0.012235406786203384,
0.01680952124297619,
0.04446329548954964,
-0.06080695241689682,
-0.1190176010131836,
-0.029550939798355103,
0.02402321808040142,
-0.06170225515961647,
0.06420797854661942,
0.004710925277322531,
0.06554097682237625,
-0.02996143139898777,
-0.05230654776096344,
-0.008047061040997505,
-0.09463435411453247,
0.011617043986916542,
0.026407288387417793,
-0.01780780963599682,
0.0501788891851902,
0.026942800730466843,
0.03387691080570221,
0.05001644045114517,
0.010414055548608303,
0.021687950938940048,
-0.004583073779940605,
-0.02548803947865963,
-0.021609947085380554,
-0.014712073840200901,
0.06954670697450638,
0.010915598832070827,
0.01621912606060505,
0.029201284050941467,
0.0316523015499115,
-0.07375839352607727,
0.036431219428777695,
0.04992390051484108,
0.010281319729983807,
-0.02174861915409565,
0.013306252658367157,
0.06560400128364563,
-0.004720785655081272,
-0.027478650212287903,
0.01975124143064022,
-0.03052215650677681,
0.03791281580924988,
-0.08013000339269638,
-0.007803463842719793,
-0.03315689414739609,
0.015230124816298485,
0.049213726073503494,
-0.021595779806375504,
0.05103849992156029,
0.03882504254579544,
0.051155295222997665,
-0.0060630617663264275
] | 0.125386
|
ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">RoleList]({{< ref )): OK 401: Unauthorized ### `create` create a Role #### HTTP Request POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Role]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Role]({{< ref )): OK 201 ([}}">Role]({{< ref )): Created 202 ([}}">Role]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified Role #### HTTP Request PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Role - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Role]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Role]({{< ref )): OK 201 ([}}">Role]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified Role #### HTTP Request PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Role - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Role]({{< ref )): OK 201 ([}}">Role]({{< ref )): Created 401: Unauthorized ### `delete` delete a Role #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Role - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 202 ([}}">Status]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of Role #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-v1.md
|
[
0.02018064633011818,
0.12523579597473145,
-0.01967776007950306,
0.07616980373859406,
-0.009558015502989292,
0.057650431990623474,
0.11412858217954636,
0.021985523402690887,
-0.013400820083916187,
-0.00018244255625177175,
-0.06822407990694046,
-0.11841662228107452,
0.03518281504511833,
-0.021034250035881996,
0.0034227431751787663,
0.05237479880452156,
0.014158128760755062,
-0.049525175243616104,
-0.06863080710172653,
0.0043517486192286015,
0.09214189648628235,
0.03424893692135811,
-0.027178239077329636,
-0.0023083670530468225,
-0.06659162789583206,
0.03937679901719093,
-0.040330756455659866,
-0.05004251003265381,
0.05327999219298363,
0.052460357546806335,
-0.09510978311300278,
0.028011731803417206,
-0.11551716923713684,
-0.0035550068132579327,
0.12634140253067017,
0.03442283347249031,
0.030212851241230965,
0.015960633754730225,
-0.012356335297226906,
-0.02846452221274376,
0.08142615854740143,
0.042239733040332794,
-0.0009274903568439186,
-0.052163828164339066,
-0.024010274559259415,
-0.0351271890103817,
0.059875957667827606,
-0.05063094198703766,
-0.1113995760679245,
-0.0015854149824008346,
-0.08719958364963531,
-0.009067816659808159,
0.0074922689236700535,
-0.019822245463728905,
0.11965940147638321,
0.025701504200696945,
-0.06607456505298615,
-0.04049013555049896,
-0.03840883448719978,
-0.03847347944974899,
0.004786061123013496,
-0.11287491023540497,
0.0078057036735117435,
-0.06048540398478508,
-0.01995280012488365,
-0.03705168515443802,
0.015374785289168358,
-0.01609334535896778,
0.0639326199889183,
-0.07502418011426926,
-0.12713585793972015,
0.04127740114927292,
-0.06016227602958679,
0.025445615872740746,
0.05598214641213417,
0.09939278662204742,
-0.01273906510323286,
0.00013625282736029476,
0.018118515610694885,
-0.08339172601699829,
0.008388184010982513,
-0.09930068999528885,
-0.053179044276475906,
-0.010360436514019966,
0.04558252915740013,
0.01768575608730316,
0.011001911014318466,
-0.06208047643303871,
0.0852087214589119,
0.04766521975398064,
-0.011504308320581913,
0.0048393444158136845,
0.04496913403272629,
-0.008349602110683918,
0.033300600945949554,
0.06365320086479187,
-0.10432105511426926,
-0.050365548580884933,
0.06243627518415451,
0.05946177616715431,
0.07856761664152145,
0.06600315868854523,
-0.008339624851942062,
-0.05561494454741478,
-0.045181624591350555,
-0.07555992156267166,
0.033875610679388046,
0.05267056077718735,
-0.040884558111429214,
-0.000147259866935201,
-0.006156295537948608,
0.07711917161941528,
0.038579583168029785,
-0.0030904735904186964,
-0.008191807195544243,
0.004547951277345419,
0.099802166223526,
-0.10287600010633469,
0.005911901127547026,
-0.0037059555761516094,
0.04594878852367401,
0.03330492600798607,
-0.06367149949073792,
0.001689346507191658,
0.013891614973545074,
-0.012686445377767086,
-0.04051637277007103,
3.411136934608456e-33,
0.13138394057750702,
0.006655965931713581,
-0.04635290428996086,
-0.021597599610686302,
-0.025317668914794922,
0.016034407541155815,
0.07649490982294083,
0.052138201892375946,
0.037531327456235886,
0.008578193373978138,
-0.01578609086573124,
-0.030819280073046684,
-0.012004396878182888,
-0.09740989655256271,
0.004057873040437698,
-0.030826620757579803,
0.011057260446250439,
0.07784228026866913,
-0.00684495409950614,
-0.040616367012262344,
-0.019747242331504822,
0.0049176327884197235,
-0.03565132990479469,
-0.008837183006107807,
0.03634659945964813,
-0.021150026470422745,
-0.06842760741710663,
0.025796150788664818,
-0.04486007243394852,
-0.01984608732163906,
0.07380597293376923,
-0.06689763814210892,
-0.06782777607440948,
0.037140317261219025,
0.051078855991363525,
0.02490004152059555,
0.006598023232072592,
0.008918515406548977,
0.009828219190239906,
0.013215373270213604,
-0.16856928169727325,
-0.02084173820912838,
-0.011390700936317444,
-0.0067185936495661736,
0.05310920625925064,
-0.08115188032388687,
-0.08430761098861694,
-0.03744471073150635,
-0.0033046682365238667,
-0.0861264169216156,
0.021664077416062355,
0.03282167762517929,
0.05635872110724449,
-0.052641674876213074,
-0.0007088291458785534,
0.01924196071922779,
-0.015203278511762619,
0.13423191010951996,
-0.01952766813337803,
0.0753745585680008,
-0.0946325808763504,
0.02455907128751278,
0.010842956602573395,
-0.002141157863661647,
0.09153261035680771,
0.04626424238085747,
0.049387674778699875,
-0.017206985503435135,
0.05428532883524895,
-0.02691236324608326,
0.01081616897135973,
0.007040574215352535,
0.029273729771375656,
-0.02069893665611744,
0.028323130682110786,
-0.07500364631414413,
-0.024564605206251144,
-0.01896635815501213,
-0.07480282336473465,
0.04452386125922203,
-0.030733108520507812,
-0.02331298403441906,
0.019329864531755447,
0.0820128470659256,
-0.027982424944639206,
-0.03801977261900902,
-0.0199105404317379,
-0.058121129870414734,
0.0644681304693222,
-0.017062628641724586,
0.03089236654341221,
-0.005505488254129887,
-0.05545130372047424,
-0.0991501584649086,
0.03369343280792236,
-3.483978646109067e-33,
0.04816611856222153,
-0.006699849851429462,
0.041701748967170715,
-0.048725299537181854,
-0.05711397901177406,
-0.07595821470022202,
-0.02290455996990204,
0.05808784440159798,
-0.002889058319851756,
-0.0598030649125576,
0.030812611803412437,
-0.05721082165837288,
0.05366196855902672,
-0.0048481496050953865,
-0.02598046511411667,
0.03357749059796333,
0.004359823185950518,
-0.03301052376627922,
0.03599771484732628,
0.09703395515680313,
0.050613511353731155,
0.08980772644281387,
-0.006326179951429367,
0.036243338137865067,
-0.03483254835009575,
-0.010634534992277622,
0.02063778042793274,
-0.022748347371816635,
0.003303712932392955,
-0.013708666898310184,
0.010679537430405617,
-0.052392181009054184,
0.03420984372496605,
-0.02693340554833412,
-0.0032935806084424257,
-0.0833740234375,
-0.0017651768866926432,
-0.00004733079549623653,
0.02054394781589508,
0.06990867853164673,
0.0450863279402256,
-0.013490303419530392,
-0.03262997791171074,
-0.020955858752131462,
-0.02908356860280037,
-0.06915894150733948,
-0.0125275868922472,
-0.010783055797219276,
-0.04072997719049454,
0.01716475374996662,
0.029357464984059334,
-0.07650351524353027,
-0.055825814604759216,
0.03630548343062401,
0.053597234189510345,
-0.04809983819723129,
0.061716269701719284,
-0.018371110782027245,
-0.02891511656343937,
0.010601326823234558,
-0.04380553960800171,
0.01862567849457264,
0.06673721224069595,
-0.02910776063799858,
0.09615281224250793,
-0.002972947433590889,
-0.01584903709590435,
-0.06074120104312897,
-0.05919574201107025,
-0.046445123851299286,
0.06651480495929718,
0.015730395913124084,
-0.049658093601465225,
0.017019061371684074,
0.0428437814116478,
-0.009869995526969433,
0.046189554035663605,
0.03184843435883522,
0.04468877241015434,
0.10478030890226364,
-0.052412260323762894,
0.04228704795241356,
0.030793307349085808,
0.026233937591314316,
-0.021577958017587662,
-0.028526393696665764,
-0.051085229963064194,
0.040637072175741196,
-0.041968200355768204,
-0.02340644598007202,
-0.0225177351385355,
-0.06338877230882645,
-0.019764171913266182,
0.08294126391410828,
-0.06877611577510834,
-4.184353485925385e-8,
-0.10905230790376663,
0.05596869811415672,
-0.048389751464128494,
0.0729571059346199,
0.017484819516539574,
0.03721743822097778,
-0.05507386848330498,
0.045396048575639725,
-0.023180922493338585,
0.02755601331591606,
0.018830569460988045,
0.012701495550572872,
0.05701108276844025,
-0.08087913691997528,
0.04261702671647072,
-0.08196237683296204,
-0.021036744117736816,
-0.04199395328760147,
-0.03896316513419151,
0.02287805825471878,
0.0005575566901825368,
-0.018442383036017418,
-0.0159643292427063,
0.014267886988818645,
0.14734336733818054,
-0.004465546924620867,
0.030108369886875153,
0.02675301395356655,
0.07289908081293106,
0.07440061867237091,
-0.010599100030958652,
0.013662672601640224,
-0.0036718137562274933,
0.03090270236134529,
-0.062240805476903915,
0.01008523814380169,
0.008865120820701122,
-0.021574944257736206,
-0.022562474012374878,
0.05038902163505554,
0.06832853704690933,
-0.013762475922703743,
-0.0853278785943985,
0.06964241713285446,
0.09029453247785568,
-0.07476580888032913,
-0.008562657050788403,
0.03127577528357506,
0.060665108263492584,
-0.04548894613981247,
-0.08730223029851913,
-0.026631031185388565,
0.052072674036026,
-0.008991532027721405,
-0.06605047732591629,
-0.01515272632241249,
0.0467759445309639,
0.006306605879217386,
0.0017992843640968204,
0.07241939008235931,
0.09663401544094086,
0.025190506130456924,
-0.00892901886254549,
0.035463955253362656
] | 0.062249
|
) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/role-v1.md
|
[
-0.06336317956447601,
0.1303381621837616,
-0.03415534272789955,
0.005774844903498888,
0.06501493602991104,
-0.06291228532791138,
-0.007767433766275644,
-0.010255462490022182,
0.026137443259358406,
0.0022781621664762497,
-0.01881571300327778,
0.0253203846514225,
0.02397458627820015,
0.004801502451300621,
0.017846684902906418,
0.060251634567976,
0.026088228449225426,
-0.08135361224412918,
-0.021803615614771843,
-0.024607408791780472,
0.07837260514497757,
-0.009981397539377213,
-0.03324815258383751,
0.04610741510987282,
-0.02859416790306568,
0.007195896469056606,
-0.06258011609315872,
-0.00454474613070488,
0.04472525045275688,
0.05193641409277916,
-0.016927219927310944,
0.019216125831007957,
-0.07658741623163223,
-0.056414276361465454,
-0.060582030564546585,
0.03894906863570213,
0.0274722371250391,
-0.07198163866996765,
0.024981457740068436,
-0.04300541803240776,
0.026118161156773567,
0.05750096216797829,
-0.021053984761238098,
-0.016958221793174744,
0.0657011866569519,
-0.010380768217146397,
-0.007079220376908779,
0.010233602486550808,
-0.03949785977602005,
-0.01927424781024456,
0.012675772421061993,
0.014629801735281944,
0.06128610298037529,
0.053005628287792206,
-0.0554673857986927,
-0.04045731946825981,
-0.019325489178299904,
-0.06511159241199493,
0.03588412329554558,
0.002871289849281311,
0.04165738821029663,
-0.16446450352668762,
0.05443882569670677,
-0.03103160671889782,
-0.09214013814926147,
-0.0005294194561429322,
-0.06779171526432037,
-0.0030786884017288685,
-0.008181032724678516,
0.01083314511924982,
0.03535578399896622,
-0.03141992539167404,
-0.038499388843774796,
-0.03238895162940025,
0.12945689260959625,
-0.016540642827749252,
-0.06648147851228714,
-0.0432346910238266,
0.044115521013736725,
0.005758701357990503,
0.03998225927352905,
-0.13031162321567535,
0.013860155828297138,
0.07734479755163193,
-0.030096545815467834,
0.047524649649858475,
-0.012625881470739841,
0.07612867653369904,
0.03655710071325302,
-0.005525777116417885,
0.02719942480325699,
0.02887609973549843,
0.04483707994222641,
-0.00893201120197773,
-0.10789273679256439,
0.04058557003736496,
-0.02649235725402832,
-0.09220383316278458,
-0.08992109447717667,
0.05381324142217636,
0.11257018148899078,
0.010884985327720642,
0.033489879220724106,
-0.07574661821126938,
0.058906830847263336,
-0.02795860357582569,
0.08212897181510925,
0.034013066440820694,
0.020787186920642853,
0.05632798746228218,
-0.01428756769746542,
0.026514358818531036,
0.0072522456757724285,
0.05613845959305763,
-0.0215939749032259,
0.02468010038137436,
0.01025943923741579,
0.008586329407989979,
0.02361120656132698,
-0.024085253477096558,
0.1095898225903511,
0.01234125904738903,
-0.04949087277054787,
0.001099344459362328,
0.07298010587692261,
-0.07458857446908951,
0.023118233308196068,
-2.2676676416773758e-33,
0.07176078855991364,
0.08924853801727295,
-0.03662259131669998,
0.028515396639704704,
0.032466139644384384,
-0.019930342212319374,
0.04103854298591614,
-0.057717856019735336,
0.01967368833720684,
-0.016023127362132072,
-0.006115790456533432,
0.04453618824481964,
0.0679946020245552,
0.009594402275979519,
-0.10953108966350555,
-0.007889867760241032,
0.04926164448261261,
0.03929426148533821,
0.05484077334403992,
0.022365417331457138,
0.011798253282904625,
-0.017526201903820038,
0.020838521420955658,
0.04844001680612564,
0.0018731295131146908,
-0.0012290048180148005,
-0.032550401985645294,
0.02502562291920185,
-0.08073831349611282,
0.015094856731593609,
0.03280765935778618,
0.0054842750541865826,
0.018292194232344627,
-0.031871989369392395,
0.01782456785440445,
-0.015189926140010357,
0.079649917781353,
0.0009521862957626581,
-0.05993412807583809,
-0.08764245361089706,
0.018860338255763054,
-0.016215676441788673,
-0.09100167453289032,
-0.010534768924117088,
-0.014996268786489964,
-0.06057007610797882,
0.048598576337099075,
0.04761989414691925,
0.10959360003471375,
0.07941281050443649,
-0.13220621645450592,
0.043375078588724136,
-0.008589223958551884,
-0.060117367655038834,
-0.00831818487495184,
0.0039278920739889145,
-0.04877031594514847,
0.04890600964426994,
-0.04010903835296631,
-0.10677878558635712,
0.05164971575140953,
0.039743226021528244,
-0.041579533368349075,
-0.06033596768975258,
-0.03192441537976265,
-0.05468933656811714,
-0.04424421861767769,
0.03992919996380806,
-0.007311560213565826,
0.028150402009487152,
-0.00866925809532404,
0.050780635327100754,
0.020546583458781242,
0.017192956060171127,
-0.13491439819335938,
-0.05236174911260605,
-0.027800356969237328,
0.06424129009246826,
0.042933233082294464,
0.03523992747068405,
0.021741166710853577,
-0.044567208737134933,
-0.13541769981384277,
0.08641911298036575,
-0.010220126248896122,
0.06663773208856583,
-0.017438266426324844,
-0.016000479459762573,
-0.031383004039525986,
0.030224235728383064,
0.03727904334664345,
0.03273894637823105,
-0.015374931506812572,
-0.027875036001205444,
-0.052120789885520935,
3.5283199919787627e-34,
0.06808459758758545,
-0.00304419151507318,
-0.015566502697765827,
-0.019200399518013,
-0.04599323868751526,
-0.029168572276830673,
0.09915494173765182,
0.09426195919513702,
0.05878330394625664,
-0.024176061153411865,
0.07708702981472015,
-0.02043546549975872,
-0.006904250010848045,
0.020538026466965675,
0.01114993542432785,
-0.02603338472545147,
-0.04069165140390396,
0.054499272257089615,
0.036773428320884705,
-0.028356295078992844,
-0.03238809481263161,
-0.012662438675761223,
0.010614905506372452,
0.06683120131492615,
-0.1340383142232895,
0.0048609510995447636,
0.02068444900214672,
-0.044002898037433624,
-0.015124364756047726,
-0.04552405700087547,
0.05619208142161369,
0.04545973613858223,
-0.0030908675398677588,
0.035952962934970856,
0.06681714951992035,
-0.0989246815443039,
0.006357078440487385,
0.04694269970059395,
-0.00011220035958103836,
-0.02766142413020134,
0.04737389087677002,
0.013031107373535633,
-0.02633657306432724,
-0.0025520578492432833,
0.016323817893862724,
-0.05774080008268356,
0.07073728740215302,
-0.08823356032371521,
-0.010986609384417534,
-0.0494326576590538,
0.05097581073641777,
-0.058041203767061234,
0.08251554518938065,
-0.0049451906234025955,
0.003395603969693184,
-0.05927479267120361,
0.028449824079871178,
-0.014798867516219616,
0.06268354505300522,
0.0192886795848608,
0.009311029687523842,
-0.01576467789709568,
-0.01640176586806774,
0.08119450509548187,
0.017936458811163902,
-0.029909035190939903,
-0.06763336807489395,
-0.04141291230916977,
0.011979197151958942,
0.012002632021903992,
0.040199387818574905,
0.043776992708444595,
0.011887602508068085,
0.010004413314163685,
0.09359811991453171,
-0.07117517292499542,
-0.026726821437478065,
-0.06751735508441925,
-0.025583595037460327,
0.04304022341966629,
0.020631469786167145,
-0.0120322210714221,
-0.02926424704492092,
-0.04424193501472473,
-0.006950550712645054,
-0.07464119046926498,
-0.07255413383245468,
0.028485916554927826,
-0.05710965022444725,
-0.03157542645931244,
0.020553303882479668,
-0.042609039694070816,
-0.04273814335465431,
0.05012739822268486,
0.041676104068756104,
-2.6140757114490043e-8,
-0.0670090988278389,
0.08898643404245377,
0.02728784643113613,
-0.004785156808793545,
-0.03930055722594261,
0.09841661155223846,
0.016046904027462006,
-0.13851502537727356,
-0.05890349671244621,
-0.04398879036307335,
-0.026947323232889175,
-0.0267991591244936,
0.02080034464597702,
-0.01816716231405735,
0.03214512765407562,
-0.011199785396456718,
-0.04663095623254776,
0.025572963058948517,
0.019055671989917755,
-0.018428640440106392,
-0.03461119160056114,
-0.06044536083936691,
-0.01544987503439188,
-0.057264942675828934,
0.06095266342163086,
0.07961724698543549,
0.0026796222664415836,
0.06591012328863144,
-0.030454935505986214,
-0.00758178299292922,
-0.05383216589689255,
-0.01828937977552414,
0.006019506137818098,
-0.017725162208080292,
-0.06590618938207626,
0.014102454297244549,
-0.0034458923619240522,
0.016337081789970398,
-0.015646910294890404,
-0.04727867990732193,
-0.014751685783267021,
0.029472801834344864,
-0.09420356154441833,
0.0008921780390664935,
0.004407095722854137,
0.010726138949394226,
0.05468731001019478,
0.019770948216319084,
0.05967206135392189,
-0.10168474167585373,
0.05560614541172981,
-0.09775229543447495,
0.001041048439219594,
0.05874032899737358,
-0.08715365827083588,
-0.005449911113828421,
-0.0021613275166600943,
-0.04769551381468773,
-0.024955740198493004,
-0.026204638183116913,
0.24478735029697418,
0.053795091807842255,
0.0024004958104342222,
0.014605199918150902
] | 0.078445
|
`apiVersion: rbac.authorization.k8s.io/v1` `import "k8s.io/api/rbac/v1"` ## ClusterRole {#ClusterRole} ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: ClusterRole - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object's metadata. - \*\*aggregationRule\*\* (AggregationRule) AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller. \*AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\* - \*\*aggregationRule.clusterRoleSelectors\*\* ([][}}">LabelSelector]({{< ref )) \*Atomic: will be replaced during a merge\* ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added - \*\*rules\*\* ([]PolicyRule) \*Atomic: will be replaced during a merge\* Rules holds all the PolicyRules for this ClusterRole \*PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\* - \*\*rules.apiGroups\*\* ([]string) \*Atomic: will be replaced during a merge\* APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "" represents the core API group and "\*" represents all API groups. - \*\*rules.resources\*\* ([]string) \*Atomic: will be replaced during a merge\* Resources is a list of resources this rule applies to. '\*' represents all resources. - \*\*rules.verbs\*\* ([]string), required \*Atomic: will be replaced during a merge\* Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '\*' represents all verbs. - \*\*rules.resourceNames\*\* ([]string) \*Atomic: will be replaced during a merge\* ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - \*\*rules.nonResourceURLs\*\* ([]string) \*Atomic: will be replaced during a merge\* NonResourceURLs is a set of partial urls that a user should have access to. \*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. ## ClusterRoleList {#ClusterRoleList} ClusterRoleList is a collection of ClusterRoles --- - \*\*apiVersion\*\*: rbac.authorization.k8s.io/v1 - \*\*kind\*\*: ClusterRoleList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard object's metadata. - \*\*items\*\* ([][}}">ClusterRole]({{< ref )), required Items is a list of ClusterRoles ## Operations {#Operations} --- ### `get` read the specified ClusterRole #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRole - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRole]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind ClusterRole #### HTTP Request GET /apis/rbac.authorization.k8s.io/v1/clusterroles #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">ClusterRoleList]({{< ref )): OK 401: Unauthorized ### `create` create a ClusterRole #### HTTP Request POST /apis/rbac.authorization.k8s.io/v1/clusterroles ####
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1.md
|
[
-0.05161333084106445,
-0.01630842685699463,
-0.10402069985866547,
0.057047437876462936,
-0.005978832487016916,
0.038417235016822815,
0.04170594364404678,
-0.008109422400593758,
-0.04583430662751198,
0.02783353254199028,
-0.030112337321043015,
-0.05719013139605522,
0.06818032264709473,
0.009481092914938927,
-0.0035388008691370487,
0.009652978740632534,
0.0003174378362018615,
-0.012159748002886772,
-0.11657332628965378,
-0.030490564182400703,
0.023670434951782227,
-0.04747479036450386,
-0.04484660550951958,
0.0468965545296669,
-0.08389817923307419,
0.0021613636054098606,
-0.027707815170288086,
-0.055260706692934036,
0.00952874030917883,
-0.009911825880408287,
-0.05004424229264259,
0.012181724421679974,
0.048418376594781876,
0.0032714211847633123,
0.059772130101919174,
0.054474834352731705,
0.036805160343647,
-0.04067029431462288,
-0.06727845966815948,
0.003238164819777012,
0.05597059801220894,
0.07459887862205505,
-0.05973139405250549,
-0.04893171414732933,
-0.004384033381938934,
0.006452537141740322,
0.03201425075531006,
-0.02069993130862713,
-0.07487035542726517,
-0.026433536782860756,
0.04895603656768799,
-0.007480895146727562,
-0.01121867261826992,
0.04289316013455391,
0.04093291237950325,
0.02976042404770851,
-0.019337331876158714,
0.023744627833366394,
0.06014050170779228,
-0.04734667390584946,
0.025774119421839714,
-0.0577862374484539,
0.01336304098367691,
-0.049165189266204834,
-0.08629041165113449,
-0.012832459062337875,
-0.01831243932247162,
-0.008625758811831474,
0.02868427336215973,
-0.03616604954004288,
-0.00998683087527752,
-0.029062021523714066,
-0.05319303274154663,
0.024669766426086426,
0.056354038417339325,
0.06719941645860672,
0.0026997551321983337,
0.048923276364803314,
0.05241347849369049,
-0.1723233163356781,
-0.026495009660720825,
-0.0012226622784510255,
0.0015622598584741354,
0.09092816710472107,
-0.03878343105316162,
0.010566456243395805,
-0.007976748049259186,
-0.07937672734260559,
0.07022745907306671,
0.0618082731962204,
0.025175776332616806,
0.011400170624256134,
0.12978599965572357,
-0.12400763481855392,
-0.015335763804614544,
0.014661435037851334,
-0.05017233267426491,
-0.049604110419750214,
0.022773269563913345,
0.07963600009679794,
-0.0452645979821682,
-0.021161159500479698,
-0.044406868517398834,
0.03067849949002266,
-0.045210517942905426,
-0.027385937049984932,
-0.055113546550273895,
0.005011613015085459,
-0.0036791134625673294,
0.09601113200187683,
0.01823226734995842,
0.1114015206694603,
-0.04770216345787048,
-0.05628867819905281,
0.005509271286427975,
0.025539744645357132,
0.05284074321389198,
-0.06662283092737198,
0.038094885647296906,
0.030200619250535965,
0.0688030943274498,
-0.08447304368019104,
0.08149517327547073,
0.03956734389066696,
0.07329244166612625,
0.038510095328092575,
-0.09525222331285477,
6.078977199781302e-33,
-0.014991838485002518,
-0.0357975997030735,
-0.012547512538731098,
0.028693588450551033,
0.015048740431666374,
-0.02302420884370804,
-0.013923274353146553,
-0.04837070778012276,
-0.0492619089782238,
-0.04054902866482735,
-0.09746063500642776,
0.15729783475399017,
0.0253228060901165,
-0.07824166864156723,
0.028797689825296402,
0.04578759893774986,
-0.012048824690282345,
0.0986248105764389,
0.05485004186630249,
0.019998736679553986,
0.05412885546684265,
0.03744669631123543,
-0.00026810492272488773,
-0.013100532814860344,
0.020483646541833878,
0.0005499974940903485,
-0.04849116504192352,
-0.07686888426542282,
0.03998347371816635,
0.018858760595321655,
0.04195587337017059,
-0.022035343572497368,
-0.02939523197710514,
0.016936566680669785,
-0.032802753150463104,
0.012339599430561066,
-0.03251951187849045,
-0.011915521696209908,
-0.04641752317547798,
-0.07041851431131363,
-0.009509894996881485,
-0.013460785150527954,
-0.03998787701129913,
-0.04883655160665512,
0.013140594586730003,
-0.06509868055582047,
-0.039493925869464874,
0.007078784983605146,
0.08162448555231094,
0.00930298026651144,
-0.04765898361802101,
-0.021701721474528313,
0.14846915006637573,
-0.036656059324741364,
0.027334710583090782,
-0.02517903409898281,
0.02467077225446701,
0.04042908549308777,
0.045539312064647675,
-0.05891961231827736,
0.0878378227353096,
0.007988197728991508,
-0.03761989623308182,
0.07310661673545837,
0.02924971841275692,
0.03877699002623558,
-0.08119680732488632,
0.03200474753975868,
0.0871603786945343,
-0.05075836926698685,
-0.05802232399582863,
0.09681204706430435,
-0.021679392084479332,
0.07003539800643921,
-0.08516371995210648,
-0.12101219594478607,
0.0378325879573822,
0.0349385105073452,
-0.10679405927658081,
0.03032008744776249,
-0.06440708041191101,
-0.02604961208999157,
-0.006547034718096256,
0.051933858543634415,
-0.049586985260248184,
-0.10957109183073044,
0.024866586551070213,
-0.028092455118894577,
-0.007607549428939819,
-0.11788802593946457,
-0.021854398772120476,
-0.14083091914653778,
-0.03626825287938118,
0.0211320873349905,
-0.03691496327519417,
-7.620295678155055e-33,
0.10534393042325974,
-0.03418056666851044,
0.07674621045589447,
-0.055616747587919235,
0.01337980292737484,
-0.04145396873354912,
-0.05106831714510918,
0.002589814830571413,
0.006322171539068222,
-0.014425291679799557,
0.031645145267248154,
0.0007280602003447711,
0.0380164235830307,
0.01578967273235321,
0.048723768442869186,
-0.013875945471227169,
-0.08133060485124588,
-0.06173316016793251,
0.02832198515534401,
0.002811517333611846,
-0.1222895085811615,
-0.013232423923909664,
0.053637538105249405,
0.1067618876695633,
0.009517324157059193,
-0.055747222155332565,
-0.04041681066155434,
0.02281859517097473,
-0.00870555266737938,
0.009165383875370026,
-0.01153009757399559,
-0.039489779621362686,
-0.052567556500434875,
0.003897053422406316,
-0.06694001704454422,
-0.07800203561782837,
-0.00014599708083551377,
0.00411707628518343,
-0.026628904044628143,
-0.03903127834200859,
0.05730705335736275,
0.016242310404777527,
-0.022034592926502228,
0.022517019882798195,
0.02935621701180935,
0.020203324034810066,
0.059650126844644547,
0.0814291313290596,
-0.061855003237724304,
-0.07209628820419312,
0.04042042791843414,
-0.07680852711200714,
-0.003295572940260172,
0.05250456556677818,
-0.010974771343171597,
0.054629091173410416,
0.13023307919502258,
0.09538646042346954,
0.016720646992325783,
0.01608377881348133,
0.02192629873752594,
-0.10265833139419556,
-0.020688915625214577,
0.08920052647590637,
-0.056709662079811096,
-0.02496556006371975,
-0.008162204176187515,
-0.004341887775808573,
-0.03609658405184746,
-0.003925677854567766,
-0.016269085928797722,
-0.04090798646211624,
-0.014242611825466156,
0.0641619861125946,
0.03671564161777496,
-0.010387829504907131,
0.019076773896813393,
-0.027251483872532845,
0.00934742484241724,
-0.001815962023101747,
-0.07045367360115051,
-0.0316116139292717,
0.01624256931245327,
0.06544813513755798,
0.05243498459458351,
0.011992697604000568,
0.0501273050904274,
0.08034982532262802,
0.05445340275764465,
0.052622485905885696,
-0.10437051951885223,
-0.03032713755965233,
0.0031622860115021467,
0.04163425788283348,
-0.056739091873168945,
-5.909746647603242e-8,
-0.0370899960398674,
0.012586960569024086,
-0.037613071501255035,
0.05555495619773865,
0.044248465448617935,
0.04556389898061752,
-0.0614551417529583,
-0.03086390718817711,
-0.011598240584135056,
0.01680777594447136,
0.03568128123879433,
0.02250933274626732,
-0.06763892620801926,
-0.10705818235874176,
-0.006997646298259497,
0.05085744336247444,
-0.018323129042983055,
0.05973201245069504,
0.002366733504459262,
0.049653880298137665,
-0.009867502376437187,
-0.04547356814146042,
-0.0004489077255129814,
-0.06514193117618561,
0.02714400179684162,
-0.005221947096288204,
-0.042145080864429474,
0.013731698505580425,
0.024334756657481194,
0.01064634695649147,
0.05061788484454155,
-0.004883659537881613,
0.047792430967092514,
0.04515707120299339,
-0.0287676602602005,
0.024456385523080826,
-0.05044837296009064,
0.08459016680717468,
0.01324097067117691,
-0.00684083579108119,
0.022589322179555893,
0.056472498923540115,
-0.08075973391532898,
-0.01148844975978136,
0.042413219809532166,
0.07398752868175507,
-0.029778582975268364,
0.022849170491099358,
0.07066285610198975,
-0.00016853913257364184,
-0.04924144223332405,
-0.028645195066928864,
-0.03508266061544418,
0.04911337420344353,
-0.06490103900432587,
-0.03041357733309269,
-0.04011770710349083,
-0.047309018671512604,
0.10622470080852509,
0.006710672751069069,
0.024676071479916573,
0.041726186871528625,
0.0023117896635085344,
-0.014218895696103573
] | 0.175019
|
(\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">ClusterRoleList]({{< ref )): OK 401: Unauthorized ### `create` create a ClusterRole #### HTTP Request POST /apis/rbac.authorization.k8s.io/v1/clusterroles #### Parameters - \*\*body\*\*: [}}">ClusterRole]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRole]({{< ref )): OK 201 ([}}">ClusterRole]({{< ref )): Created 202 ([}}">ClusterRole]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified ClusterRole #### HTTP Request PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRole - \*\*body\*\*: [}}">ClusterRole]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRole]({{< ref )): OK 201 ([}}">ClusterRole]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified ClusterRole #### HTTP Request PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRole - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ClusterRole]({{< ref )): OK 201 ([}}">ClusterRole]({{< ref )): Created 401: Unauthorized ### `delete` delete a ClusterRole #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ClusterRole - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 202 ([}}">Status]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of ClusterRole #### HTTP Request DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles #### Parameters - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1.md
|
[
-0.027836471796035767,
0.09051409363746643,
-0.061265718191862106,
0.08027102798223495,
0.03591883182525635,
0.007837049663066864,
0.05019446462392807,
-0.021958500146865845,
0.00928399246186018,
0.008234499022364616,
-0.05476680397987366,
-0.08352206647396088,
0.07819949090480804,
-0.01837759278714657,
0.0076232491992414,
0.06454253941774368,
-0.008625688962638378,
-0.06672995537519455,
-0.0844910591840744,
-0.02507392317056656,
0.041203565895557404,
0.011799435131251812,
-0.057881660759449005,
0.040631003677845,
-0.05668512359261513,
-0.005332004278898239,
-0.0445014163851738,
-0.06365659087896347,
0.04322632774710655,
0.039316728711128235,
-0.044611118733882904,
-0.037225574254989624,
-0.05624403804540634,
0.017067333683371544,
0.13019655644893646,
0.09502720087766647,
0.05613366886973381,
-0.053730446845293045,
-0.06023736670613289,
-0.026700174435973167,
0.0956873893737793,
0.032887596637010574,
-0.06992732733488083,
-0.07187017798423767,
-0.009978113695979118,
-0.03699927031993866,
0.008452489040791988,
0.02102433331310749,
-0.10961335897445679,
-0.04067736864089966,
-0.051930539309978485,
-0.026899823918938637,
0.035652950406074524,
-0.014294245280325413,
0.04979165643453598,
-0.007849683053791523,
-0.06354600191116333,
0.01291657891124487,
0.016206521540880203,
-0.10344458371400833,
0.08401079475879669,
-0.16252224147319794,
0.02574366144835949,
-0.04761473089456558,
-0.08139380812644958,
-0.01728171482682228,
-0.039818938821554184,
-0.0068253278732299805,
0.0804164707660675,
-0.05109753459692001,
-0.07245487719774246,
0.004660648759454489,
-0.11532260477542877,
0.032065507024526596,
0.06874408572912216,
0.10636720806360245,
-0.03495965152978897,
-0.013695546425879002,
-0.0037437058053910732,
-0.07554429024457932,
0.0023693919647485018,
-0.12207400798797607,
-0.03138551861047745,
0.05904937908053398,
-0.0023880228400230408,
0.07254254817962646,
0.004655598662793636,
-0.06006777286529541,
0.07634270936250687,
-0.014660237357020378,
-0.013336539268493652,
0.046781279146671295,
0.0428449772298336,
-0.04707563295960426,
0.008080611005425453,
0.07397686690092087,
-0.07406575232744217,
-0.05809210240840912,
0.0207058135420084,
0.11619104444980621,
0.05421607196331024,
0.011901319958269596,
0.002988790860399604,
-0.01571859046816826,
0.011488964781165123,
-0.07443918287754059,
0.005684029310941696,
0.0564289428293705,
-0.008910258300602436,
0.068657286465168,
0.023231005296111107,
0.10347681492567062,
0.03053152747452259,
0.014887410216033459,
-0.01664140447974205,
0.03700150176882744,
0.1087716743350029,
-0.05860980600118637,
-0.0002209334634244442,
0.05963803455233574,
0.16040581464767456,
-0.014817247167229652,
-0.05951790139079094,
-0.0014170320937409997,
0.08300063014030457,
-0.06260884553194046,
-0.0025362204760313034,
4.73609796353169e-33,
0.11986837536096573,
0.002914595650509,
-0.027218276634812355,
-0.004728890024125576,
0.029102221131324768,
0.018583381548523903,
0.0490044504404068,
0.010331278666853905,
0.0345967672765255,
-0.04436584562063217,
-0.056690189987421036,
-0.027924710884690285,
0.08052809536457062,
-0.11041707545518875,
-0.0109765799716115,
0.01941107027232647,
0.03068464808166027,
0.07060820609331131,
0.07399557530879974,
-0.00510199973359704,
0.010984462685883045,
-0.0009007390472106636,
-0.053202081471681595,
0.0027310862205922604,
-0.045912329107522964,
-0.02616153098642826,
-0.030785851180553436,
-0.054385583847761154,
-0.026811549440026283,
-0.010436534881591797,
0.043278153985738754,
-0.04399324953556061,
-0.05798691511154175,
0.04957587271928787,
0.004951221402734518,
0.0036729145795106888,
0.0012125539360567927,
-0.029781322926282883,
-0.06533986330032349,
-0.05400719866156578,
-0.07684210687875748,
-0.007540849968791008,
-0.05127310752868652,
-0.03166913986206055,
0.028958017006516457,
-0.11964195221662521,
-0.039993613958358765,
-0.030811112374067307,
0.0780196338891983,
-0.017772410064935684,
-0.03907395899295807,
0.043670520186424255,
0.1304529905319214,
-0.07377143949270248,
0.06286879628896713,
0.0015102092875167727,
-0.005634043365716934,
0.05877035856246948,
-0.020775407552719116,
0.01430725771933794,
-0.019204718992114067,
-0.0027817764785140753,
0.0099315932020545,
-0.011182598769664764,
0.07683385163545609,
-0.02344999648630619,
0.006499171257019043,
0.056993599981069565,
0.014218918979167938,
-0.0013175209751352668,
-0.0204134713858366,
0.03347834199666977,
0.019201895222067833,
0.060705237090587616,
-0.08492786437273026,
-0.11718817800283432,
-0.001884814235381782,
0.046205073595047,
-0.03465612605214119,
0.040238190442323685,
0.029414184391498566,
-0.09618879109621048,
-0.03875252977013588,
0.08054690808057785,
-0.06603781133890152,
-0.040412578731775284,
-0.03519992530345917,
-0.05058087036013603,
0.020360425114631653,
-0.02645760588347912,
0.013913115486502647,
-0.02303679846227169,
-0.023009229451417923,
-0.0834718570113182,
-0.04811955615878105,
-5.2269990981144626e-33,
0.07471095770597458,
-0.04306837543845177,
0.01831796206533909,
-0.030561715364456177,
0.0005389074794948101,
-0.0558088943362236,
-0.005206500180065632,
0.04953043907880783,
0.01637793704867363,
-0.01512681134045124,
0.057293981313705444,
-0.03804120421409607,
0.05781978741288185,
0.011287279427051544,
0.004511258564889431,
0.06137007474899292,
0.012870056554675102,
-0.05324739217758179,
0.020705804228782654,
0.024286316707730293,
-0.033709920942783356,
0.051200494170188904,
0.02245992235839367,
0.06110123544931412,
-0.059275541454553604,
-0.015227409079670906,
0.017088202759623528,
-0.008159746415913105,
-0.07257464528083801,
0.010978834703564644,
0.0156768299639225,
0.0009805167792364955,
-0.03930038958787918,
0.05338625609874725,
0.004391808994114399,
-0.09270484000444412,
-0.017969829961657524,
0.0717741847038269,
-0.005778203252702951,
-0.00003639283386291936,
0.0867973044514656,
0.0059352293610572815,
0.0069453478790819645,
-0.006697279866784811,
0.021895555779337883,
-0.05846628546714783,
0.06157545745372772,
-0.009495950303971767,
-0.06949595361948013,
-0.007941423915326595,
0.019061092287302017,
-0.08214154094457626,
0.04090673476457596,
0.04662364721298218,
0.00462670624256134,
-0.013837228529155254,
0.07225538790225983,
0.04389900341629982,
-0.01609470136463642,
0.021409546956419945,
0.005674788728356361,
-0.04514631628990173,
0.014987476170063019,
0.047035641968250275,
0.032699696719646454,
-0.058300748467445374,
-0.024539155885577202,
-0.01901685632765293,
-0.04636339098215103,
-0.03705279901623726,
0.031923163682222366,
0.02278032898902893,
-0.024537457153201103,
0.04807450994849205,
0.0706871747970581,
-0.02289605885744095,
0.038673870265483856,
-0.021021239459514618,
-0.01818678341805935,
0.08429004997015,
-0.06044599786400795,
0.008959359489381313,
0.0023018119391053915,
0.04158347472548485,
0.02209944650530815,
-0.012064959853887558,
-0.07440612465143204,
0.06626586616039276,
-0.03512512519955635,
0.038929689675569534,
-0.06252343207597733,
-0.03165148198604584,
-0.026719652116298676,
0.06253127008676529,
-0.003232757095247507,
-5.0027122000528834e-8,
-0.0613577663898468,
0.04926033690571785,
-0.07103557139635086,
0.08347828686237335,
0.020244620740413666,
0.05842917412519455,
-0.049263983964920044,
-0.05887880548834801,
-0.06673870980739594,
-0.006611344404518604,
0.024617578834295273,
-0.00988901499658823,
0.02443608269095421,
-0.06175043061375618,
0.007755581755191088,
-0.06631757318973541,
-0.051605358719825745,
-0.006982441991567612,
-0.029919100925326347,
-0.02602187730371952,
0.010624374262988567,
-0.013442639261484146,
-0.02825211174786091,
-0.026010489091277122,
0.11316975951194763,
0.059420425444841385,
0.018345540389418602,
0.027216056361794472,
-0.01469127181917429,
-0.01501389779150486,
-0.02471655048429966,
0.0065834918059408665,
0.01968332938849926,
-0.0019139269134029746,
-0.08526773005723953,
0.017862411215901375,
-0.012433121912181377,
0.04658396542072296,
-0.039502449333667755,
0.0365004800260067,
0.05834667384624481,
0.1057998314499855,
-0.07857343554496765,
0.0309750996530056,
0.048142191022634506,
-0.04679422825574875,
0.03163729980587959,
0.059161990880966187,
0.11720282584428787,
-0.048111021518707275,
-0.016673218458890915,
-0.07773002237081528,
0.030105140060186386,
0.04008817300200462,
-0.06371058523654938,
-0.014335443265736103,
0.005111540202051401,
-0.0134606147184968,
0.023915745317935944,
0.0762215256690979,
0.13271258771419525,
0.00965995155274868,
-0.007625470869243145,
0.019993774592876434
] | 0.142695
|
`apiVersion: scheduling.k8s.io/v1alpha1` `import "k8s.io/api/scheduling/v1alpha1"` ## Workload {#Workload} Workload allows for expressing scheduling constraints that should be used when managing lifecycle of workloads from scheduling perspective, including scheduling, preemption, eviction and other phases. --- - \*\*apiVersion\*\*: scheduling.k8s.io/v1alpha1 - \*\*kind\*\*: Workload - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object's metadata. Name must be a DNS subdomain. - \*\*spec\*\* ([}}">WorkloadSpec]({{< ref )), required Spec defines the desired behavior of a Workload. ## WorkloadSpec {#WorkloadSpec} WorkloadSpec defines the desired state of a Workload. --- - \*\*podGroups\*\* ([]PodGroup), required \*Map: unique values on key name will be kept during a merge\* PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable. \*PodGroup represents a set of pods with a common scheduling policy.\* - \*\*podGroups.name\*\* (string), required Name is a unique identifier for the PodGroup within the Workload. It must be a DNS label. This field is immutable. - \*\*podGroups.policy\*\* (PodGroupPolicy), required Policy defines the scheduling policy for this PodGroup. \*PodGroupPolicy defines the scheduling configuration for a PodGroup.\* - \*\*podGroups.policy.basic\*\* (BasicSchedulingPolicy) Basic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior. \*BasicSchedulingPolicy indicates that standard Kubernetes scheduling behavior should be used.\* - \*\*podGroups.policy.gang\*\* (GangSchedulingPolicy) Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics. \*GangSchedulingPolicy defines the parameters for gang scheduling.\* - \*\*podGroups.policy.gang.minCount\*\* (int32), required MinCount is the minimum number of pods that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer. - \*\*controllerRef\*\* (TypedLocalObjectReference) ControllerRef is an optional reference to the controlling object, such as a Deployment or Job. This field is intended for use by tools like CLIs to provide a link back to the original workload definition. When set, it cannot be changed. \*TypedLocalObjectReference allows to reference typed object inside the same namespace.\* - \*\*controllerRef.kind\*\* (string), required Kind is the type of resource being referenced. It must be a path segment name. - \*\*controllerRef.name\*\* (string), required Name is the name of resource being referenced. It must be a path segment name. - \*\*controllerRef.apiGroup\*\* (string) APIGroup is the group for the resource being referenced. If APIGroup is empty, the specified Kind must be in the core API group. For any other third-party types, setting APIGroup is required. It must be a DNS subdomain. ## WorkloadList {#WorkloadList} WorkloadList contains a list of Workload resources. --- - \*\*apiVersion\*\*: scheduling.k8s.io/v1alpha1 - \*\*kind\*\*: WorkloadList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard list metadata. - \*\*items\*\* ([][}}">Workload]({{< ref )), required Items is the list of Workloads. ## Operations {#Operations} --- ### `get` read the specified Workload #### HTTP Request GET /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Workload - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Workload]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind Workload #### HTTP Request GET /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) ####
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/workload-v1alpha1.md
|
[
-0.1096378043293953,
0.06915158033370972,
0.01868635043501854,
-0.003941423259675503,
-0.05585925653576851,
-0.07128878682851791,
-0.020036257803440094,
-0.03029700741171837,
-0.0006570601835846901,
0.01781579479575157,
-0.11245952546596527,
-0.07107937335968018,
-0.03306426480412483,
0.03826073929667473,
0.05228655785322189,
0.013194557279348373,
0.009527930989861488,
-0.09685888141393661,
-0.050875239074230194,
-0.03290891647338867,
0.18685072660446167,
0.060581501573324203,
-0.029238417744636536,
-0.008022263646125793,
-0.07418136298656464,
-0.018247274681925774,
-0.1004653349518776,
0.05303454026579857,
0.054793260991573334,
-0.005168866366147995,
-0.0011435734340921044,
0.03525882959365845,
-0.10303819179534912,
0.009435889311134815,
0.13174685835838318,
0.12251834571361542,
-0.03531869500875473,
-0.02333075739443302,
-0.03569551557302475,
0.022471358999609947,
0.07609336078166962,
0.03227708488702774,
-0.05031448230147362,
-0.06891651451587677,
-0.0437869168817997,
0.020178047940135002,
0.0024421995040029287,
0.017701895907521248,
-0.057972315698862076,
-0.016508037224411964,
0.012028810568153858,
-0.09664066135883331,
0.06267121434211731,
0.018454894423484802,
0.08180491626262665,
0.03888239711523056,
-0.026127440854907036,
0.01344780158251524,
0.02745862863957882,
-0.05166935548186302,
0.0012046152260154486,
-0.05998861789703369,
0.05450623109936714,
-0.04552024230360985,
-0.016000639647245407,
0.007001882418990135,
-0.023749949410557747,
-0.029252512380480766,
-0.0020808340050280094,
0.004987494088709354,
-0.08553557842969894,
0.02340911701321602,
-0.08131403475999832,
0.039315540343523026,
0.038604456931352615,
0.013920843601226807,
0.010602274909615517,
0.007985252887010574,
0.031708866357803345,
-0.19615218043327332,
0.0420134961605072,
-0.039338368922472,
-0.07372594624757767,
0.01756211929023266,
-0.043130062520504,
-0.06437372416257858,
-0.027318084612488747,
-0.03754284977912903,
0.10580165684223175,
0.0018946408526971936,
0.01835150644183159,
-0.04746779054403305,
0.060481004416942596,
-0.06147124618291855,
0.06316648423671722,
0.0413491316139698,
-0.015613642521202564,
0.02948096953332424,
-0.026337290182709694,
0.09087049961090088,
-0.011448707431554794,
0.030379757285118103,
0.01498579140752554,
0.07181550562381744,
0.03018292225897312,
-0.01855476386845112,
-0.010336377657949924,
0.03491443395614624,
-0.07827654480934143,
0.06697507947683334,
0.011045719496905804,
0.08649539947509766,
0.050740908831357956,
-0.07104440033435822,
-0.0011404562974348664,
0.041442904621362686,
0.01824698969721794,
-0.01697126217186451,
0.027558425441384315,
0.013941771350800991,
0.060942407697439194,
-0.0897943526506424,
-0.0009975730208680034,
-0.011071073822677135,
-0.012997852638363838,
-0.03176656737923622,
0.001385160256177187,
6.393752546412433e-33,
0.04191035032272339,
-0.07073325663805008,
-0.012725455686450005,
0.008154907263815403,
0.03356684371829033,
-0.13649839162826538,
0.0531340129673481,
-0.0032957454677671194,
-0.05328362062573433,
-0.027123086154460907,
-0.10220059007406235,
0.052889883518218994,
-0.006639760918915272,
-0.07155612111091614,
-0.010882481001317501,
0.03629515320062637,
0.05843784660100937,
0.06236117333173752,
0.07889287918806076,
0.05268086493015289,
0.04576391726732254,
-0.09621555358171463,
-0.04411943629384041,
-0.04158066213130951,
-0.05935691297054291,
-0.011170664802193642,
0.0006785253062844276,
-0.10264116525650024,
0.021686367690563202,
-0.019313964992761612,
0.053942371159791946,
-0.02141435816884041,
-0.03233123943209648,
0.07702658325433731,
-0.054123278707265854,
-0.024990815669298172,
-0.01658056303858757,
0.003389984369277954,
-0.07083127647638321,
-0.03099844418466091,
0.03272777050733566,
0.040714286267757416,
-0.0750303640961647,
-0.027630746364593506,
-0.003432411700487137,
-0.0818898156285286,
-0.04245198145508766,
-0.005751074757426977,
0.07172766327857971,
0.05965760350227356,
0.041338227689266205,
-0.020537005737423897,
0.057806357741355896,
-0.09736315160989761,
0.00809946097433567,
-0.0029243219178169966,
0.025247648358345032,
-0.004120394121855497,
0.030407043173909187,
-0.03879210352897644,
-0.027114562690258026,
-0.012982506304979324,
-0.05131673440337181,
0.05383457988500595,
0.06725747883319855,
0.0062308888882398605,
-0.025312678888440132,
0.02789202332496643,
0.013198349624872208,
-0.00020108046010136604,
-0.05014340579509735,
0.07265543192625046,
-0.020060138776898384,
0.0368354432284832,
-0.009539863094687462,
-0.027288105338811874,
0.02347508631646633,
-0.06494678556919098,
-0.16153809428215027,
0.05184965953230858,
0.05428803712129593,
-0.0021804682910442352,
-0.06680969893932343,
0.00018747770809568465,
-0.009857095777988434,
-0.07333977520465851,
0.021264158189296722,
-0.054921120405197144,
0.008646810427308083,
-0.06838595122098923,
-0.013167998753488064,
-0.0683610662817955,
-0.04018303379416466,
-0.024639640003442764,
-0.03456177935004234,
-7.541313478039336e-33,
0.08189205080270767,
-0.025093382224440575,
-0.005916087422519922,
0.002862214809283614,
0.036422062665224075,
0.01129133440554142,
0.012759525328874588,
0.02104237675666809,
-0.02877352014183998,
0.06569143384695053,
-0.02233189158141613,
-0.04638594388961792,
0.07751619815826416,
-0.06101595237851143,
0.005864762235432863,
0.02708182856440544,
-0.0751902312040329,
-0.0362861342728138,
0.03583699092268944,
0.08221106231212616,
-0.04013506695628166,
0.0775320902466774,
-0.02214367873966694,
0.06272368878126144,
-0.016626231372356415,
-0.0036233174614608288,
-0.06065423786640167,
0.07634898275136948,
-0.07310645282268524,
-0.0028036837466061115,
-0.02277963235974312,
-0.02413506805896759,
-0.020167656242847443,
0.0005800084909424186,
0.015124879777431488,
-0.00015810696640983224,
-0.039393723011016846,
0.07536458969116211,
0.0343448668718338,
0.019164493307471275,
0.07673202455043793,
-0.02440517023205757,
-0.06817468255758286,
0.0037589101120829582,
0.011419188231229782,
-0.01590091735124588,
0.016167964786291122,
0.059017639607191086,
-0.03920396417379379,
-0.05976825952529907,
0.05839882418513298,
-0.017795901745557785,
-0.05856484919786453,
0.00940844789147377,
0.0781158059835434,
0.015769386664032936,
0.08805110305547714,
-0.03613502159714699,
0.02350994572043419,
0.06526020914316177,
0.05186423659324646,
-0.13099931180477142,
0.007026898209005594,
0.06379275023937225,
-0.004719363525509834,
-0.034014686942100525,
-0.03460982069373131,
-0.03618882969021797,
-0.023195670917630196,
0.008201714605093002,
-0.006830001249909401,
0.031174136325716972,
0.017307709902524948,
-0.01594322733581066,
0.07891732454299927,
-0.03781192749738693,
0.03807053714990616,
0.051581453531980515,
0.03538339585065842,
0.08415696769952774,
-0.09510304033756256,
0.056505102664232254,
0.011854189448058605,
-0.0054231868125498295,
-0.01013177540153265,
-0.004496943671256304,
0.04503275826573372,
0.10389736294746399,
-0.038660865277051926,
0.04485258087515831,
-0.03034522943198681,
-0.021444490179419518,
-0.018184881657361984,
0.06819627434015274,
-0.012326875701546669,
-5.577999218076002e-8,
0.03245222195982933,
0.0372467003762722,
-0.015832312405109406,
0.002995082875713706,
-0.023363634943962097,
-0.006207364611327648,
0.037065405398607254,
-0.03700113296508789,
0.05814303457736969,
-0.013422728516161442,
0.038208264857530594,
0.03690533712506294,
0.033135998994112015,
0.03249619901180267,
-0.022524384781718254,
0.011119376868009567,
-0.0019876286387443542,
0.06564772874116898,
-0.04285941272974014,
-0.025426756590604782,
0.026969125494360924,
-0.06864598393440247,
0.03522550314664841,
-0.12994197010993958,
0.09073647111654282,
0.011083844117820263,
0.02830539457499981,
-0.006706299725919962,
0.03988895192742348,
0.008544120006263256,
-0.04624348506331444,
0.03816401585936546,
-0.02357388287782669,
-0.013662452809512615,
-0.059389811009168625,
-0.017088059335947037,
-0.05798536166548729,
0.07119657844305038,
-0.005923717748373747,
0.04879168048501015,
0.04952195659279823,
0.0319269597530365,
-0.09427715092897415,
-0.01028791256248951,
0.10022721439599991,
0.037592533975839615,
-0.07148443162441254,
0.07438792288303375,
0.0020521406549960375,
0.008356872946023941,
-0.08144073933362961,
-0.01964135281741619,
0.008814455009996891,
0.0307298731058836,
-0.08113135397434235,
-0.03837490826845169,
-0.02281438745558262,
-0.04251774027943611,
0.0077771395444869995,
-0.019020147621631622,
0.10042466223239899,
0.07046417146921158,
0.01115106325596571,
-0.008647813461720943
] | 0.112899
|
) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">WorkloadList]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind Workload #### HTTP Request GET /apis/scheduling.k8s.io/v1alpha1/workloads #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">WorkloadList]({{< ref )): OK 401: Unauthorized ### `create` create a Workload #### HTTP Request POST /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Workload]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Workload]({{< ref )): OK 201 ([}}">Workload]({{< ref )): Created 202 ([}}">Workload]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified Workload #### HTTP Request PUT /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Workload - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Workload]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Workload]({{< ref )): OK 201 ([}}">Workload]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified Workload #### HTTP Request PATCH /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Workload - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">Workload]({{< ref )): OK 201 ([}}">Workload]({{< ref )): Created 401: Unauthorized ### `delete` delete a Workload #### HTTP Request DELETE /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the Workload - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 202 ([}}">Status]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of Workload #### HTTP Request DELETE /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads #### Parameters - \*\*namespace\*\* (\*in path\*): string, required [}}">namespace]({{< ref ) - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) -
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/workload-v1alpha1.md
|
[
-0.0007682449650019407,
0.14808164536952972,
0.0002102465514326468,
0.07888565957546234,
0.052202191203832626,
0.021399570629000664,
0.09296347945928574,
-0.010623044334352016,
0.024317432194948196,
-0.007416626438498497,
-0.07713700085878372,
-0.06937122344970703,
0.05840996280312538,
0.00685474369674921,
-0.015506756491959095,
0.04446346312761307,
-0.0269341841340065,
-0.05326288938522339,
-0.09565461426973343,
-0.006885180715471506,
0.09465577453374863,
0.027290092781186104,
-0.04537317901849747,
0.015843868255615234,
-0.058659400790929794,
0.013507675379514694,
-0.020404791459441185,
-0.048642560839653015,
0.037773799151182175,
0.05137276276946068,
-0.0923079252243042,
0.0038752062246203423,
-0.1205725222826004,
-0.03583783656358719,
0.11270983517169952,
0.0430036298930645,
0.06367580592632294,
-0.010364213958382607,
-0.02401834912598133,
-0.05447344481945038,
0.07228235900402069,
0.02005804516375065,
-0.04615219309926033,
-0.046350497752428055,
-0.010143698193132877,
-0.029228560626506805,
0.04696198180317879,
-0.02095261961221695,
-0.11130724102258682,
-0.03365539759397507,
-0.06687178462743759,
-0.007894829846918583,
0.002275425009429455,
-0.015195879153907299,
0.13558459281921387,
-0.01039169356226921,
-0.06005026027560234,
-0.05800418183207512,
-0.009717163629829884,
-0.05239754170179367,
0.028616979718208313,
-0.14068423211574554,
0.0062228781171143055,
-0.041573457419872284,
-0.05427732318639755,
-0.028380639851093292,
0.02322584018111229,
-0.003071707906201482,
0.08277265727519989,
-0.06371984630823135,
-0.11476994305849075,
0.02501748315989971,
-0.0959843248128891,
0.027060633525252342,
0.07524395734071732,
0.10319722443819046,
-0.028001444414258003,
-0.048401203006505966,
-0.022887295112013817,
-0.0895281434059143,
0.010732602328062057,
-0.1387505680322647,
-0.04157007113099098,
0.016455739736557007,
0.035857170820236206,
0.01622740924358368,
-0.0058686924166977406,
-0.040162716060876846,
0.1230224147439003,
0.018485480919480324,
-0.045800384134054184,
0.028744230046868324,
0.04906322807073593,
-0.002838556421920657,
0.03223264217376709,
0.06713586300611496,
-0.06876451522111893,
-0.0662451833486557,
0.013579494319856167,
0.09835564345121384,
0.07336173206567764,
0.05953805521130562,
0.007894283160567284,
-0.08941812068223953,
0.01695575751364231,
-0.04325462505221367,
0.0495450496673584,
0.045760996639728546,
-0.06004060059785843,
-0.011041889898478985,
0.0028389827348291874,
0.0746910497546196,
0.04302496463060379,
0.007241690065711737,
-0.0010888511314988136,
0.02766028605401516,
0.09171272814273834,
-0.04690494015812874,
-0.02918042056262493,
0.02546042390167713,
0.12050262093544006,
0.021681971848011017,
-0.030272584408521652,
-0.001370576093904674,
0.059345752000808716,
-0.07054721564054489,
-0.021364860236644745,
3.0311539776013363e-33,
0.13855719566345215,
0.026210829615592957,
-0.07353240251541138,
-0.019881248474121094,
-0.022136054933071136,
-0.003185634035617113,
0.0937647819519043,
0.06014679744839668,
0.04796973243355751,
0.011908750049769878,
-0.039910733699798584,
-0.027284720912575722,
0.004114913754165173,
-0.08182095736265182,
0.00942616444081068,
0.004434636794030666,
0.025389211252331734,
0.04485718533396721,
0.03974612429738045,
0.008439361117780209,
0.020931242033839226,
-0.006812738254666328,
-0.05071943625807762,
0.010131598450243473,
0.041055336594581604,
-0.028240831568837166,
-0.03402034565806389,
0.011892767623066902,
-0.05603628605604172,
-0.009601164609193802,
0.06833160668611526,
-0.05741467699408531,
-0.03896942734718323,
0.029946424067020416,
0.05115986615419388,
0.011367879807949066,
-0.041904009878635406,
-0.018478509038686752,
-0.006558123975992203,
-0.03148914873600006,
-0.10995451360940933,
-0.028327908366918564,
-0.04415096342563629,
-0.006326637230813503,
0.0346204899251461,
-0.08651052415370941,
-0.07211866229772568,
-0.023798910900950432,
0.022527920082211494,
-0.044215790927410126,
0.009368120692670345,
0.06288714706897736,
0.08421733230352402,
-0.06901849806308746,
0.0048082321882247925,
-0.02717253379523754,
-0.02850322052836418,
0.10021435469388962,
-0.012799584306776524,
0.05393663048744202,
-0.06341373920440674,
0.008849280886352062,
0.007139148190617561,
-0.03081716224551201,
0.06942405551671982,
0.0006202192162163556,
0.0077899484895169735,
0.0010169619927182794,
0.030003869906067848,
-0.03111386112868786,
-0.010544093325734138,
0.036188360303640366,
0.03384608402848244,
-0.021985867992043495,
-0.006922375876456499,
-0.07933918386697769,
-0.00469867093488574,
0.014940259046852589,
-0.03426686301827431,
0.025251023471355438,
0.049243103712797165,
-0.06357406079769135,
-0.014830762520432472,
0.07159194350242615,
-0.09576316922903061,
-0.03040906973183155,
-0.033953145146369934,
-0.06588118523359299,
0.010867354460060596,
-0.008458376862108707,
0.030158720910549164,
0.0036139171570539474,
-0.02288827672600746,
-0.10694911330938339,
0.033920422196388245,
-3.893176311153967e-33,
0.07636889815330505,
-0.01211009081453085,
0.04540710523724556,
-0.04455362260341644,
-0.045456793159246445,
-0.07929537445306778,
-0.024409471079707146,
0.04999489337205887,
0.020937342196702957,
-0.05949755385518074,
0.025400085374712944,
-0.061337340623140335,
0.03746834397315979,
-0.03446532413363457,
0.007263679523020983,
0.0631328821182251,
0.01358632743358612,
-0.04974362254142761,
0.01164566446095705,
0.06940681487321854,
0.006173205096274614,
0.07850667834281921,
0.015375849790871143,
0.020851051434874535,
-0.02909817546606064,
0.022513141855597496,
0.018768861889839172,
-0.03107655607163906,
-0.006155023351311684,
0.008465242572128773,
0.007525542285293341,
-0.018743475899100304,
0.013816126622259617,
-0.0020441298838704824,
0.012030870653688908,
-0.0803881362080574,
-0.0036543405149132013,
0.03674985095858574,
0.03429096192121506,
0.06419721990823746,
0.08994615823030472,
0.015245666727423668,
0.0006505762576125562,
-0.015681419521570206,
-0.029734492301940918,
-0.06370311230421066,
0.012996633537113667,
-0.02510698512196541,
-0.03381864354014397,
-0.0010484573431313038,
0.04943736270070076,
-0.0689779594540596,
-0.014449754729866982,
0.034271638840436935,
0.06934872269630432,
-0.043009888380765915,
0.07951567322015762,
-0.03147279843688011,
-0.02682298608124256,
0.019108250737190247,
-0.04414939880371094,
-0.013181162998080254,
0.04630529135465622,
0.011594558134675026,
0.062035102397203445,
-0.030899954959750175,
-0.020011764019727707,
-0.05062917247414589,
-0.0397159568965435,
-0.03616385906934738,
0.048703357577323914,
-0.0020484374836087227,
-0.05896620824933052,
-0.021692192181944847,
0.061571694910526276,
-0.017600247636437416,
0.056667622178792953,
-0.02101188525557518,
-0.009311330504715443,
0.12423060834407806,
-0.04280281439423561,
0.004360619001090527,
0.03807254880666733,
0.0025822992902249098,
-0.023868722841143608,
-0.03953450918197632,
-0.07832800596952438,
0.05428780987858772,
-0.03099861554801464,
0.007647523190826178,
-0.04273221641778946,
-0.04949565604329109,
-0.022503962740302086,
0.07393316924571991,
-0.015323632396757603,
-4.681577792098324e-8,
-0.09873320907354355,
0.04105567932128906,
-0.02013838104903698,
0.06550341844558716,
0.017677348107099533,
0.00887366570532322,
-0.05461208149790764,
0.011807717382907867,
-0.03827575966715813,
0.004736276809126139,
0.031908974051475525,
-0.02460130676627159,
0.06894171237945557,
-0.07567110657691956,
0.05409189686179161,
-0.07707289606332779,
-0.05230836197733879,
-0.020199669525027275,
-0.06076327711343765,
0.008211173117160797,
-0.0011146616889163852,
-0.03686483949422836,
-0.026983685791492462,
0.02390122599899769,
0.1376514732837677,
0.04296838119626045,
-0.0032475562766194344,
0.0019965539686381817,
0.050008613616228104,
0.06884810328483582,
-0.013604726642370224,
0.000301837659208104,
0.01341521181166172,
-0.0052016363479197025,
-0.09271159023046494,
0.012102201581001282,
0.0076364451088011265,
0.0008372318116016686,
-0.05141132324934006,
0.03570026904344559,
0.07974076271057129,
0.0239570289850235,
-0.07316605001688004,
0.08834760636091232,
0.06478726118803024,
-0.13087476789951324,
-0.0034440658055245876,
0.022802848368883133,
0.08418011665344238,
-0.03604850172996521,
-0.04242783039808273,
-0.029429521411657333,
0.04417865350842476,
-0.006345479749143124,
-0.08350618928670883,
-0.01737019047141075,
0.062350206077098846,
-0.014077032916247845,
0.03201078623533249,
0.05639217421412468,
0.13205887377262115,
-0.00386427016928792,
-0.006590450648218393,
0.049740325659513474
] | 0.05011
|
) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) #### Response 200 ([}}">Status]({{< ref )): OK 401: Unauthorized
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/workload-v1alpha1.md
|
[
-0.03394056484103203,
0.1293347030878067,
0.028201568871736526,
0.07010897248983383,
0.00038213504012674093,
0.03351960703730583,
0.08180303871631622,
-0.003983684349805117,
-0.05747383087873459,
-0.019455567002296448,
-0.0664769634604454,
-0.09724142402410507,
0.020117690786719322,
-0.06397856026887894,
0.04314539209008217,
0.08308247476816177,
-0.022429078817367554,
0.027391063049435616,
-0.08838772028684616,
0.059298306703567505,
0.08543073385953903,
0.04746314138174057,
-0.03526027500629425,
-0.0024774514604359865,
-0.07502099126577377,
0.05273756384849548,
-0.04536132514476776,
-0.0247590783983469,
0.035696741193532944,
0.012144804000854492,
-0.09688391536474228,
0.031179461628198624,
-0.07620559632778168,
0.05270814150571823,
0.07885226607322693,
0.05499648302793503,
0.010157852433621883,
0.01792391762137413,
-0.009052043780684471,
-0.01535453274846077,
0.0689442977309227,
0.04647727683186531,
-0.003001534380018711,
-0.012071797624230385,
0.023853285238146782,
-0.03030572459101677,
0.031669873744249344,
-0.04559342935681343,
-0.0980391651391983,
-0.003019434865564108,
-0.11879291385412216,
0.05192040279507637,
0.021614180877804756,
0.025098038837313652,
0.03850589320063591,
0.05379500985145569,
-0.04889732226729393,
-0.04661838337779045,
-0.02513114921748638,
-0.01758923940360546,
0.0122044887393713,
-0.05594008043408394,
-0.005151357036083937,
-0.025464912876486778,
-0.04760776460170746,
-0.0754430890083313,
-0.002890598028898239,
-0.02822745218873024,
0.10173992067575455,
-0.07434608042240143,
-0.10044742375612259,
0.013828345574438572,
-0.07319431751966476,
0.07764627039432526,
0.023229748010635376,
0.1320851892232895,
-0.02957950532436371,
-0.018165798857808113,
0.030555739998817444,
-0.058063000440597534,
0.0392758771777153,
-0.11123167723417282,
-0.039294034242630005,
-0.02238757535815239,
0.020378844812512398,
-0.007452743127942085,
-0.01157844252884388,
-0.10040988028049469,
0.06829166412353516,
0.051589395850896835,
0.018573282286524773,
-0.03940540552139282,
0.04002244025468826,
0.024679172784090042,
0.03991585969924927,
0.048958878964185715,
-0.07421904802322388,
-0.04945695027709007,
0.0630408227443695,
0.06077330932021141,
0.05326426774263382,
0.07387017458677292,
0.0013085539685562253,
-0.02625679038465023,
-0.08008822053670883,
-0.09559175372123718,
0.010119705460965633,
-0.00122735439799726,
-0.0347023643553257,
-0.003350351005792618,
0.0014586150646209717,
0.08575931936502457,
0.033838480710983276,
0.03595500439405441,
-0.020250562578439713,
0.00948956236243248,
0.01780770719051361,
-0.08645995706319809,
0.003763275220990181,
0.024196362122893333,
0.06435784697532654,
0.025733456015586853,
-0.059858258813619614,
0.024854283779859543,
0.033705223351716995,
0.03333823382854462,
-0.030247734859585762,
5.624549450852637e-33,
0.10639706254005432,
-0.029373105615377426,
-0.01954154670238495,
-0.040985189378261566,
-0.013263395056128502,
0.05701640620827675,
0.04543958976864815,
0.11148720979690552,
0.008439105935394764,
0.0382983535528183,
0.02227778546512127,
-0.022356931120157242,
-0.0025802019517868757,
-0.0822799876332283,
0.002588924253359437,
-0.024419542402029037,
-0.016254670917987823,
0.039428092539310455,
-0.03344619274139404,
-0.03767915815114975,
-0.0029529735911637545,
-0.010400383733212948,
-0.05399563908576965,
-0.014468386769294739,
-0.03546561300754547,
-0.0029022933449596167,
-0.061532557010650635,
0.03156473487615585,
0.006019135937094688,
0.0006747436709702015,
-0.00038584767025895417,
-0.07864831387996674,
0.008314701728522778,
0.06391457468271255,
0.026684680953621864,
0.046603310853242874,
0.030900700017809868,
-0.03567555174231529,
-0.016951216384768486,
-0.04114512354135513,
-0.18984287977218628,
-0.023495670408010483,
0.06008409708738327,
-0.017341570928692818,
0.021580299362540245,
-0.08823379874229431,
-0.07214963436126709,
0.0190432071685791,
0.033355411142110825,
-0.052052393555641174,
0.024435462430119514,
0.029003292322158813,
0.017113016918301582,
-0.0362757071852684,
0.026688899844884872,
0.038761481642723083,
-0.009613128378987312,
0.14477244019508362,
-0.029238538816571236,
0.06748276203870773,
-0.09409231692552567,
0.05328231304883957,
0.013203774578869343,
-0.05698268488049507,
0.054466914385557175,
0.034901779145002365,
0.05629701539874077,
0.026741916313767433,
0.03481091186404228,
-0.004309094976633787,
0.0024655063170939684,
0.016022954136133194,
-0.07434149831533432,
-0.020730022341012955,
-0.020808737725019455,
-0.06989580392837524,
0.009255153127014637,
-0.020750408992171288,
-0.030795658007264137,
0.04192189872264862,
-0.027489718049764633,
-0.025865841656923294,
0.030950428918004036,
0.10431704670190811,
-0.037994034588336945,
-0.024612700566649437,
-0.019047074019908905,
-0.04385986924171448,
0.06358987838029861,
-0.06386946886777878,
0.03700871020555496,
0.006718344520777464,
-0.06385847926139832,
-0.08857014775276184,
0.008491911925375462,
-5.8914355249732524e-33,
0.06441786885261536,
-0.05396883562207222,
0.009778911247849464,
-0.028954418376088142,
-0.03721432387828827,
-0.08150043338537216,
-0.02550985850393772,
0.061067890375852585,
0.01699051260948181,
-0.11034146696329117,
0.02342984266579151,
-0.02834388241171837,
0.07296930253505707,
-0.027978356927633286,
0.010023958049714565,
0.029755573719739914,
-0.0710693970322609,
-0.03599230945110321,
0.01931414008140564,
0.0967639610171318,
0.07299834489822388,
0.07142261415719986,
-0.0071457806043326855,
0.056284647434949875,
-0.02707827091217041,
-0.04835294559597969,
0.033897515386343,
-0.00002916847006417811,
0.0055641187354922295,
0.002701723715290427,
0.06265617161989212,
-0.03331621736288071,
0.005505892913788557,
-0.027683008462190628,
-0.01665957272052765,
-0.08027850836515427,
0.01705721579492092,
0.012072592973709106,
0.028318513184785843,
0.04259820282459259,
0.01690339855849743,
0.015948304906487465,
-0.04484185203909874,
-0.05645297095179558,
0.026916906237602234,
-0.09836594015359879,
-0.00981242023408413,
0.04202139377593994,
-0.009584993124008179,
0.017142627388238907,
-0.007559061516076326,
-0.10269005596637726,
-0.05239337310194969,
0.049603115767240524,
0.01370262447744608,
-0.046966489404439926,
0.038569770753383636,
-0.022158324718475342,
0.004701114259660244,
0.0005303291254676878,
-0.030567066743969917,
0.06595595180988312,
0.025316786020994186,
-0.02494068071246147,
0.09716632962226868,
-0.016815954819321632,
-0.02217193692922592,
-0.02340853586792946,
-0.07911049574613571,
-0.03532080724835396,
0.06218940019607544,
-0.014808210544288158,
-0.06941647082567215,
0.0440417118370533,
0.046699728816747665,
0.010318697430193424,
0.003589250613003969,
0.03974602371454239,
0.07196033000946045,
0.07537653297185898,
0.012885604053735733,
0.027504149824380875,
0.04221595451235771,
0.04695563763380051,
-0.040780581533908844,
-0.10841027647256851,
-0.04826976731419563,
0.056002695113420486,
-0.05340489745140076,
0.011312562972307205,
-0.03669041022658348,
-0.07201806455850601,
0.007981608621776104,
0.05201897397637367,
-0.021880866959691048,
-4.8550791831303286e-8,
-0.09947293996810913,
0.04238978028297424,
-0.05433241277933121,
0.07013063132762909,
0.04418464004993439,
-0.008024551905691624,
-0.04794681444764137,
0.05580351501703262,
-0.028230220079421997,
-0.009730416350066662,
0.04827422276139259,
0.027982061728835106,
0.02203245647251606,
-0.08792657405138016,
0.022297313436865807,
-0.07810036092996597,
-0.0020536137744784355,
-0.001975465565919876,
-0.04642963409423828,
0.03714538738131523,
0.010100559331476688,
-0.03096771612763405,
0.014439627528190613,
0.00789809413254261,
0.1317255049943924,
0.016395531594753265,
0.015202121809124947,
-0.01370682381093502,
0.06059735268354416,
0.06110677495598793,
-0.03707471489906311,
0.013994031585752964,
0.042998336255550385,
0.03425617516040802,
-0.06014598533511162,
0.0500449612736702,
-0.020637676119804382,
-0.053308043628931046,
-0.04739425331354141,
0.05535079538822174,
0.042099885642528534,
-0.025357291102409363,
-0.06230653449892998,
0.04318833723664284,
0.06618832796812057,
-0.11388649046421051,
0.05873151123523712,
0.0563129261136055,
0.09534942358732224,
-0.005676776170730591,
-0.09338265657424927,
-0.03431922197341919,
0.03502960130572319,
-0.05962299928069115,
-0.10117615014314651,
-0.009397458285093307,
0.01947883702814579,
0.08200334012508392,
-0.01888328604400158,
0.05378132313489914,
0.05285448953509331,
0.02724875882267952,
0.030597755685448647,
0.03749431297183037
] | 0.027443
|
`apiVersion: resource.k8s.io/v1` `import "k8s.io/api/resource/v1"` ## ResourceSlice {#ResourceSlice} ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver. At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple \, \, \. Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others. When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool. For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. --- - \*\*apiVersion\*\*: resource.k8s.io/v1 - \*\*kind\*\*: ResourceSlice - \*\*metadata\*\* ([}}">ObjectMeta]({{< ref )) Standard object metadata - \*\*spec\*\* ([}}">ResourceSliceSpec]({{< ref )), required Contains the information published by the driver. Changing the spec automatically increments the metadata.generation number. ## ResourceSliceSpec {#ResourceSliceSpec} ResourceSliceSpec contains the information published by the driver in one ResourceSlice. --- - \*\*driver\*\* (string), required Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. This field is immutable. - \*\*pool\*\* (ResourcePool), required Pool describes the pool that this ResourceSlice belongs to. \*ResourcePool describes the pool that ResourceSlices belong to.\* - \*\*pool.generation\*\* (int64), required Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted. Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state. - \*\*pool.name\*\* (string), required Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required. It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable. - \*\*pool.resourceSliceCount\*\* (int64), required ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero. Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool. - \*\*allNodes\*\* (boolean) AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. - \*\*devices\*\* ([]Device) \*Atomic: will be replaced during a
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
-0.08518325537443161,
0.029853329062461853,
-0.02369271218776703,
-0.022881286218762398,
0.037479378283023834,
-0.06526201963424683,
0.07874505966901779,
-0.021019266918301582,
0.025401337072253227,
-0.04350488260388374,
0.006211151368916035,
-0.049331966787576675,
0.0730685219168663,
0.033534836024045944,
-0.03994157165288925,
-0.004964577034115791,
0.02151208184659481,
-0.04105236753821373,
-0.0885479748249054,
0.0012425333261489868,
0.13521279394626617,
-0.037806641310453415,
0.010194624774158001,
-0.03933264687657356,
0.015075264498591423,
0.006110987160354853,
-0.005345042794942856,
-0.03990918770432472,
0.04239402338862419,
-0.06661953777074814,
-0.03887626901268959,
0.05523865297436714,
-0.02063857391476631,
-0.003684047842398286,
0.12499021738767624,
0.02240104041993618,
-0.10083328187465668,
-0.06430817395448685,
-0.06137373298406601,
0.05200577899813652,
0.01756887137889862,
-0.02179521508514881,
-0.06475787609815598,
0.01420680247247219,
-0.02783925086259842,
0.05224127322435379,
-0.05346665158867836,
-0.0019234517822042108,
-0.04325646162033081,
-0.0034887155052274466,
0.029179086908698082,
-0.017536325380206108,
-0.026939934119582176,
0.008078420534729958,
0.07814178615808487,
-0.07095563411712646,
-0.057874664664268494,
0.06921349465847015,
-0.005311646964401007,
0.07074469327926636,
0.0810471922159195,
-0.08221931755542755,
0.020550979301333427,
-0.0020729932002723217,
0.04881082475185394,
-0.022455265745520592,
0.03621607646346092,
0.019671659916639328,
0.003343268297612667,
-0.06230270117521286,
-0.008523224852979183,
0.07090272754430771,
-0.026848001405596733,
0.025064021348953247,
0.05159834399819374,
0.06176658719778061,
0.08520600944757462,
0.07420624047517776,
0.037325017154216766,
-0.16087841987609863,
-0.03268425539135933,
0.017112785950303078,
-0.04482538253068924,
-0.04110400751233101,
0.06473004072904587,
-0.04276801645755768,
-0.05810461938381195,
-0.011904858984053135,
0.06795036047697067,
0.030807817354798317,
-0.005234654992818832,
0.012396277859807014,
0.03532575070858002,
-0.041385624557733536,
0.07713749259710312,
0.09636572748422623,
-0.06660698354244232,
-0.038990046828985214,
-0.04369957000017166,
0.02524814009666443,
0.006214330438524485,
0.028021536767482758,
0.06596222519874573,
0.08538270741701126,
0.048369716852903366,
-0.11313974857330322,
-0.04969419166445732,
0.08985091000795364,
-0.04862090200185776,
-0.02586841583251953,
0.06481221318244934,
0.021593844518065453,
0.035359710454940796,
0.012372796423733234,
0.021894404664635658,
0.039643045514822006,
-0.00512940576300025,
0.026162564754486084,
0.05875440686941147,
0.092083640396595,
-0.018928753212094307,
-0.05633958801627159,
0.011731716804206371,
-0.031388625502586365,
-0.01824353262782097,
0.04788300022482872,
-0.02964596264064312,
5.964456132020379e-33,
-0.014784114435315132,
-0.04371047765016556,
0.013721135444939137,
-0.0030146215576678514,
-0.036353908479213715,
-0.11616163700819016,
-0.0037460473831743,
0.020645450800657272,
-0.06156296283006668,
-0.055096469819545746,
-0.08660116046667099,
0.0950143039226532,
-0.026354854926466942,
-0.001991432858631015,
0.034351810812950134,
-0.03145749866962433,
0.008158421143889427,
0.11514896899461746,
0.08831431716680527,
0.021710680797696114,
0.07486940175294876,
-0.030716178938746452,
-0.009592324495315552,
-0.03747186064720154,
0.03343508020043373,
-0.008551743812859058,
0.012779355980455875,
-0.0449582077562809,
-0.018987096846103668,
0.024647360667586327,
0.040493402630090714,
-0.04535629227757454,
-0.064600370824337,
-0.019539544358849525,
-0.03141601383686066,
-0.006115266587585211,
-0.06800277531147003,
-0.007057087495923042,
-0.0445365235209465,
-0.00994096789509058,
-0.034079570323228836,
0.049196671694517136,
-0.02709648385643959,
-0.007457450497895479,
-0.036582980304956436,
-0.08212682604789734,
-0.011715848930180073,
-0.027990974485874176,
-0.07250301539897919,
0.04907545447349548,
-0.020845428109169006,
-0.01360173150897026,
0.06531170755624771,
-0.0400322861969471,
0.010837660171091557,
-0.0222749225795269,
0.043847426772117615,
0.03488341346383095,
0.01231178268790245,
0.009832230396568775,
0.013125312514603138,
0.00963407289236784,
-0.09385569393634796,
0.07608562707901001,
0.0677969753742218,
0.05154413729906082,
0.05280302092432976,
-0.04286612197756767,
0.008946853689849377,
0.01194022037088871,
-0.0403122752904892,
-0.01350721437484026,
0.009955360554158688,
0.008748102001845837,
-0.008635247126221657,
-0.08490388095378876,
-0.010304274037480354,
0.014018477872014046,
-0.17717236280441284,
0.026860032230615616,
-0.05241779983043671,
0.04166826605796814,
0.005197049118578434,
0.0071650538593530655,
-0.12935465574264526,
-0.0689001977443695,
0.020717991515994072,
-0.043136946856975555,
0.005504500586539507,
-0.028405968099832535,
0.05898880958557129,
0.002364153042435646,
-0.04809337109327316,
-0.05244306102395058,
-0.02616293728351593,
-4.8527903897637725e-33,
0.04837668687105179,
-0.023234711959958076,
0.07936746627092361,
-0.02988259121775627,
0.0003927673096768558,
-0.04758442938327789,
-0.030690861865878105,
-0.016757098957896233,
-0.025234192609786987,
-0.056243304163217545,
-0.028688862919807434,
0.021111521869897842,
0.03624044731259346,
-0.04528350755572319,
-0.0004109936417080462,
0.010854486376047134,
-0.10020988434553146,
-0.005990872625261545,
0.0519929900765419,
0.05046992003917694,
-0.07974148541688919,
0.09802735596895218,
0.06172511726617813,
0.032386161386966705,
-0.025572519749403,
-0.006465307902544737,
-0.08533083647489548,
-0.008927556686103344,
0.018273992463946342,
-0.03271619975566864,
0.021439621224999428,
-0.12131333351135254,
-0.05846763774752617,
0.017438208684325218,
0.011171729303896427,
-0.03590443357825279,
0.027734696865081787,
0.04244985058903694,
0.004205461125820875,
0.08165422081947327,
0.059678349643945694,
-0.04180070757865906,
0.022283723577857018,
0.028449740260839462,
0.0006207286496646702,
-0.03395301476120949,
0.046287450939416885,
-0.06766921281814575,
-0.04667232185602188,
-0.11087680608034134,
0.0836266502737999,
0.011776058003306389,
-0.06866121292114258,
0.0055193412117660046,
0.0074060880579054356,
0.03134431317448616,
0.1016044020652771,
0.09869756549596786,
-0.03240479901432991,
-0.0463351309299469,
0.07342593371868134,
-0.08325643092393875,
-0.012020104564726353,
0.031467240303754807,
-0.038774631917476654,
0.013764587230980396,
-0.009370311163365841,
-0.03500589728355408,
0.005643828772008419,
-0.015356926247477531,
-0.030785679817199707,
0.0035393154248595238,
0.01175118237733841,
-0.024643300101161003,
-0.005008203908801079,
-0.020459186285734177,
-0.016716107726097107,
0.019123680889606476,
0.056436002254486084,
0.01477685384452343,
-0.13391251862049103,
0.05424300208687782,
0.023400481790304184,
0.0814116969704628,
0.018527502194046974,
-0.029806504026055336,
0.11982909590005875,
0.02445993758738041,
0.0202541034668684,
0.000024035443857428618,
-0.08116775006055832,
-0.024083109572529793,
-0.10231100767850876,
0.15523295104503632,
-0.06405451893806458,
-5.3039919123420987e-8,
0.04415949806571007,
-0.0021204014774411917,
-0.0613858588039875,
0.054813046008348465,
0.056423965841531754,
-0.04756341874599457,
-0.02252599410712719,
0.04926808550953865,
0.030277902260422707,
0.06045592948794365,
0.04771732538938522,
-0.003760342253372073,
0.03311479091644287,
0.033130303025245667,
0.06437205523252487,
0.012167341075837612,
0.017419544979929924,
0.07819037139415741,
-0.04783652722835541,
-0.00024646639940328896,
0.015035894699394703,
-0.0020207145716995,
-0.003011042019352317,
-0.007201205473393202,
0.0960831269621849,
-0.014637391082942486,
0.022143276408314705,
-0.017377380281686783,
0.0172430332750082,
-0.032711438834667206,
0.0014099559048190713,
-0.0276242196559906,
-0.0024797790683805943,
0.04198678955435753,
0.041383516043424606,
0.05921434611082077,
-0.08322177827358246,
0.07509166747331619,
0.06795405596494675,
0.13060693442821503,
-0.03181874752044678,
-0.016697634011507034,
-0.04509840905666351,
0.05586261674761772,
0.08809995651245117,
0.027261650189757347,
-0.08110660314559937,
-0.025070393458008766,
-0.06200133264064789,
0.011724361218512058,
-0.049939729273319244,
-0.02877151221036911,
-0.028525272384285927,
0.026081405580043793,
-0.030120255425572395,
-0.013532211072742939,
-0.005378309637308121,
-0.045966342091560364,
0.04443277046084404,
-0.003270606743171811,
0.0505342036485672,
0.09867440164089203,
0.027267953380942345,
-0.03798558935523033
] | 0.179585
|
this to check whether they have seen all ResourceSlices belonging to the same pool. - \*\*allNodes\*\* (boolean) AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. - \*\*devices\*\* ([]Device) \*Atomic: will be replaced during a merge\* Devices lists some or all of the devices in this pool. Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64. Only one of Devices and SharedCounters can be set in a ResourceSlice. \*Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.\* - \*\*devices.name\*\* (string), required Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. - \*\*devices.allNodes\*\* (boolean) AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. - \*\*devices.allowMultipleAllocations\*\* (boolean) AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. - \*\*devices.attributes\*\* (map[string]DeviceAttribute) Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. \*DeviceAttribute must have exactly one field set.\* - \*\*devices.attributes.bool\*\* (boolean) BoolValue is a true/false value. - \*\*devices.attributes.int\*\* (int64) IntValue is a number. - \*\*devices.attributes.string\*\* (string) StringValue is a string. Must not be longer than 64 characters. - \*\*devices.attributes.version\*\* (string) VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. - \*\*devices.bindingConditions\*\* ([]string) \*Atomic: will be replaced during a merge\* BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. - \*\*devices.bindingFailureConditions\*\* ([]string) \*Atomic: will be replaced during a merge\* BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to "True", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. - \*\*devices.bindsToNode\*\* (boolean) BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. - \*\*devices.capacity\*\* (map[string]DeviceCapacity) Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. \*DeviceCapacity describes a quantity associated with a device.\* - \*\*devices.capacity.value\*\* ([}}">Quantity]({{< ref )), required Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
-0.018380029127001762,
0.02129014953970909,
-0.027048448100686073,
-0.024769535288214684,
0.021748248487710953,
-0.06175283342599869,
0.09896587580442429,
-0.05590766668319702,
-0.0173138789832592,
-0.03697497025132179,
0.02636837214231491,
-0.08482486754655838,
0.06912615895271301,
-0.017352735623717308,
-0.06980303674936295,
0.04109195992350578,
-0.013904314488172531,
-0.056541550904512405,
-0.023077189922332764,
0.019735030829906464,
0.051781319081783295,
0.009956298395991325,
-0.062396157532930374,
-0.04926636070013046,
-0.02423851191997528,
0.04642559960484505,
-0.03469916060566902,
-0.051820751279592514,
0.05296587571501732,
-0.038264475762844086,
-0.02361682616174221,
0.02937636524438858,
-0.020735964179039,
0.0602409727871418,
0.1554500311613083,
0.00335712730884552,
-0.06876396387815475,
-0.05859626829624176,
-0.08551408350467682,
0.006170580163598061,
0.0413157157599926,
-0.008227838203310966,
-0.006418412551283836,
0.03692462295293808,
-0.07492174208164215,
0.10090355575084686,
-0.07712063938379288,
0.02458580955862999,
-0.0062504117377102375,
-0.07135304808616638,
0.01884242333471775,
0.002281156135722995,
0.06277593225240707,
-0.04420259967446327,
0.06652885675430298,
-0.02181931771337986,
-0.023303817957639694,
-0.016710078343749046,
-0.03538793325424194,
0.05417552962899208,
0.024578366428613663,
-0.044629983603954315,
-0.005578388459980488,
-0.0073164114728569984,
0.0730283185839653,
0.0057338266633450985,
0.03171313554048538,
0.018014291301369667,
-0.001231527654454112,
-0.02513444982469082,
0.0037416417617350817,
0.10330789536237717,
-0.055846672505140305,
0.04960498958826065,
0.02503257617354393,
0.07703056931495667,
-0.0017641430022194982,
0.02627112902700901,
0.0019202837720513344,
-0.182402104139328,
-0.07061517238616943,
0.0012038047425448895,
-0.005790065973997116,
-0.01778985559940338,
0.04283769801259041,
0.0546153225004673,
-0.07089242339134216,
0.012892236933112144,
-0.0039057962130755186,
0.09124292433261871,
-0.03794555738568306,
0.03354334831237793,
-0.057633448392152786,
-0.02425197698175907,
0.026926496997475624,
0.1388104408979416,
-0.10014472156763077,
-0.028442708775401115,
-0.03650641813874245,
0.044637035578489304,
0.01788119040429592,
0.0343070849776268,
0.03232646360993385,
0.020624374970793724,
-0.00754094123840332,
-0.04584129899740219,
0.005665359552949667,
0.026116307824850082,
0.0465058758854866,
-0.002067526802420616,
0.04856879264116287,
0.037553392350673676,
0.020208559930324554,
-0.004337824881076813,
0.005476230755448341,
-0.027644939720630646,
0.02513035386800766,
0.02332925610244274,
0.026115965098142624,
0.016795802861452103,
-0.042206645011901855,
-0.006956356577575207,
-0.05273682251572609,
-0.062319014221429825,
0.027292074635624886,
0.06110197305679321,
-0.04845467209815979,
8.134485559879525e-33,
0.03153478354215622,
-0.03672683611512184,
-0.00856977328658104,
0.017628367990255356,
-0.021350152790546417,
-0.043857771903276443,
0.00052715337369591,
0.058831214904785156,
-0.07314127683639526,
-0.04167554900050163,
-0.05307108163833618,
0.04121142253279686,
-0.007324320264160633,
-0.057751137763261795,
0.0240532997995615,
-0.04247560352087021,
0.09296352416276932,
0.03393047675490379,
0.09690137207508087,
0.014755196869373322,
0.016639722511172295,
-0.02936491370201111,
-0.04764486104249954,
-0.010741169564425945,
-0.047119803726673126,
0.01564794033765793,
-0.030854975804686546,
-0.020042479038238525,
0.08097125589847565,
0.019124070182442665,
-0.00823727622628212,
-0.033015504479408264,
-0.0007135630585253239,
0.05159882456064224,
0.07075785845518112,
0.03922446072101593,
-0.023062504827976227,
-0.0032142747659236193,
-0.012220567092299461,
-0.054924242198467255,
-0.08514286577701569,
-0.04771925136446953,
-0.03852080926299095,
-0.036413710564374924,
-0.07895790040493011,
-0.13270942866802216,
-0.05236939713358879,
-0.02845657616853714,
-0.030311837792396545,
0.08519674092531204,
0.010382936336100101,
-0.03464319929480553,
0.009130111895501614,
-0.053878236562013626,
0.014024283736944199,
-0.02673802524805069,
-0.022201212123036385,
0.057454850524663925,
0.009014665149152279,
0.12384625524282455,
0.0027894270606338978,
0.04482950642704964,
-0.07899320125579834,
0.0324220135807991,
0.08899220079183578,
0.057214703410863876,
0.04794944450259209,
-0.05722114071249962,
0.026987383142113686,
0.004215584602206945,
-0.05105036124587059,
-0.00239391322247684,
0.01650264672935009,
0.0029558390378952026,
-0.046970758587121964,
-0.02358774095773697,
-0.05691463500261307,
-0.013721424154937267,
-0.11036309599876404,
0.014934481121599674,
-0.0475548654794693,
0.028977978974580765,
0.020146295428276062,
0.003844308899715543,
-0.10368650406599045,
-0.027380814775824547,
-0.040690649300813675,
-0.04262492433190346,
-0.008279113098978996,
0.03931846469640732,
0.10463742911815643,
-0.050197817385196686,
-0.0055376263335347176,
-0.04862302914261818,
-0.05087556689977646,
-8.695529911743802e-33,
-0.029590262100100517,
0.00206821970641613,
0.027204979211091995,
-0.03179091960191727,
0.016122473403811455,
-0.08050950616598129,
-0.04838176071643829,
-0.0032736442517489195,
-0.026683811098337173,
-0.059992577880620956,
0.03608625754714012,
0.020142175257205963,
0.0376109704375267,
-0.08830638229846954,
-0.00032307833316735923,
0.04301988705992699,
0.0031284778378903866,
-0.017944717779755592,
0.029054265469312668,
0.09815926104784012,
-0.03261177986860275,
0.14861008524894714,
0.05850430205464363,
0.038831304758787155,
-0.044559042900800705,
-0.0021688565611839294,
-0.054011210799217224,
-0.03599762171506882,
0.04152853041887283,
-0.047359731048345566,
0.06485678255558014,
-0.051145344972610474,
-0.005826272070407867,
-0.00643489696085453,
0.04301242157816887,
-0.10289465636014938,
0.019083527848124504,
0.07427377253770828,
0.01966448314487934,
0.0133077222853899,
0.08761454373598099,
-0.034063734114170074,
-0.061491142958402634,
0.017498783767223358,
0.04716187343001366,
0.005382591392844915,
-0.07488593459129333,
-0.046084437519311905,
-0.050046347081661224,
-0.010663041844964027,
0.0032950714230537415,
-0.07158902287483215,
0.021486110985279083,
0.04192201420664787,
-0.0038112655747681856,
0.025628404691815376,
0.08316206932067871,
0.0428517647087574,
0.028507625684142113,
-0.037348613142967224,
0.0634959414601326,
-0.08935204893350601,
-0.11743370443582535,
0.0888693556189537,
-0.0026236511766910553,
0.019820626825094223,
-0.03544553741812706,
0.011266032233834267,
-0.04824918508529663,
-0.03728366643190384,
-0.015129799023270607,
0.023140491917729378,
-0.054845474660396576,
-0.014528500847518444,
-0.05648914724588394,
-0.029255017638206482,
-0.009886844083666801,
-0.02687741443514824,
-0.006952229887247086,
0.09974997490644455,
-0.13738586008548737,
0.11923321336507797,
-0.056779637932777405,
0.04940640926361084,
0.02751772850751877,
-0.04460682347416878,
0.060993682593107224,
0.04675407335162163,
-0.029998717829585075,
0.020943889394402504,
-0.08583224564790726,
-0.001223064260557294,
-0.07032250612974167,
0.08797264099121094,
-0.06585580855607986,
-5.2963120111826356e-8,
-0.028674263507127762,
0.039255570620298386,
-0.0487896166741848,
0.025747058913111687,
0.05370671674609184,
-0.022894354537129402,
0.024415651336312294,
0.0260334350168705,
0.022786937654018402,
0.11014141887426376,
0.05895295366644859,
-0.011545807123184204,
-0.013098667375743389,
-0.05213450267910957,
0.0686015635728836,
-0.008280692622065544,
0.019060317426919937,
-0.028810620307922363,
-0.03746175393462181,
-0.008377404883503914,
0.011589490808546543,
-0.0710853636264801,
-0.025365032255649567,
0.07214674353599548,
0.006975756958127022,
-0.030705636367201805,
0.0450923778116703,
-0.016713198274374008,
-0.030103998258709908,
0.00988983828574419,
-0.00881004799157381,
-0.028502417728304863,
0.01358101051300764,
0.01372587215155363,
0.016773609444499016,
0.13319694995880127,
-0.03985162824392319,
0.03480146452784538,
0.08468838781118393,
0.11233560740947723,
-0.09834671765565872,
0.05160291865468025,
-0.006742938421666622,
0.05293445661664009,
0.09003392606973648,
0.002332406584173441,
-0.09148160368204117,
0.00212692329660058,
-0.03140727058053017,
-0.014648503623902798,
-0.022627687081694603,
-0.007949969731271267,
-0.03411266580224037,
0.09843436628580093,
-0.07626201212406158,
0.035803403705358505,
0.030093969777226448,
-0.034964632242918015,
-0.037367064505815506,
0.05481712892651558,
0.05173706263303757,
0.12106715142726898,
-0.01261720061302185,
0.004486467689275742
] | 0.16929
|
32. \*DeviceCapacity describes a quantity associated with a device.\* - \*\*devices.capacity.value\*\* ([}}">Quantity]({{< ref )), required Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. - \*\*devices.capacity.requestPolicy\*\* (CapacityRequestPolicy) RequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations. The Device must have allowMultipleAllocations set to true in order to set a requestPolicy. If unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value. \*CapacityRequestPolicy defines how requests consume device capacity. Must not set more than one ValidRequestValues.\* - \*\*devices.capacity.requestPolicy.default\*\* ([}}">Quantity]({{< ref )) Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. - \*\*devices.capacity.requestPolicy.validRange\*\* (CapacityRequestPolicyRange) ValidRange defines an acceptable quantity value range in consuming requests. If this field is set, Default must be defined and it must fall within the defined ValidRange. If the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated. If the request doesn't contain this capacity entry, Default value is used. \*CapacityRequestPolicyRange defines a valid range for consumable capacity values. - If the requested amount is less than Min, it is rounded up to the Min value. - If Step is set and the requested amount is between Min and Max but not aligned with Step, it will be rounded up to the next value equal to Min + (n \* Step). - If Step is not set, the requested amount is used as-is if it falls within the range Min to Max (if set). - If the requested or rounded amount exceeds Max (if set), the request does not satisfy the policy, and the device cannot be allocated.\* - \*\*devices.capacity.requestPolicy.validRange.min\*\* ([}}">Quantity]({{< ref )), required Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. - \*\*devices.capacity.requestPolicy.validRange.max\*\* ([}}">Quantity]({{< ref )) Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. - \*\*devices.capacity.requestPolicy.validRange.step\*\* ([}}">Quantity]({{< ref )) Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. - \*\*devices.capacity.requestPolicy.validValues\*\* ([][}}">Quantity]({{< ref )) \*Atomic: will be replaced during a merge\* ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. - \*\*devices.consumesCounters\*\* ([]DeviceCounterConsumption) \*Atomic: will be replaced during a merge\* ConsumesCounters defines a list of references to sharedCounters and the set of
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
-0.012700199149549007,
-0.0125034861266613,
-0.05021464824676514,
0.004583386704325676,
-0.023692181333899498,
-0.05458763241767883,
0.057889118790626526,
-0.0014443147229030728,
-0.012578061781823635,
0.0068501359783113,
-0.020571501925587654,
-0.08561595529317856,
0.07467929273843765,
0.03083108551800251,
-0.017368637025356293,
0.007285174448043108,
0.001686152652837336,
-0.11076221615076065,
-0.11230004578828812,
0.07041864842176437,
0.1641654074192047,
0.0016062578652054071,
0.018848944455385208,
0.003998106345534325,
-0.035451408475637436,
-0.05295395106077194,
-0.047365929931402206,
-0.012515387497842312,
0.05979021638631821,
0.00007438601460307837,
0.024147991091012955,
0.03151926398277283,
0.006039700470864773,
-0.005586316343396902,
0.13094143569469452,
-0.028522321954369545,
-0.046317845582962036,
-0.06825321167707443,
-0.04105105623602867,
0.03748342767357826,
-0.004614022094756365,
-0.01571117714047432,
-0.05913250148296356,
0.03767692670226097,
-0.06605421006679535,
0.03492835909128189,
-0.05529485642910004,
0.002687476808205247,
-0.07406197488307953,
-0.03704800829291344,
0.04197176918387413,
0.0497625358402729,
-0.03421927988529205,
0.047012876719236374,
0.005406634882092476,
0.018663795664906502,
-0.016665618866682053,
0.013443336822092533,
0.03653061389923096,
-0.008764130063354969,
-0.038011468946933746,
-0.06911754608154297,
-0.006299815606325865,
0.016261322423815727,
0.031220491975545883,
0.014635131694376469,
-0.02312161959707737,
-0.012529406696557999,
-0.04696691408753395,
0.04906514286994934,
-0.06887995451688766,
0.043869201093912125,
-0.057934682816267014,
0.006816353648900986,
0.05889899283647537,
0.032008036971092224,
-0.016052667051553726,
0.04094644635915756,
0.007922292686998844,
-0.10387908667325974,
-0.018071237951517105,
-0.040616367012262344,
-0.034564193338155746,
-0.0016985262045636773,
0.038672588765621185,
-0.07400193065404892,
-0.053994495421648026,
0.036022432148456573,
0.014234340749680996,
0.03392768278717995,
0.01490915659815073,
0.0953793153166771,
-0.01858038455247879,
0.05640330910682678,
0.009545326232910156,
0.03853094205260277,
-0.03314857929944992,
-0.10188831388950348,
-0.0395723357796669,
0.03148697316646576,
-0.00878213532269001,
-0.000667389074806124,
0.020220430567860603,
0.03675570338964462,
-0.0023016927298158407,
-0.10363278537988663,
-0.012554297223687172,
0.030055783689022064,
-0.03843962773680687,
0.0511053241789341,
0.0897696241736412,
0.04406186193227768,
-0.004672438837587833,
0.03456147387623787,
0.04170976206660271,
0.11906559020280838,
0.001057340414263308,
0.026598304510116577,
0.058690715581178665,
-0.045909494161605835,
-0.07545046508312225,
-0.040153682231903076,
0.008213454857468605,
-0.14762462675571442,
-0.002288334770128131,
0.0047121793031692505,
0.05376160889863968,
9.399335848463538e-33,
-0.04711715131998062,
-0.07521877437829971,
-0.038273248821496964,
-0.05470119044184685,
-0.0059623089618980885,
0.009048660285770893,
-0.003113322891294956,
0.1258881837129593,
-0.033582691103219986,
-0.07828836888074875,
0.03107268735766411,
0.05120224878191948,
-0.008012093603610992,
0.008980792947113514,
0.0680994912981987,
-0.033111460506916046,
0.05573848634958267,
0.10288535803556442,
0.10090108960866928,
-0.009700155816972256,
0.023590127006173134,
-0.017313113436102867,
-0.039985574781894684,
0.031015845015645027,
0.011734751984477043,
0.013708109967410564,
-0.022153247147798538,
-0.01553602796047926,
0.026965880766510963,
0.031281378120183945,
-0.002610229654237628,
0.02844306454062462,
-0.017659911885857582,
-0.0024449198972433805,
0.061148758977651596,
0.04984017089009285,
-0.029698433354496956,
-0.02577509917318821,
-0.03018251433968544,
-0.053280193358659744,
-0.06053127720952034,
-0.019489724189043045,
0.015985477715730667,
-0.022787122055888176,
-0.11607116460800171,
-0.15115851163864136,
-0.00757732056081295,
-0.0405430905520916,
-0.04138513654470444,
0.10266774892807007,
-0.010567469522356987,
0.016302840784192085,
-0.016593167558312416,
-0.11452404409646988,
-0.015558750368654728,
-0.055620018392801285,
-0.03961705043911934,
0.018840007483959198,
0.03798111155629158,
0.049765024334192276,
0.0037469910457730293,
0.0023546728771179914,
0.019874386489391327,
-0.03249700739979744,
0.0718824490904808,
0.13373282551765442,
0.013465190306305885,
-0.07725101709365845,
0.03223670646548271,
0.0073138633742928505,
-0.010644836351275444,
-0.02316964417695999,
0.015210987068712711,
0.046297986060380936,
-0.06004849821329117,
0.02034231834113598,
0.005900368560105562,
-0.017218803986907005,
-0.08346579223871231,
-0.00804827455431223,
-0.07662881165742874,
0.04926289618015289,
-0.017450695857405663,
0.0275092963129282,
-0.09111744910478592,
-0.08829981833696365,
0.006470858119428158,
-0.03437543660402298,
-0.011138146743178368,
0.04067251458764076,
-0.0124699417501688,
-0.03516014292836189,
-0.05876750871539116,
-0.010361420921981335,
-0.04920012876391411,
-8.995602762782023e-33,
0.02455371618270874,
0.014391069300472736,
-0.02791827917098999,
0.011717609129846096,
0.014984800480306149,
-0.08270647376775742,
0.01667410135269165,
-0.004632061813026667,
0.07130822539329529,
-0.04136788100004196,
-0.0223354771733284,
-0.03293914720416069,
-0.023891044780611992,
-0.06665521115064621,
-0.05078817531466484,
-0.01563025452196598,
-0.06559272855520248,
-0.07336453348398209,
0.029777344316244125,
0.07651717215776443,
0.005610592197626829,
0.06840278953313828,
0.05257253348827362,
0.04052693396806717,
0.0010675993980839849,
0.011377483606338501,
-0.053891681134700775,
0.027468504384160042,
0.04024312272667885,
-0.04016543924808502,
0.008116130717098713,
-0.1345916986465454,
-0.015270221047103405,
0.0012509645894169807,
0.034466490149497986,
-0.04391854256391525,
0.036401182413101196,
0.08412483334541321,
0.01955369859933853,
0.04473794996738434,
0.15698398649692535,
-0.030244950205087662,
0.005008155480027199,
0.0251332875341177,
0.0788043811917305,
-0.041146326810121536,
0.03802274167537689,
-0.045188385993242264,
0.006360562983900309,
-0.0840100571513176,
0.04407445713877678,
-0.028175294399261475,
-0.00522354943677783,
0.11803165078163147,
-0.012263932265341282,
0.0476185567677021,
0.09660772234201431,
-0.048711348325014114,
0.017262481153011322,
-0.0733058899641037,
0.09188520908355713,
-0.045212771743535995,
-0.062230534851551056,
0.07008634507656097,
0.02292504720389843,
-0.043994151055812836,
0.00018789467867463827,
-0.1489836424589157,
0.005811837036162615,
-0.031095417216420174,
-0.0006261294474825263,
-0.07084456831216812,
0.06678001582622528,
0.02584662288427353,
-0.029222318902611732,
0.0035017887130379677,
-0.019343676045536995,
-0.056428782641887665,
-0.004906307905912399,
0.05069686472415924,
-0.10202015191316605,
0.11600824445486069,
-0.0033722389489412308,
0.06638140231370926,
-0.036220140755176544,
-0.03937627002596855,
0.021012818440794945,
0.029301859438419342,
-0.006609342526644468,
0.04519812762737274,
-0.042784616351127625,
0.009512661956250668,
-0.0501297228038311,
0.10690072923898697,
-0.04289962351322174,
-5.546892722918528e-8,
0.015279615297913551,
0.03609664365649223,
0.02449975535273552,
0.06048030033707619,
0.0044810958206653595,
-0.06911322474479675,
0.02501632459461689,
-0.09705402702093124,
0.03957255929708481,
0.02043384499847889,
0.0946330577135086,
-0.006082513369619846,
-0.019025413319468498,
-0.016671128571033478,
-0.02309650182723999,
0.05126778408885002,
0.001525163184851408,
-0.0015621986240148544,
-0.03045639954507351,
0.015080933459103107,
-0.0076248361729085445,
-0.07250580191612244,
0.014111259952187538,
-0.02305181324481964,
0.057872042059898376,
0.03560533747076988,
-0.003127304371446371,
0.04732522368431091,
-0.029569001868367195,
-0.00854481291025877,
0.013259133324027061,
-0.004262212663888931,
0.05655080825090408,
-0.0036861535627394915,
-0.016986636444926262,
0.028603199869394302,
-0.0875907614827156,
-0.006575785111635923,
0.016839517280459404,
0.06091124564409256,
0.034752100706100464,
-0.016394557431340218,
-0.05985351651906967,
0.03513604775071144,
0.13134706020355225,
0.02264874428510666,
-0.10913584381341934,
0.06888716667890549,
-0.015607590787112713,
0.04983634129166603,
-0.05660383775830269,
0.0008203114848583937,
0.0033780201338231564,
0.05382491275668144,
-0.04499948397278786,
0.0069874487817287445,
0.017247483134269714,
-0.021855182945728302,
-0.016534695401787758,
0.024097401648759842,
0.08304674923419952,
0.13251134753227234,
-0.03808389604091644,
-0.0312443058937788
] | 0.079145
|
That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. - \*\*devices.consumesCounters\*\* ([]DeviceCounterConsumption) \*Atomic: will be replaced during a merge\* ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The maximum number of device counter consumptions per device is 2. \*DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet.\* - \*\*devices.consumesCounters.counterSet\*\* (string), required CounterSet is the name of the set from which the counters defined will be consumed. - \*\*devices.consumesCounters.counters\*\* (map[string]Counter), required Counters defines the counters that will be consumed by the device. The maximum number of counters is 32. \*Counter describes a quantity associated with a device.\* - \*\*devices.consumesCounters.counters.value\*\* ([}}">Quantity]({{< ref )), required Value defines how much of a certain device counter is available. - \*\*devices.nodeName\*\* (string) NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. - \*\*devices.nodeSelector\*\* (NodeSelector) NodeSelector defines the nodes where the device is available. Must use exactly one term. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. \*A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.\* - \*\*devices.nodeSelector.nodeSelectorTerms\*\* ([]NodeSelectorTerm), required \*Atomic: will be replaced during a merge\* Required. A list of node selector terms. The terms are ORed. \*A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\* - \*\*devices.nodeSelector.nodeSelectorTerms.matchExpressions\*\* ([][}}">NodeSelectorRequirement]({{< ref )) \*Atomic: will be replaced during a merge\* A list of node selector requirements by node's labels. - \*\*devices.nodeSelector.nodeSelectorTerms.matchFields\*\* ([][}}">NodeSelectorRequirement]({{< ref )) \*Atomic: will be replaced during a merge\* A list of node selector requirements by node's fields. - \*\*devices.taints\*\* ([]DeviceTaint) \*Atomic: will be replaced during a merge\* If specified, these are the driver-defined taints. The maximum number of taints is 16. If taints are set for any device in a ResourceSlice, then the maximum number of allowed devices per ResourceSlice is 64 instead of 128. This is an alpha field and requires enabling the DRADeviceTaints feature gate. \*The device this taint is attached to has the "effect" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.\* - \*\*devices.taints.effect\*\* (string), required The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None. Possible enum values: - `"NoExecute"` Evict any already-running pods that do not tolerate the device taint. - `"NoSchedule"` Do not allow new pods to schedule which use a tainted device unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. - `"None"` No effect, the taint is purely informational. - \*\*devices.taints.key\*\* (string), required The taint key to be applied to a device. Must be a label name. - \*\*devices.taints.timeAdded\*\* (Time) TimeAdded represents the time at which the taint was added. Added automatically during
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
0.00915487576276064,
-0.011571750976145267,
-0.07156295329332352,
-0.0013476754538714886,
-0.05140109732747078,
-0.00965173915028572,
0.11305984109640121,
0.08342134952545166,
-0.044007886201143265,
-0.013679103925824165,
0.027609823271632195,
-0.11886031925678253,
0.09324502944946289,
-0.033900149166584015,
-0.03405899927020073,
0.02572455257177353,
0.015899762511253357,
-0.08841197192668915,
-0.059500496834516525,
-0.0048062303103506565,
0.06298719346523285,
0.04672296717762947,
-0.021371429786086082,
-0.005993373692035675,
-0.017299162223935127,
-0.0037076009903103113,
-0.03602621704339981,
-0.017443237826228142,
0.07150117307901382,
0.057112038135528564,
0.0256013423204422,
0.04355527460575104,
0.030720794573426247,
0.0538884662091732,
0.14701303839683533,
-0.030406102538108826,
0.0019453195855021477,
-0.11398052424192429,
-0.044688839465379715,
0.012778899632394314,
0.00014132604701444507,
-0.009460017085075378,
-0.0608014315366745,
0.023082787171006203,
-0.08428480476140976,
0.08065679669380188,
-0.0894601047039032,
-0.015790317207574844,
-0.0617801733314991,
-0.025578001514077187,
0.038348488509655,
0.0847410187125206,
-0.012262239120900631,
-0.005772805772721767,
0.03808671981096268,
0.003732975572347641,
0.009811141528189182,
-0.047988198697566986,
0.007227081805467606,
-0.005045272409915924,
-0.013678234070539474,
-0.09106740355491638,
-0.012054761871695518,
0.01479081716388464,
0.050332147628068924,
-0.010777215473353863,
-0.005543808452785015,
0.01333148218691349,
0.01446012407541275,
0.03912874683737755,
-0.07489921152591705,
0.02616131119430065,
0.007682385854423046,
0.01570849120616913,
0.007262773346155882,
-0.020159894600510597,
-0.02021765150129795,
-0.060537081211805344,
0.019839854910969734,
-0.1546003669500351,
-0.03941183537244797,
-0.027984844520688057,
-0.014371991157531738,
-0.022402962669730186,
0.057033684104681015,
-0.03724665194749832,
-0.02344372496008873,
-0.0051442766562104225,
0.02823728509247303,
0.082103431224823,
-0.014414932578802109,
0.04219348728656769,
0.06700406968593597,
0.07193893194198608,
0.04645616561174393,
0.08749110996723175,
-0.08159865438938141,
-0.04217540845274925,
-0.03762819617986679,
0.03947124630212784,
-0.016242412850260735,
-0.01139986701309681,
0.010447428561747074,
0.028121493756771088,
-0.004573342390358448,
-0.12025588750839233,
-0.03342938423156738,
-0.005239767022430897,
-0.017453409731388092,
0.02433965727686882,
0.08438564836978912,
0.02579483389854431,
0.012413445860147476,
-0.009269164875149727,
0.0034972992725670338,
0.03944997116923332,
0.05441570281982422,
0.02894037961959839,
0.08615322411060333,
-0.00859798677265644,
-0.001832399982959032,
-0.02813519909977913,
-0.015550840646028519,
-0.09698062390089035,
0.010022931732237339,
0.012723545543849468,
0.012611553072929382,
5.339753985613275e-33,
-0.04578305780887604,
-0.047050852328538895,
-0.026109538972377777,
-0.04622989520430565,
-0.030630849301815033,
-0.03005071170628071,
0.0005512014031410217,
0.04648096486926079,
-0.03531597554683685,
-0.02481263130903244,
0.032143957912921906,
0.05139778554439545,
-0.015081626363098621,
0.05356888845562935,
0.04600897431373596,
-0.05542018264532089,
0.08167015016078949,
0.11317140609025955,
0.04190269485116005,
-0.047297410666942596,
-0.02495403401553631,
0.005584574304521084,
-0.005137230269610882,
0.008974474854767323,
-0.016656573861837387,
0.06802263110876083,
-0.03289763629436493,
0.02342979796230793,
-0.0160457082092762,
0.019977277144789696,
0.06465917825698853,
0.004223362542688847,
0.03778413310647011,
0.04254298657178879,
0.09235575050115585,
0.04683821648359299,
0.05435977503657341,
-0.027361271902918816,
-0.0192909836769104,
-0.04477386549115181,
-0.058683544397354126,
-0.051011357456445694,
0.004966074600815773,
-0.012788312509655952,
-0.1247730478644371,
-0.13909639418125153,
-0.033039335161447525,
0.02576451562345028,
0.002241510199382901,
0.06544347107410431,
0.01692855916917324,
-0.028135592117905617,
0.0037175226025283337,
-0.0005790766444988549,
-0.02502364292740822,
-0.043500933796167374,
-0.08269938081502914,
-0.023221906274557114,
0.04835939407348633,
0.08928650617599487,
-0.06512227654457092,
0.02499731071293354,
-0.043851304799318314,
0.06462132185697556,
0.06373430043458939,
0.09190566837787628,
0.038291219621896744,
-0.0406917929649353,
0.0094535481184721,
0.018084339797496796,
-0.0414726696908474,
0.025386743247509003,
0.010012767277657986,
0.013350130058825016,
-0.04156823083758354,
0.014567901380360126,
0.0732489600777626,
-0.013488993979990482,
-0.1377466917037964,
-0.017215479165315628,
-0.08016686141490936,
0.08292946219444275,
-0.022337377071380615,
-0.016524648293852806,
-0.08325633406639099,
-0.017032096162438393,
-0.03964156284928322,
-0.004855445120483637,
0.02755206823348999,
0.0142514081671834,
0.03809977322816849,
-0.09326033294200897,
-0.06483016908168793,
-0.0005384473479352891,
-0.07503118366003036,
-5.860244884400137e-33,
0.02160792425274849,
0.026791440322995186,
0.013266365975141525,
-0.004085294436663389,
0.0017781035276129842,
-0.08552314341068268,
0.06723961234092712,
-0.03896656259894371,
0.03130948171019554,
-0.05785147845745087,
-0.006447410676628351,
0.031078975647687912,
0.034365214407444,
-0.06914651393890381,
0.031394340097904205,
-0.013166001997888088,
-0.04064813256263733,
-0.052122812718153,
0.06449820846319199,
0.02395448088645935,
0.060167811810970306,
0.04992401972413063,
0.029553426429629326,
0.013275192119181156,
-0.06224798038601875,
0.020441288128495216,
-0.0746917650103569,
-0.017515743151307106,
0.09461738169193268,
-0.05085806921124458,
0.09757411479949951,
-0.07319481670856476,
0.003861402627080679,
-0.009948080405592918,
0.028192272409796715,
-0.10993152856826782,
0.08865368366241455,
0.04017156362533569,
-0.026142146438360214,
0.035750821232795715,
0.07965212315320969,
-0.030278995633125305,
-0.03159604221582413,
0.01953648217022419,
0.06772902607917786,
-0.012318556196987629,
0.0268674548715353,
-0.003281485289335251,
0.001973803387954831,
-0.1107519119977951,
0.060719430446624756,
-0.06137371435761452,
-0.01295858807861805,
0.07656268775463104,
-0.015568854287266731,
0.0441235788166523,
0.05262429639697075,
-0.01132349856197834,
0.0846283808350563,
-0.07859736680984497,
0.06321495026350021,
-0.06204808130860329,
-0.05568422004580498,
0.06374319642782211,
0.023680122569203377,
-0.0008073437493294477,
-0.04694489762187004,
-0.09370724111795425,
-0.03825651854276657,
-0.03761974349617958,
0.0147393262013793,
0.02320896089076996,
-0.015183329582214355,
-0.0807197168469429,
-0.07584459334611893,
-0.013651594519615173,
-0.05128595978021622,
-0.05960288271307945,
0.027266740798950195,
0.048206452280282974,
-0.11735738068819046,
0.07727618515491486,
0.009098086506128311,
0.02972584404051304,
-0.026136912405490875,
-0.0951000303030014,
0.026594052091240883,
0.050876982510089874,
-0.01503255870193243,
0.041826143860816956,
-0.10612451285123825,
-0.007134182844310999,
-0.002943858504295349,
0.06024859473109245,
-0.09556180983781815,
-4.565302091918966e-8,
-0.028748780488967896,
-0.0023237678688019514,
-0.024256791919469833,
0.007504765409976244,
0.06512961536645889,
-0.011911934241652489,
0.010743629187345505,
-0.03249245882034302,
0.03240548074245453,
0.00830854382365942,
0.07884850353002548,
-0.010316088795661926,
0.009087659418582916,
-0.06978826969861984,
-0.013205205090343952,
0.008607189171016216,
0.007486438378691673,
-0.014732982032001019,
-0.014022202230989933,
0.03507737070322037,
-0.015092453919351101,
-0.033421099185943604,
0.04338797181844711,
-0.027104264125227928,
0.005149704869836569,
0.06026428937911987,
0.1193527951836586,
0.09787973761558533,
-0.021327871829271317,
-0.021325169131159782,
-0.02842988818883896,
0.016039324924349785,
0.056717582046985626,
0.01011472288519144,
0.00270755379460752,
0.0686148852109909,
-0.06399181485176086,
0.009338484145700932,
0.01973509043455124,
0.057689301669597626,
-0.06385249644517899,
-0.01447757612913847,
-0.041305407881736755,
0.06397629529237747,
0.04214473441243172,
0.005165395326912403,
-0.1197819858789444,
0.04051128774881363,
-0.04156589135527611,
-0.010515488684177399,
-0.06980253756046295,
0.021878667175769806,
-0.01717369817197323,
0.060850974172353745,
-0.10305152833461761,
0.023268073797225952,
0.012103387154638767,
-0.06573477387428284,
-0.06138221547007561,
0.066189706325531,
0.06980323791503906,
0.12959876656532288,
0.006036515347659588,
-0.031117189675569534
] | 0.152452
|
allow all already-running pods to continue running. - `"None"` No effect, the taint is purely informational. - \*\*devices.taints.key\*\* (string), required The taint key to be applied to a device. Must be a label name. - \*\*devices.taints.timeAdded\*\* (Time) TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set. \*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.\* - \*\*devices.taints.value\*\* (string) The taint value corresponding to the taint key. Must be a label value. - \*\*nodeName\*\* (string) NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node. This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable. - \*\*nodeSelector\*\* (NodeSelector) NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node. Must use exactly one term. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. \*A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.\* - \*\*nodeSelector.nodeSelectorTerms\*\* ([]NodeSelectorTerm), required \*Atomic: will be replaced during a merge\* Required. A list of node selector terms. The terms are ORed. \*A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\* - \*\*nodeSelector.nodeSelectorTerms.matchExpressions\*\* ([][}}">NodeSelectorRequirement]({{< ref )) \*Atomic: will be replaced during a merge\* A list of node selector requirements by node's labels. - \*\*nodeSelector.nodeSelectorTerms.matchFields\*\* ([][}}">NodeSelectorRequirement]({{< ref )) \*Atomic: will be replaced during a merge\* A list of node selector requirements by node's fields. - \*\*perDeviceNodeSelection\*\* (boolean) PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. - \*\*sharedCounters\*\* ([]CounterSet) \*Atomic: will be replaced during a merge\* SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the counter sets must be unique in the ResourcePool. Only one of Devices and SharedCounters can be set in a ResourceSlice. The maximum number of counter sets is 8. \*CounterSet defines a named set of counters that are available to be used by devices defined in the ResourcePool. The counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.\* - \*\*sharedCounters.counters\*\* (map[string]Counter), required Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters is 32. \*Counter describes a quantity associated with a device.\* - \*\*sharedCounters.counters.value\*\* ([}}">Quantity]({{< ref )), required Value defines how much of a certain device counter is available. - \*\*sharedCounters.name\*\* (string), required Name defines the name of the counter set. It must be a DNS label. ## ResourceSliceList {#ResourceSliceList} ResourceSliceList is
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
-0.02292616106569767,
0.07313340902328491,
0.05440767481923103,
-0.02085484378039837,
0.03979227691888809,
-0.04547958821058273,
0.057055629789829254,
-0.026625439524650574,
0.03252436965703964,
-0.009847689419984818,
0.031600940972566605,
-0.0923912525177002,
-0.04328782856464386,
0.013252419419586658,
0.029348313808441162,
0.03248293325304985,
-0.0022558073978871107,
-0.05418213829398155,
-0.020273098722100258,
-0.04650382697582245,
0.03041619248688221,
0.03154286369681358,
0.023340558633208275,
-0.005058562383055687,
-0.07432067394256592,
0.03683449700474739,
-0.023669058457016945,
0.020506400614976883,
0.08016732335090637,
-0.025089507922530174,
-0.08287029713392258,
0.04032254219055176,
-0.04203610494732857,
0.03663194179534912,
0.06798531115055084,
0.08082739263772964,
0.08771425485610962,
-0.01192470919340849,
-0.047286998480558395,
-0.023303348571062088,
0.0500146709382534,
-0.021148966625332832,
-0.09116356074810028,
0.0734342485666275,
-0.05435888096690178,
0.0026310172397643328,
0.03694556653499603,
-0.10616365075111389,
-0.04852995648980141,
0.0002776139008346945,
-0.01681317761540413,
0.007191006559878588,
0.05531531199812889,
-0.0015277782222256064,
0.0843348428606987,
0.0429329015314579,
0.029890624806284904,
0.08713576942682266,
-0.01591043546795845,
0.0665055364370346,
0.023143881931900978,
-0.0587836429476738,
-0.016959574073553085,
-0.038309887051582336,
0.04084087908267975,
-0.03596201166510582,
-0.020149435847997665,
0.02961542084813118,
0.03846754878759384,
-0.03017333894968033,
0.03920523449778557,
-0.004529860801994801,
-0.05283156782388687,
-0.01285175234079361,
-0.05153672769665718,
0.0816434770822525,
-0.01006145216524601,
0.054174456745386124,
0.00192241370677948,
-0.05752263963222504,
-0.02750648930668831,
0.0012331265024840832,
0.012340421788394451,
0.030295459553599358,
-0.053340595215559006,
0.03353028744459152,
-0.01843261532485485,
0.03598068654537201,
0.05460816249251366,
0.06593763828277588,
0.0005978479748591781,
-0.04384589195251465,
0.012439442798495293,
-0.027499618008732796,
0.051322225481271744,
0.01938452385365963,
-0.007325083017349243,
0.011405477300286293,
-0.03001193143427372,
0.03455851227045059,
-0.04727569594979286,
-0.023937590420246124,
-0.04594748467206955,
0.054559994488954544,
0.08623999357223511,
-0.05263914912939072,
-0.07598140835762024,
-0.013999375514686108,
0.041553352028131485,
0.0303218774497509,
0.020661085844039917,
0.03721009939908981,
-0.08742005378007889,
0.005910525564104319,
-0.03786512091755867,
0.04349944740533829,
-0.034442976117134094,
0.027902010828256607,
0.033767037093639374,
0.06719350814819336,
0.05150440335273743,
-0.01467450987547636,
-0.005799169186502695,
-0.021934250369668007,
0.011995016597211361,
0.022440962493419647,
0.01045854389667511,
5.243956706151028e-33,
0.052471160888671875,
-0.040853776037693024,
-0.04319687560200691,
-0.03456883132457733,
0.00827641598880291,
-0.04656550660729408,
-0.019872641190886497,
0.04315981641411781,
0.053350772708654404,
0.03562360256910324,
-0.03215746954083443,
0.005814346484839916,
-0.08349676430225372,
-0.04259874299168587,
0.0019105393439531326,
-0.062374453991651535,
-0.035970598459243774,
0.006886212155222893,
0.12986531853675842,
-0.020966211333870888,
0.04975176230072975,
-0.03807656839489937,
-0.06531494110822678,
-0.03830953687429428,
0.006129092071205378,
-0.013898714445531368,
0.004381154198199511,
-0.12624549865722656,
0.06777574867010117,
0.04052949696779251,
-0.02123318240046501,
-0.031835004687309265,
-0.02006230503320694,
0.0535854808986187,
0.019458474591374397,
0.011438477784395218,
-0.04332641884684563,
0.013762074522674084,
-0.044457096606492996,
-0.07256978005170822,
-0.0265596192330122,
0.0015360869001597166,
-0.039423953741788864,
-0.08541133254766464,
0.03512666001915932,
-0.11717921495437622,
0.011864371597766876,
-0.11273761093616486,
0.002948438748717308,
0.040013767778873444,
0.0030311131849884987,
0.0055022272281348705,
0.0755300521850586,
-0.10429687052965164,
-0.019811252132058144,
-0.06561478972434998,
0.07085703313350677,
0.013801311142742634,
-0.048939574509859085,
0.047874871641397476,
-0.019063597545027733,
0.0051366970874369144,
-0.013947864063084126,
0.007639657240360975,
0.009245962835848331,
0.05188547447323799,
0.0483732596039772,
-0.03585519641637802,
0.03601371869444847,
0.056912247091531754,
-0.05724747106432915,
0.030203107744455338,
-0.012673442251980305,
-0.0041769081726670265,
-0.07015496492385864,
-0.05007204785943031,
0.0873006209731102,
0.07001455128192902,
-0.07872012257575989,
-0.03986946493387222,
0.00954985711723566,
-0.04239499196410179,
0.004236599896103144,
0.03790510073304176,
-0.015135976485908031,
-0.010333054699003696,
0.05279773846268654,
0.024477090686559677,
-0.027038326486945152,
0.022455863654613495,
0.06040535122156143,
0.00008183610043488443,
-0.011273019015789032,
-0.04001239314675331,
-0.14975005388259888,
-5.91645555488852e-33,
0.07467595487833023,
-0.08823182433843613,
-0.004331049043685198,
0.026052089408040047,
-0.016864312812685966,
-0.08236952126026154,
-0.09600929170846939,
0.08986146748065948,
0.04243764653801918,
0.00019865407375618815,
-0.010997303761541843,
-0.07271450012922287,
0.024923060089349747,
-0.04293140769004822,
-0.030267003923654556,
0.033614106476306915,
-0.04724689945578575,
-0.05615698918700218,
0.005669708363711834,
0.03105812519788742,
-0.03573557734489441,
0.05823536589741707,
0.03618990629911423,
-0.020597783848643303,
0.020442022010684013,
-0.03616764768958092,
0.008058878593146801,
0.02726498804986477,
0.007121216505765915,
-0.0213101115077734,
-0.014999818988144398,
-0.08506645262241364,
0.0050596087239682674,
-0.034797053784132004,
0.025014197453856468,
-0.06427880376577377,
0.025759628042578697,
0.05908243730664253,
0.03198955953121185,
-0.02412029169499874,
0.10043466836214066,
0.027799006551504135,
-0.11635927855968475,
-0.030584216117858887,
-0.12227396667003632,
0.08944814652204514,
-0.07932213693857193,
-0.02965378202497959,
-0.03250505402684212,
-0.02649286575615406,
0.06018678843975067,
-0.0002975960378535092,
-0.02696765959262848,
-0.005491410382091999,
-0.05220021307468414,
0.0070585147477686405,
0.08022335916757584,
-0.011615943163633347,
-0.049392376095056534,
0.05598071590065956,
0.015901030972599983,
-0.09639893472194672,
0.013389073312282562,
-0.06124505400657654,
0.017124509438872337,
-0.014357205480337143,
0.0037134920712560415,
-0.025100333616137505,
-0.0372220017015934,
-0.0223861001431942,
0.08602572977542877,
0.036062419414520264,
-0.04060430824756622,
0.014531917870044708,
-0.05858195945620537,
-0.03417336195707321,
-0.012860771268606186,
-0.028458723798394203,
0.03994487226009369,
0.017929868772625923,
-0.08813032507896423,
0.1402425318956375,
-0.05977579951286316,
0.054286014288663864,
0.03909366950392723,
0.025268390774726868,
0.04765886813402176,
0.09802307188510895,
0.028874577954411507,
0.045865498483181,
0.014397487044334412,
0.012201022356748581,
-0.08144368976354599,
0.20694005489349365,
-0.0391121432185173,
-5.4965347828783706e-8,
0.051961950957775116,
-0.004609537776559591,
-0.01451259758323431,
0.06286245584487915,
0.050334278494119644,
-0.027979085221886635,
0.01683720014989376,
0.05965946242213249,
0.07295209169387817,
0.01863824762403965,
0.12972797453403473,
0.028308244422078133,
-0.10063949972391129,
-0.033688224852085114,
0.029089849442243576,
0.005872700829058886,
-0.03482993692159653,
0.010495682246983051,
-0.05379695072770119,
-0.09213646501302719,
-0.04450768604874611,
-0.024916358292102814,
0.0022197712678462267,
-0.0064385682344436646,
0.006107446737587452,
0.07400858402252197,
0.025902245193719864,
0.04108901694417,
0.09200926125049591,
0.028881298378109932,
-0.013546253554522991,
-0.0031168258283287287,
-0.034677233546972275,
0.009641037322580814,
-0.10436756163835526,
0.016371455043554306,
-0.08744808286428452,
-0.02347298339009285,
-0.02706192247569561,
0.17792579531669617,
-0.05564718693494797,
-0.027538154274225235,
-0.12187850475311279,
0.013339654542505741,
-0.011822874657809734,
-0.008648132905364037,
-0.07839521765708923,
0.02724836766719818,
-0.05951252579689026,
0.08020920306444168,
0.024953367188572884,
-0.009968981146812439,
0.029667755588889122,
0.08097492158412933,
-0.03304736316204071,
0.07023318111896515,
0.07008477300405502,
-0.07476761937141418,
-0.024074027314782143,
-0.0055234129540622234,
-0.012845500372350216,
-0.017981575801968575,
0.06815178692340851,
0.0008854242041707039
] | 0.201553
|
is 32. \*Counter describes a quantity associated with a device.\* - \*\*sharedCounters.counters.value\*\* ([}}">Quantity]({{< ref )), required Value defines how much of a certain device counter is available. - \*\*sharedCounters.name\*\* (string), required Name defines the name of the counter set. It must be a DNS label. ## ResourceSliceList {#ResourceSliceList} ResourceSliceList is a collection of ResourceSlices. --- - \*\*apiVersion\*\*: resource.k8s.io/v1 - \*\*kind\*\*: ResourceSliceList - \*\*metadata\*\* ([}}">ListMeta]({{< ref )) Standard list metadata - \*\*items\*\* ([][}}">ResourceSlice]({{< ref )), required Items is the list of resource ResourceSlices. ## Operations {#Operations} --- ### `get` read the specified ResourceSlice #### HTTP Request GET /apis/resource.k8s.io/v1/resourceslices/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ResourceSlice - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ResourceSlice]({{< ref )): OK 401: Unauthorized ### `list` list or watch objects of kind ResourceSlice #### HTTP Request GET /apis/resource.k8s.io/v1/resourceslices #### Parameters - \*\*allowWatchBookmarks\*\* (\*in query\*): boolean [}}">allowWatchBookmarks]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*labelSelector\*\* (\*in query\*): string [}}">labelSelector]({{< ref ) - \*\*limit\*\* (\*in query\*): integer [}}">limit]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*resourceVersion\*\* (\*in query\*): string [}}">resourceVersion]({{< ref ) - \*\*resourceVersionMatch\*\* (\*in query\*): string [}}">resourceVersionMatch]({{< ref ) - \*\*sendInitialEvents\*\* (\*in query\*): boolean [}}">sendInitialEvents]({{< ref ) - \*\*timeoutSeconds\*\* (\*in query\*): integer [}}">timeoutSeconds]({{< ref ) - \*\*watch\*\* (\*in query\*): boolean [}}">watch]({{< ref ) #### Response 200 ([}}">ResourceSliceList]({{< ref )): OK 401: Unauthorized ### `create` create a ResourceSlice #### HTTP Request POST /apis/resource.k8s.io/v1/resourceslices #### Parameters - \*\*body\*\*: [}}">ResourceSlice]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ResourceSlice]({{< ref )): OK 201 ([}}">ResourceSlice]({{< ref )): Created 202 ([}}">ResourceSlice]({{< ref )): Accepted 401: Unauthorized ### `update` replace the specified ResourceSlice #### HTTP Request PUT /apis/resource.k8s.io/v1/resourceslices/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ResourceSlice - \*\*body\*\*: [}}">ResourceSlice]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ResourceSlice]({{< ref )): OK 201 ([}}">ResourceSlice]({{< ref )): Created 401: Unauthorized ### `patch` partially update the specified ResourceSlice #### HTTP Request PATCH /apis/resource.k8s.io/v1/resourceslices/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ResourceSlice - \*\*body\*\*: [}}">Patch]({{< ref ), required - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldManager\*\* (\*in query\*): string [}}">fieldManager]({{< ref ) - \*\*fieldValidation\*\* (\*in query\*): string [}}">fieldValidation]({{< ref ) - \*\*force\*\* (\*in query\*): boolean [}}">force]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) #### Response 200 ([}}">ResourceSlice]({{< ref )): OK 201 ([}}">ResourceSlice]({{< ref )): Created 401: Unauthorized ### `delete` delete a ResourceSlice #### HTTP Request DELETE /apis/resource.k8s.io/v1/resourceslices/{name} #### Parameters - \*\*name\*\* (\*in path\*): string, required name of the ResourceSlice - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\* (\*in query\*): boolean [}}">ignoreStoreReadErrorWithClusterBreakingPotential]({{< ref ) - \*\*pretty\*\* (\*in query\*): string [}}">pretty]({{< ref ) - \*\*propagationPolicy\*\* (\*in query\*): string [}}">propagationPolicy]({{< ref ) #### Response 200 ([}}">ResourceSlice]({{< ref )): OK 202 ([}}">ResourceSlice]({{< ref )): Accepted 401: Unauthorized ### `deletecollection` delete collection of ResourceSlice #### HTTP Request DELETE /apis/resource.k8s.io/v1/resourceslices #### Parameters - \*\*body\*\*: [}}">DeleteOptions]({{< ref ) - \*\*continue\*\* (\*in query\*): string [}}">continue]({{< ref ) - \*\*dryRun\*\* (\*in query\*): string [}}">dryRun]({{< ref ) - \*\*fieldSelector\*\* (\*in query\*): string [}}">fieldSelector]({{< ref ) - \*\*gracePeriodSeconds\*\* (\*in query\*): integer [}}">gracePeriodSeconds]({{< ref ) - \*\*ignoreStoreReadErrorWithClusterBreakingPotential\*\*
|
https://github.com/kubernetes/website/blob/main//content/en/docs/reference/kubernetes-api/workload-resources/resource-slice-v1.md
|
[
-0.0579439140856266,
0.0501665361225605,
-0.06056642159819603,
0.01803174428641796,
-0.03439284488558769,
0.01645166613161564,
0.0926419273018837,
-0.013515552505850792,
0.018751448020339012,
0.004581731278449297,
-0.015550049021840096,
-0.11634862422943115,
0.05698901414871216,
0.020177332684397697,
0.006329726427793503,
0.060044459998607635,
-0.02279566414654255,
-0.09723581373691559,
-0.0427282340824604,
-0.05089377984404564,
0.11880138516426086,
0.13009817898273468,
-0.017281265929341316,
-0.05509818345308304,
0.0070714810863137245,
0.032266903668642044,
-0.06448818743228912,
0.006266078911721706,
0.08006882667541504,
0.0047334935516119,
0.015398805029690266,
0.017994685098528862,
-0.05798671022057533,
0.008392011746764183,
0.17073123157024384,
0.035062920302152634,
-0.01511864922940731,
-0.053853217512369156,
-0.03894047439098358,
0.070381298661232,
0.055134110152721405,
0.00896543450653553,
-0.02900639735162258,
-0.05943261459469795,
-0.06326557695865631,
0.05345495790243149,
-0.042097706347703934,
-0.02269037440419197,
-0.059121023863554,
-0.01036121230572462,
0.013421834446489811,
-0.023501385003328323,
-0.026215102523565292,
0.014121503569185734,
0.0882781371474266,
-0.03624865412712097,
-0.05333750694990158,
0.014166719280183315,
-0.0031826822087168694,
0.0028310134075582027,
0.06673293560743332,
-0.107096828520298,
0.0218910351395607,
-0.06019304692745209,
-0.006851485930383205,
-0.02692789025604725,
-0.019759921357035637,
0.033901065587997437,
0.022075358778238297,
-0.04290004447102547,
-0.04228982329368591,
0.037101127207279205,
-0.017645886167883873,
0.026925047859549522,
0.018688900396227837,
0.03221992030739784,
-0.021264920011162758,
-0.009430679492652416,
0.03208477050065994,
-0.17247463762760162,
0.0034381479490548372,
-0.007596288807690144,
-0.05814714357256889,
0.012377163395285606,
0.0170418880879879,
-0.021985681727528572,
-0.04228578880429268,
0.008837234228849411,
0.05619366094470024,
0.012722364626824856,
-0.008208398707211018,
-0.016941865906119347,
0.043299611657857895,
-0.019729355350136757,
0.06267756223678589,
0.10514267534017563,
-0.07029789686203003,
-0.028460506349802017,
-0.08592329919338226,
0.051402803510427475,
0.000012720878658001311,
0.04493562504649162,
-0.021314576268196106,
0.02407791279256344,
-0.00014523885329253972,
-0.06558337062597275,
-0.014280971139669418,
0.11031506210565567,
-0.05895411595702171,
0.029674045741558075,
0.0064199212938547134,
0.0883132815361023,
-0.05569728463888168,
-0.022035222500562668,
0.029513288289308548,
-0.052087850868701935,
0.08662858605384827,
-0.07449683547019958,
0.08111187070608139,
0.010237944312393665,
0.03537703678011894,
-0.06573650985956192,
-0.04327797144651413,
-0.011999969370663166,
-0.0018692505545914173,
-0.03568593040108681,
-0.024892477318644524,
2.83187131828048e-33,
0.05169892683625221,
-0.023397650569677353,
0.0011904765851795673,
-0.025992607697844505,
-0.010964570567011833,
-0.09972421079874039,
0.02582782879471779,
0.0520879365503788,
-0.08188867568969727,
0.012597511522471905,
-0.012155188247561455,
0.09440013766288757,
-0.00870004203170538,
-0.0042188228107988834,
-0.004976277239620686,
0.011574774980545044,
0.09961137175559998,
0.09046677500009537,
0.08030978590250015,
-0.0340014211833477,
0.03361480310559273,
-0.04355978965759277,
-0.022776752710342407,
-0.018583983182907104,
-0.03342529758810997,
0.01639845035970211,
-0.02567761018872261,
-0.01641136407852173,
0.015295489691197872,
-0.028613319620490074,
0.09206856787204742,
-0.033693939447402954,
0.010200005024671555,
-0.01183274481445551,
0.03355229273438454,
-0.023170234635472298,
0.014127731323242188,
0.0025021168403327465,
-0.05249538645148277,
-0.030798519030213356,
-0.015358329750597477,
0.00253064907155931,
-0.04772123321890831,
-0.00015986806829459965,
-0.03210118040442467,
-0.06068340316414833,
-0.0355001725256443,
-0.036094747483730316,
0.018582027405500412,
0.0524388886988163,
-0.005262629594653845,
0.0025950144045054913,
-0.004859644453972578,
-0.045551568269729614,
0.012226229533553123,
-0.0478229895234108,
-0.010481421835720539,
0.06484430283308029,
0.015885720029473305,
0.052156392484903336,
-0.056817516684532166,
0.05446009710431099,
-0.024592945352196693,
0.05895164608955383,
0.09883952140808105,
0.019697029143571854,
0.045721635222435,
0.0030116254929453135,
-0.004918325692415237,
0.0065282294526696205,
-0.042038027197122574,
0.012609121389687061,
0.07145483046770096,
0.029708901420235634,
-0.03109184093773365,
-0.04380602389574051,
-0.007934275083243847,
-0.07186894863843918,
-0.14367148280143738,
0.013150250539183617,
-0.012424142099916935,
0.026957135647535324,
-0.01771678775548935,
0.06467614322900772,
-0.09783186763525009,
-0.03644018620252609,
-0.0325121246278286,
-0.08038318902254105,
0.04211607575416565,
-0.026000583544373512,
0.022282779216766357,
-0.02599954605102539,
-0.11089938133955002,
-0.054946742951869965,
-0.09409184753894806,
-4.637970266518938e-33,
0.06659509986639023,
0.05079694837331772,
0.03972124308347702,
-0.05875789746642113,
0.011344137601554394,
-0.052230559289455414,
0.04709767922759056,
0.00884739775210619,
0.046614713966846466,
-0.00029216569964773953,
0.044693902134895325,
0.013749527744948864,
0.038419801741838455,
-0.044046077877283096,
0.053594063967466354,
0.027770860120654106,
-0.11017785966396332,
-0.04024134576320648,
0.04984666779637337,
0.07455551624298096,
-0.05565481260418892,
0.12374082952737808,
0.023175762966275215,
0.04732368513941765,
-0.08705856651067734,
-0.0004741308221127838,
-0.012774983420968056,
-0.054459262639284134,
0.025333840399980545,
-0.02889987640082836,
0.09714389592409134,
-0.07588932663202286,
0.011868012137711048,
-0.004971749614924192,
-0.005219439044594765,
-0.0742175504565239,
0.03654128685593605,
0.058770857751369476,
-0.036346402019262314,
0.03146086633205414,
0.06452549993991852,
-0.0353100560605526,
-0.01729714125394821,
-0.012743338942527771,
-0.013008542358875275,
-0.11935446411371231,
0.05331849306821823,
0.003298094728961587,
-0.018801074475049973,
-0.09043941646814346,
0.10203088819980621,
-0.06317828595638275,
-0.08346328139305115,
0.050834737718105316,
0.012769633904099464,
0.05282307788729668,
0.02990347519516945,
0.017117103561758995,
0.06109992414712906,
-0.05107026919722557,
0.01829751767218113,
-0.0799657478928566,
-0.052523959428071976,
0.04773412272334099,
0.05928640067577362,
-0.041962649673223495,
-0.06227298825979233,
-0.060719989240169525,
-0.07062594592571259,
-0.021944105625152588,
-0.017463844269514084,
0.010020461864769459,
-0.0028148426208645105,
-0.04252364858984947,
-0.0004230746708344668,
-0.05354548618197441,
0.010238982737064362,
-0.01501214224845171,
-0.0056127929128706455,
0.12385275214910507,
-0.08431364595890045,
0.04439244791865349,
0.011183207854628563,
-0.017611464485526085,
0.018937628716230392,
-0.05785376951098442,
0.04596719145774841,
0.07445397973060608,
-0.05058402195572853,
0.01731158047914505,
-0.06232147291302681,
-0.06358345597982407,
0.0008085704175755382,
0.11464830487966537,
-0.03245040029287338,
-5.350677767523848e-8,
-0.08816666901111603,
0.028465338051319122,
-0.05579153075814247,
0.025133419781923294,
0.020925313234329224,
0.0005964311421848834,
0.01692243479192257,
0.0023975034710019827,
0.0155745605006814,
0.04624049365520477,
0.027155017480254173,
-0.013866320252418518,
-0.019603241235017776,
0.003252631053328514,
-0.038085125386714935,
-0.0147473756223917,
0.02217358909547329,
0.0520353689789772,
0.017162999138236046,
0.03225639835000038,
0.01691788248717785,
-0.06283503770828247,
0.030462881550192833,
-0.12884359061717987,
0.08614411950111389,
0.008662587963044643,
0.03200935572385788,
0.056001100689172745,
-0.021653641015291214,
0.07279174029827118,
0.042595360428094864,
-0.010291223414242268,
0.0146869495511055,
0.015420457348227501,
-0.009305386804044247,
0.028040561825037003,
-0.060153838247060776,
0.04001498222351074,
0.0019584177061915398,
0.07434455305337906,
-0.022918835282325745,
0.03040621615946293,
-0.09731573611497879,
0.09479310363531113,
0.1016588807106018,
0.010297422297298908,
-0.11978552490472794,
0.023318808525800705,
0.01014615036547184,
-0.04250694066286087,
-0.054400794208049774,
-0.05122449994087219,
0.020143330097198486,
-0.000093431917775888,
-0.06900438666343689,
0.016797777265310287,
-0.027916328981518745,
-0.03742421045899391,
0.00590855348855257,
0.0420573353767395,
0.11542852222919464,
0.05563388764858246,
0.0075107780285179615,
0.005216115154325962
] | 0.140634
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.