Skip to content

Commit e4a09ae

Browse files
onlydolek8s-ci-robot
authored andcommitted
Correct date for assets in 'Kubernetes on MIPS' blog post and update blog URLs (kubernetes#18663)
1 parent c3aea9e commit e4a09ae

File tree

6 files changed

+61
-61
lines changed

6 files changed

+61
-61
lines changed

content/en/blog/_posts/2020-01-15-Kubernetes-on-MIPS.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,55 @@ For many years, to enrich the ecology of the open-source community, we have been
1919

2020
Over the years, we have been actively participating in the Kubernetes community and have rich experience in the using and optimization of Kubernetes technology. Recently, we tried to adapt the MIPS architecture platform for Kubernetes and achieved a new a stage on that journey. The team has completed migration and adaptation of Kubernetes and related components, built not only a stable and highly available MIPS cluster but also completed the conformance test for Kubernetes v1.16.2.
2121

22-
![Kubernetes on MIPS](/images/blog/2019-12-21-Kubernetes-on-MIPS/kubernetes-on-mips.png)
22+
![Kubernetes on MIPS](/images/blog/2020-01-15-Kubernetes-on-MIPS/kubernetes-on-mips.png)
2323

24-
*Figure 1 Kubernetes on MIPS*
24+
_Figure 1 Kubernetes on MIPS_
2525

2626
## K8S-MIPS component build
2727

2828
Almost all native cloud components related to Kubernetes do not provide a MIPS version installation package or image. The prerequisite of deploying Kubernetes on the MIPS platform is to compile and build all required components on the mips64el platform. These components include:
2929

30-
- golang
31-
- docker-ce
32-
- hyperkube
33-
- pause
34-
- etcd
35-
- calico
36-
- coredns
37-
- metrics-server
30+
- golang
31+
- docker-ce
32+
- hyperkube
33+
- pause
34+
- etcd
35+
- calico
36+
- coredns
37+
- metrics-server
3838

3939
Thanks to the excellent design of Golang and its good support for the MIPS platform, the compilation processes of the above cloud native components are greatly simplified. First of all, we compiled Golang on the latest stable version for the mips64el platform, and then we compiled most of the above components with source code.
4040

41-
During the compilation processes, we inevitably encountered many platform compatibility problems, such as a Golang system call compatibility problem (syscall), typecasting of syscall. Stat_t from uint32 to uint64, patching for EpollEvent, and so on.
41+
During the compilation processes, we inevitably encountered many platform compatibility problems, such as a Golang system call compatibility problem (syscall), typecasting of syscall. Stat_t from uint32 to uint64, patching for EpollEvent, and so on.
4242

4343
To build K8S-MIPS components, we used cross-compilation technology. Our process involved integrating a QEMU tool to translate MIPS CPU instructions and modifying the build script of Kubernetes and E2E image script of Kubernetes, Hyperkube, and E2E test images on MIPS architecture.
4444

4545
After successfully building the above components, we use tools such as kubespray and kubeadm to complete kubernetes cluster construction.
4646

47-
| Name | Version | MIPS Repository |
48-
|------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
49-
| golang on MIPS | 1.12.5 | - |
50-
| docker-ce on MIPS | 18.09.8 | - |
47+
| Name | Version | MIPS Repository |
48+
| ------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
49+
| golang on MIPS | 1.12.5 | - |
50+
| docker-ce on MIPS | 18.09.8 | - |
5151
| metrics-server for CKE on MIPS | 0.3.2 | `registry.inspurcloud.cn/library/cke/kubernetes/metrics-server-mips64el:v0.3.2` |
5252
| etcd for CKE on MIPS | 3.2.26 | `registry.inspurcloud.cn/library/cke/etcd/etcd-mips64el:v3.2.26` |
5353
| pause for CKE on MIPS | 3.1 | `registry.inspurcloud.cn/library/cke/kubernetes/pause-mips64el:3.1` |
5454
| hyperkube for CKE on MIPS | 1.14.3 | `registry.inspurcloud.cn/library/cke/kubernetes/hyperkube-mips64el:v1.14.3` |
55-
| coredns for CKE on MIPS | 1.6.5 | `registry.inspurcloud.cn/library/cke/kubernetes/coredns-mips64el:v1.6.5` |
55+
| coredns for CKE on MIPS | 1.6.5 | `registry.inspurcloud.cn/library/cke/kubernetes/coredns-mips64el:v1.6.5` |
5656
| calico for CKE on MIPS | 3.8.0 | `registry.inspurcloud.cn/library/cke/calico/cni-mips64el:v3.8.0` `registry.inspurcloud.cn/library/cke/calico/ctl-mips64el:v3.8.0` `registry.inspurcloud.cn/library/cke/calico/node-mips64el:v3.8.0` `registry.inspurcloud.cn/library/cke/calico/kube-controllers-mips64el:v3.8.0` |
5757

5858
**Note**: CKE is a Kubernetes-based cloud container engine launched by Inspur
5959

60-
![K8S-MIPS Cluster Components](/images/blog/2019-12-21-Kubernetes-on-MIPS/k8s-mips-cluster-components.png)
60+
![K8S-MIPS Cluster Components](/images/blog/2020-01-15-Kubernetes-on-MIPS/k8s-mips-cluster-components.png)
6161

62-
*Figure 2 K8S-MIPS Cluster Components*
62+
_Figure 2 K8S-MIPS Cluster Components_
6363

64-
![CPU Architecture](/images/blog/2019-12-21-Kubernetes-on-MIPS/cpu-architecture.png)
64+
![CPU Architecture](/images/blog/2020-01-15-Kubernetes-on-MIPS/cpu-architecture.png)
6565

66-
*Figure 3 CPU Architecture*
66+
_Figure 3 CPU Architecture_
6767

68-
![Cluster Node Information](/images/blog/2019-12-21-Kubernetes-on-MIPS/cluster-node-information.png)
68+
![Cluster Node Information](/images/blog/2020-01-15-Kubernetes-on-MIPS/cluster-node-information.png)
6969

70-
*Figure 4 Cluster Node Information*
70+
_Figure 4 Cluster Node Information_
7171

7272
## Run K8S Conformance Test
7373

@@ -81,52 +81,52 @@ Once the test has started, it launches several pods for various end-to-end tests
8181

8282
The first step is to find all needed images for the test. We can run `sonobuoy images-p e2e` command to list all images, or we can find those images in [/test/utils/image/manifest.go](https://github.com/kubernetes/kubernetes/blob/master/test/utils/image/manifest.go). Although Kubernetes officially has a complete Makefile and shell-script that provides commands for building test images, there are still a number of architecture-related issues that have not been resolved, such as the incompatibilities of base images and dependencies. So we cannot directly build mips64el architecture images by executing these commands.
8383

84-
Most test images are in golang, then compiled into binaries and built as Docker image based on the corresponding Dockerfile. These images are easy to build. But note that most images are using alpine as their base image, which does not officially support mips64el architecture for now. For this moment, we are unable to make mips64el version of [alpine] (https://www.alpinelinux.org/), so we have to replace the alpine to existing MIPS images, such as Debian-stretch, fedora, ubuntu. Replacing the base image also requires replacing the command to install the dependencies, even the version of these dependencies.
84+
Most test images are in golang, then compiled into binaries and built as Docker image based on the corresponding Dockerfile. These images are easy to build. But note that most images are using alpine as their base image, which does not officially support mips64el architecture for now. For this moment, we are unable to make mips64el version of [alpine](https://www.alpinelinux.org/), so we have to replace the alpine to existing MIPS images, such as Debian-stretch, fedora, ubuntu. Replacing the base image also requires replacing the command to install the dependencies, even the version of these dependencies.
8585

8686
Some images are not in `kubernetes/test/images`, such as `gcr.io/google-samples/gb-frontend:v6`. There is no clear documentation explaining where these images are locaated, though we found the source code in repository [github.com/GoogleCloudPlatform/kubernetes-engine-samples](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples). We soon ran into new problems: to build these google sample images, we have to build the base image it uses, even the base image of the base images, such as `php:5-apache`, `redis`, and `perl`.
8787

8888
After a long process of building an image, we finished with about four dozen images, including the images used by the test pod, and the base images. The last step before we run the tests is to place all those images into every node in the cluster and make sure the Pod image pull policy is `imagePullPolicy: ifNotPresent`.
8989

9090
Here are some of the images we built:
9191

92-
- `docker.io/library/busybox:1.29`
93-
- `docker.io/library/nginx:1.14-alpine`
94-
- `docker.io/library/nginx:1.15-alpine`
95-
- `docker.io/library/perl:5.26`
96-
- `docker.io/library/httpd:2.4.38-alpine`
97-
- `docker.io/library/redis:5.0.5-alpine`
98-
- `gcr.io/google-containers/conformance:v1.16.2`
99-
- `gcr.io/google-containers/hyperkube:v1.16.2`
100-
- `gcr.io/google-samples/gb-frontend:v6`
101-
- `gcr.io/kubernetes-e2e-test-images/agnhost:2.6`
102-
- `gcr.io/kubernetes-e2e-test-images/apparmor-loader:1.0`
103-
- `gcr.io/kubernetes-e2e-test-images/dnsutils:1.1`
104-
- `gcr.io/kubernetes-e2e-test-images/echoserver:2.2`
105-
- `gcr.io/kubernetes-e2e-test-images/ipc-utils:1.0`
106-
- `gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0`
107-
- `gcr.io/kubernetes-e2e-test-images/kitten:1.0`
108-
- `gcr.io/kubernetes-e2e-test-images/metadata-concealment:1.2`
109-
- `gcr.io/kubernetes-e2e-test-images/mounttest-user:1.0`
110-
- `gcr.io/kubernetes-e2e-test-images/mounttest:1.0`
111-
- `gcr.io/kubernetes-e2e-test-images/nautilus:1.0`
112-
- `gcr.io/kubernetes-e2e-test-images/nonewprivs:1.0`
113-
- `gcr.io/kubernetes-e2e-test-images/nonroot:1.0`
114-
- `gcr.io/kubernetes-e2e-test-images/resource-consumer-controller:1.0`
115-
- `gcr.io/kubernetes-e2e-test-images/resource-consumer:1.5`
116-
- `gcr.io/kubernetes-e2e-test-images/sample-apiserver:1.10`
117-
- `gcr.io/kubernetes-e2e-test-images/test-webserver:1.0`
118-
- `gcr.io/kubernetes-e2e-test-images/volume/gluster:1.0`
119-
- `gcr.io/kubernetes-e2e-test-images/volume/iscsi:2.0`
120-
- `gcr.io/kubernetes-e2e-test-images/volume/nfs:1.0`
121-
- `gcr.io/kubernetes-e2e-test-images/volume/rbd:1.0.1`
122-
- `k8s.gcr.io/etcd:3.3.15`
123-
- `k8s.gcr.io/pause:3.1`
92+
- `docker.io/library/busybox:1.29`
93+
- `docker.io/library/nginx:1.14-alpine`
94+
- `docker.io/library/nginx:1.15-alpine`
95+
- `docker.io/library/perl:5.26`
96+
- `docker.io/library/httpd:2.4.38-alpine`
97+
- `docker.io/library/redis:5.0.5-alpine`
98+
- `gcr.io/google-containers/conformance:v1.16.2`
99+
- `gcr.io/google-containers/hyperkube:v1.16.2`
100+
- `gcr.io/google-samples/gb-frontend:v6`
101+
- `gcr.io/kubernetes-e2e-test-images/agnhost:2.6`
102+
- `gcr.io/kubernetes-e2e-test-images/apparmor-loader:1.0`
103+
- `gcr.io/kubernetes-e2e-test-images/dnsutils:1.1`
104+
- `gcr.io/kubernetes-e2e-test-images/echoserver:2.2`
105+
- `gcr.io/kubernetes-e2e-test-images/ipc-utils:1.0`
106+
- `gcr.io/kubernetes-e2e-test-images/jessie-dnsutils:1.0`
107+
- `gcr.io/kubernetes-e2e-test-images/kitten:1.0`
108+
- `gcr.io/kubernetes-e2e-test-images/metadata-concealment:1.2`
109+
- `gcr.io/kubernetes-e2e-test-images/mounttest-user:1.0`
110+
- `gcr.io/kubernetes-e2e-test-images/mounttest:1.0`
111+
- `gcr.io/kubernetes-e2e-test-images/nautilus:1.0`
112+
- `gcr.io/kubernetes-e2e-test-images/nonewprivs:1.0`
113+
- `gcr.io/kubernetes-e2e-test-images/nonroot:1.0`
114+
- `gcr.io/kubernetes-e2e-test-images/resource-consumer-controller:1.0`
115+
- `gcr.io/kubernetes-e2e-test-images/resource-consumer:1.5`
116+
- `gcr.io/kubernetes-e2e-test-images/sample-apiserver:1.10`
117+
- `gcr.io/kubernetes-e2e-test-images/test-webserver:1.0`
118+
- `gcr.io/kubernetes-e2e-test-images/volume/gluster:1.0`
119+
- `gcr.io/kubernetes-e2e-test-images/volume/iscsi:2.0`
120+
- `gcr.io/kubernetes-e2e-test-images/volume/nfs:1.0`
121+
- `gcr.io/kubernetes-e2e-test-images/volume/rbd:1.0.1`
122+
- `k8s.gcr.io/etcd:3.3.15`
123+
- `k8s.gcr.io/pause:3.1`
124124

125125
Finally, we ran the tests and got the test result, include `e2e.log`, which showed that all test cases passed. Additionally, we submitted our test result to [k8s-conformance](https://github.com/cncf/k8s-conformance) as a [pull request](https://github.com/cncf/k8s-conformance/pull/779).
126126

127-
![Pull request for conformance test results](/images/blog/2019-12-21-Kubernetes-on-MIPS/pull-request-for-conformance-test-results.png)
127+
![Pull request for conformance test results](/images/blog/2020-01-15-Kubernetes-on-MIPS/pull-request-for-conformance-test-results.png)
128128

129-
*Figure 5 Pull request for conformance test results*
129+
_Figure 5 Pull request for conformance test results_
130130

131131
## What's next
132132

@@ -136,8 +136,8 @@ In the future, we plan to actively contribute our experience and achievements to
136136

137137
Contribution plan:
138138

139-
* contribute the source of e2e test images for MIPS
140-
* contribute the source of hyperkube for MIPS
141-
* contribute the source of deploy tools like kubeadm for MIPS
139+
- contribute the source of e2e test images for MIPS
140+
- contribute the source of hyperkube for MIPS
141+
- contribute the source of deploy tools like kubeadm for MIPS
142142

143-
----
143+
---

0 commit comments

Comments
 (0)