Deploy octopus tentacle to k8 cluster

Hi,
I deployed an octopus tentacle image to the Kubernetes cluster (Linux pod) as a deployment and I see its getting registered as a poling tentacle if I want to register as a listening tentacle how to do it ?

here is my deployment file

apiVersion: apps/v1
kind: Deployment
metadata:
name: octoworker
labels:
app: octoworker
spec:
selector:
matchLabels:
octopusexport: OctopusExport
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: octoworker
octopusexport: OctopusExport
spec:
containers:
- name: octoworker
image: octopusdeploy/tentacle:6.3.329
imagePullPolicy: IfNotPresent
ports:
- containerPort: 10933
env:
- name: ServerApiKey
value: Key
- name: ServerUrl
value: https://morninghopper.octopus.app
- name: ACCEPT_EULA
value: “Y”
- name: TargetWorkerPool
value: “test”
- name: ListeningPort
value: “10933”

I am not getting how to add the listening tentacle as its asking host and few details.

Hi @venkat.vnextapps,

Great to hear from you again, I’d be happy to help with configuring Listening Tentacles with Kubernetes!

Hostname is referring to the IP or hostname of the Tentacle container, which since Kubernetes gets it’s IP’s from a range that makes it hard to know before launching the container.

Since the connection is going from the Octopus Server to the Tentacle, Octopus needs to know how to reach the Tentacle. The tentacle docker image provides some variables to change how it’s configured and provide the values to use to the container when it’s launched:

  • PublicHostNameConfiguration: How the url that the Octopus server will use to communicate with the Tentacle is determined. Can be PublicIp, FQDN, ComputerName or Custom. Defaults to PublicIp.
  • CustomPublicHostName: If PublicHostNameConfiguration is set to Custom, the host name that the Octopus Server should use to communicate with the Tentacle.

If your tentacle has a public hostname that makes it easy, however it can get tricky deploying multiple replica’s and essentially requires a LoadBalancer to route traffic on a different port to each container while it has a public hostname.

If possible we recommend using Polling Tentacles with Kubernetes as there isn’t any complicated networking involved and scaling just involves changing the number of replicas. We provide an image specifically for Kube workers here:Docker

Let me know if you have any questions at all!

Best Regards,

Hi,

Its always registering as polling tentacle. here is the screenshot and yaml file for statefulset.
is there any env parameter I have to pass to register as LIstening?


apiVersion: apps/v1
kind: StatefulSet
metadata:
name: octoworker
labels:
app: octoworker
spec:
serviceName: octoworker
replicas: 1
revisionHistoryLimit: 1
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: octoworker
template:
metadata:
labels:
app: octoworker
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: octoworker
image: venkateshchekuri/octoworker:2.0
imagePullPolicy: IfNotPresent
env:
- name: ServerApiKey
value: API-KEY
- name: ServerUrl
value: https://morninghopper.octopus.app
- name: ACCEPT_EULA
value: “Y”
- name: TargetWorkerPool
value: “test”
- name: ListeningPort
value: “10933”
- name: CommunicationType
value: “listening”
resources:
requests:
cpu: 50m
memory: 256Mi
limits:
cpu: 500m
memory: 2048Mi
securityContext:
privileged: true

Hi @venkat.vnextapps,

When configuring a listening tentacle within Octopus, it will ask for the Hostname and Port of the tentacle as the connection runs from the Octopus Server to the Tentacle in listening mode.
This means that your tentacle machine will need a public IP/hostname that the Octopus instance can reach.

Typically, it isn’t desirable to have a machine exposed to the internet in this way, so we recommend using polling tentacles in this situation.

If you want to configure a listening tentacle, you would need to remove the ServerApiKey and ServerUrl environment variables from your YAML. The presence of these variables will force it to polling mode.

Regards,
Paul

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.