Skip to content

Instantly share code, notes, and snippets.

View athiwatp's full-sized avatar
💭
I may be slow to respond.

athiwatp athiwatp

💭
I may be slow to respond.
View GitHub Profile
alias h3='helm3'
#I can only make it work in kube-system
kubectl config set-context $(kubectl config current-context) --namespace=kube-system
#to be replaced with helm?
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.8/deploy/manifests/00-crds.yaml
h3 upgrade --install cert-manager \
--version v0.8.0 jetstack/cert-manager \
@athiwatp
athiwatp / deployment.yaml
Created February 8, 2020 09:20 — forked from NiklasMerz/deployment.yaml
Github Actions Kubernetes Deploy
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: myproject
name: myproject
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
@athiwatp
athiwatp / main.tf
Created February 6, 2020 11:58 — forked from AlainODea/main.tf
Terraform: Latest Ubuntu 18.04 LTS encrypted AMI
resource "aws_ami_copy" "ubuntu-18_04-encrypted" {
name = "${data.aws_ami.ubuntu-18_04.name}-encrypted"
description = "${data.aws_ami.ubuntu-18_04.description} (encrypted)"
source_ami_id = "${data.aws_ami.ubuntu-18_04.id}"
source_ami_region = "${var.region}"
encrypted = true
tags {
ImageType = "encrypted-ubuntu-18_04"
}
@athiwatp
athiwatp / docker_wordpress.md
Created January 28, 2020 11:26 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@athiwatp
athiwatp / 1_simple.go
Created September 4, 2019 19:53 — forked from sosedoff/1_simple.go
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@athiwatp
athiwatp / go-soap-wsdl-using-http.go
Created September 4, 2019 19:18 — forked from novalagung/go-soap-wsdl-using-http.go
Example implementation of making SOAP call on WSDL web service using go with only net/http package. The full tutorial avaiable on https://medium.com/eaciit-engineering/soap-wsdl-request-in-go-language-3861cfb5949e
package main
import (
"bytes"
"crypto/tls"
"encoding/base64"
"encoding/xml"
"fmt"
"log"
"net/http"

Kubernetes + AWS ECR = ❤️

Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.

Based off of this awesome Redsaid blog post.

Requirements

  • Amazon ECR, along with your AWS account ID and the region your ECR is in
  • AWS CLI
@athiwatp
athiwatp / cert-manager-nginx-ingress-gke-recipe.md
Created August 12, 2019 13:35
A quickstart guide to deploying cert-manager and nginx-ingress on GKE

This is a quick recipe for deploying cert-manager and nginx-ingress on GKE to obtain SSL certificates from Lets Encrypt. Whilst this recipe is designed for Google Cloud Platform, it can easily be adapted for other cloud platforms.

We'll begin with a Kubernetes cluster, and we'll obtain authentication credentials.

gcloud container clusters get-credentials my-test-app
kubectl config current-context
kubectl get nodes
@athiwatp
athiwatp / send-sms.go
Created August 2, 2019 21:25 — forked from ivajloip/send-sms.go
Sending an SMS Text Message using AWS SNS service in GoLang
//assumes you have the following environment variables setup for AWS session creation
// AWS_SDK_LOAD_CONFIG=1
// AWS_ACCESS_KEY_ID=XXXXXXXXXX
// AWS_SECRET_ACCESS_KEY=XXXXXXXX
// AWS_DEFAULT_REGION=us-east-1
package main
import (
"fmt"
@athiwatp
athiwatp / gistlog.yml
Created July 28, 2019 11:25 — forked from askilondz/gistlog.yml
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets