-2

Kubernetes 1.7.9 で初めて Istio をインストールします。自動サイドカーインジェクションでインストール。サンプル アプリケーションを試すと、サイド カーとアプリケーション コンテナーが開始され、「実行中」の状態になっていますが、proxy_init は PodInitializing でスタックし、Pod の全体的な状態は Init:0/1 です。

[root@node-8 helloworld]# kubectl describe pods helloworld-v1-3194034472-12rgj 
Name:           helloworld-v1-3194034472-12rgj
Namespace:      default
Node:           node-8/136.225.226.159
Start Time:     Wed, 01 Nov 2017 19:13:11 +0100
Labels:         app=helloworld
                pod-template-hash=3194034472
                version=v1
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"helloworld-v1-3194034472","uid":"5212bc02-bf30-11e7-b818-0050560...
                sidecar.istio.io/status=injected-version-0.2.7
Status:         Running
IP:             192.168.144.130
Created By:     ReplicaSet/helloworld-v1-3194034472
Controlled By:  ReplicaSet/helloworld-v1-3194034472
Init Containers:
  istio-init:
    Container ID:
    Image:              docker.io/istio/proxy_init:0.2.7
    Image ID:
    Port:               <none>
    Args:
      -p
      15001
      -u
      1337
    State:              Waiting
      Reason:           PodInitializing
    Ready:              False
    Restart Count:      0
    Environment:        <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-76kq4 (ro)
Containers:
  helloworld:
    Container ID:       docker://aa89ecc46d273b76d71a0f67d5169519926cc0e01d9d1f2ab960e2b88a46013b
    Image:              istio/examples-helloworld-v1
    Image ID:           docker-pullable://docker.io/istio/examples-helloworld-v1@sha256:c671702b11cbcda103720c2bd3e81a4211012bfef085b7326bb7fbfd8cea4a94
    Port:               5000/TCP
    State:              Running
      Started:          Wed, 01 Nov 2017 19:13:14 +0100
    Ready:              True
    Restart Count:      0
    Requests:
      cpu:              100m
    Environment:        <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-76kq4 (ro)
  istio-proxy:
    Container ID:       docker://9bb16159d42229512892feae13614c4c373f3436957b6263c772f62282d75e02
    Image:              docker.io/istio/proxy:0.2.7
    Image ID:           docker-pullable://docker.io/istio/proxy@sha256:910546c29a32e11f58bab92e68513a5c8f636621c0e20197833270961fda3713
    Port:               <none>
    Args:
      proxy
      sidecar
      -v
      2
      --configPath
      /etc/istio/proxy
      --binaryPath
      /usr/local/bin/envoy
      --serviceCluster
      helloworld
      --drainDuration
      45s
      --parentShutdownDuration
      1m0s
      --discoveryAddress
      istio-pilot.istio-system:8080
      --discoveryRefreshDelay
      1s
      --zipkinAddress
      zipkin.istio-system:9411
      --connectTimeout
      10s
      --statsdUdpAddress
      istio-mixer.istio-system:9125
      --proxyAdminPort
      15000
    State:              Running
      Started:          Wed, 01 Nov 2017 19:13:15 +0100
    Ready:              True
    Restart Count:      0
    Environment:
      POD_NAME:         helloworld-v1-3194034472-12rgj (v1:metadata.name)
      POD_NAMESPACE:    default (v1:metadata.namespace)
      INSTANCE_IP:       (v1:status.podIP)
    Mounts:
      /etc/certs/ from istio-certs (ro)
      /etc/istio/proxy from istio-envoy (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-76kq4 (ro)
Conditions:
  Type          Status
  Initialized   True 
  Ready         True 
  PodScheduled  True 
Volumes:
  istio-envoy:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
  istio-certs:
    Type:       Secret (a volume populated by a Secret)
    SecretName: istio.default
    Optional:   true
  default-token-76kq4:
    Type:       Secret (a volume populated by a Secret)
    SecretName: default-token-76kq4
    Optional:   false
QoS Class:      Burstable
Node-Selectors: <none>
Tolerations:    node.alpha.kubernetes.io/notReady:NoExecute for 300s
                node.alpha.kubernetes.io/unreachable:NoExecute for 300s
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath                   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------                   --------        ------                  -------
  4m            4m              1       default-scheduler                                       Normal          Scheduled               Successfully assigned helloworld-v1-3194034472-12rgj to node-8
  4m            4m              1       kubelet, node-8                                         Normal          SuccessfulMountVolume   MountVolume.SetUp succeeded for volume "istio-envoy" 
  4m            4m              1       kubelet, node-8                                         Normal          SuccessfulMountVolume   MountVolume.SetUp succeeded for volume "default-token-76kq4" 
  4m            4m              1       kubelet, node-8                                         Normal          SuccessfulMountVolume   MountVolume.SetUp succeeded for volume "istio-certs" 
  4m            4m              1       kubelet, node-8         spec.initContainers{istio-init} Normal          Pulled                  Container image "docker.io/istio/proxy_init:0.2.7" already present on machine
  4m            4m              1       kubelet, node-8         spec.initContainers{istio-init} Normal          Created                 Created container
  4m            4m              1       kubelet, node-8         spec.initContainers{istio-init} Normal          Started                 Started container
  4m            4m              1       kubelet, node-8         spec.containers{helloworld}     Normal          Pulled                  Container image "istio/examples-helloworld-v1" already present on machine
  4m            4m              1       kubelet, node-8         spec.containers{helloworld}     Normal          Created                 Created container
  4m            4m              1       kubelet, node-8         spec.containers{helloworld}     Normal          Started                 Started container
  4m            4m              1       kubelet, node-8         spec.containers{istio-proxy}    Normal          Pulled                  Container image "docker.io/istio/proxy:0.2.7" already present on machine
  4m            4m              1       kubelet, node-8         spec.containers{istio-proxy}    Normal          Created                 Created container
  4m            4m              1       kubelet, node-8         spec.containers{istio-proxy}    Normal          Started                 Started container
[root@node-8 helloworld]# kubectl get pods
NAME                             READY     STATUS     RESTARTS   AGE
helloworld-v1-3194034472-12rgj   0/2       Init:0/1   0          12m
helloworld-v2-717720256-rc06f    0/2       Init:0/1   0          12m
sleep-140275861-vjqf7            0/2       Init:0/1   0          1h
[root@node-8 helloworld]# 

初期化子が有効になっています:

[root@node-8 istio-0.2.7]# kubectl api-versions | grep admi
admissionregistration.k8s.io/v1alpha1
[root@node-8 istio-0.2.7]# 

istio-Proxy ログから、

[2017-11-02 19:40:19.323][14][warning][main] external/envoy/source/server/server.cc:164] initializing epoch 0 (hot restart version=8.2490552)
[2017-11-02 19:40:19.330][14][warning][main] external/envoy/source/server/server.cc:332] starting main dispatch loop
[2017-11-02 19:40:19.392][14][warning][main] external/envoy/source/server/server.cc:316] all clusters initialized. initializing init manager
[2017-11-02 19:40:19.427][14][warning][config] external/envoy/source/server/listener_manager_impl.cc:451] all dependencies initialized. starting workers
[2017-11-02 19:41:19.429][14][warning][main] external/envoy/source/server/drain_manager_impl.cc:62] shutting down parent after drain    

しかし、proxy_init は待機状態でスタックしています。

4

2 に答える 2

0

After further research, figured that there is a known issue that got fixed in 1.8 where the init container can wait at PodInitializing state. https://github.com/kubernetes/kubernetes/pull/51644. works in 1.8 fine.

于 2017-11-03T06:01:51.753 に答える