Skip to content

Instantly share code, notes, and snippets.

View Nurlan199206's full-sized avatar
🎯
Focusing

Nurlan199206

🎯
Focusing
View GitHub Profile
@Nurlan199206
Nurlan199206 / gist:965af85f868132ccf6890bb7e3338575
Created December 13, 2023 06:59
jira8 nginx reverse proxy
server {
listen jira.test.kz:80;
server_name jira.test.kz;
listen 443 default ssl;
ssl_certificate /etc/ssl/star-2024/bundle.crt;
ssl_certificate_key /etc//ssl/star-2024/private.key;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
@Nurlan199206
Nurlan199206 / troubleshooting utilities
Last active December 3, 2023 07:14
troubleshooting utilities
Table: Process and Load Monitoring Utilities
top - Process activity, dynamically updated procps
uptime - How long the system is running and the average load procps
ps - Detailed information about processes procps
pstree - A tree of processes and their connections psmisc (or pstree)
mpstat - Multiple processor usage sysstat
iostat - CPU utilization and I/O statistics sysstat
sar - Display and collect information about system activity sysstat
numastat - Information about NUMA (Non-Uniform Memory Architecture) numactl
@Nurlan199206
Nurlan199206 / gist:acd4f43fbec7c2b9a915b967adc9fda5
Last active October 27, 2023 17:18
OpenShift console for Kubernetes Vanilla
Prepartion:
1. 192.168.1.160 - nginx external
2. 192.168.1.164 - worker node, also as nginx ingress
k8s: v1.26.5
imperative method:
kubectl create deploy console --containerPort=9000 --image=quay.io/openshift/origin-console:4.13
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)
dnf install https://dl.min.io/server/minio/release/linux-amd64/minio-20230721211244.0.0.x86_64.rpm
kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
@Nurlan199206
Nurlan199206 / installation kubernetes 1.27
Created July 25, 2023 15:59
installation kubernetes 1.27
===========================================================Ubuntu 20.04 - kubernetes 1.27========================================================
export OS=xUbuntu_20.04
export VERSION=1.27
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add -
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add -
@Nurlan199206
Nurlan199206 / CKS-1.27 cheatsheet
Last active July 24, 2023 16:51
CKS-1.27 cheatsheet
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
https://www.cisecurity.org/cis-benchmarks
https://training.linuxfoundation.org/certification/certified-kubernetes-security-specialist/
https://kubernetes.io/docs/tutorials/security/seccomp/
https://kubernetes.io/docs/tutorials/security/seccomp/#create-a-pod-with-a-seccomp-profile-for-syscall-auditing
https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data
https://kubernetes.io/docs/concepts/containers/runtime-class/
seccomp - ПОВТОРИТЬ!
AppArmor - ПОВТОРИТЬ!
@Nurlan199206
Nurlan199206 / pg_upgrade 13 to 15 version
Created June 23, 2023 07:49
pg_upgrade 13 to 15 version
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
sudo apt update -y
apt install postgresql-15
service postgresql stop
@Nurlan199206
Nurlan199206 / helm cheat sheet
Last active April 24, 2023 12:32
helm cheat sheet
helm install redis . --namespace=test
helm get values redis --namespace=test
helm ls --namespace=test
helm repo search redis
helm get manifest mongo
helm repo add camunda https://helm.camunda.io
helm repo update
helm pull camunda/camunda-platform - скачать из репозитория на локальный сервер.
created >= "2022-01-01 09:00" AND created <= "2022-09-30 09:00" AND updated >= "2022-01-01 09:00" AND updated <= "2022-09-30 09:00"