POD and NODES load in openshift
Tuesday, May 17th, 2022oc adm top pods
oc adm top nodes
oc adm top pods
oc adm top nodes
oc get nodes -o wide |awk ‘{print $6 ” “$3}’
oc adm policy add-cluster-role-to-user cluster-admin ayahmad
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
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
kubectl create namespace default-mem-example
kubectl get deployments.apps blue -o yaml > blue.yaml
kubectl get pods -o wide
kubectl scale deployment blue –replicas=6
kubectl create deployment blue –image=nginx