Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
@richardsonlima
richardsonlima / choose_k8s_cluster.go
Created April 19, 2021 21:29 — forked from ks888/choose_k8s_cluster.go
Client-go usage examples
package main
import (
"fmt"
"log"
"os"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
@richardsonlima
richardsonlima / frontend-autoscale-chaos.yaml
Created March 29, 2021 00:15
frontend-autoscale-chaos.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: frontend-autoscale-chaos
namespace: richardsonlima-chaos-demo
spec:
# It can be true/false
annotationCheck: 'false'
# It can be active/stop
engineState: 'active'
@richardsonlima
richardsonlima / chaos-pod_delete.yaml
Last active March 29, 2021 00:18
chaos-pod_delete.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: frontend-chaos
namespace: richardsonlima-chaos-demo
spec:
appinfo:
appns: 'demo'
applabel: 'app=frontend'
appkind: 'deployment'
@richardsonlima
richardsonlima / stack-demo-for-chaos.yaml
Created March 29, 2021 00:11
stack-demo-for-chaos.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo
namespace: richardsonlima-chaos-demo
labels:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
spec:
selector:
@richardsonlima
richardsonlima / cluster-prep-for-chaos.yaml
Created March 29, 2021 00:10
cluster-prep-for-chaos.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: richardsonlima-chaos-demo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-sa
@richardsonlima
richardsonlima / go-cobra-issue-trick.sh
Created March 17, 2021 00:18
Go Cobra - cannot find package hcl/hcl/printer
go get -u github.com/spf13/cobra/cobra (current-context is not set)
cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
/usr/local/opt/go/libexec/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
/Users/richardsonlima/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)
To solve (trick):
export GO111MODULE=on (current-context is not set)
go get -u github.com/spf13/cobra/cobra
AWS_ROOT_CA_FILE=$HOME/aws.root.ca.bundle.pem
cp /dev/null $AWS_ROOT_CA_FILE
for ca in \
https://www.amazontrust.com/repository/AmazonRootCA1.pem \
https://www.amazontrust.com/repository/AmazonRootCA2.pem \
https://www.amazontrust.com/repository/AmazonRootCA3.pem \
https://www.amazontrust.com/repository/AmazonRootCA4.pem \
https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem; do
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic — @amix3k
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
"
" https://github.com/amix/vimrc

Kind - a tool for running local Kubernetes clusters using Docker container “nodes”.

Installation:

NOTE: You need to have GO (1.11+) and docker

On Mac & Linux:

curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.10.0/kind-$(uname)-amd64"
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
@richardsonlima
richardsonlima / zshrc.zsh
Last active March 4, 2021 20:55
my zsh ==> Save it into ~/.zshrc
export PATH=$HOME/bin:/usr/bin:/usr/local/bin:$PATH
export PATH="/usr/local/sbin:$PATH"
export ZSH="$HOME/.oh-my-zsh"
plugins=(zsh-autosuggestions git git-flow brew history node npm kubectl docker docker-compose zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
#### Terminal Theme ####
ZSH_THEME="agnoster"
#source ~/powerlevel10k/powerlevel10k.zsh-theme