Posts

Showing posts with the label Kubernetes

Cassandra and Kubernetes with K8ssandra

Image
Cassandra is a kick-ass database. It's reliable and works pretty well for insert heavy workloads. Cassandra does well with reads as well as long as you design your tables with your access patterns in mind. In order to work well with Cassandra, you need to avoid Tombstones either by avoiding deletes and updates or by avoiding collections. Cassandra cluster configuration and distribution can be tricky and also repairs can be a challenge at scale. K8ssandra is a complete Cassandra distribution with observability( Grafana and Prometheus ) and a simple solution for repairs called Reaper . You also need to keep in mind that by using Cassandra in containers you will lose throughput. Let's say you want to explore Cassandra and you are already using kubernetes or you have a tier 2 or 3 need or even want to save some cost in your development environment that could be an interesting solution. Today I will show how to install K8ssandra in Minikube.

There is no one size fits all

Image
Everybody knows there is no Silver Bullet. We all know there is no one size fits all, however, we still look for it. It happened over and over and for sure will keep happening. Before when there was SOA , people were doing SOA wrong and want to fix all problems with ESB. So there was the SOA Rest Guerilla movement ; Let's stop adding things on ESBs and move all to services. Now everybody has coded into microservices, they have distributed monolith in most cases and people are considering removing things from microservices and moving to Kubernetes . Why just run stateless code there right? If we can run all the things there like stateful databases, IoT/Edge, BFF, ML. However, there are other computing models. Most of the couples have Virtualization(EC2 on AWS), Containers (ECS/EKS on aws), Edge(Lambda on Edge for AWS), Serverless (AWs Lambda).

Running Istio 1.5 on Minikube

Image
Istio 1.5 is out. Istio took a very bald and big move. Istio decided to move away from microservices. Considering istio use case it makes lots of sense. As you go with microservice architecture you have several advantages like autonomy, use the best tool for the job(different languages), scale components independently, isolation and many others. However, microservices are not a free lunch and there is a downside from it. One of them is the DevOps engineering price to configure, provision, monitor and maintain several isolated services. The other one is complexity. Microservices are more complex than monolith systems. Istio took the move and went to from the microservices architecture with 5 services(Pilot, Cidatel, Telemetry, Policy, Galley, Injector) into 1 single service called istiod. This move made lots of sense.  Not only because it removed complexity but also make configuration, installation and upgrade much easier. I',m sure this move will drive more adoption.

Running a rich Microservice constellation in Kubernetes

Image
Languages have trade-offs like any solution in tech. Microservices are great for many reasons, one of them allows the best tool for the job. Kubernetes allows us to have the same operational standards and procedures even using different languages and solutions. For this blog post, I want to show a simple project I build which is a constellation of services. There are 5 microservices, written in several languages like Scala, Java, Go, Python and Rust. The services do a pretty basic math operation like (+, - , / , *) and the Scala one does the aggregation and orchestrate the other services using a polish notation algorithm and REST calls.

Running Rust Service in Kubernetes with only 3.5MB

Image
Rust is a very exciting language. Not only for system programming but also for microservices and business development. Today I will show how we can create a simple service application in rust using Iron Framework . For this blog post, we will build a rust binary and run both in Docker and Kubernetes. In order to run kubernetes locally, I will be using minikube but you can use any kind of kubernetes cluster or distribution and it should work just fine. The most amazing thing is that we can build a rust executable with only 3.5MB and a docker image with the only 3.63MB . This is super lean!

Microk8s

Image
Microk8s is another lightweight k8s distribution - perfect for local tests, an interesting alternative to Minikube , k3s , and Kind.  Microk8s works smoothly in 42 flavors of Linux(Geek Moment: You know is the right answer when you see the number 42 . LOL. ).  Microk8s has easy install and several interesting features like Local Storage, Dashboards, Metrics, DNS, Ingress, Istio and much more. Zero Ops needed with a single k8s cluster done right. That's the marketing of microk8s. In practices, the product works very well but I found a bit slow(start and stop). However installing istio, is 1 command line away from happiness.  Microk8s supports several versions of Kubernetes from 1.10+ to 1.13+ right now(20/04/2019) - k8s is 1.14+.  If you are a hardcore Linux user you must try mcirok8s. Running Microk8s on Ubuntu Cheers, Diego Pacheco

