kubernetes

namespace

namespace

quota

sa.yml

generate credentials for pfx

ca.crt

client.crt & client.key

cert.pfx

full steps

configure in jenkins

[!NOTE]

  • url

    • by default: http://<service-name>.<namespace>.svc.cluster.local:8080

  • Manage Jenkins -> Configure System or Manage Jenkins -> Manage Nodes and Clouds -> Configure Clouds

  • Add a new Cloud -> Kuberentes

    • Name:

    • Kubernetes URL:

      • get from $ kubectl cluster-info

      • using https://kubernetes.default.svc.cluster.local

    • Kubernetes server certificate key: content of ca.crt. ($ cat ca.crt)

    • Credentials:

      • Add -> Jenkins

      • Kind: Certificate

    plugin-1
    plugin-2
    plugin-3
    plugin-4
  • setup in jenkins

    plugin-5

using kubeconfig for remote cluster credential

get Kubernetes URL

generate CA

the content can be also found in kubernetes-master:/etc/kubernetes/pki/ca.crt

  • or

Generate token in kubernetes

  • setup sa

  • get token

setup in Jenkins

  • credential setup kubeconfig cloud credential

  • cloud setup kubeconfig cloud setup

using ClusterRoleBinding

[!TIP] simplely it can be executed via commands:

[!NOTE]: <role-binding-name> can be the same as <service-account>

pull with credentials

[!NOTE|label:references:]

  • in kubernetes

  • copy secrets to all namespaces

  • in podTemplate

Q&A

[!NOTE]

  • thinking

Last updated

Was this helpful?