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
## Use comands from hcom-spam | |
## Create | |
imtc inc create | p1 | Incident: Prod-decaf us-west-2 cluster severely degraded | Description: APIServers were knocked offline so cluster & dependent services have been in a degraded state. | --env=5 [email protected] | |
## Update | |
imtc inc update | INC4025633 | Bringing forward roll of the cluster to flush out authentication issues. Trying to locate start of the disruption and identify root cause. | |
## Resolve | |
imtc inc resolve | INC4664828 | Control plane restored and ephemeral storage enlarged cleanly | --enddate=2020-01-17-15:58 |
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
# SSH onto node hosting last-created pod | |
kubectl get pods -n mantle -l=app=mantle-node-problem-detector -o jsonpath='{.items[0].status.hostIP}' --sort-by="metadata.creationTimestamp" | tail -n1 | xargs -0 bash -ic 'csshx -y 2 -x 2 -l core $@' -- | |
# SSH onto master | |
kubectl get nodes -l=kubernetes.io/role=master -o jsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}' | xargs -0 bash -ic 'csshx -y 2 -x 2 -l core $@' -- | |
# SSH onto every node | |
kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}' | xargs -0 bash -ic 'csshx -y 2 -x 2 -l core $@' -- | |
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 pods -n perf -l k8s-app=sli-recorder-wl -o=jsonpath='{.items[*].spec.nodeName}'); do echo "****** $i ******"; kubectl get node $i -o=jsonpath="{.metadata.labels.failure-domain\.beta\.kubernetes\.io\/zone}" | xargs echo "$i is in AZ = "; 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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_PROMETHEUS", | |
"label": "prometheus", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} |
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
$ glide -version | |
glide version v0.12.3 | |
$ glide cc && glide get github.com/Masterminds/sprig | |
[INFO] Glide cache has been cleared. | |
[INFO] Preparing to install 1 package. | |
[INFO] Attempting to get package github.com/Masterminds/sprig | |
[INFO] --> Gathering release information for github.com/Masterminds/sprig | |
[INFO] The package github.com/Masterminds/sprig appears to have Semantic Version releases (http://semver.org). | |
[INFO] The latest release is 2.10.0. You are currently not using a release. Would you like |
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 | |
# Source: https://carlosbecker.com/posts/k8s-sandbox-costs/ | |
set -eo pipefail | |
ingress="$(kubectl get pods --output=jsonpath='{.items[*].metadata.name}' | | |
xargs -n1 | grep "ingress-nginx" | head -n1)" | |
# cache all hosts that pass through the ingress | |
hosts="$(kubectl get ingress nginx-ingress --output=jsonpath='{.spec.rules[*].host}' | xargs -n1)" |
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
diff --git a/glide.lock b/glide.lock | |
index b55b95f..48bd4d5 100644 | |
--- a/glide.lock | |
+++ b/glide.lock | |
@@ -1,8 +1,10 @@ | |
-hash: c867da102c81c3ad5b5b7e9016f1b020fe22311da8f3532b65a0a2832f0b0b3c | |
-updated: 2017-03-12T18:50:39.127225917+01:00 | |
+hash: 61650b1ec198a8e63d341908512a136ee16a45bd82e46f71945f807ccbee2715 | |
+updated: 2017-04-21T13:30:43.843733482+01:00 | |
imports: |
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
git config --global branch.autosetuprebase=always |
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
ssh <host1> | |
CONTAINER=$(docker run -p 9999:9999 -d ubuntu:14.04 nc -l 9999) | |
IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $CONTAINER) | |
docker logs -f $CONTAINER | |
<ssh host2> | |
docker run --entrypoint /bin/bash -ti ubuntu:14.04 -i | |
echo "Hello ioan!" | nc $IP 9999 |
NewerOlder