Git Product home page Git Product logo

istio-operator's Introduction

Istio operator

Istio operator is a Kubernetes operator to deploy and manage Istio resources for a Kubernetes cluster.

Overview

Istio is an open platform to connect, manage, and secure microservices and it is emerging as the standard for building service meshes on Kubernetes.

The goal of the Istio-operator is to enable popular service mesh use cases (multi cluster topologies, multiple gateways support etc) by introducing easy to use higher level abstractions.

In this README

Istio operator vs Calisti

Calisti is an enterprise-ready Istio platform for DevOps and SREs that automates lifecycle management and simplifies connectivity, security & observability for microservice-based applications. The Cisco Istio operator is the core part of Calisti's Service Mesh Manager (SMM) component, which helps install, upgrade and manage Istio meshes. Still, SMM also provides many other features to secure, operate and observe Istio conveniently.

The differences are presented in this table:

Istio operator Cisco Service Mesh Manager
Install Istio ✔️ ✔️
Manage Istio ✔️ ✔️
Upgrade Istio ✔️ ✔️
Uninstall Istio ✔️ ✔️
Multiple gateways support ✔️ ✔️
Multi cluster support needs some manual steps fully automatic
Prometheus ✔️
Grafana ✔️
Jaeger ✔️
Cert manager ✔️
Dashboard ✔️
CLI ✔️
OIDC authentication ✔️
VM integration ✔️
Topology graph ✔️
Outlier detection ✔️
Service Level Objectives ✔️
Live access logs ✔️
mTLS management ✔️
Gateway management ✔️
Istio traffic management ✔️
Validations ✔️
Support Community Enterprise

For a complete list of SMM features, please check out the SMM docs.

Getting started

Prerequisites

  • kubectl installed
  • kubernetes cluster (version 1.23+)
  • active kubecontext to the kubernetes cluster

Build and deploy

Download or check out the latest stable release.

Run make deploy to deploy the operator's controller-manager on your kubernetes cluster.

Check if the controller is running in the istio-system namespace:

$ kubectl get pod -n istio-system

NAME                                                READY   STATUS    RESTARTS   AGE
istio-operator-controller-manager-6f764787c-rbnht   2/2     Running   0          5m18s

Deploy the Istio control plane sample to the istio-system namespace

$ kubectl -n istio-system apply -f config/samples/servicemesh_v1alpha1_istiocontrolplane.yaml
istiocontrolplane.servicemesh.cisco.com/icp-v117x-sample created

Label the namespace, where you would like to enable sidecar injection for your pods. The label should consist of the name of the deployed IstioControlPlane and the namespace where it is deployed.

$ kubectl label namespace demoapp istio.io/rev=icp-v117x-sample.istio-system
namespace/demoapp labeled

Deploy the Istio ingress gateway sample to your desired namespace

$ kubectl -n demoapp apply -f config/samples/servicemesh_v1alpha1_istiomeshgateway.yaml
istiomeshgateway.servicemesh.cisco.com/imgw-sample created

Deploy your application (or the sample bookinfo app).

$ kubectl -n demoapp apply -f https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml
service/details created
serviceaccount/bookinfo-details created
deployment.apps/details-v1 created
service/ratings created
serviceaccount/bookinfo-ratings created
deployment.apps/ratings-v1 created
service/reviews created
serviceaccount/bookinfo-reviews created
deployment.apps/reviews-v1 created
deployment.apps/reviews-v2 created
deployment.apps/reviews-v3 created
service/productpage created
serviceaccount/bookinfo-productpage created
deployment.apps/productpage-v1 created

Verify that all applications' pods are running and have the sidecar proxy injected. The READY column shows the number of containers for the pod: this should be 1/1 for the gateway, and at least 2/2 for the other pods (the original container of the pods + the sidecar container).

$ kubectl get pod -n demoapp
NAME                              READY   STATUS    RESTARTS   AGE
details-v1-79f774bdb9-8xqwj       2/2     Running   0          35s
imgw-sample-66555d5b84-kv62w      1/1     Running   0          7m21s
productpage-v1-6b746f74dc-cx6x6   2/2     Running   0          33s
ratings-v1-b6994bb9-g9vm2         2/2     Running   0          35s
reviews-v1-545db77b95-rdmsp       2/2     Running   0          34s
reviews-v2-7bf8c9648f-rzmvj       2/2     Running   0          34s
reviews-v3-84779c7bbc-t5rfq       2/2     Running   0          33s

Deploy the VirtualService and Gateway needed for your application. For the demo bookinfo application, you need to modify the Istio Gateway entry! The spec.selector.istio field should be set from ingressgateway to imgw-sample so it will be applied to the sample IstioMeshGateway deployed before. The port needs to be set to the targetPort of the deployed IstioMeshGateway.

curl https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/networking/bookinfo-gateway.yaml | sed 's/istio: ingressgateway # use istio default controller/istio: imgw-sample/g;s/number: 80/number: 9080/g' | kubectl apply -f -
$ kubectl -n demoapp apply -f bookinfo-gateway.yaml
gateway.networking.istio.io/bookinfo-gateway created
virtualservice.networking.istio.io/bookinfo created

To access your application, use the public IP address of the imgw-sample LoadBalancer service.