Kind - Kubernetes in Docker

Image
Kind - Allow us to run Kubernetes in Docker. This is not a production-ready solution - however, has a lot of potential in order to make a safe and lightweight alternative option to Minikube.  Kind is built with Go and uses Docker API in order to get things spinning. I got impressed with the speed thing runs with kind, this is an interesting alternative together with k3s and Minikube .

Using Multiple profiles with Minikube

Image
Kubernetes is the new Linux. K8s is the spec for the multi-poly cloud world. Running k8s could be very resource intensive, so is always a good idea being able to run things locally. For several reasons like Engineering Productivity, Tests and Experiments and so on and on. If you are working with Istio like I'm, you might realize it's a bit heavy to run local, especially if you do have other things running on k8s.   Minikube is the goto solution for local kubernetes clusters. However, as I said before, it can get pretty heavy when Istio gets involved. So the solution is pretty simple, it not much advertised. Minikube has a profile feature which allows you to create multiple profiles. Each profile will be a 2GB DISK VM created in Virtualbox. This is great because now you can run multiple kubernetes versions and multiple clusters doing multi experiments. IMHO is always great to have a k8s cluster ready to test things so I have multiple profiles like istio, lightweight, tests, ...

Kubernetes Everywhere with k3s

Image
Kubernetes is becoming the truly cloud-native specification for the cloud. However not all software runs on the cloud, there are other uses cases like embedded software(IoT and microcontrollers) besides IoT there is another kind of computation that is growing more a more nowadays called Edge, thanks to the low latency and facility capabilities. Would be great run the same infrastructure for the edge/IoT as we do for the cloud? Well, rancher folks addressed that with k3s . A super lightweight kubernetes distribution where they replace things and remove features instead of adding, This is great not only for the IoT/Edge uses cases but also for folks who study the cluster in the academia and for the developers in 2 fronts. First on the CI/CD front, so we can spin up a lightweight cluster to run all kinds of tests, this also has a perfect fit with GitOPS model.

Istio & Kubernetes: Developer Productivity and freedom to deliver your OKRs

Image
Innovation is a must have for companies today and work with the product mindset. Given the digital transformation, we live in, having a product mindset is more than delivering software but it is empowering teams and working with OKR-based management models that focus on Business Objectives rather than what teams have to do. Development teams are motivated by challenges and they should have the freedom to make choices. But these choices can often have a very high cost for the business and low return. Cloud usage is certainly a great disruptive force for all digital businesses.  There are many ways to architect Cloud-Native solutions (get the most out of cloud) often for a short-term view many companies are opting for Managed Services solution. These solutions, which are often database solutions, but not limited to the database, give a lot of speed for software development but bring two major problems in the long run.

Kubernetes 101

Image
Kubernetes has lots of concepts. It's easy to get lost in the middle of all core concept the project has. However, all these abstractions provide a great benefit which is the standard spec for different kinds of services and workloads. IF cloud providers were born with a common spec/API, we would not be talking about this subject now a day, unfortunately, this is not the reality. Today I want to share a simple presentation I made trying to explain the many concepts present in kubernetes and how they differentiate between each other like what's the difference of a Secret vs ConfigMap or how ReplicateSet is different compared with a Deployment. Also, cover what kinds of service are available and when to use ClusterIP vs Loadbalancer for instance. You will also see GitOps model , which the standard k8s way to work in production.

Running k8s on EKS

Image
EKS is the new AWS managed Service for Kubernetes launched at last Re-Invent 2018.  EKS is not available in all regions right now. EKS an option for those who don't want to use KOPS .  For this blog post, I will show how to easily set up a kubernetes cluster in AWS using EKS.  EKS has some benefits, first of all, is a managed service that you are not locked in since the API is kubernetes based so you can easily migrate to other kubernetes installation or even other kubernetes installation in other cloud vendor or on-premises.

