mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 16:36:38 +00:00
Merge pull request #561 from egernst/fix-k8s-1.13
kata-deploy: fix k8s 1.13 example files
This commit is contained in:
@@ -81,26 +81,31 @@ $ kubectl apply -f kata-deploy.yaml
|
||||
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.
|
||||
|
||||
`runtimeClass` is a built-in type in Kubernetes versions 1.14 and greater. In Kubernetes 1.13, `runtimeClass`
|
||||
is defined through a custom resource definition. For Kubernetes 1.13:
|
||||
```sh
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/k8s-1.13/runtimeclass-crd.yaml
|
||||
```
|
||||
|
||||
In order to use a workload Kata with QEMU, first add a `RuntimeClass` as:
|
||||
- For k8s 1.14:
|
||||
- For Kubernetes 1.14:
|
||||
```sh
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/k8s-1.14/kata-qemu-runtimeClass.yaml
|
||||
```
|
||||
|
||||
- For k8s 1.13:
|
||||
- For Kubernetes 1.13:
|
||||
```sh
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/k8s-1.13/kata-qemu-runtimeClass.yaml
|
||||
```
|
||||
|
||||
|
||||
In order to use a workload Kata with Firecracker, first add a `RuntimeClass` as:
|
||||
- For k8s 1.14:
|
||||
- For Kubernetes 1.14:
|
||||
```sh
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/k8s-1.14/kata-fc-runtimeClass.yaml
|
||||
```
|
||||
|
||||
- For k8s 1.13:
|
||||
- For Kubernetes 1.13:
|
||||
```sh
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/k8s-1.13/kata-fc-runtimeClass.yaml
|
||||
```
|
||||
|
@@ -1,5 +1,7 @@
|
||||
---
|
||||
kind: RuntimeClass
|
||||
apiVersion: node.k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: kata-fc
|
||||
handler: kata-fc
|
||||
spec:
|
||||
runtimeHandler: kata-fc
|
||||
|
@@ -1,12 +1,14 @@
|
||||
---
|
||||
kind: RuntimeClass
|
||||
apiVersion: node.k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: kata
|
||||
handler: kata
|
||||
---
|
||||
kind: RuntimeClass
|
||||
apiVersion: node.k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: kata-qemu
|
||||
handler: kata-qemu
|
||||
spec:
|
||||
runtimeHandler: kata-qemu
|
||||
---
|
||||
kind: RuntimeClass
|
||||
apiVersion: node.k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: kata
|
||||
spec:
|
||||
runtimeHandler: kata
|
||||
|
26
kata-deploy/k8s-1.13/runtimeclass-crd.yaml
Normal file
26
kata-deploy/k8s-1.13/runtimeclass-crd.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
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])?)*)?$'
|
Reference in New Issue
Block a user