kubernetes, kube tips

Kubernetes tips - part 3

This post is about supported Kubernetes API versions on your cluster and services port forwarding to your localhost which can be really useful when troubleshooting or testing apps running on Kubernetes. Check other Kubernetes tips articles on my blog by using this tag kube-tips. Kubernetes API versions If you are familiar with Kubernetes resources config files you already saw the apiVersion field at the beginning of each file. It can be confusing, because you will see a lot of different versions there like v1 or apps/v1beta1, etc. Things are moving really fast in the Kubernetes world and even if ...

devops, sre, cloud native

What is DevOps?

I'm a DevOps engineer, and that is how others see my role in the team. But, often nobody in the organization doesn't really know what that means or how to proceed with DevOps. DevOps is often confused with a modern sysadmin, the person who "deploys" the software and helps developers to create environments. DevOps is a methodology on how modern software organizations should do software development. The DevOps team works on automating things by using different tools and techniques and making environments not just automated, but automatic. DevOps also requires development, but the development part is done on ...

kubernetes, kube tips

Kubernetes tips - part 2

This post is about writing Kubernetes configuration files with syntax checking and how to run a private Docker images on Kubernetes. Check other Kubernetes tips articles on my blog by using this tag kube-tips. Writing Kubernetes configuration files Kubernetes configuration files are pretty complex to write and mostly you will just copy/paste some existing resource and try to manage it to work for a new one. This approach is fine unless you need to add some new configuration options in the mix. I use Sublime Text text editor for almost everything, but I wasn't able to find a good ...

kubernetes, environment variables

Kubernetes environment variables

When building your application stack to work on Kubernetes, the basic Pod configuration is usually done by setting different environment variables. Sometimes you want to configure just a few of them for a particular Pod, or to define a set of environment variables that can be shared in multiple Pods. Later is usually done by creating a ConfigMap as a shared resource. Instead of specifying each environment variable individually we can reference the whole ConfigMap. Set environment variables To set the environment variables you can use env or envFrom key in the configuration file. A most basic option is to ...

kubernetes, statefulset

Stateful applications on Kubernetes

Kubernetes and stateless applications work just out of the box. You can create a replicated application really fast. This is because the application doesn't store any data and simple load balancing will do the job when it comes to scaling it. However, if you want to run any application that stores the data somewhere, you care about the order how the application is started, or you want a stable hostname and network ID, then we are talking about the stateful applications and in Kubernetes world StatefulSet is the type of workload object you need to use. Unlike Deployment there are ...

kubernetes, kube tips

Kubernetes tips - part 1

Working with Kubernetes can be hard at the beginning. It is a complex orchestrator and you will probably spend a lot of time dealing with or finding a solution for a particular problem. I do the same, and I decided to write a series of posts which will cover different Kubernetes features. I will try to post at least two tips in each post. You will be able to find all tips using the tag kube-tips. Expose external service Migrating production workloads to Kubernetes cluster is not easy. You can not just stop all services and start them on the ...