tangcong / codis-operator Goto Github PK
View Code? Open in Web Editor NEWCodis Operator creates and manages codis clusters(proxy based Redis cluster solution) running in kubernetes.(WIP)
License: Apache License 2.0
Codis Operator creates and manages codis clusters(proxy based Redis cluster solution) running in kubernetes.(WIP)
License: Apache License 2.0
create Claim sample-redis-volume-sample-redis-0 for Pod sample-redis-0 in StatefulSet sample-redis failed error: PersistentVolumeClaim "sample-redis-volume-sample-redis-0" is invalid: spec.resources[storage]: Required value
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/sample-hpa Deployment/sample-proxy <unknown>/10% 1 5 1 44m
add partition for codis-server rollingUpdate Strategy.
add maxSurge/maxUnavailable for codis-proxy rollingUpdate Strategy.
rt
Hi,
I'm using default kubernetes deployment scripts from codis repo with small changes on azure aks on production. But I was faced some situations when the proxy or the server has fallen. So I started to search another solution for codis on k8s. I've tried your project, but as far as I saw, it install the services as internal for the cluster. I need LoadBalancer for proxy and fe services, and also I need to add annotations for specifying loadbalancer for internal network use, so azure aks sets this service a static internal ip address. How can I specfy LoadBalancer type for the services and add annotations to the services? Also has there any issue to prevent us to use this on production environments?
pod/sample-dashboard-0 0/1 Terminating 0 2s
pod/sample-fe-75db67794-9qtfm 1/1 Terminating 0 55s
pod/sample-proxy-7c46c9b9b5-nrq6f 0/1 Terminating 0 5s
pod/sample-proxy-7c46c9b9b5-wnzdk 0/1 Terminating 0 5s
pod/sample-redis-0 0/1 Terminating 0 8s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/sample-fe NodePort 10.109.254.221 <none> 9090:31801/TCP 2s
service/sample-redis ClusterIP None <none> 6379/TCP 2s
NAME DESIRED CURRENT READY AGE
replicaset.apps/sample-fe-75db67794 2 0 0 55s
replicaset.apps/sample-proxy-7c46c9b9b5 3 0 0 5s
新建TKE/K8S集群(如有一台及以上云CVM主机,可选择新增空集群,TEK集群不收费,只收取CVM机器费用)
TencentHub控制面板,设置选项,源代码授权, 个人账户源代码授权,GITHUB
添加第一个工作流组件,hub.tencentyun.com/tencenthub/docker_builder,构建镜像,填写镜像地址等相关参数
添加第二个工作流组件, 选择kubectl_cmd组件,hub.tencentyun.com/tencenthub/kubectl_cmd,自动化部署到K8S,不过目前暂不支持直接上传YML文件,需要新增变量存储。
添加第三个工作流组件(可选),如钉钉消息、企业微信、邮件等。
rt
{
"kind": "StatefulSet",
"apiVersion": "apps/v1beta2",
"metadata": {
"name": "sample-dashboard",
"namespace": "codis-operator-system",
"selfLink": "/apis/apps/v1beta2/namespaces/codis-operator-system/statefulsets/sample-dashboard",
"uid": "107ed948-fb6e-11e8-9a76-080027edd7cc",
"resourceVersion": "545378",
"generation": 2,
"creationTimestamp": "2018-12-09T04:51:17Z",
"deletionTimestamp": "2018-12-11T14:06:28Z",
"deletionGracePeriodSeconds": 0,
"ownerReferences": [
{
"apiVersion": "codis.k8s.io/v1alpha1",
"kind": "CodisCluster",
"name": "sample",
"uid": "d74b97a6-fb69-11e8-9a76-080027edd7cc",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"foregroundDeletion"
]
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"clusterName": "sample",
"component": "codis-dashboard"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"clusterName": "sample",
"component": "codis-dashboard"
}
},
"spec": {
"containers": [
{
"name": "codis-dashboard",
"image": "codis3.2:latest",
"command": [
"codis-dashboard"
],
"args": [
"-c",
"$(CODIS_PATH)/config/dashboard.toml",
"--host-admin",
"$(POD_IP):18000",
"--product_name",
"$(PRODUCT_NAME)",
"--product_auth",
"product"
],
"ports": [
{
"name": "dashboard",
"containerPort": 18080,
"protocol": "TCP"
}
],
"env": [
{
"name": "CODIS_PATH",
"value": "/gopath/src/github.com/CodisLabs/codis"
},
{
"name": "PRODUCT_NAME",
"value": "codis-test"
},
{
"name": "POD_IP",
"valueFrom": {
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "status.podIP"
}
}
},
{
"name": "POD_NAME",
"valueFrom": {
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "metadata.name"
}
}
}
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
},
"serviceName": "",
"podManagementPolicy": "OrderedReady",
"updateStrategy": {
"type": "RollingUpdate",
"rollingUpdate": {
"partition": 0
}
},
"revisionHistoryLimit": 10
},
"status": {
"observedGeneration": 2,
"replicas": 1,
"readyReplicas": 1,
"currentRevision": "sample-dashboard-7ccf6f9689",
"updateRevision": "sample-dashboard-7ccf6f9689",
"collisionCount": 0
}
}
rt
for example, taints and tolerations, node affinity and pod affinity, anti-affinity
kube create -f deploy/manager/deployment-dev.yml
kube create -f examples/sample-1.yml
登录到容器发现 运行codis报错“NOAUTH Authentication required”
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.