Skip to content

Instantly share code, notes, and snippets.

@cjellick
Last active April 29, 2020 07:45
Show Gist options
  • Save cjellick/7b33732e41264c0adc343a460129a709 to your computer and use it in GitHub Desktop.
Save cjellick/7b33732e41264c0adc343a460129a709 to your computer and use it in GitHub Desktop.
custom cluster curl
curl 'https://localhost/v3/cluster' -H 'content-type: application/json' -H 'accept: application/json' -u '<generated token>' --data-binary '{"dockerRootDir":"/var/lib/docker","enableClusterAlerting":false,"enableClusterMonitoring":false,"enableNetworkPolicy":false,"windowsPreferedCluster":false,"type":"cluster","rancherKubernetesEngineConfig":{"addonJobTimeout":30,"ignoreDockerVersion":true,"sshAgentAuth":false,"type":"rancherKubernetesEngineConfig","kubernetesVersion":"v1.16.3-rancher1-1","authentication":{"strategy":"x509","type":"authnConfig"},"network":{"plugin":"canal","type":"networkConfig","options":{"flannel_backend_type":"vxlan"}},"ingress":{"provider":"nginx","type":"ingressConfig"},"monitoring":{"provider":"metrics-server","type":"monitoringConfig"},"services":{"type":"rkeConfigServices","kubeApi":{"alwaysPullImages":false,"podSecurityPolicy":false,"serviceNodePortRange":"30000-32767","type":"kubeAPIService"},"etcd":{"creation":"12h","extraArgs":{"heartbeat-interval":500,"election-timeout":5000},"gid":0,"retention":"72h","snapshot":false,"uid":0,"type":"etcdService","backupConfig":{"enabled":true,"intervalHours":12,"retention":6,"safeTimestamp":false,"type":"backupConfig"}}}},"localClusterAuthEndpoint":{"enabled":true,"type":"localClusterAuthEndpoint"},"labels":{},"name":"cluster-3"}' -k
{
"dockerRootDir": "/var/lib/docker",
"enableClusterAlerting": false,
"enableClusterMonitoring": false,
"enableNetworkPolicy": false,
"windowsPreferedCluster": false,
"type": "cluster",
"rancherKubernetesEngineConfig": {
"addonJobTimeout": 30,
"ignoreDockerVersion": true,
"sshAgentAuth": false,
"type": "rancherKubernetesEngineConfig",
"kubernetesVersion": "v1.16.3-rancher1-1",
"authentication": {
"strategy": "x509",
"type": "authnConfig"
},
"network": {
"plugin": "canal",
"type": "networkConfig",
"options": {
"flannel_backend_type": "vxlan"
}
},
"ingress": {
"provider": "nginx",
"type": "ingressConfig"
},
"monitoring": {
"provider": "metrics-server",
"type": "monitoringConfig"
},
"services": {
"type": "rkeConfigServices",
"kubeApi": {
"alwaysPullImages": false,
"podSecurityPolicy": false,
"serviceNodePortRange": "30000-32767",
"type": "kubeAPIService"
},
"etcd": {
"creation": "12h",
"extraArgs": {
"heartbeat-interval": 500,
"election-timeout": 5000
},
"gid": 0,
"retention": "72h",
"snapshot": false,
"uid": 0,
"type": "etcdService",
"backupConfig": {
"enabled": true,
"intervalHours": 12,
"retention": 6,
"safeTimestamp": false,
"type": "backupConfig"
}
}
}
},
"localClusterAuthEndpoint": {
"enabled": true,
"type": "localClusterAuthEndpoint"
},
"labels": {},
"name": "cluster-1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment