Deploy Kubernetes Agent Command
Prerequisite
To deploy Kubernestes agent on Kubernetes cluster, the fcli command line tool needs to be executed in the Kubernetes cluster.
For details on downloading the fcli agent, please see Deploy Kubernetes Agent Controller.
If Kubernetes agent is not successfully deployed, FortiCWP is not able to retrieve logs and provide security monitoring on the Kubernetes agent, and it will show as Unhealthy status.
Follow the steps below to view the command to deploy Kubernetes agent again.
- Go to Container Protection > Configure > Kubernetes Cluster.
- Locate the cluster that is going to have Kubernetes Agent installed, then click on the Actions button, and select View Kubernetes Agent Deployment Commands.
- Copy the deploy command and execute it in Kubectl:
- If the fcli command was executed successfully, run the command below to verify it:
- A successful deployment should look like below with the command:
./fcli deploy kubernetes --token <AccessToken> --region <Region>
The default port is "3001", you may also deploy the agent to a specific port.
For Example, the following deploy command would deploy the Kubernetes agent to port "3002":
./fcli deploy kubernetes --token <AccessToken> --region <Region> --dcPort3002
kubectl get pods -n fortinet