<p>The only way to create a new namespace according to <a href="https://coreos.com/kubernetes/docs/latest/deploy-master.html" rel="nofollow">documentation</a> here is to make an API request</p>

<pre><code>curl -v -X POST -d'{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"kube-system"}}' -H "Content-Type: application/json" "http://127.0.0.1:8080/api/v1/namespaces"
</code></pre>

<p>Is there any way to do the same using config or cloud-config?</p>

<p>As Timo mentioned, you can use <code>kubectl create namespace NAME</code> to create a namespace using the command line client. You can also put the following into a yaml file and use <code>kubectl create -f namespace.yaml</code> to create a namespace:</p>

<pre><code>apiVersion: v1
kind: Namespace
metadata:
  name: kube-system
</code></pre>
