This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: {{ include "k8s-etcd-backup.fullname" . }} | |
labels: | |
{{- include "k8s-etcd-backup.labels" . | nindent 4 }} | |
spec: | |
concurrencyPolicy: Allow | |
failedJobsHistoryLimit: 1 | |
jobTemplate: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using velero | |
# backup k8s resources per namespace without pv snapshot | |
# required: velero server & client are installed | |
NAMESPACES=`kubectl get ns | grep -v NAME | awk '{ print $1 }'` | |
EXCEPT_NAMESPACES=(velero) | |
BUCKET_LOCATION=default | |
for NAMESPACE in $NAMESPACES; do | |
skip_flag=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prometheus: | |
extraScrapeConfigs: | | |
- job_name: gpu-metrics | |
kubernetes_sd_configs: | |
- role: endpoints | |
relabel_configs: | |
- action: keep | |
regex: dcgm-exporter;monitoring | |
source_labels: | |
- __meta_kubernetes_pod_label_app_kubernetes_io_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n "Really want to reset this node? (y/N): " | |
read -r check | |
if [[ "$check" = "y" ]]; then | |
echo "[INFO] Reset kubeadm" | |
kubeadm reset -f | |
echo "[INFO] Stop kubelet & docker service" | |
systemctl stop kubelet docker docker.socket | |
echo "[INFO] Remove K8S files" | |
rm -rvf /etc/kubernetes/* |