All that serverless and containers thing is nice. If you are starting a new business and building

Jomoj
9 min readDec 8, 2020

--

Should we have migrated to Kubernetes? Yes, absolutely. There are several benefits of using Kubernetes — service-discovery, better cost management, resilience, governance, abstraction over infrastructure of cloud infrastructure to name a few. We are reaping all these benefits today as well. But that was not our primary goal when we started and the self-imposed pressure and pain of delivering the way we did was perhaps unnecessary.

We will see in this blog post that migration and operations on Kubernetes are not the same as deploying on cloud VMs or bare metals. There is a learning curve for your cloud engineering and development teams. It might be worth it for your team to go through it. But do you need to do that now is the question. You must try to answer that clearly.

If there’s one thing people who used to live in Williamsburg and now live in the Hudson Valley love, it’s talking about the car they bought when they left the city and had to start driving to Stop & Shop. If there’s another thing they love, it’s taking you to all the local restaurants and bars when you come visit and crash on their new couch in their beautifully restored farmhouse outside of Hudson. Thank them for their hospitality with a gay candle from local establishment Lil Deb’s Oasis, a very good restaurant where I once sat silently at a table of 7 people for two hours because I ate an edible an hour before dinner.

Out-of-the-box Kubernetes is never enough, for almost anyone. It’s a great playground to learn and explore. But you are most likely going to need more infrastructural components on top and tie them well together as a solution for applications to make it more meaningful for your developers. Often this bundle of Kubernetes with additional infrastructural components and policies is called Internal Kubernetes Platform. This is as an extremely useful paradigm and there are several ways to extend Kubernetes.

Logs have always been a big problem for us. We have struggled to create a stable logging platform using ELK. We find ELK full of features that are not realistically used by our team. Those features come at a cost. Also, we think there are inherent challenges in using Elasticsearch for logs, making it an expensive solution for logs. We finalized on Loki by Grafana. It’s simple. It has necessary features for our team’s needs. It’s extremely cost-effective. But most importantly, it has a superior UX owing to it’s query language being very similar to PromQL. Also, it works well with Grafana. So that brings the entire metrics monitoring and logging experience together in one user interface.We made some mistakes on this front. Our primary reason to migrate to Kubernetes was to build a continuous integration infrastructure that could assist us with rapid re-architecture of our microservices in which a lot of architecture debt had crept in over the years. Most new features required touching multiple code bases and hence, development and testing all of them together would slow us down. We felt the need to be able to provision an integrated environment for every developer and every change to assist with faster development and testing cycles without coordinating who gets the “shared stage environment”.One big learning for us was we could have taken a different and lesser resistant path to adopting Kubernetes. We were just bought into Kubernetes as the only solution that we didn’t even care to evaluate other options.

site:

