Skip to main content

Posts

Presentation: Dynamic Management of Kubernetes

The last presentation is about dynamic management of Kubernetes . Dynamic management of kubernetes from Martin Podval
Recent posts

Http and TCP Load Balancing with Kubernetes

Kubernetes allows to manage large clusters which are composed of  docker containers . And where is large computation power there is large amount of data throughput. However, there is still a need to spread the data throughput so it can reach and utilize particular docker container(s). This is called load balancing .  Kubernetes supports two basic forms of load balancing. Internal among docker containers themselves and external for clients which call you application from outside environment - just users. Internal Load Balancing with Kubernetes Usual approach during the modeling of an application in kubernetes is to provide domain models for pods, replications controllers and services. Look at the  great documentation  if you are not aware of all these principles. For simplification, pod is a set of docker containers which are always located on the same node. Replication controller allows and guarantees scalability. The last but not least is the  service which hides all inst

Validating nginx config file using docker approach

I try to setup nginx as a load balancer. The configuration is just a file with a lot of constrains so I need a validation. There is no online validation service, as e.g. CoreOS has , and I don't want to install nginx on my laptop as I work on a distributed app. Docker is right approach for me. Let say I have following config: In short, I'm going to pass nginx config to running nginx instance and look to the logs. Put you nginx.config to the temp and start the docker image: sudo docker run --name nginx -v /tmp/nginx.config:/etc/nginx/nginx.conf:ro -d nginx It uses volume mapping  so the command just starts a new docker container and mounts a local /tmp/nginx.config to the given in-container path. You can obviously change the volume path to your personal path. Is it working or not? Look at logs. sudo docker logs nginx If there is no entry, your file is fine. In the case of an error, you can see something like this: 2016/01/08 11:37:31 [emerg] 1#1: unexpected &q

Building go-lang project /Kubernetes Ingress/ from scratch with no go experience

I have been working with Kubernetes and I wanted to build it's contrib yesterday. However, nginx implementation of Kubernetes' Ingress is written in go-lang . Even though I needed to change some  const string , it required recompilation. Go is not java, and go building system is not maven. Setting up the environment was not straightforward. I was facing couple troubles but I'm going to take it from the beginning. My laptop uses ubuntu 15.04 - well 15.10 since 9pm :-) - and I have never installed go lang yet. Go lang installation on Ubuntu First of all, you need to install go lang. You can use official repo , but it contains older version 1.3. However, do not install it using apt-get as kubernetes or it's dependencies require higher version of go-lang. Of course, I originally installed version 1.3  but some fatal error occurred later. It forced me do to the manual installation anyway. Here is simple tutorial . Last two lines affect only the current termin

Using CoreOS stack and Kubernetes #2: Why use CoreOS as Cloud Operating System

I'd like to deal in this part with potential benefits resulting from using CoreOS as an operating system in your cloud deployment. You can install kubernetes on various operating systems  so you can make a decision what to choose. So why CoreOS? What is my experience? Etcd, Fleet and Flannel Preinstalled First reason is obvious. CoreOS always provides latest version of all components in Kubernetes cluster.  My experience : we have profited from pre-installed components from the beginning. E.g. in early stages when etcd was coming with new beautiful and powerful API (v.2), they put both - old and new - versions together so we just enabled one of them. The setup of all components together is not very simple so you can save couple hours by choosing preinstalled and pre-setuped CoreOS. No Package Manager, Read Only Partitions It sounds more like disadvantage than benefit, but ... Look at CoreOS releases what it consist of. Fore example, CoreOS includes basic