title: Create/Get a custom kubernetes resource
body: <p>I want to create a custom kubernetes resource with go. The application is deployed in the kubernetes cluster. I want to create e.g. the followng resource:</p>
  <pre><code>    apiVersion: configuration.konghq.com/v1
      kind: KongPlugin
      metadata:
        name: add-response-header
      config:
        add:
          headers:
          - &quot;demo: injected-by-kong&quot;
      plugin: response-transformer
  </code></pre>
  <p>So far I always created the 'standard' resources e.g. a secret with the following code:</p>
  <pre><code>     CreateSecret(name string, data map[string]string) error {
   confs, err := rest.InClusterConfig()
          if err != nil {
              panic(err)
          }
          clientset, err = kubernetes.NewForConfig(confs)
          i := clientset.CoreV1()
          if _, err := i.Secrets(namespace).Create(&amp;v1.Secret{
              TypeMeta:   metav1.TypeMeta{
                  Kind:       &quot;Secret&quot;,
                  APIVersion: &quot;v1&quot;,
              },
              ObjectMeta: metav1.ObjectMeta{
                  Name:   name,
              },
              StringData: data,
              Type:       &quot;Opaque&quot;,
          }); err != nil {
              return err
          }
  }
  </code></pre>
  <p>In addition I tried to get a resource with the following code:</p>
  <pre><code>b, err := clientset.RESTClient().Get().Namespace(namespace).Resource(&quot;KongPlugin&quot;).DoRaw()
  </code></pre>
  <p>I get the following err:</p>
  <pre><code>the server could not find the requested resource (get KongPlugin)
  </code></pre>
  <p>If I make a request at the command line <code>k get KongPlugin</code> I can see all the resources.</p>
  <pre><code>NAME                PLUGIN-TYPE           AGE
  add-proxy-headers   request-transformer   3h34m
  </code></pre>
  <p>So how can view the custom resoources?</p>