Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update automatic sidecar injection prerequisites for k8s 1.9 (AWS/Kops) #886

Closed
ayj opened this issue Jan 26, 2018 · 18 comments · Fixed by #958
Closed

Update automatic sidecar injection prerequisites for k8s 1.9 (AWS/Kops) #886

ayj opened this issue Jan 26, 2018 · 18 comments · Fixed by #958

Comments

@ayj
Copy link
Contributor

ayj commented Jan 26, 2018

https://istio.io/docs/setup/kubernetes/sidecar-injection.html#prerequisites for AWS/Kops need to be updated for k8s 1.9 to enable support for mutating webhooks.

$ kubectl api-versions | grep admissionregistration.k8s.io/v1beta1
admissionregistration.k8s.io/v1beta1

See https://archive.istio.io/v0.4/docs/setup/kubernetes/sidecar-injection#prerequisites for previous 0.4.0 doc version.

@ayj
Copy link
Contributor Author

ayj commented Jan 26, 2018

@jsenon, looks like you added the original aws/kops steps. Would you be able to update them for k8s 1.9 with admissionregistration.k8s.io/v1beta1 and MutatingWebhook plugin enabled?

@jsenon
Copy link
Member

jsenon commented Jan 26, 2018

@ayj sure. I will do

@mailtovivek87
Copy link

is there any existing document that we can use for setting up automatic sidecar injection with AWS/Kops and K8 1.9 ?

@jsenon
Copy link
Member

jsenon commented Feb 9, 2018 via email

@mailtovivek87
Copy link

Thanks ..

@jsenon
Copy link
Member

jsenon commented Feb 9, 2018

admissionregistration.k8s.io/v1beta1 is already configured with admission control when you deploy kubernetes 1.9.2 with kops:

--admission-control=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,ResourceQuota

Missing MutatingAdmissionWebhook,ValidatingAdmissionWebhook

Just notice that script install/kubernetes/webhook-create-signed-cert.sh to launch create CA is not in the repo when perform curl -L https://git.io/getLatestIstio | sh - referenced with issue #959

@jsenon
Copy link
Member

jsenon commented Feb 9, 2018

I've submit PR #958 for AWS automatic sidecar injection with aws using kops utility

@mailtovivek87
Copy link

mailtovivek87 commented Feb 14, 2018

@jsenon @ayj I have installed Kubectl 1.9 using KOPS 1.8 with below comands :

export KUBERNETES_VERSION=${KUBERNETES_VERSION:-https://storage.googleapis.com/kubernetes-release/release/v1.9.0/}

kops create cluster --cloud=aws --zones=ap-southeast-1a --name=kops.example.com --network-cidr=192.168.0.0/16 --dns-zone=example.com --master-zones=ap-southeast-1a --zones=ap-southeast-1a --master-size=t2.medium --node-size=t2.medium --node-count=1 --kubernetes-version $KUBERNETES_VERSION --yes

Which worked perfectly. After which I did steps mentioned in docs https://istio.io/docs/setup/kubernetes/sidecar-injection.html#aws-with-kops
After kops rolling-update cluster --yes, nodes are coming up but kubectl get nodes and kops get cluster is showing nodes as not ready.
Am I missing something here?

@jsenon
Copy link
Member

jsenon commented Feb 14, 2018

Hi @mailtovivek87, could you try with kubernetes version 1.9.2? find my kops create used for the docs:

kops create cluster  \
  --node-count 1 \
  --zones eu-central-1a \
  --master-zones eu-central-1a \
  --dns-zone=xxx \
  --node-size t2.medium \
  --master-size t2.small  \
  --topology private \
  --vpc=vpc-xxx \
  --networking flannel \
  --bastion  \
  --kubernetes-version=1.9.2 \
  --name=k8s-test.cloud \
  --cloud-labels "Contact=julien.senon" \
  --ssh-public-key ~/.ssh/mykey

@mailtovivek87
Copy link

Sure. Just want to confirm that after kops create cluster command, i can directly follow the steps mentioned https://istio.io/docs/setup/kubernetes/sidecar-injection.html#aws-with-kops, nothing in between. Right ?

@jsenon
Copy link
Member

jsenon commented Feb 14, 2018

Indeed, just notice that I don't I've launch with kops create --yes

@mailtovivek87
Copy link

Oh, so you didn't launched cluster. Just created a config first, updated it and then rolled out update to create cluster with updated settings.

@jsenon
Copy link
Member

jsenon commented Feb 14, 2018

indeed. I will try with:

  1. Create cluster
  2. Apply configuration
  3. Edit Cluster
  4. Rolling Update cluster

@jsenon
Copy link
Member

jsenon commented Feb 14, 2018

I was not able to reproduce your issue, with steps mention earlier

@mailtovivek87
Copy link

Still not able to apply changes. Steps i followed :

  • kops create cluster (KOPS 1.8 with Kubernetes 1.9.2)
  • kops edit cluster
  • kops update cluster --yes
  • kops rolling-update cluster --yes

After last step, KOPS launch new masters and nodes but only etcd R53 entry is updated and entries like api.example.com and api.internal.example.com still points to old ones (waited 30 min after rolling step). On manually updating api ip, nodes status shows Ready but master as Not Ready.

@jsenon
Copy link
Member

jsenon commented Feb 14, 2018

Perhaps have a look on Kubectl logs on master. AFAIK seems not an issue with istio but i can help you.

@mailtovivek87
Copy link

My bad, I missed out few admission controllers from the list and after adding those it worked perfectly for me.
Thanks @jsenon

@jsenon
Copy link
Member

jsenon commented Feb 15, 2018

Cool 👍 ! Thanks for this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants