Closed pawel-powroznik closed 3 years ago
kOps no longer uses /srv/kubernetes/server.key
as the service account signing key. The key in that file is now different for each control plane node. Why are you overriding those settings like that?
I used this key for ServiceAccountTokenVolumeProjection feature which is required to install Istio. https://github.com/istio/istio/issues/17378#issuecomment-594366491
This was working with k8s 1.18 and 1.19.
That information is out of date. See https://kops.sigs.k8s.io/operations/service_account_token_volumes
I think those docs may also be a little bit out of date.
kOps 1.20+ will set the issuer settings correctly by default. When istio uses ServiceAccountTokenVolumeProjection, I assume it sets the correct audience on the projected token directly as well. So removing those API server settings will most likely make things work properly.
I can confirm that kops 1.20.1 sets Service Account Token Volume Projection by default, without any custom kubeapi settings. This issue can be closed. Probably below docs need to be updated: https://kops.sigs.k8s.io/operations/service_account_token_volumes/
Just to confirm, you are not setting any custom audience either (istio-ca), right?
yes, I do not have any custom kubeapi settings. Only defaults created by running below command:
kops create cluster -v 10 \
--zones us-west-2a \
--name ${NAME} \
--kubernetes-version $VERSION \
--authorization RBAC \
--ssh-public-key <CERT> \
--admin-access $my_ip/32 \
--node-size m5.4xlarge \
--master-size t3.2xlarge \
--node-count 4 \
--networking calico \
--bastion \
--topology private \
1. What
kops
version are you running? The commandkops version
, will display this information. ❯ kops version Version 1.20.1 (git-5a27dad40a703f646433595a2a40cf94a0c43cd5)2. What Kubernetes version are you running?
kubectl version
will print the version if a cluster is running or provide the Kubernetes version specified as akops
flag.ubuntu@ip-172-20-38-9:/etc/kubernetes/manifests$ kubectl version Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:40:09Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
3. What cloud provider are you using? AWS
4. What commands did you run? What is the simplest way to reproduce this issue?
create new k8s cluster by running:
Add the config for ServiceAccountTokenVolumeProjection feature in Apiiserver
5. What happened after the commands executed? API server container could not start. K8s cluster not available.
After checking crio logs:
6. What did you expect to happen?
Apiserver should be up and running, cluster should be available
**7. Please provide your cluster manifest. Execute
8. Please run the commands with most verbose logging by adding the
-v 10
flag. Paste the logs into this report, or in a gist and provide the gist link here.9. Anything else do we need to know?
The workaround: Modify kube-apiserver yaml manifest:
Remove the following line:
Container should start then.