kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

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

Open rubenrajkowski-nbcuni opened this issue 5 years ago • 0 comments

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

rubenrajkowski-nbcuni avatar Oct 09 '20 02:10 rubenrajkowski-nbcuni