Hi, I'm pretty green so please bear with me:
I'm automating AWS for my employer and since one of the targets for this summer is to make it easy to run multiple environments which are horizontally scalable and highly reliable, I figured Kubernetes would be the right tool. Seeing how our app isn't very unique in its design (a Java application + a DB) and is only supposed to run on AWS (for the time being), I figured kops should be a fine solution and easier to pick up than Kubernetes by itself, as it purports to automate away some boilerplate and to give you "one true way" (which may not be super flexible, but it seemed like a good starting point).
Now, I've written CloudFormation stacks to set up IAM accounts, a Route53 hosted zone, an S3 bucket as the state store and ECR as the container registry. So far so good. I can also successfully get kops running, and it says it has created a cluster. Here's the output of the Make target I use to set up the cluster, it includes the command invocations and an attempt to validate my cluster, which fails:
```
if ! KOPS_STATE_STORE='s3://
AWS_SHARED_CREDENTIALS_FILE='
KOPS_STATE_STORE='s3://
--zones=eu-west-1a \
'--name=development.edly.biz'; \
else \
echo 'cluster already in place.' 1>&2; \
fi
I0508 02:09:54.859029 3077 s3context.go:114] Found bucket "
I0508 02:09:55.152513 3077 s3fs.go:162] Reading file "
cluster already in place.
KOPS_STATE_STORE='s3://
'--name=
I0508 02:09:56.033033 3093 s3context.go:114] Found bucket "
I0508 02:09:56.033097 3093 s3fs.go:162] Reading file "s3://
I0508 02:09:56.235789 3093 s3fs.go:199] Listing objects in S3 bucket "
I0508 02:09:56.376208 3093 s3fs.go:162] Reading file "s3://
I0508 02:09:56.441279 3093 s3fs.go:162] Reading file "s3://
Validating cluster
I0508 02:09:56.510562 3093 validate_cluster.go:86] instance group: kops.InstanceGroupSpec{Role:"Master", Image:"kope.io/k8s-1.5-debian-jessie-amd64-hvm-ebs-2017-01-09", MinSize:(int32)(0xc42094e3a0), MaxSize:(int32)(0xc42094e39c), MachineType:"m3.medium", RootVolumeSize:(int32)(nil), RootVolumeType:(string)(nil), Subnets:[]string{"eu-west-1a"}, MaxPrice:(string)(nil), AssociatePublicIP:(bool)(nil), AdditionalSecurityGroups:[]string(nil), CloudLabels:map[string]string(nil), NodeLabels:map[string]string(nil)}
I0508 02:09:56.510595 3093 validate_cluster.go:86] instance group: kops.InstanceGroupSpec{Role:"Node", Image:"kope.io/k8s-1.5-debian-jessie-amd64-hvm-ebs-2017-01-09", MinSize:(int32)(0xc420942d84), MaxSize:(int32)(0xc420942d80), MachineType:"t2.medium", RootVolumeSize:(int32)(nil), RootVolumeType:(string)(nil), Subnets:[]string{"eu-west-1a"}, MaxPrice:(string)(nil), AssociatePublicIP:(bool)(nil), AdditionalSecurityGroups:[]string(nil), CloudLabels:map[string]string(nil), NodeLabels:map[string]string(nil)}
Cannot load kubecfg settings for "
aws.mk:158: recipe for target 'kops-up' failed
make: * [kops-up] Error 1
````
However, if I try to use kubectl I run into a wall. I've tried upgrading kops and I get another variant of the same error: "cannot find kubecfg certificate".
kops export kubecfg --name <redacted>:
cannot find kubecfg certificate
I don't understand why this is happening; should I generate this certificate myself? Do I have a version mismatch between my kubectl install and kops?
I really want to get to the point where I can run a single container with a database on kops on AWS. How close am I?
kops version:
Version 1.5.3 (git-46364f6)
kubectl version:
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:44:38Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Eh. I should RTFM, never mind. I need some sleep.
I got similar error and eventually found out that i was not running kops validate in the same machine that i ran kops create so kops validate was unable to load ~/.kube/config. May be a better error message or pre-check for kube config file existence would help in this case.
Most helpful comment
Eh. I should RTFM, never mind. I need some sleep.