Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

gcloud script to provision my GKE cluster, in a secure way

Notifications You must be signed in to change notification settings

mathieu-benoit/mygkecluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mygkecluster

Based mostly on Hardening your cluster's security and GKE's Security overview.

Open in Cloud Shell

Prerequisities

  • Install gcloud
  • Install kubectl
  • Install docker
projectName=mygke
randomSuffix=$(shuf -i 100-999 -n 1)
projectId=$projectName-$randomSuffix
region=us-east4
zone=us-east4-a
clusterName=$projectName

## Setup Project

folderId=FIXME
gcloud projects create $projectId \
    --folder $folderId \
    --name $projectName
gcloud config set project $projectId
# Get the billingAccountId from `gcloud beta billing accounts list`
billingAccountId=FIXME
gcloud beta billing projects link $projectId \
    --billing-account $billingAccountId

By bash script

cd cli
./run.sh

Here are the exhaustive list of the security best practices with your GKE clusters you should look at:

Here are actions you may want to do once your GKE clusters are deployed to help solidify your security posture:

Complementary resources: