You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/30 06:58:34 UTC
[GitHub] [apisix-ingress-controller] zenglongfeng opened a new issue #701: request help: how can i use ssl
zenglongfeng opened a new issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701
### Issue description
I want to use apisix ingress and configure ssl in the k8s cluster. I need to configure ApisixTls according to the official documentation. After the configuration is completed, I found that apisix-ingress-controller reported an error. The content of the error is
2021-09-30T14:47:42+08:00 error ingress/apisix_tls.go:118 failed to translate ApisixTls {"error": "missing cert field", "ApisixTls": {"metadata":{"name": "shouba-tls","namespace":"default","uid":"9b6dbcbe-9cb8-46e4-ab8a-96158168e8be","resourceVersion":"897861","generation":1,"creationTimestamp":"2021 -09-30T06:21:36Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v1\",\ "kind\":\"ApisixTls\",\"metadata\":{\"annotations\":{},\"name\":\"shouba-tls\",\"namespace\":\"default \"},\"spec\":{\"hosts\":[\"aaa.shouba.cn\"],\"secret\":{\"name\":\"shouba-cn\", \"namespace\":\"default\"}}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion" :"apisix.apache.org/v1","time":"2021-09-30T06:21:36Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f: annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:hosts ":{},"f:secret":{".":{},"f:name":{},"f:namesp
ace":{}}}}},{" manager":"apisix-ingress-controller","operation":"Update","apiVersion":"apisix.apache.org/v1","time":"2021-09-30T06:21:37Z"," fieldsType":"FieldsV1","fieldsV1":{"f:status":{".":{},"f:conditions":{}}}}]},"spec":{"hosts":[ "aaa.shouba.cn"],"secret":{"name":"shouba-cn","namespace":"default"}},"status":{"conditions":[{"type":" ResourcesAvailable","status":"False","lastTransitionTime":"2021-09-30T06:21:37Z","reason":"ResourceSyncAborted","message":"missing cert field"}]}}}
This is my Apisix Route and ApisixTls configuration
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: httpserver-route
spec:
http:
-name: rule1
match:
hosts:
-aaa.shouba.cn
paths:
-/*
backend:
serviceName: httpbin
servicePort: 80
plugins:
-name: cors
enable: true
apiVersion: apisix.apache.org/v1
kind: ApisixTls
metadata:
name: shouba-tls
spec:
hosts:
-aaa.shouba.cn
secret:
name: shouba-cn
namespace: default
Is my configuration wrong?
### Environment
* your apisix-ingress-controller version (output of `apisix-ingress-controller version --long`);
apisix-ingress-controller version 1.2.0-no-git-module-go1.13.8
* your Kubernetes cluster version (output of `kubectl version`);
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.4-aliyun.1", GitCommit:"66492d8", GitTreeState:"", BuildDate:"2021-08-16T03:38:25Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
* if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (`uname -a`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 closed issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] zenglongfeng commented on issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
zenglongfeng commented on issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701#issuecomment-931089219
I try to create K8S resource "secret" command as follows
kubectl create secret generic shouba-cn --from-file=cert=./xx.crt --from-file=key=./xxx.key At the same time using the above configuration, he can work, it is very useful
thanks !!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701#issuecomment-930914508
And this one https://github.com/apache/apisix-ingress-controller/blob/master/test/e2e/ingress/ssl.go
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701#issuecomment-930913245
>"message":"missing cert field"
please see https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/practices/mtls.md
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701#issuecomment-932752445
It looks like your problem has been resolved, I will close this issue.
Feel free to reopen it if you have other questions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] zenglongfeng edited a comment on issue #701: request help: how can i use ssl
Posted by GitBox <gi...@apache.org>.
zenglongfeng edited a comment on issue #701:
URL: https://github.com/apache/apisix-ingress-controller/issues/701#issuecomment-931089219
I try to create K8S resource "secret" command as follows
kubectl create secret generic shouba-cn --from-file=cert=./xx.crt --from-file=key=./xxx.key At the same time using the above configuration, it can work, it is very useful
thanks !!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org