aws-encryption-provider icon indicating copy to clipboard operation
aws-encryption-provider copied to clipboard

Instructions provided in KOPS.md are no longer valid for kops 1.22

Open minkimipt opened this issue 3 years ago • 6 comments

What happened:

After upgrading kops from 1.21 to 1.22 kube-apiserver pod kept failing to start on a new master node that kops replaced while it was doing its rolling upgrade. Here are the logs from the pod:

[-]kms-provider-0 failed: failed to perform encrypt section of the healthz check for KMS Provider aws-encryption-provider, error: failed get version from remote KMS provider: rpc error: code = DeadlineExceeded desc = latest balancer error: connection error: desc = "transport: Error while dialing dial unix /srv/kubernetes/socket.sock: connect: no such file or directory"
I0209 21:45:24.523850       1 healthz.go:243] healthz check failed: kms-provider-0
[-]kms-provider-0 failed: failed get version from remote KMS provider: rpc error: code = DeadlineExceeded desc = latest balancer error: connection error: desc = "transport: Error while dialing dial unix /srv/kubernetes/socket.sock: connect: no such file or directory"

Turns out that starting from kops 1.22 /srv/kubernetes is no longer mounted in the kube-apiserver and kube-controller-manager Pods.

Aws-encryption-provider explaining bootstrap procedure for kops provides configuration that works for kops versions before 1.22, but it is not working for kops 1.22.

What you expected to happen:

A note explaining how this configuration needs to be changed depending on kops version is needed in KOPS.md document.

How to reproduce it (as minimally and precisely as possible):

Install aws-encryption-provider using the current procedure described in KOPS.md and kops 1.22

Anything else we need to know?:

These changes to encryption-config.yaml:

--- a/kubernetes/k8s-secrets-encryption-config.yaml
+++ b/kubernetes/k8s-secrets-encryption-config.yaml
@@ -6,7 +6,7 @@ resources:
     providers:
       - kms:
           name: aws-encryption-provider
-          endpoint: unix:///srv/kubernetes/socket.sock
+          endpoint: unix:///srv/kubernetes/kube-apiserver/socket.sock
           cachesize: 1000
           timeout: 3s
       - identity: {}

and cluster.yaml

--- a/aws/kops/templates/cluster.yaml
+++ b/aws/kops/templates/cluster.yaml
@@ -178,7 +178,7 @@ spec:
             - /aws-encryption-provider
             - -key={{.tf.k8s_secrets_kms_key_arn}}
             - -region={{.region}}
-            - -listen=/srv/kubernetes/socket.sock
+            - -listen=/srv/kubernetes/kube-apiserver/socket.sock
             - -health-port=:8083
             ports:
             - containerPort: 8083
@@ -188,13 +188,13 @@ spec:
                 path: /healthz
                 port: 8083
             volumeMounts:
-            - mountPath: /srv/kubernetes
+            - mountPath: /srv/kubernetes/kube-apiserver
               name: kmsplugin
           hostNetwork: true
           priorityClassName: system-cluster-critical
           volumes:
           - name: kmsplugin
             hostPath:
-              path: /srv/kubernetes
+              path: /srv/kubernetes/kube-apiserver
               type: DirectoryOrCreate

seem to fix it

Environment:

  • Kubernetes version (use kubectl version):
  • Encryption provider plugin version:
  • Cloud provider configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

minkimipt avatar Feb 10 '22 09:02 minkimipt

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 11 '22 11:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 10 '22 12:06 k8s-triage-robot

/remove-lifecycle rotten

ngraef avatar Jun 12 '22 13:06 ngraef

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 10 '22 13:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 10 '22 13:10 k8s-triage-robot

/remove-lifecycle rotten

ngraef avatar Oct 10 '22 14:10 ngraef

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 08 '23 14:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 07 '23 15:02 k8s-triage-robot

/remove-lifecycle rotten

ngraef avatar Feb 07 '23 19:02 ngraef

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 08 '23 19:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 07 '23 20:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Jul 07 '23 20:07 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jul 07 '23 20:07 k8s-ci-robot