https://github.com/ajsalemo/container-apps-elx-cpu-and-memory-deployments
Various ways to define CPU limits for containers - locally, and on Container Apps
https://github.com/ajsalemo/container-apps-elx-cpu-and-memory-deployments
Last synced: 4 months ago
JSON representation
Various ways to define CPU limits for containers - locally, and on Container Apps
- Host: GitHub
- URL: https://github.com/ajsalemo/container-apps-elx-cpu-and-memory-deployments
- Owner: Ajsalemo
- Created: 2023-10-11T13:27:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T15:23:41.000Z (over 2 years ago)
- Last Synced: 2025-09-04T00:30:14.360Z (10 months ago)
- Language: Bicep
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# container-apps-elx-cpu-and-memory-deployments
Various ways to define CPU and memorylimits for containers - locally, and on Container Apps
## Local usage
The `local` folder is intended to be used with a local Kubernetes cluster enabled through Docker Desktop.
**Prerequisites - enable Docker Desktop - Kubernetes**:
- Follow steps 1 - 4 listed [here](https://docs.docker.com/desktop/kubernetes/#turn-on-kubernetes)
- If you want to add the `kubectl` command to path, follow the steps [here](https://docs.docker.com/desktop/kubernetes/#use-the-kubectl-command). Otherwise you would need to type the full path to the command - eg., `"C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe"` if using Bash.
------
1. After enabling the prerequisite above, run the following command:
```
kubectl apply -f local/nginx.yaml
```
You'll see the below in your terminal:
```
service/nginx-service unchanged
deployment.apps/nginx-deployment configured
```
If `kubectl`, is **not** on `$PATH`, run the following:
```
"C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe" apply -f local/nginx.yaml
```
2. Review the `.yaml` file to understand where and how to set CPU and memory request and limits.
## Azure deployment
The `azure` folder is used for deploying through various means to Azure Container Apps.
The `arm` and `bicep` folders will create a Container App Environment and a Container App.
Steps to follow:
1. Use the commands under each respective folders to deploy and/or change CPU values. This is within the `deploy.sh` file
- Make sure to replace the values in the deployment command with your own (eg., resource group, location)
2. Change the CPU values in the `deploy.json`, `dpeloy.bicep`, or Azure CLI commands to test changing CPU