Skip to content

Instantly share code, notes, and snippets.

@itayw
Created February 17, 2019 11:21
Show Gist options
  • Save itayw/e7b788fa204f1455a15eb315f154b883 to your computer and use it in GitHub Desktop.
Save itayw/e7b788fa204f1455a15eb315f154b883 to your computer and use it in GitHub Desktop.
Echo deployment on Kubernetes (KOPS)
# State store required for KOPS
$ export KOPS_STATE_STORE=gs://echo-kubernetes-clusters/
# Required flag for GCE
$ export KOPS_FEATURE_FLAGS=AlphaAllowGCE
# vim is causing me issues on my station
$ export EDITOR=nano
# Create the cluster
$ kops create cluster \
echo-test-1.k8s.local \
--zones us-central1-a \
--state gs://echo-kubernetes-clusters/ \
--project=${PROJECT} \
--vpc demo
# change the nodes to your preferred allocation
$ kops edit ig --name=echo-test-1.k8s.local nodes
# deploy the cluster to GCE
$ kops update cluster echo-test-1.k8s.local --yes
# wait for cluster/nodes to come online
$ kubectl get nodes
# label the nodes, we need one mem=high and one cpu=high at least
$ kubectl label nodes <node-name> mem=high
$ kubectl label nodes <node-name> cpu=high
# confirm labels
$ kubectl get nodes --show-labels
# edit Echo Deployment YAML to include correct credentials/IPs
# deploy the Echo YAML file
$ kubectl create -f ./deploy-echo-6.5.12/yaml --namespace echo
# check all pods are online, this may take up to 10 minutes until everything balances
$ kubectl get pods --namespace=echo
# check all services are online
$ kubectl get services --namespace=echo
# get external IP address
$ kubectl describe services echo-router-router --namespace echo
# connect to Echo and start sanity checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment