0

We are trying to use knative to deploy and delete container based apps dynamically via a REST call to kubernetes server. Once knative is up and running and configured deploying an app is fairly straightforward by executing a Service yaml referencing config maps, image names, etc. for a multi-container pod.

However, deleting a deployed pod is not that easy. Knative deploys a number of objects for each deployed pod/app and it looks like they(objects) need to be deleted one-by-one. Anybody knows the best way to delete a deployed pod with the fewest number of steps by issuing REST requests to kubernetes server? And the correct order of deletion? Thanks.

1 Answers1

1

For anybody who cares:

Initially I got overwhelmed with the number of objects Knative was creating for each service creation request....

Sending a delete HTTP request to kubernetes rest API server (from inside the cluster) like so: https://kubernetes:443/apis/serving.knative.dev/v1alpha1/namespaces/[yourNamespaceName]/services/[yourServiceName] worked like a charm deleting revisions, routes, configurations, pods, etc.