KOps Quick Bootstrapping on AWS

I love to grease knots and bolts of SDLC, nurture the underlying infra, rightly automate, monitor systems and enable the dev teams to achieve more with less.
Search for a command to run...

I love to grease knots and bolts of SDLC, nurture the underlying infra, rightly automate, monitor systems and enable the dev teams to achieve more with less.
No comments yet. Be the first to comment.
Command Cheat sheet https://helm.sh/docs/intro/cheatsheet/ Add/Search/Install/Uninstall repo helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update bitnami helm repo list helm install wordpress bitnami/wordpress helm list helm sta...

Containers have become the default way to package, ship, and run modern applications. They make deployments repeatable, portable, and scalable. But containers are not magic security boxes. A container

Details: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ Pre-requisite A compatible Linux host. Verify the MAC address and product_uuid are unique for every node. Kubernetes uses these values to uniquely ident...

Docs Link1 Link2 Install Session Manger Plugin AWS SSM Proxy. Optional Start basic ssh connection aws ssm start-session \ --target i-askfsa8asld Port Forwarding aws ssm start-session \ --target i-00e68c055d1c0b087 \ --document-na...

https://kops.sigs.k8s.io/getting_started/aws/
DOMAIN=kops.balmanrawat.com.np
aws route53 create-hosted-zone \
--name ${DOMAIN} \
--caller-reference kops-expriment
ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
aws s3api create-bucket \
--bucket kops-${ACCOUNT_ID} \
--region us-east-1
aws s3api put-bucket-versioning \
--bucket kops-${ACCOUNT_ID} \
--versioning-configuration Status=Enabled
aws s3api create-bucket \
--bucket kops-oidc-${ACCOUNT_ID} \
--region us-east-1 \
--object-ownership BucketOwnerPreferred
aws s3api put-public-access-block \
--bucket kops-oidc-${ACCOUNT_ID} \
--public-access-block-configuration BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false
aws s3api put-bucket-acl \
--bucket kops-oidc-${ACCOUNT_ID} \
--acl public-read
export NAME=${DOMAIN}
export KOPS_STATE_STORE=s3://kops-${ACCOUNT_ID}
# aws ec2 describe-availability-zones --region us-east-1
kops create cluster \
--name=${NAME} \
--cloud=aws \
--zones=us-east-1a \
--dns-zone=kubernetes.${DOMAIN} \
--discovery-store=s3://kops-oidc-${ACCOUNT_ID}/${NAME}/discovery
kops update cluster --name ${NAME} --yes --admin
Suggestions:
* validate cluster: kops validate cluster --wait 10m
* list nodes: kubectl get nodes --show-labels
* ssh to a control-plane node: ssh -i ~/.ssh/id_rsa ubuntu@
* the ubuntu user is specific to Ubuntu. If not using Ubuntu please use the appropriate user based on your OS.
* read about installing addons at: https://kops.sigs.k8s.io/addons.
kops delete cluster --name ${NAME} --yes
aws s3 rm s3://kops-${ACCOUNT_ID} --recursive
aws s3api delete-bucket --bucket kops-${ACCOUNT_ID} --region us-east-1
aws s3 rm s3://kops-oidc-${ACCOUNT_ID} --recursive
aws s3api delete-bucket --bucket kops-oidc-${ACCOUNT_ID} --region us-east-1
HOSTEDZONE_ID=$(aws route53 list-hosted-zones-by-name --dns-name ${DOMAIN} --query 'HostedZones[0].Id' --output text | sed 's/\/hostedzone\///')
aws route53 list-resource-record-sets --hosted-zone-id ${HOSTEDZONE_ID} > delete-record-set.json
#delete ns/soa record form the file and run the delete
aws route53 change-resource-record-sets --hosted-zone-id ${HOSTEDZONE_ID} --change-batch file://delete-record-sets.json
aws route53 delete-hosted-zone --id ${HOSTEDZONE_ID}