In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to achieve one-click deployment of K8S, the content is very detailed, interested friends can refer to, hope to be helpful to you.
With the continuous development of the Internet era, developers may be faced with such a dilemma: the "innovation" developed in order to solve problems and improve development efficiency seems to weaken their importance in the company. or even take their place. For example, in the cloud native era, some enterprises prefer to choose K8s to solve the problems of operation and maintenance and flexibility, rather than to set up a R & D team that costs a lot of employment funds and management funds.
For K8s, its value is that it can not only help companies reduce operation and maintenance costs, but also bring flexibility, agility and portability, but for developers, our value should not only be able to solve the same problems as K8S. but to jump out of the predicament and think about how to use K8s more flexibly and efficiently to improve your comprehensive skills.
The technical personnel involved in development can never get around deploying the application to the corresponding server. Today, I will explain to you how to achieve real "one-click deployment" and improve the efficiency of development and deployment for container service K8s.
What is Container Service K8s
Container service K8s is adapted and enhanced based on native K8s, simplifies the construction and expansion of clusters, provides high-performance and scalable container application management capabilities, and supports the lifecycle management of enterprise containerized applications. Integrate Aliyun's virtualization, storage, network and security capabilities to create the best containerized application running environment in the cloud. The core functions are:
Cluster management: flexible choice of region and network environment, you can choose different regions to create and delete clusters according to your own needs.
Multiple server hosting methods: support authorizing CCS to create CVMs to join the specified cluster, and adding purchased CVMs to the specified cluster.
One-stop container lifecycle management: including network, storage, log, monitoring, scheduling, routing, permissions.
Flexible expansion of scheduling strategy to easily open upstream and downstream delivery processes: support service-level affinity strategy and scale-out, OpenAPI across AZ high availability and disaster recovery, clustering and application management, and easily interface with continuous integration and private deployment systems.
Second, how to realize "one-click deployment" to CCS K8s
There are many ways to improve the efficiency of development and deployment. What I share with you today is a local IDE plug-in-Cloud Toolkit, which is said to be one of the plug-ins most used by developers. It can not only automate the whole process of code development to the final deployment, but also can be deployed to any server (ECS, EDAS, K8s and Mini Program Cloud, etc.) And comes with a lot of features: Arthas diagnostics, Dubbo tools, Terminal terminals, file uploads and MySQL executors, the most important of which is: free! Free! Free! Many blogs, technical websites and official accounts on the Internet have related evaluations, you can refer to them, or install and try them yourself, be sure to try out the function of [one-click deployment]! Here's how to deploy the application to CCS k8s with the help of this plug-in.
(1) install plug-ins
Free plug-in link: https://www.aliyun.com/product/cloudtoolkit
(2) configure plug-in preferences
Click: * * top menu Tools-- > Alibaba Cloud Toolkit-- > Preferences-- > Alibaba Cloud Toolkit-- > Accounts * * in the left list, and the following interface appears to configure the AK and SK of the Aliyun account to complete the preference configuration. (if it is a sub-account, fill in the AK and SK of the sub-account)
(3) set local Docker image packaging
Click: top menu Tools-> Alibaba Cloud Toolkit-- > Preferences-- > Alibaba Cloud Toolkit-> Docker in the list on the left, as shown below, set the local Docker image package.
(3) deploy applications
In Intellij IDEA, right-click the project project name, and click Alibaba Cloud-> Deploy to CS Kubernetes..., in the menu that appears. The following deployment window appears:
Step 1: set up Image
In the Image tab, select the Context Directory and Dockerfile of the local application (usually automatically identified and set based on your local application project).
Select the region, namespace and image repository of the container image service, and then click the Container tab.
(note: if you do not already have an image repository, click Create a new repository in the upper right corner of the dialog box to jump to the container image repository to create an image repository. For the creation steps, please refer to the container image repository documentation. )
Step 2: set up Container
On the Container tab, select Deployment (deployment), Clusters (cluster), and Namespace (namespace) of the container service Kubernetes.
Select the specified Container (container).
(note: if you have not created a Deployment for CCS Kubernetes, click Create a new Kubernetes deployment in the upper right corner of the dialog box, and jump to CCS Kubernetes console to create Deployment. For the creation steps, please refer to CCS Kubernetes documentation. )
Step 3: perform deployment
After clicking the Run button, you can complete the deployment of the local application to the container service Kubernetes.
Third, how to achieve "one-click deployment" to host, development and deployment speed up 8 times
This plug-in can deploy applications to six servers, namely:
Host (any server)
ECS
CS K8s
EDAS (including EDAS for ECS Application & EDAS for K8s Application)
Mini Program (Mini Program Cloud)
SAE
The following is a detailed explanation of how to deploy the application to host with one click.
Step 1: add a server
Click: top menu Tools-> Alibaba Cloud-- > Alibaba Cloud View-- > Host to open the machine view interface, as shown below:
Click: Add Host button in the upper right corner, and the add machine interface appears, as shown in the following figure, to set the relevant configuration.
Step 2: perform deployment
In IntelliJ IDEA, right-click the project project name, click Alibaba Cloud-> Deploy to Host..., in the menu that appears, the following deployment window appears, set the deployment parameters, and then click Deploy to perform the initial deployment.
> deployment parameter description: > > 1. Deploy File: deployment file contains two methods: > > * Maven Build: if the current project is built with Maven, you can build and deploy it directly using Cloud Toolkit. > * Upload File: if the current project is not built with Maven, or if a packaged deployment file already exists locally, you can select and upload the local deployment file directly. > > 2. Target Deploy host: select Tag in the drop-down list, and then select the server to be deployed. > 3. Deploy Location: enter the deployment path on ECS, such as / root/tomcat/webapps. > 4. Commond: enter the application startup command, such as sh / root/restart.sh. Indicates the command that needs to be executed after the deployment of the application package is completed-- for Java programs, it is usually a Tomcat startup command.
On how to achieve one-click deployment of K8S to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.