curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
This file contains hidden or 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
| kubectl run postgresql-client --image=jbergknoff/postgresql-client --command -- sleep infinity |
This file contains hidden or 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
| #!/bin/bash | |
| curl -L https://github.com/derailed/k9s/releases/download/v0.21.4/k9s_Linux_x86_64.tar.gz -o k9s | |
| tar -xf k9s | |
| chmod +x k9s | |
| mv ./k9s /usr/local/bin/k9s | |
| k9s |
This file contains hidden or 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
| const dns = require('dns') | |
| client_id=parseInt(process.argv[2] || 'xxxxxx') | |
| function callMe() { | |
| const strToExec = 'emailing.' + client_id + '.connectionstring.v2.production.cache.sib.'; | |
| dns.resolveTxt(strToExec, (error, stdout) => { | |
| stdout = stdout && stdout[0] && stdout[0][0] | |
| if (error || !stdout) { |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| NS=$1 | |
| QUERIES=$2 | |
| CMD=$3 | |
| command -v bc > /dev/null || { echo "error: bc was not found. Please install bc."; exit 1; } | |
| { command -v drill > /dev/null && dig=drill; } || { command -v dig > /dev/null && dig=dig; } || { echo "error: dig was not found. Please install dnsutils."; exit 1; } | |
This file contains hidden or 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
| #!/bin/bash | |
| set -x | |
| kubeserver=$1 | |
| KUBECONFIG=$2 | |
| SA_TOKEN=$3 | |
| client_domain=$4 | |
| if (test -f $KUBECONFIG && ! test -f $SA_TOKEN); then |
This file contains hidden or 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
| #!/bin/bash | |
| set -x | |
| kubeserver=$1 | |
| KUBECONFIG=$2 | |
| manifest_url=$3 | |
| if test -f $KUBECONFIG; then | |
| if curl -s --insecure --connect-timeout 10 $kubeserver > /dev/null; then | |
| echo "$KUBESERVER is able to connect"; |
This file contains hidden or 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
| #!/bin/bash | |
| set -x | |
| if [ -x "$(command -v kubectl)" ]; then | |
| echo 'kubectl is already installed.'; | |
| else | |
| curl -s -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; | |
| curl -s -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"; | |
| if [ -x "$(command -v sha256sum)"]; then |
This file contains hidden or 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
| #!/bin/bash | |
| ### Get ArgoCD token | |
| curl -s --location -H "CF-Access-Client-Id: <xxxxxxxx>" -H "CF-Access-Client-Secret: <xxxxxxx>" -d $'{"username":"<xxxxx>","password":"<xxxxx>"}' https://argocd.example.com/api/v1/session | |
| ### Restart k8s resource | |
| curl --location --request POST 'https://argocd.example.com/api/v1/applications/<application-name>/resource/actions?namespace=<app namespace>&resourceName=<resourse to restart>&version=v1&kind=<kind of the resource>&group=apps' \ | |
| --header 'Authorization: Bearer <token>' \ | |
| --header 'Content-Type: application/x-www-form-urlencoded' \ |
NewerOlder