CKS_FINALE
This commit is contained in:
29
submissions/CKS-011-completed.md
Normal file
29
submissions/CKS-011-completed.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# CKS-011 — Verify and install a Kubernetes binary
|
||||
|
||||
Domain: **1.5 Platform binary verification**
|
||||
Time: **4 minutes** · Score: **Section B only**
|
||||
|
||||
## Supplied files
|
||||
|
||||
```text
|
||||
/opt/release/kubectl
|
||||
/opt/release/kubectl.sha256
|
||||
```
|
||||
|
||||
`kubectl.sha256` contains the official raw SHA-256 value but no filename.
|
||||
|
||||
## Task
|
||||
|
||||
Verify the downloaded binary against the checksum. Install it as `/usr/local/bin/kubectl` with owner `root:root` and mode `0755` only if verification succeeds. Then show its client version and installed ownership/mode.
|
||||
|
||||
## Section B — scored answer
|
||||
|
||||
```bash
|
||||
echo "$(cat /opt/release/kubectl.sha256) /opt/release/kubectl" | sha256sum --check && cp /opt/release/kubectl /usr/local/bin/ || echo "Verification failed"
|
||||
chown root:root /usr/local/bin/kubectl
|
||||
chmod 0755 /usr/local/bin/kubectl
|
||||
stat /usr/local/bin/kubectl
|
||||
/usr/local/bin/kubectl version
|
||||
```
|
||||
|
||||
Say **Grade CKS-011** when saved.
|
||||
Reference in New Issue
Block a user