mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
M365

Service principal clientID not found in Active Directory tenant

https://qiita.com/dz_/items/508ce475cd267dbd950e https://stackoverflow.com/questions/47516018/creating-a-kubernetes-cluster-in-azure-fails 上記のエラーが発生したとき、 ${HOME}/.azure/acsServicePrincipal.json がある場合は、すでに Service Principal ができてるようです。 cat ${HOME}/.azure/acsServicePrincipal.json | jq {   "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx": {     "client_secret": "xxxxxxxxxxxxxxxxxxxx",     "service_principal": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"   } } Thanks for the feedback. I managed to resolve the issue by deleting my .azure folder and retrying. According to your error message, please do the follow steps to re-create AKS: 1.Check ${HOME}/.azure/.azure/acsServicePrincipal.json, find the service principal: [root@jasoncli@jasonye .azure]# pwd /root/.azure [root@jasoncli@jasonye .azure]# ls accessTokens.json  acsServicePrincipal.json  az.json  az.sess  azureProfile.json  clouds.config  config [root@jasoncli@jasonye .azure]# cat acsServicePrincipal.json {"5384xxxx-xxx-xxxx-xxxx-xxxxe29axxxx": {"client_secret": "6fc7cdff5eaf0axxxx8f", "service_principal": "6b73deca-xxxx-4a6d-ab54-73963cb78059"}} 2.Use this command to check your Service Principal, make sure the service principal exist or not: az ad sp show --id <service_principal> If the service principal not exist, we can follow this article to create it. If the service principal exist, we can follow specify the service principal and --client-secret to create AKS, like this: az aks create -g <resource_group>-n <aks name> --node-count 1 --service-principal <service_principal> --client-secret <client_secret> ----generate-ssh-key Hope this helps.

2020-11-28 0comments 288hotness 0likes mikebai Read all
M365

How-To deploy Docker images to Azure Kubernetes Services (AKS)

from https://purple.telstra.com.au/blog/how-to-deploy-docker-images-to-azure-kubernetes-services-aks In this blog, I will guide you through the process of building and deploying Docker images to the Kubernetes platform hosted on Azure Kubernetes Services (AKS). In addition, I will also show you how to work with service scale-out and high-availability. Docker defines a container as “A standard unit of software that packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another” A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.” I will not go further into the concepts of Docker and containers and urge you to do your own reading. To build out our solution, we will need to do the following   Create an Azure container Registry (ACR) Create an Azure Service principal

2020-11-26 0comments 286hotness 0likes mikebai Read all
M365

Step-by-Step guide to configure Azure File Sync

With Azure File Sync we can make on-premises windows server to act as a cache copy holder for your Azure file share.  It allows users to access files locally using protocol such as SMB, NFS and FTPS. In this blog we going to look in to Azure file sync implementation. Before we start configuration, we need to familiarizes with some terms associated with this feature.  Azure File Sync Agent It is an agent which we need to install in on-premises windows server in order to enable sync with Azure file share. It includes three components,  1. FileSyncSvc.exe – This is the service responsible for monitoring changes in local server initiate sync with Azure file share.  2. StorageSync.sys – This component is responsible for tiering files to Azure files. Cloud tiering is additional feature of Azure File Sync. It can use with not frequently used files greater than 64Kb. When this enabled, local file replaced with url to files in Azure file share. When user access it, in background it recalls the file from Azure file share. End user will not have any difference experience as it all happens in back end.  3. PowerShell cmdlets – This helps to manage Microsoft.StorageSync Azure resource provider using PowerShell commands. These cmdlet files are located in C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.PowerShell.Cmdlets.dll C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll This agent is only supported in Windows server 2012 R2 / 2016 standard and datacenter versions only. It is not supported on core version either.  Storage Sync

2020-11-26 0comments 299hotness 0likes mikebai Read all
M365

Kubernetes基础

