-
Check TimescaleDB/Postgres Config in Kubernetes
kubectl exec -it <pod-name> -- psql -U <username> -d <database>
-
Run this
SHOW statement_timeout;
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 | |
echo "NAMESPACE PVC PV ZONE"; kubectl get pvc -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.spec.volumeName}{"\n"}{end}' | while read ns pvc pv; do echo -n "$ns $pvc $pv "; kubectl get pv "$pv" -o jsonpath='{.spec.nodeAffinity.required.nodeSelectorTerms[*].matchExpressions[?(@.key=="topology.kubernetes.io/zone")].values[*]}' 2>/dev/null; echo; done | column -t |
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: docker-dind | |
namespace: docker | |
labels: | |
app: docker-dind | |
spec: | |
replicas: 1 | |
selector: |
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
kubectl get pods --all-namespaces -o jsonpath="{..image}" | tr -s '[[:space:]]' '\n' | sort -u | grep -i bitnami |
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
Good reading: https://medium.com/code-and-coffee |
jps -lvm
jhsdb jmap --heap --pid 8
Reference: https://stackoverflow.com/a/74901369
Context: rancher-sandbox/rancher-desktop#797
$ mv ~/Library/Application\ Support/rancher-desktop/lima ~/.rdlima
$ ln -s ~/.rdlima ~/Library/Application\ Support/rancher-desktop/lima
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 | |
kubectl debug -it thanos-storegateway-0 -n thanos --image=ubuntu:latest --share-processes --copy-to=thanos-debug --same-node |
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
## TCP Connection | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-service | |
namespace: monitoring | |
spec: | |
type: ClusterIP | |
selector: | |
app: nginx |
NewerOlder