In the following exam, you’re gonna implement a logical autoscaler software that pulls…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
In the following exam, you’re gonna implement a logical autoscaler software that pulls scaling configurations and scales relevant K8S deployments replicas.
The autoscaler can be written in any language (preferred Python) The autoscaler will pull the scaling configurations with REST API: url: http://wscdevopsexam.eastus.azurecontainer.io path: /autoscale method: GET The scaling configuration is a list of deployments and the target replicas for each deployment. Based on the configurations, the autoscaler will scale the deployment’s replicas All the deployments are in “wsc” namespace Bonus: Create a Dockerfile to pack your software Bonus: Create a README.md file
- Assistant
To implement the logical autoscaling software, we can use Python and the Kubernetes Python client to interact with the Kubernetes API and scale the deployments.
First, we need to install the Kubernetes Python client using pip:
bashpip install kubernetes
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.