部署 Kubernetes 以使用 Azure Stack 提供的容器Deploy Kubernetes to use containers with Azure Stack

適用於:Azure Stack 整合式系統和 Azure Stack 開發套件Applies to: Azure Stack integrated systems and Azure Stack Development Kit

注意

僅使用 Kubernetes Azure Stack Marketplace 項目來將叢集部署為概念證明。Only use the Kubernetes Azure Stack Marketplace item to deploy clusters as a proof-of-concept. 如需 Azure Stack 上支援的 Kubernetes 叢集,請使用  AKS 引擎 For supported Kubernetes clusters on Azure Stack, use the AKS engine.

您可以遵循本文中的步驟,在單一協調作業中部署及設定 Kubernetes 的資源。You can follow the steps in this article to deploy and set up the resources for Kubernetes in a single, coordinated operation. 這些步驟會使用 Azure Resource Manager 解決方案範本。The steps use an Azure Resource Manager solution template. 您必須收集 Azure Stack 安裝所需的相關資訊、產生範本,然後部署至您的雲端。You'll need to collect the required information about your Azure Stack installation, generate the template, and then deploy to your cloud. Azure Stack 範本不會使用全域 Azure 中提供的相同受控 AKS 服務。The Azure Stack template doesn't use the same managed AKS service offered in global Azure.

Kubernetes 和容器Kubernetes and containers

您可以在 Azure Stack 上,使用 AKS 引擎產生的 Azure Resource Manager 範本來安裝 Kubernetes。You can install Kubernetes using Azure Resource Manager templates generated by the AKS engine on Azure Stack. Kubernetes 是一種開放原始碼系統,可進行自動化部署、調整和管理容器中的應用程式。Kubernetes is an open-source system for automating deployment, scaling, and managing of applications in containers. 容器位於映像中。A container is in an image. 此容器映像類似於虛擬機器 (VM),但與 VM 不同的是,容器只包含其執行應用程式所需的資源,例如程式碼、執行程式碼的執行階段、特定程式庫和設定等。The container image is similar to a virtual machine (VM), however, unlike a VM, the container just includes the resources it needs to run an application, such as the code, runtime to execute the code, specific libraries, and settings.

使用 Kubernetes 可執行下列作業:You can use Kubernetes to:

  • 開發可大幅調整、可升級,並且可在短短數秒內完成部署的應用程式。Develop massively scalable, upgradable, applications that can be deployed in seconds.
  • 簡化您的應用程式設計,並透過不同的 Helm 應用程式改善其可靠性。Simplify the design of your application and improve its reliability by different Helm applications. Helm 是開放原始碼的封裝工具,可協助您安裝和管理 Kubernetes 應用程式的生命週期。Helm is an open-source packaging tool that helps you install and manage the lifecycle of Kubernetes applications.
  • 輕鬆監視和診斷應用程式的健康情況。Easily monitor and diagnose the health of your applications.

您只須支付支援您叢集節點所需的計算使用量。You'll only be charged for the compute usage required by the nodes supporting your cluster. 如需詳細資訊,請參閱 Azure Stack 中的使用量和計費For more information, see Usage and billing in Azure Stack.

部署 Kubernetes 以使用容器Deploy Kubernetes to use containers

在 Azure Stack 上部署 Kubernetes 叢集的步驟取決於您的身分識別管理服務。The steps to deploy a Kubernetes cluster on Azure Stack will depend on your identity management service. 確認您的 Azure Stack 安裝所使用的身分識別管理解決方案。Verify the identity management solution used by your installation of Azure Stack. 請連絡 Azure Stack 系統管理員來確認您的身分識別管理服務。Contact your Azure Stack administrator to verify your identity management service.

連線至您的叢集Connect to your cluster

您現在已可連線至您的叢集。You're now ready to connect to your cluster. 您可以在叢集資源群組中找到主要叢集,其名稱為 k8s-master-<sequence-of-numbers>The master can be found in your cluster resource group, and is named k8s-master-<sequence-of-numbers>. 使用 SSH 用戶端來連線至主要叢集。Use an SSH client to connect to the master. 在主要叢集上,您可以使用 kubectl,這是用來管理叢集的 Kubernetes 命令列用戶端。On the master, you can use kubectl, the Kubernetes command-line client to manage your cluster. 如需指示,請參閱 Kubernetes.ioFor instructions, see Kubernetes.io.

您也可能會發現 Helm 套件管理員很適合用來對叢集安裝和部署應用程式。You may also find the Helm package manager useful for installing and deploying apps to your cluster. 如需對叢集安裝和使用 Helm 的指示,請參閱 helm.shFor instructions on installing and using Helm with your cluster, see helm.sh.

後續步驟Next steps

啟用 Kubernetes 儀表板Enable the Kubernetes Dashboard

將 Kubernetes 新增至 Marketplace (適用於 Azure Stack 操作員)Add a Kubernetes to the Marketplace (for the Azure Stack operator)

使用 Azure Active Directory (Azure AD) 將 Kubernetes 部署至 Azure StackDeploy Kubernetes to Azure Stack using Azure Active Directory (Azure AD)

使用 Active Directory 同盟服務 (AD FS) 將 Kubernetes 部署至 Azure StackDeploy Kubernetes to Azure Stack using Active Directory Federated Services (AD FS)

Azure 上的 KubernetesKubernetes on Azure