大三角帆无法与kubernetes集群通信

时间:2019-07-30 13:01:36

标签: kubernetes minikube spinnaker

我正在尝试使用minikube和minio在本地部署大三角帆,我已经完成了所有设置,我的kubernetes集群已经启动并正在运行并带有组合应用程序,详细信息如下:


|          NAME             | READY | UP-TO-DATE | AVAILABLE | AGE |
|---------------------------|-------|------------|-----------|-----|
| deployment.extensions/api |  1/1  |      1     |     1     | 18s |
| deployment.extensions/db  |  1/1  |      1     |     1     | 18s |

我在hal config上配置了我的kubernetes和存储,我也将其粘贴在下面,当我尝试使用“ sudo hal deploy apply”进行部署时,出现以下错误:

  
      
  • 警告您尚未在halconfig中指定Kubernetes上下文,Spinnaker将改为使用“ minikube”。 ?我们推荐   在halconfig中显式设置上下文,以确保更改   您的kubeconfig不会破坏您的部署。
  •   
     

!错误:无法与您的Kubernetes集群通信:错误   已经发生了.. ?无法通过您的Kubernetes集群进行身份验证。   尝试使用kubectl来验证您的凭据。

     

default.security中的问题:

     
      
  • 警告即使您的Spinnaker部署是服务器上的分布式部署,您的UI或API域也没有设置替代基本URL。   远程云提供商。因此,您将需要打开SSH隧道   反对访问Spinnaker的部署。 ?我们建议您   而是配置身份验证机制(OAuth2,SAML2或   x509),以便更轻松地安全访问Spinnaker,然后   注册您打算公开的预期域和IP地址   面向服务将被使用。

  •   
  • 无法准备Spinnaker部署

  •   

这是我的hal配置:

