<p>I have a very simple jelastic installation manifest which installs a kubernetes cluster:</p>

<pre class="lang-yaml prettyprint-override"><code>jpsVersion: 1.3
jpsType: install
application:
  id: shopozor-k8s-cluster
  name: Shopozor k8s cluster
  version: 0.0

  settings:
    fields:
    - name: envName
      caption: Env Name
      type: string
      default: shopozor
    - name: topo
      type: radio-fieldset
      values:
        0-dev: '&lt;b&gt;Development:&lt;/b&gt; one master (1) and one scalable worker (1+)'
        1-prod: '&lt;b&gt;Production:&lt;/b&gt; multi master (3) with API balancers (2+) and scalable workers (2+)'
      default: 0-dev
    - name: k8s-version
      type: string
      caption: k8s manifest version
      default: v1.16.3

  onInstall:
  - installKubernetes
  - attachIpToWorkerNodes

  actions:
    installKubernetes:
      install:
        jps: https://github.com/jelastic-jps/kubernetes/blob/${settings.k8s-version}/manifest.jps
        envName: ${settings.envName}
        displayName: ${settings.envName}
        settings:
          deploy: cc
          topo: ${settings.topo}
          dashboard: version2
          ingress-controller: Nginx
          storage: true
          api: true
          monitoring: true
          version: ${settings.k8s-version}
          jaeger: false
    attachIpToWorkerNodes:
    - forEach(node:nodes.cp):
      - jelastic.env.binder.AttachExtIp:
          envName: ${settings.envName}
          nodeId: ${@node.id}
</code></pre>

<p>If I install that manifest, then I get my cluster up and running, but the worker nodes do not get an IPv4 attached. After installing that manifest, if I additionally install the following update manifest, then it works:</p>

<pre class="lang-yaml prettyprint-override"><code>jpsVersion: 1.3
jpsType: update
application:
  id: attach-ext-ip
  name: Attach external IP
  version: 0.0

  onInstall:
  - attachIpToWorkerNodes

  actions:
    attachIpToWorkerNodes:
    - forEach(node:nodes.cp):
      - jelastic.env.binder.AttachExtIp:
          nodeId: ${@node.id}
</code></pre>

<p>What is it I am doing wrong in the install manifest? why aren't the ip attached to my worker nodes, while there are if I perform that action after installation with an update manifest?</p>

Laurent Michel
<p>Please note, that the "public IP binding" feature is not available in the production yet. It's under active development and will be officially announced in one of our next releases.
In the current stable version, some of the functionality related to it may not work properly. Right now, it's not recommended for production use, but you can try it for test purposes only.
As for the "attachIpToWorkerNodes" action in the original manifest, the issue was that "nodes.cp" of the environment created wasn't declared in scope where "forEach" was invoked. The correct version of the action is:</p>

<pre><code>attachIpToWorkerNodes:
  install:
    envName: ${settings.envName}
    jps:
      type: update
      name: Attach IP To Worker Nodes
      onInstall: jelastic.env.binder.AttachExtIp [nodes.cp.join(id,)]
</code></pre>

<p>Please let us know if you have any further questions.</p>
