Deployment in Kubernetes Environment

NetOcean Pod Deployment Steps

A user can acquire images of NetOcean for use with the Docker Engine from the repository: cavisson001container/netocean-<version> at the Docker Hub.

Note: For latest docker image, kindly contact support team at build@cavisson.com or client-support@cavisson.com.

Following are the steps to deploy NetOcean pod in Kubernetes environment.

Create NetOcean yaml file

  1. Create a yaml file netocean.yaml that contains ‘Service’ and ‘Deployment’ with below content:

Service:

apiVersion: v1
kind: Service
metadata:
  name: netocean-deployment
spec:
  ports:
    - port: 8080
      nodePort: 31710
      name: hpdhttp
    - port: 8443
      nodePort: 30863
      name: hpdhttps
    - port: 80
      nodePort: 30418
      name: tomcathttp
    - port: 443
      nodePort: 31664
      name: tomcathttps
    - port: 12001
      nodePort: 31052
      name: recording
  selector:
    app: netocean
  type: NodePort

Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
name: netocean-deployment
spec:
selector:
   matchLabels:
     app: netocean
replicas: 1
template:
  metadata:
     labels:
       app: netocean
   spec:
   containers:
     - name: netocean
       image: cavisson001container/netocean-4.1.14.126
       ports:
       - containerPort: 8080
         name: tomcathttp
       - containerPort: 8443
         name: tomcathttps
       - containerPort: 80
         name: hpdhttp
       - containerPort: 443
         name: hpdhttps
       - containerPort: 12001
         name: recording

Run the command: kubectl apply -f netocean.yaml. This creates a service and deployment.

    • To verify the service, run command: kubectl get svc as described in yaml.

Note:  Name should be a name that defines the pod type (For example: ‘nginx’ for nginx type pod, ‘netocean-deployment’ for Cavisson UI pods).

    • To verify the deployment, run command: kubectl get pod -o wide as following:

Deploy Daemonset

  1. Download the netocean.yaml file from cavisson build repository.

curl https://nde.cavisson.com/logs/HUB/netocean.yaml -k -o netocean.yaml

  1. Create pod using downloaded configuration file.

kubectl apply -f netocean.yaml

  1. Verify CMON daemonset is created successfully.

kubectl get pods -l app=netocean

Appendix – netocean.yaml (Sample File)

apiVersion: v1
kind: Service
metadata:
name: netocean-deployment
spec:
ports:
- port: 8080
nodePort: 31710
name: hpdhttp
- port: 8443
nodePort: 30863
name: hpdhttps
- port: 80
nodePort: 30418
name: tomcathttp
- port: 443
nodePort: 31664
name: tomcathttps
- port: 12001
nodePort: 31052
name: recording
selector:
app: netocean
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: netocean-deployment
spec:
selector:
matchLabels:
app: netocean
replicas: 1
template:
metadata:
labels:
app: netocean
spec:
containers:
- name: netocean
image: cavisson001container/netocean-4.1.14.126
ports:
- containerPort: 8080
name: tomcathttp
- containerPort: 8443
name: tomcathttps
- containerPort: 80
name: hpdhttp
- containerPort: 443
name: hpdhttps
- containerPort: 12001
name: recording