tjtjtjのメモ

自分のためのメモです

knative のインストール 失敗

どのクラウドでも使えるサーバレス「GitLab Serverless」をGitLabが発表。KubernetesとKnativeがベース
https://www.publickey1.jp/blog/18/gitlab_serverlessgitlabkubernetesknative.html

Knativeをベースにしたサーバレス環境「Pivotal Function Service」、Pivotalがアルファ版発表
https://www.publickey1.jp/blog/18/knativepivotal_function_servicepivotal.html

Knative っすかー。やってみる。まずは1ノード(cpu:2core mem:4gb)で。

Installing Istio

```
> kubectl apply --filename https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml
namespace "istio-system" created
configmap "istio-galley-configuration" created
configmap "istio-statsd-prom-bridge" created
configmap "istio-security-custom-resources" created
configmap "istio" created
:
unable to recognize "https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml": no matches for kind "rule" in version "config.istio.io/v1alpha2"
unable to recognize "https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml": no matches for kind "rule" in version "config.istio.io/v1alpha2"
unable to recognize "https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml": no matches for kind "kubernetes" in version "config.istio.io/v1alpha2"
unable to recognize "https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3"
unable to recognize "https://raw.githubusercontent.com/knative/serving/v0.2.2/third_party/istio-1.0.2/istio.yaml": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3"
```

```
> kubectl label namespace default istio-injection=enabled
namespace "default" labeled
```

Running, Completed になるまで待つ

```
> kubectl get pods --namespace istio-system
NAME READY STATUS RESTARTS AGE
istio-citadel-746c765786-6g9vw 1/1 Running 0 1m
istio-cleanup-secrets-t8twg 0/1 Completed 0 1m
istio-egressgateway-7b46794587-jzccr 1/1 Running 0 1m
istio-galley-75c6976d79-hl5j9 0/1 ContainerCreating 0 1m
istio-ingressgateway-57f76dc4db-sgktx 1/1 Running 0 1m
istio-pilot-6495978c49-jstwr 2/2 Running 0 1m
istio-policy-6677c87b9f-7t8pb 2/2 Running 0 1m
istio-sidecar-injector-879fd9dfc-24p9j 0/1 ContainerCreating 0 1m
istio-statsd-prom-bridge-549d687fd9-dd4zf 1/1 Running 0 1m
istio-telemetry-7d46d668db-dz2d7 2/2 Running 0 1m
> kubectl get pods --namespace istio-system
NAME READY STATUS RESTARTS AGE
istio-citadel-746c765786-6g9vw 1/1 Running 0 2m
istio-cleanup-secrets-t8twg 0/1 Completed 0 2m
istio-egressgateway-7b46794587-jzccr 1/1 Running 0 2m
istio-galley-75c6976d79-hl5j9 1/1 Running 0 2m
istio-ingressgateway-57f76dc4db-sgktx 1/1 Running 0 2m
istio-pilot-6495978c49-jstwr 2/2 Running 0 2m
istio-policy-6677c87b9f-7t8pb 2/2 Running 0 2m
istio-sidecar-injector-879fd9dfc-24p9j 1/1 Running 0 2m
istio-statsd-prom-bridge-549d687fd9-dd4zf 1/1 Running 0 2m
istio-telemetry-7d46d668db-dz2d7 2/2 Running 0 2m
```

Installing Knative components

ネイティブサービングコンポーネントとビルドコンポーネントのインストール

```
> kubectl apply --filename https://github.com/knative/serving/releases/download/v0.2.2/release.yaml
namespace "knative-build" created
clusterrole.rbac.authorization.k8s.io "knative-build-admin" created
serviceaccount "build-controller" created
clusterrolebinding.rbac.authorization.k8s.io "build-controller-admin" created
customresourcedefinition.apiextensions.k8s.io "builds.build.knative.dev" created
:
clusterrolebinding.rbac.authorization.k8s.io "prometheus-system" created
service "prometheus-system-np" created
statefulset.apps "prometheus-system" created
service "zipkin" created
deployment.apps "zipkin" created
```

kubectl get pods とここで、反応しなくなった。

```
> kubectl get pods --namespace knative-serving
```

rancherがこうなった。

f:id:tjtjtjofthedead:20181220200527p:plain

やっぱりテキトーはよくないか

3ノード(cpu:2core mem:4gb) でもダメ。やっぱりテキトーはよくないか