Update the docs
This commit is contained in:
@@ -1,30 +1,28 @@
|
||||
## For development workflow
|
||||
|
||||
For running `controll-gen`
|
||||
Installing `controller-gen`
|
||||
```
|
||||
export PATH="$(go env GOPATH)/bin:$PATH"
|
||||
go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
|
||||
```
|
||||
|
||||
Run this on device
|
||||
## For development workflow
|
||||
|
||||
Run this on the gateway device
|
||||
```bash
|
||||
while true; do nc -l -p 1234 -e sh; done
|
||||
```
|
||||
|
||||
Run this script on the dev machine
|
||||
Run this script on your dev machine
|
||||
```bash
|
||||
#!/bin/bash
|
||||
make build
|
||||
|
||||
SIZE=$(wc -c < ./bin/ctl-linux-aarch64-dev)
|
||||
|
||||
(
|
||||
echo 'base64 -d > /var/ctl <<'"'"'EOF'"'"''
|
||||
pv -s "$SIZE" < ./bin/ctl-linux-aarch64-dev | base64
|
||||
echo 'EOF'
|
||||
echo "export DEBUG=1"
|
||||
echo 'chmod +x /var/ctl'
|
||||
echo '/var/ctl create config > /var/abc.yaml'
|
||||
echo "/var/ctl internal run-step $1 -c /var/abc.yaml 2>&1"
|
||||
echo "echo Running /var/ctl $@"
|
||||
echo "/var/ctl $@ 2>&1"
|
||||
) | nc 10.0.0.10 1234
|
||||
```
|
||||
|
||||
@@ -33,21 +31,14 @@ And use it like this
|
||||
./send.sh start_crio
|
||||
```
|
||||
|
||||
### Join token
|
||||
|
||||
Create join token from control plane
|
||||
```
|
||||
kubeadm token create --print-join-command
|
||||
```
|
||||
|
||||
Export the token inside the device
|
||||
```
|
||||
export DEBUG=1
|
||||
export HOSTNAME=monok8s-master-1
|
||||
export BOOTSTRAP_TOKEN=
|
||||
export TOKEN_CACERT_HASH=
|
||||
```
|
||||
|
||||
Generate using kubectl
|
||||
Generate join token using kubectl
|
||||
```
|
||||
TOKEN_NAME=bootstrap-token-iwotl0
|
||||
|
||||
@@ -61,6 +52,7 @@ HASH=$(kubectl -n kube-public get configmap cluster-info -o jsonpath='{.data.kub
|
||||
| openssl rsa -pubin -outform der 2>/dev/null \
|
||||
| openssl dgst -sha256 -hex \
|
||||
| awk '{print "sha256:" $2}')
|
||||
|
||||
echo "export API_SERVER_ENDPOINT=${API_SERVER}"
|
||||
echo "export BOOTSTRAP_TOKEN=${TOKEN}"
|
||||
echo "export TOKEN_CACERT_HASH=${HASH}"
|
||||
Reference in New Issue
Block a user