- AWS Account
- Linux(like) System
- awscli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
alias dm='docker-machine' | |
alias dmx='docker-machine ssh' | |
alias dk='docker' | |
alias dki='docker images' | |
alias dks='docker service' | |
alias dkrm='docker rm' | |
alias dkl='docker logs' | |
alias dklf='docker logs -f' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
################################################################### | |
# Author Bikram Dhoju bikramdhoju.com.np | |
# Directions: | |
# Populate target_mac list with your list nodes | |
# change target_subnet to your subnet | |
# result is stored in output.json | |
#################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -x | |
AWS_DEFAULT_REGION=us-east-2 | |
NR_MASTER=1 | |
NR_NODES=2 | |
SERVER_TYPE=t2.small | |
K8S_VERSION=v1.8.15 | |
KOPS_VERSION=1.12.2 | |
key=devops23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pods=$(kubectl get po -nlinkerd -ojsonpath="{range .items[*]}{.metadata.name} {.metadata.namespace}{'\n'}{end}") | |
IFS=" " | |
while read name namespace; do | |
tcp=$(kubectl exec -n $namespace $name linkerd-proxy -- cat /proc/net/tcp) | |
close_wait=$(echo $tcp | awk 'BEGIN {cnt=0} $4==08 {cnt++} END {print cnt}') | |
fin_wait_2=$(echo $tcp | awk 'BEGIN {cnt=0} $4==05 {cnt++} END {print cnt}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SECRET_NAME="apm-creds" | |
NAMESPACE="rasa" | |
ARRAY=("apm_server_url:t1" | |
"apm_secret_token:t2") | |
for secret in "${ARRAY[@]}" ; do | |
KEY="$(echo $secret | cut -d':' -f1 )" | |
VALUE="$(echo $secret | cut -d':' -f2-)" | |
# echo $KEY $VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -o errexit | |
echo "INFO - Downloading Flux OpenAPI schemas" | |
mkdir -p /tmp/flux-crd-schemas/master-standalone-strict | |
curl -sL https://github.com/fluxcd/flux2/releases/latest/download/crd-schemas.tar.gz | tar zxf - -C /tmp/flux-crd-schemas/master-standalone-strict | |
# mirror kustomize-controller build options | |
kustomize_flags="--load-restrictor=LoadRestrictionsNone" | |
kustomize_config="kustomization.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
appsv1 "k8s.io/api/apps/v1" | |
corev1 "k8s.io/api/core/v1" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PodSpec is a description of a pod. | |
type PodSpec struct { | |
Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` | |
InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` | |
Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` | |
EphemeralContainers []EphemeralContainer `json:"ephemeralContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,34,rep,name=ephemeralContainers"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: admissionregistration.k8s.io/v1 | |
kind: MutatingWebhookConfiguration | |
metadata: | |
name: "kubernetes-webhook.acme.com" | |
webhooks: | |
- name: "kubernetes-webhook.acme.com" | |
objectSelector: | |
matchLabels: | |
mutation-check: enabled | |
rules: |
OlderNewer