Tag: kubernetes

  • Use FZF to Speed Up KUBECTL

    FZF is general purpose option selector for Linux command line. By default fzf is an super-upgrade for the ctrl-r command history finder, but it is helpful for almost any scenario where you need to pick 1 item from a list. Here’s a tiny use case where I use fzf to select a kubernetes namespace and…

  • Nicer Deployment with Kubernetes

    The default strategy to do rolling update in a Kubernetes deployment is to reduce the capacity of current replica set and then add the capacity to the new replica set. This probably means total processing power for the app could be hindered a bit during the deployment. I’m a bit surprised to find that the…

  • Don’t Panic When Kubernetes Master Failed

    It was business as usual when I was upgrading our Kubernetes cluster from 1.9.8 to 1.9.10, until it isn’t. From AWS console I can see the new instance for the master is running and the old one has been terminated. There’s 1 catch though, the IP yy.yy.yy.yy is not the IP of the new master…

  • Upload Limit in Kubernetes Nginx Ingress Controller

    According to https://github.com/nginxinc/kubernetes-ingress/issues/21#issuecomment-408618569, this is how to lift the upload limit in Nginx Ingress Controller for Kubernetes after recent update to the project: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-project-ingress namespace: test-project-dev annotations: kubernetes.io/ingress.class: dev nginx.ingress.kubernetes.io/proxy-body-size: 200m spec: rules: – host: test-project.dev.com http: paths: – path: / backend: serviceName: test-project servicePort: 80 And for now…

  • Auto Scaling in Kubernetes 1.9

    I updated my Kubernetes cluster from 1.8 to 1.9 recently, the upgrade process is very smooth, however the auto-scaling part seemed to be failing. Below are some notes on how I troubleshoot this issue. First to ensure I have both kops and kubectl upgraded to 1.9 on my laptop: Install kubectl 1.9: curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.9.10/bin/linux/amd64/kubect…

  • Playing with Kubernetes Ingress Controller

    It’s very very easy to use Kubernetes(K8s) to provision an external service with AWS ELB, there’s one catch though(at least for now in 2018). AWS ELB is usually used with an auto scaling group and a launch configuration. However with K8s, EC2 instances won’t get spun directly, only pods will, which is call Horizontal Scaling.…

  • Kubernetes Log Aggregation with Filebeat and Logstash

    Following last blog, Filebeat is very easy to setup however it doesn’t do log pattern matching, guess I’ll need Logstash after all. First is to install Logstash of course. To tell Filebeat to feed to Logstash instead of Elasticsearch is straightforward, here’s some configuration snippets: Filebeat K8s configMap: — apiVersion: v1 kind: ConfigMap metadata: name:…

  • Kubernetes Cluster Log Aggregation with Filebeat

    Finally the Kubernetes cluster I was working on went live, and I didn’t provide a log aggregation solution yet. I had a look at dynaTrace, which is a paid SaaS. However it requires to install some agent in every container. It’s fun when there’s only several to play with but I wouldn’t rebuild dozens of…