Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Eschinger ryane

View GitHub Profile
@ryane
ryane / demo.yml
Last active May 21, 2017
Code for ExternalDNS blog post
View demo.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: nginx.extdns.ryaneschinger.com
http:
@ryane
ryane / defaultbackend.yml
Last active May 3, 2017
Code for External DNS, Let's Encrypt, and Nginx Ingress on Kubernetes and AWS
View defaultbackend.yml
---
kind: Service
apiVersion: v1
metadata:
name: nginx-default-backend
labels:
app: ingress-nginx
component: default-backend
k8s-addon: ingress-nginx.addons.k8s.io
@ryane
ryane / main-state.tf
Last active Apr 26, 2018
Code for Deploy Kubernetes in an Existing AWS VPC with Kops and Terraform post
View main-state.tf
resource "aws_s3_bucket" "state_store" {
bucket = "${var.name}-state"
acl = "private"
force_destroy = true
versioning {
enabled = true
}
...
}
View debug.log
aws_route53_zone.public: Refreshing state... (ID: ZPIIVVYPS22KD)
aws_route53_zone.public: Destroying...
2017/03/03 08:37:06 [INFO] Terraform version: 0.8.8
2017/03/03 08:37:06 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.8.8/bin/terraform", "destroy", "-force"}
2017/03/03 08:37:06 [DEBUG] Detected home directory from env var: /Users/ryan
2017/03/03 08:37:06 [DEBUG] Detected home directory from env var: /Users/ryan
2017/03/03 08:37:06 [DEBUG] Attempting to open CLI config file: /Users/ryan/.terraformrc
2017/03/03 08:37:06 [INFO] Local triton provider configuration 'triton-terraform' overrides '/usr/local/Cellar/terraform/0.8.8/bin/terraform-TFSPACE-internal-plugin-TFSPACE-provider-TFSPACE-triton'
2017/03/03 08:37:06 [DEBUG] Detected home directory from env var: /Users/ryan
2017/03/03 08:37:06 [DEBUG] Checking resource noop: aws_route53_zone.public
View main.tf
variable "image_url" {
default = "debian-cloud/debian-8"
}
resource "google_compute_disk" "seconddisk" {
name = "seconddisk"
type = "pd-standard"
zone = "us-west1-a"
size = "100"
}
View main-module.tf
variable "region" {
default = "us-east-1"
}
variable "ssh_public_key" {
default = "~/.ssh/id_rsa.pub"
}
provider "aws" {
region = "${var.region}"
@ryane
ryane / k8s-deployment-demo-deployment-version.diff
Created Jun 14, 2016
Diff between the v1 and v2 k8s-deployment-demo deployment manifests
View k8s-deployment-demo-deployment-version.diff
diff --git a/demo-deployment-v1.yml b/demo-deployment-v2.yml
index 2823271..13f58d3 100644
--- a/demo-deployment-v1.yml
+++ b/demo-deployment-v2.yml
@@ -12,15 +12,15 @@ spec:
metadata:
labels:
app: k8s-deployment-demo
- version: v0.1
+ version: v0.2
@ryane
ryane / k8s-deployment-demo-version.diff
Created Jun 12, 2016
Diff between the v1 and v2 k8s-deployment-demo replication controller manifests
View k8s-deployment-demo-version.diff
diff --git a/demo-rc-v0.1.yml b/demo-rc-v0.2.yml
index 985c09f..f464cdf 100644
--- a/demo-rc-v0.1.yml
+++ b/demo-rc-v0.2.yml
@@ -2,25 +2,25 @@
apiVersion: v1
kind: ReplicationController
metadata:
- name: k8s-deployment-demo-controller-v1
+ name: k8s-deployment-demo-controller-v2
View keybase.md

Keybase proof

I hereby claim:

  • I am ryane on github.
  • I am ryane (https://keybase.io/ryane) on keybase.
  • I have a public key whose fingerprint is E4F4 1EAB BF0F C785 06D8 62EF EF68 CF41 D42A 593D

To claim this, I am signing this object:

@ryane
ryane / terraform-aws-wait-healthy.sh
Last active Nov 7, 2019
Waits for AWS instances launched from Terraform to become healthy
View terraform-aws-wait-healthy.sh
aws ec2 wait instance-status-ok --instance-ids $(cat terraform.tfstate | jq '.modules[].resources[] | select(.type == "aws_instance") | .primary.attributes.id' | sed 's/\"//g' | tr '\n', ' '; echo '')