<p>I’m running into the issues while creating the container, I’m using ubuntu 16.04 OS, docker 1.12.1, flannel 0.5.5, and etcd datastore.</p>

<pre><code>sudo systemctl status kubelet.service
● kubelet.service - Kubernetes Kubelet Server
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2016-09-12 14:23:02 EDT; 3h 6min ago
Docs: https://github.com/GoogleCloudPlatform/kubernetes
Main PID: 15788 (kubelet)
Tasks: 9
Memory: 848.0K
CPU: 815ms
CGroup: /system.slice/kubelet.service
Sep 12 17:19:40 vm3-VirtualBox kubelet[15788]: W0912 17:19:40.585677 15788 container_manager_linux.go:278] [ContainerManager] Failed to ensure state of "/docke
Sep 12 17:20:40 vm3-VirtualBox kubelet[15788]: W0912 17:20:40.615756 15788 container_manager_linux.go:278] [ContainerManager] Failed to ensure state of "/docke
Sep 12 17:21:40 vm3-VirtualBox kubelet[15788]: W0912 17:21:40.624172 15788 
Sep 12 17:23:40 vm3-VirtualBox kubelet[15788]: W0912 17:23:40.657396 15788 container_manager_linux.go:278] [ContainerManager] Failed to ensure state of "/docker
belet[15788]: W0912 16:47:40.051784 15788 container_manager_linux.go:278] [ContainerManager] Failed to ensure state of "/docke
Sep 12 16:48:06 vm3-VirtualBox sudo[19448]: pam_unix(sudo:session): session closed for user root
Sep 12 16:48:40 vm3-VirtualBox kubelet[15788]: W0912 16:48:40.073855 15788 container_manager_linux.go:278] [ContainerManager] Failed to ensure state of "/docke
</code></pre>

<p>Master node</p>

<pre><code>kubectl describe pods my-first-nginx-a9bgy

Replication Controllers:    my-first-nginx (1/1 replicas created)
Containers:
  my-first-nginx:
    Container ID:    
    Image:        nginx
    Image ID:        
    State:        Waiting
      Reason:        ContainerCreating

  1m        1m        1    {kubelet    implicitly required container POD    Created        Created with docker id 9fc5d67d3921
  1m        1m        1    {kubelet    implicitly required container POD    Failed        Failed to start with docker id 9fc5d67d3921 with error: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
{kubelet }    implicitly required container POD    Created        Created with docker id f55e2b6538b5
  1m    6s    10    {kubelet                         FailedSync    Error syncing pod, skipping: API error (400): {"messag
 "starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
</code></pre>

<p>Do I need to make any changes in the /lib/systemd/system/docker.service or in
/etc/default/docker. Is there any work around, I've read in few posts that kubernetes has some problem with the latest docker version.</p>

<p>Any help and suggestion on this will be really appreciated.</p>

<p>HostConfig is deprecated in docker v1.12. Kubernetes <a href="https://github.com/kubernetes/kubernetes/pull/20615" rel="nofollow">made a corresponding switch</a> to deprecate HostConfig in v1.2, so you will need a newer version (v1.2+) kubernetes to work with docker v1.12.</p>

<p>Another caveat is that only the coming kubernetes 1.4 release claims to be compatible with docker v1.12. All older versions of kubernetes were not tested against docker v1.12. You might be better off using an older version of docker, or simply switch to kubernetes v1.4 beta. </p>