https://www.cnblogs.com/cocowool/p/k8s_base_concept.html Kubernetes是什么 Kubernetes是当今最流行的开源容器管理平台,它就是大名鼎鼎的Google Borg的开源版本。Google在2014年推出了Kubernetes,本文发布时最新的版本是1.11。Kubernetes源于希腊语,意为舵手,K8S是一个简称,因为首尾字母中间正好有8个字母。基于容器技术,Kubernetes可以方便的进行集群应用的部署、扩容、缩容、自愈机制、服务发现、负载均衡、日志、监控等功能,大大减少日常运维的工作量。 Kubernetes is primarily targeted at applications composed of multiple containers. It therefore groups containers using pods and labels into tightly coupled and loosely coupled formations for easy management and discovery. Kubernets所有的操作都可以通过Kubernetes API来进行,通过API来操作Kubernetes中的对象,包括Pod、Service、Volume、Namespace等等。Kubernetes的整体结构如下图所示: Master 也叫做 Cluster Control Plane。 Node Node 可以是一个物理机也可以是虚拟机,每个节点上都运行了可以运行 Pods 的服务。通过Master节点来进行管理。节点实际上是由云供应商提供的,Kubernetes管理中创建节点实际上只是在Kubernetes中创建一个代表节点的对象。 Node 包含以下几方面的信息: Addresses:包括主机名、内部IP、外部IP。 Condition:描述运行的状态,包括OutOfDisk、Ready、MemoryPressure、PIDPressure、DiskPressure、NetworkUnavailable、ConfigOK。 Capacity:描述节点资源的情况,包括CPU, memory and the maximum number of pods that can be scheduled onto the node. Info:包括内核版本、Kubernetes版本、Docker版本、OS等基础信息。 Kubernetes 对象 Objectes

2020-11-25 0comments 291hotness 0likes mikebai Read all
M365

Monitor a process with Azure Monitor

add Windows Performance Counters Process(*)\ID Process     Perf | where ObjectName == "Process"   and CounterName == "ID Process"  // | where CounterName contains "Processor Time"   | where Computer == "pc-vm-websrv1"  // | where  Computer == "pc-vm-logicsrv2"  // | where  Computer == "pc-vm-dbsrv3"  // | distinct  InstanceName  | where InstanceName == "fdm" or InstanceName =="sakura"  or InstanceName =="7zFM"        | summarize arg_max(TimeGenerated, *) by Computer, InstanceName   | project TimeGenerated, Computer, ProcessName = InstanceName  | order by TimeGenerated desc  A common question when working with Azure Monitor is monitoring of Windows services and processes running on Windows servers. In Azure Monitor we can monitor Windows Services and other processes the same way; by looking at process ID as a performance counter. Even if a process can be monitored by looking at events, it is not always a reliable source. The challenge is that there is no “active monitoring” checking if the process is running at the moment when looking at only events.  Each process writes a number of performance counters. None of these are collected by default in Azure Monitor, but easy to add under Windows Performance Counters.

2020-11-23 0comments 317hotness 0likes mikebai Read all
M365

azure monitor monitoring process/监视进程

from: https://www.cloudsma.com/2018/07/adding-azure-log-analytics-performance-counters/ https://techcommunity.microsoft.com/t5/azure-monitor/monitoring-processes/m-p/250947# First, in your Azure Portal Log Analytics workspace, go to advanced settings, Data, Windows Performance Counters. Note you can do the same for Linux, but this example covers Windows. Click add to add the default suggested counters. You’ll see them added with purple lines, meaning they haven’t been saved to your workspace yet. Also note, depending on your subscription type, the sample rate can be as high as 10 seconds. You can certainly tune these to different intervals, just be aware that these are global settings. Adding Additional Counters

2020-11-23 0comments 280hotness 0likes mikebai Read all
M365

powershell add counter to log analytics worksapce

