0

我正在关注下面提到的创建动态持久卷声明的文章。

https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv

我使用以下方法创建了持久卷声明:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: taskmanager-01
spec:
  accessModes:
  - ReadWriteOnce
  storageClassName: managed-premium
  resources:
    requests:
      storage: 16Gi

问题01:

据我了解,持久卷和实际的底层磁盘将在创建时进行配置。

它是否正确 ?

问题02:

kubectl get pvc -n <namespace>

将我的 PVC 的状态返回为Pending. 我在 kubernetes 事件列表中收到以下错误

Failed to provision volume with StorageClass "managed-premium": 

azure.BearerAuthorizer#WithAuthorization: 
Failed to refresh the Token for request to 

https://management.azure.com/subscriptions/xxxx/resourceGroups/MC_XXXX/providers/Microsoft.Compute/disks/kubernetes-dynamic-pvc-651cef89-49ae-11e9-8104-0a58ac1f222a?api-version=2016-04-30-preview: 

StatusCode=401 
Original Error: adal: Refresh request failed. Status Code = '401'.


{
  "error": "invalid_client",
  "error_description": "AADSTS7000215: Invalid client secret is provided.\r\n
 Trace ID: xxxx\r\nCorrelation ID: xxxxr\nTimestamp: 2019-03-18 18:49:42Z",
  "error_codes": [
    7000215
  ],
  "timestamp": "2019-03-18 18:49:42Z",
  "trace_id": "xxxx",
  "correlation_id": "xxxx"
}
4

1 回答 1

1
  1. 是的,动态的它将被即时配置
  2. 很确定此错误意味着您的服务主体没有资源组的权限或其密码已过期。

一种检查方法是从 AKS 资源中查找该信息(在servicePrincipalProfile>> clientId. 下使用 say az aks list -g %resource-group%)并检查它是否具有对资源组的权限。如果是这样,您可以尝试将秘密轮换为新的

https://docs.microsoft.com/en-us/azure/aks/update-credentials

于 2019-03-18T20:00:24.520 回答