CKS 模拟真题 Killer.sh | Question 1 | Contexts
Task weight: 1%
You have access to multiple clusters from your main terminal through kubectl contexts. Write all context names into /opt/course/1/contexts , one per line.
From the kubeconfig extract the certificate of user restricted@infra-prod and write it decoded to /opt/course/1/cert .
译文
任务权重:1
你可以通过终端使用 kubectl 访问多个集群。把所有的上下文名称每行一个写进 /opt/course/1/contexts
从 kubeconfig 中提取用户 restricted@infra-prod 的证书,并将其解码后写入 /opt/course/1/cert 。
解答
把所有集群名字写入文件
k config get-contexts |
用户信息
k config view --raw -ojsonpath="{.users[*].name}" # 查看有哪些用户信息 |

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Hao DevSecOps!
评论



