How to: Resource Limit, Environment Variable <a name="environmentvariable"></a>
#### Resource Limit 
- Pods can consume resources (cpu, memory) up to physical resource limits, if there was not any limitation. 
- Pods' used resources can be limited.
    - use 1 cpu core => cpu = "1" = "1000" = "1000m"    
    - use 10% of 1 cpu core => cpu = "0.1" = "100" = "100m"    
    - use 64 MB => memory: "64M"
- CPU resources are exactly limited when it defines. 
- When pod requests memory resource more than limitation, pod changes its status to "OOMKilled" and restarts itself to limit memory usage.
- Example (below), pod requests 64MB memory and 0.25 CPU core, uses maximum 256MB memory and 0.5 CPU core.

![image](https://user-images.githubusercontent.com/10358317/153676383-eb783491-79da-4886-9728-55977b6bbd88.png)

#### Environment Variable
- Environment Variables can be defined for each pods in the YAML file.
    
![image](https://user-images.githubusercontent.com/10358317/153676628-d103de1d-e223-451b-8337-cdfe1cebee66.png)
    
**Goto the Scenario:** [LAB: K8s Creating Pod - Declarative Way - Environment Variable](https://github.com/omerbsezer/Fast-Kubernetes/blob/main/K8-CreatingPod-Declerative.md)