Fortinet white logo
Fortinet white logo

Online Help

Deploy Kubernetes Agent Command

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.

  1. Go to Container Protection > Configure > Kubernetes Cluster.
  2. Locate the cluster that is going to have Kubernetes Agent installed, then click on the Actions button, and select View Kubernetes Agent Deployment Commands.
  3. Copy the deploy command and execute it in Kubectl:
  4. ./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

  5. If the fcli command was executed successfully, run the command below to verify it:
  6. kubectl get pods -n fortinet

  7. A successful deployment should look like below with the command:

Deploy Kubernetes Agent Command

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.

  1. Go to Container Protection > Configure > Kubernetes Cluster.
  2. Locate the cluster that is going to have Kubernetes Agent installed, then click on the Actions button, and select View Kubernetes Agent Deployment Commands.
  3. Copy the deploy command and execute it in Kubectl:
  4. ./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

  5. If the fcli command was executed successfully, run the command below to verify it:
  6. kubectl get pods -n fortinet

  7. A successful deployment should look like below with the command: