export ISTIO_VERSION=1.24.6
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=$ISTIO_VERSION TARGET_ARCH=x86_64 sh -
cd istio-$ISTIO_VERSION
export PATH=$PWD/bin:$PATH
istioctl install --set profile=demo --set hub=gcr.io/istio-release
demo: 학습/테스트용으로 모든 기능과 대시보드 포함mv samples/addons/loki.yaml samples/addons/loki.yaml.old
curl -o samples/addons/loki.yaml https://raw.githubusercontent.com/msa-school/Lab-required-Materials/main/Ops/loki.yaml
kubectl apply -f samples/addons
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
kubectl create namespace ingress-basic
helm install ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-basic \
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: shopping-ingress
namespace: istio-system
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingressclass.kubernetes.io/is-default-class: "true"
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /kiali
pathType: Prefix
backend:
service:
name: kiali
port:
number: 20001
- path: /grafana
pathType: Prefix
backend:
service:
name: grafana
port:
number: 3000
- path: /prometheus
pathType: Prefix
backend:
service:
name: prometheus
port:
number: 9090
- path: /loki
pathType: Prefix
backend:
service:
name: loki
port:
number: 3100
Ingress IP 확인:
kubectl get ingress -n istio-system
→ EXTERNAL-IP/kiali 으로 대시보드 접속

istioctl kube-inject -f deployment.yaml > output.yaml
kubectl apply -f output.yaml
kubectl label namespace tutorial istio-injection=enabled
kubectl apply -f deployment.yaml -n tutorial
labels:
sidecar.istio.io/inject: "true"
kubectl patch svc tracing -n istio-system -p '{"spec": {"type": "LoadBalancer"}}'
kubectl get svc -n istio-system