简体   繁体   English

从ACS引擎Kubernetes群集中提取图像并连接到它

[英]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). 对于当前环境,我已经创建了一个物料和多个代理(Windows容器)。 Here comes the questions: 问题来了:

  1. When ssh into the master, I tried to pull image but turned out failed with this phenomenon. 当ssh进入主服务器时,我尝试提取图像,但结果却失败了。 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?? 连接到Windows节点需要执行哪些步骤?

May I know how can I pull the image successfully? 我可以知道如何成功拉出图像吗?

You are using docker on Linux command line to pull windows image. 您正在Linux命令行上使用docker提取Windows映像。 As we know, container about Linux and windows are different . 众所周知,关于Linux和Windows的容器是不同的 The problem is that you are not running the server as windows/amd, so system will return unknown blob . 问题是您没有以Windows / amd的身份运行服务器,因此系统将返回unknown blob

According to your description, you have deploy ACS on Azure with windows nodes. 根据您的描述,您已经在具有Windows节点的Azure上部署了ACS。 Kubernetes is a tool which use to manage containers, so we can use k8s to deploy IIS to windows nodes. Kubernetes是用于管理容器的工具,因此我们可以使用k8s将IIS部署到Windows节点。
1.create iis.json file, like this: 1. iis.json文件,如下所示:

{
 "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: 2.使用kubctl apply命令创建Pod,如下所示:

kubectl apply -f iis.json

More information about how to use k8s to deploy a windows IIS container, please refer to this link . 有关如何使用k8s部署Windows IIS容器的更多信息,请参考此链接

What are the steps required to connect to the Windows Node?? 连接到Windows节点需要执行哪些步骤?

By default, we should not to login those nodes, we should manage containers via kubernetes, so Azure create nodes without public IP addresses. 默认情况下,我们应该登录这些节点,我们应通过kubernetes管理的容器,所以Azure的创建没有公网IP地址的节点。

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. 如果要连接k8s节点并在其上部署IIS容器,我们可以在本地PC和Azure vnet之间部署点对站点VPN 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. 但是我不建议这样做,因为这样,我们仅将k8s集群工作用作单个VM,并且容器工作将没有HA,如果容器关闭,k8s集群将不会创建另一个保持可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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