TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Developing your own Kubernetes controller in Java

29 pointsby nfrankelabout 5 years ago

2 comments

navaatiabout 5 years ago
Nice article, I like the emphasis that &quot;you don&#x27;t need anything else than HTTP and JSON to extend Kubernetes !&quot;.<p>Regarding the use-case, I just want to note that if you want to add a container next to every scheduled pod, it is best to have it be part of the pod itself rather than in another pod with another lifecycle. And to achieve that the best tool is not a plain controller, but a &quot;mutating admission controller webhook&quot;, described here <a href="https:&#x2F;&#x2F;kubernetes.io&#x2F;docs&#x2F;reference&#x2F;access-authn-authz&#x2F;extensible-admission-controllers&#x2F;#admission-webhooks" rel="nofollow">https:&#x2F;&#x2F;kubernetes.io&#x2F;docs&#x2F;reference&#x2F;access-authn-authz&#x2F;exte...</a>, which will allow you to, well, mutate, pod descriptions on the fly as they are submitted to the cluster (and add your sidecar container to it).<p>Of course, the goal of the article is to demonstrate lifecycle management by reacting to change (a controller), so it&#x27;s all fair in this case :).
alisweabout 5 years ago
Nice article(s)!<p>&gt; Notice all the null parameters that need to be passed<p>Why, yes, I think we noticed those :)<p>Thanks to your article(s), I&#x27;ve begun calling the k8s api myself now in some experiments.<p>It actually works to call the REST API manually in dotnetcore (without a library), but I fear having to do with any self signed certificates that may be &quot;defined&quot; (? I&#x27;ve only heard of them so far) in kubeconfig would be too much to do oneself.