Deployment on GKE

This guide explains how to use the provisioning tools provided by OPSWAT to create an AWS GKE and generate all the Kubernetes components needed to run MetaDefender Core and MetaDefender Storage Security.

In case of having the K8S cluster already created, please check the Deployment Using Helm page

This page is purely for provisioning the EKS cluster and install the products at the same time with the tools that OPSWAT has prepared.

Deploy using Terraform

Bash
Copy
  • Modify terraform.tfvars file
    • PERSISTENT_DEPLOYMENT=true -> To create K8S cluster with EC2 Worker Nodes
    • DEPLOY_FARGATE_NODES=false -> To true if wanted to create a Fargate profile
    • DEPLOY_RDS_POSTGRES_DB=true -> To create RDS instance for PostgreSQL server
    • POSTGRES_USERNAME -> if DEPLOY_RDS_POSTGRES_DB=true, set up admin database username
    • POSTGRES_PASSWORD -> if DEPLOY_RDS_POSTGRES_DB=true, set up admin database password
    • MQ_USERNAME -> if DEPLOY_RABBITMQ=true
    • MQ_PASSWORD -> if DEPLOY_RABBITMQ=true
variables/variables.tfvars
Copy
  • Run terraform init and apply. Check the resource to be created, after that enter "y"
Bash
Copy

MetaDefenderK8S script details

  • Script path: %provisioning_script_path%

  • Programming Language: Bash

  • Installation Pre-requisites for provisioning:

  • AWS Credentials

    • Set in your local environment credentials the IAM user credentials under AWS_ACCESS_KEY_ID& AWS_SECRET_ACCESS_KEY
  • MetaDefender Core License Key (Required with --mdcore parameter)

    • Set it in your local environment credentials under MDCORE_LICENSE_KEY

As security measure do not use the root user for any deployment or operation. Follow the principle of least privilege for all access granted. Keep in mind the resources listed in this page for your option selected: EKS Cluster Architecture

How to run the script

MD Core + MDSS
Copy

Script Parameters

ParameterFlagsOptionsDefaultDescriptionRequired/Optional
Action
  • provision
  • install
Action to indicate the script if we want to provision (Create resources + install Core) or install (Install Core)Required
Location-l or --location
  • AWS
  • Azure
  • GCP
Where is going to be the K8S clusterRequired
MetaDefender Flag Installation

Combination of

  • --mdcore
  • --mdss
  • --icap
-Install MetaDefender Core in the cluster provisionedRequired
Image Version--image latestMetaDefender Core image version to installOptional
Region--regionAWS Regionseu-central-1AWS region where all the resources will be provisionedOptional
Cluster Name--nameNot uppercase allowedmd-k8sName of the cluster that will be used for naming all the resourcesOptional
Number of Replicas--replicas[0-9]*1Number of replicas for MetaDefender Core serviceOptional
Namespace--namespace[A-Za-z]{1,10}Namespace where MetaDefender products will be installed in the K8S ClusterOptional Max Characters: 10

Limitations using parameters

  • When using Fargate
    • the pods should be installed in the default namespace.
    • if using AWS Load Balancer controllers need a worker node to be installed in.

##

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard