Cherry SOPs

Kubernetes Clusters SOP

Last edited 260 days ago by Cherry Assistant Team
for i in {1..85}; do deploymentName="nft-generator-${i}"; kubectl delete deployment ${deploymentName}; done
docker build -t registry.digitalocean.com/crowd-image-container/nft-generator:v1 . docker push registry.digitalocean.com/crowd-image-container/nft-generator:v1
doctl kubernetes cluster kubeconfig save 7dbcabad-c674-47a7-ba97-cd86135c73d0 kubectl config get-contexts kubectl config use-context do-sfo3-digitalocan-cluster-1
docker build --platform=linux/amd64 --push -t registry.digitalocean.com/crowd-image-container/nft-generator:v2 .


----- GOOGLE CLOUD AUTH gcloud auth login
--- SET PROJECT gcloud config set project howtochat gcloud config set project too-good-to-go-316903
---- ACCESS KUBERNETES CREDENTIALS gcloud container clusters get-credentials cluster-1 --zone asia-east1-a --project creature-crowd-burn gcloud container clusters get-credentials cluster-2 --zone asia-southeast2-c --project creature-crowd-burn gcloud container clusters get-credentials cluster-1 --zone asia-east1-a --project dataghost-369101 gcloud container clusters get-credentials cluster-1 --zone asia-southeast1 --project too-good-to-go-316903 howtochat
---- BUILD CONTAINER IMAGE

gcloud builds submit --tag gcr.io/${PROJECT_NAME}/nft-generator:v1 gcloud builds submit --tag gcr.io/creature-crowd-burn/nft-generator:v1 gcloud builds submit --tag gcr.io/dataghost-369101/nft-generator:v1 gcloud builds submit --tag gcr.io/too-good-to-go-316903/nft-generator:v1 gcloud builds submit --tag gcr.io/howtochat/nft-generator:v1
--- CREATE DEPLOYMENTS kubectl apply -f "deployment_nft-generator-5.yaml" kubectl apply -f "deployment_nft-generator-6.yaml" kubectl apply -f "deployment_nft-generator-7.yaml"
kubectl apply -f "deployment_nft-generator-8.yaml" kubectl apply -f "deployment_nft-generator-9.yaml" kubectl apply -f "deployment_nft-generator-10.yaml"

----- CREATE DEPLOYMENTS
totalTokens=38045 parts=60 tokensPerPart=$(( totalTokens / parts ))
for i in {1..60}; do startTokenId=$(( (i - 1) * tokensPerPart + 1 )) endTokenId=$(( i * tokensPerPart )) tokenIdRange="${startTokenId}-${endTokenId}" deploymentName="nft-generator-${i}" # Replace placeholders in the deployment template sed -e "s|NFT_GENERATOR_NAME|${deploymentName}|g" \ -e "s|YOUR_IMAGE_NAME|registry.digitalocean.com/crowd-image-container/nft-generator:v3|g" \ -e "s|TOKEN_ID_RANGE_VALUE|${tokenIdRange}|g" \ deployment_template.yaml > "deployment_${deploymentName}.yaml"
# Deploy the generated deployment configuration kubectl apply -f "deployment_${deploymentName}.yaml" done
Load content from app.asana.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Load content from chat.openai.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Load content from my.openphone.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Load content from www.gohighlevel.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.