Change:
Following the official documentation for creating a Kubernetes cluster using Juju on AWS gives the following error: make:  No rule to make target `clean'. Stop. Use the docker image pointed in the documentation to start a juju clientInstall curl Log in as root and install curl: apt-get update && apt-get install -y curl Choose juju providerLaunch the install Once the script has failed for the first time, if we launch kube- using bash debug we get the following: It looks like we call make while we are at the root directory of the kubernetes repository, and there doesn't exist any Makefile there.
Can you link to the official documentation in question?
Ah, probably
Yes, this is the link.
How do I get past this? :~/kubernetes$ cluster/kube- ... Starting cluster using provider: juju ... calling verify-prereqs ... calling kube-up make:  No rule to make target 'clean'. Stop. I am running ubuntu 16.04
This issue has been open for a long time, no one reviews these?
did you ever get past this?
I spent several days trying to get it working but I couldn't. Then I tried with the AWS install method.
Thank you for your interest in juju and filing the bug. We apologize you ran into this issue, we were re-tooling the cluster/kube-up scripts to work with the latest beta's, and that drifted from breaking changes upstream. We were a bit short handed and this bug did slip through our radar, however we've taken some time to update the scripts to work with the latest beta. Thanks again for filing the bug, and bringing our attention to the issue. We will be watching the issue tracker closer now for issues that mention 'juju' to try and prevent this from happening again in the future. Thank you as well for chiming and lending a hand. If you are still interested in giving it a try, once is merged, this behavior should be corrected for you.
We also updated the getting started guide for Juju in the latest revision of the tools: and please ping us directly if you find any more issues with the documentation or the kube- script. And thanks again for raising this issue!

Discussion:
# Setting this state before easyrsa is configured ensures the tls layer is # configured to generate certificates with client authentication. set_state('tls.client.authorization.required') <ins> domain = hookenv.config().get('dns_domain') cidr = hookenv.config().get('cidr') sdn_ip = get_sdn_ip(cidr) # Create extra sans that the tls layer will add to the server cert. extra_sans = [ sdn_ip, 'kubernetes', 'kubernetes.{0}'.format(domain), 'kubernetes.default', 'kubernetes.default.svc', 'kubernetes.default.svc.{0}'.format(domain) ] unitdata.kv().set('extra_sans', extra_sans) </ins> @hook('config-changed')

# Stop and remove the Kubernetes kubelet container. compose.kill('master') compose.rm('master') <ins> compose.kill('proxy') compose.rm('proxy') </ins> # Remove the state so the code can react to restarting kubelet. remove_state('kubelet.available') else:

status_set('waiting', 'Waiting for relation to ETCD') <del> @when('etcd.available', 'kubeconfig.created') </del> <ins> @when('kubeconfig.created') @when('etcd.available') </ins> @when_not('kubelet.available', 'proxy.available') def start_kubelet(etcd): '''Run the hyperkube container that starts the kubernetes services. <del> When the leader, run the master services (apiserver, controller, scheduler) </del> <ins> When the leader, run the master services (apiserver, controller, scheduler, proxy) </ins> using the master.json from the rendered manifest directory. When a follower, start the node services (kubelet, and proxy). ''' render_files(etcd)

status_set('maintenance', 'Starting the Kubernetes services.') if is_leader(): compose.up('master') <ins> compose.up('proxy') </ins> set_state('kubelet.available') # Open the secure port for api-server. hookenv.open_port(6443)

# Use a context manager to run the tar command in a specific directory. with chdir(directory): # Create a package with kubectl and the files to use it externally. <del> cmd = 'tar -cvzf /home/ubuntu/kubectl_package.tar.gz ca.crt client.crt client.key kubeconfig kubectl'  # noqa </del> <ins> cmd = 'tar -cvzf /home/ubuntu/kubectl_package.tar.gz ca.crt '  'client.key client.crt kubectl kubeconfig' </ins> check_call(split(cmd)) <ins> # This sets up the client workspace consistently on the leader and nodes. node_kubeconfig() </ins> set_state('kubeconfig.created')

return '.'.join(ip.split('.')[0:-1]) + '.10' <ins> def get_sdn_ip(cidr): '''Get the IP address for the SDN gateway based on the provided cidr.''' # Remove the range from the cidr. ip = cidr.split('/')[0] # Remove the last octet and replace it with 1. return '.'.join(ip.split('.')[0:-1]) + '.1' </ins> def render_files(reldata=None): '''Use jinja templating to render the docker-compose.yml and master.json file to contain the dynamic data for the configuration files.'''

# Add the charm configuration data to the context. context.update(hookenv.config()) if reldata: <del> # Add the etcd relation data to the context. context.update({'connection_string': reldata.connection_string()}) </del> <ins> connection_string = reldata.get_connection_string() # Define where the etcd tls files will be kept. etcd_dir = '/etc/ssl/etcd' # Create paths to the etcd client ca, key, and cert file locations. ca = os.path.join(etcd_dir, 'client-ca.pem') key = os.path.join(etcd_dir, 'client-key.pem') cert = os.path.join(etcd_dir, 'client-cert.pem') # Save the client credentials (in relation data) to the paths provided. reldata.save_client_credentials(key, cert, ca) # Update the context so the template has the etcd information. context.update({'etcd_dir': etcd_dir, 'connection_string': connection_string, 'etcd_ca': ca, 'etcd_key': key, 'etcd_cert': cert}) </ins> charm_dir = hookenv.charm_dir() rendered_kube_dir = os.path.join(charm_dir, 'files/kubernetes') if not os.path.exists(rendered_kube_dir):

"apiserver", "--service-cluster-ip-range={{ cidr }}", "--insecure-bind-address=0.0.0.0", <ins> {% if etcd_dir -%} "--etcd-cafile={{ etcd_ca }}", "--etcd-keyfile={{ etcd_key }}", "--etcd-certfile={{ etcd_cert }}", {%- endif %} </ins> "--etcd-servers={{ connection_string }}", "--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota", "--client-ca-file=/srv/kubernetes/ca.crt",

{ "name": "data", "mountPath": "/srv/kubernetes" <ins> }, {% if etcd_dir -%} { "name": "etcd-tls", "mountPath": "{{ etcd_dir }}" </ins> } <ins> {%- endif %} </ins> ] }, {

"path": "/srv/kubernetes" }, "name": "data" <ins> }, {% if etcd_dir -%} { "hostPath": { "path": "{{ etcd_dir }}" }, "name": "etcd-tls" </ins> } <ins> {%- endif %} </ins> ] } }