CNCF Projects: Runtime, Scheduling, and Data
This page covers the CNCF and two of its projects, containerd and Rook, and where the Kubernetes scheduler fits between them. The practice run starts containerd as a normal user, renders the Rook Helm charts, and uses a short-lived kind cluster (Docker, no cloud account) to watch the scheduler. It follows CNCF Projects: Build and Deliver and precedes CNCF Projects: Networking, Security, and Observability.
67 min read67 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 41 sources41টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Ceph monitors need a majorityCeph মনিটরের সংখ্যাগরিষ্ঠতা লাগে
Pick the mon count in a CephCluster, stop monitors one by one, and see when the quorum is lost.CephCluster-এ mon-এর সংখ্যা বাছুন, মনিটর একটা একটা করে বন্ধ করুন, আর দেখুন কখন কোরাম হারায়।
You’ll learnআপনি শিখবেন
- The count field: 1 to 9, most often 3count ফিল্ড: 1 থেকে 9, প্রায়ই 3✓
- A majority is more than halfসংখ্যাগরিষ্ঠ মানে অর্ধেকের বেশি
- How many mons may failকতগুলো mon ব্যর্থ হতে পারে
- Why the quorum is lostকোরাম কেন হারায়
- Why an odd count is betterবিজোড় সংখ্যা কেন ভালো
What it is
The CNCF and its stages. The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure Source 1সোর্স 1. CNCF is part of the nonprofit Linux Foundation Source 1সোর্স 1. Its Technical Oversight Committee (TOC) defines 4 stages of the project lifecycle Source 3সোর্স 3. The CNCF projects page says that graduated and incubating projects are considered stable and are used successfully in production environments Source 2সোর্স 2. The TOC describes Incubation projects as projects gaining adoption, focusing on improving stability and maturity Source 3সোর্স 3. It describes Graduated projects as highly mature, robust projects whose adopters have demonstrated their production-readiness by their deployment to production environments Source 3সোর্স 3.
The two projects. The CNCF page says that containerd was accepted on March 29, 2017 at the Incubating maturity level Source 4সোর্স 4. containerd moved to the Graduated maturity level on February 28, 2019 Source 4সোর্স 4. The CNCF Rook page says that Rook was accepted on January 29, 2018 Source 5সোর্স 5. Rook moved to the Incubating maturity level on September 25, 2018 Source 5সোর্স 5. Rook moved to the Graduated maturity level on October 7, 2020 Source 5সোর্স 5. The project pages call containerd an open and reliable container runtime Source 4সোর্স 4, and Rook storage orchestration for Kubernetes Source 5সোর্স 5.
containerd: the daemon on the node. containerd calls itself an industry-standard container runtime with an emphasis on simplicity, robustness and portability Source 6সোর্স 6. The README says that it is available as a daemon for Linux and Windows Source 7সোর্স 7. The daemon can manage the complete container lifecycle of its host system Source 7সোর্স 7. The README also says that containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users Source 7সোর্স 7.
Where containerd sits. The Kubernetes docs say that you need a working container runtime on each Node, so that the kubelet can launch Pods and their containers Source 20সোর্স 20. The Container Runtime Interface (CRI) is the main protocol for the communication between the kubelet and the container runtime Source 20সোর্স 20. The containerd docs say that containerd has built-in support for the CRI Source 8সোর্স 8. They say that containerd operates on the same node as the kubelet, and that its cri plugin handles all CRI service requests from the kubelet Source 15সোর্স 15.
Scheduling: who picks the node. kube-scheduler is the default scheduler for Kubernetes, and it runs as part of the control plane Source 23সোর্স 23. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. It finds the feasible Nodes for a Pod, scores them, and picks a Node with the highest score Source 23সোর্স 23.
Rook: Ceph storage run by an operator. Rook is an open source cloud-native storage orchestrator Source 30সোর্স 30. Ceph is a distributed storage system that provides file, block and object storage Source 30সোর্স 30. Rook automates deployment and management of Ceph to provide self-managing, self-scaling, and self-healing storage services Source 30সোর্স 30. The Rook operator does this by building on Kubernetes resources to deploy, configure, provision, scale, upgrade, and monitor Ceph Source 30সোর্স 30.
Custom resources and operators. A custom resource is an extension of the Kubernetes API that is not necessarily available in a default Kubernetes installation Source 24সোর্স 24. The CustomResourceDefinition API resource allows you to define custom resources Source 24সোর্স 24. Operators are clients of the Kubernetes API that act as controllers for a Custom Resource Source 26সোর্স 26. The most common way to deploy an operator is to add the Custom Resource Definition and its associated Controller to your cluster Source 26সোর্স 26. The Rook glossary says that the CephCluster CRD is used by Rook to allow creation and customization of storage clusters Source 31সোর্স 31.
সহজ English
The CNCF and its stages. The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure Source 1সোর্স 1. CNCF is part of the nonprofit Linux Foundation Source 1সোর্স 1. Its Technical Oversight Committee (TOC) defines 4 stages of the project lifecycle Source 3সোর্স 3. The CNCF projects page says that graduated and incubating projects are considered stable and are used successfully in production environments Source 2সোর্স 2. The TOC describes Incubation projects as projects gaining adoption, focusing on improving stability and maturity Source 3সোর্স 3. It describes Graduated projects as highly mature, robust projects whose adopters have demonstrated their production-readiness by their deployment to production environments Source 3সোর্স 3.
The two projects. The CNCF page says that containerd was accepted on March 29, 2017 at the Incubating maturity level Source 4সোর্স 4. containerd moved to the Graduated maturity level on February 28, 2019 Source 4সোর্স 4. The CNCF Rook page says that Rook was accepted on January 29, 2018 Source 5সোর্স 5. Rook moved to the Incubating maturity level on September 25, 2018 Source 5সোর্স 5. Rook moved to the Graduated maturity level on October 7, 2020 Source 5সোর্স 5. The project pages call containerd an open and reliable container runtime Source 4সোর্স 4, and Rook storage orchestration for Kubernetes Source 5সোর্স 5.
containerd: the daemon on the node. containerd calls itself an industry-standard container runtime with an emphasis on simplicity, robustness and portability Source 6সোর্স 6. The README says that it is available as a daemon for Linux and Windows Source 7সোর্স 7. The daemon can manage the complete container lifecycle of its host system Source 7সোর্স 7. The README also says that containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users Source 7সোর্স 7.
Where containerd sits. The Kubernetes docs say that you need a working container runtime on each Node, so that the kubelet can launch Pods and their containers Source 20সোর্স 20. The Container Runtime Interface (CRI) is the main protocol for the communication between the kubelet and the container runtime Source 20সোর্স 20. The containerd docs say that containerd has built-in support for the CRI Source 8সোর্স 8. They say that containerd operates on the same node as the kubelet, and that its cri plugin handles all CRI service requests from the kubelet Source 15সোর্স 15.
Scheduling: who picks the node. kube-scheduler is the default scheduler for Kubernetes, and it runs as part of the control plane Source 23সোর্স 23. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. It finds the feasible Nodes for a Pod, scores them, and picks a Node with the highest score Source 23সোর্স 23.
Rook: Ceph storage run by an operator. Rook is an open source cloud-native storage orchestrator Source 30সোর্স 30. Ceph is a distributed storage system that provides file, block and object storage Source 30সোর্স 30. Rook automates deployment and management of Ceph to provide self-managing, self-scaling, and self-healing storage services Source 30সোর্স 30. The Rook operator does this by building on Kubernetes resources to deploy, configure, provision, scale, upgrade, and monitor Ceph Source 30সোর্স 30.
Custom resources and operators. A custom resource is an extension of the Kubernetes API that is not necessarily available in a default Kubernetes installation Source 24সোর্স 24. The CustomResourceDefinition API resource allows you to define custom resources Source 24সোর্স 24. Operators are clients of the Kubernetes API that act as controllers for a Custom Resource Source 26সোর্স 26. The most common way to deploy an operator is to add the Custom Resource Definition and its associated Controller to your cluster Source 26সোর্স 26. The Rook glossary says that the CephCluster CRD is used by Rook to allow creation and customization of storage clusters Source 31সোর্স 31.
বাংলা ব্যাখ্যা
CNCF আর তার ধাপ। Cloud Native Computing Foundation (CNCF) বিশ্বব্যাপী প্রযুক্তি অবকাঠামোর গুরুত্বপূর্ণ (critical) অংশ host করে Source 1সোর্স 1। CNCF অলাভজনক Linux Foundation-এর অংশ Source 1সোর্স 1। তার Technical Oversight Committee (TOC) project জীবনচক্রের ৪টা ধাপ ঠিক করে Source 3সোর্স 3। CNCF-এর projects page বলে, graduated আর incubating project stable বলে গণ্য হয় আর production পরিবেশে সফলভাবে ব্যবহৃত হয় Source 2সোর্স 2। TOC Incubation project-কে বর্ণনা করে এমন project হিসেবে, যা গ্রহণযোগ্যতা পাচ্ছে আর স্থিতিশীলতা ও পরিপক্বতা বাড়ানোর দিকে মন দিচ্ছে Source 3সোর্স 3। সে Graduated project-কে বর্ণনা করে অত্যন্ত পরিপক্ব, মজবুত project হিসেবে, যাদের ব্যবহারকারীরা production পরিবেশে deploy করে তাদের production-প্রস্তুতি দেখিয়েছেন Source 3সোর্স 3।
দুটো project। CNCF page বলে, containerd গ্রহণ করা হয়েছে ২০১৭ সালের ২৯ মার্চ Incubating স্তরে Source 4সোর্স 4। containerd ২০১৯ সালের ২৮ ফেব্রুয়ারি Graduated স্তরে উঠেছে Source 4সোর্স 4। CNCF-এর Rook page বলে, Rook গ্রহণ করা হয়েছে ২০১৮ সালের ২৯ জানুয়ারি Source 5সোর্স 5। Rook Incubating স্তরে উঠেছে ২০১৮ সালের ২৫ সেপ্টেম্বর Source 5সোর্স 5। Rook Graduated স্তরে উঠেছে ২০২০ সালের ৭ অক্টোবর Source 5সোর্স 5। project page-গুলো containerd-কে বলে একটা open আর নির্ভরযোগ্য container runtime Source 4সোর্স 4, আর Rook-কে বলে Kubernetes-এর জন্য storage orchestration Source 5সোর্স 5।
containerd: node-এর daemon। containerd নিজেকে বলে একটা industry-standard container runtime, যার জোর সরলতা, মজবুতি আর বহনযোগ্যতায় Source 6সোর্স 6। README বলে, সে Linux আর Windows-এর জন্য একটা daemon হিসেবে পাওয়া যায় Source 7সোর্স 7। daemon তার host system-এর পূর্ণ container জীবনচক্র পরিচালনা করতে পারে Source 7সোর্স 7। README আরও বলে, containerd এমনভাবে তৈরি, যাতে সে একটা বড় system-এর ভেতরে বসানো যায়, developer বা end-user সরাসরি তাকে ব্যবহার করার জন্য নয় Source 7সোর্স 7।
containerd কোথায় বসে। Kubernetes docs বলে, প্রতিটা Node-এ একটা চালু container runtime লাগে, যাতে kubelet Pod আর তার container চালাতে পারে Source 20সোর্স 20। Container Runtime Interface (CRI) হলো kubelet আর container runtime-এর মধ্যে যোগাযোগের প্রধান protocol Source 20সোর্স 20। containerd docs বলে, containerd-এ Kubernetes CRI-এর built-in সমর্থন আছে Source 8সোর্স 8। তারা বলে, containerd kubelet-এর একই node-এ চলে, আর তার cri plugin kubelet-এর সব CRI service request সামলায় Source 15সোর্স 15।
Scheduling: কে node বাছে। kube-scheduler হলো Kubernetes-এর default scheduler, আর সে control plane-এর অংশ হিসেবে চলে Source 23সোর্স 23। scheduler এমন নতুন Pod-এর ওপর নজর রাখে, যাদের কোনো Node ঠিক করা নেই Source 23সোর্স 23। সে Pod-এর জন্য উপযুক্ত (feasible) Node খোঁজে, তাদের score দেয়, আর সবচেয়ে বেশি score-এর একটা Node বাছে Source 23সোর্স 23।
Rook: operator-এর চালানো Ceph storage। Rook একটা open source cloud-native storage orchestrator Source 30সোর্স 30। Ceph একটা distributed storage system, যা file, block আর object storage দেয় Source 30সোর্স 30। Rook Ceph-এর deployment আর ব্যবস্থাপনা স্বয়ংক্রিয় করে, যাতে storage service নিজে নিজে পরিচালিত, নিজে নিজে বড় আর নিজে নিজে সেরে ওঠে Source 30সোর্স 30। Rook operator এটা করে Kubernetes resource-এর ওপর ভর করে, Ceph-কে deploy, configure, provision, scale, upgrade আর monitor করে Source 30সোর্স 30।
Custom resource আর operator। custom resource হলো Kubernetes API-র একটা এক্সটেনশন, যা একটা default Kubernetes installation-এ থাকতেই হবে এমন নয় Source 24সোর্স 24। CustomResourceDefinition API resource আপনাকে custom resource সংজ্ঞায়িত করতে দেয় Source 24সোর্স 24। Operator হলো Kubernetes API-র client, যারা একটা Custom Resource-এর controller হিসেবে কাজ করে Source 26সোর্স 26। operator deploy করার সবচেয়ে প্রচলিত উপায় হলো cluster-এ Custom Resource Definition আর তার সঙ্গের Controller যোগ করা Source 26সোর্স 26। Rook glossary বলে, CephCluster CRD Rook ব্যবহার করে storage cluster তৈরি আর সাজানোর জন্য Source 31সোর্স 31।
How it works
Plugins and a smart client. containerd supports extending its functionality using most of its defined interfaces Source 10সোর্স 10. This includes using a customized runtime, snapshotter, content store, and even adding gRPC interfaces Source 10সোর্স 10. containerd uses plugins internally, so that its internal implementations are decoupled, stable, and treated equally with external plugins Source 10সোর্স 10. To see all the plugins, use ctr plugins ls Source 10সোর্স 10. In the output, you can see all the plugins, also those that did not load successfully Source 10সোর্স 10. containerd has a smart client architecture, meaning that any functionality that the daemon does not require is done by the client Source 10সোর্স 10. That includes most high level interactions, such as creating a container's specification, interacting with an image registry, and loading an image from tar Source 10সোর্স 10.
Namespaces. containerd offers a fully namespaced API, so that multiple consumers can use a single containerd instance without conflicting with one another Source 9সোর্স 9. Underlying image content is still shared via content addresses, but image names and metadata are separate per namespace Source 9সোর্স 9. The docs call namespaces an administrative construct that is not meant to be used as a security feature Source 9সোর্স 9. They add that it is trivial for clients to switch namespaces Source 9সোর্স 9. If you do not provide a namespace, ctr client commands use the default namespace, which is named "default" Source 9সোর্স 9. The --namespace or -n flag of ctr changes it Source 9সোর্স 9.
The command line tools. The containerd docs list several command line projects for interacting with containerd Source 8সোর্স 8. The ctr tool is bundled together with containerd, and the docs note that it is solely made for debugging containerd Source 8সোর্স 8. The docs say that the nerdctl tool provides a stable and human-friendly user experience Source 8সোর্স 8. The Kubernetes docs say that crictl is a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. You can use it to inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22.
Content flow: registry, content store, snapshots. Content exists in several areas in the containerd lifecycle Source 12সোর্স 12. They are an OCI registry, the containerd content store, and snapshots Source 12সোর্স 12. To create a container, the image and all its content must be loaded into the local content store Source 12সোর্স 12. The layers must then be read and applied to a filesystem, which creates a committed snapshot Source 12সোর্স 12. This process is known as unpacking Source 12সোর্স 12. A final mutable mountable filesystem, an active snapshot, must be created on top of the final layer Source 12সোর্স 12. A container can then be created with its root filesystem as the active snapshot Source 12সোর্স 12.
What an image is. The content-flow doc says that an image is comprised of a JSON document known as a descriptor Source 12সোর্স 12. A descriptor always contains an element, mediaType, which tells us which type it is Source 12সোর্স 12. The mediaType is a manifest or an index Source 12সোর্স 12. The OCI spec says that an image manifest provides a configuration and a set of layers for a single container image for a specific architecture and operating system Source 18সোর্স 18. An image index contains a list of manifests for specific platforms Source 19সোর্স 19. The purpose of an index is to pick the manifest that matches the target platform Source 12সোর্স 12. A layer DiffID is the digest over the layer's uncompressed tar archive Source 17সোর্স 17. The spec warns not to confuse DiffIDs with layer digests, which are often referenced in the manifest Source 17সোর্স 17.
The content store and snapshotters. When content is loaded into the content store, it is stored very similarly to how the registry stores it Source 12সোর্স 12. Each component is stored in a file whose name is the hash of it Source 12সোর্স 12. Snapshotters manage the snapshots of the container filesystems Source 11সোর্স 11. The overlayfs snapshotter is the default, and it is akin to the "overlay2" storage driver of Docker Source 11সোর্স 11. The native snapshotter is a native file copying driver, akin to the "vfs" driver of Docker Source 11সোর্স 11. The available snapshotters can be inspected by running ctr plugins ls or nerdctl info Source 11সোর্স 11.
Runtimes and the CRI plugin. containerd supports multiple container runtimes, and each container can be invoked with a different runtime Source 10সোর্স 10. It invokes v2 runtimes as binaries on the system, which are used to start the shim process Source 10সোর্স 10. The README says that most interactions with the Linux and Windows container feature sets are handled via runc and/or OS-specific libraries Source 7সোর্স 7. The CRI plugin handles the requests of the kubelet, and it manages pod networking via CNI, another CNCF project Source 15সোর্স 15. When the kubelet creates a pod, the plugin creates the pod's network namespace and configures it with CNI Source 15সোর্স 15. It then creates a special pause container, the sandbox container Source 15সোর্স 15. Later it pulls the application image if the image is not present on the node Source 15সোর্স 15.
What the kubelet requires. The kubelet acts as a client when it connects to the container runtime through gRPC Source 20সোর্স 20. For Kubernetes v1.26 and later, the kubelet requires that the container runtime supports the v1 CRI API Source 20সোর্স 20. If a container runtime does not support the v1 API, the kubelet will not register the node Source 20সোর্স 20. The kubelet and the container runtime need a cgroup driver to interface with control groups Source 21সোর্স 21. The docs say that it is critical that both use the same cgroup driver and are configured the same Source 21সোর্স 21. In the containerd configuration, the docs show SystemdCgroup = true in the options of the runc runtime Source 21সোর্স 21. They say that the systemd cgroup driver is recommended if you use cgroup v2 Source 21সোর্স 21.
Garbage collection and registries. The containerd garbage collector is scheduled on a background goroutine, and it runs based on a number of configurable factors Source 13সোর্স 13. A client can also request a garbage collection while it removes a resource Source 13সোর্স 13. The service will not return until the garbage collection has completed Source 13সোর্স 13. This is currently supported on removal of images and leases Source 13সোর্স 13. For registries, containerd reads an optional hosts.toml file for each registry host, from a configuration directory Source 16সোর্স 16. If a host differs from the registry host namespace, such as a mirror, containerd appends the registry host namespace to requests as a query parameter called ns Source 16সোর্স 16.
Running without root. The containerd docs say that a non-root user can execute containerd by using user_namespaces(7) Source 14সোর্স 14. They name RootlessKit as one tool that can set up a user namespace, with a mount namespace and optionally a network namespace Source 14সোর্স 14. They say that you need to provide a config.toml with your own path configuration Source 14সোর্স 14. They also say that a client such as ctr needs to run inside the daemon namespaces Source 14সোর্স 14. The practice run below does not set up a user namespace, and the tutorial states what that changes.
How the scheduler decides. In Kubernetes, scheduling refers to making sure that Pods are matched to Nodes so that the kubelet can run them Source 23সোর্স 23. For every Pod that the scheduler discovers, it becomes responsible for finding the best Node for that Pod to run on Source 23সোর্স 23. If none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. The scheduler then notifies the API server about its decision in a process called binding Source 23সোর্স 23. You can use the nodeSelector field, which matches against node labels, as one of the methods to choose where Kubernetes schedules specific Pods Source 41সোর্স 41. A nodeSelector only selects nodes with all the specified labels Source 41সোর্স 41. Kubernetes also populates a standard set of labels on all nodes in a cluster Source 41সোর্স 41. Affinity and anti-affinity expand the types of constraints that you can define Source 41সোর্স 41. You can indicate that such a rule is soft or preferred Source 41সোর্স 41. With a soft rule, the scheduler still schedules the Pod even if it can't find a matching node Source 41সোর্স 41.
Two Helm charts. The Rook docs describe a Ceph Operator Helm chart, which installs Rook to create, configure, and manage Ceph clusters on Kubernetes Source 34সোর্স 34. The chart bootstraps a rook-ceph-operator deployment Source 34সোর্স 34. The docs list three steps: install the Helm chart, install the Ceph-CSI drivers chart so CSI can provision and mount volumes, and create a Rook cluster Source 34সোর্স 34. A second chart, the Ceph Cluster chart, is a simple packaging of templates that optionally create Rook resources Source 35সোর্স 35. Those resources are CephCluster, CephFilesystem, and CephObjectStore custom resources, storage classes, an ingress for the dashboard, and a toolbox Source 35সোর্স 35. The default values create one block pool, one filesystem, and one object store, with their storage classes Source 35সোর্স 35.
The CRDs and the operator. The operator chart has a crds.enabled setting. It says whether the Helm chart should create and update the CRDs Source 34সোর্স 34. If it is false, the CRDs must be managed independently with deploy/examples/crds.yaml Source 34সোর্স 34. The docs warn to set it only during first deployment, and say that if it is later disabled the cluster may be destroyed Source 34সোর্স 34. The quickstart also starts with the CRDs: kubectl create -f crds.yaml -f common.yaml -f csi-operator.yaml, and then kubectl create -f operator.yaml Source 32সোর্স 32. It says that Kubernetes versions v1.32 through v1.37 are supported Source 32সোর্স 32.
What a CephCluster says. The CephCluster CRD docs say that count sets the number of mons to be started Source 36সোর্স 36. The number must be between 1 and 9 Source 36সোর্স 36. They say that the recommended value is most commonly 3 Source 36সোর্স 36. For highest availability, an odd number of mons should be specified Source 36সোর্স 36. To maintain quorum, a majority of mons must be up Source 36সোর্স 36. The dataDirHostPath is the path on the host where config and data should be stored for each of the services Source 36সোর্স 36. The docs warn that for test scenarios, if you delete a cluster and start a new one on the same hosts, the path must be deleted Source 36সোর্স 36. Otherwise stale keys and other config remain, and the new mons will fail to start Source 36সোর্স 36.
Ceph terms and node prerequisites. The Rook glossary names a few Ceph terms: Ceph Monitor (MON), Ceph Manager (MGR), Ceph Metadata Server (MDS), Object Storage Device (OSD), RADOS Block Device (RBD), and Ceph Object Gateway (RGW) Source 31সোর্স 31. To configure the Ceph storage cluster, at least one of these local storage types is required: raw devices, raw partitions, LVM logical volumes, or persistent volumes from a storage class in block mode Source 33সোর্স 33. Raw devices have no partitions or formatted filesystems, and raw partitions and LVM logical volumes have no formatted filesystem Source 33সোর্স 33. To check, run lsblk -f: if the FSTYPE field is not empty, there is a filesystem on top of the corresponding device Source 33সোর্স 33. A running udev daemon is required on all storage nodes Source 33সোর্স 33. Ceph requires a Linux kernel built with the RBD module Source 33সোর্স 33. If you create RWX volumes from a Ceph shared file system (CephFS), the recommended minimum kernel version is 4.17 Source 33সোর্স 33.
How the API server checks a custom resource. The Kubernetes docs say that custom resources are validated via OpenAPI v3.0 schemas Source 25সোর্স 25. They are also validated by x-kubernetes-validations, when the Validation Rules feature is enabled Source 25সোর্স 25. You can add more validation using admission webhooks Source 25সোর্স 25. The x-kubernetes-validations extension can be used to validate custom resources with Common Expression Language (CEL) expressions Source 25সোর্স 25. A rule that refers to oldSelf is a transition rule Source 25সোর্স 25. Transition rules apply only to operations that meet certain criteria Source 25সোর্স 25. The operation updates an existing object Source 25সোর্স 25. Transition rules never apply to create operations Source 25সোর্স 25. Both an old and a new value exist Source 25সোর্স 25. If you specify a field that the API server does not recognize, the unknown field is pruned before it is persisted Source 25সোর্স 25. A schema can opt out of pruning for a sub-tree of fields with x-kubernetes-preserve-unknown-fields: true Source 25সোর্স 25. Because the schemas are published to clients, kubectl also checks for unknown fields and rejects those objects well before they would be sent to the API server Source 25সোর্স 25.
The kubectl side. kubectl apply --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. The --validate flag defaults to strict Source 27সোর্স 27. The docs say that "true" or "strict" use a schema to validate the input and fail the request if it is invalid Source 27সোর্স 27. They say that it performs server side validation if ServerSideFieldValidation is enabled on the API server Source 27সোর্স 27. It falls back to less reliable client-side validation if not Source 27সোর্স 27. The --server-side flag makes apply run in the server instead of the client Source 27সোর্স 27. The kubectl wait command waits until the specified condition is seen in the Status field of every given resource Source 29সোর্স 29. The Kubernetes docs say that kubectl consumes the published schema for client-side validation and for kubectl explain on custom resources Source 25সোর্স 25. For kubectl get, the API server decides which columns are shown, and a CRD can customize them Source 25সোর্স 25.
সহজ English
Plugins and a smart client. containerd supports extending its functionality using most of its defined interfaces Source 10সোর্স 10. This includes using a customized runtime, snapshotter, content store, and even adding gRPC interfaces Source 10সোর্স 10. containerd uses plugins internally, so that its internal implementations are decoupled, stable, and treated equally with external plugins Source 10সোর্স 10. To see all the plugins, use ctr plugins ls Source 10সোর্স 10. In the output, you can see all the plugins, also those that did not load successfully Source 10সোর্স 10. containerd has a smart client architecture, meaning that any functionality that the daemon does not require is done by the client Source 10সোর্স 10. That includes most high level interactions, such as creating a container's specification, interacting with an image registry, and loading an image from tar Source 10সোর্স 10.
Namespaces. containerd offers a fully namespaced API, so that multiple consumers can use a single containerd instance without conflicting with one another Source 9সোর্স 9. Underlying image content is still shared via content addresses, but image names and metadata are separate per namespace Source 9সোর্স 9. The docs call namespaces an administrative construct that is not meant to be used as a security feature Source 9সোর্স 9. They add that it is trivial for clients to switch namespaces Source 9সোর্স 9. If you do not provide a namespace, ctr client commands use the default namespace, which is named "default" Source 9সোর্স 9. The --namespace or -n flag of ctr changes it Source 9সোর্স 9.
The command line tools. The containerd docs list several command line projects for interacting with containerd Source 8সোর্স 8. The ctr tool is bundled together with containerd, and the docs note that it is solely made for debugging containerd Source 8সোর্স 8. The docs say that the nerdctl tool provides a stable and human-friendly user experience Source 8সোর্স 8. The Kubernetes docs say that crictl is a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. You can use it to inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22.
Content flow: registry, content store, snapshots. Content exists in several areas in the containerd lifecycle Source 12সোর্স 12. They are an OCI registry, the containerd content store, and snapshots Source 12সোর্স 12. To create a container, the image and all its content must be loaded into the local content store Source 12সোর্স 12. The layers must then be read and applied to a filesystem, which creates a committed snapshot Source 12সোর্স 12. This process is known as unpacking Source 12সোর্স 12. A final mutable mountable filesystem, an active snapshot, must be created on top of the final layer Source 12সোর্স 12. A container can then be created with its root filesystem as the active snapshot Source 12সোর্স 12.
What an image is. The content-flow doc says that an image is comprised of a JSON document known as a descriptor Source 12সোর্স 12. A descriptor always contains an element, mediaType, which tells us which type it is Source 12সোর্স 12. The mediaType is a manifest or an index Source 12সোর্স 12. The OCI spec says that an image manifest provides a configuration and a set of layers for a single container image for a specific architecture and operating system Source 18সোর্স 18. An image index contains a list of manifests for specific platforms Source 19সোর্স 19. The purpose of an index is to pick the manifest that matches the target platform Source 12সোর্স 12. A layer DiffID is the digest over the layer's uncompressed tar archive Source 17সোর্স 17. The spec warns not to confuse DiffIDs with layer digests, which are often referenced in the manifest Source 17সোর্স 17.
The content store and snapshotters. When content is loaded into the content store, it is stored very similarly to how the registry stores it Source 12সোর্স 12. Each component is stored in a file whose name is the hash of it Source 12সোর্স 12. Snapshotters manage the snapshots of the container filesystems Source 11সোর্স 11. The overlayfs snapshotter is the default, and it is akin to the "overlay2" storage driver of Docker Source 11সোর্স 11. The native snapshotter is a native file copying driver, akin to the "vfs" driver of Docker Source 11সোর্স 11. The available snapshotters can be inspected by running ctr plugins ls or nerdctl info Source 11সোর্স 11.
Runtimes and the CRI plugin. containerd supports multiple container runtimes, and each container can be invoked with a different runtime Source 10সোর্স 10. It invokes v2 runtimes as binaries on the system, which are used to start the shim process Source 10সোর্স 10. The README says that most interactions with the Linux and Windows container feature sets are handled via runc and/or OS-specific libraries Source 7সোর্স 7. The CRI plugin handles the requests of the kubelet, and it manages pod networking via CNI, another CNCF project Source 15সোর্স 15. When the kubelet creates a pod, the plugin creates the pod's network namespace and configures it with CNI Source 15সোর্স 15. It then creates a special pause container, the sandbox container Source 15সোর্স 15. Later it pulls the application image if the image is not present on the node Source 15সোর্স 15.
What the kubelet requires. The kubelet acts as a client when it connects to the container runtime through gRPC Source 20সোর্স 20. For Kubernetes v1.26 and later, the kubelet requires that the container runtime supports the v1 CRI API Source 20সোর্স 20. If a container runtime does not support the v1 API, the kubelet will not register the node Source 20সোর্স 20. The kubelet and the container runtime need a cgroup driver to interface with control groups Source 21সোর্স 21. The docs say that it is critical that both use the same cgroup driver and are configured the same Source 21সোর্স 21. In the containerd configuration, the docs show SystemdCgroup = true in the options of the runc runtime Source 21সোর্স 21. They say that the systemd cgroup driver is recommended if you use cgroup v2 Source 21সোর্স 21.
Garbage collection and registries. The containerd garbage collector is scheduled on a background goroutine, and it runs based on a number of configurable factors Source 13সোর্স 13. A client can also request a garbage collection while it removes a resource Source 13সোর্স 13. The service will not return until the garbage collection has completed Source 13সোর্স 13. This is currently supported on removal of images and leases Source 13সোর্স 13. For registries, containerd reads an optional hosts.toml file for each registry host, from a configuration directory Source 16সোর্স 16. If a host differs from the registry host namespace, such as a mirror, containerd appends the registry host namespace to requests as a query parameter called ns Source 16সোর্স 16.
Running without root. The containerd docs say that a non-root user can execute containerd by using user_namespaces(7) Source 14সোর্স 14. They name RootlessKit as one tool that can set up a user namespace, with a mount namespace and optionally a network namespace Source 14সোর্স 14. They say that you need to provide a config.toml with your own path configuration Source 14সোর্স 14. They also say that a client such as ctr needs to run inside the daemon namespaces Source 14সোর্স 14. The practice run below does not set up a user namespace, and the tutorial states what that changes.
How the scheduler decides. In Kubernetes, scheduling refers to making sure that Pods are matched to Nodes so that the kubelet can run them Source 23সোর্স 23. For every Pod that the scheduler discovers, it becomes responsible for finding the best Node for that Pod to run on Source 23সোর্স 23. If none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. The scheduler then notifies the API server about its decision in a process called binding Source 23সোর্স 23. You can use the nodeSelector field, which matches against node labels, as one of the methods to choose where Kubernetes schedules specific Pods Source 41সোর্স 41. A nodeSelector only selects nodes with all the specified labels Source 41সোর্স 41. Kubernetes also populates a standard set of labels on all nodes in a cluster Source 41সোর্স 41. Affinity and anti-affinity expand the types of constraints that you can define Source 41সোর্স 41. You can indicate that such a rule is soft or preferred Source 41সোর্স 41. With a soft rule, the scheduler still schedules the Pod even if it can't find a matching node Source 41সোর্স 41.
Two Helm charts. The Rook docs describe a Ceph Operator Helm chart, which installs Rook to create, configure, and manage Ceph clusters on Kubernetes Source 34সোর্স 34. The chart bootstraps a rook-ceph-operator deployment Source 34সোর্স 34. The docs list three steps: install the Helm chart, install the Ceph-CSI drivers chart so CSI can provision and mount volumes, and create a Rook cluster Source 34সোর্স 34. A second chart, the Ceph Cluster chart, is a simple packaging of templates that optionally create Rook resources Source 35সোর্স 35. Those resources are CephCluster, CephFilesystem, and CephObjectStore custom resources, storage classes, an ingress for the dashboard, and a toolbox Source 35সোর্স 35. The default values create one block pool, one filesystem, and one object store, with their storage classes Source 35সোর্স 35.
The CRDs and the operator. The operator chart has a crds.enabled setting. It says whether the Helm chart should create and update the CRDs Source 34সোর্স 34. If it is false, the CRDs must be managed independently with deploy/examples/crds.yaml Source 34সোর্স 34. The docs warn to set it only during first deployment, and say that if it is later disabled the cluster may be destroyed Source 34সোর্স 34. The quickstart also starts with the CRDs: kubectl create -f crds.yaml -f common.yaml -f csi-operator.yaml, and then kubectl create -f operator.yaml Source 32সোর্স 32. It says that Kubernetes versions v1.32 through v1.37 are supported Source 32সোর্স 32.
What a CephCluster says. The CephCluster CRD docs say that count sets the number of mons to be started Source 36সোর্স 36. The number must be between 1 and 9 Source 36সোর্স 36. They say that the recommended value is most commonly 3 Source 36সোর্স 36. For highest availability, an odd number of mons should be specified Source 36সোর্স 36. To maintain quorum, a majority of mons must be up Source 36সোর্স 36. The dataDirHostPath is the path on the host where config and data should be stored for each of the services Source 36সোর্স 36. The docs warn that for test scenarios, if you delete a cluster and start a new one on the same hosts, the path must be deleted Source 36সোর্স 36. Otherwise stale keys and other config remain, and the new mons will fail to start Source 36সোর্স 36.
Ceph terms and node prerequisites. The Rook glossary names a few Ceph terms: Ceph Monitor (MON), Ceph Manager (MGR), Ceph Metadata Server (MDS), Object Storage Device (OSD), RADOS Block Device (RBD), and Ceph Object Gateway (RGW) Source 31সোর্স 31. To configure the Ceph storage cluster, at least one of these local storage types is required: raw devices, raw partitions, LVM logical volumes, or persistent volumes from a storage class in block mode Source 33সোর্স 33. Raw devices have no partitions or formatted filesystems, and raw partitions and LVM logical volumes have no formatted filesystem Source 33সোর্স 33. To check, run lsblk -f: if the FSTYPE field is not empty, there is a filesystem on top of the corresponding device Source 33সোর্স 33. A running udev daemon is required on all storage nodes Source 33সোর্স 33. Ceph requires a Linux kernel built with the RBD module Source 33সোর্স 33. If you create RWX volumes from a Ceph shared file system (CephFS), the recommended minimum kernel version is 4.17 Source 33সোর্স 33.
How the API server checks a custom resource. The Kubernetes docs say that custom resources are validated via OpenAPI v3.0 schemas Source 25সোর্স 25. They are also validated by x-kubernetes-validations, when the Validation Rules feature is enabled Source 25সোর্স 25. You can add more validation using admission webhooks Source 25সোর্স 25. The x-kubernetes-validations extension can be used to validate custom resources with Common Expression Language (CEL) expressions Source 25সোর্স 25. A rule that refers to oldSelf is a transition rule Source 25সোর্স 25. Transition rules apply only to operations that meet certain criteria Source 25সোর্স 25. The operation updates an existing object Source 25সোর্স 25. Transition rules never apply to create operations Source 25সোর্স 25. Both an old and a new value exist Source 25সোর্স 25. If you specify a field that the API server does not recognize, the unknown field is pruned before it is persisted Source 25সোর্স 25. A schema can opt out of pruning for a sub-tree of fields with x-kubernetes-preserve-unknown-fields: true Source 25সোর্স 25. Because the schemas are published to clients, kubectl also checks for unknown fields and rejects those objects well before they would be sent to the API server Source 25সোর্স 25.
The kubectl side. kubectl apply --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. The --validate flag defaults to strict Source 27সোর্স 27. The docs say that "true" or "strict" use a schema to validate the input and fail the request if it is invalid Source 27সোর্স 27. They say that it performs server side validation if ServerSideFieldValidation is enabled on the API server Source 27সোর্স 27. It falls back to less reliable client-side validation if not Source 27সোর্স 27. The --server-side flag makes apply run in the server instead of the client Source 27সোর্স 27. The kubectl wait command waits until the specified condition is seen in the Status field of every given resource Source 29সোর্স 29. The Kubernetes docs say that kubectl consumes the published schema for client-side validation and for kubectl explain on custom resources Source 25সোর্স 25. For kubectl get, the API server decides which columns are shown, and a CRD can customize them Source 25সোর্স 25.
বাংলা ব্যাখ্যা
Plugin আর smart client। containerd তার বেশিরভাগ interface দিয়ে নিজের কার্যক্ষমতা বাড়ানোর সুযোগ দেয় Source 10সোর্স 10। এর মধ্যে আছে নিজের মতো runtime, snapshotter, content store ব্যবহার করা, এমনকি নতুন gRPC interface যোগ করা Source 10সোর্স 10। containerd ভেতরেও plugin ব্যবহার করে, যাতে তার ভেতরের implementation আলাদা, স্থিতিশীল আর বাইরের plugin-এর সমান গণ্য হয় Source 10সোর্স 10। সব plugin দেখতে ctr plugins ls ব্যবহার করুন Source 10সোর্স 10। output-এ সব plugin দেখা যায়, যেগুলো সফলভাবে load হয়নি সেগুলোও Source 10সোর্স 10। containerd-এর architecture হলো smart client, অর্থাৎ daemon-এর যা না হলেই চলে, সেই কাজ client করে Source 10সোর্স 10। তার মধ্যে আছে বেশিরভাগ উঁচু স্তরের (high level) কাজ, যেমন container-এর specification বানানো, image registry-র সঙ্গে কথা বলা আর tar থেকে image load করা Source 10সোর্স 10।
Namespace। containerd একটা পুরোপুরি namespace-যুক্ত API দেয়, যাতে অনেক consumer একটা containerd instance ব্যবহার করতে পারে, একে অপরের সঙ্গে সংঘর্ষ না বাধিয়ে Source 9সোর্স 9। image-এর ভেতরের content এখনও content address দিয়ে ভাগ করা থাকে, কিন্তু image-এর নাম আর metadata প্রতিটা namespace-এ আলাদা Source 9সোর্স 9। docs namespace-কে বলে একটা প্রশাসনিক কাঠামো, যা security feature হিসেবে ব্যবহারের জন্য নয় Source 9সোর্স 9। তারা যোগ করে, client-এর পক্ষে namespace বদলানো সহজ Source 9সোর্স 9। আপনি namespace না দিলে ctr client command সব "default" নামের default namespace ব্যবহার করে Source 9সোর্স 9। ctr-এর --namespace বা -n flag সেটা বদলায় Source 9সোর্স 9।
Command line tool। containerd docs containerd-এর সঙ্গে কাজ করার কয়েকটা command line project-এর তালিকা দেয় Source 8সোর্স 8। ctr tool containerd-এর সঙ্গেই আসে, আর docs উল্লেখ করে, সে কেবল containerd debug করার জন্য বানানো Source 8সোর্স 8। docs বলে, nerdctl tool একটা স্থিতিশীল আর মানুষের জন্য সুবিধাজনক অভিজ্ঞতা দেয় Source 8সোর্স 8। Kubernetes docs বলে, crictl হলো CRI-সামঞ্জস্যপূর্ণ container runtime-এর জন্য একটা command-line interface Source 22সোর্স 22। আপনি তাকে দিয়ে একটা Kubernetes node-এর container runtime আর application পরীক্ষা ও debug করতে পারেন Source 22সোর্স 22।
Content flow: registry, content store, snapshot। containerd-এর জীবনচক্রে content কয়েকটা জায়গায় থাকে Source 12সোর্স 12। সেগুলো হলো একটা OCI registry, containerd-এর content store আর snapshot Source 12সোর্স 12। container বানাতে হলে image আর তার সব content আগে স্থানীয় content store-এ load করতে হবে Source 12সোর্স 12। তারপর layer-গুলো পড়ে একটা filesystem-এ প্রয়োগ করতে হবে, যাতে একটা committed snapshot তৈরি হয় Source 12সোর্স 12। এই প্রক্রিয়ার নাম unpacking Source 12সোর্স 12। শেষ layer-এর ওপর একটা পরিবর্তনযোগ্য, mount করা যায় এমন filesystem, অর্থাৎ active snapshot, বানাতে হবে Source 12সোর্স 12। তখন সেই active snapshot-কে root filesystem করে একটা container তৈরি করা যায় Source 12সোর্স 12।
image আসলে কী। content-flow doc বলে, একটা image হলো descriptor নামের একটা JSON document দিয়ে গড়া Source 12সোর্স 12। একটা descriptor-এ সবসময় mediaType নামের একটা উপাদান থাকে, যা বলে সে কোন ধরনের Source 12সোর্স 12। mediaType হয় manifest, নয় index Source 12সোর্স 12। OCI spec বলে, একটা image manifest একটা নির্দিষ্ট architecture আর operating system-এর একটা container image-এর জন্য একটা configuration আর একগুচ্ছ layer দেয় Source 18সোর্স 18। image index-এ নির্দিষ্ট platform-এর manifest-এর তালিকা থাকে Source 19সোর্স 19। index-এর উদ্দেশ্য হলো লক্ষ্য platform-এর সঙ্গে মেলে এমন manifest বেছে নেওয়া Source 12সোর্স 12। একটা layer-এর DiffID হলো layer-এর uncompressed tar archive-এর digest Source 17সোর্স 17। spec সতর্ক করে, DiffID-কে layer digest-এর সঙ্গে গুলিয়ে ফেলা চলবে না, যেগুলো প্রায়ই manifest-এ উল্লেখ করা হয় Source 17সোর্স 17।
Content store আর snapshotter। content store-এ content load হলে সেটা registry যেভাবে রাখে, প্রায় সেভাবেই রাখা হয় Source 12সোর্স 12। প্রতিটা অংশ এমন একটা file-এ থাকে, যার নাম তার hash Source 12সোর্স 12। Snapshotter container filesystem-এর snapshot পরিচালনা করে Source 11সোর্স 11। overlayfs snapshotter হলো default, আর সে Docker-এর "overlay2" storage driver-এর মতো Source 11সোর্স 11। native snapshotter হলো file কপি করার একটা driver, Docker-এর "vfs" driver-এর মতো Source 11সোর্স 11। কোন snapshotter আছে, তা ctr plugins ls বা nerdctl info চালিয়ে দেখা যায় Source 11সোর্স 11।
Runtime আর CRI plugin। containerd একাধিক container runtime সমর্থন করে, আর প্রতিটা container আলাদা runtime দিয়ে চালানো যায় Source 10সোর্স 10। সে v2 runtime-কে system-এর binary হিসেবে চালায়, যেগুলো shim process শুরু করতে ব্যবহার হয় Source 10সোর্স 10। README বলে, Linux আর Windows container-এর বেশিরভাগ কাজ runc এবং/অথবা OS-নির্দিষ্ট library দিয়ে সামলানো হয় Source 7সোর্স 7। CRI plugin kubelet-এর request সামলায়, আর CNI দিয়ে pod-এর networking পরিচালনা করে, যা আরেকটা CNCF project Source 15সোর্স 15। kubelet একটা pod বানালে plugin pod-এর network namespace বানায় আর CNI দিয়ে সেটা সাজায় Source 15সোর্স 15। তারপর সে একটা বিশেষ pause container, অর্থাৎ sandbox container, বানায় Source 15সোর্স 15। পরে node-এ application image না থাকলে সে সেটা pull করে Source 15সোর্স 15।
kubelet কী চায়। kubelet gRPC দিয়ে container runtime-এর সঙ্গে যুক্ত হওয়ার সময় client হিসেবে কাজ করে Source 20সোর্স 20। Kubernetes v1.26 আর তার পরের সংস্করণে kubelet চায়, container runtime যেন v1 CRI API সমর্থন করে Source 20সোর্স 20। কোনো container runtime v1 API সমর্থন না করলে kubelet node register করবে না Source 20সোর্স 20। control group-এর সঙ্গে যোগাযোগের জন্য kubelet আর container runtime-এর একটা cgroup driver লাগে Source 21সোর্স 21। docs বলে, দুটোই একই cgroup driver ব্যবহার করবে আর একইভাবে সাজানো থাকবে, এটা অত্যন্ত জরুরি Source 21সোর্স 21। containerd-এর configuration-এ docs runc runtime-এর option-এ SystemdCgroup = true দেখায় Source 21সোর্স 21। তারা বলে, cgroup v2 ব্যবহার করলে systemd cgroup driver সুপারিশ করা হয় Source 21সোর্স 21।
Garbage collection আর registry। containerd-এর garbage collector একটা background goroutine-এ schedule হয়, আর কয়েকটা সাজানো যায় এমন বিষয়ের ওপর ভিত্তি করে চলে Source 13সোর্স 13। কোনো resource সরানোর সময় client একটা garbage collection-ও চাইতে পারে Source 13সোর্স 13। garbage collection শেষ না হওয়া পর্যন্ত service ফিরে আসে না Source 13সোর্স 13। এটা এখন image আর lease সরানোর সময় সমর্থিত Source 13সোর্স 13। registry-র জন্য containerd একটা configuration directory থেকে প্রতিটা registry host-এর জন্য ঐচ্ছিক hosts.toml file পড়ে Source 16সোর্স 16। কোনো host registry host namespace থেকে আলাদা হলে, যেমন একটা mirror, containerd request-এ registry host namespace-কে ns নামের query parameter হিসেবে জুড়ে দেয় Source 16সোর্স 16।
root ছাড়া চালানো। containerd docs বলে, একজন non-root user user_namespaces(7) ব্যবহার করে containerd চালাতে পারে Source 14সোর্স 14। তারা RootlessKit-কে এমন একটা tool হিসেবে বলে, যা একটা user namespace, একটা mount namespace আর ঐচ্ছিকভাবে একটা network namespace সাজাতে পারে Source 14সোর্স 14। তারা বলে, আপনাকে নিজের path-সহ একটা config.toml দিতে হবে Source 14সোর্স 14। তারা আরও বলে, ctr-এর মতো client-কে daemon-এর namespace-এর ভেতরে চলতে হবে Source 14সোর্স 14। নিচের practice run কোনো user namespace সাজায় না, আর টিউটোরিয়াল বলে দেয় তাতে কী বদলায়।
scheduler কীভাবে ঠিক করে। Kubernetes-এ scheduling মানে Pod-গুলোকে Node-এর সঙ্গে মেলানো, যাতে kubelet সেগুলো চালাতে পারে Source 23সোর্স 23। scheduler যে Pod-ই খুঁজে পায়, তার জন্য সবচেয়ে ভালো Node খোঁজার দায়িত্ব তার Source 23সোর্স 23। কোনো node উপযুক্ত না হলে scheduler Pod-টা বসাতে পারা পর্যন্ত pod-টা unscheduled থাকে Source 23সোর্স 23। তারপর scheduler তার সিদ্ধান্ত API server-কে জানায় binding নামের একটা প্রক্রিয়ায় Source 23সোর্স 23। Kubernetes নির্দিষ্ট Pod কোথায় schedule করবে তা বাছার একটা উপায় হিসেবে আপনি nodeSelector field ব্যবহার করতে পারেন, যা node-এর label-এর সঙ্গে মেলায় Source 41সোর্স 41। একটা nodeSelector কেবল সেই node বাছে, যাতে দেওয়া সব label আছে Source 41সোর্স 41। Kubernetes একটা cluster-এর সব node-এ একটা প্রমিত label-সেটও বসায় Source 41সোর্স 41। Affinity আর anti-affinity আপনি যে ধরনের শর্ত দিতে পারেন তা বাড়ায় Source 41সোর্স 41। আপনি এমন একটা rule-কে নরম বা পছন্দের বলে দিতে পারেন Source 41সোর্স 41। নরম rule থাকলে মেলে এমন node না পেলেও scheduler Pod-টা schedule করে Source 41সোর্স 41।
দুটো Helm chart। Rook docs একটা Ceph Operator Helm chart-এর কথা বলে, যা Kubernetes-এ Ceph cluster তৈরি, সাজানো আর পরিচালনার জন্য Rook install করে Source 34সোর্স 34। chart একটা rook-ceph-operator deployment চালু করে Source 34সোর্স 34। docs তিনটা ধাপ বলে: Helm chart install করা, CSI যাতে volume provision আর mount করতে পারে সেজন্য Ceph-CSI drivers chart install করা, আর একটা Rook cluster তৈরি করা Source 34সোর্স 34। দ্বিতীয় chart, Ceph Cluster chart, হলো template-এর একটা সরল প্যাকেজ, যা ঐচ্ছিকভাবে Rook resource তৈরি করে Source 35সোর্স 35। সেই resource হলো CephCluster, CephFilesystem আর CephObjectStore custom resource, storage class, dashboard-এর জন্য একটা ingress আর একটা toolbox Source 35সোর্স 35। default value একটা করে block pool, filesystem আর object store বানায়, তাদের storage class-সহ Source 35সোর্স 35।
CRD আর operator। operator chart-এ একটা crds.enabled setting আছে। সে বলে, Helm chart-এর CRD তৈরি আর হালনাগাদ করা উচিত কি না Source 34সোর্স 34। এটা false হলে CRD-গুলো আলাদাভাবে deploy/examples/crds.yaml দিয়ে পরিচালনা করতে হবে Source 34সোর্স 34। docs সতর্ক করে, এটা কেবল প্রথম deployment-এর সময় ঠিক করুন, আর পরে বন্ধ করলে cluster ধ্বংস হয়ে যেতে পারে Source 34সোর্স 34। quickstart-ও CRD দিয়ে শুরু করে: kubectl create -f crds.yaml -f common.yaml -f csi-operator.yaml, তারপর kubectl create -f operator.yaml Source 32সোর্স 32। সে বলে, Kubernetes v1.32 থেকে v1.37 পর্যন্ত সংস্করণ সমর্থিত Source 32সোর্স 32।
CephCluster কী বলে। CephCluster CRD docs বলে, count কতগুলো mon চালু হবে তা ঠিক করে Source 36সোর্স 36। সংখ্যাটা ১ থেকে ৯-এর মধ্যে হতে হবে Source 36সোর্স 36। তারা বলে, সুপারিশ করা মান সাধারণত ৩ Source 36সোর্স 36। সর্বোচ্চ availability-র জন্য mon-এর সংখ্যা বিজোড় দেওয়া উচিত Source 36সোর্স 36। quorum ধরে রাখতে mon-এর সংখ্যাগরিষ্ঠকে চালু থাকতে হবে Source 36সোর্স 36। dataDirHostPath হলো host-এর সেই path, যেখানে প্রতিটা service-এর config আর data রাখা উচিত Source 36সোর্স 36। docs সতর্ক করে, test-এর ক্ষেত্রে একটা cluster মুছে একই host-এ নতুন cluster চালু করলে সেই path মুছে ফেলতে হবে Source 36সোর্স 36। না হলে আগের cluster-এর পুরনো key আর config থেকে যায়, আর নতুন mon চালু হতে ব্যর্থ হবে Source 36সোর্স 36।
Ceph-এর শব্দ আর node-এর পূর্বশর্ত। Rook glossary Ceph-এর কয়েকটা শব্দের নাম বলে: Ceph Monitor (MON), Ceph Manager (MGR), Ceph Metadata Server (MDS), Object Storage Device (OSD), RADOS Block Device (RBD) আর Ceph Object Gateway (RGW) Source 31সোর্স 31। Ceph storage cluster সাজাতে এই স্থানীয় storage-এর অন্তত একটা লাগে: raw device, raw partition, LVM logical volume, অথবা block mode-এর storage class থেকে পাওয়া persistent volume Source 33সোর্স 33। raw device-এ কোনো partition বা formatted filesystem থাকে না, আর raw partition ও LVM logical volume-এ কোনো formatted filesystem থাকে না Source 33সোর্স 33। পরীক্ষা করতে lsblk -f চালান: FSTYPE ঘর ফাঁকা না হলে সেই device-এর ওপর একটা filesystem আছে Source 33সোর্স 33। সব storage node-এ একটা চালু udev daemon লাগে Source 33সোর্স 33। Ceph-এর জন্য RBD module-সহ বানানো একটা Linux kernel লাগে Source 33সোর্স 33। আপনি Ceph shared file system (CephFS) থেকে RWX volume বানালে সুপারিশ করা সর্বনিম্ন kernel সংস্করণ ৪.১৭ Source 33সোর্স 33।
API server একটা custom resource কীভাবে যাচাই করে। Kubernetes docs বলে, custom resource যাচাই হয় OpenAPI v3.0 schema দিয়ে Source 25সোর্স 25। Validation Rules feature চালু থাকলে সেগুলো x-kubernetes-validations দিয়েও যাচাই হয় Source 25সোর্স 25। আপনি admission webhook দিয়ে বাড়তি যাচাই যোগ করতে পারেন Source 25সোর্স 25। x-kubernetes-validations extension দিয়ে Common Expression Language (CEL) expression ব্যবহার করে custom resource যাচাই করা যায় Source 25সোর্স 25। যে rule oldSelf-কে উল্লেখ করে, সে একটা transition rule Source 25সোর্স 25। transition rule কেবল সেই operation-এ প্রযোজ্য, যা কিছু শর্ত মেটায় Source 25সোর্স 25। operation একটা বিদ্যমান object হালনাগাদ করে Source 25সোর্স 25। transition rule create operation-এ কখনও প্রযোজ্য নয় Source 25সোর্স 25। একটা পুরনো আর একটা নতুন মান, দুটোই থাকে Source 25সোর্স 25। আপনি এমন field দিলে, যা API server চেনে না, সেই অচেনা field persist হওয়ার আগে ছেঁটে ফেলা (pruned) হয় Source 25সোর্স 25। একটা schema কিছু field-এর উপগাছের (sub-tree) জন্য x-kubernetes-preserve-unknown-fields: true দিয়ে pruning থেকে বেরিয়ে আসতে পারে Source 25সোর্স 25। schema client-দের কাছে প্রকাশ করা হয় বলে kubectl-ও অচেনা field খুঁজে দেখে, আর সেই object API server-এ পাঠানোর অনেক আগেই প্রত্যাখ্যান করে Source 25সোর্স 25।
kubectl-এর দিক। kubectl apply --dry-run=server resource persist না করে একটা server-side request পাঠায় Source 27সোর্স 27। --validate flag-এর default হলো strict Source 27সোর্স 27। docs বলে, "true" বা "strict" একটা schema দিয়ে input যাচাই করে, আর অবৈধ হলে request ব্যর্থ করে Source 27সোর্স 27। তারা বলে, API server-এ ServerSideFieldValidation চালু থাকলে সে server-side যাচাই করে Source 27সোর্স 27। না থাকলে সে কম নির্ভরযোগ্য client-side যাচাইয়ে ফিরে যায় Source 27সোর্স 27। --server-side flag apply-কে client-এর বদলে server-এ চালায় Source 27সোর্স 27। kubectl wait command দেওয়া প্রতিটা resource-এর Status field-এ নির্দিষ্ট condition না দেখা পর্যন্ত অপেক্ষা করে Source 29সোর্স 29। Kubernetes docs বলে, kubectl প্রকাশিত schema ব্যবহার করে client-side যাচাইয়ের জন্য, আর custom resource-এ kubectl explain-এর জন্য Source 25সোর্স 25। kubectl get-এ কোন column দেখাবে তা API server ঠিক করে, আর একটা CRD সেগুলো নিজের মতো করতে পারে Source 25সোর্স 25।
Try it
The tutorial ran steps 1 to 15 on 2026-11-20 at 00:52 (+06) on Linux 7.0.0-43-generic. The versions were containerd 2.4.2, runc 1.5.3, Helm v4.3.2, kind v0.33.0, kubectl v1.37.2 (client), Docker 29.10.0, Python 3.14.4, and bash 5.3.9. The node image of the kind cluster ran Kubernetes v1.37.0. The output on this page is from the tutorial's run. Each step ran in a subshell of the runner, in one new folder, with a new, empty HOME. The page shows the folder of the run as /work. The runner set CONTAINERD_ADDRESS once, to the socket of the tutorial's containerd, for all steps. The rootless page of the containerd docs sets the variable in the same way Source 14সোর্স 14. In your own terminal, run export CONTAINERD_ADDRESS="$PWD/containerd.sock" in each shell where you use ctr.
Steps 1 to 8 are about containerd. They run as a normal user. The tutorial's containerd has its own folders and sockets in the run folder. The machine has its own containerd, which runs as root. The dockerd of the machine was started with --containerd=/run/containerd/containerd.sock. The steps use only the sockets of the run folder. Steps 4, 6, and 8 fetch or pull docker.io/library/hello-world:latest from Docker Hub. Steps 9, 12, and 13 use the chart repository https://charts.rook.io/release. Steps 10 to 14 use a kind cluster named qa-p7b. The cluster was made from a node image that was already on the machine, and the runner stops if that image is missing. Step 14 deletes the cluster. kind made a Docker network named kind, and it was still there after the cluster was deleted. The runner removed it, because the run had added it and it held no container. After the run, the images, volumes, containers, and networks of Docker were the same as in the lists that the runner took before it. The run added nothing to the real home folder, and it changed no file of the real ~/.kube folder.
The choices that no source gives are the tutorial's own. They are the configuration of containerd, the namespaces qa, qa2, and qa3, the cluster name, the namespace rook-ceph, the Pod pending-demo with its label disktype=nvme, and the changes that step 13 makes to the CephCluster file. The tutorial did not run a container with containerd (ctr run), and it did not set up a user namespace. It did not run the Rook operator, Ceph daemons, the Rook toolbox, or any ceph command. The cluster has no operator, and every partition of the two disks of the machine has a filesystem (step 15). It did not run modprobe rbd, because the tutorial's run uses no root rights. It ran on Linux only.
Install the tools. The containerd docs say that the containerd.io packages in DEB and RPM formats are distributed by Docker, not by the containerd project Source 8সোর্স 8. They say that the containerd.io package contains runc too, but does not contain CNI plugins Source 8সোর্স 8. On the tutorial's machine, dpkg -S named the package containerd.io for each of containerd, ctr, and runc. Its version was 2.4.2-4~ubuntu.26.04~resolute. The package was on the machine before the tutorial. The tutorial did not install it and did not check how it was built.
Helm v4.3.2 is the one that CNCF Projects: Build and Deliver installed. That page says that the install script checked the SHA-256 of the archive and a GnuPG signature. kind v0.33.0 and kubectl v1.37.2 are the ones that Kubernetes Basics used. That page says that the tutorial used the release binaries of both, and checked them against their SHA-256 checksums. The Rook charts come from https://charts.rook.io/release. The tutorial did not check a provenance file for them. The helm template commands have no --version option, so the tutorial did not pin a chart version. The image hello-world:latest is not pinned by a digest either. All of this is the tutorial's own choice.
1. Check the tools. Run:
containerd --version
ctr --version
runc --version | head -n 1
helm version --short
kind version
kubectl version --client
docker --versionOutput of the tutorial's run:
containerd containerd v2.4.2 b7a25261e029d68978bbf290df0a62fc819b3c51
ctr containerd v2.4.2
runc version 1.5.3
v4.3.2+g8346aaa
kind v0.33.0 go1.26.7 linux/amd64
Client Version: v1.37.2
Kustomize Version: v5.8.1
Docker version 29.10.0, build fdd4b8econtainerd --versionprinted version 2.4.2, andctr --versionprinted the same version.runc --versionprinted 1.5.3.- Helm printed v4.3.2,
kind versionprinted v0.33.0,kubectl version --clientprinted v1.37.2, and Docker printed 29.10.0. - These commands only print versions.
2. Start containerd as a normal user. Run this in the folder of the practice. It writes config.toml, starts the daemon in the background, waits for its socket, and asks it for its version:
mkdir -p root state tmp
cat > config.toml <<EOF
version = 4
root = '$PWD/root'
state = '$PWD/state'
temp = '$PWD/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '$PWD/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '$PWD/containerd.sock.ttrpc'
EOF
cat config.toml
containerd --config config.toml > containerd.log 2>&1 &
echo $! > containerd.pid
until [ -S containerd.sock ]; do sleep 0.5; done; sleep 1
grep 'successfully booted' containerd.log | cut -c 1-120
ctr versionOutput of the tutorial's run:
version = 4
root = '/work/root'
state = '/work/state'
temp = '/work/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '/work/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '/work/containerd.sock.ttrpc'
time="2026-11-20T00:52:11.214369404+06:00" level=info msg="containerd successfully booted in 0.016455s"
Client:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
Go version: go1.27.4
Server:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
UUID: 304faeb0-089a-4f2d-a1d1-08c7b43fd73e- The configuration sets
root,state, andtemp, and the addresses of two sockets, all inside the run folder. These are the tutorial's own choices. The docs say that you need to provide aconfig.tomlwith your own path configuration Source 14সোর্স 14. - The file starts with
version = 4, which is the version thatcontainerd config defaultprinted in step 3. - The log line says that containerd booted.
ctr versionprinted a client block and a server block. Both show version 2.4.2 and the same revision. The server block is the answer of the daemon atCONTAINERD_ADDRESS, which is the socket in the run folder.- The tutorial's daemon is a separate process from the containerd of the machine. Before the run, the list of processes had one
/usr/bin/containerd, owned byroot, and no process with acontainerd --configoption.
3. Read the plugins and the defaults. Run:
ctr plugins ls | awk 'NR > 1 { n[$NF]++ } END { for (s in n) print s, n[s] }' | sort
ctr plugins ls | awk 'NR == 1 || $NF != "ok"'
grep 'failed to load plugin' containerd.log | cut -c 1-330
containerd config default | grep -n -E "^version|snapshotter = 'overlayfs'|sandbox = |default_runtime_name|runtime_type = 'io.containerd.runc|SystemdCgroup"Output of the tutorial's run:
error 1
ok 56
skip 11
TYPE ID PLATFORMS STATUS
io.containerd.snapshotter.v1 blockfile linux/amd64 skip
io.containerd.snapshotter.v1 btrfs linux/amd64 skip
io.containerd.snapshotter.v1 devmapper linux/amd64 skip
io.containerd.snapshotter.v1 zfs linux/amd64 skip
io.containerd.snapshotter.v1 erofs linux/amd64 skip
io.containerd.server.v1 metrics - skip
io.containerd.tracing.processor.v1 otlp - skip
io.containerd.internal.v1 tracing - skip
io.containerd.differ.v1 erofs - skip
io.containerd.grpc.v1 cri - error
io.containerd.server.v1 grpc-tcp - skip
io.containerd.server.v1 debug - skip
time="2026-11-20T00:52:11.210771850+06:00" level=warning msg="failed to load plugin" error="failed to create CRI service: failed to create cni conf monitor for default: failed to create the parent of the cni conf dir=/etc/cni: mkdir /etc/cni: permission denied" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
1:version = 4
17: snapshotter = 'overlayfs'
28: sandbox = 'registry.k8s.io/pause:3.10.2'
59: default_runtime_name = 'runc'
65: runtime_type = 'io.containerd.runc.v2'
89: SystemdCgroup = falsectr plugins lslisted 68 plugins: 56 with the statusok, 11 withskip, and 1 witherror. The docs say that you can see all the plugins in the output, also those that did not load successfully Source 10সোর্স 10.- The 11
skiprows are five snapshotters (blockfile,btrfs,devmapper,zfs, anderofs), themetricsserver, theotlptracing processor,tracing, theerofsdiffer,grpc-tcp, anddebug. The tutorial did not look into why each one was skipped. - The one
errorrow is thecriplugin. The log says that it failed to create the CNI configuration monitor, and the log text ends withmkdir /etc/cni: permission denied. Thecriplugin is the part of containerd that handles all CRI requests of the kubelet Source 15সোর্স 15. In this run, it did not load. The tutorial did not point a kubelet at this daemon. containerd config defaultprinted the defaults of this version. They are theoverlayfssnapshotter, the sandbox imageregistry.k8s.io/pause:3.10.2, the default runtime namerunc, the runtime typeio.containerd.runc.v2, andSystemdCgroup = false.- To use the systemd cgroup driver with runc, the Kubernetes docs say to set
SystemdCgroup = trueSource 21সোর্স 21. They say that it is critical that the kubelet and the container runtime use the same cgroup driver Source 21সোর্স 21. Step 14 reads both settings in the node of a kind cluster.
4. Fetch an image into the content store. Run:
ctr -n qa content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ctr -n qa content ls -q | wc -l
ctr -n qa images lsOutput of the tutorial's run:
elapsed: 5.2 s total: 37.1 K (7.1 KiB/s)
42
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.io/library/hello-world:latest application/vnd.oci.image.index.v1+json sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa 14.7 KiB linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x,windows/amd64 - - The first command fetched
docker.io/library/hello-world:latestinto the namespaceqa. Its last progress line is the first line of the output. The tutorial usedctr content fetchhere, and step 8 usesctr images pullfor the same image. - The content store of the namespace
qalisted 42 blobs after the fetch. ctr -n qa images lslisted one image with the media typeapplication/vnd.oci.image.index.v1+json, the digestsha256:1e4c05b8…, and 10 platforms, fromlinux/386towindows/amd64. The OCI spec says that an image index contains a list of manifests for specific platforms Source 19সোর্স 19.- The reference ends in
:latest, which is a tag, and the tutorial did not pin a digest. The digests on this page are the ones of the tutorial's run.
5. Read the image, and check its digests. Run:
INDEX=$(ctr -n qa images ls | awk 'NR == 2 { print $3 }')
echo "index: $INDEX"
ctr -n qa content get "$INDEX" | python3 -c '
import json, sys
index = json.load(sys.stdin)
print("mediaType:", index["mediaType"])
print("manifests:", len(index["manifests"]))
amd64 = [m for m in index["manifests"] if m.get("platform", {}).get("architecture") == "amd64" and m["platform"]["os"] == "linux"]
print("linux/amd64 manifest:", amd64[0]["digest"])
open("amd64-manifest.txt", "w").write(amd64[0]["digest"])
'
MANIFEST=$(cat amd64-manifest.txt)
ctr -n qa content get "$MANIFEST" | python3 -c '
import json, sys
manifest = json.load(sys.stdin)
print("config:", manifest["config"]["digest"])
for layer in manifest["layers"]:
print("layer:", layer["digest"], layer["size"], "bytes,", layer["mediaType"])
open("config.txt", "w").write(manifest["config"]["digest"])
open("layer.txt", "w").write(manifest["layers"][0]["digest"])
'
BLOBS=root/io.containerd.content.v1.content/blobs/sha256
ok=0; bad=0
for f in "$BLOBS"/*; do
if [ "$(sha256sum "$f" | cut -d' ' -f1)" = "$(basename "$f")" ]; then ok=$((ok + 1)); else bad=$((bad + 1)); fi
done
echo "blob files: $((ok + bad)); name equals sha256 of the content: $ok; not equal: $bad"
LAYER=$(cat layer.txt); HEX=${LAYER#sha256:}
echo "DiffID in the config: $(ctr -n qa content get "$(cat config.txt)" | python3 -c 'import json, sys; print(json.load(sys.stdin)["rootfs"]["diff_ids"][0])')"
echo "sha256 of the layer after gunzip: sha256:$(gunzip < "$BLOBS/$HEX" | sha256sum | cut -d' ' -f1)"Output of the tutorial's run:
index: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa
mediaType: application/vnd.oci.image.index.v1+json
manifests: 20
linux/amd64 manifest: sha256:d1a8d0a4eeb63aff09f5f34d4d80505e0ba81905f36158cc3970d8e07179e59e
config: sha256:e2ac70e7319a02c5a477f5825259bd118b94e8b02c279c67afa63adab6d8685b
layer: sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4 2415 bytes, application/vnd.oci.image.layer.v1.tar+gzip
blob files: 42; name equals sha256 of the content: 42; not equal: 0
DiffID in the config: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4
sha256 of the layer after gunzip: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4- The index has the media type
application/vnd.oci.image.index.v1+json, and it lists 20 manifests. The step picks the manifest forlinux/amd64from that list. The content-flow doc describes this choice: if the descriptor is an index, find the platform in it, and use that hash to retrieve the manifest Source 12সোর্স 12. - The manifest
sha256:d1a8d0a4…has one config and one layer. The layer isapplication/vnd.oci.image.layer.v1.tar+gzip, 2415 bytes. The OCI spec says that an image manifest provides a configuration and a set of layers for a single container image Source 18সোর্স 18. - The loop looked at every file of the content store. There are 42 files, and the name of each one is the SHA-256 of its content. The docs say that each component is stored in a file whose name is the hash of it Source 12সোর্স 12. The loop is the tutorial's own check of that statement.
- The
DiffIDin the config of the image issha256:897b3f2a…, and the SHA-256 of the layer aftergunzipis the same. The OCI spec says that a layer DiffID is the digest over the layer's uncompressed tar archive Source 17সোর্স 17. The content-flow doc says that you can get the hash of a layer when uncompressed withcat <file> | gunzip - | sha256sum -Source 12সোর্স 12. - The name of the layer file is
4f55086f…, which is another value. The spec says not to confuse DiffIDs with layer digests, which are often referenced in the manifest Source 17সোর্স 17. The loop shows that this name is the SHA-256 of the file as it is stored, in its gzip form.
6. Use a second namespace. Run:
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa: $(ctr -n qa content ls -q | wc -l) blobs, $(ctr -n qa images ls -q | wc -l) images"
echo "other: $(ctr -n other content ls -q | wc -l) blobs, $(ctr -n other images ls -q | wc -l) images"
ctr -n qa2 content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa2: $(ctr -n qa2 content ls -q | wc -l) blobs, $(ctr -n qa2 images ls -q | wc -l) images"
ctr -n qa2 images rm docker.io/library/hello-world:latest
echo "qa2: $(ctr -n qa2 images ls -q | wc -l) images; qa: $(ctr -n qa images ls -q | wc -l) images"
ctr namespaces lsOutput of the tutorial's run:
42
qa: 42 blobs, 1 images
other: 0 blobs, 0 images
elapsed: 1.9 s total: 26.6 K (14.0 KiB/s)
42
qa2: 42 blobs, 1 images
docker.io/library/hello-world:latest
qa2: 0 images; qa: 1 images
NAME LABELS
qa
qa2 - Before the second fetch, the store held 42 files. The namespace
qalisted 42 blobs and 1 image. The namespaceother, which the tutorial never used, listed 0 blobs and 0 images. - The second fetch went into the namespace
qa2. - After the second fetch, the store still held 42 files, and
qa2listed 42 blobs and 1 image. The same 42 blobs were listed in two namespaces. The docs say that underlying image content is shared via content addresses, but image names and metadata are separate per namespace Source 9সোর্স 9. ctr -n qa2 images rmremoved the image name inqa2. Thenqa2listed 0 images, andqastill listed 1.ctr namespaces lslistedqaandqa2. It did not listother, which the tutorial only read from.
7. Remove the last name, and let the garbage collector run. Run:
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs; qa2: $(ctr -n qa2 content ls -q | wc -l) blobs"
ctr images rm --help | grep -e '--sync'
ctr -n qa images rm --sync docker.io/library/hello-world:latest
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs"Output of the tutorial's run:
files: 42; qa: 42 blobs; qa2: 42 blobs
--sync Synchronously remove image and all associated resources
docker.io/library/hello-world:latest
files: 0; qa: 0 blobs- Before the removal, the store held 42 files, and
qalisted 42 blobs. The first line also showsqa2, which had lost its image name in step 6. In this run it listed 42 blobs. The tutorial ran these steps more than once, and in one earlier run the same line printedqa2: 0 blobs. The tutorial did not find out why. The docs say that the garbage collector is scheduled on a background goroutine, and that it runs based on a number of configurable factors Source 13সোর্স 13. The tutorial did not check whether that is the reason. - The help text of
ctr images rmsays that--syncremoves the image and all associated resources synchronously. - After
ctr -n qa images rm --sync, the store held 0 files, andqalisted 0 blobs. Whileqahad its image name, the files stayed. When its name was gone, they were gone too. - The docs say that an OCI image has a manifest that references a config file and layer tars, that containerd stores them as generic blobs, and that the client sets up the relations with labels on the content Source 13সোর্স 13.
- The docs also say that a client may also request a garbage collection during resource removal Source 13সোর্স 13. They say that the service will not return until the garbage collection has completed Source 13সোর্স 13. They say that this is currently supported on removal of images and leases Source 13সোর্স 13. The tutorial reads
--syncas the way to ask for that, and that reading is its own. It did not run the command without--sync, so it does not know how long the files would have stayed.
8. Try the whole pull. Run:
ctr -n qa3 images pull docker.io/library/hello-world:latest > pull.txt 2>&1; echo "exit status: $?"
wc -l < pull.txt
tail -n 1 pull.txt | cut -c 1-800
echo "qa3: $(ctr -n qa3 images ls -q | wc -l) images, $(ctr -n qa3 snapshots ls | tail -n +2 | wc -l) snapshots, $(ctr -n qa3 content ls -q | wc -l) blobs"Output of the tutorial's run:
exit status: 1
2540
ctr: failed to extract layer (application/vnd.oci.image.layer.v1.tar+gzip sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4) to overlayfs as "extract-99128714-u-b8 sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4": failed to unmount /work/root/tmpmounts/containerd-mount1657078535: operation not permitted: failed to mount /work/root/tmpmounts/containerd-mount1657078535: mount source: "/work/root/io.containerd.snapshotter.v1.overlayfs/snapshots/1/fs", target: "/work/root/tmpmounts/containerd-mount1657078535", fstype: bind, flags: 20480, da
qa3: 0 images, 0 snapshots, 42 blobs- The command exited with status 1. The file
pull.txthas 2540 lines, and the step prints only the last one. That line is shorter than the 800 characters of thecutlimit, and it ends afterflags: 20480, da. The tutorial did not find out why the line stops there. - The message starts with
failed to extract layer. It names the layersha256:4f55086f…andoverlayfs. - Then it says
failed to unmounta folder under/work/root/tmpmounts, andoperation not permittedfollows. After that it saysfailed to mountthe foldersnapshots/1/fsof the overlayfs snapshotter, withfstype: bind. The tutorial did not find out which of the two calls was refused. - The content-flow doc says that the layers must be read and applied to a filesystem, which creates a committed snapshot, and that this process is known as unpacking Source 12সোর্স 12. The tutorial reads the message in this way: the fetch half worked, the unpack half failed, and
operation not permittedis the reason that the message gives. That reading is the tutorial's own. - The docs say that a non-root user can execute containerd by using user_namespaces(7) Source 14সোর্স 14. The tutorial did not set up a user namespace, so it did not try that route.
- After the failed pull, the namespace
qa3listed 0 images, 0 snapshots, and 42 blobs. The blobs of the pull were in the store, and no image name was recorded inqa3. - The tutorial ran no container. The docs say that a container can be created with the active snapshot as its root filesystem Source 12সোর্স 12, and this run made no snapshot.
9. Render the two Rook charts. Run:
helm repo add rook-release https://charts.rook.io/release
helm search repo rook-release/rook-ceph --versions | head -n 4
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph > operator.yaml
echo "operator chart: $(wc -c < operator.yaml) bytes"
grep '^kind:' operator.yaml | sort | uniq -c | sort -rn
grep -E '^ +image: ' operator.yaml | sort -u
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph > cluster.yaml
echo "cluster chart: $(wc -c < cluster.yaml) bytes"
grep '^kind:' cluster.yaml | sort | uniq -c | sort -rnOutput of the tutorial's run:
"rook-release" has been added to your repositories
NAME CHART VERSION APP VERSION DESCRIPTION
rook-release/rook-ceph 1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph v1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph 1.21.1 v1.21.1 File, Block, and Object Storage Services for yo...
operator chart: 2160311 bytes
27 kind: CustomResourceDefinition
24 kind: ClusterRole
10 kind: ServiceAccount
8 kind: RoleBinding
8 kind: ClusterRoleBinding
6 kind: Role
2 kind: Deployment
2 kind: ConfigMap
1 kind: NetworkPolicy
image: "docker.io/rook/ceph:v1.21.2"
image: quay.io/cephcsi/ceph-csi-operator:v1.1.0
cluster chart: 7867 bytes
3 kind: StorageClass
1 kind: CephObjectStore
1 kind: CephFilesystemSubVolumeGroup
1 kind: CephFilesystem
1 kind: CephCluster
1 kind: CephBlockPoolhelm repo addadded the repositoryrook-release.helm search repo --versionslisted the chartrook-ceph. The step prints the first three rows. Two rows are the chart version 1.21.2, written1.21.2andv1.21.2, both with the app versionv1.21.2. The third row is1.21.1, with the app versionv1.21.1. The order of the first two rows was not the same in two runs of the tutorial.- The
helm templatecommands have no--versionoption. The operator chart rendered the imagedocker.io/rook/ceph:v1.21.2. helm templaterenders chart templates locally and displays the output Source 39সোর্স 39. The run rendered both charts before any cluster existed.- The operator chart rendered to 2,160,311 bytes. The kinds are 27 CustomResourceDefinitions, 24 ClusterRoles, 10 ServiceAccounts, 8 RoleBindings, 8 ClusterRoleBindings, 6 Roles, 2 Deployments, 2 ConfigMaps, and 1 NetworkPolicy. Two container images appear:
docker.io/rook/ceph:v1.21.2andquay.io/cephcsi/ceph-csi-operator:v1.1.0. The docs say that the chart bootstraps a rook-ceph-operator deployment Source 34সোর্স 34. - The cluster chart rendered to 7,867 bytes. It has 1 CephCluster, 1 CephBlockPool, 1 CephFilesystem, 1 CephObjectStore, 1 CephFilesystemSubVolumeGroup, and 3 StorageClasses. The docs say that the default values create one block pool, one filesystem, and one object store, and their storage classes Source 35সোর্স 35. The render has those, and one more kind, the CephFilesystemSubVolumeGroup, that this docs sentence does not name.
- Both renders used
--namespace rook-ceph. The docs say that the clusters can be installed into the same namespace as the operator or a separate namespace Source 35সোর্স 35.
10. Make a kind cluster, and look at its node. Run:
export KUBECONFIG="$PWD/kubeconfig"
kind create cluster --name qa-p7b --image kindest/node@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 --wait 120s 2>&1 | grep -v -E '^ [•✓]|^$' | cut -c 1-120
kubectl get nodes -o wide
kubectl get pods -n kube-system -o wide | grep -E '^NAME|kube-scheduler|etcd|kube-apiserver'
kubectl get events -n kube-system --field-selector reason=Scheduled -o wide | cut -c 1-200Output of the tutorial's run:
Creating cluster "qa-p7b" ...
Set kubectl context to "kind-qa-p7b"
You can now use your cluster with:
kubectl cluster-info --context kind-qa-p7b
Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
qa-p7b-control-plane Ready control-plane 22s v1.37.0 172.23.0.2 <none> Debian GNU/Linux 13 (trixie) 7.0.0-43-generic (amd64) containerd://2.3.4
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
etcd-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-apiserver-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-scheduler-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
LAST SEEN TYPE REASON OBJECT SUBOBJECT SOURCE MESSAGE FIRST SEEN COUNT
1s Normal Scheduled pod/coredns-559f6c778d-5r4h7 default-scheduler Successfully assigned kube-system/coredns-559f6c778d-5r4h7 to qa-p7b-control-plane 1s 1
1s Normal Scheduled pod/coredns-559f6c778d-vbs4t default-scheduler Successfully assigned kube-system/coredns-559f6c778d-vbs4t to qa-p7b-control-plane 1s 1
12s Normal Scheduled pod/kindnet-4l64d default-scheduler Successfully assigned kube-system/kindnet-4l64d to qa-p7b-control-plane 12s 1
12s Normal Scheduled pod/kube-proxy-xjtmr default-scheduler Successfully assigned kube-system/kube-proxy-xjtmr to qa-p7b-control-plane 12s 1 - kind runs a local Kubernetes cluster by using Docker containers as nodes Source 40সোর্স 40. The kind docs show
kind create cluster --image=...for another node image Source 40সোর্স 40. The step gives the node image by its digest. It is a Kubernetes v1.37.0 image that was already on the machine. The image list of Docker was the same after the run as before it. - The node is
qa-p7b-control-plane. Its status isReady, its version is v1.37.0, and its container runtime iscontainerd://2.3.4. That is containerd 2.3.4, and the containerd of the machine is 2.4.2. The Kubernetes docs say that Kubernetes 1.37 requires a runtime that conforms with the Container Runtime Interface (CRI) Source 21সোর্স 21. - The control-plane pods
etcd,kube-apiserver, andkube-schedulerrun inkube-system, and all three areRunning. kube-scheduler is the default scheduler, and it runs as part of the control plane Source 23সোর্স 23. - The
Scheduledevents ofkube-systemcame fromdefault-scheduler. Each saysSuccessfully assigned kube-system/<pod> to qa-p7b-control-plane, and there are 4 of them. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. The cluster has one node.
11. Make a Pod that no node matches. Run:
export KUBECONFIG="$PWD/kubeconfig"
cat > pending-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: pending-demo
spec:
nodeSelector:
disktype: nvme
containers:
- name: pause
image: registry.k8s.io/pause:3.10.2
EOF
kubectl apply -f pending-pod.yaml
for i in $(seq 1 30); do [ -n "$(kubectl get events --field-selector reason=FailedScheduling -o name)" ] && break; sleep 1; done
kubectl get pod pending-demo -o jsonpath='{.status.phase}{"\n"}'
kubectl get pod pending-demo -o jsonpath='{.status.conditions[?(@.type=="PodScheduled")].reason}{"\n"}'
kubectl get events --field-selector reason=FailedScheduling -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300
kubectl label node qa-p7b-control-plane disktype=nvme
kubectl wait --for=condition=PodScheduled pod/pending-demo --timeout=60s
kubectl get pod pending-demo -o jsonpath='{.spec.nodeName}{"\n"}'
kubectl get events --field-selector involvedObject.name=pending-demo,reason=Scheduled -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300Output of the tutorial's run:
pod/pending-demo created
Pending
Unschedulable
REASON SOURCE MESSAGE
FailedScheduling default-scheduler 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
node/qa-p7b-control-plane labeled
pod/pending-demo condition met
qa-p7b-control-plane
REASON SOURCE MESSAGE
Scheduled default-scheduler Successfully assigned default/pending-demo to qa-p7b-control-plane- The Pod
pending-demohas anodeSelectorofdisktype: nvme. The docs say that nodeSelector is the simplest recommended form of node selection constraint Source 41সোর্স 41. They say that Kubernetes only schedules the Pod onto nodes that have each of the labels you specify Source 41সোর্স 41. - The node had no such label. The Pod stayed
Pending, and itsPodScheduledcondition had the reasonUnschedulable. The docs say that if none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. - The event
FailedSchedulingcame fromdefault-scheduler. Its message says0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector.After that it sayspreemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.The tutorial did not look into the words about preemption. kubectl label nodeadded the labeldisktype=nvmeto the node. The docs say that nodes have labels, and that you can attach labels manually Source 41সোর্স 41.kubectl wait --for=condition=PodScheduledprintedcondition met. The node of the Pod was thenqa-p7b-control-plane. The eventScheduledfromdefault-schedulersaysSuccessfully assigned default/pending-demo to qa-p7b-control-plane. The same Pod was scheduled after the label was added, and the tutorial did not restart anything.- The scheduler notifies the API server about its decision in a process called binding Source 23সোর্স 23.
- The Pod uses the image
registry.k8s.io/pause:3.10.2. This is the tutorial's own choice. In step 14,crictl pslists the containerpauseof this Pod asRunning.
12. Install only the CRDs, and ask the API about them. Run:
export KUBECONFIG="$PWD/kubeconfig"
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph --show-only templates/resources.yaml > crds.yaml
grep -c '^kind: CustomResourceDefinition' crds.yaml
kubectl apply --server-side -f crds.yaml | tail -n 2
kubectl wait --for=condition=Established crd/cephclusters.ceph.rook.io --timeout=60s
kubectl get crd -o name | grep -c 'ceph.rook.io'
kubectl api-resources --api-group=ceph.rook.io | grep -E '^NAME|^cephclusters '
kubectl explain cephcluster.spec.mon.count
kubectl get crd cephclusters.ceph.rook.io -o json | python3 -c '
import json, sys
spec = json.load(sys.stdin)["spec"]["versions"][0]["schema"]["openAPIV3Schema"]["properties"]["spec"]["properties"]
print("mon.count:", json.dumps(spec["mon"]["properties"]["count"]))
print("mon rule:", json.dumps(spec["mon"]["x-kubernetes-validations"][0]))
print("dataDirHostPath rule:", json.dumps(spec["dataDirHostPath"]["x-kubernetes-validations"][0]))
'Output of the tutorial's run:
21
customresourcedefinition.apiextensions.k8s.io/objectbucketclaims.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/objectbuckets.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/cephclusters.ceph.rook.io condition met
19
NAME SHORTNAMES APIVERSION NAMESPACED KIND
cephclusters ceph ceph.rook.io/v1 true CephCluster
GROUP: ceph.rook.io
KIND: CephCluster
VERSION: v1
FIELD: count <integer>
DESCRIPTION:
Count is the number of Ceph monitors
mon.count: {"description": "Count is the number of Ceph monitors", "maximum": 9, "minimum": 0, "type": "integer"}
mon rule: {"message": "zones must be less than or equal to count", "rule": "!has(self.zones) || (has(self.zones) && (size(self.zones) <= self.count))"}
dataDirHostPath rule: {"message": "DataDirHostPath is immutable", "rule": "self == oldSelf"}helm template --show-only templates/resources.yamlshows only the manifests that this template renders Source 39সোর্স 39. The filecrds.yamlhas 21 CRDs. The tutorial applied only this file. It applied no operator, no RBAC, and no other file of the Rook quickstart.kubectl apply --server-sidemakes the apply run in the server instead of the client Source 27সোর্স 27. The step prints only the last two lines of the apply, withtail -n 2. Both sayserverside-applied.kubectl wait --for=condition=Establishedprintedcondition metforcephclusters.ceph.rook.io. The docs say that the command waits until the specified condition is seen in the Status field of every given resource Source 29সোর্স 29.- 19 CRD names contain
ceph.rook.io.kubectl api-resourcesshowscephclusterswith the short nameceph, the versionceph.rook.io/v1, andNAMESPACED true. The Kubernetes docs say that once a custom resource is installed, users can create and access its objects using kubectl, just as for built-in resources like Pods Source 24সোর্স 24. kubectl explain cephcluster.spec.mon.countprintedcount <integer>andCount is the number of Ceph monitors. The docs say thatkubectl explaindescribes the fields of each supported API resource Source 28সোর্স 28. This text gives no range. The Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36.- The last three lines come from the CRD itself, read by the Python script. The schema of
mon.countis an integer with"minimum": 0and"maximum": 9. The fieldmonhas a validation rule with the messagezones must be less than or equal to count. The fielddataDirHostPathhas the ruleself == oldSelfwith the messageDataDirHostPath is immutable. Thex-kubernetes-validationsextension can be used to validate custom resources with Common Expression Language (CEL) expressions Source 25সোর্স 25. A rule that refers tooldSelfis a transition rule Source 25সোর্স 25.
13. Check custom resources against the schema. Run:
export KUBECONFIG="$PWD/kubeconfig"
kubectl create namespace rook-ceph
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph --show-only templates/cephcluster.yaml > cephcluster.yaml
kubectl apply --dry-run=server -f cephcluster.yaml
sed 's/^ count: 3$/ count: "three"/' cephcluster.yaml > bad-type.yaml
kubectl apply --dry-run=server -f bad-type.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 10/' cephcluster.yaml > bad-range.yaml
kubectl apply --dry-run=server -f bad-range.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 0/' cephcluster.yaml > zero.yaml
kubectl apply --dry-run=server -f zero.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 3\n notAField: 1/' cephcluster.yaml > bad-field.yaml
kubectl apply --dry-run=server -f bad-field.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 1\n zones:\n - name: a\n - name: b/' cephcluster.yaml > bad-zones.yaml
kubectl apply --dry-run=server -f bad-zones.yaml 2>&1 | cut -c 1-300
sed 's#^ dataDirHostPath: /var/lib/rook$# dataDirHostPath: /var/lib/rook2#' cephcluster.yaml > moved.yaml
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300
kubectl apply -f cephcluster.yaml
kubectl -n rook-ceph get cephcluster
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300Output of the tutorial's run:
namespace/rook-ceph created
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
The CephCluster "rook-ceph" is invalid:
* spec.mon.count: Invalid value: "string": spec.mon.count in body must be of type integer: "string"
* <nil>: Invalid value: null: some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
The CephCluster "rook-ceph" is invalid: spec.mon.count: Invalid value: 10: spec.mon.count in body should be less than or equal to 9
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
Error from server (BadRequest): error when creating "bad-field.yaml": CephCluster in version "v1" cannot be handled as a CephCluster: strict decoding error: unknown field "spec.mon.notAField"
The CephCluster "rook-ceph" is invalid: spec.mon: Invalid value: zones must be less than or equal to count
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
cephcluster.ceph.rook.io/rook-ceph created
NAME DATADIRHOSTPATH MONCOUNT AGE PHASE MESSAGE HEALTH EXTERNAL FSID
rook-ceph /var/lib/rook 3 0s
The CephCluster "rook-ceph" is invalid: spec.dataDirHostPath: Invalid value: "/var/lib/rook2": DataDirHostPath is immutableThe step creates the namespace rook-ceph, and renders the CephCluster of the cluster chart into cephcluster.yaml. The other files are edits of that file with sed, and they are the tutorial's own. Each --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. The step did not set --validate. Here is what the run showed, in the order of the output:
- The file of the chart is accepted:
created (server dry run). count: "three"is rejected:spec.mon.count in body must be of type integer. A second message says that some validation rules were not checked, because the object was invalid, and to correct the existing errors to complete validation.count: 10is rejected, and the message ends withless than or equal to 9. That is the"maximum": 9of step 12.count: 0is accepted. The CRD has"minimum": 0, and the Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36. The tutorial did not run the operator, so it does not know what the operator does with 0.notAFieldundermonis rejected withstrict decoding error: unknown field "spec.mon.notAField". The--validateflag ofkubectl applydefaults to strict Source 27সোর্স 27. The docs say that "true" or "strict" use a schema to validate the input and fail the request if it is invalid Source 27সোর্স 27.count: 1with two zones is rejected by the validation rule, with the messagezones must be less than or equal to count.moved.yamlis the file of the chart withdataDirHostPath: /var/lib/rook2. Before the object exists, its dry run is accepted:created (server dry run).kubectl applyof the file of the chart, without--dry-run, printedcreated.kubectl get cephclustershows the columnsDATADIRHOSTPATH,MONCOUNT,AGE,PHASE,MESSAGE,HEALTH,EXTERNAL, andFSID. The docs say that the API server decides which columnskubectl getshows, and that a CRD can customize them Source 25সোর্স 25. In the run,PHASE,MESSAGE,HEALTH,EXTERNAL, andFSIDare empty, and no operator ran in the cluster.- The dry run of
moved.yamlafter the object exists is rejected:DataDirHostPath is immutable. The docs say that transition rules never apply to create operations Source 25সোর্স 25. The first dry run of the same file was a create, and this one is an update of the existing object.
14. Look at the containerd inside the node, and delete the cluster. Run:
export KUBECONFIG="$PWD/kubeconfig"
docker exec qa-p7b-control-plane crictl --version
docker exec qa-p7b-control-plane crictl ps | head -n 4
docker exec qa-p7b-control-plane grep -n SystemdCgroup /etc/containerd/config.toml
docker exec qa-p7b-control-plane grep -n cgroupDriver /var/lib/kubelet/config.yaml
docker exec qa-p7b-control-plane ctr namespaces ls
echo "containers in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io containers ls -q | wc -l)"
echo "images in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io images ls -q | wc -l)"
kind delete cluster --name qa-p7b 2>&1 | cut -c 1-120
docker ps -a --format '{{.Names}}' | grep -c 'qa-p7b' || trueOutput of the tutorial's run:
crictl version 1.36.0
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD NAMESPACE
30ce70637487d 4a83b15d3ecfe 5 seconds ago Running pause 0 2b2cad098b83c pending-demo default
b60bfa7818a73 520212b8b0fcd 7 seconds ago Running coredns 0 06a10517b855a coredns-559f6c778d-vbs4t kube-system
c553af4ac190a 520212b8b0fcd 7 seconds ago Running coredns 0 e75c0fa123244 coredns-559f6c778d-5r4h7 kube-system
24: SystemdCgroup = true
33: SystemdCgroup = true
15:cgroupDriver: systemd
NAME LABELS
k8s.io
containers in k8s.io: 20
images in k8s.io: 31
Deleting cluster "qa-p7b" ...
Deleted nodes: ["qa-p7b-control-plane"]
0- The step ran its commands in the node container with
docker exec. The kind docs say that you can get a list of images on a cluster node withdocker exec -it my-node-name crictl imagesSource 40সোর্স 40.crictlin the node is version 1.36.0. The Kubernetes docs say that you can usecrictlto inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22. crictl pslists containers with the pod and the Kubernetes namespace of each. The rows areRunning. One of them is the containerpauseof the Podpending-demofrom step 11.- In the node,
/etc/containerd/config.tomlhasSystemdCgroup = trueon two lines, and/var/lib/kubelet/config.yamlhascgroupDriver: systemd. These are the two settings that step 3 named. The docs say that it is critical that the kubelet and the container runtime use the same cgroup driver Source 21সোর্স 21. The tutorial did not check what the secondSystemdCgroupline belongs to. ctr namespaces lsin the node lists one namespace,k8s.io. In it,ctrcounted 20 containers and 31 images. The namespacedefault, whichctruses when you give none Source 9সোর্স 9, is not in the list.crictlanswered in the node, and the docs call it a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. In step 3, the CRI plugin of the tutorial's own daemon did not load.kind delete clusterdeleted the node container. The last command counts the containers whose name containsqa-p7b, and it printed 0.
15. Check a machine against the node prerequisites of Rook. Run:
lsblk -o TYPE | tail -n +2 | sort | uniq -c
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE
uname -r
modinfo -F filename rbd
grep -c '^rbd ' /proc/modules
pgrep -c systemd-udevdOutput of the tutorial's run:
2 disk
49 loop
3 part
NAME FSTYPE TYPE SIZE
nvme0n1 disk 238.5G
|-nvme0n1p1 vfat part 1G
`-nvme0n1p2 ext4 part 237.4G
nvme1n1 disk 238.5G
`-nvme1n1p1 ext4 part 238.5G
7.0.0-43-generic
/lib/modules/7.0.0-43-generic/kernel/drivers/block/rbd.ko.zst
0
1The Rook prerequisites page names lsblk -f to confirm whether the partitions or devices are formatted with filesystems Source 33সোর্স 33. The commands of this step are the tutorial's own. The second one prints the FSTYPE column, which the Rook page asks about in the second bullet below. They run on the machine of the tutorial, not in the kind cluster.
- The first command counts the devices by type: 2 disks, 49 loop devices, and 3 partitions. The second command,
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE, leaves out the loop devices. The-e7option is the tutorial's own choice. - The docs say that if the FSTYPE field is not empty, there is a filesystem on top of the corresponding device Source 33সোর্স 33. All three partitions of the two disks have one,
vfatorext4. By that rule, none of these devices is available to Rook. That reading is the tutorial's own. - The Rook troubleshooting docs say that if Rook determines that a device is not available (has existing partitions or a formatted filesystem), Rook will skip consuming the devices Source 38সোর্স 38.
- The kernel is 7.0.0-43-generic. The docs recommend a minimum kernel version of 4.17 if you create RWX volumes from CephFS Source 33সোর্স 33.
modinfo -F filename rbdprinted the file of the modulerbdfor this kernel, andgrep -c '^rbd ' /proc/modulesprinted 0. The module is available, and it is not loaded. The docs say that Ceph requires a Linux kernel built with the RBD module, and that you can test your nodes by runningmodprobe rbdSource 33সোর্স 33. The tutorial did not runmodprobe, because its run uses no root rights.pgrep -c systemd-udevdprinted 1. The tutorial takes that process to be the udev daemon of the machine. The docs say that a running udev daemon is required on all storage nodes Source 33সোর্স 33.
সহজ English
The tutorial ran steps 1 to 15 on 2026-11-20 at 00:52 (+06) on Linux 7.0.0-43-generic. The versions were containerd 2.4.2, runc 1.5.3, Helm v4.3.2, kind v0.33.0, kubectl v1.37.2 (client), Docker 29.10.0, Python 3.14.4, and bash 5.3.9. The node image of the kind cluster ran Kubernetes v1.37.0. The output on this page is from the tutorial's run. Each step ran in a subshell of the runner, in one new folder, with a new, empty HOME. The page shows the folder of the run as /work. The runner set CONTAINERD_ADDRESS once, to the socket of the tutorial's containerd, for all steps. The rootless page of the containerd docs sets the variable in the same way Source 14সোর্স 14. In your own terminal, run export CONTAINERD_ADDRESS="$PWD/containerd.sock" in each shell where you use ctr.
Steps 1 to 8 are about containerd. They run as a normal user. The tutorial's containerd has its own folders and sockets in the run folder. The machine has its own containerd, which runs as root. The dockerd of the machine was started with --containerd=/run/containerd/containerd.sock. The steps use only the sockets of the run folder. Steps 4, 6, and 8 fetch or pull docker.io/library/hello-world:latest from Docker Hub. Steps 9, 12, and 13 use the chart repository https://charts.rook.io/release. Steps 10 to 14 use a kind cluster named qa-p7b. The cluster was made from a node image that was already on the machine, and the runner stops if that image is missing. Step 14 deletes the cluster. kind made a Docker network named kind, and it was still there after the cluster was deleted. The runner removed it, because the run had added it and it held no container. After the run, the images, volumes, containers, and networks of Docker were the same as in the lists that the runner took before it. The run added nothing to the real home folder, and it changed no file of the real ~/.kube folder.
The choices that no source gives are the tutorial's own. They are the configuration of containerd, the namespaces qa, qa2, and qa3, the cluster name, the namespace rook-ceph, the Pod pending-demo with its label disktype=nvme, and the changes that step 13 makes to the CephCluster file. The tutorial did not run a container with containerd (ctr run), and it did not set up a user namespace. It did not run the Rook operator, Ceph daemons, the Rook toolbox, or any ceph command. The cluster has no operator, and every partition of the two disks of the machine has a filesystem (step 15). It did not run modprobe rbd, because the tutorial's run uses no root rights. It ran on Linux only.
Install the tools. The containerd docs say that the containerd.io packages in DEB and RPM formats are distributed by Docker, not by the containerd project Source 8সোর্স 8. They say that the containerd.io package contains runc too, but does not contain CNI plugins Source 8সোর্স 8. On the tutorial's machine, dpkg -S named the package containerd.io for each of containerd, ctr, and runc. Its version was 2.4.2-4~ubuntu.26.04~resolute. The package was on the machine before the tutorial. The tutorial did not install it and did not check how it was built.
Helm v4.3.2 is the one that CNCF Projects: Build and Deliver installed. That page says that the install script checked the SHA-256 of the archive and a GnuPG signature. kind v0.33.0 and kubectl v1.37.2 are the ones that Kubernetes Basics used. That page says that the tutorial used the release binaries of both, and checked them against their SHA-256 checksums. The Rook charts come from https://charts.rook.io/release. The tutorial did not check a provenance file for them. The helm template commands have no --version option, so the tutorial did not pin a chart version. The image hello-world:latest is not pinned by a digest either. All of this is the tutorial's own choice.
1. Check the tools. Run:
containerd --version
ctr --version
runc --version | head -n 1
helm version --short
kind version
kubectl version --client
docker --versionOutput of the tutorial's run:
containerd containerd v2.4.2 b7a25261e029d68978bbf290df0a62fc819b3c51
ctr containerd v2.4.2
runc version 1.5.3
v4.3.2+g8346aaa
kind v0.33.0 go1.26.7 linux/amd64
Client Version: v1.37.2
Kustomize Version: v5.8.1
Docker version 29.10.0, build fdd4b8econtainerd --versionprinted version 2.4.2, andctr --versionprinted the same version.runc --versionprinted 1.5.3.- Helm printed v4.3.2,
kind versionprinted v0.33.0,kubectl version --clientprinted v1.37.2, and Docker printed 29.10.0. - These commands only print versions.
2. Start containerd as a normal user. Run this in the folder of the practice. It writes config.toml, starts the daemon in the background, waits for its socket, and asks it for its version:
mkdir -p root state tmp
cat > config.toml <<EOF
version = 4
root = '$PWD/root'
state = '$PWD/state'
temp = '$PWD/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '$PWD/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '$PWD/containerd.sock.ttrpc'
EOF
cat config.toml
containerd --config config.toml > containerd.log 2>&1 &
echo $! > containerd.pid
until [ -S containerd.sock ]; do sleep 0.5; done; sleep 1
grep 'successfully booted' containerd.log | cut -c 1-120
ctr versionOutput of the tutorial's run:
version = 4
root = '/work/root'
state = '/work/state'
temp = '/work/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '/work/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '/work/containerd.sock.ttrpc'
time="2026-11-20T00:52:11.214369404+06:00" level=info msg="containerd successfully booted in 0.016455s"
Client:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
Go version: go1.27.4
Server:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
UUID: 304faeb0-089a-4f2d-a1d1-08c7b43fd73e- The configuration sets
root,state, andtemp, and the addresses of two sockets, all inside the run folder. These are the tutorial's own choices. The docs say that you need to provide aconfig.tomlwith your own path configuration Source 14সোর্স 14. - The file starts with
version = 4, which is the version thatcontainerd config defaultprinted in step 3. - The log line says that containerd booted.
ctr versionprinted a client block and a server block. Both show version 2.4.2 and the same revision. The server block is the answer of the daemon atCONTAINERD_ADDRESS, which is the socket in the run folder.- The tutorial's daemon is a separate process from the containerd of the machine. Before the run, the list of processes had one
/usr/bin/containerd, owned byroot, and no process with acontainerd --configoption.
3. Read the plugins and the defaults. Run:
ctr plugins ls | awk 'NR > 1 { n[$NF]++ } END { for (s in n) print s, n[s] }' | sort
ctr plugins ls | awk 'NR == 1 || $NF != "ok"'
grep 'failed to load plugin' containerd.log | cut -c 1-330
containerd config default | grep -n -E "^version|snapshotter = 'overlayfs'|sandbox = |default_runtime_name|runtime_type = 'io.containerd.runc|SystemdCgroup"Output of the tutorial's run:
error 1
ok 56
skip 11
TYPE ID PLATFORMS STATUS
io.containerd.snapshotter.v1 blockfile linux/amd64 skip
io.containerd.snapshotter.v1 btrfs linux/amd64 skip
io.containerd.snapshotter.v1 devmapper linux/amd64 skip
io.containerd.snapshotter.v1 zfs linux/amd64 skip
io.containerd.snapshotter.v1 erofs linux/amd64 skip
io.containerd.server.v1 metrics - skip
io.containerd.tracing.processor.v1 otlp - skip
io.containerd.internal.v1 tracing - skip
io.containerd.differ.v1 erofs - skip
io.containerd.grpc.v1 cri - error
io.containerd.server.v1 grpc-tcp - skip
io.containerd.server.v1 debug - skip
time="2026-11-20T00:52:11.210771850+06:00" level=warning msg="failed to load plugin" error="failed to create CRI service: failed to create cni conf monitor for default: failed to create the parent of the cni conf dir=/etc/cni: mkdir /etc/cni: permission denied" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
1:version = 4
17: snapshotter = 'overlayfs'
28: sandbox = 'registry.k8s.io/pause:3.10.2'
59: default_runtime_name = 'runc'
65: runtime_type = 'io.containerd.runc.v2'
89: SystemdCgroup = falsectr plugins lslisted 68 plugins: 56 with the statusok, 11 withskip, and 1 witherror. The docs say that you can see all the plugins in the output, also those that did not load successfully Source 10সোর্স 10.- The 11
skiprows are five snapshotters (blockfile,btrfs,devmapper,zfs, anderofs), themetricsserver, theotlptracing processor,tracing, theerofsdiffer,grpc-tcp, anddebug. The tutorial did not look into why each one was skipped. - The one
errorrow is thecriplugin. The log says that it failed to create the CNI configuration monitor, and the log text ends withmkdir /etc/cni: permission denied. Thecriplugin is the part of containerd that handles all CRI requests of the kubelet Source 15সোর্স 15. In this run, it did not load. The tutorial did not point a kubelet at this daemon. containerd config defaultprinted the defaults of this version. They are theoverlayfssnapshotter, the sandbox imageregistry.k8s.io/pause:3.10.2, the default runtime namerunc, the runtime typeio.containerd.runc.v2, andSystemdCgroup = false.- To use the systemd cgroup driver with runc, the Kubernetes docs say to set
SystemdCgroup = trueSource 21সোর্স 21. They say that it is critical that the kubelet and the container runtime use the same cgroup driver Source 21সোর্স 21. Step 14 reads both settings in the node of a kind cluster.
4. Fetch an image into the content store. Run:
ctr -n qa content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ctr -n qa content ls -q | wc -l
ctr -n qa images lsOutput of the tutorial's run:
elapsed: 5.2 s total: 37.1 K (7.1 KiB/s)
42
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.io/library/hello-world:latest application/vnd.oci.image.index.v1+json sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa 14.7 KiB linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x,windows/amd64 - - The first command fetched
docker.io/library/hello-world:latestinto the namespaceqa. Its last progress line is the first line of the output. The tutorial usedctr content fetchhere, and step 8 usesctr images pullfor the same image. - The content store of the namespace
qalisted 42 blobs after the fetch. ctr -n qa images lslisted one image with the media typeapplication/vnd.oci.image.index.v1+json, the digestsha256:1e4c05b8…, and 10 platforms, fromlinux/386towindows/amd64. The OCI spec says that an image index contains a list of manifests for specific platforms Source 19সোর্স 19.- The reference ends in
:latest, which is a tag, and the tutorial did not pin a digest. The digests on this page are the ones of the tutorial's run.
5. Read the image, and check its digests. Run:
INDEX=$(ctr -n qa images ls | awk 'NR == 2 { print $3 }')
echo "index: $INDEX"
ctr -n qa content get "$INDEX" | python3 -c '
import json, sys
index = json.load(sys.stdin)
print("mediaType:", index["mediaType"])
print("manifests:", len(index["manifests"]))
amd64 = [m for m in index["manifests"] if m.get("platform", {}).get("architecture") == "amd64" and m["platform"]["os"] == "linux"]
print("linux/amd64 manifest:", amd64[0]["digest"])
open("amd64-manifest.txt", "w").write(amd64[0]["digest"])
'
MANIFEST=$(cat amd64-manifest.txt)
ctr -n qa content get "$MANIFEST" | python3 -c '
import json, sys
manifest = json.load(sys.stdin)
print("config:", manifest["config"]["digest"])
for layer in manifest["layers"]:
print("layer:", layer["digest"], layer["size"], "bytes,", layer["mediaType"])
open("config.txt", "w").write(manifest["config"]["digest"])
open("layer.txt", "w").write(manifest["layers"][0]["digest"])
'
BLOBS=root/io.containerd.content.v1.content/blobs/sha256
ok=0; bad=0
for f in "$BLOBS"/*; do
if [ "$(sha256sum "$f" | cut -d' ' -f1)" = "$(basename "$f")" ]; then ok=$((ok + 1)); else bad=$((bad + 1)); fi
done
echo "blob files: $((ok + bad)); name equals sha256 of the content: $ok; not equal: $bad"
LAYER=$(cat layer.txt); HEX=${LAYER#sha256:}
echo "DiffID in the config: $(ctr -n qa content get "$(cat config.txt)" | python3 -c 'import json, sys; print(json.load(sys.stdin)["rootfs"]["diff_ids"][0])')"
echo "sha256 of the layer after gunzip: sha256:$(gunzip < "$BLOBS/$HEX" | sha256sum | cut -d' ' -f1)"Output of the tutorial's run:
index: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa
mediaType: application/vnd.oci.image.index.v1+json
manifests: 20
linux/amd64 manifest: sha256:d1a8d0a4eeb63aff09f5f34d4d80505e0ba81905f36158cc3970d8e07179e59e
config: sha256:e2ac70e7319a02c5a477f5825259bd118b94e8b02c279c67afa63adab6d8685b
layer: sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4 2415 bytes, application/vnd.oci.image.layer.v1.tar+gzip
blob files: 42; name equals sha256 of the content: 42; not equal: 0
DiffID in the config: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4
sha256 of the layer after gunzip: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4- The index has the media type
application/vnd.oci.image.index.v1+json, and it lists 20 manifests. The step picks the manifest forlinux/amd64from that list. The content-flow doc describes this choice: if the descriptor is an index, find the platform in it, and use that hash to retrieve the manifest Source 12সোর্স 12. - The manifest
sha256:d1a8d0a4…has one config and one layer. The layer isapplication/vnd.oci.image.layer.v1.tar+gzip, 2415 bytes. The OCI spec says that an image manifest provides a configuration and a set of layers for a single container image Source 18সোর্স 18. - The loop looked at every file of the content store. There are 42 files, and the name of each one is the SHA-256 of its content. The docs say that each component is stored in a file whose name is the hash of it Source 12সোর্স 12. The loop is the tutorial's own check of that statement.
- The
DiffIDin the config of the image issha256:897b3f2a…, and the SHA-256 of the layer aftergunzipis the same. The OCI spec says that a layer DiffID is the digest over the layer's uncompressed tar archive Source 17সোর্স 17. The content-flow doc says that you can get the hash of a layer when uncompressed withcat <file> | gunzip - | sha256sum -Source 12সোর্স 12. - The name of the layer file is
4f55086f…, which is another value. The spec says not to confuse DiffIDs with layer digests, which are often referenced in the manifest Source 17সোর্স 17. The loop shows that this name is the SHA-256 of the file as it is stored, in its gzip form.
6. Use a second namespace. Run:
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa: $(ctr -n qa content ls -q | wc -l) blobs, $(ctr -n qa images ls -q | wc -l) images"
echo "other: $(ctr -n other content ls -q | wc -l) blobs, $(ctr -n other images ls -q | wc -l) images"
ctr -n qa2 content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa2: $(ctr -n qa2 content ls -q | wc -l) blobs, $(ctr -n qa2 images ls -q | wc -l) images"
ctr -n qa2 images rm docker.io/library/hello-world:latest
echo "qa2: $(ctr -n qa2 images ls -q | wc -l) images; qa: $(ctr -n qa images ls -q | wc -l) images"
ctr namespaces lsOutput of the tutorial's run:
42
qa: 42 blobs, 1 images
other: 0 blobs, 0 images
elapsed: 1.9 s total: 26.6 K (14.0 KiB/s)
42
qa2: 42 blobs, 1 images
docker.io/library/hello-world:latest
qa2: 0 images; qa: 1 images
NAME LABELS
qa
qa2 - Before the second fetch, the store held 42 files. The namespace
qalisted 42 blobs and 1 image. The namespaceother, which the tutorial never used, listed 0 blobs and 0 images. - The second fetch went into the namespace
qa2. - After the second fetch, the store still held 42 files, and
qa2listed 42 blobs and 1 image. The same 42 blobs were listed in two namespaces. The docs say that underlying image content is shared via content addresses, but image names and metadata are separate per namespace Source 9সোর্স 9. ctr -n qa2 images rmremoved the image name inqa2. Thenqa2listed 0 images, andqastill listed 1.ctr namespaces lslistedqaandqa2. It did not listother, which the tutorial only read from.
7. Remove the last name, and let the garbage collector run. Run:
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs; qa2: $(ctr -n qa2 content ls -q | wc -l) blobs"
ctr images rm --help | grep -e '--sync'
ctr -n qa images rm --sync docker.io/library/hello-world:latest
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs"Output of the tutorial's run:
files: 42; qa: 42 blobs; qa2: 42 blobs
--sync Synchronously remove image and all associated resources
docker.io/library/hello-world:latest
files: 0; qa: 0 blobs- Before the removal, the store held 42 files, and
qalisted 42 blobs. The first line also showsqa2, which had lost its image name in step 6. In this run it listed 42 blobs. The tutorial ran these steps more than once, and in one earlier run the same line printedqa2: 0 blobs. The tutorial did not find out why. The docs say that the garbage collector is scheduled on a background goroutine, and that it runs based on a number of configurable factors Source 13সোর্স 13. The tutorial did not check whether that is the reason. - The help text of
ctr images rmsays that--syncremoves the image and all associated resources synchronously. - After
ctr -n qa images rm --sync, the store held 0 files, andqalisted 0 blobs. Whileqahad its image name, the files stayed. When its name was gone, they were gone too. - The docs say that an OCI image has a manifest that references a config file and layer tars, that containerd stores them as generic blobs, and that the client sets up the relations with labels on the content Source 13সোর্স 13.
- The docs also say that a client may also request a garbage collection during resource removal Source 13সোর্স 13. They say that the service will not return until the garbage collection has completed Source 13সোর্স 13. They say that this is currently supported on removal of images and leases Source 13সোর্স 13. The tutorial reads
--syncas the way to ask for that, and that reading is its own. It did not run the command without--sync, so it does not know how long the files would have stayed.
8. Try the whole pull. Run:
ctr -n qa3 images pull docker.io/library/hello-world:latest > pull.txt 2>&1; echo "exit status: $?"
wc -l < pull.txt
tail -n 1 pull.txt | cut -c 1-800
echo "qa3: $(ctr -n qa3 images ls -q | wc -l) images, $(ctr -n qa3 snapshots ls | tail -n +2 | wc -l) snapshots, $(ctr -n qa3 content ls -q | wc -l) blobs"Output of the tutorial's run:
exit status: 1
2540
ctr: failed to extract layer (application/vnd.oci.image.layer.v1.tar+gzip sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4) to overlayfs as "extract-99128714-u-b8 sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4": failed to unmount /work/root/tmpmounts/containerd-mount1657078535: operation not permitted: failed to mount /work/root/tmpmounts/containerd-mount1657078535: mount source: "/work/root/io.containerd.snapshotter.v1.overlayfs/snapshots/1/fs", target: "/work/root/tmpmounts/containerd-mount1657078535", fstype: bind, flags: 20480, da
qa3: 0 images, 0 snapshots, 42 blobs- The command exited with status 1. The file
pull.txthas 2540 lines, and the step prints only the last one. That line is shorter than the 800 characters of thecutlimit, and it ends afterflags: 20480, da. The tutorial did not find out why the line stops there. - The message starts with
failed to extract layer. It names the layersha256:4f55086f…andoverlayfs. - Then it says
failed to unmounta folder under/work/root/tmpmounts, andoperation not permittedfollows. After that it saysfailed to mountthe foldersnapshots/1/fsof the overlayfs snapshotter, withfstype: bind. The tutorial did not find out which of the two calls was refused. - The content-flow doc says that the layers must be read and applied to a filesystem, which creates a committed snapshot, and that this process is known as unpacking Source 12সোর্স 12. The tutorial reads the message in this way: the fetch half worked, the unpack half failed, and
operation not permittedis the reason that the message gives. That reading is the tutorial's own. - The docs say that a non-root user can execute containerd by using user_namespaces(7) Source 14সোর্স 14. The tutorial did not set up a user namespace, so it did not try that route.
- After the failed pull, the namespace
qa3listed 0 images, 0 snapshots, and 42 blobs. The blobs of the pull were in the store, and no image name was recorded inqa3. - The tutorial ran no container. The docs say that a container can be created with the active snapshot as its root filesystem Source 12সোর্স 12, and this run made no snapshot.
9. Render the two Rook charts. Run:
helm repo add rook-release https://charts.rook.io/release
helm search repo rook-release/rook-ceph --versions | head -n 4
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph > operator.yaml
echo "operator chart: $(wc -c < operator.yaml) bytes"
grep '^kind:' operator.yaml | sort | uniq -c | sort -rn
grep -E '^ +image: ' operator.yaml | sort -u
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph > cluster.yaml
echo "cluster chart: $(wc -c < cluster.yaml) bytes"
grep '^kind:' cluster.yaml | sort | uniq -c | sort -rnOutput of the tutorial's run:
"rook-release" has been added to your repositories
NAME CHART VERSION APP VERSION DESCRIPTION
rook-release/rook-ceph 1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph v1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph 1.21.1 v1.21.1 File, Block, and Object Storage Services for yo...
operator chart: 2160311 bytes
27 kind: CustomResourceDefinition
24 kind: ClusterRole
10 kind: ServiceAccount
8 kind: RoleBinding
8 kind: ClusterRoleBinding
6 kind: Role
2 kind: Deployment
2 kind: ConfigMap
1 kind: NetworkPolicy
image: "docker.io/rook/ceph:v1.21.2"
image: quay.io/cephcsi/ceph-csi-operator:v1.1.0
cluster chart: 7867 bytes
3 kind: StorageClass
1 kind: CephObjectStore
1 kind: CephFilesystemSubVolumeGroup
1 kind: CephFilesystem
1 kind: CephCluster
1 kind: CephBlockPoolhelm repo addadded the repositoryrook-release.helm search repo --versionslisted the chartrook-ceph. The step prints the first three rows. Two rows are the chart version 1.21.2, written1.21.2andv1.21.2, both with the app versionv1.21.2. The third row is1.21.1, with the app versionv1.21.1. The order of the first two rows was not the same in two runs of the tutorial.- The
helm templatecommands have no--versionoption. The operator chart rendered the imagedocker.io/rook/ceph:v1.21.2. helm templaterenders chart templates locally and displays the output Source 39সোর্স 39. The run rendered both charts before any cluster existed.- The operator chart rendered to 2,160,311 bytes. The kinds are 27 CustomResourceDefinitions, 24 ClusterRoles, 10 ServiceAccounts, 8 RoleBindings, 8 ClusterRoleBindings, 6 Roles, 2 Deployments, 2 ConfigMaps, and 1 NetworkPolicy. Two container images appear:
docker.io/rook/ceph:v1.21.2andquay.io/cephcsi/ceph-csi-operator:v1.1.0. The docs say that the chart bootstraps a rook-ceph-operator deployment Source 34সোর্স 34. - The cluster chart rendered to 7,867 bytes. It has 1 CephCluster, 1 CephBlockPool, 1 CephFilesystem, 1 CephObjectStore, 1 CephFilesystemSubVolumeGroup, and 3 StorageClasses. The docs say that the default values create one block pool, one filesystem, and one object store, and their storage classes Source 35সোর্স 35. The render has those, and one more kind, the CephFilesystemSubVolumeGroup, that this docs sentence does not name.
- Both renders used
--namespace rook-ceph. The docs say that the clusters can be installed into the same namespace as the operator or a separate namespace Source 35সোর্স 35.
10. Make a kind cluster, and look at its node. Run:
export KUBECONFIG="$PWD/kubeconfig"
kind create cluster --name qa-p7b --image kindest/node@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 --wait 120s 2>&1 | grep -v -E '^ [•✓]|^$' | cut -c 1-120
kubectl get nodes -o wide
kubectl get pods -n kube-system -o wide | grep -E '^NAME|kube-scheduler|etcd|kube-apiserver'
kubectl get events -n kube-system --field-selector reason=Scheduled -o wide | cut -c 1-200Output of the tutorial's run:
Creating cluster "qa-p7b" ...
Set kubectl context to "kind-qa-p7b"
You can now use your cluster with:
kubectl cluster-info --context kind-qa-p7b
Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
qa-p7b-control-plane Ready control-plane 22s v1.37.0 172.23.0.2 <none> Debian GNU/Linux 13 (trixie) 7.0.0-43-generic (amd64) containerd://2.3.4
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
etcd-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-apiserver-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-scheduler-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
LAST SEEN TYPE REASON OBJECT SUBOBJECT SOURCE MESSAGE FIRST SEEN COUNT
1s Normal Scheduled pod/coredns-559f6c778d-5r4h7 default-scheduler Successfully assigned kube-system/coredns-559f6c778d-5r4h7 to qa-p7b-control-plane 1s 1
1s Normal Scheduled pod/coredns-559f6c778d-vbs4t default-scheduler Successfully assigned kube-system/coredns-559f6c778d-vbs4t to qa-p7b-control-plane 1s 1
12s Normal Scheduled pod/kindnet-4l64d default-scheduler Successfully assigned kube-system/kindnet-4l64d to qa-p7b-control-plane 12s 1
12s Normal Scheduled pod/kube-proxy-xjtmr default-scheduler Successfully assigned kube-system/kube-proxy-xjtmr to qa-p7b-control-plane 12s 1 - kind runs a local Kubernetes cluster by using Docker containers as nodes Source 40সোর্স 40. The kind docs show
kind create cluster --image=...for another node image Source 40সোর্স 40. The step gives the node image by its digest. It is a Kubernetes v1.37.0 image that was already on the machine. The image list of Docker was the same after the run as before it. - The node is
qa-p7b-control-plane. Its status isReady, its version is v1.37.0, and its container runtime iscontainerd://2.3.4. That is containerd 2.3.4, and the containerd of the machine is 2.4.2. The Kubernetes docs say that Kubernetes 1.37 requires a runtime that conforms with the Container Runtime Interface (CRI) Source 21সোর্স 21. - The control-plane pods
etcd,kube-apiserver, andkube-schedulerrun inkube-system, and all three areRunning. kube-scheduler is the default scheduler, and it runs as part of the control plane Source 23সোর্স 23. - The
Scheduledevents ofkube-systemcame fromdefault-scheduler. Each saysSuccessfully assigned kube-system/<pod> to qa-p7b-control-plane, and there are 4 of them. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. The cluster has one node.
11. Make a Pod that no node matches. Run:
export KUBECONFIG="$PWD/kubeconfig"
cat > pending-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: pending-demo
spec:
nodeSelector:
disktype: nvme
containers:
- name: pause
image: registry.k8s.io/pause:3.10.2
EOF
kubectl apply -f pending-pod.yaml
for i in $(seq 1 30); do [ -n "$(kubectl get events --field-selector reason=FailedScheduling -o name)" ] && break; sleep 1; done
kubectl get pod pending-demo -o jsonpath='{.status.phase}{"\n"}'
kubectl get pod pending-demo -o jsonpath='{.status.conditions[?(@.type=="PodScheduled")].reason}{"\n"}'
kubectl get events --field-selector reason=FailedScheduling -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300
kubectl label node qa-p7b-control-plane disktype=nvme
kubectl wait --for=condition=PodScheduled pod/pending-demo --timeout=60s
kubectl get pod pending-demo -o jsonpath='{.spec.nodeName}{"\n"}'
kubectl get events --field-selector involvedObject.name=pending-demo,reason=Scheduled -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300Output of the tutorial's run:
pod/pending-demo created
Pending
Unschedulable
REASON SOURCE MESSAGE
FailedScheduling default-scheduler 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
node/qa-p7b-control-plane labeled
pod/pending-demo condition met
qa-p7b-control-plane
REASON SOURCE MESSAGE
Scheduled default-scheduler Successfully assigned default/pending-demo to qa-p7b-control-plane- The Pod
pending-demohas anodeSelectorofdisktype: nvme. The docs say that nodeSelector is the simplest recommended form of node selection constraint Source 41সোর্স 41. They say that Kubernetes only schedules the Pod onto nodes that have each of the labels you specify Source 41সোর্স 41. - The node had no such label. The Pod stayed
Pending, and itsPodScheduledcondition had the reasonUnschedulable. The docs say that if none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. - The event
FailedSchedulingcame fromdefault-scheduler. Its message says0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector.After that it sayspreemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.The tutorial did not look into the words about preemption. kubectl label nodeadded the labeldisktype=nvmeto the node. The docs say that nodes have labels, and that you can attach labels manually Source 41সোর্স 41.kubectl wait --for=condition=PodScheduledprintedcondition met. The node of the Pod was thenqa-p7b-control-plane. The eventScheduledfromdefault-schedulersaysSuccessfully assigned default/pending-demo to qa-p7b-control-plane. The same Pod was scheduled after the label was added, and the tutorial did not restart anything.- The scheduler notifies the API server about its decision in a process called binding Source 23সোর্স 23.
- The Pod uses the image
registry.k8s.io/pause:3.10.2. This is the tutorial's own choice. In step 14,crictl pslists the containerpauseof this Pod asRunning.
12. Install only the CRDs, and ask the API about them. Run:
export KUBECONFIG="$PWD/kubeconfig"
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph --show-only templates/resources.yaml > crds.yaml
grep -c '^kind: CustomResourceDefinition' crds.yaml
kubectl apply --server-side -f crds.yaml | tail -n 2
kubectl wait --for=condition=Established crd/cephclusters.ceph.rook.io --timeout=60s
kubectl get crd -o name | grep -c 'ceph.rook.io'
kubectl api-resources --api-group=ceph.rook.io | grep -E '^NAME|^cephclusters '
kubectl explain cephcluster.spec.mon.count
kubectl get crd cephclusters.ceph.rook.io -o json | python3 -c '
import json, sys
spec = json.load(sys.stdin)["spec"]["versions"][0]["schema"]["openAPIV3Schema"]["properties"]["spec"]["properties"]
print("mon.count:", json.dumps(spec["mon"]["properties"]["count"]))
print("mon rule:", json.dumps(spec["mon"]["x-kubernetes-validations"][0]))
print("dataDirHostPath rule:", json.dumps(spec["dataDirHostPath"]["x-kubernetes-validations"][0]))
'Output of the tutorial's run:
21
customresourcedefinition.apiextensions.k8s.io/objectbucketclaims.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/objectbuckets.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/cephclusters.ceph.rook.io condition met
19
NAME SHORTNAMES APIVERSION NAMESPACED KIND
cephclusters ceph ceph.rook.io/v1 true CephCluster
GROUP: ceph.rook.io
KIND: CephCluster
VERSION: v1
FIELD: count <integer>
DESCRIPTION:
Count is the number of Ceph monitors
mon.count: {"description": "Count is the number of Ceph monitors", "maximum": 9, "minimum": 0, "type": "integer"}
mon rule: {"message": "zones must be less than or equal to count", "rule": "!has(self.zones) || (has(self.zones) && (size(self.zones) <= self.count))"}
dataDirHostPath rule: {"message": "DataDirHostPath is immutable", "rule": "self == oldSelf"}helm template --show-only templates/resources.yamlshows only the manifests that this template renders Source 39সোর্স 39. The filecrds.yamlhas 21 CRDs. The tutorial applied only this file. It applied no operator, no RBAC, and no other file of the Rook quickstart.kubectl apply --server-sidemakes the apply run in the server instead of the client Source 27সোর্স 27. The step prints only the last two lines of the apply, withtail -n 2. Both sayserverside-applied.kubectl wait --for=condition=Establishedprintedcondition metforcephclusters.ceph.rook.io. The docs say that the command waits until the specified condition is seen in the Status field of every given resource Source 29সোর্স 29.- 19 CRD names contain
ceph.rook.io.kubectl api-resourcesshowscephclusterswith the short nameceph, the versionceph.rook.io/v1, andNAMESPACED true. The Kubernetes docs say that once a custom resource is installed, users can create and access its objects using kubectl, just as for built-in resources like Pods Source 24সোর্স 24. kubectl explain cephcluster.spec.mon.countprintedcount <integer>andCount is the number of Ceph monitors. The docs say thatkubectl explaindescribes the fields of each supported API resource Source 28সোর্স 28. This text gives no range. The Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36.- The last three lines come from the CRD itself, read by the Python script. The schema of
mon.countis an integer with"minimum": 0and"maximum": 9. The fieldmonhas a validation rule with the messagezones must be less than or equal to count. The fielddataDirHostPathhas the ruleself == oldSelfwith the messageDataDirHostPath is immutable. Thex-kubernetes-validationsextension can be used to validate custom resources with Common Expression Language (CEL) expressions Source 25সোর্স 25. A rule that refers tooldSelfis a transition rule Source 25সোর্স 25.
13. Check custom resources against the schema. Run:
export KUBECONFIG="$PWD/kubeconfig"
kubectl create namespace rook-ceph
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph --show-only templates/cephcluster.yaml > cephcluster.yaml
kubectl apply --dry-run=server -f cephcluster.yaml
sed 's/^ count: 3$/ count: "three"/' cephcluster.yaml > bad-type.yaml
kubectl apply --dry-run=server -f bad-type.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 10/' cephcluster.yaml > bad-range.yaml
kubectl apply --dry-run=server -f bad-range.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 0/' cephcluster.yaml > zero.yaml
kubectl apply --dry-run=server -f zero.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 3\n notAField: 1/' cephcluster.yaml > bad-field.yaml
kubectl apply --dry-run=server -f bad-field.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 1\n zones:\n - name: a\n - name: b/' cephcluster.yaml > bad-zones.yaml
kubectl apply --dry-run=server -f bad-zones.yaml 2>&1 | cut -c 1-300
sed 's#^ dataDirHostPath: /var/lib/rook$# dataDirHostPath: /var/lib/rook2#' cephcluster.yaml > moved.yaml
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300
kubectl apply -f cephcluster.yaml
kubectl -n rook-ceph get cephcluster
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300Output of the tutorial's run:
namespace/rook-ceph created
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
The CephCluster "rook-ceph" is invalid:
* spec.mon.count: Invalid value: "string": spec.mon.count in body must be of type integer: "string"
* <nil>: Invalid value: null: some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
The CephCluster "rook-ceph" is invalid: spec.mon.count: Invalid value: 10: spec.mon.count in body should be less than or equal to 9
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
Error from server (BadRequest): error when creating "bad-field.yaml": CephCluster in version "v1" cannot be handled as a CephCluster: strict decoding error: unknown field "spec.mon.notAField"
The CephCluster "rook-ceph" is invalid: spec.mon: Invalid value: zones must be less than or equal to count
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
cephcluster.ceph.rook.io/rook-ceph created
NAME DATADIRHOSTPATH MONCOUNT AGE PHASE MESSAGE HEALTH EXTERNAL FSID
rook-ceph /var/lib/rook 3 0s
The CephCluster "rook-ceph" is invalid: spec.dataDirHostPath: Invalid value: "/var/lib/rook2": DataDirHostPath is immutableThe step creates the namespace rook-ceph, and renders the CephCluster of the cluster chart into cephcluster.yaml. The other files are edits of that file with sed, and they are the tutorial's own. Each --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. The step did not set --validate. Here is what the run showed, in the order of the output:
- The file of the chart is accepted:
created (server dry run). count: "three"is rejected:spec.mon.count in body must be of type integer. A second message says that some validation rules were not checked, because the object was invalid, and to correct the existing errors to complete validation.count: 10is rejected, and the message ends withless than or equal to 9. That is the"maximum": 9of step 12.count: 0is accepted. The CRD has"minimum": 0, and the Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36. The tutorial did not run the operator, so it does not know what the operator does with 0.notAFieldundermonis rejected withstrict decoding error: unknown field "spec.mon.notAField". The--validateflag ofkubectl applydefaults to strict Source 27সোর্স 27. The docs say that "true" or "strict" use a schema to validate the input and fail the request if it is invalid Source 27সোর্স 27.count: 1with two zones is rejected by the validation rule, with the messagezones must be less than or equal to count.moved.yamlis the file of the chart withdataDirHostPath: /var/lib/rook2. Before the object exists, its dry run is accepted:created (server dry run).kubectl applyof the file of the chart, without--dry-run, printedcreated.kubectl get cephclustershows the columnsDATADIRHOSTPATH,MONCOUNT,AGE,PHASE,MESSAGE,HEALTH,EXTERNAL, andFSID. The docs say that the API server decides which columnskubectl getshows, and that a CRD can customize them Source 25সোর্স 25. In the run,PHASE,MESSAGE,HEALTH,EXTERNAL, andFSIDare empty, and no operator ran in the cluster.- The dry run of
moved.yamlafter the object exists is rejected:DataDirHostPath is immutable. The docs say that transition rules never apply to create operations Source 25সোর্স 25. The first dry run of the same file was a create, and this one is an update of the existing object.
14. Look at the containerd inside the node, and delete the cluster. Run:
export KUBECONFIG="$PWD/kubeconfig"
docker exec qa-p7b-control-plane crictl --version
docker exec qa-p7b-control-plane crictl ps | head -n 4
docker exec qa-p7b-control-plane grep -n SystemdCgroup /etc/containerd/config.toml
docker exec qa-p7b-control-plane grep -n cgroupDriver /var/lib/kubelet/config.yaml
docker exec qa-p7b-control-plane ctr namespaces ls
echo "containers in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io containers ls -q | wc -l)"
echo "images in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io images ls -q | wc -l)"
kind delete cluster --name qa-p7b 2>&1 | cut -c 1-120
docker ps -a --format '{{.Names}}' | grep -c 'qa-p7b' || trueOutput of the tutorial's run:
crictl version 1.36.0
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD NAMESPACE
30ce70637487d 4a83b15d3ecfe 5 seconds ago Running pause 0 2b2cad098b83c pending-demo default
b60bfa7818a73 520212b8b0fcd 7 seconds ago Running coredns 0 06a10517b855a coredns-559f6c778d-vbs4t kube-system
c553af4ac190a 520212b8b0fcd 7 seconds ago Running coredns 0 e75c0fa123244 coredns-559f6c778d-5r4h7 kube-system
24: SystemdCgroup = true
33: SystemdCgroup = true
15:cgroupDriver: systemd
NAME LABELS
k8s.io
containers in k8s.io: 20
images in k8s.io: 31
Deleting cluster "qa-p7b" ...
Deleted nodes: ["qa-p7b-control-plane"]
0- The step ran its commands in the node container with
docker exec. The kind docs say that you can get a list of images on a cluster node withdocker exec -it my-node-name crictl imagesSource 40সোর্স 40.crictlin the node is version 1.36.0. The Kubernetes docs say that you can usecrictlto inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22. crictl pslists containers with the pod and the Kubernetes namespace of each. The rows areRunning. One of them is the containerpauseof the Podpending-demofrom step 11.- In the node,
/etc/containerd/config.tomlhasSystemdCgroup = trueon two lines, and/var/lib/kubelet/config.yamlhascgroupDriver: systemd. These are the two settings that step 3 named. The docs say that it is critical that the kubelet and the container runtime use the same cgroup driver Source 21সোর্স 21. The tutorial did not check what the secondSystemdCgroupline belongs to. ctr namespaces lsin the node lists one namespace,k8s.io. In it,ctrcounted 20 containers and 31 images. The namespacedefault, whichctruses when you give none Source 9সোর্স 9, is not in the list.crictlanswered in the node, and the docs call it a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. In step 3, the CRI plugin of the tutorial's own daemon did not load.kind delete clusterdeleted the node container. The last command counts the containers whose name containsqa-p7b, and it printed 0.
15. Check a machine against the node prerequisites of Rook. Run:
lsblk -o TYPE | tail -n +2 | sort | uniq -c
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE
uname -r
modinfo -F filename rbd
grep -c '^rbd ' /proc/modules
pgrep -c systemd-udevdOutput of the tutorial's run:
2 disk
49 loop
3 part
NAME FSTYPE TYPE SIZE
nvme0n1 disk 238.5G
|-nvme0n1p1 vfat part 1G
`-nvme0n1p2 ext4 part 237.4G
nvme1n1 disk 238.5G
`-nvme1n1p1 ext4 part 238.5G
7.0.0-43-generic
/lib/modules/7.0.0-43-generic/kernel/drivers/block/rbd.ko.zst
0
1The Rook prerequisites page names lsblk -f to confirm whether the partitions or devices are formatted with filesystems Source 33সোর্স 33. The commands of this step are the tutorial's own. The second one prints the FSTYPE column, which the Rook page asks about in the second bullet below. They run on the machine of the tutorial, not in the kind cluster.
- The first command counts the devices by type: 2 disks, 49 loop devices, and 3 partitions. The second command,
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE, leaves out the loop devices. The-e7option is the tutorial's own choice. - The docs say that if the FSTYPE field is not empty, there is a filesystem on top of the corresponding device Source 33সোর্স 33. All three partitions of the two disks have one,
vfatorext4. By that rule, none of these devices is available to Rook. That reading is the tutorial's own. - The Rook troubleshooting docs say that if Rook determines that a device is not available (has existing partitions or a formatted filesystem), Rook will skip consuming the devices Source 38সোর্স 38.
- The kernel is 7.0.0-43-generic. The docs recommend a minimum kernel version of 4.17 if you create RWX volumes from CephFS Source 33সোর্স 33.
modinfo -F filename rbdprinted the file of the modulerbdfor this kernel, andgrep -c '^rbd ' /proc/modulesprinted 0. The module is available, and it is not loaded. The docs say that Ceph requires a Linux kernel built with the RBD module, and that you can test your nodes by runningmodprobe rbdSource 33সোর্স 33. The tutorial did not runmodprobe, because its run uses no root rights.pgrep -c systemd-udevdprinted 1. The tutorial takes that process to be the udev daemon of the machine. The docs say that a running udev daemon is required on all storage nodes Source 33সোর্স 33.
বাংলা ব্যাখ্যা
টিউটোরিয়াল ১ থেকে ১৫ নম্বর ধাপ চালিয়েছে 2026-11-20 তারিখে 00:52-এ (+06), Linux 7.0.0-43-generic-এ। সংস্করণগুলো ছিল containerd 2.4.2, runc 1.5.3, Helm v4.3.2, kind v0.33.0, kubectl v1.37.2 (client), Docker 29.10.0, Python 3.14.4 আর bash 5.3.9। kind cluster-এর node image চালিয়েছে Kubernetes v1.37.0। এই page-এর output টিউটোরিয়ালের run থেকে নেওয়া। প্রতিটা ধাপ চলেছে runner-এর একটা subshell-এ, একটা নতুন folder-এ, একটা নতুন, খালি HOME দিয়ে। page-এ run-এর folder দেখানো হয়েছে /work নামে। runner সব ধাপের জন্য একবারই CONTAINERD_ADDRESS-কে টিউটোরিয়ালের containerd-এর socket-এ ঠিক করেছে। containerd docs-এর rootless page একইভাবে variable-টা ঠিক করে Source 14সোর্স 14। আপনার নিজের terminal-এ যে shell-এ ctr ব্যবহার করবেন, সেখানে আগে export CONTAINERD_ADDRESS="$PWD/containerd.sock" চালান।
১ থেকে ৮ নম্বর ধাপ containerd নিয়ে। সেগুলো সাধারণ user হিসেবে চলে। টিউটোরিয়ালের containerd-এর নিজের folder আর socket আছে run folder-এ। machine-এর নিজের একটা containerd আছে, যা root হিসেবে চলে। machine-এর dockerd চালু হয়েছে --containerd=/run/containerd/containerd.sock দিয়ে। ধাপগুলো শুধু run folder-এর socket ব্যবহার করে। ৪, ৬ আর ৮ নম্বর ধাপ Docker Hub থেকে docker.io/library/hello-world:latest fetch বা pull করে। ৯, ১২ আর ১৩ নম্বর ধাপ chart repository https://charts.rook.io/release ব্যবহার করে। ১০ থেকে ১৪ নম্বর ধাপ qa-p7b নামের একটা kind cluster ব্যবহার করে। cluster বানানো হয়েছে machine-এ আগে থেকে থাকা একটা node image থেকে, আর image না থাকলে runner থেমে যায়। ১৪ নম্বর ধাপ cluster মুছে দেয়। kind kind নামের একটা Docker network বানিয়েছিল, আর cluster মোছার পরও সেটা ছিল। runner সেটা সরিয়েছে, কারণ run-ই সেটা যোগ করেছিল আর তাতে কোনো container ছিল না। run-এর পরে Docker-এর image, volume, container আর network ঠিক তেমনই ছিল, যেমন runner শুরুর আগে তালিকা করেছিল। run আসল home folder-এ কিছু যোগ করেনি, আর আসল ~/.kube folder-এর কোনো file বদলায়নি।
যে সিদ্ধান্ত কোনো source দেয় না, সেগুলো টিউটোরিয়ালের নিজের। সেগুলো হলো containerd-এর configuration, qa, qa2 আর qa3 namespace, cluster-এর নাম, rook-ceph namespace, disktype=nvme label-যুক্ত pending-demo Pod, আর ১৩ নম্বর ধাপ CephCluster file-এ যে পরিবর্তনগুলো করে। টিউটোরিয়াল containerd দিয়ে কোনো container চালায়নি (ctr run), আর কোনো user namespace সাজায়নি। সে Rook operator, Ceph daemon, Rook toolbox বা কোনো ceph command চালায়নি। cluster-এ কোনো operator নেই, আর machine-এর দুটো disk-এর প্রতিটা partition-এ filesystem আছে (১৫ নম্বর ধাপ)। সে modprobe rbd চালায়নি, কারণ টিউটোরিয়ালের run কোনো root অধিকার ব্যবহার করে না। সে শুধু Linux-এ চলেছে।
tool-গুলো install করুন। containerd docs বলে, DEB আর RPM format-এর containerd.io package Docker বিতরণ করে, containerd project নয় Source 8সোর্স 8। তারা বলে, containerd.io package-এ runc-ও আছে, কিন্তু CNI plugin নেই Source 8সোর্স 8। টিউটোরিয়ালের machine-এ dpkg -S containerd, ctr আর runc-এর প্রতিটার package হিসেবে containerd.io-এর নাম দিয়েছে। তার সংস্করণ ছিল 2.4.2-4~ubuntu.26.04~resolute। package-টা টিউটোরিয়ালের আগে থেকেই machine-এ ছিল। টিউটোরিয়াল সেটা install করেনি এবং কীভাবে বানানো তা যাচাই করেনি।
Helm v4.3.2 সেটাই, যেটা CNCF Projects: Build and Deliver install করেছিল। সেই page বলে, install script archive-এর SHA-256 আর একটা GnuPG signature যাচাই করেছিল। kind v0.33.0 আর kubectl v1.37.2 সেগুলোই, যেগুলো Kubernetes Basics ব্যবহার করেছিল। সেই page বলে, টিউটোরিয়াল দুটোরই release binary ব্যবহার করেছিল, আর তাদের SHA-256 checksum-এর সঙ্গে মিলিয়েছিল। Rook chart-গুলো এসেছে https://charts.rook.io/release থেকে। টিউটোরিয়াল সেগুলোর কোনো provenance file যাচাই করেনি। helm template command-গুলোতে --version option নেই, তাই টিউটোরিয়াল chart-এর সংস্করণ বেঁধে দেয়নি। hello-world:latest image-ও digest দিয়ে বাঁধা নয়। এর সবই টিউটোরিয়ালের নিজের সিদ্ধান্ত।
১. tool-গুলো দেখে নিন। চালান:
containerd --version
ctr --version
runc --version | head -n 1
helm version --short
kind version
kubectl version --client
docker --versionটিউটোরিয়ালের run-এর output:
containerd containerd v2.4.2 b7a25261e029d68978bbf290df0a62fc819b3c51
ctr containerd v2.4.2
runc version 1.5.3
v4.3.2+g8346aaa
kind v0.33.0 go1.26.7 linux/amd64
Client Version: v1.37.2
Kustomize Version: v5.8.1
Docker version 29.10.0, build fdd4b8econtainerd --versionছাপিয়েছে সংস্করণ 2.4.2, আরctr --versionএকই সংস্করণ ছাপিয়েছে।runc --versionছাপিয়েছে 1.5.3।- Helm ছাপিয়েছে v4.3.2,
kind versionছাপিয়েছে v0.33.0,kubectl version --clientছাপিয়েছে v1.37.2, আর Docker ছাপিয়েছে 29.10.0। - এই command-গুলো শুধু version ছাপে।
২. সাধারণ user হিসেবে containerd চালু করুন। এটা practice-এর folder-এ চালান। সে config.toml লেখে, daemon-কে background-এ চালু করে, তার socket-এর জন্য অপেক্ষা করে, আর তার version জিজ্ঞেস করে:
mkdir -p root state tmp
cat > config.toml <<EOF
version = 4
root = '$PWD/root'
state = '$PWD/state'
temp = '$PWD/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '$PWD/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '$PWD/containerd.sock.ttrpc'
EOF
cat config.toml
containerd --config config.toml > containerd.log 2>&1 &
echo $! > containerd.pid
until [ -S containerd.sock ]; do sleep 0.5; done; sleep 1
grep 'successfully booted' containerd.log | cut -c 1-120
ctr versionটিউটোরিয়ালের run-এর output:
version = 4
root = '/work/root'
state = '/work/state'
temp = '/work/tmp'
imports = []
[plugins]
[plugins.'io.containerd.server.v1.grpc']
address = '/work/containerd.sock'
[plugins.'io.containerd.server.v1.ttrpc']
address = '/work/containerd.sock.ttrpc'
time="2026-11-20T00:52:11.214369404+06:00" level=info msg="containerd successfully booted in 0.016455s"
Client:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
Go version: go1.27.4
Server:
Version: v2.4.2
Revision: b7a25261e029d68978bbf290df0a62fc819b3c51
UUID: 304faeb0-089a-4f2d-a1d1-08c7b43fd73e- configuration
root,stateআরtempঠিক করে, আর দুটো socket-এর address, সবই run folder-এর ভেতরে। এগুলো টিউটোরিয়ালের নিজের সিদ্ধান্ত। docs বলে, আপনাকে নিজের path-সহ একটাconfig.tomlদিতে হবে Source 14সোর্স 14। - file শুরু হয়েছে
version = 4দিয়ে, যা ৩ নম্বর ধাপেcontainerd config defaultছাপিয়েছে। - log-এর লাইন বলে containerd চালু হয়েছে।
ctr versionএকটা client block আর একটা server block ছাপিয়েছে। দুটোতেই সংস্করণ 2.4.2 আর revision একই। server block হলোCONTAINERD_ADDRESS-এর daemon-এর উত্তর, যা run folder-এর socket।- টিউটোরিয়ালের daemon machine-এর containerd থেকে আলাদা একটা process। run-এর আগে process-তালিকায় ছিল একটা
/usr/bin/containerd, যার মালিকroot, আরcontainerd --configoption-যুক্ত কোনো process ছিল না।
৩. plugin আর default পড়ুন। চালান:
ctr plugins ls | awk 'NR > 1 { n[$NF]++ } END { for (s in n) print s, n[s] }' | sort
ctr plugins ls | awk 'NR == 1 || $NF != "ok"'
grep 'failed to load plugin' containerd.log | cut -c 1-330
containerd config default | grep -n -E "^version|snapshotter = 'overlayfs'|sandbox = |default_runtime_name|runtime_type = 'io.containerd.runc|SystemdCgroup"টিউটোরিয়ালের run-এর output:
error 1
ok 56
skip 11
TYPE ID PLATFORMS STATUS
io.containerd.snapshotter.v1 blockfile linux/amd64 skip
io.containerd.snapshotter.v1 btrfs linux/amd64 skip
io.containerd.snapshotter.v1 devmapper linux/amd64 skip
io.containerd.snapshotter.v1 zfs linux/amd64 skip
io.containerd.snapshotter.v1 erofs linux/amd64 skip
io.containerd.server.v1 metrics - skip
io.containerd.tracing.processor.v1 otlp - skip
io.containerd.internal.v1 tracing - skip
io.containerd.differ.v1 erofs - skip
io.containerd.grpc.v1 cri - error
io.containerd.server.v1 grpc-tcp - skip
io.containerd.server.v1 debug - skip
time="2026-11-20T00:52:11.210771850+06:00" level=warning msg="failed to load plugin" error="failed to create CRI service: failed to create cni conf monitor for default: failed to create the parent of the cni conf dir=/etc/cni: mkdir /etc/cni: permission denied" id=io.containerd.grpc.v1.cri type=io.containerd.grpc.v1
1:version = 4
17: snapshotter = 'overlayfs'
28: sandbox = 'registry.k8s.io/pause:3.10.2'
59: default_runtime_name = 'runc'
65: runtime_type = 'io.containerd.runc.v2'
89: SystemdCgroup = falsectr plugins ls68টা plugin তালিকাভুক্ত করেছে: ৫৬টার statusok, ১১টারskip, আর ১টারerror। docs বলে, output-এ সব plugin দেখা যায়, যেগুলো সফলভাবে load হয়নি সেগুলোও Source 10সোর্স 10।- ১১টা
skipসারি হলো পাঁচটা snapshotter (blockfile,btrfs,devmapper,zfsআরerofs),metricsserver,otlptracing processor,tracing,erofsdiffer,grpc-tcpআরdebug। প্রতিটা কেন skip হয়েছে, টিউটোরিয়াল তা খুঁজে দেখেনি। - একমাত্র
errorসারি হলোcriplugin। log বলে, সে CNI configuration monitor বানাতে পারেনি, আর log-এর লেখা শেষ হয়েছেmkdir /etc/cni: permission deniedদিয়ে।criplugin হলো containerd-এর সেই অংশ, যা kubelet-এর সব CRI request সামলায় Source 15সোর্স 15। এই run-এ সে load হয়নি। টিউটোরিয়াল এই daemon-এর দিকে কোনো kubelet তাক করেনি। containerd config defaultএই সংস্করণের default ছাপিয়েছে। সেগুলো হলোoverlayfssnapshotter, sandbox imageregistry.k8s.io/pause:3.10.2, default runtime-এর নামrunc, runtime typeio.containerd.runc.v2আরSystemdCgroup = false।- runc-এর সঙ্গে systemd cgroup driver ব্যবহার করতে Kubernetes docs
SystemdCgroup = trueবসাতে বলে Source 21সোর্স 21। তারা বলে, kubelet আর container runtime একই cgroup driver ব্যবহার করবে, এটা অত্যন্ত জরুরি Source 21সোর্স 21। ১৪ নম্বর ধাপ একটা kind cluster-এর node-এ দুটো setting-ই পড়ে।
৪. একটা image content store-এ আনুন। চালান:
ctr -n qa content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ctr -n qa content ls -q | wc -l
ctr -n qa images lsটিউটোরিয়ালের run-এর output:
elapsed: 5.2 s total: 37.1 K (7.1 KiB/s)
42
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.io/library/hello-world:latest application/vnd.oci.image.index.v1+json sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa 14.7 KiB linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x,windows/amd64 - - প্রথম command
docker.io/library/hello-world:latest-কেqanamespace-এ fetch করেছে। তার শেষ progress লাইনটাই output-এর প্রথম লাইন। টিউটোরিয়াল এখানেctr content fetchব্যবহার করেছে, আর ৮ নম্বর ধাপ একই image-এর জন্যctr images pullব্যবহার করে। - fetch-এর পর
qanamespace-এর content store 42টা blob তালিকাভুক্ত করেছে। ctr -n qa images lsএকটা image তালিকাভুক্ত করেছে, যার media typeapplication/vnd.oci.image.index.v1+json, digestsha256:1e4c05b8…, আর 10টা platform,linux/386থেকেwindows/amd64পর্যন্ত। OCI spec বলে, একটা image index-এ নির্দিষ্ট platform-এর manifest-এর তালিকা থাকে Source 19সোর্স 19।- reference শেষ হয়েছে
:latestদিয়ে, যা একটা tag, আর টিউটোরিয়াল digest বেঁধে দেয়নি। এই page-এর digest-গুলো টিউটোরিয়ালের run-এর।
৫. image পড়ুন, আর তার digest যাচাই করুন। চালান:
INDEX=$(ctr -n qa images ls | awk 'NR == 2 { print $3 }')
echo "index: $INDEX"
ctr -n qa content get "$INDEX" | python3 -c '
import json, sys
index = json.load(sys.stdin)
print("mediaType:", index["mediaType"])
print("manifests:", len(index["manifests"]))
amd64 = [m for m in index["manifests"] if m.get("platform", {}).get("architecture") == "amd64" and m["platform"]["os"] == "linux"]
print("linux/amd64 manifest:", amd64[0]["digest"])
open("amd64-manifest.txt", "w").write(amd64[0]["digest"])
'
MANIFEST=$(cat amd64-manifest.txt)
ctr -n qa content get "$MANIFEST" | python3 -c '
import json, sys
manifest = json.load(sys.stdin)
print("config:", manifest["config"]["digest"])
for layer in manifest["layers"]:
print("layer:", layer["digest"], layer["size"], "bytes,", layer["mediaType"])
open("config.txt", "w").write(manifest["config"]["digest"])
open("layer.txt", "w").write(manifest["layers"][0]["digest"])
'
BLOBS=root/io.containerd.content.v1.content/blobs/sha256
ok=0; bad=0
for f in "$BLOBS"/*; do
if [ "$(sha256sum "$f" | cut -d' ' -f1)" = "$(basename "$f")" ]; then ok=$((ok + 1)); else bad=$((bad + 1)); fi
done
echo "blob files: $((ok + bad)); name equals sha256 of the content: $ok; not equal: $bad"
LAYER=$(cat layer.txt); HEX=${LAYER#sha256:}
echo "DiffID in the config: $(ctr -n qa content get "$(cat config.txt)" | python3 -c 'import json, sys; print(json.load(sys.stdin)["rootfs"]["diff_ids"][0])')"
echo "sha256 of the layer after gunzip: sha256:$(gunzip < "$BLOBS/$HEX" | sha256sum | cut -d' ' -f1)"টিউটোরিয়ালের run-এর output:
index: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa
mediaType: application/vnd.oci.image.index.v1+json
manifests: 20
linux/amd64 manifest: sha256:d1a8d0a4eeb63aff09f5f34d4d80505e0ba81905f36158cc3970d8e07179e59e
config: sha256:e2ac70e7319a02c5a477f5825259bd118b94e8b02c279c67afa63adab6d8685b
layer: sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4 2415 bytes, application/vnd.oci.image.layer.v1.tar+gzip
blob files: 42; name equals sha256 of the content: 42; not equal: 0
DiffID in the config: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4
sha256 of the layer after gunzip: sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4- index-এর media type
application/vnd.oci.image.index.v1+json, আর সে 20টা manifest তালিকাভুক্ত করে। ধাপটা সেই তালিকা থেকেlinux/amd64-এর manifest বেছে নেয়। content-flow doc এই বাছাই বর্ণনা করে: descriptor একটা index হলে তার ভেতরে platform খুঁজে সেই hash দিয়ে manifest আনুন Source 12সোর্স 12। - manifest
sha256:d1a8d0a4…-এ একটা config আর একটা layer আছে। layer-টাapplication/vnd.oci.image.layer.v1.tar+gzip, ২৪১৫ byte। OCI spec বলে, একটা image manifest একটা নির্দিষ্ট architecture আর operating system-এর একটা container image-এর জন্য একটা configuration আর একগুচ্ছ layer দেয় Source 18সোর্স 18। - loop content store-এর প্রতিটা file দেখেছে। file আছে 42টা, আর প্রতিটার নাম তার content-এর SHA-256। docs বলে, প্রতিটা অংশ এমন একটা file-এ থাকে, যার নাম তার hash Source 12সোর্স 12। loop এই কথার ওপর টিউটোরিয়ালের নিজের পরীক্ষা।
- image-এর config-এর
DiffIDহলোsha256:897b3f2a…, আরgunzip-এর পরের layer-এর SHA-256 একই। OCI spec বলে, একটা layer-এর DiffID হলো layer-এর uncompressed tar archive-এর digest Source 17সোর্স 17। content-flow doc বলে, একটা layer uncompressed অবস্থায় যে hash পায়, তা আপনিcat <file> | gunzip - | sha256sum -দিয়ে পেতে পারেন Source 12সোর্স 12। - layer file-এর নাম
4f55086f…, যা অন্য একটা মান। spec বলে, DiffID-কে layer digest-এর সঙ্গে গুলিয়ে ফেলা চলবে না, যেগুলো প্রায়ই manifest-এ উল্লেখ করা হয় Source 17সোর্স 17। loop দেখায়, এই নাম file-টা যেভাবে রাখা আছে, অর্থাৎ gzip রূপে, তার SHA-256।
৬. দ্বিতীয় একটা namespace ব্যবহার করুন। চালান:
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa: $(ctr -n qa content ls -q | wc -l) blobs, $(ctr -n qa images ls -q | wc -l) images"
echo "other: $(ctr -n other content ls -q | wc -l) blobs, $(ctr -n other images ls -q | wc -l) images"
ctr -n qa2 content fetch docker.io/library/hello-world:latest 2>&1 | tail -n 1
ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l
echo "qa2: $(ctr -n qa2 content ls -q | wc -l) blobs, $(ctr -n qa2 images ls -q | wc -l) images"
ctr -n qa2 images rm docker.io/library/hello-world:latest
echo "qa2: $(ctr -n qa2 images ls -q | wc -l) images; qa: $(ctr -n qa images ls -q | wc -l) images"
ctr namespaces lsটিউটোরিয়ালের run-এর output:
42
qa: 42 blobs, 1 images
other: 0 blobs, 0 images
elapsed: 1.9 s total: 26.6 K (14.0 KiB/s)
42
qa2: 42 blobs, 1 images
docker.io/library/hello-world:latest
qa2: 0 images; qa: 1 images
NAME LABELS
qa
qa2 - দ্বিতীয় fetch-এর আগে store-এ ছিল 42টা file।
qanamespace 42টা blob আর ১টা image তালিকাভুক্ত করেছে।othernamespace, যেটা টিউটোরিয়াল কখনও ব্যবহার করেনি, তালিকাভুক্ত করেছে ০টা blob আর ০টা image। - দ্বিতীয় fetch গেছে
qa2namespace-এ। - দ্বিতীয় fetch-এর পরও store-এ ছিল 42টা file, আর
qa2তালিকাভুক্ত করেছে 42টা blob আর ১টা image। একই 42টা blob দুটো namespace-এ তালিকাভুক্ত হয়েছে। docs বলে, image-এর ভেতরের content এখনও content address দিয়ে ভাগ করা থাকে, কিন্তু image-এর নাম আর metadata প্রতিটা namespace-এ আলাদা Source 9সোর্স 9। ctr -n qa2 images rmqa2-এর image-এর নাম সরিয়েছে। তারপরqa2তালিকাভুক্ত করেছে ০টা image, আরqaএখনও ১টা।ctr namespaces lsqaআরqa2তালিকাভুক্ত করেছে। সেotherতালিকাভুক্ত করেনি, যেখান থেকে টিউটোরিয়াল শুধু পড়েছে।
৭. শেষ নামটা সরান, আর garbage collector-কে চলতে দিন। চালান:
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs; qa2: $(ctr -n qa2 content ls -q | wc -l) blobs"
ctr images rm --help | grep -e '--sync'
ctr -n qa images rm --sync docker.io/library/hello-world:latest
echo "files: $(ls root/io.containerd.content.v1.content/blobs/sha256 | wc -l); qa: $(ctr -n qa content ls -q | wc -l) blobs"টিউটোরিয়ালের run-এর output:
files: 42; qa: 42 blobs; qa2: 42 blobs
--sync Synchronously remove image and all associated resources
docker.io/library/hello-world:latest
files: 0; qa: 0 blobs- সরানোর আগে store-এ ছিল 42টা file, আর
qaতালিকাভুক্ত করেছে 42টা blob। প্রথম লাইনেqa2-ও আছে, যে ৬ নম্বর ধাপে তার image-এর নাম হারিয়েছিল। এই run-এ সে তালিকাভুক্ত করেছে 42টা blob। টিউটোরিয়াল এই ধাপগুলো একাধিকবার চালিয়েছে, আর একটা আগের run-এ একই লাইন ছাপিয়েছিলqa2: 0 blobs। কেন, টিউটোরিয়াল তা খুঁজে দেখেনি। docs বলে, garbage collector একটা background goroutine-এ schedule হয়, আর কয়েকটা সাজানো যায় এমন বিষয়ের ওপর ভিত্তি করে চলে Source 13সোর্স 13। কারণটা সেটাই কি না, টিউটোরিয়াল তা পরীক্ষা করেনি। ctr images rm-এর help text বলে,--syncimage আর তার সঙ্গের সব resource একই সঙ্গে (synchronously) সরায়।ctr -n qa images rm --sync-এর পর store-এ ছিল ০টা file, আরqaতালিকাভুক্ত করেছে ০টা blob।qa-র image-এর নাম থাকা পর্যন্ত file-গুলো ছিল। নামটা চলে যাওয়ার পর file-গুলোও চলে গেছে।- docs বলে, একটা OCI image-এর একটা manifest থাকে, যা একটা config file আর layer tar-কে উল্লেখ করে, containerd সেগুলোকে সাধারণ blob হিসেবে রাখে, আর সম্পর্কগুলো client content-এর label দিয়ে সাজায় Source 13সোর্স 13।
- docs আরও বলে, একটা resource সরানোর সময় client একটা garbage collection-ও চাইতে পারে Source 13সোর্স 13। তারা বলে, garbage collection শেষ না হওয়া পর্যন্ত service ফেরে না Source 13সোর্স 13। তারা বলে, এটা এখন image আর lease সরানোর সময় সমর্থিত Source 13সোর্স 13। টিউটোরিয়াল
--sync-কে সেটা চাওয়ার উপায় হিসেবে পড়ে, আর সেই পড়া তার নিজের। সে--syncছাড়া command চালায়নি, তাই file-গুলো কত সময় থাকত তা সে জানে না।
৮. পুরো pull চেষ্টা করুন। চালান:
ctr -n qa3 images pull docker.io/library/hello-world:latest > pull.txt 2>&1; echo "exit status: $?"
wc -l < pull.txt
tail -n 1 pull.txt | cut -c 1-800
echo "qa3: $(ctr -n qa3 images ls -q | wc -l) images, $(ctr -n qa3 snapshots ls | tail -n +2 | wc -l) snapshots, $(ctr -n qa3 content ls -q | wc -l) blobs"টিউটোরিয়ালের run-এর output:
exit status: 1
2540
ctr: failed to extract layer (application/vnd.oci.image.layer.v1.tar+gzip sha256:4f55086f7dd096d48b0e49be066971a8ed996521c2e190aa21b2435a847198b4) to overlayfs as "extract-99128714-u-b8 sha256:897b3f2a7c1bc2f3d02432f7892fe31c6272c521ad4d70257df624504a3238b4": failed to unmount /work/root/tmpmounts/containerd-mount1657078535: operation not permitted: failed to mount /work/root/tmpmounts/containerd-mount1657078535: mount source: "/work/root/io.containerd.snapshotter.v1.overlayfs/snapshots/1/fs", target: "/work/root/tmpmounts/containerd-mount1657078535", fstype: bind, flags: 20480, da
qa3: 0 images, 0 snapshots, 42 blobs- command status ১ দিয়ে শেষ হয়েছে।
pull.txtfile-এ 2540টা লাইন আছে, আর ধাপটা শুধু শেষ লাইনটা ছাপে। সেই লাইনcut-এর ৮০০ অক্ষরের সীমার চেয়ে ছোট, আর সে শেষ হয়েছেflags: 20480, da-এর পরে। লাইনটা কেন সেখানে থামে, টিউটোরিয়াল তা খুঁজে দেখেনি। - message শুরু হয়েছে
failed to extract layerদিয়ে। সেsha256:4f55086f…layer আরoverlayfs-এর নাম বলে। - তারপর সে বলে
/work/root/tmpmounts-এর নিচের একটা folderfailed to unmount, আর তার পরে আসেoperation not permitted। তার পরে সে বলে overlayfs snapshotter-এরsnapshots/1/fsfolderfailed to mount,fstype: bindসহ। দুটো call-এর কোনটা প্রত্যাখ্যাত হয়েছে, টিউটোরিয়াল তা খুঁজে দেখেনি। - content-flow doc বলে, layer-গুলো পড়ে একটা filesystem-এ প্রয়োগ করতে হবে, যাতে একটা committed snapshot তৈরি হয়, আর এই প্রক্রিয়ার নাম unpacking Source 12সোর্স 12। টিউটোরিয়াল message-টা এভাবে পড়ে: fetch-এর অর্ধেক কাজ করেছে, unpack-এর অর্ধেক ব্যর্থ হয়েছে, আর message যে কারণ দেয় তা
operation not permitted। এই পড়া টিউটোরিয়ালের নিজের। - docs বলে, একজন non-root user user_namespaces(7) ব্যবহার করে containerd চালাতে পারে Source 14সোর্স 14। টিউটোরিয়াল কোনো user namespace সাজায়নি, তাই সেই পথ চেষ্টা করেনি।
- ব্যর্থ pull-এর পর
qa3namespace তালিকাভুক্ত করেছে ০টা image, ০টা snapshot আর 42টা blob। pull-এর blob-গুলো store-এ ছিল, আরqa3-তে কোনো image-এর নাম লেখা হয়নি। - টিউটোরিয়াল কোনো container চালায়নি। docs বলে, active snapshot-কে root filesystem করে একটা container তৈরি করা যায় Source 12সোর্স 12, আর এই run কোনো snapshot বানায়নি।
৯. Rook-এর দুটো chart render করুন। চালান:
helm repo add rook-release https://charts.rook.io/release
helm search repo rook-release/rook-ceph --versions | head -n 4
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph > operator.yaml
echo "operator chart: $(wc -c < operator.yaml) bytes"
grep '^kind:' operator.yaml | sort | uniq -c | sort -rn
grep -E '^ +image: ' operator.yaml | sort -u
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph > cluster.yaml
echo "cluster chart: $(wc -c < cluster.yaml) bytes"
grep '^kind:' cluster.yaml | sort | uniq -c | sort -rnটিউটোরিয়ালের run-এর output:
"rook-release" has been added to your repositories
NAME CHART VERSION APP VERSION DESCRIPTION
rook-release/rook-ceph 1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph v1.21.2 v1.21.2 File, Block, and Object Storage Services for yo...
rook-release/rook-ceph 1.21.1 v1.21.1 File, Block, and Object Storage Services for yo...
operator chart: 2160311 bytes
27 kind: CustomResourceDefinition
24 kind: ClusterRole
10 kind: ServiceAccount
8 kind: RoleBinding
8 kind: ClusterRoleBinding
6 kind: Role
2 kind: Deployment
2 kind: ConfigMap
1 kind: NetworkPolicy
image: "docker.io/rook/ceph:v1.21.2"
image: quay.io/cephcsi/ceph-csi-operator:v1.1.0
cluster chart: 7867 bytes
3 kind: StorageClass
1 kind: CephObjectStore
1 kind: CephFilesystemSubVolumeGroup
1 kind: CephFilesystem
1 kind: CephCluster
1 kind: CephBlockPoolhelm repo addrook-releaserepository যোগ করেছে।helm search repo --versionsrook-cephchart তালিকাভুক্ত করেছে। ধাপটা প্রথম তিনটা সারি ছাপে। দুটো সারি chart-এর সংস্করণ 1.21.2, লেখা1.21.2আরv1.21.2, দুটোরই app versionv1.21.2। তৃতীয় সারি1.21.1, app versionv1.21.1। টিউটোরিয়ালের দুটো run-এ প্রথম দুই সারির ক্রম একই ছিল না।helm templatecommand-গুলোতে--versionoption নেই। operator chart render করেছেdocker.io/rook/ceph:v1.21.2image।helm templatechart-এর template স্থানীয়ভাবে render করে আর output দেখায় Source 39সোর্স 39। run দুটো chart-ই render করেছে, কোনো cluster থাকার আগে।- operator chart render হয়েছে ২,১৬০,৩১১ byte-এ। kind-গুলো হলো ২৭টা CustomResourceDefinition, ২৪টা ClusterRole, ১০টা ServiceAccount, ৮টা RoleBinding, ৮টা ClusterRoleBinding, ৬টা Role, ২টা Deployment, ২টা ConfigMap আর ১টা NetworkPolicy। দুটো container image দেখা যায়:
docker.io/rook/ceph:v1.21.2আরquay.io/cephcsi/ceph-csi-operator:v1.1.0। docs বলে, chart একটা rook-ceph-operator deployment চালু করে Source 34সোর্স 34। - cluster chart render হয়েছে ৭,৮৬৭ byte-এ। তাতে আছে ১টা CephCluster, ১টা CephBlockPool, ১টা CephFilesystem, ১টা CephObjectStore, ১টা CephFilesystemSubVolumeGroup আর ৩টা StorageClass। docs বলে, default value একটা করে block pool, filesystem আর object store বানায়, আর তাদের storage class Source 35সোর্স 35। render-এ সেগুলো আছে, আর আরেকটা kind আছে, CephFilesystemSubVolumeGroup, যার নাম docs-এর এই বাক্য বলে না।
- দুটো render-ই
--namespace rook-cephব্যবহার করেছে। docs বলে, cluster operator-এর একই namespace-এ বা আলাদা একটা namespace-এ install করা যায় Source 35সোর্স 35।
১০. একটা kind cluster বানান, আর তার node দেখুন। চালান:
export KUBECONFIG="$PWD/kubeconfig"
kind create cluster --name qa-p7b --image kindest/node@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 --wait 120s 2>&1 | grep -v -E '^ [•✓]|^$' | cut -c 1-120
kubectl get nodes -o wide
kubectl get pods -n kube-system -o wide | grep -E '^NAME|kube-scheduler|etcd|kube-apiserver'
kubectl get events -n kube-system --field-selector reason=Scheduled -o wide | cut -c 1-200টিউটোরিয়ালের run-এর output:
Creating cluster "qa-p7b" ...
Set kubectl context to "kind-qa-p7b"
You can now use your cluster with:
kubectl cluster-info --context kind-qa-p7b
Have a question, bug, or feature request? Let us know! https://kind.sigs.k8s.io/#community 🙂
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
qa-p7b-control-plane Ready control-plane 22s v1.37.0 172.23.0.2 <none> Debian GNU/Linux 13 (trixie) 7.0.0-43-generic (amd64) containerd://2.3.4
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
etcd-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-apiserver-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
kube-scheduler-qa-p7b-control-plane 1/1 Running 0 20s 172.23.0.2 qa-p7b-control-plane <none> <none>
LAST SEEN TYPE REASON OBJECT SUBOBJECT SOURCE MESSAGE FIRST SEEN COUNT
1s Normal Scheduled pod/coredns-559f6c778d-5r4h7 default-scheduler Successfully assigned kube-system/coredns-559f6c778d-5r4h7 to qa-p7b-control-plane 1s 1
1s Normal Scheduled pod/coredns-559f6c778d-vbs4t default-scheduler Successfully assigned kube-system/coredns-559f6c778d-vbs4t to qa-p7b-control-plane 1s 1
12s Normal Scheduled pod/kindnet-4l64d default-scheduler Successfully assigned kube-system/kindnet-4l64d to qa-p7b-control-plane 12s 1
12s Normal Scheduled pod/kube-proxy-xjtmr default-scheduler Successfully assigned kube-system/kube-proxy-xjtmr to qa-p7b-control-plane 12s 1 - kind Docker container-কে node হিসেবে ব্যবহার করে একটা স্থানীয় Kubernetes cluster চালায় Source 40সোর্স 40। kind docs অন্য node image-এর জন্য
kind create cluster --image=...দেখায় Source 40সোর্স 40। ধাপটা node image-কে তার digest দিয়ে দেয়। সেটা একটা Kubernetes v1.37.0 image, যা machine-এ আগে থেকেই ছিল। run-এর পরে Docker-এর image-তালিকা শুরুর আগের তালিকার মতোই ছিল। - node-এর নাম
qa-p7b-control-plane। তার statusReady, version v1.37.0, আর container runtimecontainerd://2.3.4। অর্থাৎ containerd 2.3.4, আর machine-এর containerd 2.4.2। Kubernetes docs বলে, Kubernetes 1.37-এর জন্য এমন একটা runtime লাগে, যা Container Runtime Interface (CRI)-র সঙ্গে সামঞ্জস্যপূর্ণ Source 21সোর্স 21। - control-plane-এর pod
etcd,kube-apiserverআরkube-schedulerkube-system-এ চলে, আর তিনটাইRunning। kube-scheduler হলো default scheduler, আর সে control plane-এর অংশ হিসেবে চলে Source 23সোর্স 23। kube-system-এরScheduledevent এসেছেdefault-schedulerথেকে। প্রতিটা বলেSuccessfully assigned kube-system/<pod> to qa-p7b-control-plane, আর সেগুলো 4টা। scheduler এমন নতুন Pod-এর ওপর নজর রাখে, যাদের কোনো Node ঠিক করা নেই Source 23সোর্স 23। cluster-এ node একটাই।
১১. এমন একটা Pod বানান, যার সঙ্গে কোনো node মেলে না। চালান:
export KUBECONFIG="$PWD/kubeconfig"
cat > pending-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: pending-demo
spec:
nodeSelector:
disktype: nvme
containers:
- name: pause
image: registry.k8s.io/pause:3.10.2
EOF
kubectl apply -f pending-pod.yaml
for i in $(seq 1 30); do [ -n "$(kubectl get events --field-selector reason=FailedScheduling -o name)" ] && break; sleep 1; done
kubectl get pod pending-demo -o jsonpath='{.status.phase}{"\n"}'
kubectl get pod pending-demo -o jsonpath='{.status.conditions[?(@.type=="PodScheduled")].reason}{"\n"}'
kubectl get events --field-selector reason=FailedScheduling -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300
kubectl label node qa-p7b-control-plane disktype=nvme
kubectl wait --for=condition=PodScheduled pod/pending-demo --timeout=60s
kubectl get pod pending-demo -o jsonpath='{.spec.nodeName}{"\n"}'
kubectl get events --field-selector involvedObject.name=pending-demo,reason=Scheduled -o custom-columns=REASON:.reason,SOURCE:.source.component,MESSAGE:.message | cut -c 1-300টিউটোরিয়ালের run-এর output:
pod/pending-demo created
Pending
Unschedulable
REASON SOURCE MESSAGE
FailedScheduling default-scheduler 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.
node/qa-p7b-control-plane labeled
pod/pending-demo condition met
qa-p7b-control-plane
REASON SOURCE MESSAGE
Scheduled default-scheduler Successfully assigned default/pending-demo to qa-p7b-control-planepending-demoPod-এরnodeSelectorহলোdisktype: nvme। docs বলে, nodeSelector হলো node নির্বাচনের শর্তের সবচেয়ে সরল সুপারিশ করা রূপ Source 41সোর্স 41। তারা বলে, Kubernetes Pod-কে কেবল সেই node-এ schedule করে, যাতে আপনার দেওয়া প্রতিটা label আছে Source 41সোর্স 41।- node-এ এমন কোনো label ছিল না। Pod
Pendingথেকেছে, আর তারPodScheduledcondition-এর reason ছিলUnschedulable। docs বলে, কোনো node উপযুক্ত না হলে scheduler Pod-টা বসাতে পারা পর্যন্ত pod-টা unscheduled থাকে Source 23সোর্স 23। FailedSchedulingevent এসেছেdefault-schedulerথেকে। তার message বলে0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector.তার পরে সে বলেpreemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.preemption নিয়ে লেখা কথাগুলো টিউটোরিয়াল খুঁজে দেখেনি।kubectl label nodenode-এdisktype=nvmelabel যোগ করেছে। docs বলে, node-এর label আছে, আর আপনি হাতে label জুড়তে পারেন Source 41সোর্স 41।kubectl wait --for=condition=PodScheduledছাপিয়েছেcondition met। তখন Pod-এর node ছিলqa-p7b-control-plane।default-scheduler-এরScheduledevent বলেSuccessfully assigned default/pending-demo to qa-p7b-control-plane। label যোগ করার পর একই Pod schedule হয়েছে, আর টিউটোরিয়াল কিছু restart করেনি।- scheduler তার সিদ্ধান্ত API server-কে জানায় binding নামের একটা প্রক্রিয়ায় Source 23সোর্স 23।
- Pod ব্যবহার করে
registry.k8s.io/pause:3.10.2image। এটা টিউটোরিয়ালের নিজের সিদ্ধান্ত। ১৪ নম্বর ধাপেcrictl psএই Pod-এরpausecontainer-কেRunningদেখায়।
১২. শুধু CRD install করুন, আর API-কে তাদের বিষয়ে জিজ্ঞেস করুন। চালান:
export KUBECONFIG="$PWD/kubeconfig"
helm template rook-ceph rook-release/rook-ceph --namespace rook-ceph --show-only templates/resources.yaml > crds.yaml
grep -c '^kind: CustomResourceDefinition' crds.yaml
kubectl apply --server-side -f crds.yaml | tail -n 2
kubectl wait --for=condition=Established crd/cephclusters.ceph.rook.io --timeout=60s
kubectl get crd -o name | grep -c 'ceph.rook.io'
kubectl api-resources --api-group=ceph.rook.io | grep -E '^NAME|^cephclusters '
kubectl explain cephcluster.spec.mon.count
kubectl get crd cephclusters.ceph.rook.io -o json | python3 -c '
import json, sys
spec = json.load(sys.stdin)["spec"]["versions"][0]["schema"]["openAPIV3Schema"]["properties"]["spec"]["properties"]
print("mon.count:", json.dumps(spec["mon"]["properties"]["count"]))
print("mon rule:", json.dumps(spec["mon"]["x-kubernetes-validations"][0]))
print("dataDirHostPath rule:", json.dumps(spec["dataDirHostPath"]["x-kubernetes-validations"][0]))
'টিউটোরিয়ালের run-এর output:
21
customresourcedefinition.apiextensions.k8s.io/objectbucketclaims.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/objectbuckets.objectbucket.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/cephclusters.ceph.rook.io condition met
19
NAME SHORTNAMES APIVERSION NAMESPACED KIND
cephclusters ceph ceph.rook.io/v1 true CephCluster
GROUP: ceph.rook.io
KIND: CephCluster
VERSION: v1
FIELD: count <integer>
DESCRIPTION:
Count is the number of Ceph monitors
mon.count: {"description": "Count is the number of Ceph monitors", "maximum": 9, "minimum": 0, "type": "integer"}
mon rule: {"message": "zones must be less than or equal to count", "rule": "!has(self.zones) || (has(self.zones) && (size(self.zones) <= self.count))"}
dataDirHostPath rule: {"message": "DataDirHostPath is immutable", "rule": "self == oldSelf"}helm template --show-only templates/resources.yamlশুধু সেই manifest দেখায়, যা এই template render করে Source 39সোর্স 39।crds.yamlfile-এ ২১টা CRD আছে। টিউটোরিয়াল কেবল এই file-টাই apply করেছে। সে কোনো operator, RBAC বা Rook quickstart-এর অন্য কোনো file apply করেনি।kubectl apply --server-sideapply-কে client-এর বদলে server-এ চালায় Source 27সোর্স 27। ধাপটাtail -n 2দিয়ে apply-এর শুধু শেষ দুটো লাইন ছাপে। দুটোই বলেserverside-applied।kubectl wait --for=condition=Establishedcephclusters.ceph.rook.io-এর জন্যcondition metছাপিয়েছে। docs বলে, command দেওয়া প্রতিটা resource-এর Status field-এ নির্দিষ্ট condition না দেখা পর্যন্ত অপেক্ষা করে Source 29সোর্স 29।- ১৯টা CRD-র নামে
ceph.rook.ioআছে।kubectl api-resourcescephclusters-কে দেখায় short nameceph, versionceph.rook.io/v1আরNAMESPACED trueদিয়ে। Kubernetes docs বলে, একটা custom resource install হলে user তার object তৈরি আর দেখতে পারে kubectl দিয়ে, Pod-এর মতো built-in resource-এর মতোই Source 24সোর্স 24। kubectl explain cephcluster.spec.mon.countছাপিয়েছেcount <integer>আরCount is the number of Ceph monitors। docs বলে,kubectl explainপ্রতিটা সমর্থিত API resource-এর field বর্ণনা করে Source 28সোর্স 28। এই লেখা কোনো সীমা দেয় না। Rook docs বলে, সংখ্যাটা ১ থেকে ৯-এর মধ্যে হতে হবে Source 36সোর্স 36।- শেষ তিনটা লাইন CRD থেকেই এসেছে, Python script পড়েছে।
mon.count-এর schema হলো একটা integer, যার"minimum": 0আর"maximum": 9।monfield-এ একটা validation rule আছে, messagezones must be less than or equal to count।dataDirHostPathfield-এ ruleself == oldSelf, messageDataDirHostPath is immutable।x-kubernetes-validationsextension দিয়ে Common Expression Language (CEL) expression ব্যবহার করে custom resource যাচাই করা যায় Source 25সোর্স 25। যে ruleoldSelf-কে উল্লেখ করে, সে একটা transition rule Source 25সোর্স 25।
১৩. custom resource-কে schema-র বিরুদ্ধে পরীক্ষা করুন। চালান:
export KUBECONFIG="$PWD/kubeconfig"
kubectl create namespace rook-ceph
helm template rook-ceph-cluster rook-release/rook-ceph-cluster --namespace rook-ceph --set operatorNamespace=rook-ceph --show-only templates/cephcluster.yaml > cephcluster.yaml
kubectl apply --dry-run=server -f cephcluster.yaml
sed 's/^ count: 3$/ count: "three"/' cephcluster.yaml > bad-type.yaml
kubectl apply --dry-run=server -f bad-type.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 10/' cephcluster.yaml > bad-range.yaml
kubectl apply --dry-run=server -f bad-range.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 0/' cephcluster.yaml > zero.yaml
kubectl apply --dry-run=server -f zero.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 3\n notAField: 1/' cephcluster.yaml > bad-field.yaml
kubectl apply --dry-run=server -f bad-field.yaml 2>&1 | cut -c 1-260
sed 's/^ count: 3$/ count: 1\n zones:\n - name: a\n - name: b/' cephcluster.yaml > bad-zones.yaml
kubectl apply --dry-run=server -f bad-zones.yaml 2>&1 | cut -c 1-300
sed 's#^ dataDirHostPath: /var/lib/rook$# dataDirHostPath: /var/lib/rook2#' cephcluster.yaml > moved.yaml
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300
kubectl apply -f cephcluster.yaml
kubectl -n rook-ceph get cephcluster
kubectl apply --dry-run=server -f moved.yaml 2>&1 | cut -c 1-300টিউটোরিয়ালের run-এর output:
namespace/rook-ceph created
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
The CephCluster "rook-ceph" is invalid:
* spec.mon.count: Invalid value: "string": spec.mon.count in body must be of type integer: "string"
* <nil>: Invalid value: null: some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
The CephCluster "rook-ceph" is invalid: spec.mon.count: Invalid value: 10: spec.mon.count in body should be less than or equal to 9
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
Error from server (BadRequest): error when creating "bad-field.yaml": CephCluster in version "v1" cannot be handled as a CephCluster: strict decoding error: unknown field "spec.mon.notAField"
The CephCluster "rook-ceph" is invalid: spec.mon: Invalid value: zones must be less than or equal to count
cephcluster.ceph.rook.io/rook-ceph created (server dry run)
cephcluster.ceph.rook.io/rook-ceph created
NAME DATADIRHOSTPATH MONCOUNT AGE PHASE MESSAGE HEALTH EXTERNAL FSID
rook-ceph /var/lib/rook 3 0s
The CephCluster "rook-ceph" is invalid: spec.dataDirHostPath: Invalid value: "/var/lib/rook2": DataDirHostPath is immutableধাপটা rook-ceph namespace বানায়, আর cluster chart-এর CephCluster-কে cephcluster.yaml-এ render করে। অন্য file-গুলো সেই file-এর sed দিয়ে করা সম্পাদনা, আর সেগুলো টিউটোরিয়ালের নিজের। প্রতিটা --dry-run=server resource persist না করে একটা server-side request পাঠায় Source 27সোর্স 27। ধাপটা --validate ঠিক করেনি। run যা দেখিয়েছে, output-এর ক্রমে:
- chart-এর file গৃহীত হয়েছে:
created (server dry run)। count: "three"প্রত্যাখ্যাত হয়েছে:spec.mon.count in body must be of type integer। দ্বিতীয় একটা message বলে, কিছু validation rule যাচাই করা হয়নি, কারণ object অবৈধ ছিল, আর যাচাই শেষ করতে বিদ্যমান ভুল সারাতে বলে।count: 10প্রত্যাখ্যাত হয়েছে, আর message শেষ হয়েছেless than or equal to 9দিয়ে। এটা ১২ নম্বর ধাপের"maximum": 9।count: 0গৃহীত হয়েছে। CRD-তে"minimum": 0, আর Rook docs বলে সংখ্যাটা ১ থেকে ৯-এর মধ্যে হতে হবে Source 36সোর্স 36। টিউটোরিয়াল operator চালায়নি, তাই ০ পেলে operator কী করে তা সে জানে না।mon-এর নিচেnotAFieldপ্রত্যাখ্যাত হয়েছেstrict decoding error: unknown field "spec.mon.notAField"দিয়ে।kubectl apply-এর--validateflag-এর default হলো strict Source 27সোর্স 27। docs বলে, "true" বা "strict" একটা schema দিয়ে input যাচাই করে আর অবৈধ হলে request ব্যর্থ করে Source 27সোর্স 27।- দুটো zone-সহ
count: 1validation rule-এ প্রত্যাখ্যাত হয়েছে, messagezones must be less than or equal to count। moved.yamlহলো chart-এর file,dataDirHostPath: /var/lib/rook2সহ। object থাকার আগে তার dry run গৃহীত হয়েছে:created (server dry run)।- chart-এর file-এর
kubectl apply,--dry-runছাড়া, ছাপিয়েছেcreated।kubectl get cephclustercolumn দেখায়DATADIRHOSTPATH,MONCOUNT,AGE,PHASE,MESSAGE,HEALTH,EXTERNALআরFSID। docs বলে,kubectl getকোন column দেখাবে তা API server ঠিক করে, আর একটা CRD সেগুলো নিজের মতো করতে পারে Source 25সোর্স 25। run-এPHASE,MESSAGE,HEALTH,EXTERNALআরFSIDফাঁকা, আর cluster-এ কোনো operator চলেনি। - object থাকার পরে
moved.yaml-এর dry run প্রত্যাখ্যাত হয়েছে:DataDirHostPath is immutable। docs বলে, transition rule create operation-এ কখনও প্রযোজ্য নয় Source 25সোর্স 25। একই file-এর প্রথম dry run ছিল একটা create, আর এটা বিদ্যমান object-এর একটা update।
১৪. node-এর ভেতরের containerd দেখুন, আর cluster মুছে দিন। চালান:
export KUBECONFIG="$PWD/kubeconfig"
docker exec qa-p7b-control-plane crictl --version
docker exec qa-p7b-control-plane crictl ps | head -n 4
docker exec qa-p7b-control-plane grep -n SystemdCgroup /etc/containerd/config.toml
docker exec qa-p7b-control-plane grep -n cgroupDriver /var/lib/kubelet/config.yaml
docker exec qa-p7b-control-plane ctr namespaces ls
echo "containers in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io containers ls -q | wc -l)"
echo "images in k8s.io: $(docker exec qa-p7b-control-plane ctr -n k8s.io images ls -q | wc -l)"
kind delete cluster --name qa-p7b 2>&1 | cut -c 1-120
docker ps -a --format '{{.Names}}' | grep -c 'qa-p7b' || trueটিউটোরিয়ালের run-এর output:
crictl version 1.36.0
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD NAMESPACE
30ce70637487d 4a83b15d3ecfe 5 seconds ago Running pause 0 2b2cad098b83c pending-demo default
b60bfa7818a73 520212b8b0fcd 7 seconds ago Running coredns 0 06a10517b855a coredns-559f6c778d-vbs4t kube-system
c553af4ac190a 520212b8b0fcd 7 seconds ago Running coredns 0 e75c0fa123244 coredns-559f6c778d-5r4h7 kube-system
24: SystemdCgroup = true
33: SystemdCgroup = true
15:cgroupDriver: systemd
NAME LABELS
k8s.io
containers in k8s.io: 20
images in k8s.io: 31
Deleting cluster "qa-p7b" ...
Deleted nodes: ["qa-p7b-control-plane"]
0- ধাপটা তার command-গুলো node container-এ চালিয়েছে
docker execদিয়ে। kind docs বলে,docker exec -it my-node-name crictl imagesদিয়ে একটা cluster node-এর image-এর তালিকা পাওয়া যায় Source 40সোর্স 40। node-এরcrictl-এর সংস্করণ 1.36.0। Kubernetes docs বলে, আপনিcrictlদিয়ে একটা Kubernetes node-এর container runtime আর application পরীক্ষা ও debug করতে পারেন Source 22সোর্স 22। crictl psপ্রতিটা container-কে তার pod আর Kubernetes namespace-সহ তালিকাভুক্ত করে। সারিগুলোRunning। তার একটা হলো ১১ নম্বর ধাপেরpending-demoPod-এরpausecontainer।- node-এর
/etc/containerd/config.toml-এ দুটো লাইনেSystemdCgroup = trueআছে, আর/var/lib/kubelet/config.yaml-এ আছেcgroupDriver: systemd। এই দুটো সেই দুই setting, যা ৩ নম্বর ধাপ বলেছিল। docs বলে, kubelet আর container runtime একই cgroup driver ব্যবহার করবে, এটা অত্যন্ত জরুরি Source 21সোর্স 21। দ্বিতীয়SystemdCgroupলাইনটা কিসের অংশ, টিউটোরিয়াল তা পরীক্ষা করেনি। - node-এর
ctr namespaces lsএকটা namespace তালিকাভুক্ত করে,k8s.io। তার ভেতরেctrগুনেছে 20টা container আর 31টা image।defaultnamespace, যেটা আপনি কিছু না দিলেctrব্যবহার করে Source 9সোর্স 9, তালিকায় নেই। - node-এ
crictlউত্তর দিয়েছে, আর docs তাকে বলে CRI-সামঞ্জস্যপূর্ণ container runtime-এর জন্য একটা command-line interface Source 22সোর্স 22। ৩ নম্বর ধাপে টিউটোরিয়ালের নিজের daemon-এর CRI plugin load হয়নি। kind delete clusternode container মুছেছে। শেষ command যেসব container-এর নামেqa-p7bআছে তাদের গোনে, আর সে ছাপিয়েছে ০।
১৫. একটা machine-কে Rook-এর node-এর পূর্বশর্তের বিরুদ্ধে পরীক্ষা করুন। চালান:
lsblk -o TYPE | tail -n +2 | sort | uniq -c
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE
uname -r
modinfo -F filename rbd
grep -c '^rbd ' /proc/modules
pgrep -c systemd-udevdটিউটোরিয়ালের run-এর output:
2 disk
49 loop
3 part
NAME FSTYPE TYPE SIZE
nvme0n1 disk 238.5G
|-nvme0n1p1 vfat part 1G
`-nvme0n1p2 ext4 part 237.4G
nvme1n1 disk 238.5G
`-nvme1n1p1 ext4 part 238.5G
7.0.0-43-generic
/lib/modules/7.0.0-43-generic/kernel/drivers/block/rbd.ko.zst
0
1Rook prerequisites page বলে, কোনো partition বা device-এ filesystem বানানো আছে কি না নিশ্চিত করতে lsblk -f চালান Source 33সোর্স 33। এই ধাপের command-গুলো টিউটোরিয়ালের নিজের। দ্বিতীয়টা সেই FSTYPE ঘর ছাপে, যার কথা Rook-এর page নিচের দ্বিতীয় bullet-এ বলে। সেগুলো টিউটোরিয়ালের machine-এ চলে, kind cluster-এ নয়।
- প্রথম command device-গুলোকে type অনুযায়ী গোনে: ২টা disk, ৪৯টা loop device আর ৩টা partition। দ্বিতীয় command,
lsblk -e7 -o NAME,FSTYPE,TYPE,SIZE, loop device বাদ দেয়।-e7option টিউটোরিয়ালের নিজের সিদ্ধান্ত। - docs বলে, FSTYPE ঘর ফাঁকা না হলে সেই device-এর ওপর একটা filesystem আছে Source 33সোর্স 33। দুটো disk-এর তিনটা partition-এরই একটা আছে,
vfatবাext4। এই নিয়মে এই device-গুলোর কোনোটাই Rook-এর জন্য পাওয়া যায় না। এই পড়া টিউটোরিয়ালের নিজের। - Rook troubleshooting docs বলে, Rook কোনো device-কে অনুপলব্ধ ঠিক করলে (তাতে বিদ্যমান partition বা formatted filesystem আছে), Rook সেই device ব্যবহার করা এড়িয়ে যাবে Source 38সোর্স 38।
- kernel হলো 7.0.0-43-generic। আপনি CephFS থেকে RWX volume বানালে docs সর্বনিম্ন kernel সংস্করণ ৪.১৭ সুপারিশ করে Source 33সোর্স 33।
modinfo -F filename rbdএই kernel-এরrbdmodule-এর file ছাপিয়েছে, আরgrep -c '^rbd ' /proc/modulesছাপিয়েছে ০। module আছে, কিন্তু load করা নেই। docs বলে, Ceph-এর জন্য RBD module-সহ বানানো একটা Linux kernel লাগে, আর আপনিmodprobe rbdচালিয়ে আপনার node পরীক্ষা করতে পারেন Source 33সোর্স 33। টিউটোরিয়ালmodprobeচালায়নি, কারণ তার run কোনো root অধিকার ব্যবহার করে না।pgrep -c systemd-udevdছাপিয়েছে ১। টিউটোরিয়াল সেই process-কে machine-এর udev daemon ধরে নেয়। docs বলে, সব storage node-এ একটা চালু udev daemon লাগে Source 33সোর্স 33।
How a tester uses it
Read the runtime of a node. In step 10, kubectl get nodes -o wide showed containerd://2.3.4 for the node of the kind cluster. The docs say that you need a working container runtime on each Node, so that the kubelet can launch Pods and their containers Source 20সোর্স 20. For Kubernetes v1.26 and later, the kubelet requires that the container runtime supports the v1 CRI API Source 20সোর্স 20. If a container runtime does not support the v1 API, the kubelet will not register the node Source 20সোর্স 20. A tester can write the runtime and its version in every test report. The tutorial's machine had containerd 2.4.2, and the node of the kind cluster had containerd 2.3.4.
Match the cgroup drivers. The kubelet and the container runtime need a cgroup driver to interface with control groups Source 21সোর্স 21. The cgroupfs driver is the default cgroup driver in the kubelet Source 21সোর্স 21. The systemd cgroup driver is recommended if you use cgroup v2 Source 21সোর্স 21. It is critical that both use the same driver Source 21সোর্স 21. In step 14, the node of the kind cluster had SystemdCgroup = true in its containerd file and cgroupDriver: systemd in its kubelet file. The default configuration of containerd 2.4.2 in step 3 had SystemdCgroup = false. A tester can compare the two settings on every node of a test cluster.
Find an image on a node. crictl is a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. You can use it to inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22. The docs note that the ctr tool is solely made for debugging containerd Source 8সোর্স 8. If you do not provide a namespace, ctr client commands use the namespace default Source 9সোর্স 9. In step 14, the node held its images in the namespace k8s.io, and default was not in the list. In step 6, the namespace other listed 0 images while qa listed 1. A tester who looks in the wrong namespace sees no image.
Compare digests. Each component of an image is stored in a file whose name is the hash of it Source 12সোর্স 12. In step 5, all 42 files of the content store had names equal to the SHA-256 of their content. An image index contains a list of manifests for specific platforms Source 19সোর্স 19. A manifest provides a configuration and a set of layers for a single container image for a specific architecture and operating system Source 18সোর্স 18. A tester can write down the digest of the index and the digest of the manifest of the platform under test. DiffIDs are not to be confused with layer digests, which are often referenced in the manifest Source 17সোর্স 17. In step 5, the DiffID and the name of the layer file were two different values. The tutorial pinned no digest for hello-world.
Disk use and removal. In step 6, two namespaces listed the same 42 blobs, and the store held 42 files. A tester who adds up the blobs of each namespace counts the same files twice. The docs say that the garbage collector is scheduled on a background goroutine, and that it runs based on a number of configurable factors Source 13সোর্স 13. In step 7, the store held 0 files after ctr -n qa images rm --sync. One line of step 7 differed between two runs of the tutorial. A test that checks the disk after an image removal can use --sync, as step 7 did. The tutorial did not test a check that waits and polls.
Registries and mirrors. containerd reads an optional hosts.toml file for each registry host, from a configuration directory Source 16সোর্স 16. If a host differs from the registry host namespace, such as a mirror, containerd appends the registry host namespace to requests as a query parameter called ns Source 16সোর্স 16. The tutorial set no hosts.toml, and steps 4, 6, and 8 used Docker Hub directly. A tester who works behind a mirror can read the hosts.toml of the node first.
Read why a Pod is pending. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. If none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. In step 11, the Pod was Pending, and its PodScheduled condition had the reason Unschedulable. The event FailedScheduling said 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. A tester can read such events with kubectl get events --field-selector reason=FailedScheduling, as step 11 did. After the node got the label, the same Pod was scheduled. The tutorial made only this one kind of Pod that cannot be scheduled. It did not test taints, resource requests, or affinity.
Test a custom resource before the operator. Custom resources are validated via OpenAPI v3.0 schemas, and by x-kubernetes-validations when the Validation Rules feature is enabled Source 25সোর্স 25. kubectl apply --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. In step 13, the API server rejected a wrong type, a value over the maximum, an unknown field, a rule on zones, and a change of an immutable field. A tester can keep one good file and one bad file for each rule. The tutorial did not run the operator. These checks say nothing about what the operator does with an accepted file.
Compare the docs with the schema. The Rook docs say that the number of mons must be between 1 and 9 Source 36সোর্স 36. The CRD of step 12 has "minimum": 0, and the API server accepted count: 0 in step 13. A tester can report such a gap. The tutorial does not know whether the operator refuses 0. The docs also say that for highest availability, an odd number of mons should be specified Source 36সোর্স 36.
Check a storage node. To configure the Ceph storage cluster, at least one of these local storage types is required: raw devices, raw partitions, LVM logical volumes, or persistent volumes from a storage class in block mode Source 33সোর্স 33. If Rook determines that a device is not available (it has existing partitions or a formatted filesystem), Rook will skip consuming the devices Source 38সোর্স 38. To see if a device was skipped, view the OSD preparation log on the node where the device was skipped Source 38সোর্স 38. Step 15 applied the checks of the prerequisites page to the tutorial's machine. Every partition had a filesystem. The rbd module was available but not loaded. One systemd-udevd process ran. The kernel was 7.0.0-43-generic.
When Ceph runs. The Rook toolbox is a container with common tools used for rook debugging and testing Source 37সোর্স 37. Its example commands are ceph status, ceph osd status, ceph df, and rados df Source 37সোর্স 37. The docs list two common causes for PVCs that stay pending. There are no OSDs in the cluster, or the CSI provisioner pod is not running or is not responding to the request Source 38সোর্স 38. In a test cluster, only one OSD is required Source 38সোর্স 38. In the production storage class example, three OSDs would be required Source 38সোর্স 38. The tutorial ran no operator, and it ran none of these.
সহজ English
Read the runtime of a node. In step 10, kubectl get nodes -o wide showed containerd://2.3.4 for the node of the kind cluster. The docs say that you need a working container runtime on each Node, so that the kubelet can launch Pods and their containers Source 20সোর্স 20. For Kubernetes v1.26 and later, the kubelet requires that the container runtime supports the v1 CRI API Source 20সোর্স 20. If a container runtime does not support the v1 API, the kubelet will not register the node Source 20সোর্স 20. A tester can write the runtime and its version in every test report. The tutorial's machine had containerd 2.4.2, and the node of the kind cluster had containerd 2.3.4.
Match the cgroup drivers. The kubelet and the container runtime need a cgroup driver to interface with control groups Source 21সোর্স 21. The cgroupfs driver is the default cgroup driver in the kubelet Source 21সোর্স 21. The systemd cgroup driver is recommended if you use cgroup v2 Source 21সোর্স 21. It is critical that both use the same driver Source 21সোর্স 21. In step 14, the node of the kind cluster had SystemdCgroup = true in its containerd file and cgroupDriver: systemd in its kubelet file. The default configuration of containerd 2.4.2 in step 3 had SystemdCgroup = false. A tester can compare the two settings on every node of a test cluster.
Find an image on a node. crictl is a command-line interface for CRI-compatible container runtimes Source 22সোর্স 22. You can use it to inspect and debug container runtimes and applications on a Kubernetes node Source 22সোর্স 22. The docs note that the ctr tool is solely made for debugging containerd Source 8সোর্স 8. If you do not provide a namespace, ctr client commands use the namespace default Source 9সোর্স 9. In step 14, the node held its images in the namespace k8s.io, and default was not in the list. In step 6, the namespace other listed 0 images while qa listed 1. A tester who looks in the wrong namespace sees no image.
Compare digests. Each component of an image is stored in a file whose name is the hash of it Source 12সোর্স 12. In step 5, all 42 files of the content store had names equal to the SHA-256 of their content. An image index contains a list of manifests for specific platforms Source 19সোর্স 19. A manifest provides a configuration and a set of layers for a single container image for a specific architecture and operating system Source 18সোর্স 18. A tester can write down the digest of the index and the digest of the manifest of the platform under test. DiffIDs are not to be confused with layer digests, which are often referenced in the manifest Source 17সোর্স 17. In step 5, the DiffID and the name of the layer file were two different values. The tutorial pinned no digest for hello-world.
Disk use and removal. In step 6, two namespaces listed the same 42 blobs, and the store held 42 files. A tester who adds up the blobs of each namespace counts the same files twice. The docs say that the garbage collector is scheduled on a background goroutine, and that it runs based on a number of configurable factors Source 13সোর্স 13. In step 7, the store held 0 files after ctr -n qa images rm --sync. One line of step 7 differed between two runs of the tutorial. A test that checks the disk after an image removal can use --sync, as step 7 did. The tutorial did not test a check that waits and polls.
Registries and mirrors. containerd reads an optional hosts.toml file for each registry host, from a configuration directory Source 16সোর্স 16. If a host differs from the registry host namespace, such as a mirror, containerd appends the registry host namespace to requests as a query parameter called ns Source 16সোর্স 16. The tutorial set no hosts.toml, and steps 4, 6, and 8 used Docker Hub directly. A tester who works behind a mirror can read the hosts.toml of the node first.
Read why a Pod is pending. A scheduler watches for newly created Pods that have no Node assigned Source 23সোর্স 23. If none of the nodes are suitable, the pod remains unscheduled until the scheduler is able to place it Source 23সোর্স 23. In step 11, the Pod was Pending, and its PodScheduled condition had the reason Unschedulable. The event FailedScheduling said 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. A tester can read such events with kubectl get events --field-selector reason=FailedScheduling, as step 11 did. After the node got the label, the same Pod was scheduled. The tutorial made only this one kind of Pod that cannot be scheduled. It did not test taints, resource requests, or affinity.
Test a custom resource before the operator. Custom resources are validated via OpenAPI v3.0 schemas, and by x-kubernetes-validations when the Validation Rules feature is enabled Source 25সোর্স 25. kubectl apply --dry-run=server submits a server-side request without persisting the resource Source 27সোর্স 27. In step 13, the API server rejected a wrong type, a value over the maximum, an unknown field, a rule on zones, and a change of an immutable field. A tester can keep one good file and one bad file for each rule. The tutorial did not run the operator. These checks say nothing about what the operator does with an accepted file.
Compare the docs with the schema. The Rook docs say that the number of mons must be between 1 and 9 Source 36সোর্স 36. The CRD of step 12 has "minimum": 0, and the API server accepted count: 0 in step 13. A tester can report such a gap. The tutorial does not know whether the operator refuses 0. The docs also say that for highest availability, an odd number of mons should be specified Source 36সোর্স 36.
Check a storage node. To configure the Ceph storage cluster, at least one of these local storage types is required: raw devices, raw partitions, LVM logical volumes, or persistent volumes from a storage class in block mode Source 33সোর্স 33. If Rook determines that a device is not available (it has existing partitions or a formatted filesystem), Rook will skip consuming the devices Source 38সোর্স 38. To see if a device was skipped, view the OSD preparation log on the node where the device was skipped Source 38সোর্স 38. Step 15 applied the checks of the prerequisites page to the tutorial's machine. Every partition had a filesystem. The rbd module was available but not loaded. One systemd-udevd process ran. The kernel was 7.0.0-43-generic.
When Ceph runs. The Rook toolbox is a container with common tools used for rook debugging and testing Source 37সোর্স 37. Its example commands are ceph status, ceph osd status, ceph df, and rados df Source 37সোর্স 37. The docs list two common causes for PVCs that stay pending. There are no OSDs in the cluster, or the CSI provisioner pod is not running or is not responding to the request Source 38সোর্স 38. In a test cluster, only one OSD is required Source 38সোর্স 38. In the production storage class example, three OSDs would be required Source 38সোর্স 38. The tutorial ran no operator, and it ran none of these.
বাংলা ব্যাখ্যা
একটা node-এর runtime পড়ুন। ১০ নম্বর ধাপে kubectl get nodes -o wide kind cluster-এর node-এর জন্য দেখিয়েছে containerd://2.3.4। docs বলে, প্রতিটা Node-এ একটা চালু container runtime লাগে, যাতে kubelet Pod আর তার container চালাতে পারে Source 20সোর্স 20। Kubernetes v1.26 আর তার পরের সংস্করণে kubelet চায়, container runtime যেন v1 CRI API সমর্থন করে Source 20সোর্স 20। কোনো container runtime v1 API সমর্থন না করলে kubelet node register করবে না Source 20সোর্স 20। একজন tester প্রতিটা test report-এ runtime আর তার সংস্করণ লিখে রাখতে পারেন। টিউটোরিয়ালের machine-এ ছিল containerd 2.4.2, আর kind cluster-এর node-এ ছিল containerd 2.3.4।
cgroup driver মেলান। control group-এর সঙ্গে যোগাযোগের জন্য kubelet আর container runtime-এর একটা cgroup driver লাগে Source 21সোর্স 21। cgroupfs driver হলো kubelet-এর default cgroup driver Source 21সোর্স 21। cgroup v2 ব্যবহার করলে systemd cgroup driver সুপারিশ করা হয় Source 21সোর্স 21। দুটোই একই driver ব্যবহার করবে, এটা অত্যন্ত জরুরি Source 21সোর্স 21। ১৪ নম্বর ধাপে kind cluster-এর node-এর containerd file-এ ছিল SystemdCgroup = true, আর kubelet file-এ ছিল cgroupDriver: systemd। ৩ নম্বর ধাপে containerd 2.4.2-এর default configuration-এ ছিল SystemdCgroup = false। একজন tester একটা test cluster-এর প্রতিটা node-এ এই দুটো setting মিলিয়ে দেখতে পারেন।
একটা node-এ image খুঁজুন। crictl হলো CRI-সামঞ্জস্যপূর্ণ container runtime-এর জন্য একটা command-line interface Source 22সোর্স 22। আপনি তাকে দিয়ে একটা Kubernetes node-এর container runtime আর application পরীক্ষা ও debug করতে পারেন Source 22সোর্স 22। docs উল্লেখ করে, ctr tool কেবল containerd debug করার জন্য বানানো Source 8সোর্স 8। আপনি namespace না দিলে ctr client command default namespace ব্যবহার করে Source 9সোর্স 9। ১৪ নম্বর ধাপে node তার image রেখেছিল k8s.io namespace-এ, আর default তালিকায় ছিল না। ৬ নম্বর ধাপে other namespace ০টা image তালিকাভুক্ত করেছে, আর qa ১টা। যে tester ভুল namespace-এ খোঁজেন, তিনি কোনো image দেখেন না।
digest মিলিয়ে দেখুন। একটা image-এর প্রতিটা অংশ এমন একটা file-এ থাকে, যার নাম তার hash Source 12সোর্স 12। ৫ নম্বর ধাপে content store-এর 42টা file-এরই নাম ছিল তার content-এর SHA-256-এর সমান। একটা image index-এ নির্দিষ্ট platform-এর manifest-এর তালিকা থাকে Source 19সোর্স 19। একটা manifest একটা নির্দিষ্ট architecture আর operating system-এর একটা container image-এর জন্য একটা configuration আর একগুচ্ছ layer দেয় Source 18সোর্স 18। একজন tester index-এর digest আর যে platform test হচ্ছে তার manifest-এর digest লিখে রাখতে পারেন। DiffID-কে layer digest-এর সঙ্গে গুলিয়ে ফেলা চলবে না, যেগুলো প্রায়ই manifest-এ উল্লেখ করা হয় Source 17সোর্স 17। ৫ নম্বর ধাপে DiffID আর layer file-এর নাম ছিল দুটো আলাদা মান। টিউটোরিয়াল hello-world-এর কোনো digest বেঁধে দেয়নি।
disk ব্যবহার আর সরানো। ৬ নম্বর ধাপে দুটো namespace একই 42টা blob তালিকাভুক্ত করেছে, আর store-এ ছিল 42টা file। যে tester প্রতিটা namespace-এর blob যোগ করেন, তিনি একই file দুবার গোনেন। docs বলে, garbage collector একটা background goroutine-এ schedule হয়, আর কয়েকটা সাজানো যায় এমন বিষয়ের ওপর ভিত্তি করে চলে Source 13সোর্স 13। ৭ নম্বর ধাপে ctr -n qa images rm --sync-এর পর store-এ ছিল ০টা file। ৭ নম্বর ধাপের একটা লাইন টিউটোরিয়ালের দুটো run-এ আলাদা ছিল। একটা image সরানোর পর disk পরীক্ষা করা test ৭ নম্বর ধাপের মতো --sync ব্যবহার করতে পারে। টিউটোরিয়াল এমন কোনো পরীক্ষা চেষ্টা করেনি, যা অপেক্ষা করে আর বারবার দেখে (poll)।
registry আর mirror। containerd একটা configuration directory থেকে প্রতিটা registry host-এর জন্য ঐচ্ছিক hosts.toml file পড়ে Source 16সোর্স 16। কোনো host registry host namespace থেকে আলাদা হলে, যেমন একটা mirror, containerd request-এ registry host namespace-কে ns নামের query parameter হিসেবে জুড়ে দেয় Source 16সোর্স 16। টিউটোরিয়াল কোনো hosts.toml বসায়নি, আর ৪, ৬ ও ৮ নম্বর ধাপ সরাসরি Docker Hub ব্যবহার করেছে। যে tester একটা mirror-এর পেছনে কাজ করেন, তিনি আগে node-এর hosts.toml পড়ে দেখতে পারেন।
একটা Pod কেন pending তা পড়ুন। scheduler এমন নতুন Pod-এর ওপর নজর রাখে, যাদের কোনো Node ঠিক করা নেই Source 23সোর্স 23। কোনো node উপযুক্ত না হলে scheduler Pod-টা বসাতে পারা পর্যন্ত pod-টা unscheduled থাকে Source 23সোর্স 23। ১১ নম্বর ধাপে Pod ছিল Pending, আর তার PodScheduled condition-এর reason ছিল Unschedulable। FailedScheduling event বলেছে 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. একজন tester এমন event পড়তে পারেন kubectl get events --field-selector reason=FailedScheduling দিয়ে, যেমন ১১ নম্বর ধাপ করেছে। node label পাওয়ার পর একই Pod schedule হয়েছে। টিউটোরিয়াল কেবল এই এক ধরনের, schedule করা যায় না এমন Pod বানিয়েছে। সে taint, resource request বা affinity পরীক্ষা করেনি।
operator-এর আগেই একটা custom resource পরীক্ষা করুন। custom resource যাচাই হয় OpenAPI v3.0 schema দিয়ে, আর Validation Rules feature চালু থাকলে x-kubernetes-validations দিয়ে Source 25সোর্স 25। kubectl apply --dry-run=server resource persist না করে একটা server-side request পাঠায় Source 27সোর্স 27। ১৩ নম্বর ধাপে API server প্রত্যাখ্যান করেছে একটা ভুল type, সর্বোচ্চ সীমার ওপরের একটা মান, একটা অচেনা field, zone-এর ওপর একটা rule, আর একটা অপরিবর্তনীয় (immutable) field-এর বদল। একজন tester প্রতিটা rule-এর জন্য একটা ভালো আর একটা খারাপ file রাখতে পারেন। টিউটোরিয়াল operator চালায়নি। একটা গৃহীত file নিয়ে operator কী করে, এই পরীক্ষাগুলো সে সম্পর্কে কিছু বলে না।
docs-কে schema-র সঙ্গে মেলান। Rook docs বলে, mon-এর সংখ্যা ১ থেকে ৯-এর মধ্যে হতে হবে Source 36সোর্স 36। ১২ নম্বর ধাপের CRD-তে আছে "minimum": 0, আর ১৩ নম্বর ধাপে API server count: 0 গ্রহণ করেছে। একজন tester এমন ফাঁক জানাতে পারেন। operator ০ প্রত্যাখ্যান করে কি না, টিউটোরিয়াল তা জানে না। docs আরও বলে, সর্বোচ্চ availability-র জন্য mon-এর সংখ্যা বিজোড় দেওয়া উচিত Source 36সোর্স 36।
একটা storage node পরীক্ষা করুন। Ceph storage cluster সাজাতে এই স্থানীয় storage-এর অন্তত একটা লাগে: raw device, raw partition, LVM logical volume, অথবা block mode-এর storage class থেকে পাওয়া persistent volume Source 33সোর্স 33। Rook কোনো device-কে অনুপলব্ধ ঠিক করলে (তাতে বিদ্যমান partition বা formatted filesystem আছে), Rook সেই device ব্যবহার করা এড়িয়ে যাবে Source 38সোর্স 38। কোনো device এড়ানো হয়েছে কি না দেখতে, যে node-এ device এড়ানো হয়েছে সেই node-এর OSD preparation log দেখুন Source 38সোর্স 38। ১৫ নম্বর ধাপ prerequisites page-এর পরীক্ষাগুলো টিউটোরিয়ালের machine-এ চালিয়েছে। প্রতিটা partition-এ filesystem ছিল। rbd module ছিল, কিন্তু load করা ছিল না। একটা systemd-udevd process চলছিল। kernel ছিল 7.0.0-43-generic।
Ceph কখন চলে। Rook toolbox হলো একটা container, যাতে rook debug আর test করার সাধারণ tool আছে Source 37সোর্স 37। তার উদাহরণ command হলো ceph status, ceph osd status, ceph df আর rados df Source 37সোর্স 37। docs PVC pending থেকে যাওয়ার দুটো সাধারণ কারণ তালিকাভুক্ত করে। cluster-এ কোনো OSD নেই, অথবা CSI provisioner pod চলছে না বা request-এর উত্তর দিচ্ছে না Source 38সোর্স 38। একটা test cluster-এ মাত্র একটা OSD লাগে Source 38সোর্স 38। production storage class-এর উদাহরণে তিনটা OSD থাকতে হতো Source 38সোর্স 38। টিউটোরিয়াল কোনো operator চালায়নি, আর এগুলোর কোনোটাই চালায়নি।
Common mistakes
- Treating a containerd namespace as a security boundary. The docs call namespaces an administrative construct that is not meant to be used as a security feature Source 9সোর্স 9. They add that it is trivial for clients to switch namespaces Source 9সোর্স 9. In step 6, the option
-n otherwas enough to read another namespace. - Looking in the wrong namespace. If you do not provide a namespace,
ctrclient commands usedefaultSource 9সোর্স 9. The node of step 14 had onlyk8s.io. The namespaceotherof step 6 had 0 images. - Counting disk space per namespace, or expecting it back at once. In step 6, two namespaces listed the same 42 blobs, and the store held 42 files. The garbage collector is scheduled on a background goroutine Source 13সোর্স 13. Step 7 used
--sync. - Letting the kubelet and the runtime disagree on the cgroup driver. It is critical that they use the same driver Source 21সোর্স 21. The default configuration of containerd 2.4.2 has
SystemdCgroup = false(step 3), and the node of step 14 hadSystemdCgroup = true. Do not assume the default. - Reading an accepted custom resource as a working cluster. In step 13, the API server created the
CephCluster, andPHASE,MESSAGE, andHEALTHstayed empty. The Rook operator deploys, configures, provisions, scales, upgrades, and monitors Ceph by building on Kubernetes resources Source 30সোর্স 30. The tutorial's cluster had no operator. - Trusting
kubectl explainfor limits. In step 12,kubectl explain cephcluster.spec.mon.countprintedcount <integer>and one line of text, and no range. The range is in the CRD,"minimum": 0and"maximum": 9, and the Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36. - Turning off
crds.enabledlater. The chart docs warn that it should only be set during first deployment, and that if it is later disabled the cluster may be destroyed Source 34সোর্স 34. The tutorial did not install the operator chart, so it did not test this. - Reusing the hosts of a deleted test cluster. The docs warn that for test scenarios, if you delete a cluster and start a new cluster on the same hosts, the path used by
dataDirHostPathmust be deleted Source 36সোর্স 36. Otherwise, stale keys and other config remain, and the new mons fail to start Source 36সোর্স 36. The tutorial did not test this. - Choosing the number of mons without a reason. For highest availability, an odd number of mons should be specified Source 36সোর্স 36. For higher durability in case of mon loss, an even number can be specified although availability may be lower Source 36সোর্স 36. To maintain quorum, a majority of mons must be up Source 36সোর্স 36.
- Offering Rook a disk that has a filesystem. Rook skips a device that has existing partitions or a formatted filesystem Source 38সোর্স 38. In step 15, every partition of the tutorial's machine had a filesystem.
- Debugging a Pending Pod on the node. The scheduler matches Pods to Nodes so that the kubelet can run them Source 23সোর্স 23. In step 11, the Pod was
Pendingwith the reasonUnschedulableuntil the node got the label. The tutorial's advice is to read the events of the Pod first.
সহজ English
- Treating a containerd namespace as a security boundary. The docs call namespaces an administrative construct that is not meant to be used as a security feature Source 9সোর্স 9. They add that it is trivial for clients to switch namespaces Source 9সোর্স 9. In step 6, the option
-n otherwas enough to read another namespace. - Looking in the wrong namespace. If you do not provide a namespace,
ctrclient commands usedefaultSource 9সোর্স 9. The node of step 14 had onlyk8s.io. The namespaceotherof step 6 had 0 images. - Counting disk space per namespace, or expecting it back at once. In step 6, two namespaces listed the same 42 blobs, and the store held 42 files. The garbage collector is scheduled on a background goroutine Source 13সোর্স 13. Step 7 used
--sync. - Letting the kubelet and the runtime disagree on the cgroup driver. It is critical that they use the same driver Source 21সোর্স 21. The default configuration of containerd 2.4.2 has
SystemdCgroup = false(step 3), and the node of step 14 hadSystemdCgroup = true. Do not assume the default. - Reading an accepted custom resource as a working cluster. In step 13, the API server created the
CephCluster, andPHASE,MESSAGE, andHEALTHstayed empty. The Rook operator deploys, configures, provisions, scales, upgrades, and monitors Ceph by building on Kubernetes resources Source 30সোর্স 30. The tutorial's cluster had no operator. - Trusting
kubectl explainfor limits. In step 12,kubectl explain cephcluster.spec.mon.countprintedcount <integer>and one line of text, and no range. The range is in the CRD,"minimum": 0and"maximum": 9, and the Rook docs say that the number must be between 1 and 9 Source 36সোর্স 36. - Turning off
crds.enabledlater. The chart docs warn that it should only be set during first deployment, and that if it is later disabled the cluster may be destroyed Source 34সোর্স 34. The tutorial did not install the operator chart, so it did not test this. - Reusing the hosts of a deleted test cluster. The docs warn that for test scenarios, if you delete a cluster and start a new cluster on the same hosts, the path used by
dataDirHostPathmust be deleted Source 36সোর্স 36. Otherwise, stale keys and other config remain, and the new mons fail to start Source 36সোর্স 36. The tutorial did not test this. - Choosing the number of mons without a reason. For highest availability, an odd number of mons should be specified Source 36সোর্স 36. For higher durability in case of mon loss, an even number can be specified although availability may be lower Source 36সোর্স 36. To maintain quorum, a majority of mons must be up Source 36সোর্স 36.
- Offering Rook a disk that has a filesystem. Rook skips a device that has existing partitions or a formatted filesystem Source 38সোর্স 38. In step 15, every partition of the tutorial's machine had a filesystem.
- Debugging a Pending Pod on the node. The scheduler matches Pods to Nodes so that the kubelet can run them Source 23সোর্স 23. In step 11, the Pod was
Pendingwith the reasonUnschedulableuntil the node got the label. The tutorial's advice is to read the events of the Pod first.
বাংলা ব্যাখ্যা
- একটা containerd namespace-কে security-র সীমানা ভাবা। docs namespace-কে বলে একটা প্রশাসনিক কাঠামো, যা security feature হিসেবে ব্যবহারের জন্য নয় Source 9সোর্স 9। তারা যোগ করে, client-এর পক্ষে namespace বদলানো সহজ Source 9সোর্স 9। ৬ নম্বর ধাপে
-n otheroption-ই অন্য একটা namespace পড়ার জন্য যথেষ্ট ছিল। - ভুল namespace-এ খোঁজা। আপনি namespace না দিলে
ctrclient commanddefaultব্যবহার করে Source 9সোর্স 9। ১৪ নম্বর ধাপের node-এ ছিল শুধুk8s.io। ৬ নম্বর ধাপেরothernamespace-এ ছিল ০টা image। - namespace ধরে disk-এর জায়গা গোনা, বা জায়গা সঙ্গে সঙ্গে ফেরত আশা করা। ৬ নম্বর ধাপে দুটো namespace একই 42টা blob তালিকাভুক্ত করেছে, আর store-এ ছিল 42টা file। garbage collector একটা background goroutine-এ schedule হয় Source 13সোর্স 13। ৭ নম্বর ধাপ
--syncব্যবহার করেছে। - kubelet আর runtime-কে cgroup driver নিয়ে ভিন্ন মত রাখতে দেওয়া। দুটোই একই driver ব্যবহার করবে, এটা অত্যন্ত জরুরি Source 21সোর্স 21। containerd 2.4.2-এর default configuration-এ আছে
SystemdCgroup = false(৩ নম্বর ধাপ), আর ১৪ নম্বর ধাপের node-এ ছিলSystemdCgroup = true। default ধরে নেবেন না। - একটা গৃহীত custom resource-কে চালু cluster ভাবা। ১৩ নম্বর ধাপে API server
CephClusterতৈরি করেছে, আরPHASE,MESSAGEওHEALTHফাঁকা থেকেছে। Rook operator Kubernetes resource-এর ওপর ভর করে Ceph-কে deploy, configure, provision, scale, upgrade আর monitor করে Source 30সোর্স 30। টিউটোরিয়ালের cluster-এ কোনো operator ছিল না। - সীমার জন্য
kubectl explain-এর ওপর ভরসা করা। ১২ নম্বর ধাপেkubectl explain cephcluster.spec.mon.countছাপিয়েছেcount <integer>আর এক লাইনের লেখা, কোনো পরিসর নয়। পরিসর আছে CRD-তে,"minimum": 0আর"maximum": 9, আর Rook docs বলে, সংখ্যাটা ১ থেকে ৯-এর মধ্যে হতে হবে Source 36সোর্স 36। - পরে
crds.enabledবন্ধ করা। chart docs সতর্ক করে, এটা কেবল প্রথম deployment-এর সময় ঠিক করা উচিত, আর পরে বন্ধ করলে cluster ধ্বংস হয়ে যেতে পারে Source 34সোর্স 34। টিউটোরিয়াল operator chart install করেনি, তাই এটা পরীক্ষা করেনি। - মুছে ফেলা test cluster-এর host আবার ব্যবহার করা। docs সতর্ক করে, test-এর ক্ষেত্রে একটা cluster মুছে একই host-এ নতুন cluster চালু করলে
dataDirHostPath-এর path মুছে ফেলতে হবে Source 36সোর্স 36। না হলে আগের cluster-এর পুরনো key আর config থেকে যায়, আর নতুন mon চালু হতে ব্যর্থ হয় Source 36সোর্স 36। টিউটোরিয়াল এটা পরীক্ষা করেনি। - কারণ ছাড়া mon-এর সংখ্যা বাছা। সর্বোচ্চ availability-র জন্য mon-এর সংখ্যা বিজোড় দেওয়া উচিত Source 36সোর্স 36। mon হারানোর ক্ষেত্রে বেশি durability-র জন্য একটা জোড় সংখ্যা দেওয়া যেতে পারে, যদিও availability কম হতে পারে Source 36সোর্স 36। quorum ধরে রাখতে mon-এর সংখ্যাগরিষ্ঠকে চালু থাকতে হবে Source 36সোর্স 36।
- Rook-কে এমন disk দেওয়া, যাতে filesystem আছে। Rook এমন device এড়িয়ে যায়, যাতে বিদ্যমান partition বা formatted filesystem আছে Source 38সোর্স 38। ১৫ নম্বর ধাপে টিউটোরিয়ালের machine-এর প্রতিটা partition-এ filesystem ছিল।
- একটা Pending Pod node-এ গিয়ে debug করা। scheduler Pod-কে Node-এর সঙ্গে মেলায়, যাতে kubelet সেগুলো চালাতে পারে Source 23সোর্স 23। ১১ নম্বর ধাপে node label না পাওয়া পর্যন্ত Pod ছিল
Pending, reasonUnschedulableসহ। টিউটোরিয়ালের পরামর্শ হলো আগে Pod-এর event পড়া।
What a tester can check
Tutorial advice
This list is the tutorial's own advice for a tester who works with containerd, the Kubernetes scheduler, and Rook.
- Write the container runtime and its version in every test report, from
kubectl get nodes -o wide. - Compare the cgroup driver of the kubelet and of containerd on each node, and do not rely on the default of either.
- Look for images with
crictlon a node, and give the namespacek8s.iotoctrthere. - Compare image digests, not tags, when you say that two environments run the same image.
- Use
ctr images rm --syncin a test that checks free disk space after a removal. - Read
kubectl get events --field-selector reason=FailedSchedulingbefore you look at a node when a Pod staysPending. - Run
kubectl apply --dry-run=serveron every custom resource file in a pull request, against the CRDs of the target version. - Test the edges of a CRD schema with one bad file for each rule: a wrong type, a value over the maximum, an unknown field, and a change of an immutable field.
- Compare the limits that the docs give with the limits of the CRD schema, and report a gap.
- Check each storage node against the Rook prerequisites before you install the operator: no filesystem on the devices, the
rbdmodule, a udev daemon, and the kernel version. - Keep the output of
kubectl get cephclusterandceph statusin the report. An accepted custom resource is not a healthy cluster.
সহজ English
Tutorial advice
This list is the tutorial's own advice for a tester who works with containerd, the Kubernetes scheduler, and Rook.
- Write the container runtime and its version in every test report, from
kubectl get nodes -o wide. - Compare the cgroup driver of the kubelet and of containerd on each node, and do not rely on the default of either.
- Look for images with
crictlon a node, and give the namespacek8s.iotoctrthere. - Compare image digests, not tags, when you say that two environments run the same image.
- Use
ctr images rm --syncin a test that checks free disk space after a removal. - Read
kubectl get events --field-selector reason=FailedSchedulingbefore you look at a node when a Pod staysPending. - Run
kubectl apply --dry-run=serveron every custom resource file in a pull request, against the CRDs of the target version. - Test the edges of a CRD schema with one bad file for each rule: a wrong type, a value over the maximum, an unknown field, and a change of an immutable field.
- Compare the limits that the docs give with the limits of the CRD schema, and report a gap.
- Check each storage node against the Rook prerequisites before you install the operator: no filesystem on the devices, the
rbdmodule, a udev daemon, and the kernel version. - Keep the output of
kubectl get cephclusterandceph statusin the report. An accepted custom resource is not a healthy cluster.
বাংলা ব্যাখ্যা
Tutorial advice
এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, এমন একজন tester-এর জন্য যিনি containerd, Kubernetes scheduler আর Rook নিয়ে কাজ করেন।
- প্রতিটা test report-এ
kubectl get nodes -o wideথেকে নেওয়া container runtime আর তার সংস্করণ লিখুন। - প্রতিটা node-এ kubelet আর containerd-এর cgroup driver মিলিয়ে দেখুন, আর কোনোটারই default-এর ওপর ভরসা করবেন না।
- একটা node-এ image খুঁজতে
crictlব্যবহার করুন, আর সেখানেctr-কেk8s.ionamespace দিন। - দুটো environment একই image চালায় বলার সময় tag নয়, image-এর digest মিলিয়ে দেখুন।
- image সরানোর পর খালি disk-এর জায়গা পরীক্ষা করে এমন test-এ
ctr images rm --syncব্যবহার করুন। - কোনো Pod
Pendingথাকলে node দেখার আগেkubectl get events --field-selector reason=FailedSchedulingপড়ুন। - pull request-এর প্রতিটা custom resource file-এ target সংস্করণের CRD-র বিরুদ্ধে
kubectl apply --dry-run=serverচালান। - প্রতিটা rule-এর জন্য একটা করে খারাপ file দিয়ে CRD schema-র কিনারা পরীক্ষা করুন: ভুল type, সর্বোচ্চ সীমার ওপরের মান, অচেনা field, আর immutable field-এর বদল।
- docs যে সীমা দেয় তা CRD schema-র সীমার সঙ্গে মিলিয়ে দেখুন, আর কোনো ফাঁক থাকলে জানান।
- operator install করার আগে প্রতিটা storage node Rook-এর prerequisites-এর বিরুদ্ধে পরীক্ষা করুন: device-এ filesystem নেই,
rbdmodule, একটা udev daemon, আর kernel-এর সংস্করণ। - report-এ
kubectl get cephclusterআরceph status-এর output রাখুন। একটা গৃহীত custom resource মানে সুস্থ cluster নয়।
Key words
| Term | Meaning |
|---|---|
| Graduated | highly mature, robust projects whose adopters have demonstrated their production-readiness by their deployment to production environments |
| Incubation | projects gaining adoption, focusing on improving stability and maturity |
| containerd | an industry-standard container runtime with an emphasis on simplicity, robustness and portability |
| CRI | the main protocol for the communication between the kubelet and the container runtime |
| Namespace | an administrative construct that is not meant to be used as a security feature |
| Snapshotter | Snapshotters manage the snapshots of the container filesystems |
| Unpacking | The layers must then be read and applied to a filesystem, which creates a committed snapshot |
| Image index | An image index contains a list of manifests for specific platforms |
| DiffID | A layer DiffID is the digest over the layer's uncompressed tar archive |
| Garbage collector | scheduled on a background goroutine, and it runs based on a number of configurable factors |
| kube-scheduler | the default scheduler for Kubernetes, and it runs as part of the control plane |
| nodeSelector | A nodeSelector only selects nodes with all the specified labels |
| Custom resource | an extension of the Kubernetes API that is not necessarily available in a default Kubernetes installation |
| Operator | clients of the Kubernetes API that act as controllers for a Custom Resource |
| Transition rule | A rule that refers to oldSelf is a transition rule |
| Rook | an open source cloud-native storage orchestrator |
| Ceph | a distributed storage system that provides file, block and object storage |
| CephCluster | used by Rook to allow creation and customization of storage clusters |