Documentation for current install of kubefirst with Github flavor:
Build and Install
Required flags:
export KUBEFIRST_GITOPS_BRANCH='main' --> can be replaced by the --gitops-branch flag in the init command.
export KUBEFIRST_METAPHOR_BRANCH='main' --> can be replaced by the --metaphor-branch flag in the init command.
export KUBEFIRST_AWS_NODES_SPOT='true' --> can be replaced by the --aws-nodes-spot flag in the init command.
export GITHUB_AUTH_TOKEN='...' # Personal GitHub token
Optional flags:
export KUBEFIRST_S3_SUFFIX='...' --> can be replaced by the --s3-suffix flag in the init command.
export KUBEFIRST_CLUSTER_NAME='...' --> can be replaced by the --cluster-name flag in the init command.
PS: The following commands must be run from the Kubefirst root directory.
To build the application:
go build -ldflags="-X github.com/kubefirst/kubefirst/configs.K1Version=1.10.1" .
To run the installer with the above environment variables already set:
./kubefirst init --profile default --cloud aws --region $REGION \
--admin-email $EMAIL --hosted-zone-name $HOSTED_ZONE_NAME \
--github-user $GITHUB_USER --github-owner $GITHUB_OWNER
To run the installer without the above environment variables (only GITHUB_AUTH_TOKEN):
Note: GITHUB_USER and GITHUB_OWNER must exist before running this command. GITHUB_USER is the owner of GITHUB_AUTH_TOKEN.
./kubefirst init --profile default --cloud aws --region $REGION \
--admin-email $EMAIL --hosted-zone-name $HOSTED_ZONE --aws-nodes-spot \
--cluster-name $CLUSTER_NAME --s3-suffix $S3_SUFFIX --github-user $GITHUB_USER \
--github-owner $GITHUB_OWNER --metaphor-branch $METAPHOR_BRANCH --gitops-branch $GITOPS_BRANCH
To create kubefirst witth console
./kubefirst cluster create --enable-console
To create kubefirst witthout console
./kubefirst cluster create
SSL Backup
After a few minutes of creating the cluster, it is possible to backup the certificates using the following command:
./kubefirst backupSSL
After executing this command, an S3 bucket will be created in AWS with the name k1-$HOSTED_ZONE_NAME.
On the next install, the init command will look for an existing bucket in the cloud and reuse the certificate backups.
Destroy and Clean
To destroy all resources created by kubefirst create cluster:
./kubefirst cluster destroy
To destroy Github repositories:
./kubefirst action remove-github
To destroy the paths $HOME/.k1, $HOME/.kubefirst and buckets created by kubefirst init:
./kubefirst clean --destroy-buckets --destroy-confirm
To destroy only the paths $HOME/.k1 and $HOME/.kubefirst: