Skip to content

Instantly share code, notes, and snippets.

@elmiko
elmiko / kubectl-riffs.cheat
Last active April 28, 2020 19:21
kubernetes command line incantations
% kubectl
# get all pods in cluster and show what node they are deployed on
kubectl get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\n"}' --all-namespaces
# get all pods on a node and show what namespace they are in
kubectl get pods -o=jsonpath='{range .items[?(@.spec.nodeName=="<Node ID>")]}{.metadata.name}{"\t"}{.metadata.namespace}{"\n"}' --all-namespaces
# get all machines and show their associated node
kubectl get machines -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeRef.name}{"\n"}'
@dmesser
dmesser / standalone-kubelet-fc31.md
Last active March 5, 2023 13:10
Standalone Kubelet on Fedora 31

What is this about?

This gist describes how to set up standalone kubelet + CRI-O + CNI on Fedora Core 31. The goal is to place a Kubernetes Pod manifest on an single node and access the application from the network. This guide has been tested on x86-64 and armv7 deployments.

Prepare the system

Make sure the system is up to date:

dnf -y update

@gustavohenrique
gustavohenrique / soap-curl-shell
Created June 11, 2013 19:24
SOAP request using curl
# request.xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wst="http://sensedia.com/repository/wstoolkit">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>system</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">manager</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">DWk64SMfJ6RxHAKgPRGtPA==</wsse:Nonce>
<wsu:Created>2013-04-17T18:36:54.013Z</wsu:Created>
</wsse:UsernameToken>