This activity is held on WeChat official account (my small bowl soup), and there is book delivery activity. You can't take part in the book delivery activity if you take part in the question answering here!
Pick up another article. Prepare for CKA daily question - day 1
Yesterday's examination questions
Which of the following Daemonset yaml is correct? (multiple selection)
A. apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-elasticsearch namespace: default labels: k8s-app: fluentd-logging spec: selector: matchLabels: name: fluentd-elasticsearch template: metadata: labels: name: fluentd-elasticsearch spec: containers: - name: fluentd-elasticsearch image: gcr.io/fluentd-elasticsearch/fluentd:v2.5.1 restartPolicy: Never B. apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-elasticsearch namespace: default labels: k8s-app: fluentd-logging spec: selector: matchLabels: name: fluentd-elasticsearch template: metadata: labels: name: fluentd-elasticsearch spec: containers: - name: fluentd-elasticsearch image: gcr.io/fluentd-elasticsearch/fluentd:v2.5.1 restartPolicy: Onfailure C. apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-elasticsearch namespace: default labels: k8s-app: fluentd-logging spec: selector: matchLabels: name: fluentd-elasticsearch template: metadata: labels: name: fluentd-elasticsearch spec: containers: - name: fluentd-elasticsearch image: gcr.io/fluentd-elasticsearch/fluentd:v2.5.1 restartPolicy: Always D. apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-elasticsearch namespace: default labels: k8s-app: fluentd-logging spec: selector: matchLabels: name: fluentd-elasticsearch template: metadata: labels: name: fluentd-elasticsearch spec: containers: - name: fluentd-elasticsearch image: gcr.io/fluentd-elasticsearch/fluentd:v2.5.1
Yesterday's answer
CD
Yesterday's analysis
In the exam, you can only use Google browser and open two tabs, one is the tab of the exam questions, the other is the tab of kubernetes official website. https://kubernetes.io/ For a description of daemonset, see the following link: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
A Pod Template in a DaemonSet must have a RestartPolicy equal to Always, or be unspecified, which defaults to Always. Daemonset Li pod Template Must have RestartPolicy,If not specified, it defaults to Always
restartPolicy field, optional values are Always, OnFailure and Never. The default is Always. There can be multiple containers in a Pod, and restartPolicy is applicable to all containers in the Pod. The function of restartPolicy is to let kubelet restart the failed container.
In addition, the restartPolicy of the Deployment and Statefulset must also be Always to ensure that the pod exits abnormally or the kubelet restarts the container after the failure of the livenessProbe health check. https://kubernetes.io/zh/docs/concepts/workloads/controllers/deployment/
Job and CronJob are once run pod s, and the restartPolicy can only be OnFailure or Never, to ensure that the container will not restart after execution. https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
Today's exam questions
Under Kubernetes PVC+PV system, which components need to be involved in the dynamic creation of pv through volume plugins implemented by CSI to be used by pod?
A. PersistentVolumeController + CSI-Provisoner + CSI controller plugin B. AttachDetachController + CSI-Attacher + CSI controller plugin C. Kubelet + CSI node plugin
Author concise
Author: small bowl soup, a love and serious writing guy, now maintain the original official account: "my little bowl soup", focus on writing golang, docker, kubernetes and other knowledge to enhance hard power articles, and expect your attention. Reprint: Please specify the source (Note: from the official account: my small bowl soup, the author: small bowl soup)
Author concise
Author: small bowl soup, a love and serious writing guy, now maintains the original official account: "my little bowl soup", focuses on writing go, docker, kubernetes, java and other development, operation and maintenance knowledge and other articles to enhance hard power, and expects your attention. Reprint: Please specify the source (Note: from the official account: my small bowl soup, the author: small bowl soup)