Remove Service from Grey Matter on Kubernetes
Last updated
Was this helpful?
Last updated
Was this helpful?
An existing Grey Matter deployment running on Kubernetes _()
kubectl
or oc
setup with access to the cluster
greymatter
cli setup with access to the deployment
Delete service from Intelligence 360 Application
Delete Edge routes
Delete pod with the service and sidecar
Delete Service Configurations
NOTE: The exact configurations and commands done here assume you've gone through the tutorial to setup this service. For any other service; you'll just need to substitute your object keys and service deployments where appropriate.
The first step is to remove the service entry from the Catalog server so that users will not see it and expect to be able to use it.
This will remove the service card from display.
Next we'll remove any Edge routing configuration. This will prevent users from using the service.
First delete the cluster object.
Then delete the route and shared_rules. We can delete these both with a single call because they're explicitly linked by object keys.
Shortly after these steps (generally a few seconds) the Edge will have removed the configuration to route to this service and users can no longer call the service.
Now that the service is no longer routed to from the edge, we can fully spin down the pod so that it no longer can receive any traffic and stops announcing into the mesh. This can be done in any way supported by k8s:
Scale the deployment/replicaset to 0
Delete the resources (deployment, replicaset, pod)
Assuming you've followed out tutorial, the deployment set can be removed the kubectl command:.
NOTE This step is optional for removing a service, and should only be done if this service is not expected to spin back up. These configuration objects are not sent to any Sidecar now that the pod is spun down, and nothing is referencing them for routing.
The last step is to delete the configuration objects in the API for this service.
First we'll delete the cluster for the Sidecar to talk to it's local microservice.
Then we'll delete the domain, and use the --deep
option to make sure no other Sidecars are using it.
Third, delete the listener:
Then we can delete the route and shared_rules together
Finally, we'll delete the overarching proxy object.
The service and all configs are now removed from GreyMatter.