zoukankan      html  css  js  c++  java
  • use azure-cli to manage resources

    登陆

    注意: 在Azure China中使用Azure CLI 2.0之前,请首先切换环境, 运行:

    az cloud set -n AzureChinaCloud
    

    如果想切回全球的版本:

    az cloud set -n AzureCloud
    

    登陆指令:

    az login -u <username> -p <password>
    

    管理

    订阅

    获取订阅列表:

    az account list --output table
    

    切换订阅:

    az account set --subscription "My Demos"
    

    资源组

    列举当前订阅的资源组:

    az group list
    

    在当前订阅创建资源组:

    az group create --name $resourceGroupName --location $location
    

    获取当前订阅的某个资源组:

    az group show --name $resourceGroupName
    

    删除当前订阅的某个资源组:

    az group delete --name $resourceGroupName
    

    容器

    遗憾的是, 中国区目前容器不可用

    显示某个资源组下面的容器列表:

    az container list --resource-group myResourceGroup --output table
    

    创建容器:

    az container create 
      --resource-group learn-deploy-aci-rg 
      --name mycontainer 
      --image microsoft/aci-helloworld 
      --ports 80 
      --dns-name-label $DNS_NAME_LABEL 
      --location eastus
    
  • 相关阅读:
    一个2核1G内存的服务器能做什么
    产品能力是一种底层能力
    利用容器逃逸实现远程登录k8s集群节点
    边缘计算k8s集群SuperEdge初体验
    LeetCode
    RSA加密
    RSA加密
    LeetCode
    LeetCode
    双端队列
  • 原文地址:https://www.cnblogs.com/jerryqi/p/11782775.html
Copyright © 2011-2022 走看看