buy tb500

Get deployment to a yaml format

May 3rd, 2022 by ayad

kubectl get deployments.apps blue -o yaml > blue.yaml

Which nodes pods places on

May 3rd, 2022 by ayad

kubectl get pods -o wide

Scale the deployment with blue name to 6 replicas

May 3rd, 2022 by ayad

kubectl scale deployment blue –replicas=6

Create deployment with name “blue” using nginx image

May 3rd, 2022 by ayad

kubectl create deployment blue –image=nginx

Generate string (password)

April 15th, 2022 by ayad
openssl rand -base64 12

Number of connection Netstart (netstat)

April 10th, 2022 by ayad

netstat -tn 2>/dev/null | grep :3306 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr | head

Create Database user

March 27th, 2022 by ayad

==============
CREATE USER ‘aya_srv’@10.4.1.75 IDENTIFIED BY ‘eweR43rddf’;
GRANT ALL PRIVILEGES ON aya_tv.* TO ‘aya_srv’@10.9.9.5;
CREATE USER ‘aya_srv’@10.9.9.10 IDENTIFIED BY ‘eweR43rddf’;
GRANT ALL PRIVILEGES ON aya_tv.* TO ‘aya_srv’@10.9.9.10;

FLUSH PRIVILEGES;

===============

create db user and password mariadb – done as production

February 27th, 2022 by ayad

create user ‘db’user’@’10.10.5.5’ identified by ‘ ********** ’ ;

grant all privileges on `dyname`.* to ‘dbuser’@’10.10.5.5’;

Promote postgres slave to master

February 23rd, 2022 by ayad

su – postgres/usr/pgsql-14/bin/pg_ctl promote -D /var/lib/pgsql/14/data/

How many slave lag behind the master in postgres

February 21st, 2022 by ayad
select now()-pg_last_xact_replay_timestamp();