I am trying to create a new cluster using the following command:
jx create cluster gke --ng
Simply try and create a new cluster using: jx create cluster gke --ng
Cluster should be fully provisioned. Full terminal output below.
Fails to provision cluster, seems that a mapConfig does not exist in the namespace expected.
> $ jx create cluster gke --ng --default-admin-password=Password1 -n sirjenkinsgitops
Using the only Google Cloud Project ci-demo-206601 to create the cluster
Updated property [core/project].
Let's ensure we have container and compute enabled on your project
No apis to enable
? Google Cloud Region (choose 'none' to make it zonal): none
? Google Cloud Zone: us-west1-a
? Google Cloud Machine Type: n1-standard-2
? Minimum number of Nodes (per zone) 3
? Maximum number of Nodes 5
? Would you like use preemptible VMs? No
No apis to enable
Creating cluster...
Initialising cluster ...
setting the dev namespace to: jx
Using helmBinary helm with feature flag: none
Storing the kubernetes provider gke in the TeamSettings
Enabling helm template mode in the TeamSettings
Git configured for user: SharePointOscar and email [email protected]
Trying to create ClusterRoleBinding me-sharepointoscar-com-cluster-admin-binding for role: cluster-admin for user [email protected]
clusterrolebindings.rbac.authorization.k8s.io "me-sharepointoscar-com-cluster-admin-binding" not found
Created ClusterRoleBinding me-sharepointoscar-com-cluster-admin-binding
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
? No existing ingress controller found in the kube-system namespace, shall we install one? Yes
Current configuration dir: /Users/sharepointoscar/.jx
versionRepository: https://github.com/jenkins-x/jenkins-x-versions
using stable version 1.3.1 from charts of stable/nginx-ingress from /Users/sharepointoscar/.jx/jenkins-x-versions
Installing using helm binary: helm
Fetched chart stable/nginx-ingress to dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/jxing/chartFiles/nginx-ingress
Generating Chart Template 'template --name jxing --namespace kube-system /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/jxing/chartFiles/nginx-ingress --output-dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/jxing/output --debug --set rbac.create=true --set controller.extraArgs.publish-service=kube-system/jxing-nginx-ingress-controller'
Applying generated chart stable/nginx-ingress YAML via kubectl in dir: /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/jxing/output
clusterrole.rbac.authorization.k8s.io/jxing-nginx-ingress created
clusterrolebinding.rbac.authorization.k8s.io/jxing-nginx-ingress created
configmap/jxing-nginx-ingress-controller created
deployment.extensions/jxing-nginx-ingress-controller created
service/jxing-nginx-ingress-controller created
deployment.extensions/jxing-nginx-ingress-default-backend created
service/jxing-nginx-ingress-default-backend created
role.rbac.authorization.k8s.io/jxing-nginx-ingress created
rolebinding.rbac.authorization.k8s.io/jxing-nginx-ingress created
serviceaccount/jxing-nginx-ingress created
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=jxing,jenkins.io/version!=1.3.1 from all pvc configmap release sa role rolebinding secret
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=jxing,jenkins.io/version!=1.3.1,jenkins.io/namespace=kube-system from clusterrole clusterrolebinding
Waiting for external loadbalancer to be created and update the nginx-ingress-controller service in kube-system namespace
Note: this loadbalancer will fail to be provisioned if you have insufficient quotas, this can happen easily on a GKE free account. To view quotas run: gcloud compute project-info describe
External loadbalancer created
Waiting to find the external host name of the ingress controller Service in namespace kube-system with name jxing-nginx-ingress-controller
You can now configure a wildcard DNS pointing to the new Load Balancer address 35.230.119.197
If you do not have a custom domain setup yet, Ingress rules will be set for magic DNS nip.io.
Once you have a custom domain ready, you can update with the command jx upgrade ingress --cluster
If you don't have a wildcard DNS setup then setup a DNS (A) record and point it at: 35.230.119.197 then use the DNS domain in the next input...
? Domain 35.230.119.197.nip.io
nginx ingress controller installed and configured
Installing vault-operator...
Current configuration dir: /Users/sharepointoscar/.jx
versionRepository:
using stable version 0.2.1 from charts of jenkins-x/vault-operator from /Users/sharepointoscar/.jx/jenkins-x-versions
Updating Helm repository...
Helm repository update done.
Namespace jx created
Fetched chart jenkins-x/vault-operator to dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/vault-operator/chartFiles/vault-operator
Generating Chart Template 'template --name vault-operator --namespace jx /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/vault-operator/chartFiles/vault-operator --output-dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/vault-operator/output --debug --set image.repository=banzaicloud/vault-operator --set image.tag=0.4.7 --set '
Applying generated chart jenkins-x/vault-operator YAML via kubectl in dir: /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/vault-operator/output
customresourcedefinition.apiextensions.k8s.io/vaults.vault.banzaicloud.com created
deployment.apps/vault-operator created
clusterrole.rbac.authorization.k8s.io/vault-operator created
clusterrolebinding.rbac.authorization.k8s.io/vault-operator created
serviceaccount/vault-operator created
service/vault-operator created
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=vault-operator,jenkins.io/version!=0.2.1 from all pvc configmap release sa role rolebinding secret
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=vault-operator,jenkins.io/version!=0.2.1,jenkins.io/namespace=jx from clusterrole clusterrolebinding
vault-operator addon succesfully installed.
could not find vault jx-vault-sirjenkinsgit in namespace jx due to: vaults.vault.banzaicloud.com "jx-vault-sirjenkinsgit" not found
Creating new system vault
could not find vault jx-vault-sirjenkinsgit in namespace jx due to: vaults.vault.banzaicloud.com "jx-vault-sirjenkinsgit" not found
Current Cluster: sirjenkinsgitops
Created service account jx-vault-sirjenkinsgit-auth-sa for Vault authentication
Updated property [core/project].
Creating GCP service account for Vault backend
Unable to find service account jx-vault-sirjenkinsgit-sa, checking if we have enough permission to create
Creating service account jx-vault-sirjenkinsgit-sa
Assigning role roles/storage.objectAdmin
Assigning role roles/cloudkms.admin
Assigning role roles/cloudkms.cryptoKeyEncrypterDecrypter
Downloading service account key
jx-vault-sirjenkinsgit-gcp-sa service account created
Setting up GCP KMS configuration
KMS Key jx-vault-sirjenkinsgit-key created in keying jx-vault-sirjenkinsgit-keyring
GCS bucket jx-vault-sirjenkinsgit-bucket was created for Vault backend
Creating Vault...
Vault jx-vault-sirjenkinsgit created in cluster sirjenkinsgitops
Exposing Vault...
? Expose type Ingress
? Domain: 35.230.119.197.nip.io
? UrlTemplate (press <Enter> to keep the current value):
? Using config values { 35.230.119.197.nip.io Ingress false}, ok? Yes
Current configuration dir: /Users/sharepointoscar/.jx
versionRepository:
using stable version 2.3.97 from charts of jenkins-x/exposecontroller from /Users/sharepointoscar/.jx/jenkins-x-versions
Updating Helm repository...
Helm repository update done.
Fetched chart jenkins-x/exposecontroller to dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/expose-pighot/chartFiles/exposecontroller
Generating Chart Template 'template --name expose-pighot --namespace jx /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/expose-pighot/chartFiles/exposecontroller --output-dir /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/expose-pighot/output --debug --set config.exposer=Ingress --set config.domain=35.230.119.197.nip.io --set config.tlsacme=false --set config.urltemplate= --set config.extravalues.services={jx-vault-sirjenkinsgit}'
Applying generated chart jenkins-x/exposecontroller YAML via kubectl in dir: /var/folders/c2/qf2pd13d4fs4jhsthhlf4gr40000gn/T/helm-template-workdir-360075002/expose-pighot/output
configmap/exposecontroller created
job.batch/exposecontroller created
role.rbac.authorization.k8s.io/exposecontroller created
rolebinding.rbac.authorization.k8s.io/exposecontroller created
serviceaccount/exposecontroller created
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=expose-pighot,jenkins.io/version!=2.3.97 from all pvc configmap release sa role rolebinding secret
Removing Kubernetes resources from older releases using selector: jenkins.io/chart-release=expose-pighot,jenkins.io/version!=2.3.97,jenkins.io/namespace=jx from clusterrole clusterrolebinding
Removing Kubernetes resources from release expose-pighot using selector: jenkins.io/chart-release=expose-pighot from all pvc configmap release sa role rolebinding secret
job.batch "exposecontroller" deleted
configmap "exposecontroller" deleted
serviceaccount "exposecontroller" deleted
role.rbac.authorization.k8s.io "exposecontroller" deleted
rolebinding.rbac.authorization.k8s.io "exposecontroller" deleted
Removing Kubernetes resources from release expose-pighot using selector: jenkins.io/chart-release=expose-pighot,jenkins.io/namespace=jx from clusterrole clusterrolebinding
Ingress rules recreated
Vault jx-vault-sirjenkinsgit exposed
System vault created named jx-vault-sirjenkinsgit in namespace jx.
Lets set up a Git user name and API token to be able to perform CI/CD
cannot find vault name as no ConfigMap jx-install-config in dev namespace default
ConfigMap jx-install-config in dev namespace default does not have key systemVaultName
could not find vault jx-vault-sirjenkinsgit in namespace default due to: vaults.vault.banzaicloud.com "jx-vault-sirjenkinsgit" not found
cannot find vault name as no ConfigMap jx-install-config in dev namespace default
ConfigMap jx-install-config in dev namespace default does not have key systemVaultName
goroutine 1 [running]:
runtime/debug.Stack(0xc000baa0b0, 0x3718ca0, 0x4675b40)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/jenkins-x/jx/pkg/jx/cmd/clients.(*factory).CreateVaultClient(0xc0008d1a40, 0xc000eb3020, 0x16, 0x3f4bfd7, 0x7, 0x0, 0x0, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/clients/factory.go:493 +0x65d
github.com/jenkins-x/jx/pkg/jx/cmd/clients.(*factory).CreateSystemVaultClient(0xc0008d1a40, 0x3f4bfd7, 0x7, 0x3f4bfd7, 0x7, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/clients/factory.go:420 +0xaa
github.com/jenkins-x/jx/pkg/jx/cmd/clients.(*factory).CreateAuthConfigService(0xc0008d1a40, 0x3f578e6, 0xc, 0x3f4bfd7, 0x7, 0x0, 0x0, 0x13, 0x6c32700)
/workspace/workspace/pkg/jx/cmd/clients/factory.go:372 +0xcb
github.com/jenkins-x/jx/pkg/jx/cmd.(*CommonOptions).CreateGitAuthConfigServiceFromSecrets(0xc0000c6480, 0x3f578e6, 0xc, 0x0, 0x1029d00, 0x8, 0x4097868, 0x0, 0xc000f7ee48)
/workspace/workspace/pkg/jx/cmd/common_auth.go:54 +0x8d
github.com/jenkins-x/jx/pkg/jx/cmd.(*CommonOptions).CreateGitAuthConfigService(0xc0000c6480, 0xc, 0x0, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/common_auth.go:45 +0xa4
github.com/jenkins-x/jx/pkg/jx/cmd.(*InstallOptions).configureGitAuth(0xc000a58020, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/install.go:1170 +0xe9
github.com/jenkins-x/jx/pkg/jx/cmd.(*InstallOptions).Run(0xc000a58020, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/install.go:498 +0x4b8
github.com/jenkins-x/jx/pkg/jx/cmd.(*CreateClusterOptions).initAndInstall(0xc000a58000, 0x3f46a31, 0x3, 0xb, 0xc00089dba0)
/workspace/workspace/pkg/jx/cmd/create_cluster.go:152 +0x7a
github.com/jenkins-x/jx/pkg/jx/cmd.(*CreateClusterGKEOptions).createClusterGKE(0xc000a58000, 0x3f46a31, 0x3)
/workspace/workspace/pkg/jx/cmd/create_cluster_gke.go:395 +0x1122
github.com/jenkins-x/jx/pkg/jx/cmd.(*CreateClusterGKEOptions).Run(0xc000a58000, 0x0, 0x0)
/workspace/workspace/pkg/jx/cmd/create_cluster_gke.go:139 +0xad
github.com/jenkins-x/jx/pkg/jx/cmd.NewCmdCreateClusterGKE.func1(0xc000a35b80, 0xc0004a9a40, 0x0, 0x4)
/workspace/workspace/pkg/jx/cmd/create_cluster_gke.go:95 +0x78
github.com/spf13/cobra.(*Command).execute(0xc000a35b80, 0xc0004a98c0, 0x4, 0x4, 0xc000a35b80, 0xc0004a98c0)
/home/jenkins/go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc0008bcc80, 0xc000aa8500, 0xc000acd400, 0xc000aba780)
/home/jenkins/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xc0008bcc80, 0xc0008d1a40, 0x4699900)
/home/jenkins/go/pkg/mod/github.com/spf13/[email protected]/command.go:800 +0x2b
github.com/jenkins-x/jx/cmd/jx/app.Run(0xc00089df88, 0xc0000b0058)
/workspace/workspace/cmd/jx/app/jx.go:15 +0xed
main.main()
/workspace/workspace/cmd/jx/jx.go:11 +0x22
error creating cluster configuring the git auth: creating the git auth config service: no 'jx-vault-sirjenkinsgit' vault found in namespace 'default' despite it being the vault name from jx-install-config ConfigMap
error: configuring the git auth: creating the git auth config service: no 'jx-vault-sirjenkinsgit' vault found in namespace 'default' despite it being the vault name from jx-install-config ConfigMap
The output of jx version is:
NAME VERSION
jx 1.3.1075
Kubernetes cluster v1.12.4
kubectl v1.14.0
helm client v2.13.1+g618447c
helm server v2.12.2+g7d2b0c7
git git version 2.21.0
Operating System Mac OS X 10.12.6 build 16G1815
static jenkins
Using jx create cluster gke --ng to create the cluster
OS X Sierra 10.12.6
It doesn't seem to pick the right namespace. It should be jx instead of default.
Most helpful comment
It doesn't seem to pick the right namespace. It should be
jxinstead ofdefault.