Skip to content

Commit

Permalink
fix: istio demo kind cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Mar 10, 2024
1 parent 6bdba59 commit 77f5150
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
29 changes: 24 additions & 5 deletions demo/istio/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,31 @@
KIND_IMAGE=kindest/node:v1.29.2
ISTIO_REPO=https://istio-release.storage.googleapis.com/charts
ISTIO_NS=istio-system
ISTIO_INGRESS_NS=istio-ingress

# Create Kind cluster
kind create cluster --image $KIND_IMAGE
kind create cluster --image $KIND_IMAGE --wait 1m --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |-
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
- role: worker
EOF

# Install Istio components
helm upgrade --install istio-base --namespace $ISTIO_NS --create-namespace --wait --repo $ISTIO_REPO base
helm upgrade --install istiod --namespace $ISTIO_NS --create-namespace --wait --repo $ISTIO_REPO istiod
helm upgrade --install istio-ingress --namespace $ISTIO_NS --create-namespace --wait --repo $ISTIO_REPO gateway

helm upgrade --install istio-base --namespace $ISTIO_NS --create-namespace --wait --repo $ISTIO_REPO base
helm upgrade --install istiod --namespace $ISTIO_NS --create-namespace --wait --repo $ISTIO_REPO istiod
helm upgrade --install istio-ingress --namespace $ISTIO_INGRESS_NS --create-namespace --wait --repo $ISTIO_REPO gateway
6 changes: 1 addition & 5 deletions demo/istio/manifests/echo-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ metadata:
name: demo
labels:
istio-injection: enabled

---

apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -27,9 +25,7 @@ spec:
image: mendhak/http-https-echo
ports:
- containerPort: 8080

---

apiVersion: v1
kind: Service
metadata:
Expand All @@ -41,4 +37,4 @@ spec:
app: echo
ports:
- port: 8080
targetPort: 8080
targetPort: 8080

0 comments on commit 77f5150

Please sign in to comment.