From 8f25c7da11800ea4e8e10dc8a674aba6dbf02ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 19 Aug 2021 18:54:30 +0200 Subject: [PATCH] kata-deploy: Update the README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's just point to our repo URLs rather than assume users using kata-deploy will have our repo cloned. Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit e54110568072e99c22efdc7178dcf82e4b747669) --- tools/packaging/kata-deploy/README.md | 39 ++++++++++++--------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/tools/packaging/kata-deploy/README.md b/tools/packaging/kata-deploy/README.md index e33fab314..e749541d6 100644 --- a/tools/packaging/kata-deploy/README.md +++ b/tools/packaging/kata-deploy/README.md @@ -11,15 +11,16 @@ a node only if it uses either containerd or CRI-O CRI-shims. ### Install Kata on a running Kubernetes cluster + ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy -$ kubectl apply -f kata-rbac/base/kata-rbac.yaml -$ kubectl apply -f kata-deploy/base/kata-deploy.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml ``` -or on a [k3s](https://k3s.io/) cluster: +### For your [k3s](https://k3s.io/) cluster, do: ```sh +$ GO111MODULE=auto go get github.com/kata-containers/kata-containers $ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy $ kubectl apply -k kata-deploy/overlays/k3s ``` @@ -32,8 +33,7 @@ which will ensure the workload is only scheduled on a node that has Kata Contain `runtimeClass` is a built-in type in Kubernetes. To apply each Kata Containers `runtimeClass`: ```sh - $ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/runtimeclasses - $ kubectl apply -f kata-runtimeClasses.yaml + $ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml ``` The following YAML snippet shows how to specify a workload should use Kata with Cloud Hypervisor: @@ -66,42 +66,37 @@ spec: To run an example with `kata-clh`: ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples -$ kubectl apply -f test-deploy-kata-clh.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-clh.yaml ``` To run an example with `kata-fc`: ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples -$ kubectl apply -f test-deploy-kata-fc.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-fc.yaml ``` To run an example with `kata-qemu`: ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples -$ kubectl apply -f test-deploy-kata-qemu.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-qemu.yaml ``` The following removes the test pods: ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy/examples -$ kubectl delete -f test-deploy-kata-clh.yaml -$ kubectl delete -f test-deploy-kata-fc.yaml -$ kubectl delete -f test-deploy-kata-qemu.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-clh.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-fc.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/examples/test-deploy-kata-qemu.yaml ``` ### Remove Kata from the Kubernetes cluster ```sh -$ cd $GOPATH/src/github.com/kata-containers/kata-containers/tools/packaging/kata-deploy -$ kubectl delete -f kata-deploy/base/kata-deploy.yaml -$ kubectl apply -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 runtimeclasses/kata-runtimeClasses.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +$ kubectl apply -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml +$ kubectl delete -f https://raw.githubusercontent.com/kata-containers/kata-containers/main/tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml ``` ## `kata-deploy` details