Code Monkey home page Code Monkey logo

kubernetes-initializer-tutorial's Introduction

Kubernetes Initializer Tutorial SuperDopeBadge

This tutorial walks you through building and deploying a Kubernetes Initializer that injects an Envoy proxy container into uninitialized Deployments.

Initializers are an alpha feature and subject to change. Please report any Initializer specific issues on the Kubernetes issue tracker.

Prerequisites

Kubernetes 1.7.0+ is required with support for Initializers enabled. If you're using Google Container Engine create an alpha cluster:

gcloud alpha container clusters create k0 \
  --enable-kubernetes-alpha \
  --cluster-version 1.7.0

Download the tutorial by cloning this repository:

git clone https://github.com/kelseyhightower/kubernetes-initializer-tutorial.git
cd kubernetes-initializer-tutorial

Tutorial

kubernetes-initializer-tutorial's People

Contributors

josegonzalez avatar kelseyhightower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubernetes-initializer-tutorial's Issues

Envoy initializer failed to start

It was reporting

root@k8s001:~/cases/kubernetes-initializer-tutorial# docker ps -a | grep envo
51613484f624        gcr.io/hightowerlabs/envoy-initializer@sha256:e2e2d5b6b9e888c102aa9c015db1624aa2165407690199b5c8aae650ce4e2b75                "/envoy-initializer"     3 seconds ago       Exited (1) 2 seconds ago                       k8s_envoy-initializer_envoy-initializer-1254595018-5llvp_default_1bc4e488-8705-11e7-8884-08002759511a_2
b624320910ba        gcr.io/google_containers/pause-amd64:3.0                                                                                      "/pause"                 45 seconds ago      Up 44 seconds                                  k8s_POD_envoy-initializer-1254595018-5llvp_default_1bc4e488-8705-11e7-8884-08002759511a_0
root@k8s001:~/cases/kubernetes-initializer-tutorial# docker logs 51613484f624
2017/08/22 06:43:29 Starting the Kubernetes initializer...
2017/08/22 06:43:29 Initializer name set to: envoy.initializer.kubernetes.io
2017/08/22 06:43:29 configmaps "envoy-initializer" is forbidden: User "system:serviceaccount:default:default" cannot get configmaps in the namespace "default".

Can anyone help check what is wrong? Thanks!

Build for Envoy-initializer Docker image is failing

Hello,
i am tring to build the envoy-initializer image , but getting failed. multiple times with different git packages commit i tried.
below is the Gopkg.tmpl content:-

#[[constraint]]

name = "github.com/ghodss/yaml"

version = "1.0.0"

#[[constraint]]

branch = "master"

name = "k8s.io/api"

#[[constraint]]

name = "k8s.io/client-go"

version = "4.0.0"

#[[override]]

name = "k8s.io/apimachinery"

branch = master

revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"

#[[override]]

name = "k8s.io/kubernetes"

version = "1.7.5"

#revision = "68f123dfa036bef57495f014a78144a9a1b517ca"

[[constraint]]
name = "github.com/ghodss/yaml"
version = "1.0.0"

[[override]]
name = "k8s.io/api"
revision = "4d5cc6efc5e84aa19fb1bd3f911c16a6723c1bb7"

[[override]]
name = "k8s.io/client-go"
revision = "1850dd66e4213a26bd70d0b85fee4176d324b845"

[[override]]
name = "k8s.io/apimachinery"
revision = "a13245d02534abe88286859b547d041816f9a3f4"

[[override]]
name = "k8s.io/kubernetes"
version = "1.7.5"

[[override]]
name = "k8s.io/apiextensions-apiserver"
revision = "6d8c23d2e66ce61e2a7e34f92e8eb3eec13279fa"

issue:-

kubernetes-initializer-tutorial/vendor/k8s.io/api/authentication/v1

../vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go:61:15: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)

kubernetes-initializer-tutorial/vendor/k8s.io/api/storage/v1

../vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go:53:15: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)

kubernetes-initializer-tutorial/vendor/k8s.io/api/authentication/v1beta1

../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:120:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:122:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:132:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:145:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:147:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:172:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authentication/v1beta1/types.generated.go:172:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/admissionregistration/v1alpha1

../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:120:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:122:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:132:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:145:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:147:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:172:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/admissionregistration/v1alpha1/types.generated.go:172:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/certificates/v1beta1

../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:96:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:104:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:108:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:121:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:123:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:133:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:146:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:148:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:158:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:173:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/certificates/v1beta1/types.generated.go:173:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/authorization/v1beta1

