Using CheatSheets To Apply Best Practices

Cheatsheet: Kubernetes Cluster API

Cheatsheet: Kubernetes Cluster API

1.1 Cluster API – Basic

Name Summary
Cluster API Project Milestone v1alpha1(Due by 03/29/2019)
Key Initiatives Declarative infra; CRD design model; Resource LCM
CAL (cloud abstraction layer)  
Boostrap cluster minikube by default
Machine Object Machine CRD
Cluster Object  
clusterctl GitHub: cluster-api/cmd/clusterctl, Might be merged into kubectl directly
Demo Video: vSphere Clsuter-API provider: self-service

1.2 Components

Name Summary
API Spec Link: Kubernetes Cluster Management API
provider-components.yaml  
cluster.yaml  
machines.yaml  
addons.yaml  
2 pods in guest k8s clusters cluster api controller, cloud provider controller
Reference GitHub: kubernetes-sigs/cluster-api

1.3 Commands

Name Summary
Deploy a k8s cluster clusterctl create cluster -p provider-components.yaml -c cluster.yaml -m machines.yaml --provider vsphere -e ~/.kube/config

1.4 Cluster API Related Works

Name Summary
SAP gardener  
Gardener with cluster api GitHub Issue: Adopt Cluster API Spec

1.5 clusterctl cli Online Help

> go/src/sigs.k8s.io/cluster-api-provider-gcp > ./bin/clusterctl create cluster --help

I0311 17:25:43.924329   50076 machineactuator.go:811] Using the default GCP client
Create a kubernetes cluster with one command

Usage:
  clusterctl create cluster [flags]

Flags:
  -a, --addon-components string               A yaml file containing cluster addons to apply to the internal cluster
      --bootstrap-cluster-cleanup             Whether to cleanup the bootstrap cluster after bootstrap. (default true)
  -e, --bootstrap-cluster-kubeconfig string   Sets the bootstrap cluster to be an existing Kubernetes cluster.
      --bootstrap-flags strings               Command line flags to be passed to the chosen bootstrapper
      --bootstrap-type string                 The cluster bootstrapper to use. (default "none")
  -c, --cluster string                        A yaml file containing cluster object definition. Required.
  -h, --help                                  help for cluster
      --kubeconfig-out string                 Where to output the kubeconfig for the provisioned cluster (default "kubeconfig")
  -m, --machines string                       A yaml file containing machine object definition(s). Required.
      --provider string                       Which provider deployment logic to use (google/vsphere/azure). Required.
  -p, --provider-components string            A yaml file containing cluster api provider controllers and supporting objects. Required.

Global Flags:
      --alsologtostderr                  log to standard error as well as files
      --kubeconfig string                Paths to a kubeconfig. Only required if out-of-cluster.
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --log_file string                  If non-empty, use this log file
      --logtostderr                      log to standard error instead of files (default true)
      --master string                    The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
      --skip_headers                     If true, avoid header prefixes in the log messages
      --stderrthreshold severity         logs at or above this threshold go to stderr
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

1.6 More Resources

License: Code is licensed under MIT License.




Leave a Reply

Your email address will not be published. Required fields are marked *