Personio Interview Question

Write a code that would deploy a sample application based on conditions. How does autoscaling work in Kubernetes?