My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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
docker exec -it container-name redis-cli FLUSHALL |
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
DEBUG | |
kubectl get pods -n “namespace” | |
kubectl get services | |
kubectl get pods -n “namespace ”-o wide | |
kubectl logs {pod-name} | |
kubectl exec -it {pod-name} -- bin/bash | |
get all pods from all namespaces | |
kubectl get all -n namespace | |
kubectl describe endpoins |
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
#It's a list of objects, so let's display the pod names | |
kubectl get pods -l app=hello-world -o jsonpath='{ .items[*].metadata.name }' | |
#Display all pods names, this will put the new line at the end of the set rather then on each object output to screen. | |
#Additional tips on formatting code in the examples below including adding a new line after each object | |
kubectl get pods -l app=hello-world -o jsonpath='{ .items[*].metadata.name }{"\n"}' | |
#It's a list of objects, so let's display the first (zero'th) pod from the output |