This file contains hidden or 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
for i in `kubectl get crd --no-headers | awk '{print $1}'` | |
do | |
echo $i | |
kubectl get crd $i -o yaml | grep "finalizers" | |
done |
This file contains hidden or 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
LEVEL=info # change to debug, etc. | |
for rancherpod in `kubectl get pods -n cattle-system -l app=rancher --template '{{range.items}}{{.metadata.name}}{{"\n"}}{{end}}'` | |
do | |
echo $rancherpod | |
kubectl exec -n cattle-system $rancherpod -- loglevel --set $LEVEL | |
done |
This file contains hidden or 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
for ingresspod in $(kubectl -n ingress-nginx get pods -l app=ingress-nginx --template '{{range.items}}{{.metadata.name}}{{"\n"}}{{end}}') | |
do | |
echo $ingresspod | |
for rancherep in $(kubectl -n cattle-system get ep rancher -o json | jq -r .subsets[].addresses[].ip) | |
do | |
echo "=> ${rancherep}" | |
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 https://${rancherep} | |
echo | |
done | |
done |
This file contains hidden or 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} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: |