简体   繁体   中英

Pull image from and connect to the ACS Engine Kubernetes Cluster

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??

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM