mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
runtimeclass: drop stale runtimeclass definitions
- 1.13/1.14 are very old now; let's drop - move from k8s-1.18 to just runtimeclasses directoy - update docs to reflect the new reality Fixes: #1425 Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
parent
fb30c58847
commit
12a65d2359
@ -36,51 +36,22 @@ $ kubectl apply -k kata-deploy/overlays/k3s
|
|||||||
|
|
||||||
### Run a sample workload
|
### Run a sample workload
|
||||||
|
|
||||||
|
|
||||||
Workloads which utilize Kata can node-select based on `katacontainers.io/kata-runtime=true`, and are
|
Workloads which utilize Kata can node-select based on `katacontainers.io/kata-runtime=true`, and are
|
||||||
run through an applicable runtime if they are marked with the appropriate `runtimeClass` annotation.
|
run through an applicable runtime if they are marked with the appropriate `runtimeClass` object.
|
||||||
|
|
||||||
`runtimeClass` is a built-in type in Kubernetes versions 1.14 and greater. In Kubernetes 1.13, `runtimeClass`
|
`runtimeClass` is a built-in type in Kubernetes. To apply the Kata runtimeclasses:
|
||||||
is defined through a custom resource definition. For Kubernetes 1.13:
|
|
||||||
```sh
|
```sh
|
||||||
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/k8s-1.13
|
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/runtimeclasses
|
||||||
$ kubectl apply -f runtimeclass-crd.yaml
|
$ kubectl apply -f kata-runtimeClasses.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
In order to use a workload Kata with QEMU, first add a `RuntimeClass` as:
|
The following YAML snippet shows how to specify a workload should use Kata with Cloud Hypervisor:
|
||||||
- For Kubernetes 1.14:
|
|
||||||
```sh
|
|
||||||
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/k8s-1.14
|
|
||||||
$ kubectl apply -f kata-qemu-runtimeClass.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
- For Kubernetes 1.13:
|
|
||||||
```sh
|
|
||||||
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/k8s-1.13
|
|
||||||
$ kubectl apply -f kata-qemu-runtimeClass.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
In order to use a workload Kata with Firecracker, first add a `RuntimeClass` as:
|
|
||||||
- For Kubernetes 1.14:
|
|
||||||
```sh
|
|
||||||
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/k8s-1.14
|
|
||||||
$ kubectl apply -f kata-fc-runtimeClass.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
- For Kubernetes 1.13:
|
|
||||||
```sh
|
|
||||||
$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/k8s-1.13
|
|
||||||
$ kubectl apply -f kata-fc-runtimeClass.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
The following YAML snippet shows how to specify a workload should use Kata with QEMU:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
runtimeClassName: kata-qemu
|
runtimeClassName: kata-clh
|
||||||
```
|
```
|
||||||
|
|
||||||
The following YAML snippet shows how to specify a workload should use Kata with Firecracker:
|
The following YAML snippet shows how to specify a workload should use Kata with Firecracker:
|
||||||
@ -92,6 +63,15 @@ spec:
|
|||||||
runtimeClassName: kata-fc
|
runtimeClassName: kata-fc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The following YAML snippet shows how to specify a workload should use Kata with QEMU:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
runtimeClassName: kata-qemu
|
||||||
|
```
|
||||||
|
|
||||||
To run an example with `kata-qemu`:
|
To run an example with `kata-qemu`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -122,6 +102,7 @@ $ kubectl delete -f kata-deploy/base/kata-deploy.yaml
|
|||||||
$ kubectl apply -f kata-cleanup/base/kata-cleanup.yaml
|
$ kubectl apply -f kata-cleanup/base/kata-cleanup.yaml
|
||||||
$ kubectl delete -f kata-cleanup/base/kata-cleanup.yaml
|
$ kubectl delete -f kata-cleanup/base/kata-cleanup.yaml
|
||||||
$ kubectl delete -f kata-rbac/base/kata-rbac.yaml
|
$ kubectl delete -f kata-rbac/base/kata-rbac.yaml
|
||||||
|
$ kubectl delete -f runtimeclasses/kata-runtimeClasses.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## `kata-deploy` details
|
## `kata-deploy` details
|
||||||
@ -151,9 +132,9 @@ applying labels to the nodes.
|
|||||||
|
|
||||||
This DaemonSet installs the necessary Kata binaries, configuration files, and virtual machine artifacts on
|
This DaemonSet installs the necessary Kata binaries, configuration files, and virtual machine artifacts on
|
||||||
the node. Once installed, the DaemonSet adds a node label `katacontainers.io/kata-runtime=true` and reconfigures
|
the node. Once installed, the DaemonSet adds a node label `katacontainers.io/kata-runtime=true` and reconfigures
|
||||||
either CRI-O or containerd to register two `runtimeClasses`: `kata-qemu` (for QEMU isolation) and `kata-fc` (for Firecracker isolation).
|
either CRI-O or containerd to register three `runtimeClasses`: `kata-clh` (for Cloud Hypervisor isolation), `kata-qemu` (for QEMU isolation),
|
||||||
As a final step the DaemonSet restarts either CRI-O or containerd. Upon deletion, the DaemonSet removes the
|
and `kata-fc` (for Firecracker isolation). As a final step the DaemonSet restarts either CRI-O or containerd. Upon deletion,
|
||||||
Kata binaries and VM artifacts and updates the node label to `katacontainers.io/kata-runtime=cleanup`.
|
the DaemonSet removes the Kata binaries and VM artifacts and updates the node label to `katacontainers.io/kata-runtime=cleanup`.
|
||||||
|
|
||||||
#### Kata cleanup
|
#### Kata cleanup
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1alpha1
|
|
||||||
metadata:
|
|
||||||
name: kata-clh
|
|
||||||
spec:
|
|
||||||
runtimeHandler: kata-clh
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1alpha1
|
|
||||||
metadata:
|
|
||||||
name: kata-fc
|
|
||||||
spec:
|
|
||||||
runtimeHandler: kata-fc
|
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1alpha1
|
|
||||||
metadata:
|
|
||||||
name: kata-qemu
|
|
||||||
spec:
|
|
||||||
runtimeHandler: kata-qemu
|
|
||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1alpha1
|
|
||||||
metadata:
|
|
||||||
name: kata
|
|
||||||
spec:
|
|
||||||
runtimeHandler: kata
|
|
@ -1,26 +0,0 @@
|
|||||||
kind: CustomResourceDefinition
|
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
|
||||||
metadata:
|
|
||||||
name: runtimeclasses.node.k8s.io
|
|
||||||
labels:
|
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
spec:
|
|
||||||
group: node.k8s.io
|
|
||||||
version: v1alpha1
|
|
||||||
versions:
|
|
||||||
- name: v1alpha1
|
|
||||||
served: true
|
|
||||||
storage: true
|
|
||||||
names:
|
|
||||||
plural: runtimeclasses
|
|
||||||
singular: runtimeclass
|
|
||||||
kind: RuntimeClass
|
|
||||||
scope: Cluster
|
|
||||||
validation:
|
|
||||||
openAPIV3Schema:
|
|
||||||
properties:
|
|
||||||
spec:
|
|
||||||
properties:
|
|
||||||
runtimeHandler:
|
|
||||||
type: string
|
|
||||||
pattern: '^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?$'
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1beta1
|
|
||||||
metadata:
|
|
||||||
name: kata-clh
|
|
||||||
handler: kata-clh
|
|
@ -1,5 +0,0 @@
|
|||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1beta1
|
|
||||||
metadata:
|
|
||||||
name: kata-fc
|
|
||||||
handler: kata-fc
|
|
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1beta1
|
|
||||||
metadata:
|
|
||||||
name: kata
|
|
||||||
handler: kata
|
|
||||||
---
|
|
||||||
kind: RuntimeClass
|
|
||||||
apiVersion: node.k8s.io/v1beta1
|
|
||||||
metadata:
|
|
||||||
name: kata-qemu
|
|
||||||
handler: kata-qemu
|
|
Loading…
Reference in New Issue
Block a user