This assessment is designed for junior to mid-level Site Reliability Engineer candidates coming from a development background.
You have been provided a Python application that is using the cdk8s-plus-26
framework. This generates a kubernetes manifest for a very simple web application that is currently in a non-working state. You are to deploy it into a local minikube cluster, fix the issues, and then complete as many additional tasks as you can. Please read the instructions completely before proceeding with the assessment. We would prefer you do not use any AI assistance to complete this assessment, but if you do please state when and why.
You have been provided links to documentation and guides that will help you complete the tasks.
If you have any questions about the assessment, please feel free to ask your interviewer. Asking questions is part of learning!
You aren't expected to be able to fix every issue and solve every task, just learn as much as you can while making notes so you can feed back your thoughts to us. We want you to demonstrate your ability to:
- Learn new skills
- Problem solve
- Understand new codebases
- Work with Python and Kubernetes
- Ask and answer questions about your work in a follow-up session
- Fork this repository to your own Github account
- Read the contents of the repository to gain an understanding of what the code is doing
- Configure your Python development environment and install the requirements
- Install kubectl
- Install and start a local Kubernetes cluster with Minikube. You will need to have Docker installed to do this
- Run the
main.py
file to generate the Kubernetes manifest, it will be found in atdist/tech-test.k8s.yaml
- Deploy the manifest to your Minikube cluster. You can do this by running
kubectl apply -f dist/ca-tech-test.k8s.yaml
- The application will now be deployed to the minikube cluster. You can check the status of the deployment with
kubectl describe deployment tech-test-deployment
- You will see that the application has not been deployed successfully. Debug the application, fix the errors and repeat steps 7 to 9 until the application deploys successfully
- Complete as many of the additional tasks as you can
- The code is currently uncommented, can you add small comments to describe each kubernetes component? Can you explain what the code between lines 8 and 11 does?
- The deployment uses the default cdk8s replica count of
2
, can you increase this to5
? - There is currently no liveness probes set up for the container, can you add one?
- The kubernetes components are all in one file. As the application grows in complexity this will become unmanagable. Can you reorganise the project?
- Docker installation guide
- Minikube getting started guide
- Accessing apps in Minikube
- Kubectl installation guide
- Kubectl command reference
- What is cdk8s?
- cdk8s-plus-26 Python API reference
- Kubernetes deployment documentation
- Kubernetes probes documentation
- To access the deployed application from the browser, you can run
minikube service <service name>
to expose the service - If you have already connected to clusters with kubectl, you may need to switch the context with
kubectl config use-context minikube