godaddy / kubernetes-client

Simplified Kubernetes API client for Node.js.
MIT License
961 stars 192 forks source link

TypeError: client.api.v1.namespaces(...).deployments is not a function #678

Open rubenrajkowski-nbcuni opened 3 years ago

rubenrajkowski-nbcuni commented 3 years ago

code example:

example link

const replica = {
      spec: {
        replicas: 10
      }
    }
const replicaModify = await client.api.v1.namespaces('default').deployments(deploymentManifest.metadata.name).patch(body: replica);
console.log('Replica Modification: ', replicaModify)

i've tried this as well: await client.apis.apps.v1.namespaces('default').deployments(deploymentManifest.metadata.name).patch(body: replica);

error:

TypeError: client.api.v1.namespaces(...).deployments is not a function

can you reply with the correct API method I should use from nodejs