1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

『Kubernetes on AWS』トラブルシューティング

Last updated at Posted at 2020-10-29

Kubernetes on AWS ~アプリケーションエンジニア 本番環境へ備える をやったときのトラブルシューティングです。

[b-4 eksctlの入手] eksctlを使用できない

スクリーンショット 2020-10-29 11.17.26.png

解決法

brew tap weaveworks/tap
brew install weaveworks/tap/eksctl

参考

eksctl の開始方法

[2-4-4 ECRへのログイン] ログインできない

スクリーンショット 2020-10-29 15.14.07.png

解決法

スクリーンショット 2020-10-29 15.13.18.png

参考

AWS CLI を使用した Amazon ECR の開始方法

[2-5-2 ビルドの実行] ビルドに失敗する

スクリーンショット 2020-10-29 15.13.43.png

解決法

node_modules, package.lock.json を削除して再度npm install

[2-5-3 S3バケットとCloudFrontディストリビューションの作成] ROLLBACK_COMPLETE

スクリーンショット 2020-10-29 15.16.16.png

解決法

BucketSuffixを一意(他の人とかぶらないように)する

スクリーンショット 2020-10-29 15.22.25.png

メモ

< aws cloudfront create-invalidation --distribution-id EGHAL47PBG8LC --path "/*"
 {
     "Location": "https://cloudfront.amazonaws.com/2019-03-26/distribution/EGHAL47PBG8LC/invalidation/I1K0BBC56XEDJK",
     "Invalidation": {
         "Id": "I1K0BBC56XEDJK",
         "Status": "InProgress",
         "CreateTime": "2020-10-29T06:27:20.260000+00:00",
         "InvalidationBatch": {
             "Paths": {
                 "Quantity": 1,
                 "Items": [
                     "/*"
                 ]
             },
             "CallerReference": "cli-1603952838-180411"
         }
     }
 }

~/desktop/k8sbook/repos/k8sbook/eks-env
 < kubectl get all
 NAME                               READY   STATUS    RESTARTS   AGE
 pod/backend-app-7fcbbf544f-8mshk   1/1     Running   0          69m
 pod/backend-app-7fcbbf544f-8xckz   1/1     Running   0          69m
 
 NAME                          TYPE           CLUSTER-IP      EXTERNAL-IP                                                                   PORT(S)          AGE
 service/backend-app-service   LoadBalancer   10.100.202.71   a201f4eff19ab11eb82a00e3d815dcfa-699854123.ap-northeast-1.elb.amazonaws.com   8080:30742/TCP   68m
 
 NAME                          READY   UP-TO-DATE   AVAILABLE   AGE
 deployment.apps/backend-app   2/2     2            2           69m
 
 NAME                                     DESIRED   CURRENT   READY   AGE
 replicaset.apps/backend-app-7fcbbf544f   2         2         2       69m
 
 NAME                      SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
 cronjob.batch/batch-app   */5 * * * *   False     0        <none>          6s
< kubectl get all
 NAME                               READY   STATUS      RESTARTS   AGE
 pod/backend-app-7fcbbf544f-8mshk   1/1     Running     0          74m
 pod/backend-app-7fcbbf544f-8xckz   1/1     Running     0          74m
 pod/batch-app-1603955100-x9vdz     0/1     Completed   0          2m12s
 
 NAME                          TYPE           CLUSTER-IP      EXTERNAL-IP                                                                   PORT(S)          AGE
 service/backend-app-service   LoadBalancer   10.100.202.71   a201f4eff19ab11eb82a00e3d815dcfa-699854123.ap-northeast-1.elb.amazonaws.com   8080:30742/TCP   73m
 
 NAME                          READY   UP-TO-DATE   AVAILABLE   AGE
 deployment.apps/backend-app   2/2     2            2           74m
 
 NAME                                     DESIRED   CURRENT   READY   AGE
 replicaset.apps/backend-app-7fcbbf544f   2         2         2       74m
 
 NAME                             COMPLETIONS   DURATION   AGE
 job.batch/batch-app-1603955100   1/1           25s        2m12s
 
 NAME                      SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
 cronjob.batch/batch-app   */5 * * * *   False     0        2m14s           5m8s
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?