Skip to content

Instantly share code, notes, and snippets.

View M00nF1sh's full-sized avatar
🙃
🙃

M00nF1sh M00nF1sh

🙃
🙃
View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: eks-oncall-troubleshot-hn
spec:
hostNetwork: true
nodeName: ip-10-89-4-42.us-west-2.compute.internal
containers:
- name: netshoot
image: nicolaka/netshoot
@M00nF1sh
M00nF1sh / gist:84d380b4e08017a5bc958658f7010914
Created March 26, 2021 18:50
KubeProxy patch - Hostname mismatch
spec:
template:
spec:
containers:
- name: kube-proxy
command:
- kube-proxy
- --hostname-override=$(NODE_NAME)
- --v=2
- --config=/var/lib/kube-proxy-config/config
---
apiVersion: v1
kind: Namespace
metadata:
name: demo-4cabd2e
---
apiVersion: appmesh.k8s.aws/v1beta2
kind: Mesh
metadata:
name: mesh-demo-4cabd2e
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: gatewayroutes.appmesh.k8s.aws
spec:
group: appmesh.k8s.aws
names:
AppMesh-K8s integration API issues
Clarify concepts:
Below are my understanding of AppMesh’s object’s corresponding Kubernetes constructs.(correct my if i’m wrong)
1. *AppMesh VirtualService* is like a *union* of K8s Service and K8s Ingress.
1. when a VirtualService is using a VirtualNode as backend, it’s similar to a K8s Service.
2. when a VirtualService is using a VirtualRouter as backend, it’s similar to a K8s Ingress.
2. *AppMesh VirtualNode* is like a K8s Deployment or ReplicaSet, which groups a set of K8s Pods.
This file has been truncated, but you can view the full file.
@M00nF1sh
M00nF1sh / ingress-echo.yaml
Last active April 11, 2019 22:57
ingress-echo demo
apiVersion: v1
kind: Namespace
metadata:
name: "demo-echo"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: demo-echo
name: deployment-echo
@M00nF1sh
M00nF1sh / ingress-2048.yaml
Last active April 11, 2019 22:56
Ingress-2048-sample
apiVersion: v1
kind: Namespace
metadata:
name: "demo-2048"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: "demo-2048"
name: "deployment-2048"
@M00nF1sh
M00nF1sh / gen_certificate_chain.sh
Created January 30, 2019 01:19
generate certificate chain
mkdir newcerts certs crl private requests
touch index.txt
touch index.txt.attr
echo '1000' > serial
mkdir intermediate/newcerts intermediate/certs intermediate/crl intermediate/csr intermediate/private
touch intermediate/index.txt
touch intermediate/index.txt.attr
echo '1234' > intermediate/serial
echo 1000 > intermediate/crlnumber
@M00nF1sh
M00nF1sh / aws_console.py
Created January 29, 2019 04:13
aws_console from access_key & access_secret
import urllib, json
import requests
from boto.sts import STSConnection
sts_connection = STSConnection()
federation_token = sts_connection.get_federation_token(name="M00nF1sh")
session_token = {
"sessionId": federation_token.credentials.access_key,
"sessionKey": federation_token.credentials.secret_key,
"sessionToken": federation_token.credentials.session_token