In the following exam, you’re gonna implement a logical autoscaler software that pulls…
- 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 autoscaler software, I'll use Python with the
kuberneteslibrary to interact with the K8S API and library to fetch the scaling configurations. Here's a sample implementation:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.