Posts

Showing posts from September, 2022

Kubernetes Notes

 When we create secrets, we will encode data values in base64, kubelet in the nodes is reponsible to decode the base64 encoded data when it is consumed by containers within a pod If we add new pod with same labels, why replica controller don't recognize it and delete other pod. Because replica controller adds ownerrefrences section in metadata of every pod it creates and adds it name(i.e repliacontroller name) under it.Instead of completely relying on labels it also checks this section (VV Imp) kubectl run was earlier used to create deployments as well. However, with Kubernetes 1.18, kubectl run was updated to only create pods and it lost its deployment-specific options as well. If you are looking to create a deployment, you should instead use the kubectl create deployment command. When we create ClusterIp type service, we know that it can be used to talk within cluster but not outside.For testing this exec into the pods and try acessing clusterIp serviceip:port, coolthing is we ca...

Docker notes

 Imp points: docker images -a => It will show all the images even interediate that were used while building images using Dockerfile docker ps -a =>  Only display container IDs of the running comtainers If we change line in docker file then all the ones below that line will be reexecuted instead of making use of cache docker stop $(docker ps -q) -> stops all running containers && docker rmi $(docker images -q) only removes images with proper repo and tag name.It will  not delete images used by running containers docker rm $(docker ps -aq) -> removes all stopped containers, first stop container using above cmd docker rmi $(docker images -aq) -> removes all images even intermediatory images created while building docker images and when we rebuild images with same tag, the old images have none as repositoty and tag value. Even these will be removed The CMD values can be overriden while running the container.This is not possible with entry point By ...