Kubernetes Notes (2)--workspace at compile time

Source: Internet
Author: User
Tags k8s
This is a creation in Article, where the information may have evolved or changed.

When the code is compiled k8s , k8s a folder is generated in the root directory _output , and folders are also included under this folder local :

~/kubernetes/_output/local$ lsbin  go

goThe folder is a standard Go language workspace :

:~/kubernetes/_output/local/go$ ls -alttotal 20drwxrwxr-x 4 nan nan 4096 Dec  9 22:09 ..drwxrwxr-x 2 nan nan 4096 Dec  9 22:09 bindrwxrwxr-x 4 nan nan 4096 Dec  9 22:08 pkgdrwxrwxr-x 5 nan nan 4096 Dec  9 22:07 .drwxrwxr-x 3 nan nan 4096 Dec  9 22:04 src

Go to src folder:

~/kubernetes/_output/local/go/src$ ls -alttotal 12drwxrwxr-x 5 nan nan 4096 Dec  9 22:07 ..drwxrwxr-x 2 nan nan 4096 Dec  9 22:06 k8s.iodrwxrwxr-x 3 nan nan 4096 Dec  9 22:04 .nan@ubuntu:~/kubernetes/_output/local/go/src$ cd k8s.io/nan@ubuntu:~/kubernetes/_output/local/go/src/k8s.io$ ls -alttotal 8drwxrwxr-x 2 nan nan 4096 Dec  9 22:06 .lrwxrwxrwx 1 nan nan   20 Dec  9 22:06 kubernetes -> /home/nan/kubernetesdrwxrwxr-x 3 nan nan 4096 Dec  9 22:04 ..

As you can see, there src/k8s.io/kubernetes is a soft link to the outer working directory.

At this point, you can understand import why the following statement in the code works:

import (    "k8s.io/kubernetes/contrib/mesos/pkg/controllermanager"    "k8s.io/kubernetes/contrib/mesos/pkg/hyperkube")

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.