_**_Here are the steps used to setup the beta-kubernetes framework on an existing CCM AWS cluster:
- Create the cluster on CCM
Make certain the DCOS CLI has been installed for your cluster
dcos config show
Note: Also, ensure the that the core.dcos_url matches with the expected AWS instance
Install Kubernetes package from the 1.10 universe
dcos package install --yes beta-kubernetes dcos package install --cli --yes dcos-enterprise-cli
XXX Describe the types of nodes installed by beta-kubernetes
Verify the Kubernetes framework package and all its containers have been installed
Verify that there exists the beta-kubernetes and security CLI options available for 'dcos':
kubernetes/dcos-kubernetes-quickstart >dcos
Command line utility for the Mesosphere Datacenter Operating
System (DC/OS). The Mesosphere DC/OS is a distributed operating
system built around Apache Mesos. This utility provides tools
for easy management of a DC/OS installation.
Available DC/OS commands:
auth Authenticate to DC/OS cluster
backup Manage DC/OS Backups
beta-kubernetes Beta-Kubernetes DC/OS CLI Module
cluster Manage your DC/OS clusters
config Manage the DC/OS configuration file
experimental Manage commands that are under development
help Display help information about DC/OS
job Deploy and manage jobs in DC/OS
marathon Deploy and manage applications to DC/OS
node View DC/OS node information
package Install and manage DC/OS software packages
security DC/OS security related commands
service Manage DC/OS services
task Manage DC/OS tasks
Get detailed command description with 'dcos <command> --help'.
- download the kubernetes helpers using:
git clone https://github.com/mesosphere/dcos-kubernetes-quickstart.git
- Enter the K8s working directory:
cd /dcos-kubernetes-quickstart
Setup the AWS credentials as environmental variables
export AWS_ACCESS_KEY_ID=<YOUR ACCESS KEY> export AWS_SECRET_ACCESS_KEY=<YOUR SECRET KEY> export SSH_USER=<the DC/OS cluster user id to use> export MASTER_IP=<the aws cluster master IP address>
Enter the Kubernetes working container
make docker
XXX Need to discuss how to adjust the configuration and the impact of different decisions.
This command will open the kubernetes container where you can continue the installation. If successful, and the AWS environmental variables were properly set, then you should see the following output:~/demos/kubernetes/dcos-kubernetes-quickstart >make docker docker run -i -v credentials.json:/credentials.json -e GOOGLE_APPLICATION_CREDENTIALS=/credentials.json -e AWS_SECRET_ACCESS_KEY=<YOUR ACCESS ID> -e AWS_ACCESS_KEY_ID=<YOUR ACCESS KEY> -e NUM_PRIVATE_AGENTS=3 -e NUM_PUBLIC_AGENTS=1 -e NUM_MASTERS=1 -v /Users/markjohnson/demos/kubernetes/dcos-kubernetes-quickstart:/dcos-kubernetes -t mesosphere/dcos-kubernetes /bin/bash root@8aa81a2cf185:/dcos-kubernetes#
Define the DC/OS master ip address to the
.master_ip
file in the container.root@8aa81a2cf185:/dcos-kubernetes# echo "<DCOS MASTER IP address" > .master_ip
Copy the AWS pem key to a file called .id_file in the container
setup the dcos cli for within the container
make setup-cli
You will be asked for the DC/OS cluster username for Kubernetes instance followed by the password. If no errors encountered, you are ready to move to the next step. The below screen print shows an example of a successful execution:
- Create a ssh tunnel to a node agent for APIServer access.
ssh -i $(ID_FILE) -f -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -o "ServerAliveInterval=120" \
-N -L 9000:apiserver-insecure.kubernetes.l4lb.thisdcos.directory:9000 \
$(SSH_USER)@$(MASTER_IP)
Additional Resources
- Official DCOS Kubernetes installation with AWS instructions: https://github.com/mesosphere/dcos-kubernetes-quickstart/blob/master/docs/aws.md
- Internal howto AWS link: https://github.com/mesosphere/dcos-kubernetes
- DC/OS Kubernetes framework YAML: https://github.com/mesosphere/dcos-kubernetes/blob/master/kubernetes/src/main/dist/svc_oss.yml#L190
Questions
- How to specify an on-prem K8s installation