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

Service and documentation for istio (mesh mode) #83

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

muscionig
Copy link

closes #56

Changes

This PR adds documentation to run the autoscaler-keda extension with Istio injection.
@skonto I opened this on top of #81, that is why the set of changes is larger. Feel free to directly review only this PR.

Minor Changes

  • 🎁 split development guidelines adding a specific section for Istio.
  • 🎁 documented istio in mesh mode.
  • 🎁 documented installation of prometheus in its own namespace (to facilitate mTLS setup with the documentation provided by Istio) and edits to the config-autoscaler-keda configmap to scrape metric from a specific prometheus address.

istio:

before scaling:

$ kubectl get po -A
NAMESPACE            NAME                                                     READY   STATUS    RESTARTS      AGE
cert-manager         cert-manager-67c98b89c8-gxvtb                            1/1     Running   0             35m
cert-manager         cert-manager-cainjector-5c5695d979-s6jbj                 1/1     Running   0             35m
cert-manager         cert-manager-webhook-7f9f8648b9-zd6jj                    1/1     Running   0             35m
istio-system         istio-ingressgateway-5f8bcfbff9-5cq27                    1/1     Running   0             34m
istio-system         istio-ingressgateway-5f8bcfbff9-lpcpv                    1/1     Running   0             34m
istio-system         istio-ingressgateway-5f8bcfbff9-wh486                    1/1     Running   0             34m
istio-system         istiod-85877f7d98-9gjr9                                  1/1     Running   0             34m
istio-system         istiod-85877f7d98-b87bg                                  1/1     Running   0             34m
istio-system         istiod-85877f7d98-cvchw                                  1/1     Running   0             34m
keda                 keda-admission-webhooks-685d94fcff-kjvlw                 1/1     Running   0             24m
keda                 keda-operator-65f5568c7b-9kbc8                           1/1     Running   1 (24m ago)   24m
keda                 keda-operator-metrics-apiserver-69c577c9cf-qxxhx         1/1     Running   0             24m
knative-serving      activator-5754bdb79d-9gpn5                               2/2     Running   0             34m
knative-serving      autoscaler-57d66f69d9-cmv6j                              2/2     Running   0             34m
knative-serving      autoscaler-keda-fc6b797b4-lvmss                          2/2     Running   0             21m
knative-serving      controller-f48959855-lhrwz                               2/2     Running   1 (34m ago)   34m
knative-serving      net-istio-controller-69858b66f7-qfnq8                    1/1     Running   0             34m
knative-serving      net-istio-webhook-5645569675-jvj2r                       2/2     Running   0             34m
knative-serving      webhook-778946f8-ftjps                                   2/2     Running   0             34m
kube-system          coredns-5dd5756b68-d92j4                                 1/1     Running   0             36m
kube-system          etcd-minikube                                            1/1     Running   0             36m
kube-system          kube-apiserver-minikube                                  1/1     Running   0             36m
kube-system          kube-controller-manager-minikube                         1/1     Running   0             36m
kube-system          kube-proxy-dczz8                                         1/1     Running   0             36m
kube-system          kube-scheduler-minikube                                  1/1     Running   0             36m
kube-system          storage-provisioner                                      1/1     Running   1 (36m ago)   36m
metrics-test-istio   metrics-test-istio-00001-deployment-7d57bbb8d8-86zsg     3/3     Running   0             14m
prometheus           alertmanager-prometheus-kube-prometheus-alertmanager-0   2/2     Running   0             24m
prometheus           prometheus-grafana-69f9ccfd8d-72xb8                      3/3     Running   0             25m
prometheus           prometheus-kube-prometheus-operator-6f4fc4dcbd-2hzqm     1/1     Running   0             25m
prometheus           prometheus-kube-state-metrics-57c8464f66-7h25x           1/1     Running   0             25m
prometheus           prometheus-prometheus-kube-prometheus-prometheus-0       2/2     Running   0             24m
prometheus           prometheus-prometheus-node-exporter-h7gp6                1/1     Running   0             25m

During scaling:

$ kubectl get hpa -n metrics-test-istio
NAME                       REFERENCE                                        TARGETS           MINPODS   MAXPODS   REPLICAS   AGE
metrics-test-istio-00001   Deployment/metrics-test-istio-00001-deployment   105370m/5 (avg)   1         10        1          15m
$ kubectl get po -n metrics-test-istio
NAME                                                   READY   STATUS    RESTARTS   AGE
metrics-test-istio-00001-deployment-7d57bbb8d8-2b7ss   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-2frvl   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-7wn9b   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-86zsg   3/3     Running   0          16m
metrics-test-istio-00001-deployment-7d57bbb8d8-bpbt4   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-fz7qs   3/3     Running   0          39s
metrics-test-istio-00001-deployment-7d57bbb8d8-gx5sb   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-l4ght   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-qdp5j   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-s848s   0/3     Pending   0          39s

/kind documentation
/kind enhancement

Copy link

knative-prow bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: muscionig
Once this PR has been reviewed and has the lgtm label, please assign skonto for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 20, 2024
Copy link

knative-prow bot commented Nov 20, 2024

Hi @muscionig. Thanks for your PR.

I'm waiting for a knative-extensions member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

@cardil cardil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @skonto

@knative-prow knative-prow bot requested a review from skonto November 20, 2024 09:06
@skonto
Copy link
Contributor

skonto commented Nov 22, 2024

I will open another issue for documenting Openshift ServiceMesh.


### Install Prometheus and KEDA

In `PERMISSIVE` mode (under the `knative-serving` namespace), clear-text traffic and encrypted traffic are both allowed, with the latter preferred by `istio` when properly configured. The following instructions will not enable Mutual TLS between `knative`, `keda` and `prometheus`. If running in `STRICT` mode, `istio` provides [documentation](https://istio.io/latest/docs/ops/integrations/prometheus/#tls-settings) on how to setup mTLS between "data" plane pods for `prometheus`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is useful to have the strict mode as well. I have an example here. I will create a PR with some more info so we can finalize content.
Btw did you test encrypted traffic with permissive mode and autoscaling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation kind/enhancement needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document support with Istio and MTLS
3 participants