Skip to content

Instantly share code, notes, and snippets.

##
# kubectl apply -f all-in-one.yaml
# # might need to be apply twice
# kubectl apply -f all-in-one.yaml
###
# # you can check with the following commandes
###
# kubectl --as=system:serviceaccount:shyrka-erebus-operators:shyrka-erebus get ns
# kubectl --as=system:serviceaccount:shyrka-erebus-operators:shyrka-erebus get hypnos
###--
@kanedafromparis
kanedafromparis / ReadMe.md
Created October 14, 2020 17:04
Etcd backup to s3 light

oc create ns sample-etcd-backup oc project sample-etcd-backup oc create sa bck -n sample-etcd-backup #oc adm policy add-scc-to-user anyuid system:serviceaccount:sample-etcd-backup:bck #oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:sample-etcd-backup:bck oc adm policy add-scc-to-user privileged system:serviceaccount:sample-etcd-backup:bck

$ helm repo add minio https://helm.min.io/ "minio" has been added to your repositories

@kanedafromparis
kanedafromparis / MavenWrapperDownloader.java
Last active August 18, 2020 06:53
some cli erebus-operator
/*
* Copyright 2007-present the original author or authors.
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
@kanedafromparis
kanedafromparis / KubeletDebugging.md
Created August 14, 2020 11:32 — forked from PatrickLang/README.md
Kubelet debugging snippets

Reaching kubelet API endpoints

If you have a valid kubeconfig, then you can proxy through the apiserver to reach the kubelet's API on each node

kubectl proxy
kubectl top pod
kubectl top nodes
kubectl get po -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeName,RSRC0:.spec.containers[0].resources.requests.cpu,RSRM0:.spec.containers[0].resources.requests.memory,RSRL0:.spec.containers[0].resources.limits.cpu,RSLM0:.spec.containers[0].resources.limits.memory
kubectl get po -A --field-selector spec.nodeName=worker512
kubectl get po -A --field-selector spec.nodeName=worker512 custom-columns=NS:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeName,RSRC0:.spec.containers[0].resources.requests.cpu,RSRM0:.spec.containers[0].resources.requests.memory,RSRL0:.spec.containers[0].resources.limits.cpu,RSLM0:.spec.containers[0].resources.limits.memory --no-headers | while read ns po nd RSRC0 RSRM0 RSLC0 RSLM0 ; do kubectl label -n $ns po $po peek-top=20191222; done
kubectl top pod -A -l peek-top=20191222
@kanedafromparis
kanedafromparis / gist:ff3b86442a9ba37789e0ec0a069ef231
Created January 14, 2020 10:28
set local git username/email
# don't use --global
#
# vim .git/config
# [core]
# ...
#
#[remote "origin"]
# ...
#[branch "master"]
# ...
@kanedafromparis
kanedafromparis / oc get all
Last active February 21, 2020 09:45 — forked from fjcloud/oc get all
oc get --ignore-not-found $( oc api-resources --verbs=list --namespaced -o name | xargs | sed 's/\ /,/g')
k get --ignore-not-found $( k api-resources --verbs=list --namespaced -o name | xargs | sed 's/\ /,/g')
oc get --ignore-not-found $( oc api-resources --verbs=list --namespaced -o name | xargs | sed 's/\ /,/g')
oc get --ignore-not-found $( oc api-resources --verbs=list --namespaced -o name | xargs | sed 's/\ /,/g')