Trend Micro Cloud One Container Security components use the helm package manager for Kubernetes.
Helm 3 or later is supported when installing Trend Micro Cloud One - Container Security components. To get started, see the Helm installation guide. Installing Helm 3 should only require you to run one command.
Container Security Continuous Compliance enforces policies by leveraging Kubernetes network policies to perform isolation mitigation. Network policies are implemented by the network plugin.
To install Container Security, a network plugin with NetworkPolicy support is required to allow for network isolation mitigation.
- In Amazon Elastic Kubernetes Service (Amazon EKS), the Calico network plugin can be used as network policy engine.
- In OpenShift 4.x, OpenShift SDN supports using network policy in its default network isolation mode.
- In Azure Kubernetes Service (AKS), network policy are supported by Azure Network Policies or Calico.
- In Google Kubernetes Engine (GKE), you could enable network policy enforcement for a cluster.
By default, Container Security Continuous Compliance will create a Kubernetes network policy on your behalf. If you want to create it manually, follow the steps below:
- Change the value of
cloudOne.oversight.enableNetworkPolicyCreationtofalse, as seen below:
cloudOne:
oversight:
enableNetworkPolicyCreation: false
- Create a network policy with
matchLabelsset totrendmicro-cloud-one: isolatein your desired namespaces.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
labels:
app.kubernetes.io/instance: trendmicro
name: trendmicro-oversight-isolate-policy
spec:
podSelector:
matchLabels:
trendmicro-cloud-one: isolate
policyTypes:
- Ingress
- Egress
Warning: The network policy with matchLabels trendmicro-cloud-one: isolate must exist in each application namespaces in order to perform proper isolation mitigation.
To use the Trend Micro Cloud One Container Security components with your Kubernetes cluster an API key is required to be able to communicate with Trend Micro Cloud One Container Security.
To obtain an API key:
-
Navigate to the Trend Micro Cloud One Container Security console using https://cloudone.trendmicro.com.
-
Go to Add a cluster.
-
Give your Kubernetes cluster a unique name.
-
Copy your API key, as it will be used during the installation process.
Helm uses a file called values.yaml to set configuration defaults. You can find detailed documentation for each of the configuration options in this file.
You can override the defaults in this file by creating an overrides.yaml file and providing the location of this file as input during installation. The cloudOne.APIKey should be overridden in the overrides.yaml file.
Note: If you create a file to override the values, make sure to copy the structure from the chart's values.yaml file. You only need to provide the values that you are overriding.
-
Create a file called overrides.yaml that will contain your cluster-specific settings. You can find these values in the Container Security console or Container Security API when creating a cluster. The Values.yaml file can be used as a reference when creating your overrides file.
-
Use
helmto install Container Security components with your cluster-specific settings. We recommend that you run Container Security in its own namespace.
To install Container Security chart into an existing Kubernetes namespace, use the --namespace flag with the helm install command:
helm install \
--values overrides.yaml \
--namespace ${namespace} \
trendmicro \
https://github.com/trendmicro/cloudone-container-security-helm/archive/master.tar.gzIn the example below, we create a new namespace by using helm's --create-namespace option:
helm install \
--values overrides.yaml \
--namespace trendmicro-system \
--create-namespace \
trendmicro \
https://github.com/trendmicro/cloudone-container-security-helm/archive/master.tar.gzFor more information about helm install, see the Helm installation documentation.
Note: If you are running Container Security in a pure AWS EKS Fargate environment, you may need to adjust your Fargate profile to allow pods in a non-default namespace (ex: trendmicro-system) to be scheduled. See AWS documentation for more information on Fargate profiles.
Note: If you are running Container Security in a Redhat OpenShift environment, the Helm Chart creates a Security Context Constraint to allow Container Security components to have the minimum security context requirements to run.
To upgrade an existing installation in the default Kubernetes namespace to the latest version:
helm upgrade \
--values overrides.yaml \
--namespace ${namespace} \
trendmicro \
https://github.com/trendmicro/cloudone-container-security-helm/archive/master.tar.gzNote: Helm will override or reset values in overrides.yaml. If you want to use the values you had previously, use the --reuse-valeus option during a Helm upgrade:
helm upgrade \
--namespace ${namespace} \
--reuse-values \
trendmicro \
https://github.com/trendmicro/cloudone-container-security-helm/archive/master.tar.gz You can delete all of the resources created by a helm chart using Helm's uninstall command:
Warning: helm uninstall and kubectl delete namespace are destructive commands, and will delete all of the associated resources.
helm uninstall trendmicro --namespace ${namespace}Use the helm list --all-namespaces command to list installed releases in all namespaces.
If you created a trendmicro-system namespace during install, and don't have any other components in the trendmicro-system namespace, you can delete the namespace by running kubectl delete namespace trendmicro-system.
By default, Container Security Continuous Compliance will create a Kubernetes network policy for you. The created network policies will be cleaned up, even if the chart is uninstalled. To clean them up, run:
kubectl delete networkpolicy -l app.kubernetes.io/instance=trendmicro --all-namespacesWarning: If you have running Pods that are isolated by a network policy, removing the network policy will give them network access again.
If you want to install a specific version you can use the archive link for the tagged release. For example, to install Trend Micro Cloud One Container Security helm chart version 2.1.3, run the following command:
helm install \
--values overrides.yaml \
--namespace ${namespace} \
--create-namespace \
trendmicro \
https://github.com/trendmicro/cloudone-container-security-helm/archive/2.1.3.tar.gzIf desired, specifics components of the Container Security helm chart can be enabled or disabled individually using an overrides file.
For example, you can choose to enable the runtime security component by including the below in your overrides.yaml file:
cloudOne:
runtimeSecurity:
enabled: trueMost issues can be investigated using the application logs. The logs can be accessed using kubectl.
- Access the logs for the admission controller using the following command:
kubectl logs deployment/trendmicro-admission-controller --namespace ${namespace}- Access the logs for the runtime security component using the following command, where container can be one of
scout, orfalco:
kubectl logs daemonset/trendmicro-scout --namespace ${namespace} -c ${container}- Access the logs for Oversight controller (Continuous Compliance policy enforcement) using the following command:
kubectl logs deployment/trendmicro-oversight-controller [controller-manager | rbac-proxy] --namespace ${namespace}- Access the logs for Usage controller using the following command:
kubectl logs deployment/trendmicro-usage-controller [controller-manager | rbac-proxy] --namespace ${namespace}To help debug issues reported in support cases, a log collection script is provided for customer use. Gather logs using the following command:
./collect-logs.shThe following environment variables are supported for log collection:
| Environment variable | Description | Default |
|---|---|---|
| RELEASE | Helm release name | trendmicro |
| NAMESPACE | The namespace that the helm chart is deployed in | Current namespace declared in kubeconfig. If no namespace setting exists in kubeconfig, then trendmicro-system will be used. |