Uninstalling the enforcer
About uninstalling the enforcer
The method of uninstalling the enforcer varies according to how you originally installed it and what type of install it was.
Refer to the procedure that matches your situation.
Uninstalling a host enforcer
- From your local host with apoctl installed, generate a short-lived Microsegmentation token that you can use to uninstall the enforcer.macOS/Linuxapoctl auth appcred --path ~/.apoctl/default.creds \ --restrict-role @auth:role=enforcer \ --restrict-role @auth:role=enforcer-installer \ --validity 60mWindowsapoctl auth appcred --path '.apoctl/default.creds' ` --restrict-role @auth:role=enforcer ` --restrict-role @auth:role=enforcer-installer ` --validity 60mRetrieve the URL of your Microsegmentation Console API.macOS/Linuxecho $MICROSEG_APIWindowsecho $Env:MICROSEG_APIAccess the target host, such as via SSH or Remote Desktop.Set a TOKEN environment variable containing the token you just generated.We’ve truncated the example token value below for readability.Linuxexport TOKEN=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWFsbSI6IkNlcnRpZmljYXRlIiwiZGF0YSI6eyJjb21tb25O....Windows$env:TOKEN="eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWFsbSI6IkNlcnRpZmljYXRlIiwiZGF0YSI6eyJjb21tb25O...."Set a MICROSEG_API environment variable on the target host containing the URL of the Microsegmentation Console API you just echoed on your local host.Linuxexport MICROSEG_API=https://api.microsegmentation.acme.coWindows$env:MICROSEG_API="https://api.microsegmentation.acme.co"Set a TARGET_NS environment variable containing the Microsegmentation namespace of the enforcer.Linuxexport TARGET_NS=/acme/aws-dev/vm1Windows$env:TARGET_NS="/acme/aws-dev/vm1"Install apoctl using the following command.Linuxsudo curl -o /usr/local/bin/apoctl \ https://download.aporeto.com/releases/release-5.0.12/apoctl/linux/apoctl && \ sudo chmod 755 /usr/local/bin/apoctlWindowscurl https://download.aporeto.com/releases/release-5.0.12/apoctl/windows/apoctl.msi -o apoctl.msi; ` if ($?) {. .\apoctl.msi /quiet} if ($?) {$env:PATH+="C:\Program Files\Apoctl;"}Use the following command to uninstall the enforcer.Linuxsudo apoctl enforcer uninstall linux --token $TOKEN \ --enforcer-namespace $TARGET_NS \ --api $MICROSEG_APIWindowsapoctl enforcer uninstall windows --token $($env:TOKEN) ` --enforcer-namespace $($env:TARGET_NS) ` --api $($env:MICROSEG_API)We detail the apoctl enforcer uninstall command further in the reference documentation. You can also run apoctl enforcer uninstall -h to review its flags.Open the Microsegmentation Console web interface, selectEnforcersunderManage, and navigate to the enforcer’s namespace.The enforcer should be absent.Uninstalling a DaemonSet enforcer
- Linuxexport TARGET_NS=/acme/aws-dev/k8s-cluster-01Windows$env:TARGET_NS="/acme/aws-dev/k8s-cluster-01"Use the following command to uninstall the DaemonSet enforcer.Linuxapoctl enforcer uninstall kubernetes --enforcer-namespace $TARGET_NS \ --api $MICROSEG_APIWindowsapoctl enforcer uninstall kubernetes --enforcer-namespace $($env:TARGET_NS) \ --api $($env:MICROSEG_API)We detail the apoctl enforcer uninstall kubernetes command further in the reference documentation. You can also run apoctl enforcer uninstall kubernetes -h to review its flags.Open the Microsegmentation Console web interface, selectEnforcersunderManage, and navigate to the enforcer’s namespace.The enforcer should be absent.
Most Popular
Recommended For You
Recommended Videos
Recommended videos not found.