CKA 模拟真题 Killer.sh | Question 20 | Update Kubernetes Version and join cluster
Use context: kubectl config use-context k8s-c3-CCC Your coworker said node cluster3-node2 is running an older Kubernetes version and is not even part of the cluster. Update Kubernetes on that node to the exact version that’s running on cluster3-controlplane1 . Then add this node to the cluster. Use kubeadm for this. 译文你的同事说 cluster3-node2 节点运行的是旧的Kubernetes版本,甚至不是集群的一部分。将该节点上的Kubernetes版本更新为 cluster3-controlplane1 上运行的版本。使用kubeadm把这个节点添加到集群中。2023-01-10 15:33 kubectl config use-context...
CKA 模拟真题 Killer.sh | Question 19 | Create Secret and mount into Pod
Task weight: 3% NOTE: This task can only be solved if questions 18 or 20 have been successfully implemented and the k8s-c3-CCC cluster has a functioning worker node Use context: kubectl config use-context k8s-c3-CCC Do the following in a new Namespace secret . Create a Pod named secret-pod of image busybox:1.31.1 which should keep running for some time. There is an existing Secret located at /opt/course/19/secret1.yaml , create it in the Namespace secret and mount it readonly into the Pod...
CKA 模拟真题 Killer.sh | Question 18 | Fix Kubelet
Use context: kubectl config use-context k8s-c3-CCC There seems to be an issue with the kubelet not running on cluster3-node1 . Fix it and confirm that cluster has node cluster3-node1 available in Ready state afterwards. You should be able to schedule a Pod on cluster3-node1 afterwards. Write the reason of the issue into /opt/course/18/reason.txt . 译文在 cluster3-node1 上运行的 kubelet 似乎有问题。 修复该问题并确认集群中的 cluster3-node1 节点处于就绪状态。 之后,您应该可以在 cluster3-node1 上调度 Pod。 将问题原因写入 /opt/course/18/reason.txt...
CKA 模拟真题 Killer.sh | Question 17 | Find Container of Pod and check info
Use context: kubectl config use-context k8s-c1-H In Namespace project-tiger create a Pod named tigers-reunite of image httpd:2.4.41-alpine with labels pod=container and container=pod . Find out on which node the Pod is scheduled. Ssh into that node and find the containerd container belonging to that Pod. Using command crictl : Write the ID of the container and the info.runtimeType into /opt/course/17/pod-container.txt Write the logs of the container into...
CKA 模拟真题 Killer.sh | Question 16 | Namespaces and Api Resources
Use context: kubectl config use-context k8s-c1-H Write the names of all namespaced Kubernetes resources (like Pod, Secret, ConfigMap…) into /opt/course/16/resources.txt . Find the project-* Namespace with the highest number of Roles defined in it and write its name and amount of Roles into /opt/course/16/crowded-namespace.txt . 译文将所有命名的 Kubernetes 资源(如 Pod、Secret、ConfigMap……)的名称写入 /opt/course/16/resources.txt 中。 查找定义角色数量最多的 *project-*** 命名空间,并将其名称和角色数量写入 /opt/course/16/crowded-namespace.txt...
CKA 模拟真题 Killer.sh | Question 15 | Cluster Event Logging
Use context: kubectl config use-context k8s-c2-AC Write a command into /opt/course/15/cluster_events.sh which shows the latest events in the whole cluster, ordered by time ( metadata.creationTimestamp ). Use kubectl for it. Now kill the kube-proxy Pod running on node cluster2-node1 and write the events this caused into /opt/course/15/pod_kill.log . Finally kill the containerd container of the kube-proxy Pod on node cluster2-node1 and write the events into /opt/course/15/container_kill.log...
CKA 模拟真题 Killer.sh | Question 14 | Find out Cluster Information
Use context: kubectl config use-context k8s-c1-H You’re ask to find out following information about the cluster k8s-c1-H : How many controlplane nodes are available? How many worker nodes are available? What is the Service CIDR? Which Networking (or CNI Plugin) is configured and where is its config file? Which suffix will static pods have that run on cluster1-node1? Write your answers into file /opt/course/14/cluster-info , structured like this: # /opt/course/14/cluster-info1: [ANSWER]2:...
CKA 模拟真题 Killer.sh | Question 13 | Multi Containers and Pod shared Volume
Task weight: 4% Use context: kubectl config use-context k8s-c1-H Create a Pod named multi-container-playground in Namespace default with three containers, named c1 , c2 and c3 . There should be a volume attached to that Pod and mounted into every container, but the volume shouldn’t be persisted or shared with other Pods. Container c1 should be of image nginx:1.17.6-alpine and have the name of the node where its Pod is running available as environment variable MY_NODE_NAME. Container c2...
CKA 模拟真题 Killer.sh | Question 12 | Deployment on all Nodes
Use context: kubectl config use-context k8s-c1-H Use Namespace project-tiger for the following. Create a Deployment named deploy-important with label id=very-important (the Pods should also have this label) and 3 replicas. It should contain two containers, the first named container1 with image nginx:1.17.6-alpine and the second one named container2 with image kubernetes/pause . There should be only ever one Pod of that Deployment running on one worker node. We have two worker nodes:...
CKA 模拟真题 Killer.sh | Question 11 | DaemonSet on all Nodes
Use context: kubectl config use-context k8s-c1-H Use Namespace project-tiger for the following. Create a DaemonSet named ds-important with image httpd:2.4-alpine and labels id=ds-important and uuid=18426a0b-5f59-4e10-923f-c0e078e82462 . The Pods it creates should request 10 millicore cpu and 10 mebibyte memory. The Pods of that DaemonSet should run on all nodes, also controlplanes. 译文在命名空间 project-tiger 进行如下操作。创建一个名为 ds-important 的 DaemonSet ,镜像为 httpd:2.4-alpine ,标签 id=ds-important ,...


