Skip to content

Instantly share code, notes, and snippets.

View chrislovecnm's full-sized avatar
😃
Living LIFE!!

Chris Love chrislovecnm

😃
Living LIFE!!
View GitHub Profile
W: http://dl.hhvm.com/ubuntu/dists/trusty/InRelease: Signature by key 36AEF64D0207E7EEE352D4875A16E7281BE7A449 uses weak digest algorithm (SHA1)
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
git.checkout
13.64s$ git clone --depth=50 https://github.com/kubernetes/kops.git kubernetes/kops
Cloning into 'kubernetes/kops'...
remote: Counting objects: 85316, done.
remote: Compressing objects: 100% (41095/41095), done.
remote: Total 85316 (delta 43736), reused 77427 (delta 39435), pack-reused 0
Receiving objects: 100% (85316/85316), 91.04 MiB | 21.55 MiB/s, done.
Resolving deltas: 100% (43736/43736), done.
@chrislovecnm
chrislovecnm / iam-master.json
Last active October 2, 2017 20:29
kubernetes master iam policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateTags",
"ec2:CreateVolume",
@chrislovecnm
chrislovecnm / pr.patch
Created October 1, 2017 04:32
IAM PR backup - just in case
From f54369807e6702dcfc5a19ccb7d979180f4770ff Mon Sep 17 00:00:00 2001
From: bjuncosa <borja.juncosa@socialpoint.es>
Date: Thu, 16 Mar 2017 12:39:40 +0100
Subject: [PATCH] Add feature: Custom IAM Instance Profile
This way Cluster IAM roles can be managed externally, either manually,
using cloudformation or any other tool.
---
cmd/kops/create_cluster_integration_test.go | 12 +-
cmd/kops/integration_test.go | 77 +++--
@chrislovecnm
chrislovecnm / log.txt
Created October 1, 2017 03:04
Failed build log
I1001 00:23:11.354] Bootstrap pull-kops-e2e-kubernetes-aws...
I1001 00:23:11.355] Gubernator results at https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/kops/3483/pull-kops-e2e-kubernetes-aws/3313
I1001 00:23:11.355] Root: /var/lib/jenkins/workspace/pull-kops-e2e-kubernetes-aws/go/src
I1001 00:23:11.355] cd to /var/lib/jenkins/workspace/pull-kops-e2e-kubernetes-aws/go/src
I1001 00:23:11.355] Checkout: /var/lib/jenkins/workspace/pull-kops-e2e-kubernetes-aws/go/src/k8s.io/release master
I1001 00:23:11.355] Call: git init k8s.io/release
I1001 00:23:11.361] Initialized empty Git repository in /var/lib/jenkins/workspace/pull-kops-e2e-kubernetes-aws/go/src/k8s.io/release/.git/
I1001 00:23:11.362] process 29895 exited with code 0 after 0.0m
I1001 00:23:11.362] Call: git config --local user.name 'K8S Bootstrap'
I1001 00:23:11.365] process 29896 exited with code 0 after 0.0m
2017-09-27 17:08:20,632 - kops_py - ERROR - unable to find subnet ids
2017-09-27 17:08:20,632 - kops_py - ERROR - An error occurred (InvalidSubnetID.NotFound) when calling the DescribeSubnets operation: The subnet ID '"subnet-fbf7088c' does not exist
Traceback (most recent call last):
File "/kops-py/kops_py/kops.py", line 64, in _get_cluster_subnets
response = self.aws.describe_subnets(subnet_ids=subnets, vpc_id=vpc_id)
File "/kops-py/kops_py/aws.py", line 173, in describe_subnets
SubnetIds=subnet_ids,
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 312, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 601, in _make_api_call
@chrislovecnm
chrislovecnm / alias.zsh
Created September 14, 2017 00:26
zsh alias' for kops
getMasterIP()
CLUSTER=$1
AZ=$2
aws ec2 describe-instances --filter Name="tag-value",Values="master-${AZ}.masters.${CLUSTER}" --filter Name="instance-state-name",Values="running" | jq -r '.Reservations[0].Instances[0].PublicIpAddress'
}
tailMasterLog() {
IP=$(getMasterIP $1 $2)
ssh admin@$IP "tail -f /var/log/daemon.log"
}
@chrislovecnm
chrislovecnm / rolling-update-2m.md
Last active September 5, 2017 02:15
Rolling Update test normal case 2m interval

Rolling Update Test Normal Case

These are the test results from upgrading using:

export KOPS_FEATURE_FLAGS=+DrainAndValidateRollingUpdate

Create a cluster

@chrislovecnm
chrislovecnm / rolling-update-2s.md
Last active September 5, 2017 02:09
Rolling Update Test 2s

Rolling Update Testing Notes

Attempt to recreate problem the @justinsb is having with 2s interval

Create cluster

kops create cluster --zones us-east-1c --name rolling-update.aws.k8spro.com --yes
@chrislovecnm
chrislovecnm / kops-node-k8s.json
Last active April 20, 2017 02:14
Kops k8s node IAM Role
//All the resource "*" we can prune down to a
//"Resource": "arn:aws:iam::ACCOUNTNUMBER:role/ROLENAME"
//which is tied to a VPC
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:Describe*"
@chrislovecnm
chrislovecnm / kops-k8s-master-iam.json
Created April 18, 2017 20:02
JSON for IAM kops master
//All the resource "*" we can prune down to a
//"Resource": "arn:aws:iam::ACCOUNTNUMBER:role/ROLENAME"
//which is tied to a VPC
{
"Version": "2012-10-17",
"Statement": [
// This is used by the autoscaling components
{
"Effect": "Allow",
"Action": [