Skip to main content
Version: v3.9.0

Snapshot service

Goal​

Create kind: Service for the gallery. snapshot-service is already deployed on ops-b and listens on external port 8083.

The file is deploy/steps/14-service-snapshot.yaml.

YAML​

snapshot-service
apiVersion: datasance.com/v3
kind: Service
metadata:
name: snapshot-service
tags:
- pot-edge-patterns
spec:
type: microservice
resource: vision-inspection/snapshot-service
targetPort: 8083
defaultBridge: default-router

targetPort is the Edgelet external port, not container port 8080. Tag ops-b with service.iofog.org/tag: pot-edge-patterns when that node should open the listener. See Distribution tags.

Deploy​

potctl deploy -f deploy/steps/14-service-snapshot.yaml

What you should see​

potctl describe service snapshot-service

resource is vision-inspection/snapshot-service, and bridgePort is set. Copy that port. The verify page opens the gallery with it.

http://router.default.svc.bridge.local:<snapshot-bridge-port>/

Common mistakes​

targetPort is 8080. Use 8083.

The Service is created before the snapshot-service microservice exists.

Next​

Verify

Group 3See anything wrong with the document? Help us improve it!