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
"proxyConfiguration": { | |
"type": "APPMESH", | |
"containerName": "envoy", | |
"properties": [ | |
[...] | |
{ | |
"name": "AppPorts", | |
"value": "80" | |
}, | |
{ |
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
initContainers: | |
- name: proxyinit | |
image: 111345817488.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-proxy-route-manager:latest | |
securityContext: | |
capabilities: | |
add: | |
- NET_ADMIN | |
env: | |
- name: "APPMESH_START_ENABLED" | |
value: "1" |
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
import signal | |
import sys | |
def exit_gracefully(signumber, frame): | |
print("Received signal", signumber, "cleaning up...") | |
sys.exit(0) | |
signal.signal(signal.SIGTERM, exit_gracefully) | |
## Do stuff here |
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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-not-ready | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx-not-ready | |
template: |
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: v1 | |
kind: Pod | |
metadata: | |
name: nginx-requests-limits | |
spec: | |
containers: | |
- name: nginx-requests-limits | |
image: nginx | |
resources: | |
requests: |
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 | |
CLUSTER="cluster name" | |
/etc/eks/bootstrap.sh $CLUSTER --kubelet-extra-args \ | |
'--kube-reserved=cpu=200m,memory=256Mi,ephemeral-storage=1Gi \ | |
--system-reserved=cpu=200m,memory=256Mi,ephemeral-storage=1Gi' |
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: v1 | |
kind: Service | |
metadata: | |
name: hostname-app | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 9376 | |
selector: | |
app: hostname |
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
Content-Type: multipart/mixed; boundary="==BOUNDARY==" | |
MIME-Version: 1.0 | |
--==BOUNDARY== | |
Content-Type: text/cloud-boothook; charset="us-ascii" | |
# Set the proxy hostname and port | |
PROXY="proxy.local:3128" | |
# Set the proxy for future processes, and use as an include file | |
cat << EOF >> /etc/proxy.conf |
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
http_code: %{http_code}\n | |
http_connect: %{http_connect}\n | |
time_total: %{time_total}\n | |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
size_download: %{size_download}\n |
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
SERVICE=nginx | |
NAMESPACE=default | |
for ingresspod in $(kubectl -n ingress-nginx get pods -l app=ingress-nginx --template '{{range.items}}{{.metadata.name}}{{"\n"}}{{end}}') | |
do | |
echo $ingresspod | |
for svcep in $(kubectl -n $NAMESPACE get ep $SERVICE -o json | jq -r .subsets[].addresses[].ip) | |
do | |
echo "=> ${svcep}" | |
kubectl -n ingress-nginx exec $ingresspod -- curl -o /dev/null -s -w 'Connect: %{time_connect}\nStart Transfer: %{time_starttransfer}\nTotal: %{time_total}\nResponse code: %{http_code}\n' -k http://${svcep} |
OlderNewer