- Updated on May 29 to accommodate etcd container not having
/bin/shavailable anymore.
curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
| # base on this args processing model | |
| for a in "$@"; do | |
| case $a in | |
| --path | -P) | |
| shift 1 | |
| EMACS="$1" | |
| shift 1 | |
| ;; | |
| --toolbars | -B) |
| # find the kube node of the running pod, appear next to hostIP, and note containerID hash | |
| kubectl get pod mypod -o json | |
| # -> save hostIP | |
| # -> save containerID | |
| # connect to the node and find the pods unique network interface index inside it's container | |
| docker exec containerID /bin/bash -c 'cat /sys/class/net/eth0/iflink' | |
| # -> returns index | |
| # locate the interface of the node |
Run on controlplane node, uses any found hyperkube image
docker run --rm --net=host -v $(docker inspect kubelet --format '{{ range .Mounts }}{{ if eq .Destination "/etc/kubernetes" }}{{ .Source }}{{ end }}{{ end }}')/ssl:/etc/kubernetes/ssl:ro --entrypoint bash $(docker inspect $(docker images -q --filter=label=org.opencontainers.image.source=https://github.com/rancher/hyperkube.git) --format='{{index .RepoTags 0}}' | tail -1) -c 'kubectl --kubeconfig /etc/kubernetes/ssl/kubecfg-kube-node.yaml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .' > cluster.rkestate
| export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`); | |
| export const wsObserver = ws | |
| .pipe( | |
| retryWhen(errors => | |
| errors.pipe( | |
| delay(1000) | |
| ) | |
| ) | |
| ); |
Steps to change the URL of Rancher installation and switch from a self-signed certificate to a certificate signed by recognized CA.
server-url setting to the new URL:
https://<old_rancher_hostname>/g/settings/advancedserver-url to https://<new_rancher_hostname>https://<old_rancher_hostname>/g/settings/advancedcacerts click context menu -> View in APIvalue field| #!/bin/sh | |
| IMAGES=`cat rancher-images.txt` | |
| for IMAGE in $IMAGES; do | |
| until docker inspect $IMAGE > /dev/null 2>&1; do | |
| docker pull $IMAGE | |
| done | |
| docker tag $IMAGE jgreat-test-airgap-registry.rancher.space/$IMAGE | |
| docker push jgreat-test-airgap-registry.rancher.space/$IMAGE | |
| done |
| Summary | How to control (or Understand) your GIST page's files list order. |
| Notice | not official documentation. |
| # openssl version | |
| openssl version | |
| # openssl commands | |
| openssl list-standard-commands | |
| # ca - create certificate authorities | |
| # dgst - compute hash functions | |
| # enc - encrypt/decrypt using secret key algorithms (it is possible to generate using a password or directly a secret key stored in a file) | |
| # genrsa - generate a pair of public/private key for the RSA algorithm | |
| # password - generation of “hashed passwords” |
| error_page 400 404 405 =200 @40*_json; | |
| location @40*_json { | |
| default_type application/json; | |
| return 200 '{"code":"1", "message": "Not Found"}'; | |
| } | |
| error_page 500 502 503 504 =200 @50*_json; | |
| location @50*_json { |