0

For my current environment, I have created one mater and several agents (windows containers). Here comes the questions:

  1. When ssh into the master, I tried to pull image but turned out failed with this phenomenon. May I know how can I pull the image successfully? azureuser@k8s-master-0000000-0:~$ docker pull microsoft/iis Using default tag: latest latest: Pulling from microsoft/iis 3889bb8d808b: Retrying in 1 second e29afd68a947: Downloading 4c670d580638: Download complete d9f92ede2908: Download complete ad1e133a7ea1: Download complete e0a8179d5f31: Download complete unknown blob

  2. What are the steps required to connect to the Windows Node??

1 Answers1

0

May I know how can I pull the image successfully?

You are using docker on Linux command line to pull windows image. As we know, container about Linux and windows are different. The problem is that you are not running the server as windows/amd, so system will return unknown blob.

According to your description, you have deploy ACS on Azure with windows nodes. Kubernetes is a tool which use to manage containers, so we can use k8s to deploy IIS to windows nodes.
1.create iis.json file, like this:

{
 "apiVersion": "v1",
 "kind": "Pod",
 "metadata": {
   "name": "iis",
   "labels": {
     "name": "iis"
   }
 },
 "spec": {
   "containers": [
     {
       "name": "iis",
       "image": "nanoserver/iis",
       "ports": [
         {
         "containerPort": 80
         }
       ]
     }
   ],
   "nodeSelector": {
    "beta.kubernetes.io/os": "windows"
    }
  }
}

2.use kubctl apply command to create pods, like this:

kubectl apply -f iis.json

More information about how to use k8s to deploy a windows IIS container, please refer to this link.

What are the steps required to connect to the Windows Node??

By default, we should not to login those nodes, we should manage containers via kubernetes, so Azure create nodes without public IP addresses.

If you want to connect k8s node and deploy IIS container on it, we can deploy a point-to-site VPN between local PC and Azure vnet. But I wouldn't recommend it, because in this way, we just use k8s cluster work as a single VM, and container work will have no HA, if container down, k8s cluster will not create another one to keep the available.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • thanks Jason. But from step 2 in https://github.com/Azure/acs-engine/blob/master/docs/kubernetes.windows.md it shows the method to access the windows node, may I know what is it going to achieve there ?? – insanecoder Jul 17 '17 at 11:45
  • and also may I know how can I access the dashboard for this case ?? – insanecoder Jul 17 '17 at 12:22
  • @insanecoder to access the dashboard, we should setup a tunnel, then use this command `az acs kubernetes browse -g [Resource Group] -n [Container service instance name]` to browse it. please refer to this link.https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-ui – Jason Ye Jul 18 '17 at 04:48
  • @insanecoder how to setup a tunnel, please refer to this link https://learn.microsoft.com/en-us/azure/container-service/container-service-connect#connect-to-a-kubernetes-cluster Please let me know if you would like further assistance. – Jason Ye Jul 18 '17 at 04:49
  • I see...will there be any differences if I am using ACS-Engine to deploy the cluster? – insanecoder Jul 18 '17 at 05:49
  • @insanecoder When we use ACS-engine to deploy the cluster, we can do more custom settings, for example, we can specify different subnet. But when we use azure container service to deploy it, we use the azure template to deploy k8s cluster, we can't change subnet or add load balancer rules and so on... so when if we need more custom configure or settings, we should chose ACS-Engine. Hope this helpful:) – Jason Ye Jul 18 '17 at 06:19