kubernetes – Error accessing MySQL endpoints through nginx ingress in eks

I got 3 node on aws eks.

I want to use mysql client and access the database via Nginx Ingress.

this is my yaml.

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: ext-nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: ext-nginx-ingress
  namespace: ext-nginx-ingress
spec:
  rules:
    - host: mysql.***********.com
      http:
        paths:
          - backend:
              serviceName: mysql-svc
              servicePort: 3306
            path: /
            pathType: ImplementationSpecific
          - backend:
              serviceName: nginx-svc
              servicePort: 80
            path: /nginx
            pathType: ImplementationSpecific

describe my ingress service

tes.io/name=ingress-nginx
Type:                     LoadBalancer
IP:                       172.20.209.228
LoadBalancer Ingress:     ************.elb.ap-northeast-2.amazonaws.com
Port:                     http  80/TCP
TargetPort:               http/TCP
NodePort:                 http  31218/TCP
Endpoints:                10.11.53.243:80
Port:                     https  443/TCP
TargetPort:               https/TCP
NodePort:                 https  31308/TCP
Endpoints:                10.11.53.243:443
Port:                     proxie-tcp-mysql  3306/TCP
TargetPort:               mysql/TCP
NodePort:                 proxie-tcp-mysql  32514/TCP
Endpoints:                
Session Affinity:         None
External Traffic Policy:  Cluster

configmap

apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ext-nginx-ingress
data:
  3306: ext-nginx-ingress/mysql-svc:3306

Accessible by telnet 80 port but not by mysql client.

telnet mysql.*****.com 80                          
Trying 3.******...
Connected to mysql.******.com.

Of the target groups associated with nlb, the node port associated with 3306 ports is in the unhealthy state.

Port:                     proxie-tcp-mysql  3306/TCP
TargetPort:               mysql/TCP
NodePort:                 proxie-tcp-mysql  32514/TCP

Thank you for reading.
MYSQL Pod and Service create well endpoint.

cors – What is the use of Access-Control-Allow-Headers for unauthenticated endpoints?

I understand that servers might want to prevent bad origins somehow stealing certain data and crafting a request to request some authorized data from a different domain. Such as using “Authorization” header etc., what is the use of Access-Control-Allow-Headers for unauthenticated endpoints? In such cases, shouldn’t servers just accept all headers?

typescript – Are there technical issues/disavdantages on this BaseService that aims to simplify calling API endpoints

I have created an angular BaseService that aims to simplify calling API endpoints

I would like to know if you see any code smells, bad patterns or architecture issues.
What disadvantages could this have.

The idea is to decouple the api configuration from the implementation

The configuration is made in the api-config.ts

export enum ENDPOINT {
    CONFIGURATION_GET_MENU = 0,
    CONFIGURATION_GET_MINUTE_OFFSET,
    APPOINTMENT_GET_ADV_TYPES,
    APPOINTMENT_GET_ADV_DOMAIN_GROUPS,
    APPOINTMENT_GET_ADV_EXISTING_DATA,
    APPOINTMENT_DELETE_ADV,
    DASHBOARD_GET_NOSHOW_DATA,
}

export enum VERB {
    GET,
    GET_BY_PARAMS,
    POST_BODY,
    POST_BODY_PARAMS,
    PATCH,
}

export class ApiConfig {
    endpoint: ENDPOINT;
    url: string;
    verb: VERB;
}

const API_CONFIG: ApiConfig() = (
    {
        endpoint: ENDPOINT.CONFIGURATION_GET_MENU,
        url: '/cfg/getMenu',
        verb: VERB.GET
    },
       {
        endpoint: ENDPOINT.CONFIGURATION_GET_MINUTE_OFFSET,
        url: '/cfg/getCSMO',
        verb: VERB.GET_BY_PARAMS
    },
    {
        endpoint: ENDPOINT.APPOINTMENT_UPSERT_ADV_TYPES,
        url: '/aat/post',
        verb: VERB.POST_BODY
    },
    {
        endpoint: ENDPOINT.APPOINTMENT_DELETE_ADV,
        url: '/aat/delete',
        verb: VERB.PATCH
    }
    {
        endpoint: ENDPOINT.DASHBOARD_GET_NOSHOW_DATA,
        url: '/dsh/getCNSD',
        verb: VERB.POST_BODY_PARAMS
    }
);


export { API_CONFIG as API_CONFIG };

Then the baseService exposes a call method that determine what verb needs to be called and is the only place where httpClient is used

import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { ConfigService } from 'src/app/app-config.service';
import { Observable } from 'rxjs/internal/Observable';
import { ApiConfig, API_CONFIG, ENDPOINT, VERB } from './api-config';

class CallOptions {
    body?: any;
    params?: HttpParams;
    queryString?: string;
}

@Injectable()
export class BaseService {

    constructor(protected httpClient: HttpClient, private configService: ConfigService) { }

    public call(apiEndpoint: ENDPOINT, opt: CallOptions): Observable<any> {

        const verb = this.getConfig(apiEndpoint).verb;

        switch (verb) {
            case VERB.GET:
                return this.get(apiEndpoint);
            case VERB.GET_BY_PARAMS:
                return this.getWithParams(apiEndpoint, opt.params);
            case VERB.PATCH:
                return this.patch(apiEndpoint, opt.queryString, opt.params);
            case VERB.POST_BODY:
                return this.post(apiEndpoint, opt.body);
            case VERB.POST_BODY_PARAMS:
                return this.postWithParams(apiEndpoint, opt.body, opt.params);
            default:
                const error = `BaseService: Verb ${verb} not supported yet`;
                console.log(error);
                throw new Error(error);
        }
    }
    //TODO if migration is finished convert this to private, it should not fail compiling
    protected getBaseUrl(): string {
        return this.configService.get('apiUrl');
    }

    private getConfig(apiEndpoint: ENDPOINT): ApiConfig {
        const apiConfigEndpoint = API_CONFIG.find(e => e.endpoint === apiEndpoint);
        if (apiConfigEndpoint === undefined) {
            const error = `BaseService: Endpoint (${apiEndpoint}) not configured`;
            console.log(error);
            throw new Error(error);
        }
        return apiConfigEndpoint;
    }

    private buildURL(apiEndpoint: ENDPOINT) {
        return `${this.getBaseUrl()}${this.getConfig(apiEndpoint).url}`;
    }

    private get(apiEndpoint: ENDPOINT): Observable<any> {
        return this.httpClient.get<any>(this.buildURL(apiEndpoint));
    }

    private getWithParams(apiEndpoint: ENDPOINT, params: HttpParams): Observable<any> {
        return this.httpClient.get<any>(this.buildURL(apiEndpoint), { params });
    }

    private post(apiEndpoint: ENDPOINT, body: any): Observable<any> {
        return this.httpClient.post<any>(this.buildURL(apiEndpoint), body);
    }

    private postWithParams(apiEndpoint: ENDPOINT, body: any, params: HttpParams): Observable<any> {
        return this.httpClient.post<any>(this.buildURL(apiEndpoint), body, { params });
    }

    private patch(apiEndpoint: ENDPOINT, queryParams: string, params: HttpParams): Observable<any> {
        return this.httpClient.patch<any>(`${this.buildURL(apiEndpoint)}?${queryParams}`, params);
    }
}

Since the call method returns an Observable it can be used in the same places and in the same way as when calling httpClient get or post methods

loadMenu$ = createEffect(() => this.actions$.pipe(
        ofType(actions.loadMenu),
        switchMap(() => this.baseService.call(ENDPOINT.CONFIGURATION_GET_MENU, {})
            .pipe(
                map(response => actions.loadMenuComplete({ menu: response.result })),
                catchError(() => of(actions.loadMenuFailure({ error: 'fail' })))
            )
        )
    ));

differential equations – A bound on a solution of an ODE, given some bounds on endpoints

Let $V : (a,b) to mathbb{R}$ be smooth, strictly increasing and $V(a) = 0$. Suppose that $f : (a,b) to mathbb{R}$ is smooth and satisfies $f^{prime prime} (x) + V(x) f(x) = 0$ on $(a,b)$. Can we then bound $sup_{x in (a,b)} |f(x)|$ in terms of $f(a) , f(b) , f^{prime} (b)$? I intentionally don’t put $f^{prime} (a)$ into the list.

rest api – Disable part of endpoints wordpress api

I try to disable some parts of the API :

  • display list of users
  • display detail of users

But i want to keep the api to create and update users.

I did this :

add_filter( 'rest_endpoints', 'disable_custom_rest_endpoints' );
function disable_custom_rest_endpoints( $endpoints ) {
    
    
    if ( isset( $endpoints('/wp/v2/users') ) ) {
        unset( $endpoints('/wp/v2/users') );
    }
    if ( isset( $endpoints('/wp/v2/users/(?P<id>(d)+)') ) ) {
        unset( $endpoints('/wp/v2/users/(?P<id>(d)+)') );
    }

    return $endpoints;
}

My problem : this delete the possibility to update or create user as well

Is there another way to do it ?

Thanks

design – Sharing types & endpoints between frontend & backend

design – Sharing types & endpoints between frontend & backend – Software Engineering Stack Exchange

probability theory – Intuition for formula of variance of Brownian Motion conditioned on two endpoints

I am familiar with the following interpolation property of Brownian Motion (this is essentially a theorem about a Brownian Bridge):

Theorem. Let $W$ be a standard Brownian Motion, and $0<t_1 < t < t_2$. Then the conditional distribution of $W_t$ given $W_{t_1}=x_1$ and $W_{t_2}=x_2$ is $N(mu, sigma^2)$ with $mu = x_1 + frac{t-t_1}{t_2-t_1}(x_2-x_1)$ and $sigma^2 = frac{(t_2-t)(t-t_1)}{t_2-t_1}$.

I have a good intuition for the mean: $mu$ is the linear interpolation of the values $(t_1, x_1), (t_2, x_2)$ at time $t$.

However, I have no intuition for where this $sigma^2$ comes from, other than it just pops out of the proof of the theorem. Is there an intuitive reason for this formula? I’ve noticed $sigma^2$ can be written as $(t_2-t_1)alpha(1-alpha)$ if we write $t$ as a convex combination $t = alpha t_1+(1-alpha)t_2$ if that helps.

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies