In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to deploy applications to CCS Kubernetes more efficiently in Intellij IDEA". In daily operations, I believe many people have doubts about how to deploy applications to CCS Kubernetes more efficiently in Intellij IDEA. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods, hoping to help you answer "how to deploy applications to CCS Kubernetes more efficiently in Intellij IDEA"! Next, please follow the editor to study!
About CCS Kubernetes
Kubernetes version of CCS provides high-performance and scalable container application management capabilities, and supports the lifecycle management of enterprise-level Kubernetes containerized applications. Kubernetes version of CCS simplifies the construction and expansion of clusters, integrates Ali Cloud's virtualization, storage, network and security capabilities, and creates the best Kubernetes containerized application running environment on the cloud.
Local development
This paper uses a very basic example of "printing the Java Servlet of HelloWorld on Web pages" as an example to do code engineering reference.
Cdn.com/6f8fc9f085826ceeb0c2157a5708b21b4477b07e.png ">
Public class IndexServlet extends HttpServlet {private static final long serialVersionUID =-112210702214857712L; @ Override public void doGet (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {PrintWriter writer = resp.getWriter (); / / Demo: efficiently modify the local application code and deploy it to the cloud through Cloud Toolkit. Writer.write ("Deploy from Alibaba Cloud Toolkit. 2018-12-17"); return;} @ Override protected void doPost (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {return;}}
Source code download
The above code is a standard Java project that prints a string of "Hello World" copywriters on a Web page.
Write a Dockerfile file (download) and place it in the root directory of the project
FROM tomcat:8.5.34-jre8COPY target/javademo.war / usr/local/tomcat/webapps/ installation plug-in
Aliyun provides Intellij IDEA-based plug-ins to facilitate developers to efficiently deploy applications written in local IDE to CCS Kubernetes.
Plug-in home page: https://www.aliyun.com/product/cloudtoolkit
The installation process of Aliyun's Intellij IDEA plug-in is more or less the same as that of ordinary plug-ins. I won't repeat it here. Please install it yourself.
Configure plug-in preferences
After installing the plug-in, configure the preferences according to the following path
Top menu-Tools-Alibaba Cloud Toolkit-Preferences
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)
Set local Docker image packaging
Top menu-Tools-Alibaba Cloud Toolkit-Preferences-Alibaba Cloud Toolkit-Docker
Deployment
In Intellij IDEA, right-click the project project name, click Alibaba Cloud-Deploy to CS Kubernetes..., in the menu that appears, and the following deployment window appears:
Step 1
In the Image tab, select the Context Directory and Dockerfile of the local application (usually automatically identified and set according to 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
On the Container tab, select the Clusters (cluster), Namespace (namespace), and Deployment (deployment) of the container service Kubernetes, and the Container (container) specified in it.
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 the Kubernetes version of CCS documentation.
After clicking the Run button, you can complete the deployment of the local application to the container service Kubernetes.
At this point, the study on "how to deploy applications to CCS Kubernetes more efficiently in Intellij IDEA" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.