systemctl enable
# tell systemd to start service at boot
systemctl edit kubelet.service
# or vi /etc/systemd/system/kubelet.service
systemctl daemon-reload
systemctl restart kubelet.service
# simple pv | |
kind: PersistentVolume | |
apiVersion: v1 | |
metadata: | |
name: task-pv-volume | |
labels: | |
type: local | |
spec: | |
storageClassName: manual |
kind: NetworkPolicy | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: access-nginx | |
namespace: secret | |
spec: | |
podSelector: | |
matchLabels: | |
run: nginx | |
ingress: |
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
# make secret with kubectl create secret generic my-secret --from-literal=key1=supersecret | |
# to use secret in a env var | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-secrets-to-env | |
namespace: default | |
spec: | |
containers: |
#oh the variables we we will use !! | |
days_in_a_year = 365.245 | |
minutes_in_a_year = 60 * 24 * days_in_a_year | |
#this time business was all new to me but i tried to set it for my birthday in NYC | |
my_age = Time.new(1980,9,7, 19, 44, 00, -0500) | |
now = Time.now | |
my_age_in_seconds = now - my_age | |
seconds_in_a_day = 60 * 60 * 24 |