Setup a Google Kubernetes Engine cluster

Setup a Google Kubernetes Engine cluster

前期准备

Create a new cluster

$ gcloud services enable container.googleapis.com && \
  gcloud container clusters create $CLUSTER_NAME \
  --zone $ZONE \
  --project $PROJECT_ID

For more options refer to the Google Cloud SDK docs, or instead create a cluster through the Cloud Console for a more interactive experience.

Retrieve your credentials for kubectl

$ gcloud container clusters get-credentials $CLUSTER_NAME \
    --zone $ZONE \
    --project $PROJECT_ID

(可选) 安装Helm v3

  1. 安装 Helm v3 客户端

注意: 最新的 Dapr helm chart 不再支持 Helm v2。 请按照这篇文章 Helm 迁移指南 从Helm v2 迁移到Helm v3。

  1. 如果您需要 Kubernetes 仪表板权限,(例如 configmaps is forbidden: User “system:serviceaccount:kube-system:kubernetes-dashboard” cannot list configmaps in the namespace “default” 等等),执行这个命令
kubectl create clusterrolebinding kubernetes-dashboard -n kube-system --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
Last modified January 1, 0001