{"id":427351,"date":"2024-07-25T21:42:00","date_gmt":"2024-07-25T21:42:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=427351"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=427351","title":{"rendered":"<span>\u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c WebAssembly-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Kubernetes \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Deckhouse<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0415\u0433\u043e\u0440 \u041b\u0430\u0437\u0430\u0440\u0435\u0432, DevOps-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0424\u043b\u0430\u043d\u0442\u00bb. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f <a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/734678\/\"><u>WebAssembly (Wasm)<\/u><\/a> \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Wasm \u0432 Kubernetes, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u043a\u0443\u0431\u043e\u0432: \u0448\u0435\u0440\u0438\u043d\u0433 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/42b\/20e\/407\/42b20e40706efd686fea71b7b026fe34.png\" width=\"1600\" height=\"920\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42b\/20e\/407\/42b20e40706efd686fea71b7b026fe34.png\"\/><\/figure>\n<p>\u041d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u043c Kubernetes \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430\u0445. \u0428\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b \u0440\u0443\u043a\u0430\u043c\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043a\u0430\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u044b \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0437\u043b\u0430\u043c\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 <a href=\"https:\/\/deckhouse.ru\/products\/kubernetes-platform\/\"><u>Deckhouse Kubernetes Platform (DKP)<\/u><\/a>. \u042d\u0442\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 Kubernetes.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Kubernetes \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DKP. \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044c.\u00a0<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 NodeGroup<\/h3>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u00ab\u043e\u0431\u044b\u0447\u043d\u0443\u044e\u00bb \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 Wasm-\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0443\u0437\u0435\u043b \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c NodeGroup, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438. \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 NodeGroup \u043b\u0435\u0439\u0431\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NodeSelector \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0437\u043b\u044b:<\/p>\n<pre><code class=\"bash\">kubectl create -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1 kind: NodeGroup metadata:   name: wasm spec:   cloudInstances:     classReference:       kind: YandexInstanceClass       name: worker     maxPerZone: 1     minPerZone: 1     zones:     - ru-central1-a   disruptions:     approvalMode: Automatic   kubelet:     containerLogMaxFiles: 4     containerLogMaxSize: 50Mi     resourceReservation:       mode: Auto   nodeTemplate:     labels:       node.deckhouse.io\/group: wasm   nodeType: CloudEphemeral EOF <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NodeGroup DKP \u0437\u0430\u043a\u0430\u0436\u0435\u0442 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043e\u0434\u043d\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u0437\u043e\u043d\u0435 <code>ru-central1-a<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e <code>YandexInstanceClass=worker<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043d\u0430 \u043d\u0435\u0451 \u043b\u0435\u0439\u0431\u043b <code>node.deckhouse.io\/group=wasm<\/code>.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 WasmEdge runtime<\/h3>\n<p>\u0412 Kubernetes \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 runtime \u2014 WASI (WebAssembly System Interface). \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c WasmEdge. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e containerd \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430\u043c\u0438. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 WasmEdge \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 NodeGroupConfiguration, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 bin-\u0444\u0430\u0439\u043b\u0430 WASI \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bashbooster \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0435\u0440\u0436 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430 containerd \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u0438\u0437 <code>\/etc\/containerd\/conf.d\/*.toml<\/code>. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 <code>\/etc\/containerd\/config.toml<\/code> \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0449\u0435\u043d containerd:<\/p>\n<pre><code class=\"bash\">kubectl create -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1alpha1 kind: NodeGroupConfiguration metadata:   name: wasm-additional-shim.sh spec:   bundles:     - '*'   content: |     [ -f \"\/bin\/containerd-shim-wasmedge-v1\" ] || curl -L https:\/\/github.com\/containerd\/runwasi\/releases\/download\/containerd-shim-wasmedge%2Fv0.3.0\/containerd-shim-wasmedge-$(uname -m | sed s\/arm64\/aarch64\/g | sed s\/amd64\/x86_64\/g).tar.gz | tar -xzf - -C \/bin      mkdir -p \/etc\/containerd\/conf.d     bb-sync-file \/etc\/containerd\/conf.d\/additional_shim.toml - containerd-config-changed &lt;&lt; \"EOF\"     [plugins]       [plugins.\"io.containerd.grpc.v1.cri\"]         [plugins.\"io.containerd.grpc.v1.cri\".containerd]           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes]             [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge]               runtime_type = \"io.containerd.wasmedge.v1\"               [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge.options]                 BinaryName = \"\/bin\/containerd-shim-wasmedge-v1\"     EOF   nodeGroups:     - \"wasm\"   weight: 30 EOF <\/code><\/pre>\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 RuntimeClass<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 WasmEdge \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 RuntimeClass, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u044f\u0432\u043d\u043e \u0432 \u043f\u043e\u0434\u0430\u0445 \u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>spec.runtimeClassName<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF --- apiVersion: node.k8s.io\/v1 kind: RuntimeClass metadata:   name: wasmedge handler: wasmedge EOF<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e bashible \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0443\u0437\u043b\u0430 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e containerd:<\/p>\n<pre><code class=\"bash\">root@test-wasm-75934c42-5956c-l5m7f:~# grep wasm \/etc\/containerd\/config.toml         [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge]           runtime_type = \"io.containerd.wasmedge.v1\"           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge.options]             BinaryName = \"\/bin\/containerd-shim-wasmedge-v1\"<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Job \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c WebAssembly-\u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0412 \u0434\u0436\u043e\u0431\u0435 \u0443\u043a\u0430\u0436\u0435\u043c NodeSelector \u0438 \u043d\u043e\u0432\u043e\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 RuntimeClass <code>wasmedge<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF apiVersion: batch\/v1 kind: Job metadata:   name: wasm-test spec:   template:     spec:       containers:       - image: wasmedge\/example-wasi:latest         name: wasm-test         resources: {}       restartPolicy: Never       runtimeClassName: wasmedge       nodeSelector:         node.deckhouse.io\/group: wasm   backoffLimit: 1 EOF<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u043b\u043e\u0433\u0438 \u043f\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<\/p>\n<pre><code class=\"bash\">root@test-master-0:~# kubectl get pods NAME              READY   STATUS      RESTARTS   AGE wasm-test-2g5jl   0\/1     Completed   0          18s  root@test-master-0:~# kubectl logs wasm-test-2g5jl Random number: -700610054 Random bytes: [163, 184, 229, 154, 4, 145, 145, 96, 181, 77, 64, 159, 123, 45, 5, 134, 93, 193, 207, 74, 129, 113, 204, 174, 188, 152, 172, 151, 125, 78, 199, 177, 127, 112, 116, 255, 188, 180, 47, 110, 22, 241, 63, 87, 78, 168, 36, 202, 168, 90, 248, 79, 38, 59, 204, 128, 141, 92, 209, 205, 129, 51, 71, 214, 91, 237, 115, 145, 77, 136, 166, 115, 221, 66, 123, 186, 19, 39, 122, 204, 103, 221, 89, 97, 148, 57, 250, 255, 165, 53, 14, 241, 97, 138, 147, 201, 204, 29, 76, 219, 128, 48, 143, 165, 138, 231, 62, 235, 190, 94, 142, 63, 197, 37, 57, 241, 33, 99, 240, 215, 216, 33, 68, 141, 82, 21, 152, 93] Printed from wasi: This is from a main function This is from a main function The env vars are as follows. KUBERNETES_SERVICE_PORT_HTTPS: 443 KUBERNETES_PORT_443_TCP: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP_ADDR: 10.222.0.1 KUBERNETES_PORT_443_TCP_PROTO: tcp KUBERNETES_SERVICE_PORT: 443 HOSTNAME: wasm-test-2g5jl PATH: \/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin KUBERNETES_SERVICE_HOST: 10.222.0.1 KUBERNETES_PORT: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP_PORT: 443 The args are as follows. \/wasi_example_main.wasm File content is This is in a file<\/code><\/pre>\n<p>\u041f\u043e\u0434 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 <code>Completed<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c \u0438 \u043f\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0412 \u043b\u043e\u0433\u0430\u0445 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0431\u0430\u0439\u0442\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e \u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.\u00a0<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 init-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0432 \u043f\u043e\u0434\u0430\u0445 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b init- \u0438\u043b\u0438 sidecar-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u00ab\u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e\u00bb container image, \u0430 \u043d\u0435 \u043a\u0430\u043a Wasm. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u0432\u043e\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>runtimeClassName<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u043e\u0434\u0430, \u0430 \u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.\u00a0<\/p>\n<p>Containerd \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u0430. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>runc<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442. \u041d\u043e \u0432 \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u0430\u043a\u043e\u0435 \u0435\u0441\u0442\u044c \u0443 <code>crun<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c <code>crun<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 WasmEdge. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>NodeGroupConfiguration<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1alpha1 kind: NodeGroupConfiguration metadata:   name: crun-install.sh spec:   bundles:   - '*'   content: |     if ! [ -x \/usr\/local\/bin\/crun ]; then       apt-get update &amp;&amp; apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libprotobuf-c-dev libcap-dev libseccomp-dev libyajl-dev go-md2man autoconf python3 automake       cd \/root       [ -f \"\/root\/.wasmedge\/bin\/wasmedge\" ] || curl -sSf https:\/\/raw.githubusercontent.com\/WasmEdge\/WasmEdge\/master\/utils\/install.sh | bash       git clone https:\/\/github.com\/containers\/crun &amp;&amp; cd crun       .\/autogen.sh       source \/root\/.wasmedge\/env &amp;&amp; .\/configure --with-wasmedge       make       make install       cd .. &amp;&amp; rm -rf crun     fi       echo \"crun has been installed\"     mkdir -p \/etc\/containerd\/conf.d     bb-sync-file \/etc\/containerd\/conf.d\/add_crun.toml - containerd-config-changed &lt;&lt; \"EOF\"     [plugins]       [plugins.\"io.containerd.grpc.v1.cri\"]         [plugins.\"io.containerd.grpc.v1.cri\".containerd]           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes]             [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.crun]               runtime_type = \"io.containerd.runc.v2\"               pod_annotations = [\"*.wasm.*\", \"wasm.*\", \"module.wasm.image\/*\", \"*.module.wasm.image\", \"module.wasm.image\/variant.*\"]               [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.crun.options]                 BinaryName = \"\/usr\/local\/bin\/crun\"     EOF   nodeGroups:   - wasm   weight: 30 EOF<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e WasmEdge (\u0440\u0430\u043d\u0435\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 WasmEdge runtime), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c <code>crun<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e <code>\/etc\/containerd\/config.toml<\/code> \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0440\u0430\u043d\u0442\u0430\u0439\u043c, \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.\u00a0<\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <code>pod_annotations<\/code>. \u042d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u0432 OCI \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435.\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 RuntimeClass:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF --- apiVersion: node.k8s.io\/v1 kind: RuntimeClass metadata:   name: crun handler: crun EOF<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF apiVersion: batch\/v1 kind: Job metadata:   name: wasm-test spec:   template:     metadata:       annotations:         module.wasm.image\/variant: compat-smart     spec:       initContainers:       - name: hello         image: busybox:latest         command: ['sh', '-c', 'echo \"Hello, Habr!\"']       containers:       - image: wasmedge\/example-wasi:latest         name: wasm-test         resources: {}       restartPolicy: Never       runtimeClassName: crun       nodeSelector:         node.deckhouse.io\/group: wasm   backoffLimit: 1 EOF<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c <code>runtimeClassName: crun<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043e\u0442\u0432\u0435\u0447\u0430\u043b <code>crun<\/code>, \u0430 \u043d\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 <code>runc<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <code>module.wasm.image\/variant: compat-smart<\/code>, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <code>crun<\/code> \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0432 \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, WASM-\u043e\u0431\u0440\u0430\u0437 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d \u0441 OCI \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0435\u0439:<\/p>\n<pre><code class=\"bash\">... \"annotations\": {  \"run.oci.handler\": \"wasm\" }, ...<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>pod_annotations<\/code> \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 containerd \u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <em>compat-smart<\/em> \u043d\u0430 \u043a\u0443\u0431\u043e\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u0442\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>crun<\/code> \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u043a\u0430\u043a\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443, \u0430 \u043a\u0430\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 Wasm runtime.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u0434\u0430 \u0438 \u043b\u043e\u0433\u0438. \u0412 \u043b\u043e\u0433\u0430\u0445 \u0443\u0432\u0438\u0434\u0438\u043c \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"bash\">root@test-master-0:~# kubectl get pods NAME              READY   STATUS      RESTARTS   AGE wasm-test-pn4gv   0\/1     Completed   0          32s  root@test-master-0:~# kubectl logs wasm-test-pn4gv Defaulted container \"wasm-test\" out of: wasm-test, hello (init) Random number: -158793507 Random bytes: [210, 246, 181, 132, 184, 214, 110, 71, 198, 68, 154, 182, 253, 103, 116, 207, 5, 205, 185, 81, 19, 28, 61, 61, 85, 26, 222, 111, 239, 110, 21, 68, 119, 245, 153, 190, 105, 175, 191, 163, 48, 198, 41, 207, 155, 30, 122, 166, 23, 56, 59, 168, 91, 57, 103, 213, 145, 10, 130, 224, 28, 5, 73, 176, 206, 111, 37, 241, 38, 57, 98, 158, 150, 115, 249, 233, 194, 156, 13, 109, 85, 130, 232, 91, 253, 16, 8, 233, 92, 162, 237, 197, 151, 112, 52, 140, 83, 179, 31, 48, 233, 56, 54, 75, 43, 239, 233, 169, 169, 81, 36, 52, 59, 66, 102, 40, 52, 202, 34, 56, 167, 229, 197, 25, 72, 136, 147, 254] Printed from wasi: This is from a main function This is from a main function The env vars are as follows. PATH: \/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin HOSTNAME: wasm-test-pn4gv KUBERNETES_PORT: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP_PROTO: tcp KUBERNETES_PORT_443_TCP_PORT: 443 KUBERNETES_PORT_443_TCP_ADDR: 10.222.0.1 KUBERNETES_SERVICE_HOST: 10.222.0.1 KUBERNETES_SERVICE_PORT: 443 KUBERNETES_SERVICE_PORT_HTTPS: 443 HOME: \/ The args are as follows. \/wasi_example_main.wasm File content is This is in a file<\/code><\/pre>\n<p>\u0418 \u043b\u043e\u0433\u0438 init-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">root@test-master-0:~# kubectl logs wasm-test-pn4gv -c hello Hello, Habr!<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a WebAssembly-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 Kubernetes \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Deckhouse \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.\u00a0<\/p>\n<p>Deckhouse Kubernetes Platform \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u0438 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445.<\/p>\n<h3>P. S.<\/h3>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/734678\/\"><u>WebAssembly: Docker \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/796857\/\"><u>Wasm vs Docker containers vs Kubernetes vs serverless: \u0431\u0438\u0442\u0432\u0430 \u0437\u0430 \u043f\u0435\u0440\u0432\u0435\u043d\u0441\u0442\u0432\u043e<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/826228\/\"><u>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 Deckhouse Kubernetes Platform 1.48\u20131.60<\/u><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/829946\/\"> https:\/\/habr.com\/ru\/articles\/829946\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0415\u0433\u043e\u0440 \u041b\u0430\u0437\u0430\u0440\u0435\u0432, DevOps-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0424\u043b\u0430\u043d\u0442\u00bb. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f <a href=\"https:\/\/habr.com\/ru\/companies\/flant\/articles\/734678\/\"><u>WebAssembly (Wasm)<\/u><\/a> \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0432\u043e\u0435\u0439 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a\u043e\u0435 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Wasm \u0432 Kubernetes, \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 \u043a\u0443\u0431\u043e\u0432: \u0448\u0435\u0440\u0438\u043d\u0433 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u043e\u043c Kubernetes \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0443\u0437\u043b\u0430\u0445. \u0428\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u043b\u044b. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b \u0440\u0443\u043a\u0430\u043c\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043a\u0430\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u044b \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0437\u043b\u0430\u043c\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 <a href=\"https:\/\/deckhouse.ru\/products\/kubernetes-platform\/\"><u>Deckhouse Kubernetes Platform (DKP)<\/u><\/a>. \u042d\u0442\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 Kubernetes.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Kubernetes \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DKP. \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 WebAssembly-\u043c\u043e\u0434\u0443\u043b\u044c.\u00a0<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 NodeGroup<\/h3>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u00ab\u043e\u0431\u044b\u0447\u043d\u0443\u044e\u00bb \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 Wasm-\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0443\u0437\u0435\u043b \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c NodeGroup, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438. \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 NodeGroup \u043b\u0435\u0439\u0431\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NodeSelector \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0437\u043b\u044b:<\/p>\n<pre><code class=\"bash\">kubectl create -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1 kind: NodeGroup metadata:   name: wasm spec:   cloudInstances:     classReference:       kind: YandexInstanceClass       name: worker     maxPerZone: 1     minPerZone: 1     zones:     - ru-central1-a   disruptions:     approvalMode: Automatic   kubelet:     containerLogMaxFiles: 4     containerLogMaxSize: 50Mi     resourceReservation:       mode: Auto   nodeTemplate:     labels:       node.deckhouse.io\/group: wasm   nodeType: CloudEphemeral EOF <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f NodeGroup DKP \u0437\u0430\u043a\u0430\u0436\u0435\u0442 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043e\u0434\u043d\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u0437\u043e\u043d\u0435 <code>ru-central1-a<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e <code>YandexInstanceClass=worker<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043d\u0430 \u043d\u0435\u0451 \u043b\u0435\u0439\u0431\u043b <code>node.deckhouse.io\/group=wasm<\/code>.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 WasmEdge runtime<\/h3>\n<p>\u0412 Kubernetes \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 runtime \u2014 WASI (WebAssembly System Interface). \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c WasmEdge. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e containerd \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430\u043c\u0438. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 WasmEdge \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 NodeGroupConfiguration, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 bin-\u0444\u0430\u0439\u043b\u0430 WASI \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bashbooster \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0435\u0440\u0436 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430 containerd \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c \u0438\u0437 <code>\/etc\/containerd\/conf.d\/*.toml<\/code>. \u041f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 <code>\/etc\/containerd\/config.toml<\/code> \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0449\u0435\u043d containerd:<\/p>\n<pre><code class=\"bash\">kubectl create -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1alpha1 kind: NodeGroupConfiguration metadata:   name: wasm-additional-shim.sh spec:   bundles:     - '*'   content: |     [ -f \"\/bin\/containerd-shim-wasmedge-v1\" ] || curl -L https:\/\/github.com\/containerd\/runwasi\/releases\/download\/containerd-shim-wasmedge%2Fv0.3.0\/containerd-shim-wasmedge-$(uname -m | sed s\/arm64\/aarch64\/g | sed s\/amd64\/x86_64\/g).tar.gz | tar -xzf - -C \/bin      mkdir -p \/etc\/containerd\/conf.d     bb-sync-file \/etc\/containerd\/conf.d\/additional_shim.toml - containerd-config-changed &lt;&lt; \"EOF\"     [plugins]       [plugins.\"io.containerd.grpc.v1.cri\"]         [plugins.\"io.containerd.grpc.v1.cri\".containerd]           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes]             [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge]               runtime_type = \"io.containerd.wasmedge.v1\"               [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge.options]                 BinaryName = \"\/bin\/containerd-shim-wasmedge-v1\"     EOF   nodeGroups:     - \"wasm\"   weight: 30 EOF <\/code><\/pre>\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 RuntimeClass<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 WasmEdge \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 RuntimeClass, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u044f\u0432\u043d\u043e \u0432 \u043f\u043e\u0434\u0430\u0445 \u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c <code>spec.runtimeClassName<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF --- apiVersion: node.k8s.io\/v1 kind: RuntimeClass metadata:   name: wasmedge handler: wasmedge EOF<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e bashible \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0443\u0437\u043b\u0430 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e containerd:<\/p>\n<pre><code class=\"bash\">root@test-wasm-75934c42-5956c-l5m7f:~# grep wasm \/etc\/containerd\/config.toml         [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge]           runtime_type = \"io.containerd.wasmedge.v1\"           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.wasmedge.options]             BinaryName = \"\/bin\/containerd-shim-wasmedge-v1\"<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Job \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c WebAssembly-\u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0412 \u0434\u0436\u043e\u0431\u0435 \u0443\u043a\u0430\u0436\u0435\u043c NodeSelector \u0438 \u043d\u043e\u0432\u043e\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 RuntimeClass <code>wasmedge<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF apiVersion: batch\/v1 kind: Job metadata:   name: wasm-test spec:   template:     spec:       containers:       - image: wasmedge\/example-wasi:latest         name: wasm-test         resources: {}       restartPolicy: Never       runtimeClassName: wasmedge       nodeSelector:         node.deckhouse.io\/group: wasm   backoffLimit: 1 EOF<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u043b\u043e\u0433\u0438 \u043f\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e:<\/p>\n<pre><code class=\"bash\">root@test-master-0:~# kubectl get pods NAME              READY   STATUS      RESTARTS   AGE wasm-test-2g5jl   0\/1     Completed   0          18s  root@test-master-0:~# kubectl logs wasm-test-2g5jl Random number: -700610054 Random bytes: [163, 184, 229, 154, 4, 145, 145, 96, 181, 77, 64, 159, 123, 45, 5, 134, 93, 193, 207, 74, 129, 113, 204, 174, 188, 152, 172, 151, 125, 78, 199, 177, 127, 112, 116, 255, 188, 180, 47, 110, 22, 241, 63, 87, 78, 168, 36, 202, 168, 90, 248, 79, 38, 59, 204, 128, 141, 92, 209, 205, 129, 51, 71, 214, 91, 237, 115, 145, 77, 136, 166, 115, 221, 66, 123, 186, 19, 39, 122, 204, 103, 221, 89, 97, 148, 57, 250, 255, 165, 53, 14, 241, 97, 138, 147, 201, 204, 29, 76, 219, 128, 48, 143, 165, 138, 231, 62, 235, 190, 94, 142, 63, 197, 37, 57, 241, 33, 99, 240, 215, 216, 33, 68, 141, 82, 21, 152, 93] Printed from wasi: This is from a main function This is from a main function The env vars are as follows. KUBERNETES_SERVICE_PORT_HTTPS: 443 KUBERNETES_PORT_443_TCP: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP_ADDR: 10.222.0.1 KUBERNETES_PORT_443_TCP_PROTO: tcp KUBERNETES_SERVICE_PORT: 443 HOSTNAME: wasm-test-2g5jl PATH: \/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin KUBERNETES_SERVICE_HOST: 10.222.0.1 KUBERNETES_PORT: tcp:\/\/10.222.0.1:443 KUBERNETES_PORT_443_TCP_PORT: 443 The args are as follows. \/wasi_example_main.wasm File content is This is in a file<\/code><\/pre>\n<p>\u041f\u043e\u0434 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 <code>Completed<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c \u0438 \u043f\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0412 \u043b\u043e\u0433\u0430\u0445 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0431\u0430\u0439\u0442\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e \u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.\u00a0<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e Wasm-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 init-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0432 \u043f\u043e\u0434\u0430\u0445 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b init- \u0438\u043b\u0438 sidecar-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u00ab\u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e\u00bb container image, \u0430 \u043d\u0435 \u043a\u0430\u043a Wasm. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441\u0432\u043e\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>runtimeClassName<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u043e\u0434\u0430, \u0430 \u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.\u00a0<\/p>\n<p>Containerd \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u0430. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>runc<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442. \u041d\u043e \u0432 \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u0430\u043a\u043e\u0435 \u0435\u0441\u0442\u044c \u0443 <code>crun<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c <code>crun<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 WasmEdge. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>NodeGroupConfiguration<\/code>:<\/p>\n<pre><code class=\"bash\">kubectl apply -f -&lt;&lt;EOF apiVersion: deckhouse.io\/v1alpha1 kind: NodeGroupConfiguration metadata:   name: crun-install.sh spec:   bundles:   - '*'   content: |     if ! [ -x \/usr\/local\/bin\/crun ]; then       apt-get update &amp;&amp; apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libprotobuf-c-dev libcap-dev libseccomp-dev libyajl-dev go-md2man autoconf python3 automake       cd \/root       [ -f \"\/root\/.wasmedge\/bin\/wasmedge\" ] || curl -sSf https:\/\/raw.githubusercontent.com\/WasmEdge\/WasmEdge\/master\/utils\/install.sh | bash       git clone https:\/\/github.com\/containers\/crun &amp;&amp; cd crun       .\/autogen.sh       source \/root\/.wasmedge\/env &amp;&amp; .\/configure --with-wasmedge       make       make install       cd .. &amp;&amp; rm -rf crun     fi       echo \"crun has been installed\"     mkdir -p \/etc\/containerd\/conf.d     bb-sync-file \/etc\/containerd\/conf.d\/add_crun.toml - containerd-config-changed &lt;&lt; \"EOF\"     [plugins]       [plugins.\"io.containerd.grpc.v1.cri\"]         [plugins.\"io.containerd.grpc.v1.cri\".containerd]           [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes]             [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.crun]               runtime_type = \"io.containerd.runc.v2\"               pod_annotations = [\"*.wasm.*\", \"wasm.*\", \"module.wasm.image\/*\", \"*.module.wasm.image\", \"module.wasm.image\/variant.*\"]               [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.crun.options]                 BinaryName = \"\/usr\/local\/bin\/crun\"     EOF   nodeGroups:   - wasm   weight: 30 EOF<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e WasmEdge (\u0440\u0430\u043d\u0435\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 WasmEdge runtime), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c <code>crun<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e <code>\/etc\/containerd\/config.toml<\/code> \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0440\u0430\u043d\u0442\u0430\u0439\u043c, \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.\u00a0<\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <code>pod_annotations<\/code>. \u042d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u0441\u0440\u0435\u0434\u0443<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-427351","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=427351"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427351\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}