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
| ==========================================================fluxcd================================= | |
| flux reconcile kustomization flux-system | |
| ===================================KERNEL AND NETWORK DEBUG================================================== | |
| mpstat - нагрузка ядра | |
| ================================================================================================= | |
| find /etc/origin/node/certificates -name '*.pem' -exec openssl x509 -text -noout -in {} \; | grep -A2 Validity - проверка сертификатов | |
| find /space/nfs-ocp-test/fserver-files/secure -type f -mtime +30 -exec ls -l >> /home/ls.log {} \; - запись списка файлов старше 30 дней в файл ls.log | |
| ps -eo pid,ppid,cmd,%mem,%cpu --=-%mem | head - показать топ процессы по цпу и озу | |
| ps -eo pcpu,pid,user,args | sort -k 1 -r | head - показать топ процессы по цпу | |
| find . -size 0 -type f -ls - показать файлы с размером 0 байт |
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
| variables: | |
| # GIT_STRATEGY: clone | |
| SRV: '8111111' | |
| PORT: '22022' | |
| image: docker:stable | |
| stages: | |
| - dockerize | |
| - deploy |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDkQN3ZiNFqalUyTagMCD4BxnflyXd+5+5QFlPay9locW4qt2YpxFgdzmwoJ0qkIKa959nv/qrvMX1HXmP9ZyxGAQUbGTWHGp3BaS+QTWGD84QAoyAo+k9yF+VqPqHZFYpj0eeT/gMY7JBR8KWe1TxErRgv0AP7mohraF8M7eP9R3C3RIGhG1A22C5NcRQ5FYvzO6WzJJndvg0QVvHcUtFkG3k6PjvJZJoWFCQ3JYYlNlFB3yejOnO/sd8iDa+NAPMs7V4bL3P9UQ2B4LMo3KVi0oYqkLay3GHhcptU4my4EYZ9Z+x2kcKgRLgsLvIkxjvOvnDfoiiBn7vYyr+sAy9KACZkn3safd6zfwreySC+YS4AWn3mTQXjrXgLJVn+Atqjg95v+Fm6aJXkpzrQoQF8GjmF2iMArikoMV/rvZ0cDdxDyKPw4oHHh/BTcTWhDJUpLJ0ibdmzlbiznkngj2YSJessmh1TpYkuyiVadIH8K8Cp/UHZGO87KQltvAcBmhXBJVE1H4AAc/vaFQLNImnzCi53cBsFQD05x3i9C2egSCQmOnSHbAwwTy8tpIseB5h+W1KCH2Pn4e47FhAHbTwQp6ym1NXrZsajvgdROxSJQHuO8NFy1+llGSDd2mfM/PO66fRFk1cOPkq9Q7sK+sD8IANOVKgElvow7LtJzzIJDw== nurlan@Nurlans-MacBook-Pro.local | |
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrJztqAZ6sf3Tk41E2QcBF1fGEsgQxz1k8pyZ3g1aNQ3sOGYn48RYYQDpMjTckd8q/fB7le65NBXL/HQDmpsELnj3IJzC2jXnb4Ej1s/irXjNZQTguV1B0A1AgrxomYalBhVfYsrvdjl6yR1Jb28mnBLuEGPPI6Gx0cMfK2xxkbinueL8CeRxNZfwYdGcgTjcIsuZj6XGTqVv2Tj6EA/QoX8bXQergvEWg4H |
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
| #================================================CKA EXAM CHEATSHEET KUBECTL|KUBECTL CHEATSHEET==============================================# | |
| commands for manage cluster, cluster objects, troubleshooting, debug etc... | |
| #=========================================================================================================================# | |
| useful resources: https://github.com/ascode-com/wiki/tree/main/certified-kubernetes-administrator | |
| alias ll='ls -l' | |
| alias kcr='kubectl create' |
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
| kubernetes commands | |
| =============================================certificates renew====================================== | |
| kubeadm certs check-expiration | |
| kubeadm certs renew all | |
| and restart etcd, kube-apiserver, kube-scheduler, kube-control-manager on the all control planes |
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
| export KUBERNETES_VERSION=v1.33 | |
| export CRIO_VERSION=v1.33 | |
| curl -fsSL https://pkgs.k8s.io/core:/stable:/$KUBERNETES_VERSION/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg | |
| echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$KUBERNETES_VERSION/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list | |
| curl -fsSL https://download.opensuse.org/repositories/isv:/cri-o:/stable:/$CRIO_VERSION/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/cri-o-apt-keyring.gpg | |
| echo "deb [signed-by=/etc/apt/keyrings/cri-o-apt-keyring.gpg] https://download.opensuse.org/repositories/isv:/cri-o:/stable:/$CRIO_VERSION/deb/ /" | tee /etc/apt/sources.list.d/cri-o.list | |
| apt-get update | |
| apt-get install -y cri-o kubelet kubeadm kubectl | |
| systemctl enable crio.service | |
| systemctl start crio.service |
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
| export PS1='\u@\h:\W# ' - /etc/profile для удобного отображения текущей ssh сессии | |
| sed -i '/community/s/^#//' /etc/apk/repositories | |
| apk add curl sudo mc htop iptables ip6tables | |
| rc-update add k3s default | |
| service k3s start | |
| rc-update show | |
| rc-status |
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
| ansible-galaxy init yourrole | |
| sudo ansible all -m shell -a 'shutdown -h now' -u nurlan -bkK --become-user=root | |
| =========================================================================================== | |
| ansible [core 2.12.5] | |
| если ансибл устанавливался через pip3 install то конфиги должны быть тут: | |
| ANSIBLE_CONFIG (environment variable if set) | |
| ansible.cfg (in the current directory) |
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
| sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst -y | |
| sudo adduser $USER libvirt | |
| sudo adduser $USER kvm | |
| mkdir -p /var/lib/libvirt/boot | |
| cd /var/lib/libvirt/boot | |
| wget https://mirror.fst.kz/ubuntu-cd/24.04.3/ubuntu-24.04.3-live-server-amd64.iso | |
| qemu-img create -f qcow2 -F qcow2 \ | |
| -b /home/ubuntu/cloud-native/noble-server-cloudimg-amd64.img \ |
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
| export CONTROL_PLANE_IP=("192.168.200.81" "192.168.200.82" "192.168.200.83") | |
| export YOUR_ENDPOINT=192.168.200.80 | |
| talosctl gen secrets -o secrets.yaml | |
| export CLUSTER_NAME=nurlan-k8s | |
| talosctl gen config --with-secrets secrets.yaml $CLUSTER_NAME https://$YOUR_ENDPOINT:6443 | |
| for ip in "${CONTROL_PLANE_IP[@]}"; do | |
| echo "=== Applying configuration to node $ip ===" | |
| talosctl apply-config --insecure \ |
NewerOlder