Skip to content

Instantly share code, notes, and snippets.

View nic-hima's full-sized avatar

Nicolas Hima nic-hima

  • San Antonio, TX
View GitHub Profile
@DStorck
DStorck / kubectl-commands.md
Last active February 9, 2024 19:34
kubectl commands

filter kubernetes response with kubectl

make file with all results , then filter into new file

kubectl get nodes > all_nodes.txt

cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt

filter results by search criteria

kubectl logs <pod> <search_criteria> > some_file.txt

@nickfloyd
nickfloyd / recipe: cherry-pick tags
Created December 13, 2010 17:40
To cherry pick from head and commit back into a tag
-from master in working branch
>> git branch [new branch] [tag]
>> git checkout [branch]
-pull commit out and add it to the commit at the top of the tag
>> git cherry-pick [commit] or git cherry-pick [firstcommit]^..[lastcommit] if you have a range
-resolve conflicts
-delete the local tag
>> git git tag -d [tag]
-add a new tag at the head of the old one
>> git tag [tag]