Knowledge Check - Container Workflows and CI/CD
Test your understanding of the key concepts from Module 3. Select the best answer for each question, then submit to see your results. You need to score at least 60% to pass.
A developer creates a token for TaskBoard's CI pipeline with this Terraform block. docker login succeeds, but docker push to taskboard/api is denied.
resource "ionoscloud_container_registry_token" "ci" {
registry_id = ionoscloud_container_registry.taskboard.id
name = "taskboard-ci"
scopes {
name = "taskboard/*"
type = "repository"
actions = ["push"]
}
}
What should the developer change?
In the Private Container Registry, a token that may push must also be allowed to pull. The * wildcard in a repository scope is valid, and type registry only lets a token list the repositories. Docker clients log in with registry tokens, not with the Cloud API bearer token.
A developer applies this Service on a public node pool of Managed Kubernetes and expects a new load balancer in the data center:
apiVersion: v1
kind: Service
metadata:
name: taskboard-web
spec:
type: LoadBalancer
selector: { app: taskboard-web }
ports:
- port: 80
What actually happens?
On MKS, a LoadBalancer Service does not create an ALB or NLB: the static IP sits on one ingress node, and kube-proxy NAT replaces the client IP when the pod runs elsewhere. Public node pools support the type; private node pools do not. An ALB or NLB is provisioned separately, for example with Terraform.
TaskBoard's cluster runs Kubernetes 1.33. A developer sets k8s_version to a 1.35 release on the ionoscloud_k8s_node_pool resource only and runs terraform apply. The API rejects the change. Which sequence upgrades the cluster correctly?
Node pools can run an older version than the control plane, never a newer one, and the minor versions may differ by at most 1. The control plane goes first, one minor version at a time, followed by the pools. Downgrades are not supported, and allow_replace recreates the pool with downtime without lifting the version rules.
Two pull requests that change TaskBoard's infrastructure are merged a minute apart. Both start the GitHub Actions job below, and the second terraform apply fails with a state error.
on:
push:
branches: [main]
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: terraform init -input=false
- run: terraform apply -input=false -auto-approve
Which change prevents this?
Both runs read and write the same state object in the Object Storage bucket, so they must run one after the other. A concurrency group queues the second run until the first finishes. Disabling locks or splitting the state per run would let the two applies diverge from the real infrastructure.
TaskBoard's nightly release pipeline fails at docker push every Sunday at around 03:00 UTC. The other nights succeed. The registry was created with this block:
garbage_collection_schedule {
days = ["Sunday"]
time = "03:00:00+00:00"
}
What is the cause and the fix?
During garbage collection the Private Container Registry enters a read-only state, so pushes fail while the run lasts. Moving garbage_collection_schedule to a time without releases fixes the pipeline. Vulnerability scanning is non-blocking, and an expired token is deleted, not disabled, so it would fail every night rather than once a week.