Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Azure Virtual Machines
Azure Virtual Machines (VMs) are computers that run in the cloud.
- Azure has VM families for different work.
- D and B series are general purpose. B series is cheap and burstable.
- F series has more CPU. E and M series have more memory.
- L series is fast on disk. N series has GPUs. H series is for big science jobs.
- Azure has four disk types: Ultra Disk, Premium SSD, Standard SSD, and Standard HDD.
- An Availability Set spreads VMs over fault domains and update domains.
- An Availability Zone is a separate data center inside one region.
- Azure Backup saves data on a schedule. It saves only the changes.
- A disk snapshot is a quick copy of one disk at one moment.
In more detail
- Pick the VM size after you check CPU, memory, and disk needs.
- Create the VM: choose the size, the image, the network, the disks, and the availability option.
- To resize, open the VM, choose Size, pick the new size, and click Resize.
- Some resizes need a deallocate step. The VM stops for a short time.
- Scale up means a bigger VM. Scale out means more VMs.
- A VM scale set adds or removes VMs by rules, like CPU above 75%.
- Use a snapshot before a risky change. Use Azure Backup for daily and long-term copies.
- With two or more VMs, use a set or a zone. One VM has no spare copy.
Azure App Services
App Service is a managed platform for web apps, APIs, and mobile backends.
- You do not patch servers. Microsoft runs the platform.
- It supports .NET, Java, Python, PHP, and Node.js.
- An App Service Plan sets the region, the pricing tier, and the instance count.
- The tiers are Basic, Standard, and Premium.
- A deployment slot is a staging copy of the app.
- You swap slots to go live with no downtime.
- Scale up changes the tier. Scale out adds instances.
- Autoscale adds or removes instances by a rule, like CPU over 70%.
- Use HTTPS only, a custom domain, and an SSL certificate for safety.
In more detail
- Create the plan first. Pick a region near your users.
- Create the app. Pick the runtime stack, then deploy.
- Deploy from Git, Azure DevOps, or a ZIP file upload.
- Put the new version in a staging slot. Test it. Then swap the slots.
- Watch the app with Azure Monitor and Application Insights.
- Use the Profiler to find slow code. Cache data with Azure Cache for Redis.
- Close the door: use a private endpoint, or allow only trusted IP ranges.
- Add sign-in with Azure AD (now called Microsoft Entra ID).
Azure Container Solutions
Azure has three container services: AKS, ACI, and ACA.
- AKS is managed Kubernetes, for microservices and large workloads.
- Azure runs the AKS control plane for you, at no extra cost.
- Control plane parts: kube-apiserver, etcd, kube-scheduler, and kube-controller-manager.
- AKS nodes are VMs. Each node runs kubelet and a container runtime.
- Node pools group nodes for special work, like GPU jobs.
- ACI runs one container fast. There is no cluster to manage.
- ACA is a serverless container platform. It runs on AKS, but you do not touch Kubernetes.
- ACA scales to zero when idle. KEDA does event-driven scaling.
- Dapr helps microservices talk. Envoy routes traffic.
In more detail
- Choose AKS when you need many containers and microservices.
- Turn on the cluster autoscaler for nodes. Use HPA for pods.
- Watch AKS with Container Insights. Secure it with Entra ID and network policies.
- Choose ACI for short jobs: a test run, a batch job, or a burst.
- ACI can take a public IP or join a virtual network.
- AKS can burst into ACI through virtual nodes.
- Choose ACA for APIs and event-driven apps. It gives ingress, TLS, and traffic split.
- Deploy images from Azure Container Registry (ACR) or Docker Hub.
Automation with ARM Templates
An ARM template is a JSON file. It describes the Azure resources you want.
- This is Infrastructure as Code (IaC).
- The template is declarative. You say what you want, not how to build it.
- Deployments are idempotent. The same template gives the same result.
- Main sections: parameters, variables, functions, resources, outputs, and definitions.
- Parameters take input at deploy time. A template can have up to 256.
- Variables store values and expressions. A template can have up to 256.
- Resources is the core section. Each resource needs type, apiVersion, name, and location.
- dependsOn sets the deploy order.
- Outputs return values after deploy, like a resource ID.
In more detail
- Write the template once. Reuse it for dev, test, and production with parameters.
- Validate before you deploy: az deployment group validate.
- Deploy from the portal, Azure CLI, PowerShell, or a CI/CD pipeline.
- Linked and nested templates split a big deployment into small parts.
- A template spec stores a template in Azure, so the team can share it.
- Use a runbook for repeat jobs, like stopping dev VMs at night.
- Add a schedule or a webhook to start a runbook.
- Update Management patches VMs on a schedule.
Key terms
The words of this course in one table. Learn them before the quiz or exam.
| Term | Meaning |
|---|---|
| 01 | Azure Virtual Machines |
| 02 | Azure App Services |
| 03 | Azure Container Solutions |
| 04 | Automation with ARM Templates |
| ACA | A serverless container platform built on AKS. |
| ACI | A service that runs a single container fast. |
| AKS | A managed Kubernetes service. |
| App Service Plan | The machines and tier that run your web app. |
| Application Insights | A tool for app errors, latency, and dependencies. |
| ARM template | A JSON file that describes Azure resources. |
| Availability Set | A group of VMs spread over racks in one data center. |
| Availability Zone | One separate data center in the same region. |
| Azure Backup | A managed service that saves and restores data. |
| Azure Cache for Redis | A cache service that speeds up apps. |
| Azure Container Apps (ACA) | A serverless container platform built on AKS. |
| Azure Container Instances (ACI) | A service that runs a single container fast. |
| Azure Kubernetes Service (AKS) | A managed Kubernetes service. |
| Cluster autoscaler | Adds or removes nodes when demand changes. |
| Container registry (ACR) | A private store for container images. |
| Control plane | The managed part that runs the cluster. |
| Dapr | A runtime for service calls, state, and messaging. |
| dependsOn | The list of resources that must deploy first. |
| Deployment slot | A staging copy of the app that you can swap. |
| Disk snapshot | A point-in-time copy of one disk. |
| Fault domain | A rack with its own power and network. |
| Idempotent | A repeat deploy gives the same end result. |
| Incremental backup | Saves only the changed data. |
| Infrastructure as Code | Define resources in files, not by hand. |
| KEDA | An event-driven autoscaler. |
| Linked template | A separate template that the main template calls. |
| Node | A VM that runs containers in AKS. |
| Node pool | A group of nodes with the same size and purpose. |
| Output | A value that the template returns after deploy. |
| Parameter | An input value for a template. |
| Premium SSD | A fast disk for databases and heavy work. |
| Private endpoint | A private network path to the app, with no public internet. |
| Recovery Services Vault | The storage container for backup data. |
| Runbook | A script or workflow in Azure Automation. |
| Runtime stack | The language and version that run your app. |
| Scale out | Add more app instances. |
| Scale up | Move the app to a bigger plan tier. |
| Template spec | A saved and shareable template in Azure. |
| Update domain | A group of VMs that restart together in maintenance. |
| Variable | A stored value or expression inside a template. |
| Virtual machine scale set | A group of same VMs that can autoscale. |
| Virtual nodes | An AKS feature that bursts work into ACI. |
Check yourself
Answer each question first, then open it to check the answer.
1What is the difference between an Availability Set and an Availability Zone?
A set spreads VMs over racks in one data center. A zone spreads VMs over separate data centers in one region.
2What is the difference between scale up and scale out?
Scale up changes the VM size. Scale out adds more VMs.
3You will update a VM. Which is faster for a rollback: a snapshot or a backup?
A snapshot. It is one point-in-time copy of one disk.
4What must you create before the web app?
An App Service Plan.
5How do you release a new version with no downtime?
Put the new version in a staging slot, test it, then swap the slots.
6Which tool shows slow requests and failed dependencies?
Application Insights.
7Which service runs one container with no cluster?
Azure Container Instances (ACI).
8What does KEDA do in Azure Container Apps?
It adds or removes replicas when an event or a queue needs it.
9Name two parts of the AKS control plane.
Any two of: kube-apiserver, etcd, kube-scheduler, kube-controller-manager.
10Why is an ARM template called declarative?
You describe the end state. You do not write every step.
11Which command checks a template before deploy?
12You need the same template in five environments. What do you use for the differences?
Parameters. Store the shared template as a template spec.