Short excursion into git --track, --set-upstream and --set-upstream-to.
All examples use the aliases co for checkout and br for branch.
Setup:
$ git clone [email protected]:AKSW/OntoWiki.git
| kubectl get po --all-namespaces | grep Evicted | awk '{print $2, "--namespace", $1}' | xargs kubectl delete pod |
| initContainers: | |
| - name: volume-mount-hack | |
| image: busybox | |
| command: ["sh", "-c", "chown -R 200:200 /nexus"] | |
| volumeMounts: | |
| - name: <your nexus volume> | |
| mountPath: /nexus |
| schema: "1" # Schema must match for all | |
| id: auth | |
| metadata: | |
| name: Template to deploy auth api | |
| variables: | |
| - name: k8s-account | |
| description: kubernetes account to deploy | |
| type: string | |
| group: Deployment | |
| - name: namespace |
| # suspend active cronjobs | |
| kubectl.exe get cronjob | grep False | awk '{print $1}' | xargs kubectl patch cronjob -p '{"spec" : {"suspend" : true }}' | |
| # resume suspended cronjobs | |
| kubectl.exe get cronjob | grep True | awk '{print $1}' | xargs kubectl patch cronjob -p '{"spec" : {"suspend" : false }}' |
Short excursion into git --track, --set-upstream and --set-upstream-to.
All examples use the aliases co for checkout and br for branch.
Setup:
$ git clone [email protected]:AKSW/OntoWiki.git
| jq -cr '.[] | "\(.name) \(.)"' test.json | awk '{ file=$1".json"; print $2 > file; close(file); }' |
| kubectl get pods -n kube-system -l k8s-app=prometheus-to-sd -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}' | |
| https://kubernetes.io/docs/reference/kubectl/jsonpath/ |
| # get inactive rs | |
| kubectl get rs | awk '{if ($2=="0") print $0}' | |
| # delete inactive rs | |
| kubectl get rs | awk '{if ($2=="0") print $1}' | xargs kubectl delete rs | |
| # get error job | |
| kubectl get job | awk '{if ($2=="0/1") print $0}' | |
| # delete error job |