title: How to get Deployments ($ kubectl get deployments) by specifying custom property value?
body: <p>I have deployed a Kubernetes service and when I query to get the Deployment <code>$ kubectl get deployments</code>, I can see the Deployment. 
  the <code>json</code> of the Deployment looks like below -- </p>
  
  <pre><code>apiVersion: v1
  kind: Deployment
  metadata:
   name: test
  spec:
    replicas: 1
    template:
      metadata:
        labels:
          app: test
          release: testRelease
          customProp: xyz
  </code></pre>
  
  <p>My question is how can I frame a query by which I can get the Deployment by specifying the <strong>'customProp'</strong> value. Does <code>kubectl</code> support to pass a jsonpath as part of the query? so that I can pass a <code>json</code> path like <code>jsonpath='{$.spec.template.metadata.labels.customProp}'</code> and value against this jsonPath as <strong>'xyz'</strong>. </p>
  
  <p>This is what I am thinking to execute:</p>
  
  <pre><code>$ kubectl get deployments -n &lt;namespace&gt; &lt;json path query&gt;
  </code></pre>
  
  <p>However not sure how to frame the <code>json</code> path query and pass along with <code>$kubectl get deployments</code>.</p>