This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Azure getting started * azure-getting started * azure getting started * Update getting-started-standalone.md * azure getting started * azure - getting started * azure getting started * azure getting started * azure getting started * azure standalone install * adding outputs for get nodes and cluster get
- Loading branch information
1 parent
528345b
commit cb548bc
Showing
9 changed files
with
231 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
## Create Microsoft Azure Clusters | ||
|
||
This section describes setting up management and workload clusters for | ||
Microsoft Azure. | ||
|
||
1. Initialize the Tanzu kickstart UI. | ||
|
||
```sh | ||
tanzu management-cluster create --ui | ||
``` | ||
|
||
1. Go through the installation process for Azure. With the following | ||
considerations: | ||
|
||
|
||
* In Management Cluster Settings, use the Instance type drop-down menu to select from different combinations of CPU, RAM, and storage for the control plane node VM or VMs. The minimum configuration is 2 CPUs and 8 GB memory | ||
|
||
* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management](../azure-install-mgmt/#step-5-identity-management). | ||
|
||
2. Validate the management cluster started successfully. | ||
|
||
```sh | ||
tanzu management-cluster get | ||
NAME NAMESPACE STATUS CONTROLPLANE WORKERS KUBERNETES ROLES | ||
mgmtclusterone tkg-system running 1/1 1/1 v1.21.2+vmware.1 management | ||
Details: | ||
NAME READY SEVERITY REASON SINCE MESSAGE | ||
/mgmtclusterone True 67s | ||
├─ClusterInfrastructure - AzureCluster/mgmtclusterone True 69s | ||
├─ControlPlane - KubeadmControlPlane/mgmtclusterone-control-plane True 67s | ||
│ └─Machine/mgmtclusterone-control-plane-4hszz True 68s | ||
└─Workers | ||
└─MachineDeployment/mgmtclusterone-md-0 | ||
└─Machine/mgmtclusterone-md-0-85b4bc7c6d-mbj7j True 68s | ||
Providers: | ||
NAMESPACE NAME TYPE PROVIDERNAME VERSION WATCHNAMESPACE | ||
capi-kubeadm-bootstrap-system bootstrap-kubeadm BootstrapProvider kubeadm v0.3.22 | ||
capi-kubeadm-control-plane-system control-plane-kubeadm ControlPlaneProvider kubeadm v0.3.22 | ||
capi-system cluster-api CoreProvider cluster-api v0.3.22 | ||
capz-system infrastructure-azure InfrastructureProvider azure v0.4.15 | ||
``` | ||
3. Create a cluster name that will be used throughout this Getting Started guide. This instance of `MGMT_CLUSTER_NAME` should be set to whatever value is returned by `tanzu management-cluster get` in the previous step. | ||
|
||
```sh | ||
export MGMT_CLUSTER_NAME="<INSERT_MGMT_CLUSTER_NAME_HERE>" | ||
export WORKLOAD_CLUSTER_NAME="<INSERT_WORKLOAD_CLUSTER_NAME_HERE>" | ||
``` | ||
|
||
4. Capture the management cluster's kubeconfig. | ||
```sh | ||
tanzu management-cluster kubeconfig get ${MGMT_CLUSTER_NAME} --admin | ||
Credentials of workload cluster 'mtce' have been saved | ||
You can now access the cluster by running 'kubectl config use-context mtce-admin@mtce' | ||
``` | ||
> Note the context name `${MGMT_CLUSTER_NAME}-admin@${MGMT_CLUSTER_NAME}`, you'll use the above command in | ||
> future steps. | ||
|
||
5. Set your kubectl context to the management cluster. | ||
|
||
```sh | ||
kubectl config use-context ${MGMT_CLUSTER_NAME}-admin@${MGMT_CLUSTER_NAME} | ||
``` | ||
|
||
6. Validate you can access the management cluster's API server. | ||
```sh | ||
kubectl get nodes | ||
NAME STATUS ROLES AGE VERSION | ||
standalonedelete-control-plane-9ndzx Ready control-plane,master 3m36s v1.21.2+vmware.1 | ||
standalonedelete-md-0-7hvll Ready <none> 113s v1.21.2+vmware.1 | ||
``` | ||
7. Next you will create a workload cluster. First, setup a workload cluster config file. | ||
```sh | ||
cp ~/.tanzu/tkg/clusterconfigs/<MGMT-CONFIG-FILE> ~/.tanzu/tkg/clusterconfigs/workload1.yaml | ||
``` | ||
> ``<MGMT-CONFIG-FILE>`` is the name of the management cluster YAML config file | ||
> This step duplicates the configuration file that was created when you deployed your management cluster. The configuration file will either have the name you assigned to the management cluster, or if no name was assigned, it will be a randomly generated name. | ||
> This duplicated file will be used as the configuration file for your workload cluster. You can edit the parameters in this new file as required. For an example of a workload cluster template, see [Azure Workload Cluster Template](../azure-wl-template). | ||
[](ignored) | ||
> In the next two steps you will edit the parameters in this new file (`workload1`) and then use the file to deploy a workload cluster. | ||
[](ignored) | ||
8. In the new workload cluster file (`~/.config/tanzu/tkg/clusterconfigs/workload1.yaml`), edit the CLUSTER_NAME parameter to assign a name to your workload cluster. For example, | ||
```yaml | ||
CLUSTER_CIDR: 100.96.0.0/11 | ||
CLUSTER_NAME: my-workload-cluster | ||
CLUSTER_PLAN: dev | ||
``` | ||
#### Note | ||
* If you did not specify a name for your management cluster, the installer generated a random unique name. In this case, you must manually add the CLUSTER_NAME parameter and assign a workload cluster name. | ||
* If you specified a name for your management cluster, the CLUSTER_NAME parameter is present and needs to be changed to the new workload cluster name. | ||
> The other parameters in ``workload1.yaml`` are likely fine as-is. However, you can change them as required. Reference an example configuration template here: [Amazon EC3 Workload Cluster Template](../aws-wl-template). | ||
> Validation is performed on the file prior to applying it, so the `tanzu` command will return a message if something necessary is omitted. | ||
9. Create your workload cluster. | ||
```sh | ||
tanzu cluster create ${WORKLOAD_CLUSTER_NAME} --file ~/.tanzu/tkg/clusterconfigs/workload1.yaml | ||
``` | ||
10. Validate the cluster starts successfully. | ||
```sh | ||
tanzu cluster list | ||
``` | ||
11. Capture the workload cluster's kubeconfig. | ||
|
||
```sh | ||
tanzu cluster kubeconfig get ${WORKLOAD_CLUSTER_NAME} --admin | ||
``` | ||
|
||
12. Set your `kubectl` context accordingly. | ||
|
||
```sh | ||
kubectl config use-context ${WORKLOAD_CLUSTER_NAME}-admin@${WORKLOAD_CLUSTER_NAME} | ||
``` | ||
|
||
13. Verify you can see pods in the cluster. | ||
|
||
```sh | ||
kubectl get pods --all-namespaces | ||
NAMESPACE NAME READY STATUS RESTARTS AGE | ||
kube-system antrea-agent-9d4db 2/2 Running 0 3m42s | ||
kube-system antrea-agent-vkgt4 2/2 Running 1 5m48s | ||
kube-system antrea-controller-5d594c5cc7-vn5gt 1/1 Running 0 5m49s | ||
kube-system coredns-5d6f7c958-hs6vr 1/1 Running 0 5m49s | ||
kube-system coredns-5d6f7c958-xf6cl 1/1 Running 0 5m49s | ||
kube-system etcd-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s | ||
kube-system kube-apiserver-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s | ||
kube-system kube-controller-manager-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s | ||
kube-system kube-proxy-9825q 1/1 Running 0 5m48s | ||
kube-system kube-proxy-wfktm 1/1 Running 0 3m42s | ||
kube-system kube-scheduler-tce-guest-control-plane-b2wsf 1/1 Running 0 5m56s | ||
``` |
41 changes: 41 additions & 0 deletions
41
docs/site/content/docs/assets/azure-standalone-clusters.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
## Create Standalone Azure Clusters | ||
|
||
This section covers setting up a standalone cluster in Azure. A standalone cluster provides a workload cluster that is **not** managed by a centralized management cluster. | ||
|
||
1. Initialize the Tanzu kickstart UI. | ||
|
||
```sh | ||
tanzu standalone-cluster create --ui | ||
``` | ||
|
||
1. Go through the configuration steps, considering the following. | ||
|
||
|
||
* In Management Cluster Settings, use the Instance type drop-down menu to select from different combinations of CPU, RAM, and storage for the control plane node VM or VMs. The minimum configuration is 2 CPUs and 8 GB memory | ||
|
||
* Disable **Enable Identity Management Settings**. You can disable identity management for proof-of-concept/development deployments, but it is strongly recommended to implement identity management in production deployments. For more information about enabling Identity Management, see [Identity Management](../azure-install-mgmt/#step-5-identity-management). | ||
|
||
1. At the end of the UI, deploy the cluster. | ||
|
||
1. Store the name of your cluster (set during configuration or automatically generated) to a | ||
`WORKLOAD_CLUSTER_NAME` environment variable. | ||
|
||
```sh | ||
export WORKLOAD_CLUSTER_NAME="<INSERT_WORKLOAD_CLUSTER_NAME_HERE>" | ||
``` | ||
|
||
1. Set your kubectl context to the cluster. | ||
|
||
```sh | ||
kubectl config use-context ${WORKLOAD_CLUSTER_NAME}-admin@${WORKLOAD_CLUSTER_NAME} | ||
``` | ||
|
||
1. Validate you can access the cluster's API server. | ||
```sh | ||
kubectl get nodes | ||
NAME STATUS ROLES AGE VERSION | ||
ip-10-0-1-133.us-west-2.compute.internal Ready <none> 123m v1.20.1+vmware.2 | ||
ip-10-0-1-76.us-west-2.compute.internal Ready control-plane,master 125m v1.20.1+vmware.2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Deploy a Standalone Cluster to Azure | ||
{{% include "/docs/assets/azure-standalone-clusters.md" %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters