在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mesosphere/dcos-kubernetes-quickstart开源软件地址(OpenSource Url):https://github.com/mesosphere/dcos-kubernetes-quickstart开源编程语言(OpenSource Language):HCL 53.7%开源软件介绍(OpenSource Introduction):Kubernetes on DC/OSKubernetes is now available as a DC/OS package to quickly, and reliably run Kubernetes clusters on Mesosphere DC/OS. NOTE: The latest Known limitationsBefore proceeding, please check the current package limitations. Pre-RequisitesCheck the requirements for running this quickstart:
QuickstartOnce the pre-requisites are met, clone this repo: $ git clone [email protected]:mesosphere/dcos-kubernetes-quickstart.git && cd dcos-kubernetes-quickstart Prepare infrastructure configurationThis quickstart defaults to Google Cloud First, make sure you have have followed the Google Cloud setup instructions. Then, start by generating the default infrastructure configuration: $ make gcp This will output sane defaults to WARNING: Please, do not set a smaller instance (VM) type on the risk of failing to install Kubernetes.
NOTE: The current release of the DC/OS GCP Terraform module also requires the
Kubernetes configurationRBACNOTE: This To deploy a cluster with RBAC disabled RBAC update
If you want to give users access to the Kubernetes API check documentation. NOTE: The authorization mode for a cluster must be chosen when installing the package. Changing the authorization mode after installing the package is not supported. HA ClusterNOTE: By default, it will provision a Kubernetes cluster with one (1) worker node, and a single instance of every control plane component. To deploy a highly-available cluster with three (3) private Kubernetes nodes update
Download command-line toolsIf you haven't already, please download DC/OS client, $ make get-cli The InstallYou are now ready to provision the DC/OS cluster and install the Kubernetes package: $ make deploy Terraform will now try and provision the infrastructure on your chosen cloud provider, and then proceed to install DC/OS. When DC/OS is up and running, the Kubernetes package installation will take place. Wait until all tasks are running before trying to access the Kubernetes API. You can watch the progress what was deployed so far with: $ make watch-kubernetes-cluster Below is an example of how it looks like when the install ran successfully:
You can access DC/OS Dashboard and check Kubernetes package tasks under Services: $ make ui Exposing the Kubernetes APICheck the exposing Kubernetes API doc to understand how the Kubernetes API gets exposed. To actually expose the Kubernetes API for the new Kubernetes cluster using Marathon-LB, run: $ make marathon-lb NOTE: If you have changed in Accessing the Kubernetes APIIn order to access the Kubernetes API from outside the DC/OS cluster, one needs
to configure $ make kubeconfig Let's test accessing the Kubernetes API and list the Kubernetes cluster nodes: $ ./kubectl --context devkubernetes01 get nodes
NAME STATUS ROLES AGE VERSION
kube-control-plane-0-instance.devkubernetes01.mesos Ready master 5m18s v1.16.9
kube-node-0-kubelet.devkubernetes01.mesos Ready <none> 2m58s v1.16.9 And now, let's check how the system Kubernetes pods are doing: $ ./kubectl --context devkubernetes01 -n kube-system get pods
NAME READY STATUS RESTARTS AGE
calico-node-s9828 2/2 Running 0 3m21s
calico-node-zc8qw 2/2 Running 0 3m38s
coredns-6c7669957f-rvz85 1/1 Running 0 3m38s
kube-apiserver-kube-control-plane-0-instance.devkubernetes01.mesos 1/1 Running 0 4m43s
kube-controller-manager-kube-control-plane-0-instance.devkubernetes01.mesos 1/1 Running 0 4m42s
kube-proxy-kube-control-plane-0-instance.devkubernetes01.mesos 1/1 Running 0 4m48s
kube-proxy-kube-node-0-kubelet.devkubernetes01.mesos 1/1 Running 0 3m21s
kube-scheduler-kube-control-plane-0-instance.devkubernetes01.mesos 1/1 Running 0 4m26s
kubernetes-dashboard-5cbf45898-nkjsm 1/1 Running 0 3m37s
local-dns-dispatcher-kube-node-0-kubelet.devkubernetes01.mesos 1/1 Running 0 3m21s
metrics-server-594576c7d8-cb4pj 1/1 Running 0 3m35s Accessing the Kubernetes DashboardYou will be able to access the Kubernetes Dashboard by running: $ kubectl --context devkubernetes01 proxy Then pointing your browser at:
Please note that you will have to sign-in into the Kubernetes Dashboard before being able to perform any action. Uninstall KubernetesTo uninstall the DC/OS Kubernetes package while leaving your DC/OS cluster up, run: $ make uninstall NOTE: This will only uninstall Kubernetes. Make sure you destroy your DC/OS cluster using the instructions below when you finish testing, or otherwise you will need to delete all cloud resources manually! Destroy clusterTo destroy the whole deployment: $ make destroy Last, clean generated resources: $ make clean DocumentationFor more details, please see the docs folder and as well check the official service docs CommunityGet help and connect with other users on the mailing list or on DC/OS community Slack in the #kubernetes channel. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论