can yo please explain difference between kubectl create and kubectl apply. In official documentation of kubernetes, mostly kubectl apply is used.
create is used for new object(s) creation declaratively (from a configuration file) or imperatively ( kubectl create deployment... ,kubectl create service...).
kubectl create deployment...
kubectl create service...
apply offers more flexibility and it is a recommended method for production object updates: it creates new objects if they do not exist from configuration files, it updates existing/live objects from single or multiple configuration files or directories, it helps preserve multiple configuration changes when performed by different sources.
Both commands are described in detail throughout the documentation. Here are a few links:
Kubectl book: https://kubectl.docs.kubernetes.io/