惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
量子位
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园 - 聂微东
美团技术团队
Last Week in AI
Last Week in AI
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
V
Visual Studio Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog

Nik Ogura

The Digital Plumber | Nik Ogura Chasing Nines | Nik Ogura Writing for Generation Ships | Nik Ogura nikogura.com Load-Bearing Humans | Nik Ogura Your Hiring Pipeline Has the Same Bug as Your Deploy Pipeline | Nik Ogura Nice People Who Give Us Money | Nik Ogura Gambling on Failure | Nik Ogura DDCRI: Declarative, Deterministic, Continuously Reconciling Infrastructure | Nik Ogura Stop Holding Out for a Hero | Nik Ogura Don't Paint Yourself Into a Corner | Nik Ogura Most Infrastructure as Code Is Broken — and Reconciliation Is Only Half the Reason | Nik Ogura Continuous Acceptance Tests | Nik Ogura There's More Than One Way to Get Observability Right | Nik Ogura Put Dex In Front of Google OAuth | Nik Ogura Incident Management | Nik Ogura C-Style Thinking vs Go-Style Thinking | Nik Ogura 'Can' vs 'Does' | Nik Ogura Control Repositories | Nik Ogura Trunk-Based Development | Nik Ogura Web3 Is Just Infrastructure With a Hoodie | Nik Ogura "Design Me a Highly Resilient Database" | Nik Ogura Security Is Infrastructure | Nik Ogura Metrics, Logs, Traces, and Events: What's Actually Different | Nik Ogura Distributed Tracing: A Practical Guide | Nik Ogura Prometheus and OpenTelemetry: How They Fit Together | Nik Ogura Puppets and Octopi: Why Top-Down Orchestration Hits a Wall | Nik Ogura The Best Dog Trainer in the World - Or Why Getting Better Isn't Helping | Nik Ogura FluxCD vs ArgoCD: Architectural Comparison | Nik Ogura GitOps | Nik Ogura
Vault Operator Notes | Nik Ogura
2020-10-21 · via Nik Ogura
  • Namespace level resource that can reach other namespaces if RBAC is so configured.

  • Vault Operator CRD will not create if it’s rbac is not configured. Pods won’t even start. Operator pod shows no errors. Very confusing.

  • Vault instance (by default) consists of a stateful set, a PVC (and PV of course) and a secret holding the unseal keys. All 3 must be deleted to nuke and pave the vault instance.

Secrets

Operator creates the following secrets:

  • vault-operator-token-

  • vault-token-

Both are K8s service account tokens. They appear to be independent of vault instances, though are used to connect to vault instances.

Auth Test

Run the following. (assumes port forwarding is set up)

VAULT_ADDR=http://localhost:8200 vault write auth/kubernetes/login role=default jwt=$(k get secret $(k get secret | grep vault-token | awk '{print $1}')  -o json | jq -r .data.token | base64 -D)

Nuke and Pave

k delete vault <name>

k delete pvc vault-file

k delete secret vault-unseal-keys

Cert Manager

Cert Manager has to be installed separately of course. Then you need an issuer for it to use vault.

Example issuer:

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: vault
  namespace: default
spec:
  vault:
    path: pki/sign/default
    server: http://vault.default.svc.cluster.local:8200
    caBundle: (output of `curl http://localhost:8200/v1/pki/ca/pem | base64`)
    auth:
      kubernetes:
        role: default
        mountPath: /v1/auth/kubernetes
        secretRef:
          name: (output of `k get secret | grep vault-token | awk '{print $1}'`)
          key: token

The problem, of course, is that this resource cannot be created until the vault instance is up and running. It would be amazing if we could get this included into the vault-operator.

In the meantime, I’ll probably do some sort of a Job that no-ops until it gets something back from those two calls, and then creates the resource.

You can, however, pre create the certificate before the issuer exists. It will sit in an unready state until you create the issuer. This means we can probably cheaply script the resource creation.