{
    "componentChunkName": "component---src-templates-issues-tsx",
    "path": "/issues/324",
    "result": {"data":{"issuesJson":{"id":"65e3007f-38c5-550f-96d0-7cabd6d1a705","title":"postfinance/kubenurse: 监控 K8S 集群中的所有网络连接、测量请求持续时间、记录错误。以 Prometheus 格式导出这些指标","number":324,"bodyHTML":"<div align=\"center\" dir=\"auto\">\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a><br><br></p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th align=\"right\">Repos</th>\n<th align=\"left\"><a href=\"https://github.com/postfinance/kubenurse\">postfinance/kubenurse</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"right\"><strong>Views</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/947d2461727ad0320e6051b6ca051c7b16b64fb5561501d59e255f03788ab8b3/68747470733a2f2f76696577732e77686174696c656172656e65642e746f6461792f76696577732f6769746875622f706f737466696e616e63652f6b7562656e757273652e737667\" alt=\"views\" data-canonical-src=\"https://views.whatilearened.today/views/github/postfinance/kubenurse.svg\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Stars</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/c3e4bdf5acd012da3eda4fda63959323568ce5be87d67a23def945581d6c8831/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706f737466696e616e63652f6b7562656e757273653f636f6c6f723d663266303864266c6f676f3d556e64657274616c65266c6f676f436f6c6f723d656234363330\" alt=\"stars\" data-canonical-src=\"https://img.shields.io/github/stars/postfinance/kubenurse?color=f2f08d&amp;logo=Undertale&amp;logoColor=eb4630\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Forks</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/3a814d72da3714ff38dcc34e5ae25663bbf9303895ede9460ed7ded9b6c08f78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f706f737466696e616e63652f6b7562656e757273653f636f6c6f723d626138366562266c6f676f3d48616e647368616b65266c6f676f436f6c6f723d656136616136\" alt=\"forks\" data-canonical-src=\"https://img.shields.io/github/forks/postfinance/kubenurse?color=ba86eb&amp;logo=Handshake&amp;logoColor=ea6aa6\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>License</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/1fbdf831363b38b1d37ac441e785c9aa8ef2d59584c016d765ab8234398ffc7b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706f737466696e616e63652f6b7562656e757273653f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e53556845556741414144414141414177434159414141425841766d48414141414358424957584d41414173544141414c457745416d70775941414144336b6c45515652346e4f335953557a5555426748384a726f57567255474a66456d3773584e63534446784d544c327069347348456778654e526f77586770455742445552522532424e414e4f4b4f4b36366f6f4b4a4742586545475263574163455646475152484677516d483525324630774861655748493944554455354c356b6e6568644f62377a66652532423139636e434a47495243516945596c514237594a4979474c38616f73756c565a36695246516a69474b6b7564576735614c6c704f70704e586e665071773555304459524a6d56786a4367464633424c755a476d416f5655694b4541726d583744375553677351706f72674761336748664b34483663754262435644334771683141352532424c6745253242467749656e514d306a6f446f66714c6f48564e7742796d384370546e416d327a51713073676478624964515a556c416b7150415a3664676a303541446f59526f6f66792532466f5869726f376b3551586a4c6f70677a4b69514e6c4c4461716f4967754577426a7a7150355066446a45394479495879493633464d547751464d43567271774e61763451666f52673538514625324266724d485172454b3844546f434d714e4179574e4866786d54526f4c4f726d5352566747744466714345715a4f4851727a6f34706243557341333431365169364551394b476a6345465267484f724f4b6e5536574162396247455459656b4b7843766a546167394534706a653534446b3551503862624d4859762532464333756541654a6b50304f4778422532424a70426e4172595238455951516e6f4e31414e4661426e5050356c385372736559514c303641646b30464a5938484f5761424d6c6541486a683068506f73497a6c6f3876304125324633345a694f6548726130714b52504d5653493774762532423932747725324676687855654252713456454c674d376642714b354770526d6f514c584e7075625475367a6f4e52706754386e5051627138347764253246494375767978694b4871694e41664933774d367549684271476b4c696977414f734b44714f68743749747239567938536a52424557667941627225324668523142667056514664484a42253246423268683778376a36517077435665655951326b72554235436c636a3641326d3067576a25324244306d4c34397a573563517943484c4e37726a6c6d6d6174457958582532464372547a412532466f51785a6b576c39474a5443566f25324279546a3837253242346769504b6376307149486f344156344430565a727251493334706e70524d36357875652532467a417265453425324654253246536f676c664542794d7369517441546c4c3352414a355948725378365a44665337307337754d486842705225324659423573305057366f455270316236253246667252684b3353444c35546965364f515548516c5133735644752532427a50636b397657453973747225324236496a533967486d5750616861444a25324277434b364e494242587348423948796b587378774470686c436d416476706c6162554a4e6e5a504239342532464e7436784f6538587a4562503257684d335741673147756236744825324233513150673337365239713475716c6e6f36676448476a444f5139306562303141484d3672596975554a314f713472344656756a35765239427a4d3957674e764f7977446869495951467667626366774166774d764863615067425041253246447948476a50624e394138616d6562636477416444354e6633373574787165774e5552656f797677424958594c645170576c6877465771745061435044334173467541535636717171496c62304a766b564331464c39576b4c55556c55574b337a585a4c46432532423125324642726f46746f364f7358497545594a5034447a7a5732594656316f4a614141414141456c46546b5375516d4343\" alt=\"license\" data-canonical-src=\"https://img.shields.io/github/license/postfinance/kubenurse?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD3klEQVR4nO3YSUzUUBgH8JroWVrUGJfEm7sXNcSDFxMTL2pi4sHEgxeNRowXgpEWBDURR%2BNANOKOK66ooKJGBXeEGRcWAcEVFGQRHFwQmH5%2F0wHaeWHI9DUDU5L5knehdOb7zfe%2B19cnCJGIRCQiEYlQB7YJIyGL8aosulVZ6iRFQjiGKkudWg5aLlpOppNXnfPqw5U0DYRJmVxjCgFF3BLuZGmAoVUiKEArmX7D7USgsQporgGa3gHfK4H6cuBbCVD3Gqh1A5%2BLgE%2BFwIenQM0joDofqLoHVNwBym8CpTnAm2zQq0sgdxbIdQZUlAkqPAZ6dgj05ADoYRoofy%2FoXiro7k5QXjLopgzKiQNlLDaqoIguEwBjzqP5PfDjE9DyIXyI63FMTwQFMCVrqwNav4QfoRg58QF%2BfrMHQrEK8DToCMqNAyWNHfxmTRoLOrmSRVgGtDfqCEqZOHQrzo4pbCUsA3416Qi6EQ9KGjcEFRgHOrOKnU6WAb9bGETYekKxCvjTag9E4pje54Dk5QP8bbMHYv%2FC3ueAeJkP0OGxB%2BJpBnArYR8EYQQnoN1ANFaBnPP5l8SrseYQL06Adk0FJY8HOWaBMleAHjh0hPosIzlo8v0A%2F34ZiOeHra0qKRPMVSI7tv%2B92tw%2FvhxUeBRq4VELgM7fBqK5GpRmoQLXNpubTu6zoNRpgT8nPQbq84wd%2FICuvyxiKHqiNAfI3wM6uIhBqGkLiiwAOsKDqOht7Itr9Vy8SjRBEWfyAbr%2FhR1BfpVQFdHJB%2FB2hh7x7j6QpwCVeeYQ2krUB5Clcj6A2m0gWj%2BD0mL49zW5cQyCHLN7rjlmmatEyXX%2FCrTzA%2FoQxZkWl9GJTCVo%2ByTj87%2B4giPKcv0qIHo4AV4D0VZrrQI34pnpRM65xue%2FzAreE4%2FT%2FSoglfEByMsiQtATlL3RAJ5YHrSx6ZDfS70s7uMHhBpR%2FYB5s0PW6oERp1b6%2FfrRhK3SDL5Tie6OQUHQlQ3sVDu%2BzPck9vWE9str%2B6IjS9gHmWPahaDJ%2BwCK6NIBBXsHB9HykXsxwDphlCmAdvplabUJNnZPB94%2FNt6xOe8XzEbP2WhM3WAg1Gub6tH%2B3Q1Pg376R9q4uqlno6gdHGjDOQ90eb01AHM6rYiuUJ1Oq4r4FVuj5vR9BzM9WgNvOywDhiIYQFvgbcfwAfwMvHcaPgBPA%2FDyHGjPbN9A8amebcdwAdD5Nf375txqewNUReoyvwBIXYLdQpWlhwFWqtPaCPD3AsFuASV6qqqIlb0JvkVC1FL9WkLUUlUWK3zXZLFC%2B1%2FBroFto6OsXIuEYJP4DzzW2YFV1oJaAAAAAElFTkSuQmCC\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>UpdatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/97b83381a42d5bc5c1edfc490e35fc434f7ea3555606fe04caf5caceba03d4cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f706f737466696e616e63652f6b7562656e757273653f646973706c61795f74696d657374616d703d636f6d6d6974746572266c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d557064617465644174\" alt=\"last-commit\" data-canonical-src=\"https://img.shields.io/github/last-commit/postfinance/kubenurse?display_timestamp=committer&amp;logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=UpdatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>CreatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/4ca61af7595c238ae484e915c07e5540fd60273d5e8b2f8c0bf8f51bb440eb9b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f637265617465642d61742f706f737466696e616e63652f6b7562656e757273653f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d437265617465644174\" alt=\"create-at\" data-canonical-src=\"https://img.shields.io/github/created-at/postfinance/kubenurse?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=CreatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<a href=\"https://github.com/opsre/awesome-ops\">\n</a><p dir=\"auto\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/b964a36ea4078c39f603d46a29436371c7541a2f26e0228d7b21b9d9805b43d3/68747470733a2f2f736f6369616c6966792e6769742e63692f6f707372652f617765736f6d652d6f70732f696d6167653f6465736372697074696f6e3d3126666f6e743d42697474657226666f726b733d31266973737565733d31266c616e67756167653d31266c6f676f3d6874747073253341253246253246617661746172732e67697468756275736572636f6e74656e742e636f6d25324675253246313838353638303230266e616d653d31266f776e65723d31267061747465726e3d436972637569742b426f6172642670756c6c733d31267374617267617a6572733d31267468656d653d4c69676874\" alt=\"\" data-canonical-src=\"https://socialify.git.ci/opsre/awesome-ops/image?description=1&amp;font=Bitter&amp;forks=1&amp;issues=1&amp;language=1&amp;logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F188568020&amp;name=1&amp;owner=1&amp;pattern=Circuit+Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light\" style=\"max-width: 100%;\"></a></p>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a>\n</div>\n<p dir=\"auto\"><a href=\"https://github.com/postfinance/kubenurse/actions/workflows/release.yml\"><img src=\"https://github.com/postfinance/kubenurse/actions/workflows/release.yml/badge.svg\" alt=\"CI\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://coveralls.io/github/postfinance/kubenurse?branch=master\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/6e988ffb5a087b91eff8dc8bb458ae75d583712fec4d994435fe3ed214cbdd16/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f706f737466696e616e63652f6b7562656e757273652f62616467652e7376673f6272616e63683d6d6173746572\" alt=\"Coverage Status\" data-canonical-src=\"https://coveralls.io/repos/github/postfinance/kubenurse/badge.svg?branch=master\" style=\"max-width: 100%;\"></a><br>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/86c74a6504e2895aed8d402e2b102684efdb867fa66a0ee84b15ebe9e2e4c430/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706f737466696e616e63652f6b7562656e75727365\"><img src=\"https://camo.githubusercontent.com/86c74a6504e2895aed8d402e2b102684efdb867fa66a0ee84b15ebe9e2e4c430/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706f737466696e616e63652f6b7562656e75727365\" alt=\"GitHub release (latest SemVer)\" data-canonical-src=\"https://img.shields.io/github/v/release/postfinance/kubenurse\" style=\"max-width: 100%;\"></a></p>\n\n\n\n<ul dir=\"auto\">\n<li><a href=\"#kubenurse\">Kubenurse</a>\n<ul dir=\"auto\">\n<li><a href=\"#grafana-dashboard\">Grafana dashboard</a></li>\n<li><a href=\"#metrics\">Metrics</a></li>\n<li><a href=\"#deployment\">Deployment</a>\n<ul dir=\"auto\">\n<li><a href=\"#helm-deployment\">Helm deployment</a>\n<ul dir=\"auto\">\n<li><a href=\"#helm-parameters\">Helm parameters</a></li>\n</ul>\n</li>\n<li><a href=\"#configuration\">Configuration</a></li>\n</ul>\n</li>\n<li><a href=\"#http-endpoints\">HTTP Endpoints</a></li>\n<li><a href=\"#health-checks\">Health Checks</a>\n<ul dir=\"auto\">\n<li><a href=\"#api-server-direct\">API Server Direct</a></li>\n<li><a href=\"#api-server-dns\">API Server DNS</a></li>\n<li><a href=\"#me-ingress\">Me Ingress</a></li>\n<li><a href=\"#me-service\">Me Service</a></li>\n<li><a href=\"#neighbourhood\">Neighbourhood</a></li>\n</ul>\n</li>\n<li><a href=\"#neighbourhood-filtering\">Neighbourhood filtering</a>\n<ul dir=\"auto\">\n<li><a href=\"#neighbourhood-incoming-checks-metric\">Neighbourhood incoming checks metric</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n\n<h1 dir=\"auto\">Kubenurse</h1>\n<p dir=\"auto\">Kubenurse is a little service that monitors all network connections in a<br>\nKubernetes cluster. Kubenurse measures request durations, records errors and<br>\nexports those metrics in Prometheus format.</p>\n<p dir=\"auto\">Here's an overview of the checks performed by kubenurse, which are exposed as<br>\nlabels for the various duration/error prometheus metrics.</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"./doc/kubenurse.png\"><img src=\"./doc/kubenurse.png\" alt=\"kubenurse request types\" style=\"max-width: 100%;\"></a></p>\n<h2 dir=\"auto\">Grafana dashboard</h2>\n<p dir=\"auto\">Once the kubenurse pods are up and running and scraped by your metrics agent,<br>\nyou can import the <a href=\"./doc/grafana-kubenurse.json\">example dashboard</a> to start<br>\nscrutinizing network latencies and errors.</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"doc/grafana.png\"><img src=\"doc/grafana.png\" alt=\"Grafana overview\" title=\"Grafana ingress view\" style=\"max-width: 100%;\"></a></p>\n<h2 dir=\"auto\">Metrics</h2>\n<p dir=\"auto\">All performed checks expose metrics which can be used to monitor/alert:</p>\n<ul dir=\"auto\">\n<li>node-to-node network latencies and errors</li>\n<li>pod-to-apiserver communication</li>\n<li>Ingress roundtrip latencies and errors</li>\n<li>Service roundtrip latencies and errors (kube-proxy / your CNI)</li>\n<li>Major kube-apiserver issues</li>\n<li>kube-dns (or CoreDNS) errors</li>\n<li>External DNS resolution errors (ingress URL resolution)</li>\n</ul>\n<p dir=\"auto\">At <code class=\"notranslate\">/metrics</code> you will find the following metrics:</p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>metric name</th>\n<th>labels</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><del><code class=\"notranslate\">kubenurse request duration</code></del></td>\n<td><code class=\"notranslate\">type</code></td>\n<td>(deprecated since v1.13.0) latency histogram for request duration, replaced with the metric below.</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">kubenurse httpclient request duration seconds</code></td>\n<td><code class=\"notranslate\">type</code></td>\n<td>latency histogram for request duration, partitioned by request type</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">kubenurse httpclient trace request duration seconds</code></td>\n<td><code class=\"notranslate\">type, event</code></td>\n<td>latency histogram for httpclient <em>trace</em> metric instrumentation, partitioned by request type and httptrace connection events</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">kubenurse httpclient requests total</code></td>\n<td><code class=\"notranslate\">type, code, method</code></td>\n<td>counter for the total number of http requests, partitioned by HTTP code, method, and request type</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">kubenurse errors total</code></td>\n<td><code class=\"notranslate\">type, event</code></td>\n<td>error counter, partitioned by httptrace event and request type</td>\n</tr>\n<tr>\n<td><code class=\"notranslate\">kubenurse neighbourhood incoming checks</code></td>\n<td>n\\a</td>\n<td>gauge which reports how many unique neighbours have queried the current pod in the last minute</td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<p dir=\"auto\">For metrics partitioned with a <code class=\"notranslate\">type</code> label, it is possible to precisely know<br>\nwhich request type increased an error counter, or to compare the latencies of<br>\nmultiple request types, for example compare how your service and ingress<br>\nlatencies differ.</p>\n<p dir=\"auto\">Some <code class=\"notranslate\">event</code> labels include <code class=\"notranslate\">dns_start</code>, <code class=\"notranslate\">got_conn</code>, <code class=\"notranslate\">tls_handshake_done</code>, and<br>\nmore. the details can be  seen in the<br>\n<a href=\"https://github.com/postfinance/kubenurse/blob/v1.13.0/internal/servicecheck/httptrace.go#L91\"><code class=\"notranslate\">httptrace.go</code></a><br>\nfile.</p>\n<h2 dir=\"auto\">Deployment</h2>\n<p dir=\"auto\">You can get the Docker image from <a href=\"https://hub.docker.com/r/postfinance/kubenurse/\" rel=\"nofollow\">Docker Hub</a>.<br>\nThe <a href=\"https://github.com/postfinance/kubenurse/tree/master/examples\">examples</a> directory<br>\ncontains manifests which can be used to deploy kubenurse to the kube-system namespace of your cluster.</p>\n<h3 dir=\"auto\">Helm deployment</h3>\n<p dir=\"auto\">You can also deploy kubenurse with Helm, the Chart can be found in repository <code class=\"notranslate\">https://postfinance.github.io/kubenurse/</code> or directory <code class=\"notranslate\">./helm/kubenurse/</code>.<br>\nThe following command can be used to install kubenurse with Helm: <code class=\"notranslate\">helm upgrade [RELEASE_NAME] --install --repo https://postfinance.github.io/kubenurse/ kubenurse</code>.</p>\n<h4 dir=\"auto\">Helm parameters</h4>\n<details>\n<summary>helm parameters list</summary>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th>Setting</th>\n<th>Description</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>daemonset.image.repository</td>\n<td>The repository name</td>\n<td><code class=\"notranslate\">postfinance/kubenurse</code></td>\n</tr>\n<tr>\n<td>daemonset.image.tag</td>\n<td>The tag/ version of the image</td>\n<td><code class=\"notranslate\">v1.4.0</code></td>\n</tr>\n<tr>\n<td>daemonset.podLabels</td>\n<td>Additional labels to be added to the pods of the daemonset</td>\n<td><code class=\"notranslate\">[]</code></td>\n</tr>\n<tr>\n<td>daemonset.podAnnotations</td>\n<td>Additional annotations to be added to the pods of the daemonset</td>\n<td><code class=\"notranslate\">[]</code></td>\n</tr>\n<tr>\n<td>daemonset.podSecurityContext</td>\n<td>The security context of the daemonset</td>\n<td><code class=\"notranslate\">{}</code></td>\n</tr>\n<tr>\n<td>daemonset.priorityClassName</td>\n<td>The priority class name for the daemonset pods</td>\n<td><code class=\"notranslate\">\"\"</code></td>\n</tr>\n<tr>\n<td>daemonset.containerSecurityContext</td>\n<td>The security context of the containers within the pods of the daemonset</td>\n<td><code class=\"notranslate\">{}</code></td>\n</tr>\n<tr>\n<td>daemonset.containerResources</td>\n<td>The container resources of the containers within the pods of the daemonset</td>\n<td><code class=\"notranslate\">{}</code></td>\n</tr>\n<tr>\n<td>daemonset.containerImagePullPolicy</td>\n<td>The container image pull policy the pods of the daemonset</td>\n<td><code class=\"notranslate\">IfNotPresent</code></td>\n</tr>\n<tr>\n<td>daemonset.tolerations</td>\n<td>The tolerations of the daemonset</td>\n<td>See Default tolerations below</td>\n</tr>\n<tr>\n<td>daemonset.dnsConfig</td>\n<td>Specifies the DNS parameters of the pods in the daemonset</td>\n<td><code class=\"notranslate\">{}</code></td>\n</tr>\n<tr>\n<td>daemonset.volumeMounts</td>\n<td>Additional volumeMounts to be added to the pods of the daemonset</td>\n<td><code class=\"notranslate\">[]</code></td>\n</tr>\n<tr>\n<td>daemonset.volumes</td>\n<td>Additional volumes to be added to the daemonset</td>\n<td><code class=\"notranslate\">[]</code></td>\n</tr>\n<tr>\n<td>daemonset.rollingUpdate.maxUnavailable</td>\n<td>The maximum number of DaemonSet pods that can be unavailable during the update</td>\n<td><code class=\"notranslate\">34%</code></td>\n</tr>\n<tr>\n<td>daemonset.rollingUpdate.maxSurge</td>\n<td>The maximum number of nodes with an existing available DaemonSet pod that can have an updated pod during an update</td>\n<td></td>\n</tr>\n<tr>\n<td>serviceMonitor.enabled</td>\n<td>Adds a ServiceMonitor for use with <a href=\"https://github.com/prometheus-operator/prometheus-operator\">Prometheus-operator</a></td>\n<td><code class=\"notranslate\">false</code></td>\n</tr>\n<tr>\n<td>serviceMonitor.labels</td>\n<td>Additional labels to be added to the ServiceMonitor</td>\n<td><code class=\"notranslate\">{}</code></td>\n</tr>\n<tr>\n<td>serviceMonitor.relabelings</td>\n<td>Additional relabelings to be added to the endpoint of the ServiceMonitor</td>\n<td><code class=\"notranslate\">[]</code></td>\n</tr>\n<tr>\n<td>serviceAccount.name</td>\n<td>The name of the service account which is used</td>\n<td><code class=\"notranslate\">Release.Name</code></td>\n</tr>\n<tr>\n<td>service.name</td>\n<td>The name of service which exposes the kubenurse application</td>\n<td><code class=\"notranslate\">8080-8080</code></td>\n</tr>\n<tr>\n<td>service.port</td>\n<td>The port number of the service</td>\n<td><code class=\"notranslate\">8080</code></td>\n</tr>\n<tr>\n<td>service.labels</td>\n<td>Additional labels to be added to the Service</td>\n<td></td>\n</tr>\n<tr>\n<td>ingress.enabled</td>\n<td>Enable/ Disable the ingress</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>ingress.className</td>\n<td>The classname of the ingress controller (e.g. the nginx ingress controller)</td>\n<td><code class=\"notranslate\">nginx</code></td>\n</tr>\n<tr>\n<td>ingress.url</td>\n<td>The url of the ingress; e.g. kubenurse.westeurope.cloudapp.example.com</td>\n<td><code class=\"notranslate\">dummy-kubenurse.example.com</code></td>\n</tr>\n<tr>\n<td>insecure</td>\n<td>Set <code class=\"notranslate\">KUBENURSE_INSECURE</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>allow_unschedulable</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_ALLOW_UNSCHEDULABLE</code> environment variable</td>\n<td><code class=\"notranslate\">false</code></td>\n</tr>\n<tr>\n<td>neighbour_filter</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_NEIGHBOUR_FILTER</code> environment variable</td>\n<td><code class=\"notranslate\">app.kubernetes.io/name=kubenurse</code></td>\n</tr>\n<tr>\n<td>neighbour_limit</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_NEIGHBOUR_LIMIT</code> environment variable</td>\n<td><code class=\"notranslate\">10</code></td>\n</tr>\n<tr>\n<td>histogram_buckets</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_HISTOGRAM_BUCKETS</code> environment variable</td>\n<td></td>\n</tr>\n<tr>\n<td>extra_ca</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_EXTRA_CA</code> environment variable</td>\n<td></td>\n</tr>\n<tr>\n<td>extra_checks</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_EXTRA_CHECKS</code> environment variable</td>\n<td></td>\n</tr>\n<tr>\n<td>kubernetes_service_dns</td>\n<td>Sets <code class=\"notranslate\">KUBERNETES_SERVICE_DNS</code> environment variable</td>\n<td></td>\n</tr>\n<tr>\n<td>check_api_server_direct</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_API_SERVER_DIRECT</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>check_api_server_dns</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_API_SERVER_DNS</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>check_me_ingress</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_ME_INGRESS</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>check_me_service</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_ME_SERVICE</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>check_neighbourhood</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_NEIGHBOURHOOD</code> environment variable</td>\n<td><code class=\"notranslate\">true</code></td>\n</tr>\n<tr>\n<td>check_interval</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CHECK_INTERVAL</code> environment variable</td>\n<td><code class=\"notranslate\">5s</code></td>\n</tr>\n<tr>\n<td>reuse_connections</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_REUSE_CONNECTIONS</code> environment variable</td>\n<td><code class=\"notranslate\">false</code></td>\n</tr>\n<tr>\n<td>use_tls</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_USE_TLS</code> environment variable</td>\n<td><code class=\"notranslate\">false</code></td>\n</tr>\n<tr>\n<td>cert_file</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CERT_FILE</code> environment variable</td>\n<td></td>\n</tr>\n<tr>\n<td>cert_key</td>\n<td>Sets <code class=\"notranslate\">KUBENURSE_CERT_KEY</code> environment variable</td>\n<td></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n</details>\n<h3 dir=\"auto\">Configuration</h3>\n<details>\n<summary>kubenurse environment variables list</summary>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">KUBENURSE_INGRESS_URL</code>: An URL to the kubenurse in order to check the ingress</li>\n<li><code class=\"notranslate\">KUBENURSE_SERVICE_URL</code>: An URL to the kubenurse in order to check the Kubernetes service</li>\n<li><code class=\"notranslate\">KUBENURSE_INSECURE</code>: If \"true\", TLS connections will not validate the certificate</li>\n<li><code class=\"notranslate\">KUBENURSE_EXTRA_CA</code>: Additional CA cert path for TLS connections</li>\n<li><code class=\"notranslate\">KUBENURSE_EXTRA_CHECKS</code>: Additional checks, specified as a list (separated by a vertical bar <code class=\"notranslate\">|</code>) where each entry of the list has the format: <code class=\"notranslate\">&lt;metric_name&gt;:&lt;url_to_check&gt;</code>. For example <code class=\"notranslate\">google:https://www.google.ch/|cloudflare:https://www.cloudflare.com/</code></li>\n<li><code class=\"notranslate\">KUBENURSE_NAMESPACE</code>: Namespace in which to look for the neighbour kubenurses</li>\n<li><code class=\"notranslate\">KUBENURSE_NEIGHBOUR_FILTER</code>: A Kubernetes label selector (eg. <code class=\"notranslate\">app=kubenurse</code>) to filter neighbour kubenurses</li>\n<li><code class=\"notranslate\">KUBENURSE_NEIGHBOUR_LIMIT</code>: The maximum number of neighbours each kubenurse will query</li>\n<li><code class=\"notranslate\">KUBENURSE_ALLOW_UNSCHEDULABLE</code>: If this is <code class=\"notranslate\">\"true\"</code>, path checks to neighbouring kubenurses are made even if they are running on unschedulable nodes.</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_API_SERVER_DIRECT</code>: If this is <code class=\"notranslate\">\"true\"</code> kubenurse will perform the check [API Server Direct](#API Server Direct). default is \"true\"</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_API_SERVER_DNS</code>: If this is <code class=\"notranslate\">\"true\"</code>, kubenurse will perform the check [API Server DNS](#API Server DNS). default is \"true\"</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_ME_INGRESS</code>: If this is <code class=\"notranslate\">\"true\"</code>, kubenurse will perform the check [Me Ingress](#Me Ingress). default is \"true\"</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_ME_SERVICE</code>: If this is <code class=\"notranslate\">\"true\"</code>, kubenurse will perform the check [Me Service](#Me Service). default is \"true\"</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_NEIGHBOURHOOD</code>: If this is <code class=\"notranslate\">\"true\"</code>, kubenurse will perform the check <a href=\"#neighbourhood\">Neighbourhood</a>. default is \"true\"</li>\n<li><code class=\"notranslate\">KUBENURSE_CHECK_INTERVAL</code>: the frequency to perform kubenurse checks. the string should be formatted for <a href=\"https://pkg.go.dev/time#ParseDuration\" rel=\"nofollow\">time.ParseDuration</a>. defaults to <code class=\"notranslate\">5s</code></li>\n<li><code class=\"notranslate\">KUBENURSE_REUSE_CONNECTIONS</code>: whether to reuse connections or not for all checks. default is \"false\"</li>\n<li><code class=\"notranslate\">KUBENURSE_HISTOGRAM_BUCKETS</code>: optional comma-separated list of float64, used in place of the <a href=\"https://pkg.go.dev/github.com/prometheus/client_golang@v1.16.0/prometheus#DefBuckets\" rel=\"nofollow\">default prometheus histogram buckets</a></li>\n<li><code class=\"notranslate\">KUBENURSE_USE_TLS</code>: If this is <code class=\"notranslate\">\"true\"</code>, enable TLS endpoint on port 8443</li>\n<li><code class=\"notranslate\">KUBENURSE_CERT_FILE</code>: Certificate to use with TLS endpoint</li>\n<li><code class=\"notranslate\">KUBENURSE_CERT_KEY</code>: Key to use with TLS endpoint</li>\n</ul>\n<p dir=\"auto\">Following variables are injected to the Pod by Kubernetes and should not be defined manually:</p>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">KUBERNETES_SERVICE_HOST</code>: Host to communicate to the kube-apiserver</li>\n<li><code class=\"notranslate\">KUBERNETES_SERVICE_PORT</code>: Port to communicate to the kube-apiserver</li>\n</ul>\n<p dir=\"auto\">The DNS name of the API server can be configured with the<br>\n<code class=\"notranslate\">KUBERNETES_SERVICE_DNS</code> environment variable, and it defaults to<br>\n<code class=\"notranslate\">kubernetes.default.svc.cluster.local</code>.</p>\n</details>\n<h2 dir=\"auto\">HTTP Endpoints</h2>\n<p dir=\"auto\">The kubenurse service listens for http requests on port 8080 (optionally https on port 8443) and exposes endpoints:</p>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">/</code>: Redirects to <code class=\"notranslate\">/alive</code></li>\n<li><code class=\"notranslate\">/alive</code>: Returns a pretty printed JSON with the check results, described below</li>\n<li><code class=\"notranslate\">/alwayshappy</code>: Returns http-200 which is used for testing itself</li>\n<li><code class=\"notranslate\">/metrics</code>: Exposes <a href=\"https://prometheus.io/\" rel=\"nofollow\">Prometheus</a> metrics</li>\n</ul>\n<p dir=\"auto\">The <code class=\"notranslate\">/alive</code> endpoint returns a JSON like this with status code 200 if everything is OK else 500:</p>\n<div class=\"highlight highlight-source-json notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n  &quot;api_server_direct&quot;: &quot;ok&quot;,\n  &quot;api_server_dns&quot;: &quot;ok&quot;,\n  &quot;me_ingress&quot;: &quot;ok&quot;,\n  &quot;me_service&quot;: &quot;ok&quot;,\n  &quot;hostname&quot;: &quot;kubenurse-1234-x2bwx&quot;,\n  &quot;neighbourhood_state&quot;: &quot;ok&quot;,\n  &quot;neighbourhood&quot;: [\n   {\n    &quot;PodName&quot;: &quot;kubenurse-1234-8fh2x&quot;,\n    &quot;PodIP&quot;: &quot;10.10.10.67&quot;,\n    &quot;HostIP&quot;: &quot;10.12.12.66&quot;,\n    &quot;NodeName&quot;: &quot;k8s-66.example.com&quot;,\n    &quot;Phase&quot;: &quot;Running&quot;\n   },\n   {\n    &quot;PodName&quot;: &quot;kubenurse-1234-ffjbs&quot;,\n    &quot;PodIP&quot;: &quot;10.10.10.138&quot;,\n    &quot;HostIP&quot;: &quot;10.12.12.89&quot;,\n    &quot;NodeName&quot;: &quot;k8s-89.example.com&quot;,\n    &quot;Phase&quot;: &quot;Running&quot;\n   }\n  ],\n  &quot;headers&quot;: {\n   &quot;Accept&quot;: [\n    &quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8&quot;\n   ],\n   &quot;Accept-Encoding&quot;: [\n    &quot;gzip, deflate, br&quot;\n   ],\n   ...\n  }\n}\"><pre class=\"notranslate\">{\n  <span class=\"pl-ent\">\"api_server_direct\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ok<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"api_server_dns\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ok<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"me_ingress\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ok<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"me_service\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ok<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"hostname\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>kubenurse-1234-x2bwx<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"neighbourhood_state\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>ok<span class=\"pl-pds\">\"</span></span>,\n  <span class=\"pl-ent\">\"neighbourhood\"</span>: [\n   {\n    <span class=\"pl-ent\">\"PodName\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>kubenurse-1234-8fh2x<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"PodIP\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>10.10.10.67<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"HostIP\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>10.12.12.66<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"NodeName\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>k8s-66.example.com<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"Phase\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>Running<span class=\"pl-pds\">\"</span></span>\n   },\n   {\n    <span class=\"pl-ent\">\"PodName\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>kubenurse-1234-ffjbs<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"PodIP\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>10.10.10.138<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"HostIP\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>10.12.12.89<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"NodeName\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>k8s-89.example.com<span class=\"pl-pds\">\"</span></span>,\n    <span class=\"pl-ent\">\"Phase\"</span>: <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>Running<span class=\"pl-pds\">\"</span></span>\n   }\n  ],\n  <span class=\"pl-ent\">\"headers\"</span>: {\n   <span class=\"pl-ent\">\"Accept\"</span>: [\n    <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8<span class=\"pl-pds\">\"</span></span>\n   ],\n   <span class=\"pl-ent\">\"Accept-Encoding\"</span>: [\n    <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>gzip, deflate, br<span class=\"pl-pds\">\"</span></span>\n   ],\n   <span class=\"pl-ii\">...</span>\n  }\n}</pre></div>\n<h2 dir=\"auto\">Health Checks</h2>\n<p dir=\"auto\">Every five seconds, the checks described below are run.</p>\n<h3 dir=\"auto\">API Server Direct</h3>\n<p dir=\"auto\">Checks the <code class=\"notranslate\">/version</code> endpoint of the Kubernetes API Server through<br>\nthe direct link (<code class=\"notranslate\">KUBERNETES_SERVICE_HOST</code>, <code class=\"notranslate\">KUBERNETES_SERVICE_PORT</code>).</p>\n<p dir=\"auto\">Metric type: <code class=\"notranslate\">api_server_direct</code></p>\n<h3 dir=\"auto\">API Server DNS</h3>\n<p dir=\"auto\">Checks the <code class=\"notranslate\">/version</code> endpoint of the Kubernetes API Server through<br>\nthe Cluster DNS URL <code class=\"notranslate\">https://kubernetes.default.svc:$KUBERNETES_SERVICE_PORT</code>.<br>\nThis also verifies a working <code class=\"notranslate\">kube-dns</code> deployment.</p>\n<p dir=\"auto\">Metric type: <code class=\"notranslate\">api_server_dns</code></p>\n<h3 dir=\"auto\">Me Ingress</h3>\n<p dir=\"auto\">Checks if the kubenurse is reachable at the <code class=\"notranslate\">/alwayshappy</code> endpoint behind the ingress.<br>\nThis address is provided by the environment variable <code class=\"notranslate\">KUBENURSE_INGRESS_URL</code> that<br>\ncould look like <code class=\"notranslate\">https://kubenurse.example.com</code>.<br>\nThis also verifies a correct upstream DNS resolution.</p>\n<p dir=\"auto\">Metric type: <code class=\"notranslate\">me_ingress</code></p>\n<h3 dir=\"auto\">Me Service</h3>\n<p dir=\"auto\">Checks if the kubenurse is reachable at the <code class=\"notranslate\">/alwayshappy</code> endpoint through the Kubernetes service.<br>\nThe address is provided by the environment variable <code class=\"notranslate\">KUBENURSE_SERVICE_URL</code> that<br>\ncould look like <code class=\"notranslate\">http://kubenurse.mynamespace.default.svc:8080</code>.<br>\nThis also verifies a working <code class=\"notranslate\">kube-proxy</code> setup.</p>\n<p dir=\"auto\">Metric type: <code class=\"notranslate\">me_service</code></p>\n<h3 dir=\"auto\">Neighbourhood</h3>\n<p dir=\"auto\">Checks if every neighbour kubenurse is reachable at the <code class=\"notranslate\">/alwayshappy</code> endpoint.<br>\nNeighbours are discovered by querying the kube-apiserver for every Pod in the<br>\n<code class=\"notranslate\">KUBENURSE_NAMESPACE</code> with label <code class=\"notranslate\">KUBENURSE_NEIGHBOUR_FILTER</code>.<br>\nThe request is done directly to the Pod-IP (port 8080, or 8443 if TLS is enabled) and the metric types contains the prefix<br>\n<code class=\"notranslate\">path_</code> and the hostname of the kubelet on which the neighbour kubenurse should run.<br>\nOnly kubenurses on nodes that are schedulable are considered as neighbours,<br>\nthis can be changed by setting <code class=\"notranslate\">KUBENURSE_ALLOW_UNSCHEDULABLE=\"true\"</code>.</p>\n<p dir=\"auto\">Metric type: <code class=\"notranslate\">path_$KUBELET_HOSTNAME</code></p>\n<h2 dir=\"auto\">Neighbourhood filtering</h2>\n<p dir=\"auto\">The number of checks for the neighbourhood used to grow as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"aadb0fd01cd5df0ab6c382a7ac594295\">$O(N^2)$</math-renderer>, which<br>\nrendered <code class=\"notranslate\">kubenurse</code> impractical on large clusters, as documented in issue<br>\n<a href=\"https://github.com/postfinance/kubenurse/issues/55\" data-hovercard-type=\"issue\" data-hovercard-url=\"/postfinance/kubenurse/issues/55/hovercard\">#55</a>.<br>\nTo combat this, a node filtering feature was implemented, which works as follows</p>\n<ul dir=\"auto\">\n<li>kubenurse computes the <code class=\"notranslate\">sha256</code> checksums for all neighbours' node names</li>\n<li>it sorts those checksums (this is actually implemented with a max-heap)</li>\n<li>it computes its own node name checksum, and queries the next 10 (per default)<br>\nnodes in the sorted checksums list</li>\n</ul>\n<p dir=\"auto\">Here's an example with 6 nodes, where each node queries the next 3 nodes:</p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"./doc/kubenurse-node-filtering.png\"><img src=\"./doc/kubenurse-node-filtering.png\" alt=\"node filtering drawing\" style=\"max-width: 100%;\"></a></p>\n<p dir=\"auto\">Thanks to this, every node is making queries to the same 10 nodes, unless one<br>\nof those nodes disappears, in which case kubenurse will pick the next node in<br>\nthe sorted checksums list. This comes with several advantages:</p>\n<ul dir=\"auto\">\n<li>because of the way we first hash the node names, the checks are randomly<br>\ndistributed, independant of the node names. if we only picked the 10 next<br>\nnodes in a sorted list of the node names, then we might have biased the<br>\nresults in environments where node names are sequential</li>\n<li>metrics-wise, a <code class=\"notranslate\">kubenurse</code> pod should typically only have entries for ca. 10<br>\nother neighbouring nodes worth of checks, which greatly reduces the load on<br>\nyour monitoring infrastructure</li>\n<li>because we use a deterministic algorithm to choose which nodes to query, the<br>\nmetrics churn rate stays minimal. (that is, if we randomly picked 10 nodes<br>\nfor every check, then in the end there would be one prometheus bucket for<br>\nevery node on the cluster, which would put useless load on the monitoring<br>\ninfrastructure)</li>\n</ul>\n<p dir=\"auto\">Per default, the neighbourhood filtering is set to 10 nodes, which means that<br>\non cluster with more than 10 nodes, each kubenurse will query exactly 10 nodes,<br>\nas described above.</p>\n<h3 dir=\"auto\">Neighbourhood incoming checks metric</h3>\n<p dir=\"auto\">It is possible to check that each node receives the proper number of<br>\nneighbourhood queries with the <code class=\"notranslate\">kubenurse_neighbourhood_incoming_checks</code><br>\nmetric. If you have the neighbourhood limit set to e.g. 10, then this<br>\nmetric should be equal to 10 on all nodes, with some variations during a<br>\nrollout restart.</p>\n<p dir=\"auto\">To bypass the node filtering feature, you simply need to set the<br>\n<code class=\"notranslate\">KUBENURSE_NEIGHBOUR_LIMIT</code> environment variable to 0.</p>","updatedAt":"2025-05-21T16:08:29Z","upvoteCount":null,"author":{"login":"eryajf","avatarUrl":"https://avatars.githubusercontent.com/u/33259379?u=e4a4090a38ac2473aaed4ef9945233636776c6c3&v=4","url":"https://github.com/eryajf"},"category":null,"labels":{"edges":[{"node":{"name":"更多","color":"25B472"}},{"node":{"name":"K8S-Tools","color":"2d411a"}},{"node":{"name":"postfinance","color":"3b7fa2"}}]},"comments":{"edges":[]}}},"pageContext":{"number":324,"previous":{"title":"noovertime7/kubemanage: 一个简单易用的 K8s 管理平台，前端使用 Vue3 ，后端使用 Gin+Gorm ，未来将支持多集群接入","number":323},"next":{"title":"teamcode-inc/kubeorbit: 轻量高效的微服务本地联调测试工具, 轻松将集群内流量转发到本地开发环境","number":325}}},
    "staticQueryHashes": ["151096407","2861350382"]}