CKA 模拟题库 | 8. 查看可用节点数量
发表于|更新于|kubernetesCKA
|总字数:145|阅读时长:1分钟|浏览量:
模拟题目
设置配置环境:
kubectl config use-context k8s
Task
检查有多少 nodes 已准备就绪(不包括被打上 Taint:NoSchedule 的节点), 并将数量写入 /opt/KUSC00402/kusc00402.txt
参考
概念 –> 调度、抢占和驱逐 –> 污点和容忍度
https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/
解答
考试的时候务必记住切换集群, 注意集群名称 kubectl config use-context k8s
ready 的数量 减去 noschedule 的数量为可用节点数
kubectl get nodes |

检查
cat /opt/KUSC00402/kusc00402.txt |
文章作者: Hao
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Hao DevSecOps!
相关推荐

2023-01-09
CKA 模拟真题 Killer.sh | Question 9 | Kill Scheduler, Manual Scheduling
Use context: kubectl config use-context k8s-c2-AC Ssh into the controlplane node with ssh cluster2-controlplane1 . Temporarily stop the kube-scheduler, this means in a way that you can start it again afterwards. Create a single Pod named manual-schedule of image httpd:2.4-alpine , confirm it’s created but not scheduled on any node. Now you’re the scheduler and have all its power, manually schedule that Pod on node cluster2-controlplane1. Make sure it’s running. Start the kube-scheduler aga...

2023-01-09
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: [AN...

2023-01-09
CKA 模拟真题 Killer.sh | Question 10 | RBAC ServiceAccount Role RoleBinding
Use context: kubectl config use-context k8s-c1-H Create a new ServiceAccount processor in Namespace project-hamster . Create a Role and RoleBinding, both named processor as well. These should allow the new SA to only create Secrets and ConfigMaps in that Namespace. 译文在namespace project-hamster 中创建一个新的 ServiceAccount processor 。创建一个 角色 和 RoleBinding ,这两个都是命名的 processor 。这些应该允许新的 SA 只在该命名空间中创建 Secrets 和 ConfigMaps 。 解答 有4种不同的RBAC组合和3种有效的组合。 Role + RoleBinding(适用于单一命名空间,适用于单个命名空间) ClusterRo...

2023-01-10
CKA 模拟真题 Killer.sh | Extra Question 1 | Find Pods first to be terminated
Use context: kubectl config use-context k8s-c1-H Check all available Pods in the Namespace project-c13 and find the names of those that would probably be terminated first if the nodes run out of resources (cpu or memory) to schedule all Pods. Write the Pod names into /opt/course/e1/pods-not-stable.txt . 译文检查名称空间 project-c13 中的所有可用 Pod,并找出在节点资源(CPU 或内存)耗尽时可能首先终止的 Pod 名称,以调度所有 Pod。 将 Pod 名称写入 /opt/course/e1/pods-not-stable.txt。 解答当节点上的可用cpu或内存资源达到极限时,Kubernetes将寻找那些使用的资源超过其要求的Pod。这些将是第一批终止的候...

2023-01-10
CKA 模拟真题 Killer.sh | Question 24 | NetworkPolicy
Task weight: 9% Use context: kubectl config use-context k8s-c1-H There was a security incident where an intruder was able to access the whole cluster from a single hacked backend Pod. To prevent this create a NetworkPolicy called np-backend in Namespace project-snake . It should allow the backend-* Pods only to: connect to db1-* Pods on port 1111 connect to db2-* Pods on port 2222 Use the app label of Pods in your policy. After implementation, connections from backend-* Pods to vault-* Pods o...

2023-01-10
CKA 模拟真题 Killer.sh | Question 23 | Kubelet client/server cert info
Task weight: 2% Use context: kubectl config use-context k8s-c2-AC Node cluster2-node1 has been added to the cluster using kubeadm and TLS bootstrapping. Find the “Issuer” and “Extended Key Usage” values of the cluster2-node1: kubelet client certificate, the one used for outgoing connections to the kube-apiserver. kubelet server certificate, the one used for incoming connections from the kube-apiserver. Write the information into file /opt/course/23/certificate-info.txt . Compare the “Issuer” ...
评论
公告
站点进行了迁移, 如需帮助, 请发邮件到 admin@hao.kim


