Kubectl cheatsheet

kubectl get pods    #list pods

kubectl describe pod <pod-name>   # get pod details

kubectl expose pod <pod> --port = 4444 --name=frontend   #expose port of a pod, creates new service

kubectl port-forward <pod-name> 8080  # port forward the exposed pod port to your local machine

kubectl attach <pod-name> -i   #attach to pod

kubectl exec <pod-name> mylabel=awesome   #labelling

kubectl run -i -tty busybox --image=busybox --restart=never --sh  #run shell in a pod

Kubectl cheatsheet

How to design SQL database Schema


  1. Write down all the possible tables
  2. Identify which is child and which is parent
    (Note: Child cannot exist without parent, example: user comments in facebook cannot exist without user, so comments is child and user is parent)
  3. Add Foreign Keys to child tables
    (Note: Always Child will have the Foreign Key)
  4. Identify one to one relationships
    (Note: user and passport details is one to one relationship, if both primary keys are mapped (FK) then the relation becomes one to one)


  • Tables with surrogate keys should never be Parent.
  • Go through Oracle schemas and think over the design
  • Question yourself after you did the design
    (Note: If parent deletes child also deletes)
How to design SQL database Schema