Running Istio on AWS with Kops

Image
In previous posts, I show how to run Istio in Minikube and with Docker-Compose/Consul in local env, today I will show how to run on AWS using KOPS. This installation is Linux based(Ubuntu), I'm running all commands from my local-desktop, if you don't use Linux(shame on you) you can create a virtual-machine on AWS with ubuntu and run this commands there, also is possible to run Vagrant with Linux and them run this commands on Vagrant box as well. Istio runs smoothly in AWS with Kops. You don't need much, pretty much 3 machines(1 master node, 2 minions).  Keep in mind this is not a production-grade setup, for production, you should be running with 3 masters at least for High Availability.

Running Kubernetes on AWS with KOPS

Image
Kops is the best way to have Kubernetes running in AWS. Kops allow us to install kubernetes in EC2. Kops is written in Go . Kops helps us to create, update, maintain and destroy kubernetes clusters on aws. Kops also supports GCP(Google Could Platform). Kops has some interesting ability to generate terraform files if that's your you thing :-).  For this blog post, we will be using AWS ELB as DNS so we won't be using public DNS records which are done by setting carefully the name of the cluster - which need to end with .k8s.local. Right now is way faster to spin up a kubernetes cluster with Kops rather than EKS .

Why do you need Kubernetes in your next project?

Image
The cloud is not the end, but the beginning. Starting a quick journey to the cloud brings benefits to your business. However, to get more benefits and reduce costs it is necessary to adopt a cloud-native mindset, which means going beyond, using the maximum value of cloud computing. Kubernetes , a system designed by Google and maintained by the Cloud Native Computing Foundation , for example, is much more than a container orchestration solution. Many experts consider Kubernetes the new Linux since much evolution is to happen in this system. Nowadays all organizations use Linux, but not all organizations use Kubernetes. Possibly we will reach the point where all companies will start using kubernetes, just as they use Linux today. You must be imagining technical reasons for using Kubernetes. They exist and there are many, however, there are also very relevant business reasons regarding the use of this system. Keeping Innovation Flowing It is increasingly important to innovate wi...

Building Effective Microservices - 80% OFF until 30th November

Image
Want to learn how to build microservices using Java 8, NetflixOSS Stack(Eureka, RxNetty, Feign, Hystrix, Ribbon) using Kubernetes(Minikube).  That's the real deal you read it right. Get my videos series: Building Effective Microservices 80% until 30th November 2017.

Go and Redis running on Kubernetes with Minukube

Image
Go is a simple, fast and powerful programing language. Go is growing a lot into the DevOps Engineering scene like Hashicorp Stack or even Kubernetes .  One of the main advantages of GO is the fact that you can generate a single binary with all you needed, bundled in a single file. This makes distribution so much easier. Go is also very compact for some use cases and you can write so less code and still very very efficient and get best of performance.  Today we will see how to create a very, very, very simple service in go. This service will access redis to increment how many times it was called.  We will use Minikube in order to run kubernetes locally and we will store our data in Redis.

Kubernetes with Docker and Minikube

Image
Kubernetes is getting more popular every day. Kubenertes is an open source system for automating deployments, scaling and managing containerized applications. Created by Google on 2014 and also know as k8s. Why? Because there are 8 letters between k and s :-). K8s has many features such as Automatic bin-packing which is the capability of placing containers based on resources and constraints.  K8s also has horizontal scaling, storage orchestration using local storage or cloud storage such as AWS or GCP. K8s has important Cloud native capabilities such as Self Healing, Service Discovery and Load Balancing and secret and dynamic config management. For this blog post, we will see how to bake a simple docker image using node js application and deploy this docker image on hibernates using minikube in order to run locally. There are other cloud-native solutions such as NetflixOSS Stack . Also Spring Cloud , which uses NetflixOSS too. However, on this post, we will ...