Skip to content

Commit

Permalink
Merge pull request #683 from Raemerrr/master
Browse files Browse the repository at this point in the history
Update scale-deployment.js
  • Loading branch information
k8s-ci-robot committed Jun 23, 2021
2 parents ad6e451 + cd56db5 commit 831a260
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/scale-deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ kc.loadFromDefault();

const k8sApi = kc.makeApiClient(k8s.AppsV1Api);

const targetNamespaceName = 'default';
const targetDeploymentName = 'docker-test-deployment';
const numberOfTargetReplicas = 3;

async function scale(namespace, name, replicas) {
// find the particular deployment
Expand All @@ -19,4 +21,4 @@ async function scale(namespace, name, replicas) {
await k8sApi.replaceNamespacedDeployment(name, namespace, deployment);
}

scale('default', 'docker-test-deployment', 3);
scale(targetNamespaceName, targetDeploymentName, numberOfTargetReplicas);

0 comments on commit 831a260

Please sign in to comment.