Skip to content

Instantly share code, notes, and snippets.

@aimakun
aimakun / .gitignore
Created February 13, 2023 09:52 — forked from pdxjohnny/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env

Upgrading Kubernetes Cluster with Kops, and Things to Watch Out For

Alright! I'd like to apologize for the inactivity for over a year. Very embarrassingly, I totally dropped the good habit. Anyways, today I'd like to share a not so advanced and much shorter walkthrough on how to upgrade Kubernetes with kops.

At Buffer, we host our own k8s (Kubernetes for short) cluster on AWS EC2 instances since we started our journey before AWS EKS. To do this effectively, we use kops. It's an amazing tool that manages pretty much all aspects of cluster management from creation, upgrade, updates and deletions. It never failed us.

How to start?

Okay, upgrading a cluster always makes people nervous, especially a production cluster. Trust me, I've been there! There is a saying, hope is not a strategy. So instead of hoping things will go smoothly, I always have bias that shit will hit the fan if you skip testing. Plus, good luck explaining to people

@aimakun
aimakun / Dockerfile
Created September 21, 2019 10:39
Dockerfile for Ansible Playbook
FROM alpine:3.7
ENV ANSIBLE_VERSION 2.8.0
ENV BUILD_PACKAGES \
bash \
curl \
tar \
openssh-client \
sshpass \
@aimakun
aimakun / README.md
Last active May 3, 2019 12:29
How to install Mutagen & setup project to resolve shared volumes slowness in Docker (local)

How to install Mutagen & setup project

  • brew install havoc-io/mutagen/mutagen https://mutagen.io/documentation/installation/
  • Include mutagen daemon start into ~/.bashrc (others maybe .zshrc etc, or manually run prior use)
  • In docker-compose.yml, remove shared volumes (remember paths for mutagen create)
  • Create first setup shell script for team each paths would add command like this:
mutagen create [path-to-host] docker://$(docker-compose ps -q [service-name])/[container-target-path] \
 --default-owner-beta=[default-app-owner-eg-www-data] \
@aimakun
aimakun / docker-compose.yml
Last active April 19, 2018 09:01
Docker compose file for laravel 5+
version: '3'
services:
db:
image: mariadb:10.3
volumes:
- db-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
@aimakun
aimakun / Dockerfile
Last active May 18, 2017 18:02
Test run npm based projects with Docker Toolbox for Windows (solution for symlinks issues)
FROM kkarczmarczyk/node-yarn:latest
COPY . /workspace
RUN yarn
EXPOSE 3000
@aimakun
aimakun / docker-compose.yml
Created February 1, 2017 07:33
Docker Compose file samples for demonstrate global containers monitoring (Graphite + Collectd + Grafana)
version: "2"
services:
graphite:
image: mackerel/graphite
restart: always
ports:
- "8000:8000"
- "2003:2003"
- "2004:2004"
@aimakun
aimakun / start.sh
Created December 29, 2016 14:44
C:\Program Files\Docker Toolbox\start.sh with enabled COMPOSE_CONVERT_WINDOWS_PATHS (docker-compose 1.9.0)
#!/bin/bash
trap '[ "$?" -eq 0 ] || read -p "Looks like something went wrong in step ´$STEP´... Press any key to continue..."' EXIT
# TODO: I'm sure this is not very robust. But, it is needed for now to ensure
# that binaries provided by Docker Toolbox over-ride binaries provided by
# Docker for Windows when launching using the Quickstart.
export PATH="/c/Program Files/Docker Toolbox:$PATH"
VM=${DOCKER_MACHINE_NAME-default}
DOCKER_MACHINE=./docker-machine.exe
@aimakun
aimakun / Dockerfile-scripts
Last active March 25, 2016 04:44
Sample for docker-compose.yml & Dockerfile used in development environment
FROM digitallyseamless/nodejs-bower-grunt
COPY . /data
WORKDIR /data
package contact
type Contact struct {
Name string `json:"name"`
Tel string `json:"tel"`
Email string `json:"email"`
}