$ IP=$(kubectl -n demoapp get svc imgw-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
$ curl -I $IP/productpage
HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
content-length: 4183
server: istio-envoy
date: Mon, 02 May 2022 14:20:49 GMT
x-envoy-upstream-service-time: 739

Issues, feature requests

Please note that the Istio operator is constantly under development, and new releases might introduce breaking changes. We are striving to keep backward compatibility as much as possible while adding new features at a rapid pace. Issues, new features or bugs are tracked on the projects GitHub page - please feel free to add yours!

Contributing

If you find this project useful, here's how you can help:

  • Send a pull request with your new features and bug fixes
  • Help new users with issues they may encounter
  • Support the development of this project and star this repo!

Got stuck? Find help!

Community support

If you encounter any problems not addressed in our documentation, open an issue or talk to us on the Outshift Slack channel #istio-operator.

Engineering blog

We occasionally write blog posts about Istio itself and the Istio operator.

License

Copyright (c) 2021-2023 Cisco Systems, Inc. and/or its affiliates

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

istio-operator's People

Contributors

asdwsda avatar dependabot[bot] avatar fekete-robert avatar gallotamas avatar kristofgyuracz avatar kuvesz avatar laci21 avatar luciferinlove avatar martonsereg avatar nishantapatil3 avatar pepov avatar tanemahuta avatar tiswanso avatar waynz0r avatar ziyuguo716 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

istio-operator's Issues

Unable to attach annotations to gateway

Describe the bug
Unable to attach cert to ELB

Need to attach these annotations:

  annotations:
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-west-2:{act_num}:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"

The good news is the ELB already comes up as TCP. :) This is a huge improvement.

Show current state

Istio config CRD status should show the current state (components available, etc)

[Istio 1.1] Configurable tracer address

In Istio 1.1 lighstep and jaeger/zipkin are both supported.
By default the zipkin address is set to zipkin.istio-system:9411, we should make it configurable to integrate with custom zipkin/jager, (and lightstep) installations.
Related to #41.

Multicluster docs/impl out of sync

Nice work on the operator folks.. With regard to the multicluster setup, we have updated the multicluster setup a while ago. You no longer need a vpn for the single control plane-noHA option - i.e. no longer need unique pod CIDRs..

Secondly, there is a much more simpler multicluster option with two control planes (one on each cluster), and pods communicating with each other via the gateways. I believe the operator can be of great help in this setup to spit out the global services (services that are visible across clusters), and assign unique VIPs to these services..

https://preliminary.istio.io/docs/setup/kubernetes/multicluster-install/gateways/
I would be happy to give you more details or the workflow.

Routing with VirtualService not working as expected

Describe the bug
Applying routing rules does not route as expected -- get a 404 on all routes.

In the code yaml files below I've replaced identifying information (hosts and various id numbers) with placeholders.

Steps to reproduce the issue:
Install the istio-operator by following the instructions i.e. running make deploy. Apply the following istio configuration.

apiVersion: istio.banzaicloud.io/v1beta1
kind: Istio
metadata:
  labels:
    controller-tools.k8s.io: "1.0"
  name: istio
  namespace: istio-system
spec:
  mtls: false
  includeIPRanges: "*"
  excludeIPRanges: ""
  autoInjectionNamespaces:
  - "app-stg"
  - "app-prd"
  - "httpbin"
  controlPlaneSecurityEnabled: false
  gateways:
    ingress:
      serviceAnnotations:
        service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:{REGION}:{ACCT_NUMBER}:certificate/{CERT_UUID}"
        service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
        service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "300"

Then create a virtual service as below

---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: app-stg
  namespace: default
spec:
  hosts:
  - "app-stg.example.com"
  - "app-stg.blue.example.com"
  - "app-stg.green.example.com"
  gateways:
  - istio-autogenerated-k8s-ingress
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        port:
          number: 80
        host: httpbin.httpbin.svc.cluster.local

Expected behavior
The hosts listed above should be routed to httpbin (which is running in the namespace httpbin).

Additional context
Add any other context about the problem like release number version, branch, etc.
Using Istio operator 0.0.6.

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.6", GitCommit:"ab91afd7062d4240e95e51ac00a18bd58fddd365", GitTreeState:"clean", BuildDate:"2019-02-26T12:59:46Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.7", GitCommit:"65ecaf0671341311ce6aea0edab46ee69f65d59e", GitTreeState:"clean", BuildDate:"2019-01-24T19:22:45Z", GoVersion:"go1.10.7", Compiler:"gc", Platform:"linux/amd64"}

Being able to turn on/off mTLS by updating the config value

This scenario should work:

  • A cluster is created with mTLS disabled. (the default MeshPolicy is created)
  • mTLS value is enabled in the config - the operator triggers reconciling, the default MeshPolicy should be updated, DestinationRules should be created
  • mTLS value is disabled - the operator triggers reconciling, the default MeshPolicy should be updated, DestinationRules should be deleted

Integrate with the Banzai Cloud Kafka operator

Is your feature request related to a problem? Please describe.

Add support/integration with the Banzai Cloud Kafka Operator. The Kafka Operator already orchestrates an Envoy proxy in order to route external broker access towards the broker pod - instead of relying on the load balancer's e.g. round-robin feature. While brokers come and go (autoscaling, failovers, etc) the Kafka operator already generates complex Envoy configs - adding mTLS, etc complicates things even more.

Describe the solution you'd like to see

Add support for Kafka, by wiring brokers into the mesh. Also, add support for the Envoy Kafka protocol filter once is pushed upstream.

Review update reconcile flow

  • check if updating the ResourceVersion is needed
  • check if we can use deepCopy or 2WayMerge to compare the current state with the desired and only update if necessary

Wait for Galley

Wait until galley is up and running and only create CRDs after that

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.