Docker Environment

Install K2 Agents on Node/VM/EC2 in docker environment.

Prerequisites

  • Ensure that Docker CE/EE is present on the host system.

  • Ensure that K2 Prevent-Web specific bypass is added for Firewalld Systems. To know more, go to K2 Prevent-Web prerequisites.

  • In case of a restricted environment, please allow following access on the host:

    • Access to https://k2io.net through your firewall.

    • Access to Docker hub through your firewall.

  • If you're running K2 Docker Installer with non root user then make sure it has proper permissions to run docker commands.

Note: You should be able to download public docker images from the docker hub.

Configuration

Download K2 Installer for Node/VM/EC2 from Installation view in K2 SaaS Portal by signing in with your username and password

We recommend not to select PRODUCTION as your environment if you have enabled exploit detection/dynamic scanning on K2 Portal.

  • Download the zip of VM installation files from installation section of your K2 manager account

  • Unzip the file using the following command.

unzip vm-all.zip

Installation

Install K2 Agent

bash k2install.sh -i segment

The .agent.properties contain the default configuration associated with the K2 agents. Please do not update the configuration unless necessary.

If the installation of any component fails, previously installed components will be removed. You can check logs in agentlogs directory.

Verify Installation

Ensure that the K2 Prevent-Web agent is running on the host system.

  • Use the docker ps command to get information about the K2 Prevent-Web agent. If the output shows the running container, as in the following output, you have the K2 Prevent-Web agent running.

[root@SC-IntCC-003 ~]# docker ps | grep -w "k2agent"
c77da5d434c5 k2cyber/k2-agent-v1:1.10.2 "/bin/bash -c '/usr/…" 3 minutes ago Up 3 minutes k2agent"
  • If the machine does not have a K2 Prevent-Web agent running, it will show the below output.

[root@SC-IntCC-003 ~]# docker ps | grep -w "k2agent"
[root@SC-IntCC-003 ~]#

What Next ?

Congratulations, You have successfully installed K2 Platform on your premises.

Last updated

Was this helpful?