ベアメタルKubernetesクラスターまたはLoadBalancerサービスをサポートしないクラウドプロバイダを使用している場合、MetalLBを使用してICAPサービスを公開できます。
手順
- MicroK8sにMetalLBをインストールする
# Enable MetalLB with an appropriate IP range for your network # Replace the IP range with one suitable for your network microk8s enable metallb:192.168.1.200-192.168.1.220
注意
IP範囲を選択する際:- ローカルサブネット内にあることを確認してください
- DHCPサーバの範囲と競合しないようにしてください
- 他のデバイスに既に割り当てられていないIPを選択してください
- my-values.yamlを以下の内容で更新してください:
scanner: # Other scanner settings remain unchanged externalService: enabled: true type: LoadBalancer # This creates an NLB annotations: {} icapPort: 1344
- MetalLB構成でデプロイメントを更新する:
Run the following: helm upgrade my-release visionone-filesecurity/visionone-filesecurity \ -n visionone-filesecurity \ -f my-values.yaml
- MetalLBデプロイメントを検証する:
# Check the service status kubectl get service -n visionone-filesecurity | grep scanner-lb # Get the external IP assigned by MetalLB EXTERNAL_IP=$(kubectl get service -n visionone-filesecurity my-release-visionone-filesecurity-scanner-lb -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo "Your MetalLB external IP is: $EXTERNAL_IP"
- c-icap-clientをインストールして接続をテストしてください。
# Install c-icap-client sudo apt-get install c-icap # Test with file scanning c-icap-client -i $EXTERNAL_IP -s scan -p 1344 -f sample.txt -x "X-scan-file-name: sample.txt"