POD and NODES load in openshift

May 17th, 2022 by ayad

oc adm top pods

oc adm top nodes

List only ips in OKD

May 17th, 2022 by ayad

oc get nodes -o wide |awk ‘{print $6 ”  “$3}’

Cluster admin in OKD

May 15th, 2022 by ayad

oc adm policy add-cluster-role-to-user cluster-admin ayahmad

start service using ansible

May 10th, 2022 by ayad

ansible groupname -i hosts -u user -m service -a “name=httpd state=started” -b

-a stand for arguments, -m stand for module, -b stand for become a root

How to install httpd using ansible

May 10th, 2022 by ayad

ansible groupname -i hosts -u user -m yum -a “name=httpd state=latest” -b

note: -a stand for arguments, -b stand for become a root, because need to be a root in order to install service

Create namespace in kubernetes

May 3rd, 2022 by ayad
kubectl create namespace default-mem-example

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