https://medium.com/@jeesmon/nerdctl-as-a-replacement-for-docker-desktop-on-mac-23de1c9c00e3
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 secret <name> -n <namespace> -o json \ | |
| jq '.metadata.name="<new_name>"|.metadata.namespace="<new_namespace>"' \ | |
| kubectl apply -f - |
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
oc get po -A -o wide | grep {filter} | while read a b c; | |
do | |
r=$(echo -n $a $b; oc get po -n $a $b -o jsonpath='{range .metadata.ownerReferences[*]} {.kind} {.name}{"\n"}{end}'); | |
echo $r; | |
if [[ $r == *"ReplicaSet"* ]]; | |
then echo $r | while read a b c d; | |
do | |
oc get rs -n $a $d -o jsonpath='{range .metadata.ownerReferences[*]} {.kind} {.name}{"\n"}{end}'; | |
done; | |
fi; |
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
curl -k \ | |
--http1.1 \ | |
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
-H "Sec-WebSocket-Version: 13" \ | |
-i \ | |
-N \ | |
-H "Connection: Upgrade" \ | |
-H "Upgrade: websocket" \ | |
-H 'Authorization: Bearer <TOKEN>' \ | |
"<API_SERVER>/api/v1/namespaces/<namespace>/pods/<pod_name>/exec?command=ls&command=-l&stdin=true&stdout=true&stderr=true" |
NewerOlder