buy tb-500

Author Archive

Get deployment to a yaml format

Tuesday, May 3rd, 2022

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

Which nodes pods places on

Tuesday, May 3rd, 2022

kubectl get pods -o wide

Scale the deployment with blue name to 6 replicas

Tuesday, May 3rd, 2022

kubectl scale deployment blue –replicas=6

Create deployment with name “blue” using nginx image

Tuesday, May 3rd, 2022

kubectl create deployment blue –image=nginx

Generate string (password)

Friday, April 15th, 2022
openssl rand -base64 12

Number of connection Netstart (netstat)

Sunday, April 10th, 2022

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

Create Database user

Sunday, March 27th, 2022

==============
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

Sunday, February 27th, 2022

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

Wednesday, February 23rd, 2022

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

How many slave lag behind the master in postgres

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