form https://www.cloudsma.com/2020/01/azure-monitor-alerting-at-scale-iaas/ In this post I will expand upon the methods I showed here and show you how I do IaaS Alerting in Azure Monitor. As a refresher I believe alerting at scale is: Programmatic Alert Creation Automatically adds/removes resources Having read my previous posts you’ll also know that I prefer a Log Analytics workspace for Metric alerts. I prefer this for a few reasons, which I’ll go into below. PowerShell Modules and Commands To create our alerts we’ll need the following modules: Az.Monitor Az.OperationalInsights We’ll also need the following commands:

2020-11-23 0comments 283hotness 0likes mikebai Read all
M365

powershell ExpandProperty和ExpandResource用法

ExpandProperty http://www.datawan.net/web/index.php/cloud/45-powershell-expandproperty As most of you already know the "-ExpandProperty" parameter let's you enumerate the values of an incoming object as single value.  For example, if you run the command below without the "-ExpandProperty". Get-AzLocalNetworkGateway -ResourceGroupName "network-rg" You will get output like this:↓↓↓↓↓ Name                     : my-lng ResourceGroupName        : network-pd-rg Location                 : southcentralus Id                       : /subscriptions/GUID/resourceGroups/network-pd-rg/providers/Microsoft.Network/localNetworkGateways/qco-houdc-lng Etag                     : W/"GUID" ResourceGuid             : GUID ProvisioningState        : Succeeded Tags                     : ・・・ GatewayIpAddress         : 4.50.4.28 LocalNetworkAddressSpace : {                              "AddressPrefixes": [                                "10.100.0.0/16",                                "10.101.0.0/16",                                "10.102.0.0/16",                                "10.103.0.0/16",                                "10.104.0.0/16",                              ]                            } BgpSettings              : null But what if you just want a simple list of all LocalNetworkAddressSpace?  You can use -ExpandProperty but the trick is you have to use it twice!  See sample below.  If you only pass it once you will still not get desired list, you must expand the properties two times because the expanded property is a list in this case. Get-AzLocalNetworkGateway -ResourceGroupName "network-rg" | Select -ExpandProperty LocalNetworkAddressSpace | Select -ExpandProperty AddressPrefixes | FT

2020-11-23 0comments 271hotness 0likes mikebai Read all
杂七杂八

openwrt黑白名单

爱奇艺 iqiyi.com qiyi.com aiqiyicloud.com qiyi.cn 谷歌关联 start----------------------- google.com findyoutube.net/ googlevideo.com/ ytimg.com/ youtube.com/ googleapis.com/ youtu.be gstatic.com googleusercontent.com googlevideo.com youtu.be youtube.com.br youtube.co.nz youtube.de youtube.es youtube.googleapis.com youtubei.googleapis.com youtube.it youtube.nl youtube-nocookie.com youtube.ru video-stats.l.google.com ytimg.l.google.com rewind.youtube blog.youtube 谷歌关联 end-----------------------

2020-11-21 0comments 327hotness 0likes mikebai Read all
M365

powershell 使用hotmail id无法登录

https://stackoverflow.com/questions/39657391/login-azurermaccount-cant-login-to-azure-using-pscredential/39675182#39675182 Atf's answer has a point but however, this is not only the issue. We cannot directly sign in non-interactively using Hotmail or Outlook account. You must use domain of your account to sign in. See a similar issue posted in server fault : https://serverfault.com/questions/746557/add-azureaccount-unknown-user-type-unknown-user-type-on-azure-automation/746673 It mentions: Make sure the credential asset name (not username) is a simple string. Also make sure the credential asset username is a valid OrgID user (ex: abc@fdgdf.onmicrosoft.com), not a Microsoft / Live account (joe@gmail.com).

2020-11-20 0comments 323hotness 0likes mikebai Read all
1…56789…62

Recent Posts

  • sqlserver go语句
  • c# winform适配高dpi
  • com.microsoft.sqlserver.jdbc.SQLServerException “trustServerCertificate”属性设置为“false”,但驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server建立安全连接
  • java -cp 用法介绍
  • HTML 容器元素

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang