質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Azure

Azureは、マイクロソフトのクラウド プラットフォームで、旧称は Windows Azureです。PaaSとIaaSを組み合わせることで、 コンピューティング・ストレージ・データ・ネットワーキング・アプリケーションなど多くの機能を持ちます。

Q&A

1回答

3935閲覧

Azureで権限の付け方がわからない

退会済みユーザー

退会済みユーザー

総合スコア0

Azure

Azureは、マイクロソフトのクラウド プラットフォームで、旧称は Windows Azureです。PaaSとIaaSを組み合わせることで、 コンピューティング・ストレージ・データ・ネットワーキング・アプリケーションなど多くの機能を持ちます。

0グッド

0クリップ

投稿2021/07/18 08:02

前提・実現したいこと

Azure kubernetesで静的ipアドレスを設定したいのですが,でpublic ipアドレスを読む権限がないといった趣旨のエラーメッセージが出ます.

発生している問題・エラーメッセージ

Name: kube-sample Namespace: default Labels: <none> Annotations: service.beta.kubernetes.io/azure-load-balancer-resource-group: myResourceGroup Selector: app=kube-sample Type: LoadBalancer IP Families: <none> IP: IPs: <none> IP: Port: <unset> 443/TCP TargetPort: 443/TCP NodePort: <unset> 32430/TCP Endpoints: <none> Session Affinity: None External Traffic Policy: Cluster Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal EnsuringLoadBalancer 26h (x43 over 29h) service-controller Ensuring load balancer Warning ListPublicIPs 26h (x43 over 29h) azure-cloud-provider Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: {"error":{"code":"AuthorizationFailed","message":"The client '' with object id '' does not have authorization to perform action 'Microsoft.Network/publicIPAddresses/read' over scope '/subscriptions//resourceGroups/myResourceGroup/providers/Microsoft.Network' or the scope is invalid. If access was recently granted, please refresh your credentials."}} Warning UnAvailableLoadBalancer 77s service-controller There are no available nodes for LoadBalancer Normal UpdatedLoadBalancer 52s service-controller Updated load balancer with new hosts Normal EnsuringLoadBalancer 41s (x5 over 117s) service-controller Ensuring load balancer Warning ListPublicIPs 41s (x5 over 116s) azure-cloud-provider Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: {"error":{"code":"AuthorizationFailed","message":"The client '<client id>' with object id '<object id>' does not have authorization to perform action 'Microsoft.Network/publicIPAddresses/read' over scope '/subscriptions/<subscription id>/resourceGroups/myResourceGroup/providers/Microsoft.Network' or the scope is invalid. If access was recently granted, please refresh your credentials."}} Warning SyncLoadBalancerFailed 41s (x5 over 116s) service-controller Error syncing load balancer: failed to ensure load balancer: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: {"error":{"code":"AuthorizationFailed","message":"The client '<client id>' with object id '<object id>' does not have authorization to perform action 'Microsoft.Network/publicIPAddresses/read' over scope '/subscriptions/<subscription id>/resourceGroups/myResourceGroup/providers/Microsoft.Network' or the scope is invalid. If access was recently granted, please refresh your credentials."}}

試したこと

サービスプリンシパル周りを試したり,ロールを追加したりしました.うまく行っていなかったのかと何度かロールの追加をしたりしたので複数あったりちょっとごちゃごちゃしています.ネットワーク共同管理者では権限が足りないのかと一番強そうな所有者権限を増やしたりしてみましたが,解決せず,ネットワーク共同管理者で十分なことは調べてわかりました.正直どこがどうなってどこに権限が足りないのかもうわかりません.そんなものpublic ipが必要な構成にこっちがしてるんだから察せよて思います.普段web的なのは死んでも触らない人なのでとても腹立たしいです.
かれこれ10日はこうして悩んでいます.助けてください.
リソース
サブスクリプション
なんで二個あるかわかんないけどpublic ip
aksCluster
resourceGroup
public ip

ちなみに実現したいことは,ASP.Net,nginx2つのコンテナーを一つのpodにのせたサイドカー構成です.
静的public ipアドレスでエンドポイントは一つ,
yamlでのデプロイ時のreplicaは1つで,podのオートスケールを使ってcpu負荷によって最大3つまでpodが増える様にしたいです.(ネットワーク系の用語まだ完全にはわからないんですけど自分の言ってることおかしくないですよね?)
コンテナはここの記述のものを流用します.
https://docs.microsoft.com/ja-jp/azure/container-instances/container-instances-container-group-ssl

デプロイのyamlです

yaml

1apiVersion: apps/v1 2kind: Deployment 3metadata: 4 name: kube-sample 5spec: 6 replicas: 1 7 selector: 8 matchLabels: 9 app: kube-sample 10 template: 11 metadata: 12 labels: 13 app: kube-sample 14 spec: 15 volumes: 16 - name: nginx-config 17 configMap: 18 name: nginx-config 19 - name: nginx-ssl 20 secret: 21 secretName: nginx-ssl 22 containers: 23 - name: app 24 image: mcr.microsoft.com/azuredocs/aci-helloworld 25 resources: 26 requests: 27 cpu: 100m 28 memory: 128Mi 29 limits: 30 cpu: 250m 31 memory: 256Mi 32 ports: 33 - containerPort: 80 34 - name: side-car 35 image: nginx 36 ports: 37 - containerPort: 443 38 resources: 39 requests: 40 cpu: 100m 41 memory: 128Mi 42 limits: 43 cpu: 250m 44 memory: 256Mi 45 volumeMounts: 46 - name: nginx-config 47 mountPath: /etc/nginx 48 readOnly: true 49 - name: nginx-ssl 50 mountPath: /etc/nginx/ssl 51 readOnly: true 52--- 53apiVersion: v1 54kind: Service 55metadata: 56 annotations: 57 service.beta.kubernetes.io/azure-load-balancer-resource-group: myResourceGroup 58 name: kube-sample 59spec: 60 loadBalancerIP: <ip address> 61 type: LoadBalancer 62 ports: 63 - port: 443 64 selector: 65 app: kube-sample

今回の問題とは関係ないとは思いますが一応貼っておきます.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

こんにちは。

うろ覚えなのですが、もし未解決であればもう確認済みかもしれませんが、コメントがまだついていないのでこのあたり確認・試してみてはいかがでしょうかということで。

同一リソースグループにパブリックIPを作成するのと、パブリックIPのクラスがスタンダード以上だと○○など挙動の制限や違いがあった気がします。
https://docs.microsoft.com/en-us/azure/aks/static-ip

私はそれだけでLBにパブリックIPの関連付けが出来ていましたが、上記にはクラスターIDの権限委任についても言及されているので、そのあたりも確認してみると良いかもしれません。

投稿2021/09/04 04:00

Tak1wa

総合スコア4791

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問