Cloud Commands¶
Most people uses some flavour of Cloud hosted K8s clusters. This section is about the main K8s Cloud Providers.
Gcloud¶
With Google, everything goes throu the gcloud
command.
Install¶
Refer to the official doc.
TODO
Setup¶
Once the gcloud
command is installed, we have to init and configure it:
# Install kubectl if you don't already have it
# gcloud components install kubectl # Optional
gcloud init
gcloud components install gke-gcloud-auth-plugin --quiet
gcloud auth login
gcloud config set compute/region us-east1
gcloud config list
[compute]
region = us-central1
zone = us-central1-a
[core]
account = prune@not-your-business.zap
disable_usage_reporting = False
project = my-dev-project
List clusters:
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
my-dev-us-central-cluster us-central1-a 1.24.3-gke.2100 34.70.94.2 e2-standard-2 1.23.8-gke.1900 * 136 RUNNING
Add your GKE
clusters to your kubectl
context (you can always find this command in the Connect
tab in the Gcloud Web Console):
Note
It is not necessary to add the --project <project>
section if only one project is used and is the default.
Completion¶
Add those lines to enable completion:
AWS CLI¶
Install¶
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
Setup¶
Setup SSO ans default AWS profile. This is not mandatory but is a great helper if you're using SSO:
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
aws configure sso
aws sso login --profile profile_xxxxxx
export AWS_PROFILE=profile_xxxxxx
Add your EKS
clusters to your kubectl
context:
Completions¶
Add those lines to your shell startup script:
~/.bashrc | |
---|---|
Azure¶
TODO
Next¶
Tired of typing ? Let's use a UI !