parent
7f5a15ed8a
commit
f7fef4dfdd
|
@ -16,6 +16,7 @@ echo -e "${BLUE}Checking system compatibility${NC}"
|
||||||
|
|
||||||
MEM_GB=$(( $(sysctl hw.memsize | cut -d ' ' -f 2) / 1073741824 ))
|
MEM_GB=$(( $(sysctl hw.memsize | cut -d ' ' -f 2) / 1073741824 ))
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/scripts
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/scripts
|
||||||
|
TOOLS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../tools
|
||||||
|
|
||||||
CPMEM="2048M"
|
CPMEM="2048M"
|
||||||
WNMEM="2048M"
|
WNMEM="2048M"
|
||||||
|
@ -106,4 +107,6 @@ do
|
||||||
multipass exec $node -- /tmp/01-setup-hosts.sh
|
multipass exec $node -- /tmp/01-setup-hosts.sh
|
||||||
done
|
done
|
||||||
|
|
||||||
|
multipass transfer $TOOLS_DIR/approve-csr.sh controlplane01:/home/ubuntu/
|
||||||
|
|
||||||
echo -e "${GREEN}Done!${NC}"
|
echo -e "${GREEN}Done!${NC}"
|
||||||
|
|
|
@ -460,10 +460,9 @@ At `node02` node, run the following, selecting option 5
|
||||||
Now, go back to `controlplane01` and approve the pending kubelet-serving certificate
|
Now, go back to `controlplane01` and approve the pending kubelet-serving certificate
|
||||||
|
|
||||||
[//]: # (host:controlplane01)
|
[//]: # (host:controlplane01)
|
||||||
|
|
||||||
[//]: # (command:sudo apt install -y jq)
|
[//]: # (command:sudo apt install -y jq)
|
||||||
|
[//]: # (command:. ./approve-csr.sh)
|
||||||
|
|
||||||
[//]: # (command:kubectl certificate approve --kubeconfig admin.kubeconfig $(kubectl get csr --kubeconfig admin.kubeconfig -o json | jq -r '.items | .[] | select(.spec.username == "system:node:node02") | .metadata.name'))
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl get csr --kubeconfig admin.kubeconfig
|
kubectl get csr --kubeconfig admin.kubeconfig
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
kubectl certificate approve --kubeconfig admin.kubeconfig $(kubectl get csr --kubeconfig admin.kubeconfig -o json | jq -r '.items | .[] | select(.spec.username == "system:node:node02") | .metadata.name')
|
|
@ -106,6 +106,7 @@ Vagrant.configure("2") do |config|
|
||||||
# Install (opinionated) configs for vim and tmux on controlplane01. These used by the author for CKA exam.
|
# Install (opinionated) configs for vim and tmux on controlplane01. These used by the author for CKA exam.
|
||||||
node.vm.provision "file", source: "./ubuntu/tmux.conf", destination: "$HOME/.tmux.conf"
|
node.vm.provision "file", source: "./ubuntu/tmux.conf", destination: "$HOME/.tmux.conf"
|
||||||
node.vm.provision "file", source: "./ubuntu/vimrc", destination: "$HOME/.vimrc"
|
node.vm.provision "file", source: "./ubuntu/vimrc", destination: "$HOME/.vimrc"
|
||||||
|
node.vm.provision "file", source: "../tools/approve-csr.sh", destination: "$HOME/approve-csr.sh"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue