Skip to content

Instantly share code, notes, and snippets.

View akutz's full-sized avatar

Andrew Kutz akutz

View GitHub Profile
@akutz
akutz / kubelet.log
Last active September 12, 2018 15:21
Failed Cross-Cloud Deployment pd17855
-- Logs begin at Wed 2018-09-12 07:31:38 UTC, end at Wed 2018-09-12 14:55:55 UTC. --
Sep 12 07:32:48 pd17855-worker-1.pd17855.vsphere.local systemd[1]: Started Kubernetes kubelet.
-- Subject: Unit kubelet.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit kubelet.service has finished starting up.
--
-- The start-up result is RESULT.
Sep 12 07:32:48 pd17855-worker-1.pd17855.vsphere.local kubelet[1458]: Flag --non-masquerade-cidr has been deprecated, will be removed in a future version
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-alpha.0.1223+7bfd0d358cbe9e", GitCommit:"7bfd0d358cbe9eb1e8dc81c909ae9d03705ec438", GitTreeState:"clean", BuildDate:"2018-09-11T16:26:36Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-alpha.0.1223+7bfd0d358cbe9e", GitCommit:"7bfd0d358cbe9eb1e8dc81c909ae9d03705ec438", GitTreeState:"clean", BuildDate:"2018-09-11T16:23:05Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
$ ./deploy.sh akutz-test
Initializing modules...
- module.folder
Getting source "./modules/folder"
- module.resource_pool
Getting source "./modules/resource_pool"
- module.master
Getting source "./modules/master"
- module.master_templates
Getting source "../master_templates-v1.10.0"
$ curl -sSL https://raw.githubusercontent.com/akutz/yakity/master/yakity.sh | \
> NODE_TYPE=controller \
> ETCD_DISCOVERY="${ETCD_DISCOVERY}" \
> NUM_CONTROLLERS=1 \
> NUM_NODES=2 sh -
pre-processed input
NODE_TYPE = controller
ETCD_DISCOVERY = https://discovery.etcd.io/45c2466cb31dd1b2ecff21f4d2ac0e3c
NUM_CONTROLLERS = 1
NUM_NODES = 2
@akutz
akutz / Dockerfile.crio-1.11.2.build
Last active September 3, 2018 19:14
Building cri-o
FROM akutz/golang:centos7.5.1804 as build
LABEL "maintainer" "Andrew Kutz <[email protected]>"
# Update the image.
RUN yum update -y
# Install the development toolchain.
RUN yum group install -y "Development Tools"
# Install the dependencies needed to build cri-o.
#!/bin/sh
# posix complaint
# verified by https://www.shellcheck.net
#
# usage: get-k8s.sh FLAGS [stable|latest|ci|<version>] [client|node|server|src|test|<file>]
#
# FLAGS
# -s Enable streaming. Instead of inflating the K8s tarball, the
@akutz
akutz / README.md
Last active August 13, 2018 20:36
How too write a one-time init routine in a distributed cluster

This gist describes how to do a one-time initialization routine across several nodes particpating in a distributed cluster.

File Description
kube-init.sh The script that performs the init routine. The etcd calls inside of the script ensure the init routine is executed exactly once, even if the script is executed on multiple nodes in the cluster.
kube-init.service The SystemD service unit that executes the script once across multiple boots
kube-online.target A SystemD target for synchronizing on when K8s is ready
@akutz
akutz / 200
Created August 11, 2018 23:35
ok
@akutz
akutz / README.md
Last active August 12, 2018 19:20
How to build nginx for Container Linux
@akutz
akutz / Dockerfile
Last active August 11, 2018 22:26
How to build a CoreOS-compatible nginx binary
FROM gcc:7.3.0
LABEL maintainer="Andrew Kutz <[email protected]>"
ENV SRC_DIR=/usr/local/src
ENV NGINX_VERSION=1.14.0
ENV NGINX_URL=http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
ENV NGINX_SRC=${SRC_DIR}/nginx-${NGINX_VERSION}
ENV OPENSSL_VERSION=1.1.0h