K8s: Source Code Import

Source: Internet
Author: User
Tags k8s
This is a created article in which the information may have evolved or changed.

Objective

Recently in the survey Google Kubernetes Open source container orchestration platform, just also learning the go language, so want to see Google such a giant is how to go language, this article briefly describes how to download k8s source code, import idea Goland (yes, I'm a Java ~), for such a large project, no IDE seems to be very laborious, of course, except for cattle.

Download source code

It goes without saying that people in the global village should all know

# mkdir -p /opt/kubernetes-src/src/k8s.io# cd /opt/kubernetes-src/src/k8s.io/# git clone https://github.com/kubernetes/kubernetes.git# git checkout release-1.9

Because the project Gopath (Gopath per project private) is configured for/OPT/KUBERNETES-SRC in Goland, the/OPT/KUBERNETES-SRC directory is built under Src/k8s.io, As for why the directory is called K8s.io, the import of this rollover code is clear, if you do not want to import the code after the various can not find the import package (symbol) of the ^_-

Import Goland

Goland before the Intellij + Go plugin, goland out of the download immediately after the experience, it feels good

  • Open Goland
  • Select New Project
  • Point destination folder to/opt/kubernetes-src
  • After confirming that the folder is not empty, continue, click OK.

Slowly wait for the IDE to finish indexing the source code

Summarize

This article introduces how to import k8s source code into Goland, prepare for further learning source code.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.