<p>I'm trying to simulate Daemon-set in kubernetes with using Deployment/RC/Replica-set.</p>

<p><strong>What I want to achieve :</strong></p>

<p>As daemon-set kind deploy PODs on each nodes like wise I want to deploy pod on each node, but without kind daemonset.</p>

<p>Is there any way to do it ? Can't find proper way to do that.</p>

<p>You can do that by using Deployment/ReplicaSet in Kubernetes with <strong>hostPort</strong>.<br/><br/>
Assuming you have 4 nodes in Kubernetes cluster, you can create a deployment or replicaset with hostPort and replicas equal to number of nodes in cluster. <br/><br/>
For example you want to run nginx pod on every node with clustersize equal to 4 then you have mention hostport to container port in deployment/replicaset definition. The kubernetes scheduler will be unable to schedule more than 1 pod on same host and in this way all nodes have at least one pod scheduled.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nginx-hello
  labels:  
    tier: frontend
    app: nginx-hello
spec:
  replicas: 4
  template:
    metadata:
      labels:
        tier: frontend
        app: nginx-hello
    spec:
      containers:
      - name: nginx-hello
        image: nginxdemos/hello
        ports:
        - containerPort: 80
          hostPort: 8088
</code></pre>
