PROJECT_ID=mokeefe
ISTIO_VERSION=1.2.0
ZONE=us-east1-b
MACHINE_TYPE=n1-standard-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helm template ./istio-1.1.7/install/kubernetes/helm/istio --name istio --namespace istio-system \ | |
--set mixer.telemetry.enabled=false \ | |
--set mixer.policy.enabled=false \ | |
--set prometheus.enabled=true \ | |
--set kiali.enabled=true --set kiali.createDemoSecret=true \ | |
--set "kiali.dashboard.jaegerURL=http://jaeger-query:16686" \ | |
--set "kiali.dashboard.grafanaURL=http://grafana:3000" \ | |
--set grafana.enabled=true \ | |
--set sidecarInjectorWebhook.enabled=true > istio.yaml | |
Ways to scale a k8s application:
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ https://cloud.google.com/kubernetes-engine/docs/how-to/scaling-apps
- [manual] increase # of pod replicas in a Deployment
- [auto] with an HPA resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: ServiceEntry | |
metadata: | |
name: redis-ext | |
spec: | |
hosts: | |
- instance1.default.svc.cluster.local #instance1 is the name of the VM | |
ports: | |
- number: 80 | |
name: http |
12 Feb 2019
⚠️ HPA - I also encountered "unknown" HPA status in my EU cluster with the add-on (unlike in a manual installation), unclear why.- Egress - observed behavior with the add-on matches a manual Istio installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: sleep-deployment | |
labels: | |
app: sleep | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
PROBLEM | |
Given a list of words, we may encode it by writing a reference string S and a list of indexes A. | |
For example, if the list of words is ["time", "me", "bell"], we can write it as S = "time#bell#" and indexes = [0, 2, 5]. | |
Then for each index, we will recover the word by reading from the reference string from that index until we reach a "#" character. | |
What is the length of the shortest reference string S possible that encodes the given words? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"time" | |
) |