Official blog of KEINOS but mostly for my own reference. A Japanese made in Mexico with Mexican quality. Who monkey around the jungle of codes. ;-)
sudo passwd rancher
/var/lib/rancher/k3os/config.yaml
ssh_authorized_keys:
- "ssh-rsa AAAA..."
- "github:KEINOS"
ssh -i ~/.ssh/id_rsa [email protected]
~/.ssh/id_rsa
config.yaml
.rancher
192.168.10.123
Permission denied (publickey,keyboard-interactive).
appears during login then the publickey of GitHub account is not added to the below path:
/var/lib/rancher/etc/config.yaml
# K3OS is based on Alpine linux so it does not have a shutdown command.
sudo poweroff
kubectl get
- リソースの一覧を表示kubectl describe
- 単一リソースに関する詳細情報を表示kubectl logs
- 単一Pod上の単一コンテナ内のログを表示kubectl exec
- 単一Pod上の単一コンテナ内でコマンドを実行kubectl get nodes
To print existing Pods.
kubectl get pods
To view what containers are inside that Pod and what images are used to build those containers.
kubectl describe pods
kubectl get pods -o go-template --template '\n'
$ export POD_NAME=$(kubectl get pods -o go-template --template '\n')
$ echo Name of the Pod: $POD_NAME
...
$ kubectl logs $POD_NAME
...
kubectl exec -it $POD_NAME -- /bin/bash
The token of the server node, used as the value of “K3S_TOKEN” when configuring the worker node. You need to have root
privileges to read this file.
/var/lib/rancher/k3s/server/node-token
Install k3s
with worker node configuration
sudo su -
curl -sfL https://get.k3s.io | K3S_URL=https://<myserver>:6443 K3S_TOKEN=<myservernodetoken> INSTALL_K3S_VERSION=v<X.Y.Z> K3S_NODE_NAME=<this_node_name> sh -
sudo su -
mkdir -p /etc/rancher/rke2
vi /etc/rancher/rke2/config.yaml
token: <mysecretkey>
tls-san:
- <ip_address_of_the_server>
curl -sfL https://get.rancher.io | sh -
rancherd --help
systemctl enable rancherd-server.service
systemctl start rancherd-server.service
```bash journalctl -eu rancherd-server -f
/boot/cmdline.txt
file:
cgroup_memory=1 cgroup_enable=memory
/boot/config.txt
file:
arm_64bit=1
gpu_mem=16