Just for exclude mistake like kubeconfig delete ns --all.
kubectl apply -f operator.yamlbash -xe kubeconfig.shkubectl --kubeconfig operator-kubeconfig.yaml get ns,sa,po,hpa,rs,deploy,sts,pv,pvc,svc,ingress,secrets,ep,nodes > /dev/null
| package main | |
| import ( | |
| "encoding/json" | |
| "strings" | |
| "bufio" | |
| "fmt" | |
| "os" | |
| ) |
| version: '2.2' | |
| services: | |
| kibana: | |
| image: docker.elastic.co/kibana/kibana:7.6.0 | |
| environment: | |
| SERVER_NAME: 127.0.0.1 | |
| ELASTICSEARCH_URL: http://elasticsearch:9200/ | |
| ports: | |
| - 5601:5601 | |
| logging: |
| kind delete cluster --name kind | |
| cat <<EOF | kind create cluster --config=- | |
| kind: Cluster | |
| apiVersion: kind.x-k8s.io/v1alpha4 | |
| networking: | |
| apiServerAddress: "0.0.0.0" | |
| apiServerPort: 6443 |
| #!/bin/sh -xe | |
| # backup | |
| cp /usr/share/initramfs-tools/scripts/local{,.orig} | |
| cp /etc/fstab{,.orig} | |
| # prepare | |
| echo 'none / tmpfs defaults 0 0' > /etc/fstab | |
| # echo 'none / tmpfs defaults,noatime,nodiratime,discard 0 0' > /etc/fstab | |
| curl -s https://gist.githubusercontent.com/egeneralov/89f6294f5cdfabffc9c15d9fa9bf14ba/raw/f4cf9c786ef818c333a2e5d0c10401b1706ab933/local.patch | patch -p0 /usr/share/initramfs-tools/scripts/local |
| --- | |
| - hosts: all | |
| gather_facts: no | |
| vars: | |
| sysctl: | |
| vm.swappiness: 0 | |
| net.ipv4.tcp_wmem: 4096 65536 33554432 | |
| net.core.netdev_max_backlog: 262144 | |
| net.ipv4.tcp_no_metrics_save: 1 |
| # ================================================================================================================================================================= | |
| # all | |
| echo "1" > /proc/sys/net/ipv4/ip_forward | |
| apt-get update -q | |
| apt-get install -yq strongswan lxc | |
| # ================================================================================================================================================================= | |
| # node1 |
| #!/bin/bash -xe | |
| kubectl delete -n gitlab-managed-apps \ | |
| configmap/prometheus.v1 \ | |
| configmap/prometheus-prometheus-server \ | |
| pvc/prometheus-prometheus-server \ | |
| sa/prometheus-prometheus-server \ | |
| sa/prometheus-node-exporter \ | |
| sa/prometheus-alertmanager \ | |
| sa/prometheus-kube-state-metrics \ |
| /tool netwatch add interval="00:01:00" down-script="/system routerboard usb power-reset duration=1" host=10.0.0.1 timeout=2s comment="monkeypath for fucking yota" |
| #!/usr/bin/env python | |
| import re | |
| import subprocess | |
| result = subprocess.check_output("/usr/bin/dpkg --status gitlab-ce".split()) | |
| current_version = re.findall(r"Version: (.*)", result)[0].split('-')[0] | |
| print("# Current version: {}".format(current_version)) |