Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Hoofdstuk 8Naam in de cursus: Cloud CLIs

Work with the three big clouds

Azure, AWS and Google Cloud have the same building blocks with other names: networks, VMs, managed Kubernetes, storage, identity. Each has a CLI for scripts and quick checks. Terraform makes the resources; the CLI is for login, kubeconfig, reading and emergencies.

  • 6 Lessen
  • 4 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

Vaardigheden in dit hoofdstuk

  • Cloud-CLI's — 4

8.1

Azure CLI

az manages Azure: resource groups, VMs, AKS, Key Vault, role assignments.

az login
az account set --subscription "Prod"
az aks get-credentials -g rg-shop -n aks-shop
az vm list -d -o table

Commando's in deze les

8.2

AWS CLI

aws manages AWS: EC2, S3, IAM, EKS, CloudWatch — with profiles per account.

aws sso login --profile prod
aws sts get-caller-identity --profile prod
aws eks update-kubeconfig --name shop --region eu-west-1
aws s3 cp backup.tar.gz s3://acme-backups/

Commando's in deze les

8.3

gcloud

gcloud manages Google Cloud: projects, VMs, GKE, Cloud Run, IAM.

gcloud config set project acme-shop-prod
gcloud container clusters get-credentials shop-gke --region europe-west4
gcloud run deploy shop --image europe-west4-docker.pkg.dev/acme/apps/shop:1.4.0 --region europe-west4

8.4

eksctl

eksctl makes EKS clusters with node groups and IAM roles for pods from one YAML file.

eksctl create cluster -f cluster.yaml
eksctl upgrade cluster --name shop --version 1.32 --approve
eksctl create iamserviceaccount --cluster shop --namespace shop --name s3-reader --attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess --approve

8.5

Know the same service in three clouds

One table for the names you meet in job ads.

Building blockAzureAWSGoogle Cloud
NetworkVNetVPCVPC
VMVirtual MachineEC2Compute Engine
Managed KubernetesAKSEKSGKE
Containers without serversContainer AppsECS / FargateCloud Run
Object storageBlob StorageS3Cloud Storage
SecretsKey VaultSecrets ManagerSecret Manager
Identity for workloadsManaged IdentityIAM rolesService accounts
MonitoringAzure MonitorCloudWatchCloud Monitoring
IaC nativeBicep / ARMCloudFormationDeployment Manager

8.6

Log in from CI without stored keys

GitHub Actions and GitLab can get short-lived cloud tokens with OIDC — no secret keys in the pipeline.

  1. Azure: a federated credential on an app registration; azure/login with client-id, tenant-id, subscription-id.
  2. AWS: an IAM role that trusts token.actions.githubusercontent.com; aws-actions/configure-aws-credentials.
  3. Google Cloud: Workload Identity Federation; google-github-actions/auth.

Onthoud

Check the active account before every delete: az account show, aws sts get-caller-identity, gcloud config list.

Alle commando's in dit hoofdstuk