Hi everyone,
in the spirit of giving back I thought I would share my kubernetes yml file to load ClusterODM and a Number of NodeODM’s on a k8 cluster (I am using an easy8 Nvidia Bright Cluster)
Notes:
- change to the external ip adddress of your k8 cluster
- change the number of replicas for nodeodm to the number of nodes in your
cluster (1 nodeodm per cluster node) - change to the NFS mount shared within your cluser (i.e. /cm/local on your Bright Cluster)
- Use kubectl apply -f yourfile.yml
- You should be able to connect to ClusterODM on :10000 and then add the NodeODM nodes.
- Use kubectl get pods -o wide to get the IP address of each nodeodm instance to put into ClusterODM config using the port 3000 for each node.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodeodm-deployment
spec:
replicas:
selector:
matchLabels:
app: nodeodm
template:
metadata:
labels:
app: nodeodm
spec:
containers:
- name: nodeodm
image: opendronemap/nodeodm:gpu
ports:
- containerPort: 3000
volumeMounts:
- name: data-volume
mountPath:
volumes:
- name: data-volume
emptyDir: {}
apiVersion: apps/v1
kind: Deployment
metadata:
name: clusterodm-deployment
spec:
replicas: 1
selector:
matchLabels:
app: clusterodm
template:
metadata:
labels:
app: clusterodm
spec:
containers:
- name: clusterodm
image: opendronemap/clusterodm
ports:
- containerPort: 3000
- containerPort: 10000
- containerPort: 8080
apiVersion: v1
kind: Service
metadata:
name: nodeodm-service
spec:
type: NodePort
selector:
app: nodeodm
ports:
- protocol: TCP
port: 3000
targetPort: 3000
nodePort: 30000
apiVersion: v1
kind: Service
metadata:
name: clusterodm-service
spec:
type: LoadBalancer
externalIPs:
-
ports:
- name: port-3000
port: 3000
targetPort: 3000
- name: port-10000
port: 10000
targetPort: 10000
- name: port-8080
port: 8080
targetPort: 8080
selector:
app: clusterodm