Alibaba Cloud Whitepaper - Ack k8s
Alibaba Cloud Whitepaper - Ack k8s
FOR END-TO-END
alibabacloud.com
CLOUD-NATIVE
© Alibaba Cloud 2022
All rights reserved
APPLICATION
MANAGEMENT
ON ALIBABA CLOUD
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud ii
LEGAL NOTICES
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud iii
Alibaba Cloud makes the best efforts to provide an appropriate
introduction and operation guide on the basis of current
technology, but Alibaba Cloud does not explicitly or implicitly
guarantee the accuracy, completeness, suitability, and reliability
of this document. Alibaba Cloud does not take any legal liability
for any error or loss caused by downloading, using, or putting
trust in this document by any sectors, company, or individuals.
In any case, Alibaba Cloud does not take any legal liability for
any indirect, consequential, punitive, occasional, incidental, or
penalized damage, including profit loss due to use of or trust
to this document (even if Alibaba Cloud has notified you it is
possible to cause this kind of damage).
The responsibilities and liabilities of Alibaba Cloud to its
customers are controlled by Alibaba Cloud agreements, and
this document is not part of, nor does it modify, any agreement
between Alibaba Cloud and its customers.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud iv
CONTRIBUTORS
AUTHORS
Shuwei Yin | Yang Liu | Xining Wang | Jing Luo |
Dahu Kuang | Jianhong Ye | Peng Li | Xin Zhang |
Shichun Feng | Changhai Yan | Shuwei Hao |
Zhongwei Liu | Leilei Geng | Jizhong JIang |
Jing Gu | Chang Liu
EDITORS
Xueting Zhou | Yanshun Lv
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud v
CONTENTS
1. Overview 1
2. Procedure 5
3. In Conclusion 142
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 1
1. OVERVIEW
OUR SOLUTION
The Alibaba Cloud Container Platform is a Kubernetes-based service
that runs containerized applications on the cloud.
Alibaba Cloud was one of the first vendors to pass the Kubernetes
conformance certification tests globally. ACK was also recently
named as a leader by The Forrester Wave Public Cloud
Container Platforms.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 2
ACR EE CloudOps
Application Center DevOps / DevSecOps
Image Scan SecOps
Image Signature AIOps
Image Replication Trigger FinOps
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 3
USE CASES
This lab focuses on the Alibaba Cloud Container Service for
Kubernetes (ACK), providing an overview of its key features and
functionality to help you manage your applications with confidence.
This solution applies to the following user cases, covering best
practices for:
Cluster Terraform
Security Backup (Provisioning)
Center DevOps
Department
Cloud Na�ve
ACR Applica�on
EE Center Security
Cluster Security Department
AIOps Inspec�ons DevOps/DevSecOps
ASM
Prevent Risks (Service Mesh) Applica�on
Container
Solve Deployment, Image
abnormali�es Container management,
Intelligence Applica�on Security
Service MSE Department
(Microservice monitoring / tracing
Governance)
Cost Cost
Analysis Control Financial
Department
FinOps
Cost analysis & control
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 4
REQUIRED PRODUCTS
This lab requires the following Alibaba Cloud products:
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 5
2. PROCEDURE
Level 1 (Build) Level 2 (Operate) Level 3 (Scale) Level 4 (Improve) Level 5 (Optimize)
You have a baseline for cloud-native implementation in place and are in pre-production.
ORGANIZATION BUSINESS OUTCOMES TECHNOLOGY
PEOPLE
• Business leaders don’t understand Initial experimentation and adoption
the benefits of cloud native. of Kubernetes. Building your cloud
infrastructure, including container
• Still in a POC phase or are focused
registry, RBAC policies, load balancer,
on one application.
cluster dashboards and container
• Teams are trained in 12 factor logging. Review microservice patterns
applications, microservice and and architecture.
cloud native patterns.
Define your KPIs from Container
PROCESS ACK
existing pain points such as
• Define your Git workflow and cost savings or other Container Registry
introduce this into your cloud native improved efficiencies. ACR EE
environment.
Increase security for the
• Consider security across all aspects Load Balancer
applications by automating CLB & ALB
of the implementation.
the identification of CVE in
your containers Security & Policies
POLICY RBAC Policy in ACK
• A limited set of documented Cluster Dashboards
policies are in place to support the Log Service
services being built in the cloud.
• Design SLOs and priorities for Auto Scaling
compliance. ACK
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 6
Level 1 (Build) Level 2 (Operate) Level 3 (Scale) Level 4 (Improve) Level 5 (Optimize)
The cloud native foundation is established and you are moving to production.
ORGANIZATION BUSINESS OUTCOMES TECHNOLOGY
PEOPLE
• Create agile project groups to receive Consider moving applications suitable
timely feedback / testing loops. for lift and shift. Introduce monitoring
• Automate deployments for some and observability into your workloads,
environments. start to evaluate application tracing.
Follow good practice with containers,
• Your security team should know how to
secrets and security. Set security
manage your Kubernetes cluster security.
policy management, resource
requests and limits.
PROCESS Understand what
• Build your CI/CD system. applications must be Observability
moved and why. DevOps, Logging / Monitoring / Tracing
• Auto trigger deployments.
SecOps and Ops teams
• Build security into your CI process Log Service Prometheus
including container scanning and
identify repeatable
patterns. One migrated ARMS Grafana
configuration scanning.
• Define log aggregation. application can seamlessly
be applied to another. Secrets
POLICY
Security & Policies
• Initial policies agreed as standard. Cluster Security Inspections in ACK
• Define initial resource metrics and
start collecting data. Resource Limits
Setting in ACK
• Initial auditing, carried out manually
or through simple scripts
Level 1 (Build) Level 2 (Operate) Level 3 (Scale) Level 4 (Improve) Level 5 (Optimize)
Your business competency is growing and you are defining the process for scaling.
ORGANIZATION BUSINESS OUTCOMES TECHNOLOGY
PEOPLE
• Cloud Native is now your first
strategy with teams showing
Monitoring, alerting and resource
excellence and expertise in this area.
usage capabilities. Automatic scan-
• Continuous delivery for all ning and have runtime observability of
environments, including for complex what occurs within your containers
releases and with built-in and clusters. Write Helm Charts for
compliance testing. your application releases, GitOps with
• Cloud native security training ArgoCD. Policy as code are threat
available. detection are also present.
Resource Usage
PROCESS
Cost Analysis in ACK
Faster time to market:
• Measuring container usage, (CPU/RAM).
Deploying a service takes Policy as code
• Implementing upgrades and patching, Policy Governance in ACK
particularly CVEs and critical updates.
minutes instead of days.
Reduced risk of databreaches Helm Charts
• Alerts and Filter noise are present.
thanks to monitoring for ACR EE
• CI and testing frequently carried out.
security attacks. Improved
• Implement automatic continuous GitOps with ArgoCD
customer experience, fast
scanning to flag misconfigurations or Application Center in ACK
security issues
responsiveness and improved
observability. Multi-cluster Management
ACK One for Multi-Cluster
POLICY (hybrid-cloud / multi-cloud)
• Implement policy-as-code and Management
build this into your CI/CD pipeline.
• Create policies based on metrics
refined around security, efficiency
and reliability.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 7
Level 1 (Build) Level 2 (Operate) Level 3 (Scale) Level 4 (Improve) Level 5 (Optimize)
Your business competency is growing and you are defining the process for scaling.
ORGANIZATION BUSINESS OUTCOMES TECHNOLOGY
PEOPLE
• Cloud is now the default infrastructure
for all services.
• Development uses self-service.
• Developers can quickly test complex Familiar with Kubernetes and IaC
scenarios with many unknowns. tooling, Using ClusterAPI to deploy
• Cloud and application risks are easily and manage the lifecycle of your
and quickly identified and patched. clusters. Microservices are now the
• Kubernetes is widely adopted by multiple preferred pattern for applications,
groups in different business areas. open across the organization via a
service mesh. Gain visibility along
• Enforced security in the cloud native
with alerts allows you to respond
environment.
quickly to unplanned events.
PROCESS More time to focus on Identified Risks
• DevSecOps set policies around container your business instead of Security Center
usage, including auto-scaling policies. maintaining Kubernetes.
Container Intelligence
• Audit and alerts become mainstream Reporting covers Service in ACK
and are made mandatory across compliance, security,
applications. performance and cost. Event Center
• Release velocity increases. Security Strategy is aligned to the Event Center in LogService or ACK
remediation is automated and/or business goals Microservice Governance
identified automatically with established in Level 1.
remediation advice. Start to migrate your Service Mesh
other applications.
POLICY Microservice Engine
Level 1 (Build) Level 2 (Operate) Level 3 (Scale) Level 4 (Improve) Level 5 (Optimize)
You are revising the decisions made before and looking for
optimization for you applications and infrastructure.
ORGANIZATION BUSINESS OUTCOMES TECHNOLOGY
PEOPLE
• The organization has a mature strategy
and skilled workforce.
Focused on automation such as
• Strong ability to recover and maintain scanning, policy, security and testing.
throughput as individuals join and leave. Managing your complete
• Business decisions are well informed infrastructure lifecycle through
by rich and accurate data across all software and tooling. Builds,
teams. upgrades and decommissioning are
• Advanced testing and release patterns conduced through code. Onboard
are developed and in use, such as Measurable results are your existing applications to your
blue/green or canary. cloud native platform. Automate the
available for your leadership response to events. Full production
teams. Continue to optimize with GitOps operators and controls.
PROCESS
your workloads against new Incorporate machine learning as part
• Resource usage data will help you cost and performance of your threat detection practices.
optimize spend and provide business metrics. Revise your goals at
cost analysis.
this point, adjusting them Automation
• Enforcing audits will increase compared to what was Everything as Code
continuous deployment speed,
helping you ship new features faster.
achieved and what you want CloudOps
to achieve.
• The software supply chain is secured, DevOps / DevSecOps / GitOps
with clear code provenance and
Automate as much as
possible according to cloud SecOps
secured release pipelines.
native best practices to AIOps
POLICY remove human error and to
avoid security and
FinOps
• Compliance never ends!
performance problems.
• Take advantage of technologies such
as machine learning in order to
improve detection and enforcement,
while ensuring visibility of anomalous
conditions in a large volume of
compliance data.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 8
2.2 CLOUDOPS
The implementation of this lab focuses on cluster management.
This is an intuitive and seamless process using the Alibaba Cloud
Console. You no longer need to manually deploy and develop
clusters. Instead, you can create clusters in the Console easily, and
use multiple instance types of ECS and ECS Bare Metal instances in
a cluster. You can also deploy your cluster across zones to ensure
high availability.
If you are not familiar with Terraform and need assistance with the
Terraform Module Web GUI, then there are help documents and more
information available.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 9
6 ACK Cluster Monitoring How to use ACK cluster monitoring to examine your
application performance across your containers, pods,
services, and the characteristics of the entire cluster.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 10
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Using Auto Scaling, you can either add nodes to a cluster or add pods
to a cluster.
Auto Scaling
Cluster HPA
Autoscaling (Pod Autoscaling)
Add pods
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 11
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 12
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 13
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 14
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Issuers
hashicorp-vault
Ietsencrypt-staging venafi-as-a-service
cert-manager
foo.bar.com example.com
Certificates
Issuer:venafi-tpp
www.example.com
Issuer: letsencrypt-prod
Kubernetes signed keypair signed keypair
Secrets
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 15
Cert-Manager
Create Certificate
Create Secret
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 16
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 17
5. You can now access the website with HTTPS, and see
the certification.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 18
Create Certificate
Create Secret
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 19
{
"Version": "1",
"Statement": [
{
"Action": "*",
"Resource": "acs:alidns:*:*:domain/#domain-name",
"Effect": "Allow"
},
{
"Action": [
"alidns:DescribeSiteMonitorIspInfos",
"alidns:DescribeSiteMonitorIspCityInfos",
"alidns:DescribeSupportLines",
"alidns:DescribeDomains",
"alidns:DescribeDomainNs",
"alidns:DescribeDomainGroups"
],
"Resource": "acs:alidns:*:*:*",
"Effect": "Allow"
}
]
}
5. Create the Secret, the AK/SK are from the above RAM account
Note:
apiVersion: v1
kind: Secret
metadata:
name: alidns-secret
namespace: cert-manager
data:
access-key: #your AK
secret-key: #your SK
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 20
email: #email
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-nacos-secret
solvers:
- dns01:
webhook:
groupName: acme.yourcompany.com
solverName: alidns
config:
region: ""
accessKeySecretRef:
name: alidns-secret
key: access-key
secretKeySecretRef:
name: alidns-secret
key: secret-key
apiVersion:
cert-manager.io/v1
kind: Certificate
metadata:
name: tls-domain-cert
namespace: istio-systemspec:
# The secretName will store certificate content
secretName: tls-ops-domain-secret
commonName:
dnsNames:
# Replace to your real DNS name
- "*.cloudfoundry.top"
issuerRef:
name: letsencrypt-nacos
kind: ClusterIssuer
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 21
12. You can now access the website with HTTPS, and see
the certification.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 22
ACR EE
Application Center
Image Scan
Image Signature
KMS
(Certification)
Image Replication
Image trigger
…
Trigger
synchronization
Deployment
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
External-DNS
Alibaba Cloud
Ingress
Host DNS Record Private Zone
{
"Version": "1",
"Statement": [
{
"Action": "alidns:AddDomainRecord",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "alidns:DeleteDomainRecord",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "alidns:UpdateDomainRecord",
"Resource": "*",
"Effect": "Allow"
},
{
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 23
"Action": "alidns:DescribeDomainRecords",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "alidns:DescribeDomains",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:AddZoneRecord",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:DeleteZoneRecord",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:UpdateZoneRecord",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:DescribeZoneRecords",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:DescribeZones",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "pvtz:DescribeZoneInfo",
"Resource": "*",
"Effect": "Allow"
}
]
}
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 24
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 25
9. Wait a few seconds, until the resolution record has been auto
added in the DNS.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 26
11. Wait a few seconds, the resolution record has been auto added
in DNS.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 27
15. You can use External DNS for private zones in Service or Ingress.
16. In Service, Update the Service yaml, add an annotation where
the key is external-dns.alpha.kubernetes.io/hostname:
value is private zone domain.
17. Wait a few seconds, the resolution record has been auto added
in Private Zone.
18. In Ingress, update the Ingress yaml, add a private zone domain in
host, ExternalDNS will auto add resolution record in
Private Zone.
19. Wait a few seconds, the resolution record has been auto added
in Private Zone.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 28
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Elastic Node Operation Operation Audit Resource Resource K8S Polaris Event Center Core Event Node Event Pod Event
AutoScale Audit for Accounts Operation Operation Check Dashboard Overview Components Query Monitoring Monitoring
Overview Details Events
Log Data
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 29
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 30
5. You can also monitor your Ingress objects using the Ingress
Exceptions Center to identify and analyze your systems by
user-specified metrics:
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 31
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 32
Now, you will learn how ACK cluster monitoring can help and
understand how to examine your application performance across
your containers, pods, services, and the characteristics of the entire
cluster.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 33
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 34
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Backup Vault
for data
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 35
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 36
6. When you first restore from a backup, you need to fill in the
backup name. The next time it will automatically be selected,
as shown below.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 37
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 38
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 39
1. You can create a Secret in the target register cluster using the
following commands:
kubectl
-n kube-system create secret generic alibaba- addon-secret
--from-literal='access-key-id=<your AccessKey ID>'
--from-literal='access-key-secret=<your AccessKey Secret>'
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 40
kubectl
-n kube-system create secret generic alibaba- addon-secret
--from-literal='access-key-id=<your AccessKey ID>'
--from-literal='access-key- secret=<your AccessKey Secret>'
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 41
You can now monitor your Kubernetes clusters and other cloud
clusters from the Alibaba Console.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 42
You will now learn how to set up your network for a multi-cluster,
cross-region deployment.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
This set-up relies on two solutions from Alibaba Cloud. First, the
Cloud Enterprise Network (CEN), which is a global network to rapidly
build a distributed, hybrid cloud infrastructure. This allows you to
create a network with enterprise-level scalability and global coverage.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 43
Second, Transit Routers, which are used to forward data within the
same region or across different regions.
To manage this cross-region deployment, follow these steps:
1. You can create your Transit Routers by clicking the Create
Transit Router tab. One transit router per region is
recommended. The first time you connect a network instance in
a region, the system automatically creates a transit router in
the region.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 44
Simply click the VPC option and add your target regions from
the dropdown list. Then, the VPC will automatically connect
across regions via a transit router.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 45
AZ 1 AZ 1 AZ 1
ACK One
Application distribution, Administrator
Aggregated monitoring
In this section, you will learn how to deploy two sets of environments
in a region (Region 1) to implement active-active mode in the same
region. You will learn how to deploy a set of environments in another
region (Region 2) as a remote disaster recovery center for data
backup. When two centers in the same region fail at the same time,
the remote disaster recovery center can switch to process services.
The disaster recovery solution based on ACK One can guarantee the
continuous operation of the business to a great extent.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 46
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 47
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: web-demo
name: web-demo
namespace: demo
spec:
replicas: 5
selector:
matchLabels:
app: web-demo
template:
metadata:
labels:
app: web-demo
spec:
containers:
- image: acr-multiple-clusters-registry.cn-hangzhou.
cr.aliyuncs.com/ack-multiple-clusters/web-demo:0.4.0
name: web-demo
env:
- name: ENV_NAME
value: cluster1-hongkong
volumeMounts:
- name: config-file
mountPath: "/config-file"
readOnly: true
volumes:
- name: config-file
configMap:
items:
- key: config.json
path: config.json
name: web-demo
---
apiVersion: v1
kind: Service
metadata:
name: web-demo
namespace: demo
labels:
app: web-demo
spec:
selector:
app: web-demo
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-demo
namespace: demo
labels:
app: web-demo
spec:
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 48
rules:
- host: web-demo.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-demo
port:
number: 80
---
apiVersion: v1
kind: ConfigMap
metadata:
name: web-demo
namespace: demo
labels:
app: web-demo
data:
config.json: |
{
database-host: "hongkong-db.pg.aliyun.com"
}
wget http://ack-one.oss-cn-hangzhou.aliyuncs.com/kubectl-amc-linux
&& chmod +x kubectl-amc-linux && mv kubectl-amc-linux /usr/local/
bin/kubectl-amc
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 49
12. The below diagram shows the running status of the application
on each cluster.
13. The below diagram shows the Ingress status of the application
on each cluster.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 50
16. Edit the Record. Set DNS resolution to CNAME access domain
name for GTM. Record Value is the CNAME(Public Network)
of GTM.
17. In the created GTM example, create two address pools, enable
the Health Check. The Address is the Ingress IP address.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 51
18. Configure an access policy and set the Primary Address Pool to
be the Hong Kong address pool and the Secondary Address
Pool to be the Singapore address pool. Normal traffic is handled
by the Hong Kong cluster application. When all the Hong Kong
cluster applications are unavailable, it will automatically switch to
the Singapore cluster application for processing.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 52
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 53
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 54
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 55
2.3 DEVOPS/DEVSECOPS
DevOps covers the latest methodologies and practices such
as continuous integration/ continuous delivery (CI/CD), Image
Replication cross region, delivery chain etc. DevSecOps adds
another layer of security to the DevOps environment.
ACR EE
Image Scan
Application Center
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Step Description
1 Delivery Chain How to implement some best practices for several key tasks
on the DevOps and DevSecOps delivery chain.
3 Service Mesh How to examine your Service Mesh Architecture and how this
fits in within the wider Container Service.
5 MSE as a Microservice How to set up and register MSE with Nacos and add a cloud-
Registry native gateway to your deployment.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 56
Detect
Lazy Pulling
Artifacts
Developer E.g. Docker Images, Scan Sign Geo Replicate ACR EE Accelerate ACK
Helm Charts
You will learn how to implement some best practices for several key
tasks on the DevOps and DevSecOps delivery chain.
2. Set your ACR instanceID and regionID (if you are using a cross
region deployment) in the acr-configuration area of
the ConfigMaps area.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 57
3. Click Policies and add your policy for the ACK cluster worker
role, using the following code:
1. Create a delivery chain and select Scope. The delivery chain will
now complete the scan.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 58
3. Click Target and select your region from the list to synchronize
the trigger.
4. When you return to the Create Trigger window, the new image
version has been pushed into the trigger deployment. It is now
seen in the Trigger URL textbox.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 59
Create a Key
Create Witness Key Configuration Cluster
(RSA_2048 Sign/Verify)
2. Create the RAM Role and update your Trust Policy, if required.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 60
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 61
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 62
10. However, if you deploy an image in a namespace that is not an
enabled image signature or an image that is signed in a special
namespace, the deployment will succeed.
You will learn how our Application Center streamlines the deployment
process, helping you release your applications with confidence.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
hystax
Namespace
Node pool
Inspection
Solution to solve
Cluster Upgrade
Check
Logging
Tracing
Prometheus Monitoring
Cluster Monitoring
Application security issues Node/Pod/Network Ingress Access Center Cluster Topology
Inspection Report diagnosis Events & Alerting Application Monitoring
Multi-Cloud Bill Control … … … …
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 63
Developer Commit
Git Repo
App Stack
GitOps GitOps
1. Add the following policy to your worker role of your ACK cluster:
{
"Action": [
"cs:CreateTemplate",
"cs:DescribeTemplates",
"cs:DescribeTemplateAttribute",
"cs:UpdateTemplate",
"cs:DeleteTemplate"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 64
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 65
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 66
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 67
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 68
You will learn how to setting Service Mesh Architecture and how this
fits in within the wider Container Service.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Tracing
Analysis
Prometheus
Monitoring Managed Traffic Zero-Trust Hot upgrade Custom Envoy
Tracing
Analysis
Core Management Spiffe/Spire (with OpenKruise)
ACK K8s Cluster & ECI Serverless K8s Cluster ECS VM Edge Cluster External Registered Cluster
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 70
2. Click OK and then add your ACK cluster to ASM by ticking the
target cluster.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 71
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: external-nacos-svc
spec:
hosts:
#replace to real nacos host, i.e. mesh-nacos.**.com
- “NACOS_SERVER_HOST”
location: MESH_EXTERNAL
ports:
- number: 8848
name: http
resolution: DNS
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 72
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
labels:
provider: "asm"
asm-system: "true"
name: nacos-subscribe-lua
namespace: istio-system
spec:
configPatches:
# The first patch adds the lua filter to the listener/http
connection manager
- applyTo: HTTP_FILTER
match:
proxy:
proxyVersion: "^1.*"
context: SIDECAR_OUTBOUND
listener:
portNumber: 8848
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
subFilter:
name: "envoy.filters.http.router"
patch:
operation: INSERT_BEFORE
value: # lua filter specification
name: envoy.lua
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.
http.lua.v3.Lua"
inlineCode: |
-- copyright: ASM (Alibaba Cloud ServiceMesh)
function envoy_on_request(request_handle)
local request_headers = request_handle:headers()
-- /nacos/v1/ns/instance/list?healthyOnly=
false&namespaceId=public&clientIP=11.122.63.81&serviceName=
DEFAULT_GROUP%40%40service-provider&udpPort=53174&encoding=UTF-8
local path = request_headers:get(":path")
if string.match(path,"^/nacos/v1/ns/instance/list")
then
local servicename = string.
gsub(path,".*&serviceName.*40([%w.\\_\\-]+)&.*","%1")
request_
handle:streamInfo():dynamicMetadata():set("context", "request.
path", path)
request_
handle:streamInfo():dynamicMetadata():set("context", "request.
servicename", servicename)
request_handle:logInfo("subscribe for
serviceName: " .. servicename)
else
request_
handle:streamInfo():dynamicMetadata():set("context", "request.
path", "")
end
end
function envoy_on_response(response_handle)
local request_path = response_
handle:streamInfo():dynamicMetadata():get("context")["request.
path"]
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 73
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 74
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 75
Alibaba DNS
HK Region Singapore Region
GTM (Global
gRPC REST Traffic Manager) REST gRPC
You will now learn some best practices when deploying your
applications across multiple regions.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 76
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 77
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 78
Failover
reviews reviews reviews reviews
2. You can also set up end-to-end A/B testing without any changes
to your application code, as shown below.
destination:
subset: base-env
ASM IngressGateway ASM IngressGateway
fallback:
case: noavailabled
target: dev-x-env
Base Env Dev-X Env Dev-Y Env Product Env Canary or A/B Testing Env
A A A Service A
fallback
B B Service B
fallback
C C Service C C
fallback
D D Service D
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 79
You will learn how to enable our Application Monitoring service and
learn about some fundamental features of this service.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 80
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 81
7. Click on the Error Analysis tab and then the JVM Monitoring
tab to access additional information.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 82
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 83
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 84
12. You can also use the ‘Method execution analysis’ to get the
method with the highest response time.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 85
2.3.5 TRACING
Log Service is an all-in-one service for your log-type data. It supports
the collection, consumption, shipping, search, and analysis of your
logs, while improving the capacity of your processing and analyzing
capabilities for large amounts of logs.
ACR EE
Image Scan
Application Center
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 86
You will now learn how to set up our Tracing Analysis Service using
the Trace Ability feature. To enable Trace Ability with LogService, we
recommend the following steps:
c. Get the endpoints from the project home page. These will
be used to configure the OpenTelemetryCollector.
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: my-instrumentation
spec:
resource:
resourceAttributes:
service.name: SERVICE_NAME
service.namespace: SERVICE_NAMESPACE
exporter:
endpoint: http://otel-collector:4317
propagators:
- tracecontext
- baggage
- b3
java:
image: ghcr.io/open-telemetry/opentelemetry-operator/
autoinstrumentation-java:latest
nodejs:
image: ghcr.io/open-telemetry/opentelemetry-operator/
autoinstrumentation-nodejs:latest
python:
image: ghcr.io/open-telemetry/opentelemetry-operator/
autoinstrumentation-python:latest
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 88
5. Add instrumentation annotation in deployment yaml file.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 89
8. In Trace Analysis tab you could see all of the services and
latency of each span.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 90
11. Click the Details tab to get further information into your Traces.
Each Span has a different color line, making it easy to identify
and work with.
We will now learn how our Tracing analysis features allows you to
quickly identify root causes and analyze performance bottlenecks for
your distributed applications.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 91
2. To find the error method, you will receive some error information
from log tab:
3. Click the Details tab, move to the “traceID” item, click the link
icon to see the detailed log of the trace.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 92
5. You also can use the traceID in Log detail link to trace console.
6. In the caller item you could add a event link to source code such
as github url.
Let’s summarize the scenario. As the above steps show when you
meet an error, you could find out the error method, drill down from a
traceID to find out the log details, and then drill down to find out the
source code.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 93
7. Also, you can easily build your own dashboard from trace data,
according to your requirements.
8. And you can access a Trace Quality Analysis report under the
Services tab in the Console.
You will now learn how to set up and register MSE with Nacos using
the following steps:
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 94
name: spring.cloud.nacos.discovery.server-addr
value: #MSE registry endpoint
name: spring.cloud.nacos.discovery.metadata.version
value: #app version
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 95
8. You can also add and view the application configuration details
in this area.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 96
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 97
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 98
2.4 SECOPS
SecOps is formed from a combination of security and IT
operations. These highly skilled teams focus on monitoring and
assessing the risks with your digital solutions, while protecting
your corporate assets.
1. Infrastructure Security
» Computing Security
» Network Security
» Storage Security
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 99
Baseline Check Anti-DDoS EIP Anti-DDoS Pro Anti-DDoS Premium Game Shield 0day Emergency Response
Config Assessment Virus Defense
Anti-Ransomeware
Vulnerabiities
Proactive
Tamper Protection
AK Leak Intrusion/
Intelligent
Policy
Vulnerability Recommendation
Defense Detection
Prevention
Access Control
Security Data Leak Prevention
LifseaOS MFA Network
Center Resource Web Intrusion Prevention
(Multi-Factor Authentication) Boundaries
Security Access Protection
Hardening Management
(RAM) Node Pool Load Bot Threat Intelligence
Balance
Security Web
ALB/SLB APP Protection
Policies Security
ECS ECS
Management
ACK Security
Group
Anti- Backup and
DDoS Restore
Computing Cloud Data Disk
Security Firewall Bot Encryption
Network Management ACK TEE
Security
Security Base Image
Security
Inspections
Security Ingress Auditing
ACK CoreDNS Auditing
Logging
Configuration Management Confidential, Certification, Key Management
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 100
3 Zero Trust Security How to add enable your ASM mTLS Authorization Policy.
You will learn how to:
» Block communication between namespaces
» Forbid a namespace access to a website
» Forbid a namespace access to RDS
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 101
{
"Action": [
"kms:GetSecretValue"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 102
apiVersion: 'alibabacloud.com/v1alpha1'
kind: ExternalSecret
metadata:
name: jeecg-service-extsecret
spec:
data:
- key: jeecg-app-password
name: password
versionStage: ACSCurrent
Note, the key is the same with secret name as the KMS.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 103
mountPath: /tmp
resources:
limits:
cpu: "500m"
volumes:
- name: k8s-mysql-storage
secret:
secretName: jeecg-service-extsecret
2.4.2 POLICY GOVERNANCE
You will learn how to set up your OPA Gatekeeper in this section.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 104
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 105
You will now learn how to create an ASM mTLS Authorization Policy.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Using Alibaba Cloud Service Mesh (ASM), you can implement zero
trust security controls using a range of methods. You will learn three
different ways to achieve this.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 106
Region A Region B
VPC VPC
Namespace A Namespace A Namespace A
Application Application Application Application Application
Routing External
Authorization Policy Request-Authentication Application Authorization
Namespace Path JWT Token
IPBlocks Hosts Username Role
… UserGroup …
Application Application
Namespace B
URL List
Guest /Product
Peer OPA
Authentication TLS Policy /Management
Admin
VPC Authorization
Policy
Namespace A
Application Application
Authorization
Policy
RDS
ACK Cluster
Node Pool A
Authorization policy
Namespace A Istio mTLS: Namespace B
source namespace
Test App Proxy Proxy Demo App
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 107
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 108
ACK Cluster
Node Pool A
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 109
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: jeecg-server-rds
namespace: istio-system
spec:
hosts:
- rm-gs59q6b8xg7w3kr1j.mysql.singapore.rds.aliyuncs.com
location: MESH_EXTERNAL
ports:
- name: tcp
number: 3306
protocol: TCP
resolution: DNS
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 110
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: target-egress-gateway
namespace: jeecg-frontend
spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: target-egress-gateway-mTLS
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
tls:
mode: ISTIO_MUTUAL
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: example-com-through-egress-gateway
namespace: jeecg-frontend
spec:
exportTo:
- istio-system
- jeecg-frontend
gateways:
- mesh
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 111
- istio-system/istio-egressgateway
hosts:
- www.aliyun.com
http:
- match:
- gateways:
- mesh
port: 80
route:
- destination:
host: istio-egressgateway.istio-system.svc.cluster.
local
port:
number: 80
subset: target-egress-gateway-mTLS
weight: 100
- match:
- gateways:
- istio-system/istio-egressgateway
port: 80
route:
- destination:
host: www.aliyun.com
port:
number: 80
weight: 100
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 112
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 113
ACK Cluster
Node Pool A
Lost connection to
Namespace Authorization policy Egress gateway MySQL server at 'reading
Istio mTLS: authorization packet'
mysql –h hos t –u root source namespace
Test App Proxy Proxy
–p password
RDS
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: jeecg-server-rds
namespace: jeecg-server
spec:
endpoints:
- address: rm-gs59q6b8xg7w3kr1jlo.mysql.singapore.rds.
aliyuncs.com
ports:
tcp: 3306
hosts:
- rrm-gs59q6b8xg7w3kr1jlo.mysql.singapore.rds.aliyuncs.com
location: MESH_EXTERNAL
ports:
- name: tcp
number: 3306
protocol: TCP
resolution: DNS
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 114
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 115
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: jeecg-server-egress-gateway
namespace: istio-system
spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: mysql-gateway-mTLS
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 13306
tls:
mode: ISTIO_MUTUAL
sni: rm-gs59q6b8xg7w3kr1jlo.mysql.singapore.rds.
aliyuncs.com
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: jeecg-server-through-egress-gateway
namespace: jeecg-server
spec:
exportTo:
- istio-system
- jeecg-server
gateways:
- mesh
- istio-system/istio-egressgateway
hosts:
- rm-gs59q6b8xg7w3kr1jlo.mysql.singapore.rds.aliyuncs.com
tcp:
- match:
- gateways:
- mesh
port: 3306
route:
- destination:
host: istio-egressgateway.istio-system.svc.cluster.
local
port:
number: 13306
subset: mysql-gateway-mTLS
weight: 100
- match:
- gateways:
- istio-system/istio-egressgateway
port: 13306
route:
- destination:
host: rm-gs59q6b8xg7w3kr1jlo.mysql.singapore.rds.
aliyuncs.com
port:
number: 3306
weight: 100
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 116
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 117
ServiceAccount RRSA
(ack-secret-manager)
Namespace
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 118
2.4.5.1 ASSETS
1. The Assets page in the Security Center console displays the
statistics and security status of protected assets.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 119
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 120
9. Open the Defensive status. After you create a defense rule for a
cluster and enable the defense rule, the defense rule allows,
blocks, or generates alerts for the traffic destined for the cluster.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 121
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 122
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 123
2.4.5.4 ALERTS
17. The Security Center generates different types of alerts for your
assets in real time. The types of alerts include the alerts for web
tampering, suspicious processes,Container Runtime Detection,
webshells, unusual logons, and malicious processes.
The web tamper proofing feature and the cloud threat detection
feature must upgrade Security Center to the Ultimate.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 124
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 125
23. Create a Host Probe.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 126
2.4.5.7 LOGSTORE
27. Full logs of Security Center are stored in a dedicated Logstore.
You can find the Logstore in the project that stores Security
Center logs in the Log Service console. The name of the project
is in the sas-log-ID of your Alibaba Cloud account-Region
ID format.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 127
2.4.5.9 PLAYBOOK
29. Security Center provides automatic orchestration and response
capabilities on the Playbook page. This allows you to orchestrate
the logic of repetitive tasks in the response to security events
into automatic processing policies and helps you reinforce the
security of your system.
You can create only automatic vulnerability fixing tasks on the
Playbook page.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 128
2.5 AIOPS
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret D N S DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Cost Analysis Cluster Security Container
Log Service ARMS
Cluster
Inspections Intelligence Service
Namespace Inspection Cluster Upgrade Logging Prometheus Monitoring
Node pool Solution to solve Check Tracing Cluster Monitoring
hystax
Application security issues
Inspection Report
Node/Pod/Network
diagnosis
Ingress Access Center
Events & Alerting
Cluster Topology
Application Monitoring
Multi-Cloud Bill Control … … … …
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 129
The other 80% of the problems happen with low frequency, they
are closely related to the conditions and status of your cloud
environments, networks, and application, etc. For these problems,
we provide diagnostic tools to locate errors in nodes, pods,
and networks.
Cluster Risk
CIS
(Container
Intelligence
Service)
Knowledge Base(FAQ) Abnormality Abnormality Diagnosis
Node Pool Self-Healing Fix Diagnosis
Typical issues fixed 80% uncommon
with Node Self-Healing issues addressed
CVE Vulnerability and FAQ by diagnosis
Node Diagnosis
OS Network Diagnosis
Systemd
Step Description
1 Cluster Security How to use the Reports area to inspect the security of your
Inspection clusters and use automated tools to monitor cluster health.
2 Cluster Regular How to view the detailed information of the diagnostic results
Inspection including the diagnostic items and troubleshooting advice for
common errors to locate and resolve the issues quickly.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 130
2. Click the Reports tab of the Inspections area. This will provide
you with an inspection report from the ACK console, which
provides a visualization of the health of your Kubernetes
Polaris instances.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 131
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 132
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 133
4. Click the Versions and Certificates and Cluster Risk tabs to see
further information.
Log Service (SLS) allows you to set alerts to monitor the operations
that are performed on specific resources in real time. Alerts
can be sent via SMS messages, DingTalk chatbots, emails,
custom webhooks, and the Message Center of the Alibaba Cloud
Management Console. In this section, you learn how to manage
your alerts.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 134
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 135
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 136
2.6 FINOPS
FinOps is a cloud-based financial management discipline. It allows
organizations to analyze costs and provides valuable insights so
their multidisciplinary teams can collaborate on data-driven
spending decisions.
ACR EE
Application Center
Image Scan
Image Signature
Image Replication Trigger
KMS Image trigger Deployment
synchronization
(Certification) …
New version
Security Center
(Witness/Security
Policy) Image signature
Scale
up/down
Auto Scaling Region (HK) Region (SGP) Other External
KMS External Cloud Vender DNS
(Secrets Manager) Secret DNS DNS Private Zone
Secret-Manager ACK ACK
Policy
Cluster Backup Scaling Cross-region Cluster Governance
OSS OPA Gatekeepper
SSL Management K8S
Nginx-Ingress
Cost Analysis Multi-Cloud Cluster
HTTPS
Cert-Manager Cluster Diagnosis Management
Zero Trust
Istio Ingress Gateway … ASM mTLS
HTTPS Service Mesh Authorization Policy
ASM
Traffic shifting FinOps
GTM
Multi-cluster
(Global Traffic Observability
Distribution & Failover AIOps
Manager) Cross-region (support multi-cloud)
Traffic Manager End-to-end A/B Testing
Gateway
…
Step Description
1 Enable Cost Analysis How to enable cost analyses of your Kubernetes containers.
2 Introducing the Cost Learn some of the key features of the Cost
Analysis Dashboard analysis dashboard.
3 Introducing OptScale Learn some of the key features of the OptScale dashboard.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 137
{
"Action": [
"bssapi:QueryInstanceBill"
],
"Resource":"*",
"Effect":"Allow"
– },
{
"Action":[
"ecs:DescribeSpotPriceHistory",
"ecs:DescribeInstances",
"ecs:DescribePrice"
],
"Resource":"*",
"Effect":"Allow"
}
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 138
Cluster Namespace
Application NodePool
You will now learn some of the key features of the Cost Analysis
dashboard.
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 139
4. Analyze CPU, memory and costs of individual namespaces
and applications:
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 140
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 141
Alibaba Cloud | Best Practices for End-to-End Cloud-Native Application Management on Alibaba Cloud 142
3. IN CONCLUSION
In this lab, you have learnt some of the best practices to help
you make the most of ACK, identifying the key elements across
your CloudOps, DevOps/DevSecOps, SecOps, AIOps and
FinOps strategies.
ABOUT
Established in 2009, Alibaba Cloud is a global leader in cloud computing
and artificial intelligence (AI). It is the technological backbone of the
Alibaba Group, which aims to make it easy to do business anywhere.
As one of the significant business units of the group, Alibaba Cloud
provides the best-in-class cloud computing infrastructure and cloud
services for global enterprises across industries to operate more
efficiently, effectively, and securely. Alibaba Cloud also supports
Alibaba Group’s groundbreaking Double 11 Global Shopping Festival,
which generated USD $74.1 billion (RMB ¥498.2 billion) in gross
merchandise value (GMV) in 2020 with zero downtime.
www.alibabacloud.com/contact-sales