../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:120:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:122:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:132:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:145:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:147:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:172:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1beta1/types.generated.go:172:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/authorization/v1

../vendor/k8s.io/api/authorization/v1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/authorization/v1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/authorization/v1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:120:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:122:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:132:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:145:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:147:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:172:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/authorization/v1/types.generated.go:172:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/policy/v1beta1

../vendor/k8s.io/api/policy/v1beta1/types.generated.go:96:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:104:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:108:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:128:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:130:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:147:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:165:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:167:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:182:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:202:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/policy/v1beta1/types.generated.go:202:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/rbac/v1alpha1

../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:115:26: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:119:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:121:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:129:26: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:134:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:143:27: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:151:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1alpha1/types.generated.go:151:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/rbac/v1beta1

../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:115:26: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:119:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:121:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:129:26: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:134:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:143:27: too many arguments in call to z.F.EncSliceStringV
have ([]string, bool, *codec.Encoder)
want ([]string, *codec.Encoder)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:151:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/rbac/v1beta1/types.generated.go:151:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/storage/v1beta1

../vendor/k8s.io/api/storage/v1beta1/types.generated.go:95:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:103:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:107:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:120:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:122:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:132:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:145:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:147:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:157:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:172:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/storage/v1beta1/types.generated.go:172:7: too many errors

kubernetes-initializer-tutorial/vendor/k8s.io/api/core/v1

../vendor/k8s.io/api/core/v1/types.generated.go:113:6: r.EncodeArrayStart undefined (type codec.genHelperEncDriver has no field or method EncodeArrayStart)
../vendor/k8s.io/api/core/v1/types.generated.go:121:6: r.EncodeMapStart undefined (type codec.genHelperEncDriver has no field or method EncodeMapStart)
../vendor/k8s.io/api/core/v1/types.generated.go:125:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:138:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:140:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:150:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:163:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:165:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:175:6: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:188:7: z.EncSendContainerState undefined (type codec.genHelperEncoder has no field or method EncSendContainerState)
../vendor/k8s.io/api/core/v1/types.generated.go:188:7: too many errors

Please share with me working Gopkg.tmpl.

Thanks In advance.

Cannot set initializers on deployment, resulting in deadlock

In the best practices, it says:

Initializers should explicitly set the list of pending initializers to exclude itself, or to an empty array, to avoid getting stuck waiting to initialize. Examples:

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  initializers:
    pending:
      - initializer.vaultproject.io
      # Do not include the Envoy Initializer
      # - envoy.initializer.kubernetes.io
  name: envoy-initializer

However, it seems that's not allowed:

From what I can tell, this only works if you deploy the controller before the initializer config (which is echoed in the documentation). However, this is The Cloud™️, so eventually things will be redeployed from scratch, or the deployment will disappear and have to be reprovisioned, etc.

Is there a way of avoiding this deadlock without building orchestration around the order of deployments?

Can't deploy envoy-initializer in minikube: metadata.initializers.pending: Invalid value: "null"

I'm running minikube with 1.7.0 Kubernetes -

kubernetes-initializer-tutorial[master]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T20:33:11Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-07-26T00:12:31Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

It has the initializers feature turned on -

kubernetes-initializer-tutorial[master]$ kubectl api-versions
admissionregistration.k8s.io/v1alpha1
apiextensions.k8s.io/v1beta1
apiregistration.k8s.io/v1beta1
apps/v1beta1
authentication.k8s.io/v1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1
authorization.k8s.io/v1beta1
autoscaling/v1
autoscaling/v2alpha1
batch/v1
batch/v2alpha1
certificates.k8s.io/v1beta1
extensions/v1beta1
istio.io/v1alpha1
networking.k8s.io/v1
policy/v1beta1
rbac.authorization.k8s.io/v1alpha1
rbac.authorization.k8s.io/v1beta1
settings.k8s.io/v1alpha1
storage.k8s.io/v1
storage.k8s.io/v1beta1
v1

but when I try to deploy the initializer I get the following:

kubernetes-initializer-tutorial[master]$ kubectl apply -f deployments/envoy-initializer.yaml
The Deployment "envoy-initializer" is invalid: metadata.initializers.pending: Invalid value: "null": must be non-empty when result is not set

Error from server (BadRequest)

I am trying to reproduce the tutorial on a GKE instance. I created a gke instance
gcloud alpha container clusters create k0
--enable-kubernetes-alpha
--cluster-version 1.8.6-gke.0

and everything works until after I create the envoy-initializer InitializerConfiguration

