Skip to content

Commit 1be46e2

Browse files
authored
Merge pull request #51449 from windsonsea/imenvi
Make a list prettier in image-compatibility blog
2 parents 5f6e403 + c958319 commit 1be46e2

File tree

1 file changed

+32
-24
lines changed
  • content/en/blog/_posts/2025-06-25-image-compatibility-in-cloud-native-environments

1 file changed

+32
-24
lines changed

content/en/blog/_posts/2025-06-25-image-compatibility-in-cloud-native-environments/index.md

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ A container image is built on a base image, which provides a minimal runtime env
2727
Host driver versions must match the supported range of a library version inside the container to avoid compatibility problems. Examples include GPUs and network drivers.
2828
- **Libraries or Software**:
2929
The container must come with a specific version or range of versions for a library or software to run optimally in the environment. Examples from high performance computing are MPI, EFA, or Infiniband.
30-
- **Kernel Modules or Features:**:
30+
- **Kernel Modules or Features**:
3131
Specific kernel features or modules must be present. Examples include having support of write protected huge page faults, or the presence of VFIO
3232
- And more…
3333

@@ -121,33 +121,41 @@ Additionally, it could potentially enable automatic node configuration to some e
121121
122122
### Examples of usage
123123
124-
1. **Define image compatibility metadata**
125-
A [container image](/docs/concepts/containers/images) can have metadata that describes its requirements based on features discovered from nodes, like kernel modules or CPU models.
126-
The previous compatibility specification example in this article exemplified this use case.
127-
128-
2. **Attach the artifact to the image**
129-
The image compatibility specification is stored as an OCI artifact.
130-
You can attach this metadata to your container image using the [oras](https://oras.land/) tool.
131-
The registry only needs to support OCI artifacts, support for arbitrary types is not required.
132-
Keep in mind that the container image and the artifact must be stored in the same registry.
133-
Use the following command to attach the artifact to the image:
134-
135-
```bash
136-
oras attach \
137-
--artifact-type application/vnd.nfd.image-compatibility.v1alpha1 <image-url> \
138-
<path-to-spec>.yaml:application/vnd.nfd.image-compatibility.spec.v1alpha1+yaml
139-
```
124+
1. **Define image compatibility metadata**
125+
126+
A [container image](/docs/concepts/containers/images) can have metadata that describes
127+
its requirements based on features discovered from nodes, like kernel modules or CPU models.
128+
The previous compatibility specification example in this article exemplified this use case.
129+
130+
2. **Attach the artifact to the image**
131+
132+
The image compatibility specification is stored as an OCI artifact.
133+
You can attach this metadata to your container image using the [oras](https://oras.land/) tool.
134+
The registry only needs to support OCI artifacts, support for arbitrary types is not required.
135+
Keep in mind that the container image and the artifact must be stored in the same registry.
136+
Use the following command to attach the artifact to the image:
137+
138+
```bash
139+
oras attach \
140+
--artifact-type application/vnd.nfd.image-compatibility.v1alpha1 <image-url> \
141+
<path-to-spec>.yaml:application/vnd.nfd.image-compatibility.spec.v1alpha1+yaml
142+
```
143+
144+
3. **Validate image compatibility**
145+
146+
After attaching the compatibility specification, you can validate whether a node meets the
147+
image's requirements. This validation can be done using the
148+
[nfd client](https://kubernetes-sigs.github.io/node-feature-discovery/v0.17/reference/node-feature-client-reference.html):
140149

141-
3. **Validate image compatibility**
142-
After attaching the compatibility specification, you can validate whether a node meets the image's requirements.
143-
This validation can be done using the [nfd client](https://kubernetes-sigs.github.io/node-feature-discovery/v0.17/reference/node-feature-client-reference.html):
150+
```bash
151+
nfd compat validate-node --image <image-url>
152+
```
144153

145-
`nfd compat validate-node --image <image-url>`
154+
4. **Read the output from the client**
146155

147-
4. **Read the output from the client**
148-
Finally you can read the report generated by the tool or use your own tools to act based on the generated JSON report.
156+
Finally you can read the report generated by the tool or use your own tools to act based on the generated JSON report.
149157

150-
![validate-node command output](validate-node-output.png)
158+
![validate-node command output](validate-node-output.png)
151159

152160
## Conclusion
153161

0 commit comments

Comments
 (0)