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
kubectl logs <pod> <search_criteria> > some_file.txt
[Service] | |
Environment="KUBELET_KUBECONFIG_ARGS=--v=99 --enable-controller-attach-detach=true --cloud-provider=external --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" | |
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" | |
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" | |
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" | |
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" | |
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0" | |
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki" | |
ExecStart= | |
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS |
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
kubectl logs <pod> <search_criteria> > some_file.txt
input { | |
redis { | |
host => "127.0.0.1" | |
data_type => "list" | |
key => "logstash" | |
} | |
} | |
input { | |
udp { | |
type => "syslog" |
#!/bin/sh | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff state from all namespaces | |
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
#!/bin/bash | |
set -euo pipefail | |
CMD=$0 | |
function usage { | |
cat <<EOU | |
Usage: |
#!/bin/bash | |
JQPATH=$(which jq) | |
if [ "x$JQPATH" == "x" ]; then | |
echo "Couldn't find jq executable." 1>&2 | |
exit 2 | |
fi | |
set -eu | |
shopt -s nullglob |
import discord | |
import requests | |
import json | |
import urllib | |
from discord.ext import commands | |
class Bible: | |
def __init__(self, bot): |
#!/bin/bash | |
# Copyright 2015 The Kubernetes Authors All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |