0

Hi I recently create a k8s cluster on Azure Container Service, just wonder if the containers (pods) created are all hyper-V containers?

As an aside, I found that every time I do "kubectl create -f file" to start the windows container (pods), it takes almost 2 mins to pull the image and then turning the state of the pods from "Creating Container" to "Ready". Is it normal?? If not, are there any suggestions to speed up this process? Seems now the k8s cluster is pulling image each time even if the image is the same. Note that I am now using the windows server core image which I find the size is indeed quite big (>9GB).

1 Answers1

0

just wonder if the containers (pods) created are all hyper-V containers?

Do you mean create pods in K8S, will k8s create k8s containers to all nodes?

If I understand it correctly, the answer is yes. We can create pods to one node or multiple nodes.

If we create pod to one node, like this: enter image description here

it takes almost 2 mins to pull the image and then turning the state of the pods from "Creating Container" to "Ready". Is it normal?

There are multiple reasons will effect that speed, I think it is normal.

For example, you create pod1 in node1, node1 will pull the image from the registry. Then you create another pod (pod2) on node2, K8S will pull image from the registry too.

By the way, it seems K8S can't create container with image which store in master or nodes. Only work with registry, please refer to this case.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • Thanks for your answer @Jason. Let me elaborate further on my first questions. To my understanding, there are two types of containers in Windows, namely Windows container which share the same host and Hyper-V which doesn't share the same host. Just wanna verify if ACS is using the latter one?? – diamondwong Sep 07 '17 at 08:48
  • As for the second question, I want to know more. Say I have pulled a image A from the azure container registry before in node 1, will node 1 try to pull it entirely again? Because from my observation, it seems to be a "Yes". Thanks again :) – diamondwong Sep 07 '17 at 08:52
  • @diamondwong Sorry for my misunderstand. you are right, ACS using the latter one. Second question, answer is Yes. – Jason Ye Sep 07 '17 at 08:53
  • Thanks @Jason. May I know if there are any further documentations on both of these points? – diamondwong Sep 07 '17 at 09:42
  • @diamondwong Maybe we can refer to Azure ACS [article](https://learn.microsoft.com/en-us/azure/container-service/kubernetes/container-service-tutorial-kubernetes-prepare-acr), or K8S [article](https://kubernetes.io/docs/concepts/containers/images/), – Jason Ye Sep 07 '17 at 09:48