currentDeployment: default
deploymentConfigurations:
- name: default
  version: ''
  providers:
    appengine:
      enabled: false
      accounts: []
    aws:
      enabled: false
      accounts: []
      bakeryDefaults:
        baseImages: []
      defaultKeyPairTemplate: '{{name}}-keypair'
      defaultRegions:
      - name: us-west-2
      defaults:
        iamRole: BaseIAMRole
    ecs:
      enabled: false
      accounts: []
    azure:
      enabled: false
      accounts: []
      bakeryDefaults:
        templateFile: azure-linux.json
        baseImages: []
    dcos:
      enabled: false
      accounts: []
      clusters: []
    dockerRegistry:
      enabled: true
      accounts:
      - name: my-docker-registry
        requiredGroupMembership: []
        providerVersion: V1
        permissions: {}
        address: https://index.docker.io
        username: <sensitive> (this is my actual username)
        password: <sensitive> (this is my actual password)
        email: fake.email@spinnaker.io
        cacheIntervalSeconds: 30
        clientTimeoutMillis: 60000
        cacheThreads: 1
        paginateSize: 100
        sortTagsByDate: false
        trackDigests: false
        insecureRegistry: false
        repositories:
        - ericstoppel1/atixlabs
      primaryAccount: my-docker-registry
    google:
      enabled: false
      accounts: []
      bakeryDefaults:
        templateFile: gce.json
        baseImages: []
        zone: us-central1-f
        network: default
        useInternalIp: false
    kubernetes:
      enabled: true
      accounts:
      - name: my-k8s-account
        requiredGroupMembership: []
        providerVersion: V1
        permissions: {}
        dockerRegistries:
        - accountName: my-docker-registry
          namespaces: []
        configureImagePullSecrets: true
        cacheThreads: 1
        namespaces: []
        omitNamespaces: []
        kinds: []
        omitKinds: []
        customResources: []
        cachingPolicies: []
        kubeconfigFile: /home/osboxes/.kube/config
        oAuthScopes: []
        onlySpinnakerManaged: false
      primaryAccount: my-k8s-account
    oracle:
      enabled: false
      accounts: []
      bakeryDefaults:
        templateFile: oci.json
        baseImages: []
    cloudfoundry:
      enabled: false
      accounts: []
  deploymentEnvironment:
    size: SMALL
    type: Distributed
    accountName: my-k8s-account
    updateVersions: true
    consul:
      enabled: false
    vault:
      enabled: false
    customSizing: {}
    sidecars: {}
    initContainers: {}
    hostAliases: {}
    affinity: {}
    nodeSelectors: {}
    gitConfig:
      upstreamUser: spinnaker
    livenessProbeConfig:
      enabled: false
    haServices:
      clouddriver:
        enabled: false
        disableClouddriverRoDeck: false
      echo:
        enabled: false
  persistentStorage:
    persistentStoreType: s3
    azs: {}
    gcs:
      rootFolder: front50
    redis: {}
    s3:
      bucket: spin-763f86d5-10ba-497e-9348-264fc353edec
      rootFolder: front50
      pathStyleAccess: false
      endpoint: https://localhost:9001
      accessKeyId: AKIAIOSFODNN7EXAMPLE
      secretAccessKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    oracle: {}
  features:
    auth: false
    fiat: false
    chaos: false
    entityTags: false
    jobs: false
  metricStores:
    datadog:
      enabled: false
      tags: []
    prometheus:
      enabled: false
      add_source_metalabels: true
    stackdriver:
      enabled: false
    period: 30
    enabled: false
  notifications:
    slack:
      enabled: false
    twilio:
      enabled: false
      baseUrl: https://api.twilio.com/
  timezone: America/Los_Angeles
  ci:
    jenkins:
      enabled: false
      masters: []
    travis:
      enabled: false
      masters: []
    wercker:
      enabled: false
      masters: []
    concourse:
      enabled: false
      masters: []
    gcb:
      enabled: false
      accounts: []
  repository:
    artifactory:
      enabled: false
      searches: []
  security:
    apiSecurity:
      ssl:
        enabled: false
    uiSecurity:
      ssl:
        enabled: false
    authn:
      oauth2:
        enabled: false
        client: {}
        resource: {}
        userInfoMapping: {}
      saml:
        enabled: false
        userAttributeMapping: {}
      ldap:
        enabled: false
      x509:
        enabled: false
      iap:
        enabled: false
      enabled: false
    authz:
      groupMembership:
        service: EXTERNAL
        google:
          roleProviderType: GOOGLE
        github:
          roleProviderType: GITHUB
        file:
          roleProviderType: FILE
        ldap:
          roleProviderType: LDAP
      enabled: false
  artifacts:
    bitbucket:
      enabled: false
      accounts: []
    gcs:
      enabled: false
      accounts: []
    oracle:
      enabled: false
      accounts: []
    github:
      enabled: false
      accounts: []
    gitlab:
      enabled: false
      accounts: []
    http:
      enabled: false
      accounts: []
    helm:
      enabled: false
      accounts: []
    s3:
      enabled: false
      accounts: []
    maven:
      enabled: false
      accounts: []
    templates: []
  pubsub:
    enabled: false
    google:
      enabled: false
      pubsubType: GOOGLE
      subscriptions: []
      publishers: []
  canary:
    enabled: false
    serviceIntegrations:
    - name: google
      enabled: false
      accounts: []
      gcsEnabled: false
      stackdriverEnabled: false
    - name: prometheus
      enabled: false
      accounts: []
    - name: datadog
      enabled: false
      accounts: []
    - name: signalfx
      enabled: false
      accounts: []
    - name: aws
      enabled: false
      accounts: []
      s3Enabled: false
    reduxLoggerEnabled: true
    defaultJudge: NetflixACAJudge-v1.0
    stagesEnabled: true
    templatesEnabled: true
    showAllConfigsEnabled: true
  webhook:
    trust:
      enabled: false

我有我的kubernetes配置,可以访问它,所以,单独看来一切正常,可能是什么问题?

2 个答案:

答案 0 :(得分:0)

根据所报告的问题:

  

警告您尚未在halconfig中指定Kubernetes上下文,   大三角帆将改为使用“ minikube”。

在您的hal配置中没有定义任何Kuberenetes context条目,请从Spinnaker指南文档中找到here专用章节。

答案 1 :(得分:0)

尝试将kubernetes详细信息添加到吊索上下文中。

hal config provider kubernetes account add <ACCOUNT>
hal config provider kubernetes enable

此链接可用于参考:https://www.spinnaker.io/reference/halyard/commands/