Starting FIWARE Orion in Kubernetes

10/3/2016

I'm trying to start FIWARE Orion in Kubernetes. Here is the manifest:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: broker
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: broker
    spec:
      containers:
      - name: mongo
        image: waziup/mongodb:latest
        args: ["--nojournal"]
        ports:
        - containerPort: 27017

      - name: orion
        image: waziup/orion:latest
        ports:
        - containerPort: 1026
        args: ["-dbhost", "localhost:27017", "-logLevel", "INFO"]

      - name: cygnus
        image: waziup/cygnus:latest
        ports:
        - containerPort: 8081
        - containerPort: 5050

----
apiVersion: v1
kind: Service
metadata:
  name: broker
  labels:
    name: broker
spec:
  type: LoadBalancer
  ports:
  - port: 1026
    targetPort: 8026
  selector:
    name: broker

To be deployed with:

kubectl apply -f manifest.yaml

The service is exposed:

$ kubectl describe svc broker
Name:                   broker
Namespace:              default
Labels:                 name=broker
Selector:               name=broker
Type:                   LoadBalancer
IP:                     100.69.249.225
Port:                   <unset> 1026/TCP
NodePort:               <unset> 30458/TCP
Endpoints:              10.40.0.13:8026
Session Affinity:       None
No events.

However it is not responding:

curl <my public IP>:30458/version

The command above hangs forever. If I run it directly on the master node, it works. Any ideas? It seems that the TCP connection is not established... Orion will not send back the ACK, or it will not be routed.

-- cdupont
fiware-orion
kubernetes

1 Answer

10/4/2016

The problem was linked to Kubernetes networking. It seems that adding and then deleting the "sock shop" does not remove the network "Deny Policy". The solution is to run:

kubectl annotate namespace default net.beta.kubernetes.io/network-policy-

That will remove old policies.

-- cdupont
Source: StackOverflow