Created
August 6, 2020 12:56
-
-
Save cdoan1/9a0dc4ed769a9b0e8c8491ed1fa51463 to your computer and use it in GitHub Desktop.
2.0 create and import manifest
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
--- | |
apiVersion: hive.openshift.io/v1 | |
kind: ClusterDeployment | |
metadata: | |
name: {{ .ManagedClusterName }} | |
namespace: {{ .ManagedClusterName }} | |
labels: | |
cloud: {{ .ManagedClusterCloud }} | |
region: {{ .ManagedClusterRegion }} | |
vendor: {{ .ManagedClusterVendor }} | |
spec: | |
baseDomain: {{ .ManagedClusterBaseDomain }} | |
clusterName: {{ .ManagedClusterName }} | |
controlPlaneConfig: | |
servingCertificates: {} | |
installed: false | |
platform: | |
{{if (eq .ManagedClusterCloud "aws") }} | |
aws: | |
{{ end }} | |
{{if (eq .ManagedClusterCloud "azure") }} | |
azure: | |
baseDomainResourceGroupName: {{ .ManagedClusterBaseDomainRGN }} | |
{{ end }} | |
{{if (eq .ManagedClusterCloud "gcp") }} | |
gcp: | |
{{ end }} | |
credentialsSecretRef: | |
name: {{ .ManagedClusterName }}-creds | |
region: {{ .ManagedClusterRegion }} | |
provisioning: | |
installConfigSecretRef: | |
name: {{ .ManagedClusterName }}-install-config | |
sshPrivateKeySecretRef: | |
name: {{ .ManagedClusterName }}-ssh-private-key | |
imageSetRef: | |
#quay.io/openshift-release-dev/ocp-release:4.3.28-x86_64 | |
name: {{ .ManagedClusterImageRefName }} | |
pullSecretRef: | |
name: {{ .ManagedClusterName }}-pull-secret | |
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: {{ .ManagedClusterName }}-install-config | |
namespace: {{ .ManagedClusterName }} | |
type: Opaque | |
data: | |
# Base64 encoding of install-config yaml | |
install-config.yaml: {{ .ManagedClusterInstallConfig }} | |
--- | |
apiVersion: agent.open-cluster-management.io/v1 | |
kind: KlusterletAddonConfig | |
metadata: | |
name: {{ .ManagedClusterName }} | |
namespace: {{ .ManagedClusterName }} | |
spec: | |
clusterName: {{ .ManagedClusterName }} | |
clusterNamespace: {{ .ManagedClusterName }} | |
clusterLabels: | |
cloud: {{ .ManagedClusterCloud }} | |
vendor: {{ .ManagedClusterVendor }} | |
applicationManager: | |
enabled: true | |
policyController: | |
enabled: true | |
searchCollector: | |
enabled: true | |
certPolicyController: | |
enabled: true | |
iamPolicyController: | |
enabled: true | |
version: 2.0.0 | |
--- | |
apiVersion: cluster.open-cluster-management.io/v1 | |
kind: ManagedCluster | |
metadata: | |
labels: | |
cloud: {{ .ManagedClusterCloud }} | |
name: {{ .ManagedClusterName }} | |
vendor: {{ .ManagedClusterVendor }} | |
name: {{ .ManagedClusterName }} | |
spec: | |
hubAcceptsClient: true | |
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: {{ .ManagedClusterName }}-pull-secret | |
namespace: {{ .ManagedClusterName }} | |
stringData: | |
.dockerconfigjson: |- | |
{{ .ManagedClusterPullSecret | indent 4 }} | |
type: kubernetes.io/dockerconfigjson | |
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: {{ .ManagedClusterName }}-ssh-private-key | |
namespace: {{ .ManagedClusterName }} | |
stringData: | |
ssh-privatekey: |- | |
{{ .ManagedClusterSSHPrivateKey | indent 4}} | |
type: Opaque |
Debugging Cluster Import Issues
- import can happen when user manually tries to import an existing cluster
- or, when creating a cluster using some automation, then wanting to import the cluster
- or importing happens after a successful provisioning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failure Symptom :: Root Cause
oc api-resources | grep False