<p>I want to create PV using the <code>kubectl</code> command line, Is it possible in Kubernetes or not. If it is possible then how?</p>

user15003460
<p>For infrastructure, it has become a good practice to use <em>declarative</em> files to provision new infrastructure. Therefore an imperative variant only using <code>kubectl</code> commands for creating <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="noreferrer">Persistent Volumes</a> has not been implemented.</p>
<p>Persistent Volumes are typically created in one of two ways:</p>
<ul>
<li>Automatically created by a <a href="https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/" rel="noreferrer">dynamic volume provisioning</a> service. What service is used depends on your environment, e.g. on-prem or a cloud provider like Google Cloud Platform or Amazon Web Services.</li>
<li>In some cases, created using <code>kubectl</code> and yaml manifests, typically by an operator.</li>
</ul>
