Wednesday, March 29, 2023

Podman pull a specific architecture image


// podman pull a image overriding host architecture

podman pull --override-arch=arm64   quay.io/openshift-release-dev/ocp-release:4.X.Y 

// Here the image needs to be manifest listed


get pods running in specific node



// get all node_names

oc get nodes 

// Let's say the node we are interested in is: my_specific_node_name_here

 

// Get pods running in the specific node 

oc get pod --field-selector=spec.nodeName=<my_specific_node_name_here>  --all-namespaces



// Get pods running in the specific node with specific state

oc get pod --field-selector=spec.nodeName=<my_specific_node_name_here>  --all-namespaces

| grep ContainerCreating



Thursday, March 23, 2023

Steps to delete a worker node in Openshift/Kubernetes

 
// get all the nodes to select your  node
oc get nodes

Here, we selected the node ocp4.myworkernode.here 


// cordon the node - no more scheduling to this node
oc adm cordon ocp4.myworkernode.here 
 

// drain the node - remove all pods/resources from the node
oc adm drain ocp4.myworkernode.here  --force --delete-emptydir-data --ignore-daemonsets
 
 
// Now, final step delete the node
oc delete node ocp4.myworkernode.here 
 
 
PS: Use 'kubectl' instead of oc in case of Kubernetes  

PV PVC deletion steps in OpenShift/Kubernetes

 

PV,PVC deletion steps:

First PVC followed by PV.



kubectl
patch pvc <pvc_name> -p '{"metadata":{"finalizers":null}}' kubectl delete pvc <pvc_name> --grace-period=0 --force kubectl patch pv <pv_name> -p '{"metadata":{"finalizers":null}}' kubectl delete pv <pv_name> --grace-period=0 --force  
 
PVC = Persistent volume claim (used by application). 
 
PV = Persistent Volume.(underlying volume)
 
 

Saturday, March 4, 2023

Google's language settings


Important: Never click on the links directly, always copy and paste. 


Language settings in google (or google maps) needs to be set here:

https://www.google.com/preferences

and here as well for chrome : chrome://settings/languages 

Note:
Somehow the language keeps changing for me google maps.
With updating language in the above two locations, it is fine.