https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK4.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-NK1.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-NK2.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK9.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK5.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK6.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-OK.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-NK3.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK7.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK8.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK3.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK2.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-MK1.html
https://shadowmountain.org/hub/video-Bills-v-49ers-NFL-Game-NK.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Game-Live.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Game-Live1.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Game-Live2.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Game-Live3.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Game-Live4.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak1.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak2.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak3.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak4.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak5.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak6.html
https://shadowmountain.org/hub/videos-49ers-v-Bills-Ak7.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak1.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak2.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak3.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak4.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak5.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak6.html
http://thebestofgreenbay.org/vpx/videos-49ers-v-Bills-Ak7.html
http://thebestofgreenbay.org/vpx/Video-Bills-v-49ers-nFL-buk01.html
http://thebestofgreenbay.org/vpx/Video-Bills-v-49ers-nFL-buk02.html
http://thebestofgreenbay.org/vpx/Video-Bills-v-49ers-nFL-buk03.html
http://thebestofgreenbay.org/vpx/Video-Bills-v-49ers-nFL-buk04.html
http://thebestofgreenbay.org/vpx/Video-Bills-v-49ers-nFL-buk05.html
https://shadowmountain.org/hub/Video-Bills-v-49ers-nFL-buk01.html
https://shadowmountain.org/hub/Video-Bills-v-49ers-nFL-buk02.html
https://shadowmountain.org/hub/Video-Bills-v-49ers-nFL-buk03.html
https://shadowmountain.org/hub/Video-Bills-v-49ers-nFL-buk04.html
https://shadowmountain.org/hub/Video-Bills-v-49ers-nFL-buk05.html
http://thebestofgreenbay.org/vpx/Videos-49ers-v-Billss-Liv-NFl-Tv-a.html
http://thebestofgreenbay.org/vpx/Videos-49ers-v-Billss-Liv-NFl-Tv-b.html
http://thebestofgreenbay.org/vpx/Videos-49ers-v-Billss-Liv-NFl-Tv-c.html
http://thebestofgreenbay.org/vpx/Videos-49ers-v-Billss-Liv-NFl-Tv-d.html
http://thebestofgreenbay.org/vpx/Videos-49ers-v-Billss-Liv-NFl-Tv-e.html
https://shadowmountain.org/hub/Videos-49ers-v-Billss-Liv-NFl-Tv-a.html
https://shadowmountain.org/hub/Videos-49ers-v-Billss-Liv-NFl-Tv-b.html
https://shadowmountain.org/hub/Videos-49ers-v-Billss-Liv-NFl-Tv-c.html
https://shadowmountain.org/hub/Videos-49ers-v-Billss-Liv-NFl-Tv-d.html
https://shadowmountain.org/hub/Videos-49ers-v-Billss-Liv-NFl-Tv-e.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live1.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live2.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live3.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live4.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live-tbc.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live-tbc1.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live-tbc1.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live-tbc3.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-Live-tbc4.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl01.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl02.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl03.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl04.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl05.html
https://shadowmountain.org/hub/video-Bills-v-49ers-nfl06.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl01.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl02.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl03.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl04.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl05.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-nfl06.html
https://www.mymathgenius.com/vpx/Video-Keller-v-Timber-Creek-Liv01.html
https://www.mymathgenius.com/vpx/Video-Keller-v-Timber-Creek-Liv02.html
https://www.mymathgenius.com/vpx/Video-Keller-v-Timber-Creek-Liv03.html
https://www.mymathgenius.com/vpx/Video-Sharyland-v-Pace-Liv01.html
https://www.mymathgenius.com/vpx/Video-Sharyland-v-Pace-Liv02.html
https://www.mymathgenius.com/vpx/Video-Sharyland-v-Pace-Liv03.html
https://www.mymathgenius.com/vpx/Video-Starkville-v-Christian-Liv01.html
https://www.mymathgenius.com/vpx/Video-Starkville-v-Christian-Liv02.html
https://www.mymathgenius.com/vpx/Video-Starkville-v-Christian-Liv03.html
https://cne-eg.com/vpx/Video-Keller-v-Timber-Creek-Liv-hq01.html
https://cne-eg.com/vpx/Video-Keller-v-Timber-Creek-Liv-hq02.html
https://cne-eg.com/vpx/Video-Keller-v-Timber-Creek-Liv-hq03.html
https://cne-eg.com/vpx/Video-Sharyland-v-Pace-Liv-hq01.html
https://cne-eg.com/vpx/Video-Sharyland-v-Pace-Liv-hq02.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq01.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq02.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq03.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq04.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq05.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq06.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq07.html
https://shadowmountain.org/hub/Video-49ers-v-bills-mnf-hq08.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq01.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq02.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq03.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq04.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq05.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq06.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq07.html
http://thebestofgreenbay.org/vpx/Video-49ers-v-bills-mnf-hq08.html
http://thebestofgreenbay.org/vpx/National-v-Finals-Rodeo-Game-Live.html
https://cne-eg.com/vpx/Video-Starkville-v-Christian-Liv01.html
https://cne-eg.com/vpx/Video-Starkville-v-Christian-Liv02.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KS2.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KS1.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KS.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO9.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO8.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO7.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO6.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO5.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO4.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO3.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO2.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO1.html
http://thebestofgreenbay.org/vpx/video-Bills-v-49ers-NFL-Game-KO.html
http://thebestofgreenbay.org/vpx/Video-Natrideo-hq01.html
http://thebestofgreenbay.org/vpx/Video-Natrideo-hq03.html
http://thebestofgreenbay.org/vpx/Video-Natrideo-hq02.html
http://thebestofgreenbay.org/vpx/Video-Natrideo-hq04.html
http://thebestofgreenbay.org/vpx/Video-Natrideo-hq05.html
http://thebestofgreenbay.org/vpx/video-Wrangler-v-NFR-2020-Liv01.html
http://thebestofgreenbay.org/vpx/video-Wrangler-v-NFR-2020-Liv02.html
http://thebestofgreenbay.org/vpx/video-Wrangler-v-NFR-2020-Liv03.html
http://thebestofgreenbay.org/vpx/video-Wrangler-v-NFR-2020-Liv04.html
http://thebestofgreenbay.org/vpx/video-Wrangler-v-NFR-2020-Liv05.html
https://shadowmountain.org/hub/video-Wrangler-v-NFR-2020-Liv01.html
https://shadowmountain.org/hub/video-Wrangler-v-NFR-2020-Liv02.html
https://shadowmountain.org/hub/video-Wrangler-v-NFR-2020-Liv03.html
https://shadowmountain.org/hub/video-Wrangler-v-NFR-2020-Liv04.html
https://shadowmountain.org/hub/video-Wrangler-v-NFR-2020-Liv05.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-liV-onhqc01.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-liV-onhqc02.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-liV-onhqc03.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-liV-onhqc04.html
http://thebestofgreenbay.org/vpx/Bills-v-49ers-liV-onhqc05.html
http://thebestofgreenbay.org/vpx/Niners-v-Bills-go1.html
http://thebestofgreenbay.org/vpx/Niners-v-Bills-go2.html
http://thebestofgreenbay.org/vpx/Niners-v-Bills-go3.html
http://thebestofgreenbay.org/vpx/Niners-v-Bills-go4.html
http://thebestofgreenbay.org/vpx/Niners-v-Bills-go5.html
https://shadowmountain.org/hub/Bills-v-49ers-liV-onhqc01.html
https://shadowmountain.org/hub/Bills-v-49ers-liV-onhqc02.html
https://shadowmountain.org/hub/Bills-v-49ers-liV-onhqc03.html
https://shadowmountain.org/hub/Bills-v-49ers-liV-onhqc04.html
https://shadowmountain.org/hub/Bills-v-49ers-liV-onhqc05.html
https://shadowmountain.org/hub/Niners-v-Bills-go1.html
https://shadowmountain.org/hub/Niners-v-Bills-go2.html
https://shadowmountain.org/hub/Niners-v-Bills-go3.html
https://shadowmountain.org/hub/Niners-v-Bills-go4.html
https://shadowmountain.org/hub/Niners-v-Bills-go5.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-00.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-01.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-02.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-03.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-04.html
http://thebestofgreenbay.org/vpx/videos-Wrangler-v-NFR-05.html
http://thebestofgreenbay.org/vpx/video-nationodeo-v-ck2.html
http://thebestofgreenbay.org/vpx/video-nationodeo-v-ck1.html
http://thebestofgreenbay.org/vpx/video-nationodeo-v-ck.html
https://shadowmountain.org/hub/National-v-Finals-Rodeo-Game-Live.html