I delete helloworld and then recreate it and get the following error in the logs
[jmcdowall@jed102 kubernetes-initializer-tutorial]$ kubectl logs helloworld-796999b9bd-hz2mv
Error from server (BadRequest): a container name must be specified for pod helloworld-796999b9bd-hz2mv, choose one of: [helloworld envoy]

I am fairly new to Kubernetes so I could be missing something obvious. Any help would be appreciated.

Question on initializer logic

I'm trying to write an unrelated initializer for pods and looked to your really clean code to figure out the bits that need to be handled. Fair warning: I'm pretty new to the k8s API so my question may be nonsensical.

Given that the processing in the envoy initializer happens only when that initializer is the first element in the pending list, and that you are only using AddFunc to fixup the deployment, what would happen if there was a different initializer that needed to be run before the envoy one?

Seems to me that UpdateFunc should also be set to update the deployment for these cases?
What am I missing here?

build enoy-initializer image error

When I build enoy-initializer image, I have encounter the follow exceptions:

./build
# kubernetes-initializer-tutorial/envoy-initializer
./main.go:98:11: options.IncludeUninitialized undefined (type "kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions has no field or method IncludeUninitialized)
./main.go:102:11: options.IncludeUninitialized undefined (type "kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions has no field or method IncludeUninitialized)
./main.go:138:33: "kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/apimachinery/pkg/runtime".NewScheme().DeepCopy undefined (type *"kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/apimachinery/pkg/runtime".Scheme has no field or method DeepCopy)

My Go Version is: go version go1.12.1 darwin/amd64

Errors while compiling

Hey Kelsey! Thanks for the example.

I'm pretty new to Golang, and I can't even compile this. I first fetch the dependencies, and then try to compile. Here are my steps

$ dep init
  Using master as constraint for direct dep k8s.io/api
  Locking in master (c0bcfdc) for direct dep k8s.io/api
  Using ^1.0.0 as constraint for direct dep github.com/ghodss/yaml
  Locking in v1.0.0 (0ca9ea5) for direct dep github.com/ghodss/yaml
  Locking in v2 (3f83fa5) for transitive dep gopkg.in/mgo.v2
  Locking in v2.6.2 (48294d9) for transitive dep github.com/docker/distribution
  Locking in master (0a025b7) for transitive dep github.com/hashicorp/golang-lru
  Locking in v2 (eb3733d) for transitive dep gopkg.in/yaml.v2
  Using master as constraint for direct dep k8s.io/apimachinery
  Locking in master (dc1f89a) for direct dep k8s.io/apimachinery
  Locking in master (779f453) for transitive dep github.com/go-openapi/jsonpointer
  Locking in v0.4 (100ba4e) for transitive dep github.com/gogo/protobuf
  Locking in master (66aacef) for transitive dep golang.org/x/net
  Locking in master (18c65dd) for transitive dep golang.org/x/text
  Locking in master (610b6ca) for transitive dep github.com/go-openapi/strfmt
  Locking in master (8c0409f) for transitive dep github.com/ugorji/go
  Locking in master (23def4e) for transitive dep github.com/golang/glog
  Locking in master (24818f7) for transitive dep github.com/google/gofuzz
  Locking in master (03cfca6) for transitive dep github.com/go-openapi/errors
  Locking in v0.9.0 (3887ee9) for transitive dep gopkg.in/inf.v0
  Locking in master (36d33bf) for transitive dep github.com/go-openapi/jsonreference
  Locking in v1.1.0 (346938d) for transitive dep github.com/davecgh/go-spew
  Locking in master (a80dea3) for transitive dep github.com/go-openapi/loads
  Locking in v1.0.0 (e57e3ee) for transitive dep github.com/spf13/pflag
  Locking in master (de5bf2a) for transitive dep github.com/PuerkitoBio/urlesc
  Locking in v2.2.1 (68c9750) for transitive dep github.com/emicklei/go-restful
  Locking in master (8ed83f2) for transitive dep github.com/go-openapi/analysis
  Locking in master (d0303fe) for transitive dep github.com/mitchellh/mapstructure
  Locking in v6 (4918b99) for transitive dep github.com/asaskevich/govalidator
  Locking in master (3faa005) for transitive dep github.com/go-openapi/spec
  Locking in master (f3f9494) for transitive dep github.com/go-openapi/swag
  Locking in master (3b3bbef) for transitive dep github.com/mailru/easyjson
  Using ^4.0.0 as constraint for direct dep k8s.io/client-go
  Locking in v4.0.0 (d92e849) for direct dep k8s.io/client-go
  Locking in 1.0.1 (dcef7f5) for transitive dep github.com/emicklei/go-restful-swagger12
  Locking in master (5b9ff86) for transitive dep github.com/juju/ratelimit
  Locking in v1.1.0 (0bcb03f) for transitive dep github.com/PuerkitoBio/purell

$ GOOS=linux go build -a --ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo -o envoy-initializer .
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/tools/clientcmd/api
vendor/k8s.io/client-go/tools/clientcmd/api/register.go:35:11: cannot use Config literal (type *Config) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Config does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/admissionregistration
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:47:29: cannot use InitializerConfiguration literal (type *InitializerConfiguration) as type runtime.Object in argument to scheme.AddKnownTypes:
	*InitializerConfiguration does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:48:33: cannot use InitializerConfigurationList literal (type *InitializerConfigurationList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*InitializerConfigurationList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:49:39: cannot use ExternalAdmissionHookConfiguration literal (type *ExternalAdmissionHookConfiguration) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ExternalAdmissionHookConfiguration does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:50:43: cannot use ExternalAdmissionHookConfigurationList literal (type *ExternalAdmissionHookConfigurationList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ExternalAdmissionHookConfigurationList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/authentication
vendor/k8s.io/client-go/pkg/apis/authentication/register.go:47:16: cannot use TokenReview literal (type *TokenReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*TokenReview does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/authorization
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:47:28: cannot use SelfSubjectAccessReview literal (type *SelfSubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*SelfSubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:48:24: cannot use SubjectAccessReview literal (type *SubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*SubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:49:29: cannot use LocalSubjectAccessReview literal (type *LocalSubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*LocalSubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/policy
vendor/k8s.io/client-go/pkg/apis/policy/register.go:49:24: cannot use PodDisruptionBudget literal (type *PodDisruptionBudget) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodDisruptionBudget does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/register.go:50:28: cannot use PodDisruptionBudgetList literal (type *PodDisruptionBudgetList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodDisruptionBudgetList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/register.go:51:13: cannot use Eviction literal (type *Eviction) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Eviction does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go:148:17: cannot use val.DeepCopy() (type *v1.Time) as type v1.Time in assignment
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/certificates
vendor/k8s.io/client-go/pkg/apis/certificates/register.go:48:30: cannot use CertificateSigningRequest literal (type *CertificateSigningRequest) as type runtime.Object in argument to scheme.AddKnownTypes:
	*CertificateSigningRequest does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/certificates/register.go:49:34: cannot use CertificateSigningRequestList literal (type *CertificateSigningRequestList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*CertificateSigningRequestList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go:73:22: cannot use in.LastUpdateTime.DeepCopy() (type *v1.Time) as type v1.Time in assignment
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/storage
vendor/k8s.io/client-go/pkg/apis/storage/register.go:47:17: cannot use StorageClass literal (type *StorageClass) as type runtime.Object in argument to scheme.AddKnownTypes:
	*StorageClass does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/storage/register.go:48:21: cannot use StorageClassList literal (type *StorageClassList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*StorageClassList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/rbac
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:47:9: cannot use Role literal (type *Role) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Role does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:48:16: cannot use RoleBinding literal (type *RoleBinding) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleBinding does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:49:20: cannot use RoleBindingList literal (type *RoleBindingList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleBindingList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:50:13: cannot use RoleList literal (type *RoleList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:52:16: cannot use ClusterRole literal (type *ClusterRole) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRole does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:53:23: cannot use ClusterRoleBinding literal (type *ClusterRoleBinding) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleBinding does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:54:27: cannot use ClusterRoleBindingList literal (type *ClusterRoleBindingList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleBindingList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:55:20: cannot use ClusterRoleList literal (type *ClusterRoleList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/api
vendor/k8s.io/client-go/pkg/api/register.go:76:8: cannot use Pod literal (type *Pod) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Pod does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:77:12: cannot use PodList literal (type *PodList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:78:20: cannot use PodStatusResult literal (type *PodStatusResult) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodStatusResult does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:79:16: cannot use PodTemplate literal (type *PodTemplate) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplate does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:80:20: cannot use PodTemplateList literal (type *PodTemplateList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplateList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:81:30: cannot use ReplicationControllerList literal (type *ReplicationControllerList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationControllerList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:82:26: cannot use ReplicationController literal (type *ReplicationController) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationController does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:83:16: cannot use ServiceList literal (type *ServiceList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:84:12: cannot use Service literal (type *Service) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Service does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:85:24: cannot use ServiceProxyOptions literal (type *ServiceProxyOptions) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceProxyOptions does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:85:24: too many errors

What am I missing? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.