End-of-Life (EoL)
Deploy Defenders outside an OpenShift Cluster
This guide demonstrates how to deploy Prisma Cloud Defenders outside the OpenShift cluster where Prisma Cloud Console is running.
You need to expose the Prisma Cloud-Console service’s TCP ports 8083 and 8084 as external OpenShift routes.
Each route will be an unique, fully qualified domain name.
In this example, you deploy Prisma Cloud Defenders as a DaemonSet in a second OpenShift cluster and to a Windows Server 2016 with Containers node.
Prisma Cloud API calls are made to the Prisma Cloud-Console external OSE router https://console1.apps.jonathan.lab.twistlock.com
The Prisma Cloud Defenders will communicate to the Console via wss://defenders.apps.jonathan.lab.twistlock.com:443
Prerequisites:
- The Prisma Cloud Console is fully operational, Prisma Cloud OpenShift Deployment guide
- An existing OpenShift external route to the Prisma Cloud-Console’s TCP port 8083 (Prisma Cloud UI and API)
OpenShift and Prisma Cloud Console configuration
All commands are run from a system that is external to the OpenShift Cluster using the
oc
and twistcli
commands.- Log into the OpenShift Cluster running the Prisma Cloud Console.
- Go toPrisma Cloud Project > Applications > Routes.
- Create New Route.
- Name:twistlock-defender.
- Hostname:defenders.apps.jonathan.lab.twistlock.com.
- Target Port:8084 → 8084.
- Security:
- TLS Termination:Passthrough.
- Insecure Traffic:Redirect.
- Add the new route to the Prisma Cloud Console’s SubjectAlternativeName.
- In the Prisma Cloud Console go toManage > Defenders > Names.
- ClickAdd SAN.
- Add the new route FQDNdefenders.apps.jonathan.lab.twistlock.com.
Deploy Prisma Cloud Defender Daemonset in Second OpenShift Cluster
Using the twistcli tool generate the Prisma Cloud Defender defender.yaml file.
- Run the command:$ linux/twistcli defender export openshift \ --address https://console1.apps.jonathan.lab.twistlock.com \ --cluster-address defenders.apps.jonathan.lab.twistlock.com \ --namespace twistlock \ --selinux-enabledEdit the resultingdefender.yamland change:- name: WS_ADDRESS value: wss://defenders.apps.jonathan.lab.twistlock.com:8084to:- name: WS_ADDRESS value: wss://defenders.apps.jonathan.lab.twistlock.com:443oc loginto the OpenShift Cluster you will be deploying the Prisma Cloud Defenders to.Create the Prisma Cloud Projectoc new-project twistlock.Deploy the Twislock Defender daemonsetoc create -f ./defender.yaml.The Defenders in the second OpenShift Cluster will appear in the Prisma Cloud Console’sManage > Defenders > Manage.Deploy Prisma Cloud Defender on Windows Server 2016 w/ Containers NodeDeploy Prisma Cloud Defender on a Windows Server 2016 node.
- Log into Prisma Cloud Console.
- Go toManage > Defenders > Deploy.
- 1.a =console1.apps.jonathan.lab.twistlock.com.
- 1.b =Docker on Windows.
- Copy the powershell script that is generated in 1.c.
- Modify the following in the script:
- Remove “:8083” from the-Uri.-Uri "https://console1.apps.jonathan.lab.twistlock.com/api/v1/scripts/defender.ps1"Change the-consoleCNto the twistlock-defender FQDN and add the-wsPort 443variable.-consoleCN defenders.apps.jonathan.lab.twistlock.com -wsPort 443
- The resulting script looks similar to the following:add-type "using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; }}"; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy; Invoke-WebRequest -Uri "https://console1.apps.jonathan.lab.twistlock.com/api/v1/scripts/defender.ps1" -Headers @{"authorization" = "Bearer <token>" } -OutFile defender.ps1; .\defender.ps1 -type dockerWindows -consoleCN defenders.apps.jonathan.lab.twistlock.com -wsPort 443 -installOn the Windows Server node, run the script in a Powershell x64 shell.The Windows Prisma Cloud Defender will appear inManage > Defenders > Manage.
Most Popular
Recommended For You
Recommended Videos
Recommended videos not found.