It took us almost 1.5 years to stabilize this complex CI setup by building additional tooling, telemetry and redoing how every application is deployed. For the sake of dev/prod parity, we had to deploy all these micro-services to production as well or else just the drift between the infrastructure and deployment setup will make the applications hard to reason about for developers and would have made ops for developers a nightmare.

If you are already deploying on cloud VMs or perhaps another PaaS, why are you really considering migrating to Kubernetes from your existing infrastructure? Are you confident that Kubernetes is the only way to solve your problems? You must be clear about your motivations as migrating an existing infrastructure to Kubernetes is a big undertaking.

We finalized on Prometheus. Prometheus is almost a defacto metrics infrastructure today. CNCF and Kubernetes love it very much. It works really well within the Grafana ecosystem. And we love Grafana! Our only problem was that we were using InfluxDB. We have decided to migrate away from InfluxDB and totally commit to Prometheus.

We do this today very well. We provision 21 micro-services in an integrated environment under 8 minutes today on Kubernetes. Any developer can use our home-grown tool to do this. We also provision a subset of this environment for every pull request created for any of these 21 micro-services. The entire test-cycle (provisioning the environment and running tests) takes under 12 minutes. It might feel like awfully long but it prevents us from shipping bad changes in the architectural mess we are currently in.

Metrics, logs, service discovery, distributed tracing, configuration and secret management, CI/CD, local development experience, auto-scaling on custom metrics are all things to take care of and make a decision. These are only some of the things that we are calling out. There are definitely more decisions to make and more infrastructure to set up. An important area is how are your developers going to work with Kubernetes resources and manifests — more on this later in this blog post.Even if you offload operating Kubernetes to a managed Kubernetes service such as EKS, GKE or AKS, deploying and operating applications on Kubernetes properly also has a learning curve. Your development team should be up for the challenge. A lot of benefits can only be realised if your team follows the DevOps philosophy. If you have central sysadmin teams writing manifests for applications developed by other teams, we personally see lesser benefit of Kubernetes from the perspective of DevOps. Of course, there are numerous other benefits that you can choose Kubernetes for, for example cost, faster experimentation, faster auto-scaling, resilience, etc.We have mixed feelings about this topic. In retrospect, we think we made our problem of solving for continuous integration worse because the complexity of pushing all microservices to production for dev/prod parity made the challenge of achieving faster CI builds a lot more complex and difficult. Before Kubernetes, we were using Ansible with Hashicorp Consul and Vault for infrastructure provisioning, configuration management and deployments. Was it slow? Yes, absolutely. But we think we could have introduced service discovery with Consul and optimized Ansible deployments a bit to get close enough to our goal in a reasonably shorter time.

--

--