Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero downtime upgrade test #429

Open
werdes72 opened this issue Oct 23, 2023 · 1 comment
Open

Zero downtime upgrade test #429

werdes72 opened this issue Oct 23, 2023 · 1 comment
Labels
area/tests Issues or PRs related to tests

Comments

@werdes72
Copy link
Collaborator

werdes72 commented Oct 23, 2023

Zero downtime Istio upgrade test

Set environment variable for your cluster domain

You must run this test against a production like Gardener cluster:

export DOMAIN_TO_EXPOSE_WORKLOADS=$(kubectl get cm -n kube-system shoot-info -o "jsonpath={.data['domain']}")

Install Istio and api-gateway

kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/istio-manager.yaml
kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/istio-default-cr.yaml

kubectl apply -f https://github.com/kyma-project/api-gateway/releases/latest/download/api-gateway-manager.yaml
kubectl apply -f https://github.com/kyma-project/api-gateway/releases/latest/download/apigateway-default-cr.yaml

Deploy the workload

kubectl create ns test
kubectl label namespace test istio-injection=enabled --overwrite
kubectl -n test create -f https://raw.githubusercontent.com/istio/istio/master/samples/httpbin/httpbin.yaml

cat <<EOF | kubectl apply -f -
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: httpbin
  namespace: test
spec:
  hosts:
  - "httpbin.$DOMAIN_TO_EXPOSE_WORKLOADS"
  gateways:
  - kyma-system/kyma-gateway
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        port:
          number: 8000
        host: httpbin.test.svc.cluster.local
EOF

Check the response. Run it in a separate terminal, no output means that there are no errors

Keep it running until you finish the update

#!/bin/bash

while true
do
curl -fsS https://httpbin.$DOMAIN_TO_EXPOSE_WORKLOADS/headers > /dev/null
done

Check the Istio version in your cluster and apply a new one

kubectl get -n istio-system deployments.apps/istiod -ojson | jq -r '.spec.template.spec.containers[0].image'
  • Deploy the Istio manager version with the updated Istio version.
  • Verify that Istiod is running the new Istio version
kubectl get -n istio-system deployments.apps/istiod -ojson | jq -r '.spec.template.spec.containers[0].image'
  • Verify that service proxy of the httpbin workload is running the new Istio version
kubectl get -n test pods -l app=httpbin -ojson | jq -r '.items[0].spec.containers[0].image'
  • Verify that all requests to the httpbin workload worked without errors during the upgrade.
@werdes72 werdes72 mentioned this issue Oct 23, 2023
14 tasks
@triffer triffer added the area/tests Issues or PRs related to tests label Oct 24, 2023
@videlov videlov mentioned this issue Nov 21, 2023
15 tasks
@strekm strekm mentioned this issue Jan 17, 2024
13 tasks
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
@strekm strekm removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2024
@strekm strekm mentioned this issue Mar 14, 2024
14 tasks
@strekm strekm mentioned this issue Apr 9, 2024
14 tasks
@strekm strekm mentioned this issue Apr 25, 2024
14 tasks
@strekm strekm mentioned this issue May 16, 2024
22 tasks
@strekm strekm mentioned this issue Jun 5, 2024
18 tasks
@strekm strekm mentioned this issue Jun 28, 2024
17 tasks
@strekm strekm mentioned this issue Jul 23, 2024
17 tasks
@strekm strekm mentioned this issue Aug 30, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Issues or PRs related to tests
Projects
None yet
Development

No branches or pull requests

4 participants